@angular/cdk-experimental 14.0.0-next.4 → 14.0.0-next.7

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 (110) hide show
  1. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  2. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +4 -4
  3. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
  4. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
  5. package/esm2020/column-resize/column-resize-module.mjs +9 -9
  6. package/esm2020/column-resize/column-resize-notifier.mjs +7 -7
  7. package/esm2020/column-resize/column-resize.mjs +4 -4
  8. package/esm2020/column-resize/column-size-store.mjs +4 -4
  9. package/esm2020/column-resize/event-dispatcher.mjs +4 -4
  10. package/esm2020/column-resize/overlay-handle.mjs +4 -4
  11. package/esm2020/column-resize/resizable.mjs +4 -4
  12. package/esm2020/column-resize/resize-strategy.mjs +10 -10
  13. package/esm2020/combobox/combobox-module.mjs +5 -5
  14. package/esm2020/combobox/combobox-panel.mjs +4 -4
  15. package/esm2020/combobox/combobox-popup.mjs +4 -4
  16. package/esm2020/combobox/combobox.mjs +4 -4
  17. package/esm2020/dialog/dialog-container.mjs +21 -9
  18. package/esm2020/dialog/dialog-module.mjs +5 -5
  19. package/esm2020/dialog/dialog.mjs +4 -4
  20. package/esm2020/listbox/listbox-module.mjs +5 -5
  21. package/esm2020/listbox/listbox.mjs +7 -7
  22. package/esm2020/menu/context-menu.mjs +36 -56
  23. package/esm2020/menu/menu-aim.mjs +7 -7
  24. package/esm2020/menu/menu-bar.mjs +16 -13
  25. package/esm2020/menu/menu-errors.mjs +1 -9
  26. package/esm2020/menu/menu-group.mjs +4 -4
  27. package/esm2020/menu/menu-item-checkbox.mjs +4 -4
  28. package/esm2020/menu/menu-item-radio.mjs +15 -8
  29. package/esm2020/menu/menu-item-selectable.mjs +4 -4
  30. package/esm2020/menu/menu-item-trigger.mjs +55 -73
  31. package/esm2020/menu/menu-item.mjs +26 -25
  32. package/esm2020/menu/menu-module.mjs +5 -9
  33. package/esm2020/menu/menu-stack.mjs +10 -6
  34. package/esm2020/menu/menu-trigger.mjs +43 -0
  35. package/esm2020/menu/menu.mjs +32 -45
  36. package/esm2020/menu/public-api.mjs +3 -3
  37. package/esm2020/popover-edit/edit-event-dispatcher.mjs +4 -4
  38. package/esm2020/popover-edit/edit-ref.mjs +4 -4
  39. package/esm2020/popover-edit/edit-services.mjs +4 -4
  40. package/esm2020/popover-edit/focus-dispatcher.mjs +4 -4
  41. package/esm2020/popover-edit/focus-escape-notifier.mjs +4 -4
  42. package/esm2020/popover-edit/lens-directives.mjs +10 -10
  43. package/esm2020/popover-edit/popover-edit-module.mjs +5 -5
  44. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +7 -7
  45. package/esm2020/popover-edit/table-directives.mjs +16 -16
  46. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +4 -4
  47. package/esm2020/scrolling/scrolling-module.mjs +5 -5
  48. package/esm2020/selection/row-selection.mjs +4 -4
  49. package/esm2020/selection/select-all.mjs +4 -4
  50. package/esm2020/selection/selection-column.mjs +4 -4
  51. package/esm2020/selection/selection-module.mjs +5 -5
  52. package/esm2020/selection/selection-toggle.mjs +4 -4
  53. package/esm2020/selection/selection.mjs +4 -4
  54. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +5 -5
  55. package/esm2020/table-scroll-container/table-scroll-container.mjs +4 -4
  56. package/esm2020/version.mjs +1 -1
  57. package/fesm2015/cdk-experimental.mjs +1 -1
  58. package/fesm2015/cdk-experimental.mjs.map +1 -1
  59. package/fesm2015/column-resize.mjs +50 -50
  60. package/fesm2015/column-resize.mjs.map +1 -1
  61. package/fesm2015/combobox.mjs +13 -13
  62. package/fesm2015/combobox.mjs.map +1 -1
  63. package/fesm2015/dialog.mjs +27 -15
  64. package/fesm2015/dialog.mjs.map +1 -1
  65. package/fesm2015/listbox.mjs +10 -10
  66. package/fesm2015/listbox.mjs.map +1 -1
  67. package/fesm2015/menu.mjs +313 -369
  68. package/fesm2015/menu.mjs.map +1 -1
  69. package/fesm2015/popover-edit.mjs +49 -49
  70. package/fesm2015/popover-edit.mjs.map +1 -1
  71. package/fesm2015/scrolling.mjs +7 -7
  72. package/fesm2015/scrolling.mjs.map +1 -1
  73. package/fesm2015/selection.mjs +19 -19
  74. package/fesm2015/selection.mjs.map +1 -1
  75. package/fesm2015/table-scroll-container.mjs +7 -7
  76. package/fesm2015/table-scroll-container.mjs.map +1 -1
  77. package/fesm2020/cdk-experimental.mjs +1 -1
  78. package/fesm2020/cdk-experimental.mjs.map +1 -1
  79. package/fesm2020/column-resize.mjs +50 -50
  80. package/fesm2020/column-resize.mjs.map +1 -1
  81. package/fesm2020/combobox.mjs +13 -13
  82. package/fesm2020/combobox.mjs.map +1 -1
  83. package/fesm2020/dialog.mjs +27 -15
  84. package/fesm2020/dialog.mjs.map +1 -1
  85. package/fesm2020/listbox.mjs +10 -10
  86. package/fesm2020/listbox.mjs.map +1 -1
  87. package/fesm2020/menu.mjs +218 -269
  88. package/fesm2020/menu.mjs.map +1 -1
  89. package/fesm2020/popover-edit.mjs +49 -49
  90. package/fesm2020/popover-edit.mjs.map +1 -1
  91. package/fesm2020/scrolling.mjs +7 -7
  92. package/fesm2020/scrolling.mjs.map +1 -1
  93. package/fesm2020/selection.mjs +19 -19
  94. package/fesm2020/selection.mjs.map +1 -1
  95. package/fesm2020/table-scroll-container.mjs +7 -7
  96. package/fesm2020/table-scroll-container.mjs.map +1 -1
  97. package/menu/context-menu.d.ts +9 -15
  98. package/menu/menu-bar.d.ts +2 -2
  99. package/menu/menu-errors.d.ts +0 -5
  100. package/menu/menu-item-radio.d.ts +4 -3
  101. package/menu/menu-item-trigger.d.ts +8 -17
  102. package/menu/menu-item.d.ts +5 -5
  103. package/menu/menu-module.d.ts +9 -10
  104. package/menu/menu-stack.d.ts +7 -6
  105. package/menu/menu-trigger.d.ts +24 -0
  106. package/menu/menu.d.ts +7 -23
  107. package/menu/public-api.d.ts +2 -2
  108. package/package.json +3 -3
  109. package/esm2020/menu/menu-panel.mjs +0 -37
  110. package/menu/menu-panel.d.ts +0 -30
