@angular/aria 21.0.0-rc.1 → 21.0.0-rc.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.
Files changed (41) hide show
  1. package/_adev_assets/aria-accordion.json +429 -59
  2. package/_adev_assets/aria-combobox.json +261 -41
  3. package/_adev_assets/aria-grid.json +339 -85
  4. package/_adev_assets/aria-listbox.json +99 -70
  5. package/_adev_assets/aria-menu.json +355 -158
  6. package/_adev_assets/aria-tabs.json +198 -305
  7. package/_adev_assets/aria-toolbar.json +70 -221
  8. package/_adev_assets/aria-tree.json +153 -363
  9. package/fesm2022/_widget-chunk.mjs +388 -57
  10. package/fesm2022/_widget-chunk.mjs.map +1 -1
  11. package/fesm2022/accordion.mjs +125 -72
  12. package/fesm2022/accordion.mjs.map +1 -1
  13. package/fesm2022/aria.mjs +1 -1
  14. package/fesm2022/aria.mjs.map +1 -1
  15. package/fesm2022/combobox.mjs +129 -24
  16. package/fesm2022/combobox.mjs.map +1 -1
  17. package/fesm2022/grid.mjs +203 -65
  18. package/fesm2022/grid.mjs.map +1 -1
  19. package/fesm2022/listbox.mjs +50 -39
  20. package/fesm2022/listbox.mjs.map +1 -1
  21. package/fesm2022/menu.mjs +179 -71
  22. package/fesm2022/menu.mjs.map +1 -1
  23. package/fesm2022/private.mjs +418 -440
  24. package/fesm2022/private.mjs.map +1 -1
  25. package/fesm2022/tabs.mjs +105 -73
  26. package/fesm2022/tabs.mjs.map +1 -1
  27. package/fesm2022/toolbar.mjs +52 -44
  28. package/fesm2022/toolbar.mjs.map +1 -1
  29. package/fesm2022/tree.mjs +106 -63
  30. package/fesm2022/tree.mjs.map +1 -1
  31. package/package.json +2 -2
  32. package/types/_grid-chunk.d.ts +216 -35
  33. package/types/accordion.d.ts +134 -35
  34. package/types/combobox.d.ts +141 -12
  35. package/types/grid.d.ts +150 -32
  36. package/types/listbox.d.ts +60 -28
  37. package/types/menu.d.ts +133 -49
  38. package/types/private.d.ts +210 -250
  39. package/types/tabs.d.ts +124 -44
  40. package/types/toolbar.d.ts +58 -36
  41. package/types/tree.d.ts +121 -49
package/fesm2022/menu.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, signal, computed, effect, Directive, contentChildren, output, afterRenderEffect, untracked, model } from '@angular/core';
2
+ import { inject, ElementRef, input, computed, booleanAttribute, effect, Directive, contentChildren, signal, output, afterRenderEffect, untracked, model } from '@angular/core';
3
3
  import * as i1 from '@angular/aria/private';
4
4
  import { MenuTriggerPattern, DeferredContentAware, MenuPattern, MenuBarPattern, MenuItemPattern, DeferredContent } from '@angular/aria/private';
5
5
  import { _IdGenerator } from '@angular/cdk/a11y';
@@ -7,24 +7,45 @@ import { Directionality } from '@angular/cdk/bidi';
7
7
 