package/fesm2015/menu.mjs CHANGED
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Directive, EventEmitter, Optional, Inject, Input, Output, Self, ContentChildren, NgModule } from '@angular/core';
2
+ import { InjectionToken, Injectable, Directive, Injector, Inject, EventEmitter, Optional, SkipSelf, Input, Output, Self, ContentChildren, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/cdk/overlay';
4
4
  import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
5
5
  import { FocusKeyManager } from '@angular/cdk/a11y';
6
6
  import { UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, TAB, ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
7
7
  import { Subject, fromEvent, merge, defer, partition } from 'rxjs';
8
8
  import { filter, takeUntil, startWith, mergeMap, mapTo, mergeAll, take, switchMap, skip } from 'rxjs/operators';
9
- import * as i1$1 from '@angular/cdk/collections';
9
+ import * as i1$2 from '@angular/cdk/collections';
10
10
  import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
11
11
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
12
- import * as i2 from '@angular/cdk/bidi';
12
+ import * as i1$1 from '@angular/cdk/bidi';
13
13
  import { TemplatePortal } from '@angular/cdk/portal';
14
14
 
15
15
  /**
@@ -29,14 +29,113 @@ const CDK_MENU = new InjectionToken('cdk-menu');
29
29
  * Use of this source code is governed by an MIT-style license that can be
30
30
  * found in the LICENSE file at https://angular.io/license
31
31
  */
32
+ /** Injection token used for an implementation of MenuStack. */
33
+ const MENU_STACK = new InjectionToken('cdk-menu-stack');
32
34
  /**
33
- * Throws an exception when a menu panel already has a menu stack.
34
- * @docs-private
35
+ * MenuStack allows subscribers to listen for close events (when a MenuStackItem is popped off
36
+ * of the stack) in order to perform closing actions. Upon the MenuStack being empty it emits
37
+ * from the `empty` observable specifying the next focus action which the listener should perform
38
+ * as requested by the closer.
35
39
  */
36
- function throwExistingMenuStackError() {
37
- throw Error('CdkMenuPanel is already referenced by different CdkMenuTrigger. Ensure that a menu is' +
38
- ' opened by a single trigger only.');
40
+ class MenuStack {
41
+ constructor() {
42
+ /** All MenuStackItems tracked by this MenuStack. */
43
+ this._elements = [];
44
+ /** Emits the element which was popped off of the stack when requested by a closer. */
45
+ this._close = new Subject();
46
+ /** Emits once the MenuStack has become empty after popping off elements. */
47
+ this._empty = new Subject();
48
+ /** Observable which emits the MenuStackItem which has been requested to close. */
49
+ this.closed = this._close;
50
+ /**
51
+ * Observable which emits when the MenuStack is empty after popping off the last element. It
52
+ * emits a FocusNext event which specifies the action the closer has requested the listener
53
+ * perform.
54
+ */
55
+ this.emptied = this._empty;
56
+ }
57
+ /** @param menu the MenuStackItem to put on the stack. */
58
+ push(menu) {
59
+ this._elements.push(menu);
60
+ }
61
+ /**
62
+ * Pop items off of the stack up to and including `lastItem` and emit each on the close
63
+ * observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
64
+ * @param lastItem the last item to pop off the stack.
65
+ * @param focusNext the event to emit on the `empty` observable if the method call resulted in an
66
+ * empty stack. Does not emit if the stack was initially empty or if `lastItem` was not on the
67
+ * stack.
68
+ */
69
+ close(lastItem, focusNext) {
70
+ if (this._elements.indexOf(lastItem) >= 0) {
71
+ let poppedElement;
72
+ do {
73
+ poppedElement = this._elements.pop();
74
+ this._close.next(poppedElement);
75
+ } while (poppedElement !== lastItem);
76
+ if (this.isEmpty()) {
77
+ this._empty.next(focusNext);
78
+ }
79
+ }
80
+ }
81
+ /**
82
+ * Pop items off of the stack up to but excluding `lastItem` and emit each on the close
83
+ * observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
84
+ * @param lastItem the element which should be left on the stack
85
+ * @return whether or not an item was removed from the stack
86
+ */
87
+ closeSubMenuOf(lastItem) {
88
+ let removed = false;
89
+ if (this._elements.indexOf(lastItem) >= 0) {
90
+ removed = this.peek() !== lastItem;
91
+ while (this.peek() !== lastItem) {
92
+ this._close.next(this._elements.pop());
93
+ }
94
+ }
95
+ return removed;
96
+ }
97
+ /**
98
+ * Pop off all MenuStackItems and emit each one on the `close` observable one by one.
99
+ * @param focusNext the event to emit on the `empty` observable once the stack is emptied. Does
100
+ * not emit if the stack was initially empty.
101
+ */
102
+ closeAll(focusNext) {
103
+ if (!this.isEmpty()) {
104
+ while (!this.isEmpty()) {
105
+ const menuStackItem = this._elements.pop();
106
+ if (menuStackItem) {
107
+ this._close.next(menuStackItem);
108
+ }
109
+ }
110
+ this._empty.next(focusNext);
111
+ }
112
+ }
113
+ /** Return true if this stack is empty. */
114
+ isEmpty() {
115
+ return !this._elements.length;
116
+ }
117
+ /** Return the length of the stack. */
118
+ length() {
119
+ return this._elements.length;
120
+ }
121
+ /** Get the top most element on the stack. */
122
+ peek() {
123
+ return this._elements[this._elements.length - 1];
124
+ }
39
125
  }
126
+ MenuStack.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: MenuStack, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
127
+ MenuStack.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: MenuStack });
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: MenuStack, decorators: [{
129
+ type: Injectable
130
+ }] });
131
+
132
+ /**
133
+ * @license
134
+ * Copyright Google LLC All Rights Reserved.
135
+ *
136
+ * Use of this source code is governed by an MIT-style license that can be
137
+ * found in the LICENSE file at https://angular.io/license
138
+ */
40
139
  /**
41
140
  * Throws an exception when an instance of the PointerFocusTracker is not provided.
42
141
  * @docs-private
@@ -223,9 +322,9 @@ class TargetMenuAim {
223
322
  this._destroyed.complete();
224
323
  }
225
324
  }
226
- TargetMenuAim.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TargetMenuAim, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
227
- TargetMenuAim.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TargetMenuAim });
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TargetMenuAim, decorators: [{
325
+ TargetMenuAim.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: TargetMenuAim, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
326
+ TargetMenuAim.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: TargetMenuAim });
327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: TargetMenuAim, decorators: [{
229
328
  type: Injectable
230
329
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
231
330
  /**
@@ -234,9 +333,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
234
333
  */
235
334
  class CdkTargetMenuAim {
236
335
  }