8
8
  class MenuTrigger {
9
9
  _elementRef = inject(ElementRef);
10
- textDirection = inject(Directionality).valueSignal;
11
10
  element = this._elementRef.nativeElement;
11
+ textDirection = inject(Directionality).valueSignal;
12
12
  menu = input(undefined, ...(ngDevMode ? [{
13
13
  debugName: "menu"
14
14
  }] : []));
15
- hasBeenFocused = signal(false, ...(ngDevMode ? [{
16
- debugName: "hasBeenFocused"
15
+ expanded = computed(() => this._pattern.expanded(), ...(ngDevMode ? [{
16
+ debugName: "expanded"
17
+ }] : []));
18
+ hasPopup = computed(() => this._pattern.hasPopup(), ...(ngDevMode ? [{
19
+ debugName: "hasPopup"
17
20
  }] : []));
21
+ disabled = input(false, ...(ngDevMode ? [{
22
+ debugName: "disabled",
23
+ transform: booleanAttribute
24
+ }] : [{
25
+ transform: booleanAttribute
26
+ }]));
27
+ softDisabled = input(true, ...(ngDevMode ? [{
28
+ debugName: "softDisabled",
29
+ transform: booleanAttribute
30
+ }] : [{
31
+ transform: booleanAttribute
32
+ }]));
18
33
  _pattern = new MenuTriggerPattern({
19
34
  textDirection: this.textDirection,
20
35
  element: computed(() => this._elementRef.nativeElement),
21
- menu: computed(() => this.menu()?._pattern)
36
+ menu: computed(() => this.menu()?._pattern),
37
+ disabled: () => this.disabled()
22
38
  });
23
39
  constructor() {
24
40
  effect(() => this.menu()?.parent.set(this));
25
41
  }
26
- onFocusIn() {
27
- this.hasBeenFocused.set(true);
42
+ open() {
43
+ this._pattern.open({
44
+ first: true
45
+ });
46
+ }
47
+ close() {
48
+ this._pattern.close();
28
49
  }
29
50
  static ɵfac = i0.ɵɵngDeclareFactory({
30
51
  minVersion: "12.0.0",
@@ -47,6 +68,20 @@ class MenuTrigger {
47
68
  isSignal: true,
48
69
  isRequired: false,
49
70
  transformFunction: null
71
+ },
72
+ disabled: {
73
+ classPropertyName: "disabled",
74
+ publicName: "disabled",
75
+ isSignal: true,
76
+ isRequired: false,
77
+ transformFunction: null
78
+ },
79
+ softDisabled: {
80
+ classPropertyName: "softDisabled",
81
+ publicName: "softDisabled",
82
+ isSignal: true,
83
+ isRequired: false,
84
+ transformFunction: null
50
85
  }
51
86
  },
52
87
  host: {
@@ -54,15 +89,16 @@ class MenuTrigger {
54
89
  "click": "_pattern.onClick()",
55
90
  "keydown": "_pattern.onKeydown($event)",
56
91
  "focusout": "_pattern.onFocusOut($event)",
57
- "focusin": "onFocusIn()"
92
+ "focusin": "_pattern.onFocusIn()"
58
93
  },
59
94
  properties: {
60
95
  "attr.tabindex": "_pattern.tabIndex()",
61
- "attr.aria-haspopup": "_pattern.hasPopup()",
62
- "attr.aria-expanded": "_pattern.expanded()",
96
+ "attr.disabled": "!softDisabled() && _pattern.disabled() ? true : null",
97
+ "attr.aria-disabled": "_pattern.disabled()",
98
+ "attr.aria-haspopup": "hasPopup()",
99
+ "attr.aria-expanded": "expanded()",
63
100
  "attr.aria-controls": "_pattern.menu()?.id()"
64
- },
65
- classAttribute: "ng-menu-trigger"
101
+ }
66
102
  },
67
103
  exportAs: ["ngMenuTrigger"],
68
104
  ngImport: i0
@@ -79,15 +115,16 @@ i0.ɵɵngDeclareClassMetadata({
79
115
  selector: 'button[ngMenuTrigger]',
80
116
  exportAs: 'ngMenuTrigger',
81
117
  host: {
82
- 'class': 'ng-menu-trigger',
83
118
  '[attr.tabindex]': '_pattern.tabIndex()',
84
- '[attr.aria-haspopup]': '_pattern.hasPopup()',
85
- '[attr.aria-expanded]': '_pattern.expanded()',
119
+ '[attr.disabled]': '!softDisabled() && _pattern.disabled() ? true : null',
120
+ '[attr.aria-disabled]': '_pattern.disabled()',
121
+ '[attr.aria-haspopup]': 'hasPopup()',
122
+ '[attr.aria-expanded]': 'expanded()',
86
123
  '[attr.aria-controls]': '_pattern.menu()?.id()',
87
124
  '(click)': '_pattern.onClick()',
88
125
  '(keydown)': '_pattern.onKeydown($event)',
89
126
  '(focusout)': '_pattern.onFocusOut($event)',
90
- '(focusin)': 'onFocusIn()'
127
+ '(focusin)': '_pattern.onFocusIn()'
91
128
  }
92
129
  }]
93
130
  }],
@@ -113,24 +150,40 @@ class Menu {
113
150
  debugName: "id"
114
151
  }] : []));
115
152
  wrap = input(true, ...(ngDevMode ? [{
116
- debugName: "wrap"
117
- }] : []));
118
- typeaheadDelay = input(0.5, ...(ngDevMode ? [{
153
+ debugName: "wrap",
154
+ transform: booleanAttribute
155
+ }] : [{
156
+ transform: booleanAttribute
157
+ }]));
158
+ typeaheadDelay = input(500, ...(ngDevMode ? [{
119
159
  debugName: "typeaheadDelay"
120
160
  }] : []));
161
+ disabled = input(false, ...(ngDevMode ? [{
162
+ debugName: "disabled",
163
+ transform: booleanAttribute
164
+ }] : [{
165
+ transform: booleanAttribute
166
+ }]));
121
167
  parent = signal(undefined, ...(ngDevMode ? [{
122
168
  debugName: "parent"
123
169
  }] : []));
124
170
  _pattern;
125
- items = () => this._items().map(i => i._pattern);
126
- isVisible = computed(() => this._pattern.isVisible(), ...(ngDevMode ? [{
127
- debugName: "isVisible"
171
+ _itemPatterns = () => this._items().map(i => i._pattern);
172
+ visible = computed(() => this._pattern.visible(), ...(ngDevMode ? [{
173
+ debugName: "visible"
174
+ }] : []));
175
+ tabIndex = computed(() => this._pattern.tabIndex(), ...(ngDevMode ? [{
176
+ debugName: "tabIndex"
128
177
  }] : []));
129
178
  onSelect = output();
179
+ expansionDelay = input(100, ...(ngDevMode ? [{
180
+ debugName: "expansionDelay"
181
+ }] : []));
130
182
  constructor() {
131
183
  this._pattern = new MenuPattern({
132
184
  ...this,
133
185
  parent: computed(() => this.parent()?._pattern),
186
+ items: this._itemPatterns,
134
187
  multi: () => false,
135
188
  softDisabled: () => true,
136
189
  focusMode: () => 'roving',
@@ -145,32 +198,23 @@ class Menu {
145
198
  if (parent instanceof MenuItem && parent.parent instanceof MenuBar) {
146
199
  this._deferredContentAware?.contentVisible.set(true);
147
200
  } else {
148
- this._deferredContentAware?.contentVisible.set(this._pattern.isVisible() || !!this.parent()?.hasBeenFocused());
201
+ this._deferredContentAware?.contentVisible.set(this._pattern.visible() || !!this.parent()?._pattern.hasBeenFocused());
149
202
  }
150
203
  });
151
204
  afterRenderEffect(() => {
152
- if (this._pattern.isVisible()) {
205
+ if (this._pattern.visible()) {
153
206
  const activeItem = untracked(() => this._pattern.inputs.activeItem());
154
207
  this._pattern.listBehavior.goto(activeItem);
155
208
  }
156
209
  });
157
210
  afterRenderEffect(() => {
158
- if (!this._pattern.hasBeenFocused()) {
159
- this._pattern.setDefaultState();
211
+ if (!this._pattern.hasBeenFocused() && this._items().length) {
212
+ untracked(() => this._pattern.setDefaultState());
160
213
  }
161
214
  });
162
215
  }
163
- close(opts) {
164
- this._pattern.inputs.parent()?.close(opts);
165
- }
166
- closeAll(opts) {
167
- const root = this._pattern.root();
168
- if (root instanceof MenuTriggerPattern) {
169
- root.close(opts);
170
- }
171
- if (root instanceof MenuPattern || root instanceof MenuBarPattern) {
172
- root.inputs.activeItem()?.close(opts);
173
- }
216
+ close() {
217
+ this._pattern.close();
174
218
  }
175
219
  static ɵfac = i0.ɵɵngDeclareFactory({
176
220
  minVersion: "12.0.0",
@@ -207,6 +251,20 @@ class Menu {
207
251
  isSignal: true,
208
252
  isRequired: false,
209
253
  transformFunction: null
254
+ },
255
+ disabled: {
256
+ classPropertyName: "disabled",
257
+ publicName: "disabled",
258
+ isSignal: true,
259
+ isRequired: false,
260
+ transformFunction: null
261
+ },
262
+ expansionDelay: {
263
+ classPropertyName: "expansionDelay",
264
+ publicName: "expansionDelay",
265
+ isSignal: true,
266
+ isRequired: false,
267
+ transformFunction: null
210
268
  }
211
269
  },
212
270
  outputs: {
@@ -226,9 +284,10 @@ class Menu {
226
284
  },
227
285
  properties: {
228
286
  "attr.id": "_pattern.id()",
229
- "attr.data-visible": "_pattern.isVisible()"
230
- },
231
- classAttribute: "ng-menu"
287
+ "attr.aria-disabled": "_pattern.disabled()",
288
+ "attr.tabindex": "tabIndex()",
289
+ "attr.data-visible": "visible()"
290
+ }
232
291
  },
233
292
  queries: [{
234
293
  propertyName: "_allItems",
@@ -256,9 +315,10 @@ i0.ɵɵngDeclareClassMetadata({
256
315
  exportAs: 'ngMenu',
257
316
  host: {
258
317
  'role': 'menu',
259
- 'class': 'ng-menu',
260
318
  '[attr.id]': '_pattern.id()',
261
- '[attr.data-visible]': '_pattern.isVisible()',
319
+ '[attr.aria-disabled]': '_pattern.disabled()',
320
+ '[attr.tabindex]': 'tabIndex()',
321
+ '[attr.data-visible]': 'visible()',
262
322
  '(keydown)': '_pattern.onKeydown($event)',
263
323
  '(mouseover)': '_pattern.onMouseOver($event)',
264
324
  '(mouseout)': '_pattern.onMouseOut($event)',
@@ -284,24 +344,40 @@ class MenuBar {
284
344
  _items = () => this._allItems().filter(i => i.parent === this);
285
345
  _elementRef = inject(ElementRef);
286
346
  element = this._elementRef.nativeElement;
347
+ disabled = input(false, ...(ngDevMode ? [{
348
+ debugName: "disabled",
349
+ transform: booleanAttribute
350
+ }] : [{
351
+ transform: booleanAttribute
352
+ }]));
353
+ softDisabled = input(true, ...(ngDevMode ? [{
354
+ debugName: "softDisabled",
355
+ transform: booleanAttribute
356
+ }] : [{
357
+ transform: booleanAttribute
358
+ }]));
287
359
  textDirection = inject(Directionality).valueSignal;
288
- value = model([], ...(ngDevMode ? [{
289
- debugName: "value"
360
+ values = model([], ...(ngDevMode ? [{
361
+ debugName: "values"
290
362
  }] : []));
291
363
  wrap = input(true, ...(ngDevMode ? [{
292
- debugName: "wrap"
293
- }] : []));
294
- typeaheadDelay = input(0.5, ...(ngDevMode ? [{
364
+ debugName: "wrap",
365
+ transform: booleanAttribute
366
+ }] : [{
367
+ transform: booleanAttribute
368
+ }]));
369
+ typeaheadDelay = input(500, ...(ngDevMode ? [{
295
370
  debugName: "typeaheadDelay"
296
371
  }] : []));
297
372
  _pattern;
298
- items = signal([], ...(ngDevMode ? [{
299
- debugName: "items"
373
+ _itemPatterns = signal([], ...(ngDevMode ? [{
374
+ debugName: "_itemPatterns"
300
375
  }] : []));
301
376
  onSelect = output();
302
377
  constructor() {
303
378
  this._pattern = new MenuBarPattern({
304
379
  ...this,
380
+ items: this._itemPatterns,
305
381
  multi: () => false,
306
382
  softDisabled: () => true,
307
383
  focusMode: () => 'roving',
@@ -312,7 +388,7 @@ class MenuBar {
312
388
  element: computed(() => this._elementRef.nativeElement)
313
389
  });
314
390
  afterRenderEffect(() => {
315
- this.items.set(this._items().map(i => i._pattern));
391
+ this._itemPatterns.set(this._items().map(i => i._pattern));
316
392
  });
317
393
  afterRenderEffect(() => {
318
394
  if (!this._pattern.hasBeenFocused()) {
@@ -320,6 +396,9 @@ class MenuBar {
320
396
  }
321
397
  });
322
398
  }
399
+ close() {
400
+ this._pattern.close();
401
+ }
323
402
  static ɵfac = i0.ɵɵngDeclareFactory({
324
403
  minVersion: "12.0.0",
325
404
  version: "20.2.0-next.2",
@@ -335,9 +414,23 @@ class MenuBar {
335
414
  isStandalone: true,
336
415
  selector: "[ngMenuBar]",
337
416
  inputs: {
338
- value: {
339
- classPropertyName: "value",
340
- publicName: "value",
417
+ disabled: {
418
+ classPropertyName: "disabled",
419
+ publicName: "disabled",
420
+ isSignal: true,
421
+ isRequired: false,
422
+ transformFunction: null
423
+ },
424
+ softDisabled: {
425
+ classPropertyName: "softDisabled",
426
+ publicName: "softDisabled",
427
+ isSignal: true,
428
+ isRequired: false,
429
+ transformFunction: null
430
+ },
431
+ values: {
432
+ classPropertyName: "values",
433
+ publicName: "values",
341
434
  isSignal: true,
342
435
  isRequired: false,
343
436
  transformFunction: null
@@ -358,7 +451,7 @@ class MenuBar {
358
451
  }
359
452
  },
360
453
  outputs: {
361
- value: "valueChange",
454
+ values: "valuesChange",
362
455
  onSelect: "onSelect"
363
456
  },
364
457
  host: {
@@ -372,7 +465,11 @@ class MenuBar {
372
465
  "focusin": "_pattern.onFocusIn()",
373
466
  "focusout": "_pattern.onFocusOut($event)"
374
467
  },
375
- classAttribute: "ng-menu-bar"
468
+ properties: {
469
+ "attr.disabled": "!softDisabled() && _pattern.disabled() ? true : null",
470
+ "attr.aria-disabled": "_pattern.disabled()",
471
+ "attr.tabindex": "_pattern.tabIndex()"
472
+ }
376
473
  },
377
474
  queries: [{
378
475
  propertyName: "_allItems",
@@ -396,7 +493,9 @@ i0.ɵɵngDeclareClassMetadata({
396
493
  exportAs: 'ngMenuBar',
397
494
  host: {
398
495
  'role': 'menubar',
399
- 'class': 'ng-menu-bar',
496
+ '[attr.disabled]': '!softDisabled() && _pattern.disabled() ? true : null',
497
+ '[attr.aria-disabled]': '_pattern.disabled()',
498
+ '[attr.tabindex]': '_pattern.tabIndex()',
400
499
  '(keydown)': '_pattern.onKeydown($event)',
401
500
  '(mouseover)': '_pattern.onMouseOver($event)',
402
501
  '(click)': '_pattern.onClick($event)',
@@ -432,8 +531,14 @@ class MenuItem {
432
531
  submenu = input(undefined, ...(ngDevMode ? [{
433
532
  debugName: "submenu"
434
533
  }] : []));
435
- hasBeenFocused = signal(false, ...(ngDevMode ? [{
436
- debugName: "hasBeenFocused"
534
+ active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
535
+ debugName: "active"
536
+ }] : []));
537
+ expanded = computed(() => this._pattern.expanded(), ...(ngDevMode ? [{
538
+ debugName: "expanded"
539
+ }] : []));
540
+ hasPopup = computed(() => this._pattern.hasPopup(), ...(ngDevMode ? [{
541
+ debugName: "hasPopup"
437
542
  }] : []));
438
543
  _pattern = new MenuItemPattern({
439
544
  id: this.id,
@@ -447,8 +552,13 @@ class MenuItem {
447
552
  constructor() {
448
553
  effect(() => this.submenu()?.parent.set(this));
449
554
  }
450
- onFocusIn() {
451
- this.hasBeenFocused.set(true);
555
+ open() {
556
+ this._pattern.open({
557
+ first: true
558
+ });
559
+ }
560
+ close() {
561
+ this._pattern.close();
452
562
  }
453
563
  static ɵfac = i0.ɵɵngDeclareFactory({
454
564
  minVersion: "12.0.0",
@@ -509,17 +619,16 @@ class MenuItem {
509
619
  "role": "menuitem"
510
620
  },
511
621
  listeners: {
512
- "focusin": "onFocusIn()"
622
+ "focusin": "_pattern.onFocusIn()"
513
623
  },
514
624
  properties: {
515
625
  "attr.tabindex": "_pattern.tabIndex()",
516
- "attr.data-active": "_pattern.isActive()",
517
- "attr.aria-haspopup": "_pattern.hasPopup()",
518
- "attr.aria-expanded": "_pattern.expanded()",
626
+ "attr.data-active": "active()",
627
+ "attr.aria-haspopup": "hasPopup()",
628
+ "attr.aria-expanded": "expanded()",
519
629
  "attr.aria-disabled": "_pattern.disabled()",
520
630
  "attr.aria-controls": "_pattern.submenu()?.id()"
521
- },
522
- classAttribute: "ng-menu-item"
631
+ }
523
632
  },
524
633
  exportAs: ["ngMenuItem"],
525
634
  ngImport: i0
@@ -537,12 +646,11 @@ i0.ɵɵngDeclareClassMetadata({
537
646
  exportAs: 'ngMenuItem',
538
647
  host: {
539
648
  'role': 'menuitem',
540
- 'class': 'ng-menu-item',
541
- '(focusin)': 'onFocusIn()',
649
+ '(focusin)': '_pattern.onFocusIn()',
542
650
  '[attr.tabindex]': '_pattern.tabIndex()',
543
- '[attr.data-active]': '_pattern.isActive()',
544
- '[attr.aria-haspopup]': '_pattern.hasPopup()',
545
- '[attr.aria-expanded]': '_pattern.expanded()',
651
+ '[attr.data-active]': 'active()',
652
+ '[attr.aria-haspopup]': 'hasPopup()',
653
+ '[attr.aria-expanded]': 'expanded()',
546
654
  '[attr.aria-disabled]': '_pattern.disabled()',
547
655
  '[attr.aria-controls]': '_pattern.submenu()?.id()'
548
656
  }
@@ -1 +1 @@
1
- {"version":3,"file":"menu.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/aria/menu/menu.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n computed,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n Signal,\n signal,\n untracked,\n} from '@angular/core';\nimport {\n SignalLike,\n MenuBarPattern,\n MenuItemPattern,\n MenuPattern,\n MenuTriggerPattern,\n DeferredContent,\n DeferredContentAware,\n} from '@angular/aria/private';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\n\n/**\n * A trigger for a menu.\n *\n * The menu trigger is used to open and close menus, and can be placed on menu items to connect\n * sub-menus.\n */\n@Directive({\n selector: 'button[ngMenuTrigger]',\n exportAs: 'ngMenuTrigger',\n host: {\n 'class': 'ng-menu-trigger',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.aria-haspopup]': '_pattern.hasPopup()',\n '[attr.aria-expanded]': '_pattern.expanded()',\n '[attr.aria-controls]': '_pattern.menu()?.id()',\n '(click)': '_pattern.onClick()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n '(focusin)': 'onFocusIn()',\n },\n})\nexport class MenuTrigger<V> {\n /** A reference to the menu trigger element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** A reference to the menu element. */\n readonly element: HTMLButtonElement = this._elementRef.nativeElement;\n\n /** The menu associated with the trigger. */\n menu = input<Menu<V> | undefined>(undefined);\n\n /** Whether the menu item has been focused. */\n readonly hasBeenFocused = signal(false);\n\n /** The menu trigger ui pattern instance. */\n _pattern: MenuTriggerPattern<V> = new MenuTriggerPattern({\n textDirection: this.textDirection,\n element: computed(() => this._elementRef.nativeElement),\n menu: computed(() => this.menu()?._pattern),\n });\n\n constructor() {\n effect(() => this.menu()?.parent.set(this));\n }\n\n /** Marks the menu trigger as having been focused. */\n onFocusIn() {\n this.hasBeenFocused.set(true);\n }\n}\n\n/**\n * A list of menu items.\n *\n * A menu is used to offer a list of menu item choices to users. Menus can be nested within other\n * menus to create sub-menus.\n *\n * ```html\n * <button ngMenuTrigger menu=\"menu\">Options</button>\n *\n * <div ngMenu #menu=\"ngMenu\">\n * <div ngMenuItem>Star</div>\n * <div ngMenuItem>Edit</div>\n * <div ngMenuItem>Delete</div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[ngMenu]',\n exportAs: 'ngMenu',\n host: {\n 'role': 'menu',\n 'class': 'ng-menu',\n '[attr.id]': '_pattern.id()',\n '[attr.data-visible]': '_pattern.isVisible()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(mouseout)': '_pattern.onMouseOut($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(click)': '_pattern.onClick($event)',\n },\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n})\nexport class Menu<V> {\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware, {optional: true});\n\n /** The menu items contained in the menu. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n /** The menu items that are direct children of this menu. */\n readonly _items: Signal<MenuItem<V>[]> = computed(() =>\n this._allItems().filter(i => i.parent === this),\n );\n\n /** A reference to the menu element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menu element. */\n readonly element: HTMLElement = this._elementRef.nativeElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The unique ID of the menu. */\n readonly id = input<string>(inject(_IdGenerator).getId('ng-menu-', true));\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input<boolean>(true);\n\n /** The delay in seconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(0.5); // Picked arbitrarily.\n\n /** A reference to the parent menu item or menu trigger. */\n readonly parent = signal<MenuTrigger<V> | MenuItem<V> | undefined>(undefined);\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuPattern<V>;\n\n /**\n * The menu items as a writable signal.\n *\n * TODO(wagnermaciel): This would normally be a computed, but using a computed causes a bug where\n * sometimes the items array is empty. The bug can be reproduced by switching this to use a\n * computed and then quickly opening and closing menus in the dev app.\n */\n readonly items = () => this._items().map(i => i._pattern);\n\n /** Whether the menu is visible. */\n isVisible = computed(() => this._pattern.isVisible());\n\n /** A callback function triggered when a menu item is selected. */\n onSelect = output<V>();\n\n constructor() {\n this._pattern = new MenuPattern({\n ...this,\n parent: computed(() => this.parent()?._pattern),\n multi: () => false,\n softDisabled: () => true,\n focusMode: () => 'roving',\n orientation: () => 'vertical',\n selectionMode: () => 'explicit',\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n onSelect: (value: V) => this.onSelect.emit(value),\n });\n\n afterRenderEffect(() => {\n const parent = this.parent();\n if (parent instanceof MenuItem && parent.parent instanceof MenuBar) {\n this._deferredContentAware?.contentVisible.set(true);\n } else {\n this._deferredContentAware?.contentVisible.set(\n this._pattern.isVisible() || !!this.parent()?.hasBeenFocused(),\n );\n }\n });\n\n // TODO(wagnermaciel): This is a redundancy needed for if the user uses display: none to hide\n // submenus. In those cases, the ui pattern is calling focus() before the ui has a chance to\n // update the display property. The result is focus() being called on an element that is not\n // focusable. This simply retries focusing the element after render.\n afterRenderEffect(() => {\n if (this._pattern.isVisible()) {\n const activeItem = untracked(() => this._pattern.inputs.activeItem());\n this._pattern.listBehavior.goto(activeItem!);\n }\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused()) {\n this._pattern.setDefaultState();\n }\n });\n }\n\n // TODO(wagnermaciel): Author close, closeAll, and open methods for each directive.\n\n /** Closes the menu. */\n close(opts?: {refocus?: boolean}) {\n this._pattern.inputs.parent()?.close(opts);\n }\n\n /** Closes all parent menus. */\n closeAll(opts?: {refocus?: boolean}) {\n const root = this._pattern.root();\n\n if (root instanceof MenuTriggerPattern) {\n root.close(opts);\n }\n\n if (root instanceof MenuPattern || root instanceof MenuBarPattern) {\n root.inputs.activeItem()?.close(opts);\n }\n }\n}\n\n/**\n * A menu bar of menu items.\n *\n * Like the menu, a menubar is used to offer a list of menu item choices to users. However, a\n * menubar is used to display a persistent, top-level,\n * always-visible set of menu item choices.\n */\n@Directive({\n selector: '[ngMenuBar]',\n exportAs: 'ngMenuBar',\n host: {\n 'role': 'menubar',\n 'class': 'ng-menu-bar',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class MenuBar<V> {\n /** The menu items contained in the menubar. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n readonly _items: SignalLike<MenuItem<V>[]> = () =>\n this._allItems().filter(i => i.parent === this);\n\n /** A reference to the menu element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menubar element. */\n readonly element: HTMLElement = this._elementRef.nativeElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The value of the menu. */\n readonly value = model<V[]>([]);\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input<boolean>(true);\n\n /** The delay in seconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(0.5);\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuBarPattern<V>;\n\n /** The menu items as a writable signal. */\n readonly items = signal<MenuItemPattern<V>[]>([]);\n\n /** A callback function triggered when a menu item is selected. */\n onSelect = output<V>();\n\n constructor() {\n this._pattern = new MenuBarPattern({\n ...this,\n multi: () => false,\n softDisabled: () => true,\n focusMode: () => 'roving',\n orientation: () => 'horizontal',\n selectionMode: () => 'explicit',\n onSelect: (value: V) => this.onSelect.emit(value),\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n });\n\n afterRenderEffect(() => {\n this.items.set(this._items().map(i => i._pattern));\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused()) {\n this._pattern.setDefaultState();\n }\n });\n }\n}\n\n/**\n * An item in a Menu.\n *\n * Menu items can be used in menus and menubars to represent a choice or action a user can take.\n */\n@Directive({\n selector: '[ngMenuItem]',\n exportAs: 'ngMenuItem',\n host: {\n 'role': 'menuitem',\n 'class': 'ng-menu-item',\n '(focusin)': 'onFocusIn()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.data-active]': '_pattern.isActive()',\n '[attr.aria-haspopup]': '_pattern.hasPopup()',\n '[attr.aria-expanded]': '_pattern.expanded()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-controls]': '_pattern.submenu()?.id()',\n },\n})\nexport class MenuItem<V> {\n /** A reference to the menu item element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menu element. */\n readonly element: HTMLElement = this._elementRef.nativeElement;\n\n /** The unique ID of the menu item. */\n readonly id = input<string>(inject(_IdGenerator).getId('ng-menu-item-', true));\n\n /** The value of the menu item. */\n readonly value = input.required<V>();\n\n /** Whether the menu item is disabled. */\n readonly disabled = input<boolean>(false);\n\n // TODO(wagnermaciel): Discuss whether all inputs should be models.\n\n /** The search term associated with the menu item. */\n readonly searchTerm = model<string>('');\n\n /** A reference to the parent menu. */\n private readonly _menu = inject<Menu<V>>(Menu, {optional: true});\n\n /** A reference to the parent menu bar. */\n private readonly _menuBar = inject<MenuBar<V>>(MenuBar, {optional: true});\n\n /** A reference to the parent menu or menubar. */\n readonly parent = this._menu ?? this._menuBar;\n\n /** The submenu associated with the menu item. */\n readonly submenu = input<Menu<V> | undefined>(undefined);\n\n /** Whether the menu item has been focused. */\n readonly hasBeenFocused = signal(false);\n\n /** The menu item ui pattern instance. */\n readonly _pattern: MenuItemPattern<V> = new MenuItemPattern<V>({\n id: this.id,\n value: this.value,\n element: computed(() => this._elementRef.nativeElement),\n disabled: this.disabled,\n searchTerm: this.searchTerm,\n parent: computed(() => this.parent?._pattern),\n submenu: computed(() => this.submenu()?._pattern),\n });\n\n constructor() {\n effect(() => this.submenu()?.parent.set(this));\n }\n\n /** Marks the menu item as having been focused. */\n onFocusIn() {\n this.hasBeenFocused.set(true);\n }\n}\n\n/** Defers the rendering of the menu content. */\n@Directive({\n selector: 'ng-template[ngMenuContent]',\n exportAs: 'ngMenuContent',\n hostDirectives: [DeferredContent],\n})\nexport class MenuContent {}\n"],"names":["MenuTrigger","_elementRef","inject","ElementRef","textDirection","Directionality","valueSignal","element","nativeElement","menu","input","undefined","hasBeenFocused","signal","_pattern","MenuTriggerPattern","computed","constructor","effect","parent","set","onFocusIn","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","host","listeners","properties","classAttribute","exportAs","ngImport","decorators","args","Menu","_deferredContentAware","DeferredContentAware","optional","_allItems","contentChildren","MenuItem","descendants","_items","filter","i","ngDevMode","debugName","id","_IdGenerator","getId","wrap","typeaheadDelay","items","map","isVisible","onSelect","output","MenuPattern","multi","softDisabled","focusMode","orientation","selectionMode","activeItem","value","emit","afterRenderEffect","MenuBar","contentVisible","untracked","listBehavior","goto","setDefaultState","close","opts","closeAll","root","MenuBarPattern","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","hostDirectives","directive","i1","model","required","disabled","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;;;QAAXiF,WAAW;AAAAhE,EAAAA,UAAA,EAAA,CAAA;UALvBf,SAAS;AAACgB,IAAAA,IAAA,EAAA,CAAA;AACTd,MAAAA,QAAQ,EAAE,4BAA4B;AACtCW,MAAAA,QAAQ,EAAE,eAAe;MACzBqD,cAAc,EAAE,CAACc,eAAe;KACjC;;;;;;"}
1
+ {"version":3,"file":"menu.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/aria/menu/menu.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n Signal,\n signal,\n untracked,\n} from '@angular/core';\nimport {\n SignalLike,\n MenuBarPattern,\n MenuItemPattern,\n MenuPattern,\n MenuTriggerPattern,\n DeferredContent,\n DeferredContentAware,\n} from '@angular/aria/private';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\n\n/**\n * A trigger for a menu.\n *\n * The `ngMenuTrigger` directive is used to open and close menus. It can be applied to\n * any interactive element (e.g., a button) to associate it with a `ngMenu` instance.\n * It also supports linking to sub-menus when applied to a `ngMenuItem`.\n *\n * ```html\n * <button ngMenuTrigger [menu]=\"myMenu\">Open Menu</button>\n *\n * <div ngMenu #myMenu=\"ngMenu\">\n * <div ngMenuItem>Item 1</div>\n * <div ngMenuItem>Item 2</div>\n * </div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: 'button[ngMenuTrigger]',\n exportAs: 'ngMenuTrigger',\n host: {\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.disabled]': '!softDisabled() && _pattern.disabled() ? true : null',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-haspopup]': 'hasPopup()',\n '[attr.aria-expanded]': 'expanded()',\n '[attr.aria-controls]': '_pattern.menu()?.id()',\n '(click)': '_pattern.onClick()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n})\nexport class MenuTrigger<V> {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The menu associated with the trigger. */\n menu = input<Menu<V> | undefined>(undefined);\n\n /** Whether the menu is expanded. */\n readonly expanded = computed(() => this._pattern.expanded());\n\n /** Whether the menu trigger has a popup. */\n readonly hasPopup = computed(() => this._pattern.hasPopup());\n\n /** Whether the menu trigger is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the menu trigger is soft disabled. */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** The menu trigger ui pattern instance. */\n _pattern: MenuTriggerPattern<V> = new MenuTriggerPattern({\n textDirection: this.textDirection,\n element: computed(() => this._elementRef.nativeElement),\n menu: computed(() => this.menu()?._pattern),\n disabled: () => this.disabled(),\n });\n\n constructor() {\n effect(() => this.menu()?.parent.set(this));\n }\n\n /** Opens the menu focusing on the first menu item. */\n open() {\n this._pattern.open({first: true});\n }\n\n /** Closes the menu. */\n close() {\n this._pattern.close();\n }\n}\n\n/**\n * A list of menu items.\n *\n * A `ngMenu` is used to offer a list of menu item choices to users. Menus can be nested\n * within other menus to create sub-menus. It works in conjunction with `ngMenuTrigger`\n * and `ngMenuItem` directives.\n *\n * ```html\n * <button ngMenuTrigger [menu]=\"myMenu\">Options</button>\n *\n * <div ngMenu #myMenu=\"ngMenu\">\n * <div ngMenuItem>Star</div>\n * <div ngMenuItem>Edit</div>\n * <div ngMenuItem [submenu]=\"subMenu\">More</div>\n * </div>\n *\n * <div ngMenu #subMenu=\"ngMenu\">\n * <div ngMenuItem>Sub Item 1</div>\n * <div ngMenuItem>Sub Item 2</div>\n * </div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngMenu]',\n exportAs: 'ngMenu',\n host: {\n 'role': 'menu',\n '[attr.id]': '_pattern.id()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.tabindex]': 'tabIndex()',\n '[attr.data-visible]': 'visible()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(mouseout)': '_pattern.onMouseOut($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(click)': '_pattern.onClick($event)',\n },\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n})\nexport class Menu<V> {\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware, {optional: true});\n\n /** The menu items contained in the menu. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n /** The menu items that are direct children of this menu. */\n readonly _items: Signal<MenuItem<V>[]> = computed(() =>\n this._allItems().filter(i => i.parent === this),\n );\n\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The unique ID of the menu. */\n readonly id = input(inject(_IdGenerator).getId('ng-menu-', true));\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** The delay in milliseconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(500); // Picked arbitrarily.\n\n /** Whether the menu is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** A reference to the parent menu item or menu trigger. */\n readonly parent = signal<MenuTrigger<V> | MenuItem<V> | undefined>(undefined);\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuPattern<V>;\n\n /**\n * The menu items as a writable signal.\n *\n * TODO(wagnermaciel): This would normally be a computed, but using a computed causes a bug where\n * sometimes the items array is empty. The bug can be reproduced by switching this to use a\n * computed and then quickly opening and closing menus in the dev app.\n */\n private readonly _itemPatterns = () => this._items().map(i => i._pattern);\n\n /** Whether the menu is visible. */\n readonly visible = computed(() => this._pattern.visible());\n\n /** The tab index of the menu. */\n readonly tabIndex = computed(() => this._pattern.tabIndex());\n\n /** A callback function triggered when a menu item is selected. */\n onSelect = output<V>();\n\n /** The delay in milliseconds before expanding sub-menus on hover. */\n readonly expansionDelay = input<number>(100); // Arbitrarily chosen.\n\n constructor() {\n this._pattern = new MenuPattern({\n ...this,\n parent: computed(() => this.parent()?._pattern),\n items: this._itemPatterns,\n multi: () => false,\n softDisabled: () => true,\n focusMode: () => 'roving',\n orientation: () => 'vertical',\n selectionMode: () => 'explicit',\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n onSelect: (value: V) => this.onSelect.emit(value),\n });\n\n afterRenderEffect(() => {\n const parent = this.parent();\n if (parent instanceof MenuItem && parent.parent instanceof MenuBar) {\n this._deferredContentAware?.contentVisible.set(true);\n } else {\n this._deferredContentAware?.contentVisible.set(\n this._pattern.visible() || !!this.parent()?._pattern.hasBeenFocused(),\n );\n }\n });\n\n // TODO(wagnermaciel): This is a redundancy needed for if the user uses display: none to hide\n // submenus. In those cases, the ui pattern is calling focus() before the ui has a chance to\n // update the display property. The result is focus() being called on an element that is not\n // focusable. This simply retries focusing the element after render.\n afterRenderEffect(() => {\n if (this._pattern.visible()) {\n const activeItem = untracked(() => this._pattern.inputs.activeItem());\n this._pattern.listBehavior.goto(activeItem!);\n }\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused() && this._items().length) {\n untracked(() => this._pattern.setDefaultState());\n }\n });\n }\n\n /** Closes the menu. */\n close() {\n this._pattern.close();\n }\n}\n\n/**\n * A menu bar of menu items.\n *\n * Like the `ngMenu`, a `ngMenuBar` is used to offer a list of menu item choices to users.\n * However, a menubar is used to display a persistent, top-level, always-visible set of\n * menu item choices, typically found at the top of an application window.\n *\n * ```html\n * <div ngMenuBar>\n * <button ngMenuTrigger [menu]=\"fileMenu\">File</button>\n * <button ngMenuTrigger [menu]=\"editMenu\">Edit</button>\n * </div>\n *\n * <div ngMenu #fileMenu=\"ngMenu\">\n * <div ngMenuItem>New</div>\n * <div ngMenuItem>Open</div>\n * </div>\n *\n * <div ngMenu #editMenu=\"ngMenu\">\n * <div ngMenuItem>Cut</div>\n * <div ngMenuItem>Copy</div>\n * </div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngMenuBar]',\n exportAs: 'ngMenuBar',\n host: {\n 'role': 'menubar',\n '[attr.disabled]': '!softDisabled() && _pattern.disabled() ? true : null',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class MenuBar<V> {\n /** The menu items contained in the menubar. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n readonly _items: SignalLike<MenuItem<V>[]> = () =>\n this._allItems().filter(i => i.parent === this);\n\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** Whether the menubar is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the menubar is soft disabled. */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The values of the currently selected menu items. */\n readonly values = model<V[]>([]);\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** The delay in milliseconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(500);\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuBarPattern<V>;\n\n /** The menu items as a writable signal. */\n private readonly _itemPatterns = signal<MenuItemPattern<V>[]>([]);\n\n /** A callback function triggered when a menu item is selected. */\n onSelect = output<V>();\n\n constructor() {\n this._pattern = new MenuBarPattern({\n ...this,\n items: this._itemPatterns,\n multi: () => false,\n softDisabled: () => true,\n focusMode: () => 'roving',\n orientation: () => 'horizontal',\n selectionMode: () => 'explicit',\n onSelect: (value: V) => this.onSelect.emit(value),\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n });\n\n afterRenderEffect(() => {\n this._itemPatterns.set(this._items().map(i => i._pattern));\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused()) {\n this._pattern.setDefaultState();\n }\n });\n }\n\n /** Closes the menubar. */\n close() {\n this._pattern.close();\n }\n}\n\n/**\n * An item in a Menu.\n *\n * `ngMenuItem` directives can be used in `ngMenu` and `ngMenuBar` to represent a choice\n * or action a user can take. They can also act as triggers for sub-menus.\n *\n * ```html\n * <div ngMenuItem (onSelect)=\"doAction()\">Action Item</div>\n *\n * <div ngMenuItem [submenu]=\"anotherMenu\">Submenu Trigger</div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngMenuItem]',\n exportAs: 'ngMenuItem',\n host: {\n 'role': 'menuitem',\n '(focusin)': '_pattern.onFocusIn()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.data-active]': 'active()',\n '[attr.aria-haspopup]': 'hasPopup()',\n '[attr.aria-expanded]': 'expanded()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-controls]': '_pattern.submenu()?.id()',\n },\n})\nexport class MenuItem<V> {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The unique ID of the menu item. */\n readonly id = input(inject(_IdGenerator).getId('ng-menu-item-', true));\n\n /** The value of the menu item. */\n readonly value = input.required<V>();\n\n /** Whether the menu item is disabled. */\n readonly disabled = input<boolean>(false);\n\n // TODO(wagnermaciel): Discuss whether all inputs should be models.\n\n /** The search term associated with the menu item. */\n readonly searchTerm = model<string>('');\n\n /** A reference to the parent menu. */\n private readonly _menu = inject<Menu<V>>(Menu, {optional: true});\n\n /** A reference to the parent menu bar. */\n private readonly _menuBar = inject<MenuBar<V>>(MenuBar, {optional: true});\n\n /** A reference to the parent menu or menubar. */\n readonly parent = this._menu ?? this._menuBar;\n\n /** The submenu associated with the menu item. */\n readonly submenu = input<Menu<V> | undefined>(undefined);\n\n /** Whether the menu item is active. */\n readonly active = computed(() => this._pattern.active());\n\n /** Whether the menu is expanded. */\n readonly expanded = computed(() => this._pattern.expanded());\n\n /** Whether the menu item has a popup. */\n readonly hasPopup = computed(() => this._pattern.hasPopup());\n\n /** The menu item ui pattern instance. */\n readonly _pattern: MenuItemPattern<V> = new MenuItemPattern<V>({\n id: this.id,\n value: this.value,\n element: computed(() => this._elementRef.nativeElement),\n disabled: this.disabled,\n searchTerm: this.searchTerm,\n parent: computed(() => this.parent?._pattern),\n submenu: computed(() => this.submenu()?._pattern),\n });\n\n constructor() {\n effect(() => this.submenu()?.parent.set(this));\n }\n\n /** Opens the submenu focusing on the first menu item. */\n open() {\n this._pattern.open({first: true});\n }\n\n /** Closes the submenu. */\n close() {\n this._pattern.close();\n }\n}\n\n/**\n * Defers the rendering of the menu content.\n *\n * This structural directive should be applied to an `ng-template` within a `ngMenu`\n * or `ngMenuBar` to lazily render its content only when the menu is opened.\n *\n * ```html\n * <div ngMenu #myMenu=\"ngMenu\">\n * <ng-template ngMenuContent>\n * <div ngMenuItem>Lazy Item 1</div>\n * <div ngMenuItem>Lazy Item 2</div>\n * </ng-template>\n * </div>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: 'ng-template[ngMenuContent]',\n exportAs: 'ngMenuContent',\n hostDirectives: [DeferredContent],\n})\nexport class MenuContent {}\n"],"names":["MenuTrigger","_elementRef","inject","ElementRef","element","nativeElement","textDirection","Directionality","valueSignal","menu","input","undefined","expanded","computed","_pattern","hasPopup","disabled","transform","booleanAttribute","softDisabled","MenuTriggerPattern","constructor","effect","parent","set","open","first","close","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","host","listeners","properties","exportAs","ngImport","decorators","args","Menu","_deferredContentAware","DeferredContentAware","optional","_allItems","contentChildren","MenuItem","descendants","_items","filter","i","ngDevMode","debugName","id","_IdGenerator","getId","wrap","typeaheadDelay","signal","_itemPatterns","map","visible","tabIndex","onSelect","output","expansionDelay","MenuPattern","items","multi","focusMode","orientation","selectionMode","activeItem","value","emit","afterRenderEffect","MenuBar","contentVisible","hasBeenFocused","untracked","listBehavior","goto","length","setDefaultState","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","hostDirectives","directive","i1","values","model","MenuBarPattern","required","searchTerm","_menu","_menuBar","submenu","active","MenuItemPattern","outputs","attributes","MenuContent","DeferredContent"],"mappings":";;;;;;;MAsEaA,WAAW,CAAA;AAELC,EAAAA,WAAW,GAAGC,MAAM,CAACC,UAAU,CAAC;AAGxCC,EAAAA,OAAO,GAAG,IAAI,CAACH,WAAW,CAACI,aAA4B;AAGvDC,EAAAA,aAAa,GAAGJ,MAAM,CAACK,cAAc,CAAC,CAACC,WAAW;EAG3DC,IAAI,GAAGC,KAAK,CAAsBC,SAAS;;WAAC;AAGnCC,EAAAA,QAAQ,GAAGC,QAAQ,CAAC,MAAM,IAAI,CAACC,QAAQ,CAACF,QAAQ,EAAE;;WAAC;AAGnDG,EAAAA,QAAQ,GAAGF,QAAQ,CAAC,MAAM,IAAI,CAACC,QAAQ,CAACC,QAAQ,EAAE;;WAAC;EAGnDC,QAAQ,GAAGN,KAAK,CAAC,KAAK;;AAAGO,IAAA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