237
- CdkTargetMenuAim.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTargetMenuAim, deps: [], target: i0.ɵɵFactoryTarget.Directive });
238
- CdkTargetMenuAim.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkTargetMenuAim, selector: "[cdkTargetMenuAim]", providers: [{ provide: MENU_AIM, useClass: TargetMenuAim }], exportAs: ["cdkTargetMenuAim"], ngImport: i0 });
239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTargetMenuAim, decorators: [{
336
+ CdkTargetMenuAim.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkTargetMenuAim, deps: [], target: i0.ɵɵFactoryTarget.Directive });
337
+ CdkTargetMenuAim.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkTargetMenuAim, selector: "[cdkTargetMenuAim]", providers: [{ provide: MENU_AIM, useClass: TargetMenuAim }], exportAs: ["cdkTargetMenuAim"], ngImport: i0 });
338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkTargetMenuAim, decorators: [{
240
339
  type: Directive,
241
340
  args: [{
242
341
  selector: '[cdkTargetMenuAim]',
@@ -252,103 +351,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
252
351
  * Use of this source code is governed by an MIT-style license that can be
253
352
  * found in the LICENSE file at https://angular.io/license
254
353
  */
255
- /**
256
- * MenuStack allows subscribers to listen for close events (when a MenuStackItem is popped off
257
- * of the stack) in order to perform closing actions. Upon the MenuStack being empty it emits
258
- * from the `empty` observable specifying the next focus action which the listener should perform
259
- * as requested by the closer.
260
- */
261
- class MenuStack {
262
- constructor() {
263
- /** All MenuStackItems tracked by this MenuStack. */
264
- this._elements = [];
265
- /** Emits the element which was popped off of the stack when requested by a closer. */
266
- this._close = new Subject();
267
- /** Emits once the MenuStack has become empty after popping off elements. */
268
- this._empty = new Subject();
269
- /** Observable which emits the MenuStackItem which has been requested to close. */
270
- this.closed = this._close;
271
- /**
272
- * Observable which emits when the MenuStack is empty after popping off the last element. It
273
- * emits a FocusNext event which specifies the action the closer has requested the listener
274
- * perform.
275
- */
276
- this.emptied = this._empty;
277
- }
278
- /** @param menu the MenuStackItem to put on the stack. */
279
- push(menu) {
280
- this._elements.push(menu);
281
- }
282
- /**
283
- * Pop items off of the stack up to and including `lastItem` and emit each on the close
284
- * observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
285
- * @param lastItem the last item to pop off the stack.
286
- * @param focusNext the event to emit on the `empty` observable if the method call resulted in an
287
- * empty stack. Does not emit if the stack was initially empty or if `lastItem` was not on the
288
- * stack.
289
- */
290
- close(lastItem, focusNext) {
291
- if (this._elements.indexOf(lastItem) >= 0) {
292
- let poppedElement;
293
- do {
294
- poppedElement = this._elements.pop();
295
- this._close.next(poppedElement);
296
- } while (poppedElement !== lastItem);
297
- if (this.isEmpty()) {
298
- this._empty.next(focusNext);
299
- }
300
- }
301
- }
302
- /**
303
- * Pop items off of the stack up to but excluding `lastItem` and emit each on the close
304
- * observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
305
- * @param lastItem the element which should be left on the stack
306
- * @return whether or not an item was removed from the stack
307
- */
308
- closeSubMenuOf(lastItem) {
309
- let removed = false;
310
- if (this._elements.indexOf(lastItem) >= 0) {
311
- removed = this.peek() !== lastItem;
312
- while (this.peek() !== lastItem) {
313
- this._close.next(this._elements.pop());
314
- }
315
- }
316
- return removed;
317
- }
318
- /**
319
- * Pop off all MenuStackItems and emit each one on the `close` observable one by one.
320
- * @param focusNext the event to emit on the `empty` observable once the stack is emptied. Does
321
- * not emit if the stack was initially empty.
322
- */
323
- closeAll(focusNext) {
324
- if (!this.isEmpty()) {
325
- while (!this.isEmpty()) {
326
- const menuStackItem = this._elements.pop();
327
- if (menuStackItem) {
328
- this._close.next(menuStackItem);
329
- }
330
- }
331
- this._empty.next(focusNext);
332
- }
333
- }
334
- /** Return true if this stack is empty. */
335
- isEmpty() {
336
- return !this._elements.length;
337
- }
338
- /** Return the length of the stack. */
339
- length() {
340
- return this._elements.length;
354
+ /** Injection token used for an implementation of MenuStack. */
355
+ const MENU_TRIGGER = new InjectionToken('cdk-menu-trigger');
356
+ class MenuTrigger {
357
+ constructor(injector, menuStack) {
358
+ this.injector = injector;
359
+ this.menuStack = menuStack;
360
+ }
361
+ getChildMenuInjector() {
362
+ this._childMenuInjector =
363
+ this._childMenuInjector ||
364
+ Injector.create({
365
+ providers: [
366
+ { provide: MENU_TRIGGER, useValue: this },
367
+ { provide: MENU_STACK, useValue: this.menuStack },
368
+ ],
369
+ parent: this.injector,
370
+ });
371
+ return this._childMenuInjector;
341
372
  }
342
- /** Get the top most element on the stack. */
343
- peek() {
344
- return this._elements[this._elements.length - 1];
373
+ registerChildMenu(child) {
374
+ this.childMenu = child;
345
375
  }
346
376
  }
347
- /** NoopMenuStack is a placeholder MenuStack used for inline menus. */
348
- class NoopMenuStack extends MenuStack {
349
- /** Noop push - does not add elements to the MenuStack. */
350
- push(_) { }
351
- }
377
+ MenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: MenuTrigger, deps: [{ token: i0.Injector }, { token: MENU_STACK }], target: i0.ɵɵFactoryTarget.Injectable });
378
+ MenuTrigger.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: MenuTrigger });
379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: MenuTrigger, decorators: [{
380
+ type: Injectable
381
+ }], ctorParameters: function () {
382
+ return [{ type: i0.Injector }, { type: MenuStack, decorators: [{
383
+ type: Inject,
384
+ args: [MENU_STACK]
385
+ }] }];
386
+ } });
352
387
 
353
388
  /**
354
389
  * @license
@@ -381,8 +416,9 @@ function isClickInsideMenuOverlay(target) {
381
416
  * The directive must be placed along with the `cdkMenuItem` directive in order to enable full
382
417
  * functionality.
383
418
  */
384
- class CdkMenuItemTrigger {
385
- constructor(_elementRef, _viewContainerRef, _overlay, _ngZone, _parentMenu, _menuAim, _directionality) {
419
+ class CdkMenuItemTrigger extends MenuTrigger {
420
+ constructor(injector, _elementRef, _viewContainerRef, _overlay, _ngZone, menuStack, _parentMenu, _menuAim, _directionality) {
421
+ super(injector, menuStack);
386
422
  this._elementRef = _elementRef;
387
423
  this._viewContainerRef = _viewContainerRef;
388
424
  this._overlay = _overlay;
@@ -394,8 +430,6 @@ class CdkMenuItemTrigger {
394
430
  this.opened = new EventEmitter();
395
431
  /** Emits when the attached menu is requested to close */
396
432
  this.closed = new EventEmitter();
397
- /** The menu stack for this trigger and its sub-menus. */
398
- this._menuStack = new MenuStack();
399
433
  /** A reference to the overlay which manages the triggered menu */
400
434
  this._overlayRef = null;
401
435
  /** Emits when this trigger is destroyed. */
@@ -405,22 +439,6 @@ class CdkMenuItemTrigger {
405
439
  this._registerCloseHandler();
406
440
  this._subscribeToMouseEnter();
407
441
  }
408
- /** Template reference variable to the menu this trigger opens */
409
- get menuPanel() {
410
- return this._menuPanel;
411
- }
412
- set menuPanel(panel) {
413
- // If the provided panel already has a stack, that means it already has a trigger configured.
414
- // Note however that there are some edge cases where two triggers **may** share the same menu,
415
- // e.g. two triggers in two separate menus.
416
- if ((typeof ngDevMode === 'undefined' || ngDevMode) && (panel === null || panel === void 0 ? void 0 : panel._menuStack)) {
417
- throwExistingMenuStackError();
418
- }
419
- this._menuPanel = panel;
420
- if (this._menuPanel) {
421
- this._menuPanel._menuStack = this._getMenuStack();
422
- }
423
- }
424
442
  /** Open/close the attached menu if the trigger has been configured with one */
425
443
  toggle() {
426
444
  if (this.hasMenu()) {
@@ -446,7 +464,7 @@ class CdkMenuItemTrigger {
446
464
  }
447
465
  /** Return true if the trigger has an attached menu */
448
466
  hasMenu() {
449
- return !!this.menuPanel;
467
+ return !!this._menuTemplateRef;
450
468
  }
451
469
  /** Whether the menu this button is a trigger for is open */
452
470
  isMenuOpen() {
@@ -457,8 +475,7 @@ class CdkMenuItemTrigger {
457
475
  * @return the menu if it is open, otherwise undefined.
458
476
  */
459
477
  getMenu() {
460
- var _a;
461
- return (_a = this.menuPanel) === null || _a === void 0 ? void 0 : _a._menu;
478
+ return this.childMenu;
462
479
  }
463
480
  /**
464
481
  * Subscribe to the mouseenter events and close any sibling menu items if this element is moused
@@ -472,7 +489,7 @@ class CdkMenuItemTrigger {
472
489
  });
473
490
  this._ngZone.runOutsideAngular(() => {
474
491
  fromEvent(this._elementRef.nativeElement, 'mouseenter')
475
- .pipe(filter(() => { var _a; return !((_a = this._getMenuStack()) === null || _a === void 0 ? void 0 : _a.isEmpty()) && !this.isMenuOpen(); }), takeUntil(this._destroyed))
492
+ .pipe(filter(() => !this.menuStack.isEmpty() && !this.isMenuOpen()), takeUntil(this._destroyed))
476
493
  .subscribe(() => {
477
494
  if (this._menuAim) {
478
495
  this._menuAim.toggle(toggleMenus);
@@ -489,36 +506,36 @@ class CdkMenuItemTrigger {
489
506
  * @param event the keyboard event to handle
490
507
  */
491
508
  _toggleOnKeydown(event) {
492
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
509
+ var _a, _b, _c, _d, _e, _f, _g;
493
510
  const keyCode = event.keyCode;
494
511
  switch (keyCode) {
495
512
  case SPACE:
496
513
  case ENTER:
497
514
  event.preventDefault();
498
515
  this.toggle();
499
- (_b = (_a = this.menuPanel) === null || _a === void 0 ? void 0 : _a._menu) === null || _b === void 0 ? void 0 : _b.focusFirstItem('keyboard');
516
+ (_a = this.childMenu) === null || _a === void 0 ? void 0 : _a.focusFirstItem('keyboard');
500
517
  break;
501
518
  case RIGHT_ARROW:
502
519
  if (this._parentMenu && this._isParentVertical()) {
503
520
  event.preventDefault();
504
- if (((_c = this._directionality) === null || _c === void 0 ? void 0 : _c.value) === 'rtl') {
505
- this._getMenuStack().close(this._parentMenu, 2 /* currentItem */);
521
+ if (((_b = this._directionality) === null || _b === void 0 ? void 0 : _b.value) === 'rtl') {
522
+ this.menuStack.close(this._parentMenu, 2 /* currentItem */);
506
523
  }
507
524
  else {
508
525
  this.openMenu();
509
- (_e = (_d = this.menuPanel) === null || _d === void 0 ? void 0 : _d._menu) === null || _e === void 0 ? void 0 : _e.focusFirstItem('keyboard');
526
+ (_c = this.childMenu) === null || _c === void 0 ? void 0 : _c.focusFirstItem('keyboard');
510
527
  }
511
528
  }
512
529
  break;
513
530
  case LEFT_ARROW:
514
531
  if (this._parentMenu && this._isParentVertical()) {
515
532
  event.preventDefault();
516
- if (((_f = this._directionality) === null || _f === void 0 ? void 0 : _f.value) === 'rtl') {
533
+ if (((_d = this._directionality) === null || _d === void 0 ? void 0 : _d.value) === 'rtl') {
517
534
  this.openMenu();
518
- (_h = (_g = this.menuPanel) === null || _g === void 0 ? void 0 : _g._menu) === null || _h === void 0 ? void 0 : _h.focusFirstItem('keyboard');
535
+ (_e = this.childMenu) === null || _e === void 0 ? void 0 : _e.focusFirstItem('keyboard');
519
536
  }
520
537
  else {
521
- this._getMenuStack().close(this._parentMenu, 2 /* currentItem */);
538
+ this.menuStack.close(this._parentMenu, 2 /* currentItem */);
522
539
  }
523
540
  }
524
541
  break;
@@ -528,8 +545,8 @@ class CdkMenuItemTrigger {
528
545
  event.preventDefault();
529
546
  this.openMenu();
530
547
  keyCode === DOWN_ARROW
531
- ? (_k = (_j = this.menuPanel) === null || _j === void 0 ? void 0 : _j._menu) === null || _k === void 0 ? void 0 : _k.focusFirstItem('keyboard')
532
- : (_m = (_l = this.menuPanel) === null || _l === void 0 ? void 0 : _l._menu) === null || _m === void 0 ? void 0 : _m.focusLastItem('keyboard');
548
+ ? (_f = this.childMenu) === null || _f === void 0 ? void 0 : _f.focusFirstItem('keyboard')
549
+ : (_g = this.childMenu) === null || _g === void 0 ? void 0 : _g.focusLastItem('keyboard');
533
550
  }
534
551
  break;
535
552
  }
@@ -537,17 +554,17 @@ class CdkMenuItemTrigger {
537
554
  /** Close out any sibling menu trigger menus. */
538
555
  _closeSiblingTriggers() {
539
556
  if (this._parentMenu) {
540
- const menuStack = this._getMenuStack();
541
557
  // If nothing was removed from the stack and the last element is not the parent item
542
558
  // that means that the parent menu is a menu bar since we don't put the menu bar on the
543
559
  // stack
544
- const isParentMenuBar = !menuStack.closeSubMenuOf(this._parentMenu) && menuStack.peek() !== this._parentMenu;
560
+ const isParentMenuBar = !this.menuStack.closeSubMenuOf(this._parentMenu) &&
561
+ this.menuStack.peek() !== this._parentMenu;
545
562
  if (isParentMenuBar) {
546
- menuStack.closeAll();
563
+ this.menuStack.closeAll();
547
564
  }
548
565
  }
549
566
  else {
550
- this._getMenuStack().closeAll();
567
+ this.menuStack.closeAll();
551
568
  }
552
569
  }
553
570
  /** Get the configuration object used to create the overlay */
@@ -587,12 +604,12 @@ class CdkMenuItemTrigger {
587
604
  * content to change dynamically and be reflected in the application.
588
605
  */
589
606
  _getPortal() {
590
- var _a, _b;
591
- const hasMenuContentChanged = ((_a = this.menuPanel) === null || _a === void 0 ? void 0 : _a._templateRef) !== ((_b = this._panelContent) === null || _b === void 0 ? void 0 : _b.templateRef);
592
- if (this.menuPanel && (!this._panelContent || hasMenuContentChanged)) {
593
- this._panelContent = new TemplatePortal(this.menuPanel._templateRef, this._viewContainerRef);
607
+ var _a;
608
+ const hasMenuContentChanged = this._menuTemplateRef !== ((_a = this._menuPortal) === null || _a === void 0 ? void 0 : _a.templateRef);
609
+ if (this._menuTemplateRef && (!this._menuPortal || hasMenuContentChanged)) {
610
+ this._menuPortal = new TemplatePortal(this._menuTemplateRef, this._viewContainerRef, undefined, this.getChildMenuInjector());
594
611
  }
595
- return this._panelContent;
612
+ return this._menuPortal;
596
613
  }
597
614
  /**
598
615
  * @return true if if the enclosing parent menu is configured in a vertical orientation.
@@ -607,40 +624,18 @@ class CdkMenuItemTrigger {
607
624
  */
608
625
  _registerCloseHandler() {
609
626
  if (!this._parentMenu) {
610
- this._menuStack.closed.pipe(takeUntil(this._destroyed)).subscribe(item => {
611
- var _a;
612
- if (item === ((_a = this._menuPanel) === null || _a === void 0 ? void 0 : _a._menu)) {
627
+ this.menuStack.closed.pipe(takeUntil(this._destroyed)).subscribe(item => {
628
+ if (item === this.childMenu) {
613
629
  this.closeMenu();
614
630
  }
615
631
  });
616
632
  }
617
633
  }
618
- /** Get the menu stack for this trigger - either from the parent or this trigger. */
619
- _getMenuStack() {
620
- var _a;
621
- // We use a function since at the construction of the MenuItemTrigger the parent Menu won't have
622
- // its menu stack set. Therefore we need to reference the menu stack from the parent each time
623
- // we want to use it.
624
- return ((_a = this._parentMenu) === null || _a === void 0 ? void 0 : _a._menuStack) || this._menuStack;
625
- }
626
634
  ngOnDestroy() {
627
635
  this._destroyOverlay();
628
- this._resetPanelMenuStack();
629
636
  this._destroyed.next();
630
637
  this._destroyed.complete();
631
638
  }
632
- /** Set the menu panels menu stack back to null. */
633
- _resetPanelMenuStack() {
634
- // If a CdkMenuTrigger is placed in a submenu, each time the trigger is rendered (its parent
635
- // menu is opened) the panel setter for CdkMenuPanel is called. From the first render onward,
636
- // the attached CdkMenuPanel has the MenuStack set. Since we throw an error if a panel already
637
- // has a stack set, we want to reset the attached stack here to prevent the error from being
638
- // thrown if the trigger re-configures its attached panel (in the case where there is a 1:1
639
- // relationship between the panel and trigger).
640
- if (this._menuPanel) {
641
- this._menuPanel._menuStack = null;
642
- }
643
- }
644
639
  /**
645
640
  * Subscribe to the overlays outside pointer events stream and handle closing out the stack if a
646
641
  * click occurs outside the menus.
@@ -652,7 +647,7 @@ class CdkMenuItemTrigger {
652
647
  .pipe(takeUntil(this._stopOutsideClicksListener))
653
648
  .subscribe(event => {
654
649
  if (!isClickInsideMenuOverlay(event.target)) {
655
- this._getMenuStack().closeAll();
650
+ this.menuStack.closeAll();
656
651
  }
657
652
  });
658
653
  }
@@ -665,9 +660,16 @@ class CdkMenuItemTrigger {
665
660
  }
666
661
  }
667
662
  }
668
- CdkMenuItemTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItemTrigger, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1.Overlay }, { token: i0.NgZone }, { token: CDK_MENU, optional: true }, { token: MENU_AIM, optional: true }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
669
- CdkMenuItemTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMenuItemTrigger, selector: "[cdkMenuTriggerFor]", inputs: { menuPanel: ["cdkMenuTriggerFor", "menuPanel"] }, outputs: { opened: "cdkMenuOpened", closed: "cdkMenuClosed" }, host: { attributes: { "aria-haspopup": "menu" }, listeners: { "keydown": "_toggleOnKeydown($event)", "click": "toggle()" }, properties: { "attr.aria-expanded": "isMenuOpen()" }, classAttribute: "cdk-menu-trigger" }, exportAs: ["cdkMenuTriggerFor"], ngImport: i0 });
670
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItemTrigger, decorators: [{
663
+ CdkMenuItemTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItemTrigger, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1.Overlay }, { token: i0.NgZone }, { token: MENU_STACK }, { token: CDK_MENU, optional: true }, { token: MENU_AIM, optional: true }, { token: i1$1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
664
+ CdkMenuItemTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkMenuItemTrigger, selector: "[cdkMenuTriggerFor]", inputs: { _menuTemplateRef: ["cdkMenuTriggerFor", "_menuTemplateRef"] }, outputs: { opened: "cdkMenuOpened", closed: "cdkMenuClosed" }, host: { attributes: { "aria-haspopup": "menu" }, listeners: { "keydown": "_toggleOnKeydown($event)", "click": "toggle()" }, properties: { "attr.aria-expanded": "isMenuOpen()" }, classAttribute: "cdk-menu-trigger" }, providers: [
665
+ { provide: MENU_TRIGGER, useExisting: CdkMenuItemTrigger },
666
+ {
667
+ provide: MENU_STACK,
668
+ deps: [[new Optional(), new SkipSelf(), new Inject(MENU_STACK)]],
669
+ useFactory: (parentMenuStack) => parentMenuStack || new MenuStack(),
670
+ },
671
+ ], exportAs: ["cdkMenuTriggerFor"], usesInheritance: true, ngImport: i0 });
672
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItemTrigger, decorators: [{
671
673
  type: Directive,
672
674
  args: [{
673
675
  selector: '[cdkMenuTriggerFor]',
@@ -679,9 +681,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
679
681
  'aria-haspopup': 'menu',
680
682
  '[attr.aria-expanded]': 'isMenuOpen()',
681
683
  },
684
+ providers: [
685
+ { provide: MENU_TRIGGER, useExisting: CdkMenuItemTrigger },
686
+ {
687
+ provide: MENU_STACK,
688
+ deps: [[new Optional(), new SkipSelf(), new Inject(MENU_STACK)]],
689
+ useFactory: (parentMenuStack) => parentMenuStack || new MenuStack(),
690
+ },
691
+ ],
682
692
  }]
683
693
  }], ctorParameters: function () {
684
- return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1.Overlay }, { type: i0.NgZone }, { type: undefined, decorators: [{
694
+ return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1.Overlay }, { type: i0.NgZone }, { type: MenuStack, decorators: [{
695
+ type: Inject,
696
+ args: [MENU_STACK]
697
+ }] }, { type: undefined, decorators: [{
685
698
  type: Optional
686
699
  }, {
687
700
  type: Inject,
@@ -691,10 +704,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
691
704
  }, {
692
705
  type: Inject,
693
706
  args: [MENU_AIM]
694
- }] }, { type: i2.Directionality, decorators: [{
707
+ }] }, { type: i1$1.Directionality, decorators: [{
695
708
  type: Optional
696
709
  }] }];
697
- }, propDecorators: { menuPanel: [{
710
+ }, propDecorators: { _menuTemplateRef: [{
698
711
  type: Input,
699
712
  args: ['cdkMenuTriggerFor']
700
713
  }], opened: [{
@@ -725,13 +738,14 @@ function removeIcons(element) {
725
738
  * behavior when clicked.
726
739
  */
727
740
  class CdkMenuItem {
728
- constructor(_elementRef, _ngZone, _parentMenu, _menuAim, _dir,
741
+ constructor(_elementRef, _ngZone, _menuStack, _parentMenu, _menuAim, _dir,
729
742
  /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
730
743
  // `CdkMenuItem` is commonly used in combination with a `CdkMenuItemTrigger`.
731
744
  // tslint:disable-next-line: lightweight-tokens
732
745
  _menuTrigger) {
733
746
  this._elementRef = _elementRef;
734
747
  this._ngZone = _ngZone;
748
+ this._menuStack = _menuStack;
735
749
  this._parentMenu = _parentMenu;
736
750
  this._menuAim = _menuAim;
737
751
  this._dir = _dir;
@@ -781,7 +795,7 @@ class CdkMenuItem {
781
795
  return;
782
796
  }
783
797
  // don't set the tabindex if there are no open sibling or parent menus
784
- if (!event || !((_a = this._getMenuStack()) === null || _a === void 0 ? void 0 : _a.isEmpty())) {
798
+ if (!event || !((_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.isEmpty())) {
785
799
  this._tabindex = 0;
786
800
  }
787
801
  }
@@ -797,7 +811,7 @@ class CdkMenuItem {
797
811
  var _a;
798
812
  if (!this.disabled && !this.hasMenu()) {
799
813
  this.triggered.next();
800
- (_a = this._getMenuStack()) === null || _a === void 0 ? void 0 : _a.closeAll();
814
+ (_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.closeAll();
801
815
  }
802
816
  }
803
817
  /** Whether the menu item opens a menu. */
@@ -849,16 +863,16 @@ class CdkMenuItem {
849
863
  if (this._parentMenu && this._isParentVertical() && !this.hasMenu()) {
850
864
  event.preventDefault();
851
865
  ((_a = this._dir) === null || _a === void 0 ? void 0 : _a.value) === 'rtl'
852
- ? (_b = this._getMenuStack()) === null || _b === void 0 ? void 0 : _b.close(this._parentMenu, 1 /* previousItem */)
853
- : (_c = this._getMenuStack()) === null || _c === void 0 ? void 0 : _c.closeAll(0 /* nextItem */);
866
+ ? (_b = this._menuStack) === null || _b === void 0 ? void 0 : _b.close(this._parentMenu, 1 /* previousItem */)
867
+ : (_c = this._menuStack) === null || _c === void 0 ? void 0 : _c.closeAll(0 /* nextItem */);
854
868
  }
855
869
  break;
856
870
  case LEFT_ARROW:
857
871
  if (this._parentMenu && this._isParentVertical() && !this.hasMenu()) {
858
872
  event.preventDefault();
859
873
  ((_d = this._dir) === null || _d === void 0 ? void 0 : _d.value) === 'rtl'
860
- ? (_e = this._getMenuStack()) === null || _e === void 0 ? void 0 : _e.closeAll(0 /* nextItem */)
861
- : (_f = this._getMenuStack()) === null || _f === void 0 ? void 0 : _f.close(this._parentMenu, 1 /* previousItem */);
874
+ ? (_e = this._menuStack) === null || _e === void 0 ? void 0 : _e.closeAll(0 /* nextItem */)
875
+ : (_f = this._menuStack) === null || _f === void 0 ? void 0 : _f.close(this._parentMenu, 1 /* previousItem */);
862
876
  }
863
877
  break;
864
878
  }
@@ -869,9 +883,9 @@ class CdkMenuItem {
869
883
  */
870
884
  _setupMouseEnter() {
871
885
  if (!this._isStandaloneItem()) {
872
- const closeOpenSiblings = () => this._ngZone.run(() => { var _a; return (_a = this._getMenuStack()) === null || _a === void 0 ? void 0 : _a.closeSubMenuOf(this._parentMenu); });
886
+ const closeOpenSiblings = () => this._ngZone.run(() => { var _a; return (_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.closeSubMenuOf(this._parentMenu); });
873
887
  this._ngZone.runOutsideAngular(() => fromEvent(this._elementRef.nativeElement, 'mouseenter')
874
- .pipe(filter(() => { var _a; return !((_a = this._getMenuStack()) === null || _a === void 0 ? void 0 : _a.isEmpty()) && !this.hasMenu(); }), takeUntil(this._destroyed))
888
+ .pipe(filter(() => { var _a; return !((_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.isEmpty()) && !this.hasMenu(); }), takeUntil(this._destroyed))
875
889
  .subscribe(() => {
876
890
  if (this._menuAim) {
877
891
  this._menuAim.toggle(closeOpenSiblings);
@@ -890,21 +904,13 @@ class CdkMenuItem {
890
904
  var _a;
891
905
  return ((_a = this._parentMenu) === null || _a === void 0 ? void 0 : _a.orientation) === 'vertical';
892
906
  }
893
- /** Get the MenuStack from the parent menu. */
894
- _getMenuStack() {
895
- var _a;
896
- // We use a function since at the construction of the MenuItemTrigger the parent Menu won't have
897
- // its menu stack set. Therefore we need to reference the menu stack from the parent each time
898
- // we want to use it.
899
- return (_a = this._parentMenu) === null || _a === void 0 ? void 0 : _a._menuStack;
900
- }
901
907
  ngOnDestroy() {
902
908
  this._destroyed.next();
903
909
  }
904
910
  }
905
- CdkMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItem, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: CDK_MENU, optional: true }, { token: MENU_AIM, optional: true }, { token: i2.Directionality, optional: true }, { token: CdkMenuItemTrigger, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
906
- CdkMenuItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMenuItem, selector: "[cdkMenuItem]", inputs: { disabled: "disabled" }, outputs: { triggered: "cdkMenuItemTriggered" }, host: { attributes: { "type": "button", "role": "menuitem" }, listeners: { "blur": "_resetTabIndex()", "mouseout": "_resetTabIndex()", "focus": "_setTabIndex()", "mouseenter": "_setTabIndex($event)", "click": "trigger()", "keydown": "_onKeydown($event)" }, properties: { "tabindex": "_tabindex", "attr.aria-disabled": "disabled || null" }, classAttribute: "cdk-menu-item" }, exportAs: ["cdkMenuItem"], ngImport: i0 });
907
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItem, decorators: [{
911
+ CdkMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItem, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MENU_STACK, optional: true }, { token: CDK_MENU, optional: true }, { token: MENU_AIM, optional: true }, { token: i1$1.Directionality, optional: true }, { token: CdkMenuItemTrigger, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
912
+ CdkMenuItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkMenuItem, selector: "[cdkMenuItem]", inputs: { disabled: "disabled" }, outputs: { triggered: "cdkMenuItemTriggered" }, host: { attributes: { "type": "button", "role": "menuitem" }, listeners: { "blur": "_resetTabIndex()", "mouseout": "_resetTabIndex()", "focus": "_setTabIndex()", "mouseenter": "_setTabIndex($event)", "click": "trigger()", "keydown": "_onKeydown($event)" }, properties: { "tabindex": "_tabindex", "attr.aria-disabled": "disabled || null" }, classAttribute: "cdk-menu-item" }, exportAs: ["cdkMenuItem"], ngImport: i0 });
913
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItem, decorators: [{
908
914
  type: Directive,
909
915
  args: [{
910
916
  selector: '[cdkMenuItem]',
@@ -924,7 +930,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
924
930
  },
925
931
  }]
926
932
  }], ctorParameters: function () {
927
- return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
933
+ return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: MenuStack, decorators: [{
934
+ type: Optional
935
+ }, {
936
+ type: Inject,
937
+ args: [MENU_STACK]
938
+ }] }, { type: undefined, decorators: [{
928
939
  type: Optional
929
940
  }, {
930
941
  type: Inject,
@@ -934,7 +945,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
934
945
  }, {
935
946
  type: Inject,
936
947
  args: [MENU_AIM]
937
- }] }, { type: i2.Directionality, decorators: [{
948
+ }] }, { type: i1$1.Directionality, decorators: [{
938
949
  type: Optional
939
950
  }] }, { type: CdkMenuItemTrigger, decorators: [{
940
951
  type: Self
@@ -986,9 +997,9 @@ class CdkMenuItemSelectable extends CdkMenuItem {
986
997
  }
987
998
  }
988
999
  }
989
- CdkMenuItemSelectable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItemSelectable, deps: null, target: i0.ɵɵFactoryTarget.Directive });
990
- CdkMenuItemSelectable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMenuItemSelectable, inputs: { checked: "checked", name: "name", id: "id" }, outputs: { toggled: "cdkMenuItemToggled" }, usesInheritance: true, ngImport: i0 });
991
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItemSelectable, decorators: [{
1000
+ CdkMenuItemSelectable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItemSelectable, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1001
+ CdkMenuItemSelectable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkMenuItemSelectable, inputs: { checked: "checked", name: "name", id: "id" }, outputs: { toggled: "cdkMenuItemToggled" }, usesInheritance: true, ngImport: i0 });
1002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItemSelectable, decorators: [{
992
1003
  type: Directive
993
1004
  }], propDecorators: { toggled: [{
994
1005
  type: Output,
@@ -1044,9 +1055,9 @@ class CdkMenuGroup {
1044
1055
  this._selectableChanges.complete();
1045
1056
  }
1046
1057
  }
1047
- CdkMenuGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1048
- CdkMenuGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMenuGroup, selector: "[cdkMenuGroup]", outputs: { change: "change" }, host: { attributes: { "role": "group" }, classAttribute: "cdk-menu-group" }, providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }], queries: [{ propertyName: "_selectableItems", predicate: CdkMenuItemSelectable, descendants: true }], exportAs: ["cdkMenuGroup"], ngImport: i0 });
1049
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuGroup, decorators: [{
1058
+ CdkMenuGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1059
+ CdkMenuGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkMenuGroup, selector: "[cdkMenuGroup]", outputs: { change: "change" }, host: { attributes: { "role": "group" }, classAttribute: "cdk-menu-group" }, providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }], queries: [{ propertyName: "_selectableItems", predicate: CdkMenuItemSelectable, descendants: true }], exportAs: ["cdkMenuGroup"], ngImport: i0 });
1060
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuGroup, decorators: [{
1050
1061
  type: Directive,
1051
1062
  args: [{
1052
1063
  selector: '[cdkMenuGroup]',
@@ -1111,42 +1122,6 @@ class PointerFocusTracker {
1111
1122
  }
1112
1123
  }
1113
1124
 
1114
- /**
1115
- * @license
1116
- * Copyright Google LLC All Rights Reserved.
1117
- *
1118
- * Use of this source code is governed by an MIT-style license that can be
1119
- * found in the LICENSE file at https://angular.io/license
1120
- */
1121
- /**
1122
- * Directive applied to an ng-template which wraps a CdkMenu and provides a reference to the
1123
- * child element it wraps which allows for opening of the CdkMenu in an overlay.
1124
- */
1125
- class CdkMenuPanel {
1126
- constructor(_templateRef) {
1127
- this._templateRef = _templateRef;
1128
- }
1129
- /**
1130
- * Set the Menu component on the menu panel. Since we cannot use ContentChild to fetch the
1131
- * child Menu component, the child Menu must register its self with the parent MenuPanel.
1132
- */
1133
- _registerMenu(child) {
1134
- var _a;
1135
- this._menu = child;
1136
- // The ideal solution would be to affect the CdkMenuPanel injector from the CdkMenuTrigger and
1137
- // inject the menu stack reference into the child menu and menu items, however this isn't
1138
- // possible at this time.
1139
- this._menu._menuStack = this._menuStack;
1140
- (_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.push(child);
1141
- }
1142
- }
1143
- CdkMenuPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuPanel, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1144
- CdkMenuPanel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMenuPanel, selector: "ng-template[cdkMenuPanel]", exportAs: ["cdkMenuPanel"], ngImport: i0 });
1145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuPanel, decorators: [{
1146
- type: Directive,
1147
- args: [{ selector: 'ng-template[cdkMenuPanel]', exportAs: 'cdkMenuPanel' }]
1148
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
1149
-
1150
1125
  /**
1151
1126
  * @license
1152
1127
  * Copyright Google LLC All Rights Reserved.
@@ -1162,16 +1137,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1162
1137
  * It also acts as a RadioGroup for elements marked with role `menuitemradio`.
1163
1138
  */
1164
1139
  class CdkMenu extends CdkMenuGroup {
1165
- constructor(_ngZone, _elementRef, _menuAim, _dir,
1166
- // `CdkMenuPanel` is always used in combination with a `CdkMenu`.
1167
- // tslint:disable-next-line: lightweight-tokens
1168
- _menuPanel) {
1140
+ constructor(_ngZone, _elementRef, _menuStack, _parentTrigger, _menuAim, _dir) {
1169
1141
  super();
1170
1142
  this._ngZone = _ngZone;
1171
1143
  this._elementRef = _elementRef;
1144
+ this._menuStack = _menuStack;
1145
+ this._parentTrigger = _parentTrigger;
1172
1146
  this._menuAim = _menuAim;
1173
1147
  this._dir = _dir;
1174
- this._menuPanel = _menuPanel;
1175
1148
  /**
1176
1149
  * Sets the aria-orientation attribute and determines where menus will be opened.
1177
1150
  * Does not affect styling/layout.
@@ -1179,14 +1152,11 @@ class CdkMenu extends CdkMenuGroup {
1179
1152
  this.orientation = 'vertical';
1180
1153
  /** Event emitted when the menu is closed. */
1181
1154
  this.closed = new EventEmitter();
1182
- // We provide a default MenuStack implementation in case the menu is an inline menu.
1183
- // For Menus part of a MenuBar nested within a MenuPanel this will be overwritten
1184
- // to the correct parent MenuStack.
1185
- /** Track the Menus making up the open menu stack. */
1186
- this._menuStack = new NoopMenuStack();
1187
1155
  }
1188
1156
  ngOnInit() {
1189
- this._registerWithParentPanel();
1157
+ var _a, _b;
1158
+ (_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.push(this);
1159
+ (_b = this._parentTrigger) === null || _b === void 0 ? void 0 : _b.registerChildMenu(this);
1190
1160
  }
1191
1161
  ngAfterContentInit() {
1192
1162
  var _a;
@@ -1210,6 +1180,7 @@ class CdkMenu extends CdkMenuGroup {
1210
1180
  }
1211
1181
  /** Handle keyboard events for the Menu. */
1212
1182
  _handleKeyEvent(event) {
1183
+ var _a, _b;
1213
1184
  const keyManager = this._keyManager;
1214
1185
  switch (event.keyCode) {
1215
1186
  case LEFT_ARROW:
@@ -1231,28 +1202,16 @@ class CdkMenu extends CdkMenuGroup {
1231
1202
  case ESCAPE:
1232
1203
  if (!hasModifierKey(event)) {
1233
1204
  event.preventDefault();
1234
- this._menuStack.close(this, 2 /* currentItem */);
1205
+ (_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.close(this, 2 /* currentItem */);
1235
1206
  }
1236
1207
  break;
1237
1208
  case TAB:
1238
- this._menuStack.closeAll();
1209
+ (_b = this._menuStack) === null || _b === void 0 ? void 0 : _b.closeAll();
1239
1210
  break;
1240
1211
  default:
1241
1212
  keyManager.onKeydown(event);
1242
1213
  }
1243
1214
  }
1244
- /** Register this menu with its enclosing parent menu panel */
1245
- _registerWithParentPanel() {
1246
- var _a;
1247
- (_a = this._getMenuPanel()) === null || _a === void 0 ? void 0 : _a._registerMenu(this);
1248
- }
1249
- /**
1250
- * Get the enclosing CdkMenuPanel defaulting to the injected reference over the developer
1251
- * provided reference.
1252
- */
1253
- _getMenuPanel() {
1254
- return this._menuPanel || this._explicitPanel;
1255
- }
1256
1215
  /**
1257
1216
  * Complete the change emitter if there are any nested MenuGroups or register to complete the
1258
1217
  * change emitter if a MenuGroup is rendered at some point
@@ -1301,12 +1260,9 @@ class CdkMenu extends CdkMenuGroup {
1301
1260
  }
1302
1261
  /** Subscribe to the MenuStack close and empty observables. */
1303
1262
  _subscribeToMenuStack() {
1304
- this._menuStack.closed
1305
- .pipe(takeUntil(this.closed))
1306
- .subscribe(item => this._closeOpenMenu(item));
1307
- this._menuStack.emptied
1308
- .pipe(takeUntil(this.closed))
1309
- .subscribe(event => this._toggleMenuFocus(event));
1263
+ var _a, _b;
1264
+ (_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.closed.pipe(takeUntil(this.closed)).subscribe(item => this._closeOpenMenu(item));
1265
+ (_b = this._menuStack) === null || _b === void 0 ? void 0 : _b.emptied.pipe(takeUntil(this.closed)).subscribe(event => this._toggleMenuFocus(event));
1310
1266
  }
1311
1267
  /**
1312
1268
  * Close the open menu if the current active item opened the requested MenuStackItem.
@@ -1370,9 +1326,7 @@ class CdkMenu extends CdkMenuGroup {
1370
1326
  * always visible in the dom.
1371
1327
  */
1372
1328
  _isInline() {
1373
- // NoopMenuStack is the default. If this menu is not inline than the NoopMenuStack is replaced
1374
- // automatically.
1375
- return this._menuStack instanceof NoopMenuStack;
1329
+ return !this._menuStack;
1376
1330
  }
1377
1331
  ngOnDestroy() {
1378
1332
  var _a;
@@ -1386,12 +1340,12 @@ class CdkMenu extends CdkMenuGroup {
1386
1340
  this.closed.complete();
1387
1341
  }
1388
1342
  }
1389
- CdkMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenu, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: MENU_AIM, optional: true, self: true }, { token: i2.Directionality, optional: true }, { token: CdkMenuPanel, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1390
- CdkMenu.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMenu, selector: "[cdkMenu]", inputs: { orientation: ["cdkMenuOrientation", "orientation"], _explicitPanel: ["cdkMenuPanel", "_explicitPanel"] }, outputs: { closed: "closed" }, host: { attributes: { "role": "menu" }, listeners: { "focus": "focusFirstItem()", "keydown": "_handleKeyEvent($event)" }, properties: { "tabindex": "_isInline() ? 0 : null", "class.cdk-menu-inline": "_isInline()", "attr.aria-orientation": "orientation" }, classAttribute: "cdk-menu" }, providers: [
1343
+ CdkMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenu, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: MENU_STACK, optional: true }, { token: MENU_TRIGGER, optional: true }, { token: MENU_AIM, optional: true, self: true }, { token: i1$1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1344
+ CdkMenu.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkMenu, selector: "[cdkMenu]", inputs: { orientation: ["cdkMenuOrientation", "orientation"] }, outputs: { closed: "closed" }, host: { attributes: { "role": "menu" }, listeners: { "focus": "focusFirstItem()", "keydown": "_handleKeyEvent($event)" }, properties: { "tabindex": "_isInline() ? 0 : null", "class.cdk-menu-inline": "_isInline()", "attr.aria-orientation": "orientation" }, classAttribute: "cdk-menu" }, providers: [
1391
1345
  { provide: CdkMenuGroup, useExisting: CdkMenu },
1392
1346
  { provide: CDK_MENU, useExisting: CdkMenu },
1393
1347
  ], queries: [{ propertyName: "_nestedGroups", predicate: CdkMenuGroup, descendants: true }, { propertyName: "_allItems", predicate: CdkMenuItem, descendants: true }], exportAs: ["cdkMenu"], usesInheritance: true, ngImport: i0 });
1394
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenu, decorators: [{
1348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenu, decorators: [{
1395
1349
  type: Directive,
1396
1350
  args: [{
1397
1351
  selector: '[cdkMenu]',
@@ -1411,16 +1365,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1411
1365
  ],
1412
1366
  }]
1413
1367
  }], ctorParameters: function () {
1414
- return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: undefined, decorators: [{
1368
+ return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: MenuStack, decorators: [{
1369
+ type: Optional
1370
+ }, {
1371
+ type: Inject,
1372
+ args: [MENU_STACK]
1373
+ }] }, { type: MenuTrigger, decorators: [{
1374
+ type: Optional
1375
+ }, {
1376
+ type: Inject,
1377
+ args: [MENU_TRIGGER]
1378
+ }] }, { type: undefined, decorators: [{
1415
1379
  type: Self
1416
1380
  }, {
1417
1381
  type: Optional
1418
1382
  }, {
1419
1383
  type: Inject,
1420
1384
  args: [MENU_AIM]
1421
- }] }, { type: i2.Directionality, decorators: [{
1422
- type: Optional
1423
- }] }, { type: CdkMenuPanel, decorators: [{
1385
+ }] }, { type: i1$1.Directionality, decorators: [{
1424
1386
  type: Optional
1425
1387
  }] }];
1426
1388
  }, propDecorators: { orientation: [{
@@ -1434,9 +1396,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1434
1396
  }], _allItems: [{
1435
1397
  type: ContentChildren,
1436
1398
  args: [CdkMenuItem, { descendants: true }]
1437
- }], _explicitPanel: [{
1438
- type: Input,
1439
- args: ['cdkMenuPanel']
1440
1399
  }] } });
1441
1400
 
1442
1401
  /**
@@ -1453,11 +1412,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1453
1412
  *
1454
1413
  */
1455
1414
  class CdkMenuBar extends CdkMenuGroup {
1456
- constructor(_menuStack, _ngZone, _elementRef, _menuAim, _dir) {
1415
+ constructor(_ngZone, _elementRef, _menuStack, _menuAim, _dir) {
1457
1416
  super();
1458
- this._menuStack = _menuStack;
1459
1417
  this._ngZone = _ngZone;
1460
1418
  this._elementRef = _elementRef;
1419
+ this._menuStack = _menuStack;
1461
1420
  this._menuAim = _menuAim;
1462
1421
  this._dir = _dir;
1463
1422
  /**
@@ -1640,13 +1599,13 @@ class CdkMenuBar extends CdkMenuGroup {
1640
1599
  (_a = this._pointerTracker) === null || _a === void 0 ? void 0 : _a.destroy();
1641
1600
  }
1642
1601
  }
1643
- CdkMenuBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuBar, deps: [{ token: MenuStack }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: MENU_AIM, optional: true, self: true }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1644
- CdkMenuBar.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMenuBar, selector: "[cdkMenuBar]", inputs: { orientation: ["cdkMenuBarOrientation", "orientation"] }, host: { attributes: { "role": "menubar", "tabindex": "0" }, listeners: { "focus": "focusFirstItem()", "keydown": "_handleKeyEvent($event)" }, properties: { "attr.aria-orientation": "orientation" }, classAttribute: "cdk-menu-bar" }, providers: [
1602
+ CdkMenuBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuBar, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: MENU_STACK }, { token: MENU_AIM, optional: true, self: true }, { token: i1$1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1603
+ CdkMenuBar.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkMenuBar, selector: "[cdkMenuBar]", inputs: { orientation: ["cdkMenuBarOrientation", "orientation"] }, host: { attributes: { "role": "menubar", "tabindex": "0" }, listeners: { "focus": "focusFirstItem()", "keydown": "_handleKeyEvent($event)" }, properties: { "attr.aria-orientation": "orientation" }, classAttribute: "cdk-menu-bar" }, providers: [
1645
1604
  { provide: CdkMenuGroup, useExisting: CdkMenuBar },
1646
1605
  { provide: CDK_MENU, useExisting: CdkMenuBar },
1647
- { provide: MenuStack, useClass: MenuStack },
1606
+ { provide: MENU_STACK, useClass: MenuStack },
1648
1607
  ], queries: [{ propertyName: "_allItems", predicate: CdkMenuItem, descendants: true }], exportAs: ["cdkMenuBar"], usesInheritance: true, ngImport: i0 });
1649
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuBar, decorators: [{
1608
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuBar, decorators: [{
1650
1609
  type: Directive,
1651
1610
  args: [{
1652
1611
  selector: '[cdkMenuBar]',
@@ -1662,18 +1621,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1662
1621
  providers: [
1663
1622
  { provide: CdkMenuGroup, useExisting: CdkMenuBar },
1664
1623
  { provide: CDK_MENU, useExisting: CdkMenuBar },
1665
- { provide: MenuStack, useClass: MenuStack },
1624
+ { provide: MENU_STACK, useClass: MenuStack },
1666
1625
  ],
1667
1626
  }]
1668
1627
  }], ctorParameters: function () {
1669
- return [{ type: MenuStack }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: undefined, decorators: [{
1628
+ return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: MenuStack, decorators: [{
1629
+ type: Inject,
1630
+ args: [MENU_STACK]
1631
+ }] }, { type: undefined, decorators: [{
1670
1632
  type: Self
1671
1633
  }, {
1672
1634
  type: Optional
1673
1635
  }, {
1674
1636
  type: Inject,
1675
1637
  args: [MENU_AIM]
1676
- }] }, { type: i2.Directionality, decorators: [{
1638
+ }] }, { type: i1$1.Directionality, decorators: [{
1677
1639
  type: Optional
1678
1640
  }] }];
1679
1641
  }, propDecorators: { orientation: [{
@@ -1690,12 +1652,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1690
1652
  * or `CdkMenuGroup` comprise a radio group with unique selection enforced.
1691
1653
  */
1692
1654
  class CdkMenuItemRadio extends CdkMenuItemSelectable {
1693
- constructor(_selectionDispatcher, element, ngZone, parentMenu, menuAim, dir,
1655
+ constructor(_selectionDispatcher, element, ngZone, menuStack, parentMenu, menuAim, dir,
1694
1656
  /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
1695
1657
  // `CdkMenuItemRadio` is commonly used in combination with a `CdkMenuItemTrigger`.
1696
1658
  // tslint:disable-next-line: lightweight-tokens
1697
1659
  menuTrigger) {
1698
- super(element, ngZone, parentMenu, menuAim, dir, menuTrigger);
1660
+ super(element, ngZone, menuStack, parentMenu, menuAim, dir, menuTrigger);
1699
1661
  this._selectionDispatcher = _selectionDispatcher;
1700
1662
  this._registerDispatcherListener();
1701
1663
  }
@@ -1715,12 +1677,12 @@ class CdkMenuItemRadio extends CdkMenuItemSelectable {
1715
1677
  this._removeDispatcherListener();
1716
1678
  }
1717
1679
  }
1718
- CdkMenuItemRadio.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItemRadio, deps: [{ token: i1$1.UniqueSelectionDispatcher }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: CDK_MENU, optional: true }, { token: MENU_AIM, optional: true }, { token: i2.Directionality, optional: true }, { token: CdkMenuItemTrigger, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
1719
- CdkMenuItemRadio.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMenuItemRadio, selector: "[cdkMenuItemRadio]", host: { attributes: { "type": "button", "role": "menuitemradio" }, properties: { "tabindex": "_tabindex", "attr.aria-checked": "checked || null", "attr.aria-disabled": "disabled || null" } }, providers: [
1680
+ CdkMenuItemRadio.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItemRadio, deps: [{ token: i1$2.UniqueSelectionDispatcher }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: MENU_STACK, optional: true }, { token: CDK_MENU, optional: true }, { token: MENU_AIM, optional: true }, { token: i1$1.Directionality, optional: true }, { token: CdkMenuItemTrigger, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
1681
+ CdkMenuItemRadio.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkMenuItemRadio, selector: "[cdkMenuItemRadio]", host: { attributes: { "type": "button", "role": "menuitemradio" }, properties: { "tabindex": "_tabindex", "attr.aria-checked": "checked || null", "attr.aria-disabled": "disabled || null" } }, providers: [
1720
1682
  { provide: CdkMenuItemSelectable, useExisting: CdkMenuItemRadio },
1721
1683
  { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
1722
1684
  ], exportAs: ["cdkMenuItemRadio"], usesInheritance: true, ngImport: i0 });
1723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItemRadio, decorators: [{
1685
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItemRadio, decorators: [{
1724
1686
  type: Directive,
1725
1687
  args: [{
1726
1688
  selector: '[cdkMenuItemRadio]',
@@ -1738,7 +1700,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1738
1700
  ],
1739
1701
  }]
1740
1702
  }], ctorParameters: function () {
1741
- return [{ type: i1$1.UniqueSelectionDispatcher }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
1703
+ return [{ type: i1$2.UniqueSelectionDispatcher }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: MenuStack, decorators: [{
1704
+ type: Optional
1705
+ }, {
1706
+ type: Inject,
1707
+ args: [MENU_STACK]
1708
+ }] }, { type: undefined, decorators: [{
1742
1709
  type: Optional
1743
1710
  }, {
1744
1711
  type: Inject,
@@ -1748,7 +1715,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1748
1715
  }, {
1749
1716
  type: Inject,
1750
1717
  args: [MENU_AIM]
1751
- }] }, { type: i2.Directionality, decorators: [{
1718
+ }] }, { type: i1$1.Directionality, decorators: [{
1752
1719
  type: Optional
1753
1720
  }] }, { type: CdkMenuItemTrigger, decorators: [{
1754
1721
  type: Self
@@ -1777,12 +1744,12 @@ class CdkMenuItemCheckbox extends CdkMenuItemSelectable {
1777
1744
  }
1778
1745
  }
1779
1746
  }
1780
- CdkMenuItemCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItemCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1781
- CdkMenuItemCheckbox.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMenuItemCheckbox, selector: "[cdkMenuItemCheckbox]", host: { attributes: { "type": "button", "role": "menuitemcheckbox" }, properties: { "tabindex": "_tabindex", "attr.aria-checked": "checked || null", "attr.aria-disabled": "disabled || null" } }, providers: [
1747
+ CdkMenuItemCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItemCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1748
+ CdkMenuItemCheckbox.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkMenuItemCheckbox, selector: "[cdkMenuItemCheckbox]", host: { attributes: { "type": "button", "role": "menuitemcheckbox" }, properties: { "tabindex": "_tabindex", "attr.aria-checked": "checked || null", "attr.aria-disabled": "disabled || null" } }, providers: [
1782
1749
  { provide: CdkMenuItemSelectable, useExisting: CdkMenuItemCheckbox },
1783
1750
  { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
1784
1751
  ], exportAs: ["cdkMenuItemCheckbox"], usesInheritance: true, ngImport: i0 });
1785
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuItemCheckbox, decorators: [{
1752
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuItemCheckbox, decorators: [{
1786
1753
  type: Directive,
1787
1754
  args: [{
1788
1755
  selector: '[cdkMenuItemCheckbox]',
@@ -1822,9 +1789,9 @@ class ContextMenuTracker {
1822
1789
  }
1823
1790
  }
1824
1791
  }
1825
- ContextMenuTracker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ContextMenuTracker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1826
- ContextMenuTracker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ContextMenuTracker, providedIn: 'root' });
1827
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ContextMenuTracker, decorators: [{
1792
+ ContextMenuTracker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: ContextMenuTracker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1793
+ ContextMenuTracker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: ContextMenuTracker, providedIn: 'root' });
1794
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: ContextMenuTracker, decorators: [{
1828
1795
  type: Injectable,
1829
1796
  args: [{ providedIn: 'root' }]
1830
1797
  }] });
@@ -1835,8 +1802,9 @@ const CDK_CONTEXT_MENU_DEFAULT_OPTIONS = new InjectionToken('cdk-context-menu-de
1835
1802
  * right-clicks within that element. It is aware of nested Context Menus and the lowest level
1836
1803
  * non-disabled context menu will trigger.
1837
1804
  */
1838
- class CdkContextMenuTrigger {
1839
- constructor(_viewContainerRef, _overlay, _contextMenuTracker, _options, _directionality) {
1805
+ class CdkContextMenuTrigger extends MenuTrigger {
1806
+ constructor(injector, _viewContainerRef, _overlay, _contextMenuTracker, menuStack, _options, _directionality) {
1807
+ super(injector, menuStack);
1840
1808
  this._viewContainerRef = _viewContainerRef;
1841
1809
  this._overlay = _overlay;
1842
1810
  this._contextMenuTracker = _contextMenuTracker;
@@ -1851,25 +1819,10 @@ class CdkContextMenuTrigger {
1851
1819
  this._overlayRef = null;
1852
1820
  /** Emits when the element is destroyed. */
1853
1821
  this._destroyed = new Subject();
1854
- /** The menu stack for this trigger and its associated menus. */
1855
- this._menuStack = new MenuStack();
1856
1822
  /** Emits when the outside pointer events listener on the overlay should be stopped. */
1857
1823
  this._stopOutsideClicksListener = merge(this.closed, this._destroyed);
1858
1824
  this._setMenuStackListener();
1859
1825
  }
1860
- /** Template reference variable to the menu to open on right click. */
1861
- get menuPanel() {
1862
- return this._menuPanel;
1863
- }
1864
- set menuPanel(panel) {
1865
- if ((typeof ngDevMode === 'undefined' || ngDevMode) && panel._menuStack) {
1866
- throwExistingMenuStackError();
1867
- }
1868
- this._menuPanel = panel;
1869
- if (this._menuPanel) {
1870
- this._menuPanel._menuStack = this._menuStack;
1871
- }
1872
- }
1873
1826
  /** Whether the context menu should be disabled. */
1874
1827
  get disabled() {
1875
1828
  return this._disabled;
@@ -1891,7 +1844,7 @@ class CdkContextMenuTrigger {
1891
1844
  else if (this.isOpen()) {
1892
1845
  // since we're moving this menu we need to close any submenus first otherwise they end up
1893
1846
  // disconnected from this one.
1894
- this._menuStack.closeSubMenuOf(this._menuPanel._menu);
1847
+ this.menuStack.closeSubMenuOf(this.childMenu);
1895
1848
  this._overlayRef.getConfig().positionStrategy.setOrigin(coordinates);
1896
1849
  this._overlayRef.updatePosition();
1897
1850
  }
@@ -1910,7 +1863,7 @@ class CdkContextMenuTrigger {
1910
1863
  }
1911
1864
  /** Close the opened menu. */
1912
1865
  close() {
1913
- this._menuStack.closeAll();
1866
+ this.menuStack.closeAll();
1914
1867
  }
1915
1868
  /**
1916
1869
  * Open the context menu and close any previously open menus.
@@ -1929,13 +1882,13 @@ class CdkContextMenuTrigger {
1929
1882
  this._open({ x: event.clientX, y: event.clientY }, true);
1930
1883
  // A context menu can be triggered via a mouse right click or a keyboard shortcut.
1931
1884
  if (event.button === 2) {
1932
- (_a = this._menuPanel._menu) === null || _a === void 0 ? void 0 : _a.focusFirstItem('mouse');
1885
+ (_a = this.childMenu) === null || _a === void 0 ? void 0 : _a.focusFirstItem('mouse');
1933
1886
  }
1934
1887
  else if (event.button === 0) {
1935
- (_b = this._menuPanel._menu) === null || _b === void 0 ? void 0 : _b.focusFirstItem('keyboard');
1888
+ (_b = this.childMenu) === null || _b === void 0 ? void 0 : _b.focusFirstItem('keyboard');
1936
1889
  }
1937
1890
  else {
1938
- (_c = this._menuPanel._menu) === null || _c === void 0 ? void 0 : _c.focusFirstItem('program');
1891
+ (_c = this.childMenu) === null || _c === void 0 ? void 0 : _c.focusFirstItem('program');
1939
1892
  }
1940
1893
  }
1941
1894
  }
@@ -1985,16 +1938,16 @@ class CdkContextMenuTrigger {
1985
1938
  */
1986
1939
  _getMenuContent() {
1987
1940
  var _a;
1988
- const hasMenuContentChanged = this.menuPanel._templateRef !== ((_a = this._panelContent) === null || _a === void 0 ? void 0 : _a.templateRef);
1989
- if (this.menuPanel && (!this._panelContent || hasMenuContentChanged)) {
1990
- this._panelContent = new TemplatePortal(this.menuPanel._templateRef, this._viewContainerRef);
1941
+ const hasMenuContentChanged = this._menuTemplateRef !== ((_a = this._menuPortal) === null || _a === void 0 ? void 0 : _a.templateRef);
1942
+ if (this._menuTemplateRef && (!this._menuPortal || hasMenuContentChanged)) {
1943
+ this._menuPortal = new TemplatePortal(this._menuTemplateRef, this._viewContainerRef, undefined, this.getChildMenuInjector());
1991
1944
  }
1992
- return this._panelContent;
1945
+ return this._menuPortal;
1993
1946
  }
1994
1947
  /** Subscribe to the menu stack close events and close this menu when requested. */
1995
1948
  _setMenuStackListener() {
1996
- this._menuStack.closed.pipe(takeUntil(this._destroyed)).subscribe(item => {
1997
- if (item === this._menuPanel._menu && this.isOpen()) {
1949
+ this.menuStack.closed.pipe(takeUntil(this._destroyed)).subscribe(item => {
1950
+ if (item === this.childMenu && this.isOpen()) {
1998
1951
  this.closed.next();
1999
1952
  this._overlayRef.detach();
2000
1953
  }
@@ -2015,14 +1968,13 @@ class CdkContextMenuTrigger {
2015
1968
  }
2016
1969
  outsideClicks.pipe(takeUntil(this._stopOutsideClicksListener)).subscribe(event => {
2017
1970
  if (!isClickInsideMenuOverlay(event.target)) {
2018
- this._menuStack.closeAll();
1971
+ this.menuStack.closeAll();
2019
1972
  }
2020
1973
  });
2021
1974
  }
2022
1975
  }
2023
1976
  ngOnDestroy() {
2024
1977
  this._destroyOverlay();
2025
- this._resetPanelMenuStack();
2026
1978
  this._destroyed.next();
2027
1979
  this._destroyed.complete();
2028
1980
  }
@@ -2033,26 +1985,16 @@ class CdkContextMenuTrigger {
2033
1985
  this._overlayRef = null;
2034
1986
  }
2035
1987
  }
2036
- /** Set the menu panels menu stack back to null. */
2037
- _resetPanelMenuStack() {
2038
- // If a ContextMenuTrigger is placed in a conditionally rendered view, each time the trigger is
2039
- // rendered the panel setter for ContextMenuTrigger is called. From the first render onward,
2040
- // the attached CdkMenuPanel has the MenuStack set. Since we throw an error if a panel already
2041
- // has a stack set, we want to reset the attached stack here to prevent the error from being
2042
- // thrown if the trigger re-configures its attached panel (in the case where there is a 1:1
2043
- // relationship between the panel and trigger).
2044
- if (this._menuPanel) {
2045
- this._menuPanel._menuStack = null;
2046
- }
2047
- }
2048
1988
  }
2049
- CdkContextMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkContextMenuTrigger, deps: [{ token: i0.ViewContainerRef }, { token: i1.Overlay }, { token: ContextMenuTracker }, { token: CDK_CONTEXT_MENU_DEFAULT_OPTIONS }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2050
- CdkContextMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkContextMenuTrigger, selector: "[cdkContextMenuTriggerFor]", inputs: { menuPanel: ["cdkContextMenuTriggerFor", "menuPanel"], disabled: ["cdkContextMenuDisabled", "disabled"] }, outputs: { opened: "cdkContextMenuOpened", closed: "cdkContextMenuClosed" }, host: { listeners: { "contextmenu": "_openOnContextMenu($event)" } }, providers: [
1989
+ CdkContextMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkContextMenuTrigger, deps: [{ token: i0.Injector }, { token: i0.ViewContainerRef }, { token: i1.Overlay }, { token: ContextMenuTracker }, { token: MENU_STACK }, { token: CDK_CONTEXT_MENU_DEFAULT_OPTIONS }, { token: i1$1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1990
+ CdkContextMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkContextMenuTrigger, selector: "[cdkContextMenuTriggerFor]", inputs: { _menuTemplateRef: ["cdkContextMenuTriggerFor", "_menuTemplateRef"], disabled: ["cdkContextMenuDisabled", "disabled"] }, outputs: { opened: "cdkContextMenuOpened", closed: "cdkContextMenuClosed" }, host: { listeners: { "contextmenu": "_openOnContextMenu($event)" } }, providers: [
2051
1991
  // In cases where the first menu item in the context menu is a trigger the submenu opens on a
2052
1992
  // hover event. Offsetting the opened context menu by 2px prevents this from occurring.
2053
1993
  { provide: CDK_CONTEXT_MENU_DEFAULT_OPTIONS, useValue: { offsetX: 2, offsetY: 2 } },
2054
- ], exportAs: ["cdkContextMenuTriggerFor"], ngImport: i0 });
2055
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkContextMenuTrigger, decorators: [{
1994
+ { provide: MENU_TRIGGER, useExisting: CdkContextMenuTrigger },
1995
+ { provide: MENU_STACK, useClass: MenuStack },
1996
+ ], exportAs: ["cdkContextMenuTriggerFor"], usesInheritance: true, ngImport: i0 });
1997
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkContextMenuTrigger, decorators: [{
2056
1998
  type: Directive,
2057
1999
  args: [{
2058
2000
  selector: '[cdkContextMenuTriggerFor]',
@@ -2064,16 +2006,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2064
2006
  // In cases where the first menu item in the context menu is a trigger the submenu opens on a
2065
2007
  // hover event. Offsetting the opened context menu by 2px prevents this from occurring.
2066
2008
  { provide: CDK_CONTEXT_MENU_DEFAULT_OPTIONS, useValue: { offsetX: 2, offsetY: 2 } },
2009
+ { provide: MENU_TRIGGER, useExisting: CdkContextMenuTrigger },
2010
+ { provide: MENU_STACK, useClass: MenuStack },
2067
2011
  ],
2068
2012
  }]
2069
2013
  }], ctorParameters: function () {
2070
- return [{ type: i0.ViewContainerRef }, { type: i1.Overlay }, { type: ContextMenuTracker }, { type: undefined, decorators: [{
2014
+ return [{ type: i0.Injector }, { type: i0.ViewContainerRef }, { type: i1.Overlay }, { type: ContextMenuTracker }, { type: MenuStack, decorators: [{
2015
+ type: Inject,
2016
+ args: [MENU_STACK]
2017
+ }] }, { type: undefined, decorators: [{
2071
2018
  type: Inject,
2072
2019
  args: [CDK_CONTEXT_MENU_DEFAULT_OPTIONS]
2073
- }] }, { type: i2.Directionality, decorators: [{
2020
+ }] }, { type: i1$1.Directionality, decorators: [{
2074
2021
  type: Optional
2075
2022
  }] }];
2076
- }, propDecorators: { menuPanel: [{
2023
+ }, propDecorators: { _menuTemplateRef: [{
2077
2024
  type: Input,
2078
2025
  args: ['cdkContextMenuTriggerFor']
2079
2026
  }], opened: [{
@@ -2097,7 +2044,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2097
2044
  const EXPORTED_DECLARATIONS = [
2098
2045
  CdkMenuBar,
2099
2046
  CdkMenu,
2100
- CdkMenuPanel,
2101
2047
  CdkMenuItem,
2102
2048
  CdkMenuItemRadio,
2103
2049
  CdkMenuItemCheckbox,
@@ -2108,10 +2054,9 @@ const EXPORTED_DECLARATIONS = [
2108
2054
  ];
2109
2055
  class CdkMenuModule {
2110
2056
  }
2111
- CdkMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2112
- CdkMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuModule, declarations: [CdkMenuBar,
2057
+ CdkMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2058
+ CdkMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuModule, declarations: [CdkMenuBar,
2113
2059
  CdkMenu,
2114
- CdkMenuPanel,
2115
2060
  CdkMenuItem,
2116
2061
  CdkMenuItemRadio,
2117
2062
  CdkMenuItemCheckbox,
@@ -2120,7 +2065,6 @@ CdkMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
2120
2065
  CdkContextMenuTrigger,
2121
2066
  CdkTargetMenuAim], imports: [OverlayModule], exports: [CdkMenuBar,
2122
2067
  CdkMenu,
2123
- CdkMenuPanel,
2124
2068
  CdkMenuItem,
2125
2069
  CdkMenuItemRadio,
2126
2070
  CdkMenuItemCheckbox,
@@ -2128,8 +2072,8 @@ CdkMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
2128
2072
  CdkMenuGroup,
2129
2073
  CdkContextMenuTrigger,
2130
2074
  CdkTargetMenuAim] });
2131
- CdkMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuModule, imports: [[OverlayModule]] });
2132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMenuModule, decorators: [{
2075
+ CdkMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuModule, imports: [[OverlayModule]] });
2076
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkMenuModule, decorators: [{
2133
2077
  type: NgModule,
2134
2078
  args: [{
2135
2079
  imports: [OverlayModule],
@@ -2158,5 +2102,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2158
2102
  * Generated bundle index. Do not edit.
2159
2103
  */
2160
2104
 
2161
- export { CDK_CONTEXT_MENU_DEFAULT_OPTIONS, CDK_MENU, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemTrigger, CdkMenuModule, CdkMenuPanel, CdkTargetMenuAim, ContextMenuTracker, MENU_AIM, MenuStack, TargetMenuAim, isClickInsideMenuOverlay };
2105
+ export { CDK_CONTEXT_MENU_DEFAULT_OPTIONS, CDK_MENU, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemTrigger, CdkMenuModule, CdkTargetMenuAim, ContextMenuTracker, MENU_AIM, MENU_STACK, MENU_TRIGGER, MenuStack, MenuTrigger, TargetMenuAim, isClickInsideMenuOverlay };
2162
2106
  //# sourceMappingURL=menu.mjs.map