@angular/cdk-experimental 14.0.0-next.6 → 14.0.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/combobox/combobox-module.d.ts +3 -4
- package/combobox/combobox-popup.d.ts +6 -8
- package/combobox/combobox.d.ts +15 -18
- package/combobox/public-api.d.ts +0 -1
- package/dialog/dialog-config.d.ts +6 -1
- package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2020/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +3 -3
- package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +3 -3
- package/esm2020/column-resize/column-resize-module.mjs +8 -8
- package/esm2020/column-resize/column-resize-notifier.mjs +6 -6
- package/esm2020/column-resize/column-resize.mjs +3 -3
- package/esm2020/column-resize/column-size-store.mjs +3 -3
- package/esm2020/column-resize/event-dispatcher.mjs +3 -3
- package/esm2020/column-resize/overlay-handle.mjs +3 -3
- package/esm2020/column-resize/resizable.mjs +3 -3
- package/esm2020/column-resize/resize-strategy.mjs +9 -9
- package/esm2020/combobox/combobox-module.mjs +6 -7
- package/esm2020/combobox/combobox-popup.mjs +12 -23
- package/esm2020/combobox/combobox.mjs +50 -34
- package/esm2020/combobox/public-api.mjs +1 -2
- package/esm2020/dialog/dialog-config.mjs +1 -1
- package/esm2020/dialog/dialog-container.mjs +12 -7
- package/esm2020/dialog/dialog-module.mjs +4 -4
- package/esm2020/dialog/dialog.mjs +5 -5
- package/esm2020/listbox/listbox-module.mjs +4 -4
- package/esm2020/listbox/listbox.mjs +26 -44
- package/esm2020/menu/context-menu.mjs +46 -118
- package/esm2020/menu/menu-aim.mjs +6 -6
- package/esm2020/menu/menu-bar.mjs +46 -134
- package/esm2020/menu/menu-base.mjs +129 -0
- package/esm2020/menu/menu-errors.mjs +1 -9
- package/esm2020/menu/menu-group.mjs +9 -9
- package/esm2020/menu/menu-interface.mjs +1 -1
- package/esm2020/menu/menu-item-checkbox.mjs +3 -3
- package/esm2020/menu/menu-item-radio.mjs +13 -8
- package/esm2020/menu/menu-item-selectable.mjs +3 -3
- package/esm2020/menu/menu-item-trigger.mjs +66 -151
- package/esm2020/menu/menu-item.mjs +51 -45
- package/esm2020/menu/menu-module.mjs +5 -9
- package/esm2020/menu/menu-stack.mjs +31 -6
- package/esm2020/menu/menu-trigger.mjs +70 -0
- package/esm2020/menu/menu.mjs +58 -155
- package/esm2020/menu/public-api.mjs +3 -3
- package/esm2020/popover-edit/edit-event-dispatcher.mjs +3 -3
- package/esm2020/popover-edit/edit-ref.mjs +3 -3
- package/esm2020/popover-edit/edit-services.mjs +3 -3
- package/esm2020/popover-edit/focus-dispatcher.mjs +3 -3
- package/esm2020/popover-edit/focus-escape-notifier.mjs +3 -3
- package/esm2020/popover-edit/lens-directives.mjs +9 -9
- package/esm2020/popover-edit/popover-edit-module.mjs +4 -4
- package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +6 -6
- package/esm2020/popover-edit/table-directives.mjs +15 -15
- package/esm2020/scrolling/auto-size-virtual-scroll.mjs +3 -3
- package/esm2020/scrolling/scrolling-module.mjs +4 -4
- package/esm2020/selection/row-selection.mjs +3 -3
- package/esm2020/selection/select-all.mjs +3 -3
- package/esm2020/selection/selection-column.mjs +3 -3
- package/esm2020/selection/selection-module.mjs +4 -4
- package/esm2020/selection/selection-toggle.mjs +3 -3
- package/esm2020/selection/selection.mjs +3 -3
- package/esm2020/table-scroll-container/table-scroll-container-module.mjs +4 -4
- package/esm2020/table-scroll-container/table-scroll-container.mjs +3 -3
- package/esm2020/version.mjs +1 -1
- package/fesm2015/cdk-experimental.mjs +1 -1
- package/fesm2015/cdk-experimental.mjs.map +1 -1
- package/fesm2015/column-resize.mjs +50 -50
- package/fesm2015/combobox.mjs +63 -106
- package/fesm2015/combobox.mjs.map +1 -1
- package/fesm2015/dialog.mjs +20 -14
- package/fesm2015/dialog.mjs.map +1 -1
- package/fesm2015/listbox.mjs +31 -47
- package/fesm2015/listbox.mjs.map +1 -1
- package/fesm2015/menu.mjs +587 -766
- package/fesm2015/menu.mjs.map +1 -1
- package/fesm2015/popover-edit.mjs +49 -49
- package/fesm2015/scrolling.mjs +7 -7
- package/fesm2015/selection.mjs +19 -19
- package/fesm2015/table-scroll-container.mjs +7 -7
- package/fesm2020/cdk-experimental.mjs +1 -1
- package/fesm2020/cdk-experimental.mjs.map +1 -1
- package/fesm2020/column-resize.mjs +50 -50
- package/fesm2020/combobox.mjs +62 -103
- package/fesm2020/combobox.mjs.map +1 -1
- package/fesm2020/dialog.mjs +19 -14
- package/fesm2020/dialog.mjs.map +1 -1
- package/fesm2020/listbox.mjs +29 -46
- package/fesm2020/listbox.mjs.map +1 -1
- package/fesm2020/menu.mjs +482 -655
- package/fesm2020/menu.mjs.map +1 -1
- package/fesm2020/popover-edit.mjs +49 -49
- package/fesm2020/scrolling.mjs +7 -7
- package/fesm2020/selection.mjs +19 -19
- package/fesm2020/table-scroll-container.mjs +7 -7
- package/listbox/listbox.d.ts +16 -13
- package/menu/context-menu.d.ts +7 -46
- package/menu/menu-bar.d.ts +9 -50
- package/menu/menu-base.d.ts +64 -0
- package/menu/menu-errors.d.ts +0 -5
- package/menu/menu-group.d.ts +2 -2
- package/menu/menu-interface.d.ts +1 -1
- package/menu/menu-item-radio.d.ts +4 -3
- package/menu/menu-item-trigger.d.ts +8 -38
- package/menu/menu-item.d.ts +11 -6
- package/menu/menu-module.d.ts +9 -10
- package/menu/menu-stack.d.ts +22 -6
- package/menu/menu-trigger.d.ts +48 -0
- package/menu/menu.d.ts +11 -67
- package/menu/public-api.d.ts +2 -2
- package/package.json +2 -2
- package/combobox/combobox-panel.d.ts +0 -27
- package/esm2020/combobox/combobox-panel.mjs +0 -48
- package/esm2020/menu/menu-panel.mjs +0 -37
- package/menu/menu-panel.d.ts +0 -30
package/menu/menu-bar.d.ts
CHANGED
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { AfterContentInit,
|
|
8
|
+
import { AfterContentInit, ElementRef, NgZone, OnDestroy } from '@angular/core';
|
|
9
9
|
import { Directionality } from '@angular/cdk/bidi';
|
|
10
|
-
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
11
|
-
import { CdkMenuGroup } from './menu-group';
|
|
12
|
-
import { Menu } from './menu-interface';
|
|
13
10
|
import { MenuStack } from './menu-stack';
|
|
14
11
|
import { MenuAim } from './menu-aim';
|
|
12
|
+
import { CdkMenuBase } from './menu-base';
|
|
15
13
|
import * as i0 from "@angular/core";
|
|
16
14
|
/**
|
|
17
15
|
* Directive applied to an element which configures it as a MenuBar by setting the appropriate
|
|
@@ -19,70 +17,31 @@ import * as i0 from "@angular/core";
|
|
|
19
17
|
* this directive is applied to should contain components marked with CdkMenuItem.
|
|
20
18
|
*
|
|
21
19
|
*/
|
|
22
|
-
export declare class CdkMenuBar extends
|
|
23
|
-
readonly _menuStack: MenuStack;
|
|
20
|
+
export declare class CdkMenuBar extends CdkMenuBase implements AfterContentInit, OnDestroy {
|
|
24
21
|
private readonly _ngZone;
|
|
25
|
-
readonly _elementRef: ElementRef<HTMLElement>;
|
|
26
22
|
private readonly _menuAim?;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* Does not affect styling/layout.
|
|
31
|
-
*/
|
|
32
|
-
orientation: 'horizontal' | 'vertical';
|
|
33
|
-
/** Handles keyboard events for the MenuBar. */
|
|
34
|
-
private _keyManager;
|
|
35
|
-
/** Manages items under mouse focus */
|
|
36
|
-
private _pointerTracker?;
|
|
37
|
-
/** Emits when the MenuBar is destroyed. */
|
|
38
|
-
private readonly _destroyed;
|
|
39
|
-
/** All child MenuItem elements nested in this MenuBar. */
|
|
40
|
-
private readonly _allItems;
|
|
41
|
-
/** The Menu Item which triggered the open submenu. */
|
|
42
|
-
private _openItem?;
|
|
43
|
-
constructor(_menuStack: MenuStack, _ngZone: NgZone, _elementRef: ElementRef<HTMLElement>, _menuAim?: MenuAim | undefined, _dir?: Directionality | undefined);
|
|
23
|
+
readonly orientation: 'horizontal' | 'vertical';
|
|
24
|
+
menuStack: MenuStack;
|
|
25
|
+
constructor(_ngZone: NgZone, elementRef: ElementRef<HTMLElement>, menuStack: MenuStack, _menuAim?: MenuAim | undefined, dir?: Directionality);
|
|
44
26
|
ngAfterContentInit(): void;
|
|
45
|
-
|
|
46
|
-
focusFirstItem(focusOrigin?: FocusOrigin): void;
|
|
47
|
-
/** Place focus on the last MenuItem in the menu and set the focus origin. */
|
|
48
|
-
focusLastItem(focusOrigin?: FocusOrigin): void;
|
|
27
|
+
ngOnDestroy(): void;
|
|
49
28
|
/**
|
|
50
29
|
* Handle keyboard events, specifically changing the focused element and/or toggling the active
|
|
51
30
|
* items menu.
|
|
52
31
|
* @param event the KeyboardEvent to handle.
|
|
53
32
|
*/
|
|
54
33
|
_handleKeyEvent(event: KeyboardEvent): void;
|
|
55
|
-
/** Setup the FocusKeyManager with the correct orientation for the menu bar. */
|
|
56
|
-
private _setKeyManager;
|
|
57
34
|
/**
|
|
58
35
|
* Set the PointerFocusTracker and ensure that when mouse focus changes the key manager is updated
|
|
59
36
|
* with the latest menu item under mouse focus.
|
|
60
37
|
*/
|
|
61
38
|
private _subscribeToMouseManager;
|
|
62
|
-
/** Subscribe to the MenuStack close and empty observables. */
|
|
63
|
-
private _subscribeToMenuStack;
|
|
64
|
-
/**
|
|
65
|
-
* Close the open menu if the current active item opened the requested MenuStackItem.
|
|
66
|
-
* @param item the MenuStackItem requested to be closed.
|
|
67
|
-
*/
|
|
68
|
-
private _closeOpenMenu;
|
|
69
39
|
/**
|
|
70
40
|
* Set focus to either the current, previous or next item based on the FocusNext event, then
|
|
71
41
|
* open the previous or next item.
|
|
72
42
|
*/
|
|
73
43
|
private _toggleOpenMenu;
|
|
74
|
-
|
|
75
|
-
* @return true if the menu bar is configured to be horizontal.
|
|
76
|
-
*/
|
|
77
|
-
private _isHorizontal;
|
|
78
|
-
/**
|
|
79
|
-
* Subscribe to the menu trigger's open events in order to track the trigger which opened the menu
|
|
80
|
-
* and stop tracking it when the menu is closed.
|
|
81
|
-
*/
|
|
82
|
-
private _subscribeToMenuOpen;
|
|
83
|
-
/** Return true if the MenuBar has an open submenu. */
|
|
84
|
-
private _hasOpenSubmenu;
|
|
85
|
-
ngOnDestroy(): void;
|
|
44
|
+
private _subscribeToMenuStackEmptied;
|
|
86
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuBar, [null, null, null, { optional: true; self: true; }, { optional: true; }]>;
|
|
87
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuBar, "[cdkMenuBar]", ["cdkMenuBar"], {
|
|
46
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuBar, "[cdkMenuBar]", ["cdkMenuBar"], {}, {}, never>;
|
|
88
47
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { CdkMenuGroup } from './menu-group';
|
|
9
|
+
import { AfterContentInit, ElementRef, OnDestroy, QueryList } from '@angular/core';
|
|
10
|
+
import { FocusKeyManager, FocusOrigin } from '@angular/cdk/a11y';
|
|
11
|
+
import { CdkMenuItem } from './menu-item';
|
|
12
|
+
import { Subject } from 'rxjs';
|
|
13
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
14
|
+
import { MenuStack, MenuStackItem } from './menu-stack';
|
|
15
|
+
import { Menu } from './menu-interface';
|
|
16
|
+
import { PointerFocusTracker } from './pointer-focus-tracker';
|
|
17
|
+
import * as i0 from "@angular/core";
|
|
18
|
+
export declare abstract class CdkMenuBase extends CdkMenuGroup implements Menu, AfterContentInit, OnDestroy {
|
|
19
|
+
readonly _elementRef: ElementRef<HTMLElement>;
|
|
20
|
+
readonly menuStack: MenuStack;
|
|
21
|
+
protected readonly dir?: Directionality | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Sets the aria-orientation attribute and determines where menus will be opened.
|
|
24
|
+
* Does not affect styling/layout.
|
|
25
|
+
*/
|
|
26
|
+
orientation: 'horizontal' | 'vertical';
|
|
27
|
+
/** All child MenuItem elements nested in this Menu. */
|
|
28
|
+
protected readonly items: QueryList<CdkMenuItem>;
|
|
29
|
+
/** Handles keyboard events for the menu. */
|
|
30
|
+
protected keyManager: FocusKeyManager<CdkMenuItem>;
|
|
31
|
+
/** Emits when the MenuBar is destroyed. */
|
|
32
|
+
protected readonly destroyed: Subject<void>;
|
|
33
|
+
/** The Menu Item which triggered the open submenu. */
|
|
34
|
+
protected openItem?: CdkMenuItem;
|
|
35
|
+
/** Manages items under mouse focus */
|
|
36
|
+
protected pointerTracker?: PointerFocusTracker<CdkMenuItem>;
|
|
37
|
+
protected constructor(_elementRef: ElementRef<HTMLElement>, menuStack: MenuStack, dir?: Directionality | undefined);
|
|
38
|
+
ngAfterContentInit(): void;
|
|
39
|
+
ngOnDestroy(): void;
|
|
40
|
+
/** Place focus on the first MenuItem in the menu and set the focus origin. */
|
|
41
|
+
focusFirstItem(focusOrigin?: FocusOrigin): void;
|
|
42
|
+
/** Place focus on the last MenuItem in the menu and set the focus origin. */
|
|
43
|
+
focusLastItem(focusOrigin?: FocusOrigin): void;
|
|
44
|
+
/** Return true if this menu has been configured in a horizontal orientation. */
|
|
45
|
+
protected isHorizontal(): boolean;
|
|
46
|
+
/** Return true if the MenuBar has an open submenu. */
|
|
47
|
+
protected hasOpenSubmenu(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Close the open menu if the current active item opened the requested MenuStackItem.
|
|
50
|
+
* @param item the MenuStackItem requested to be closed.
|
|
51
|
+
*/
|
|
52
|
+
protected closeOpenMenu(menu: MenuStackItem | undefined): void;
|
|
53
|
+
/** Setup the FocusKeyManager with the correct orientation for the menu. */
|
|
54
|
+
private _setKeyManager;
|
|
55
|
+
/**
|
|
56
|
+
* Subscribe to the menu trigger's open events in order to track the trigger which opened the menu
|
|
57
|
+
* and stop tracking it when the menu is closed.
|
|
58
|
+
*/
|
|
59
|
+
private _subscribeToMenuOpen;
|
|
60
|
+
/** Subscribe to the MenuStack close and empty observables. */
|
|
61
|
+
private _subscribeToMenuStackClosed;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuBase, [null, null, { optional: true; }]>;
|
|
63
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuBase, never, never, {}, {}, ["items"]>;
|
|
64
|
+
}
|
package/menu/menu-errors.d.ts
CHANGED
|
@@ -5,11 +5,6 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
/**
|
|
9
|
-
* Throws an exception when a menu panel already has a menu stack.
|
|
10
|
-
* @docs-private
|
|
11
|
-
*/
|
|
12
|
-
export declare function throwExistingMenuStackError(): void;
|
|
13
8
|
/**
|
|
14
9
|
* Throws an exception when an instance of the PointerFocusTracker is not provided.
|
|
15
10
|
* @docs-private
|
package/menu/menu-group.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { AfterContentInit, EventEmitter, OnDestroy } from '@angular/core';
|
|
9
9
|
import { CdkMenuItem } from './menu-item';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
/**
|
|
@@ -20,6 +20,7 @@ export declare class CdkMenuGroup implements AfterContentInit, OnDestroy {
|
|
|
20
20
|
/** Emits when the _selectableItems QueryList triggers a change */
|
|
21
21
|
private readonly _selectableChanges;
|
|
22
22
|
ngAfterContentInit(): void;
|
|
23
|
+
ngOnDestroy(): void;
|
|
23
24
|
/**
|
|
24
25
|
* Register the child selectable elements with the change emitter and ensure any new child
|
|
25
26
|
* elements do so as well.
|
|
@@ -27,7 +28,6 @@ export declare class CdkMenuGroup implements AfterContentInit, OnDestroy {
|
|
|
27
28
|
private _registerMenuSelectionListeners;
|
|
28
29
|
/** Register each selectable to emit on the change Emitter when clicked */
|
|
29
30
|
private _registerClickListener;
|
|
30
|
-
ngOnDestroy(): void;
|
|
31
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuGroup, never>;
|
|
32
32
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuGroup, "[cdkMenuGroup]", ["cdkMenuGroup"], {}, { "change": "change"; }, ["_selectableItems"]>;
|
|
33
33
|
}
|
package/menu/menu-interface.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface Menu extends MenuStackItem {
|
|
|
15
15
|
/** The element the Menu directive is placed on. */
|
|
16
16
|
_elementRef: ElementRef<HTMLElement>;
|
|
17
17
|
/** The orientation of the menu */
|
|
18
|
-
orientation: 'horizontal' | 'vertical';
|
|
18
|
+
readonly orientation: 'horizontal' | 'vertical';
|
|
19
19
|
/** Place focus on the first MenuItem in the menu. */
|
|
20
20
|
focusFirstItem(focusOrigin: FocusOrigin): void;
|
|
21
21
|
/** Place focus on the last MenuItem in the menu. */
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
|
|
9
|
-
import {
|
|
9
|
+
import { ElementRef, NgZone, OnDestroy } from '@angular/core';
|
|
10
10
|
import { Directionality } from '@angular/cdk/bidi';
|
|
11
11
|
import { CdkMenuItemSelectable } from './menu-item-selectable';
|
|
12
12
|
import { CdkMenuItemTrigger } from './menu-item-trigger';
|
|
13
13
|
import { Menu } from './menu-interface';
|
|
14
14
|
import { MenuAim } from './menu-aim';
|
|
15
|
+
import { MenuStack } from './menu-stack';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
17
|
/**
|
|
17
18
|
* A directive providing behavior for the "menuitemradio" ARIA role, which behaves similarly to
|
|
@@ -22,7 +23,7 @@ export declare class CdkMenuItemRadio extends CdkMenuItemSelectable implements O
|
|
|
22
23
|
private readonly _selectionDispatcher;
|
|
23
24
|
/** Function to unregister the selection dispatcher */
|
|
24
25
|
private _removeDispatcherListener;
|
|
25
|
-
constructor(_selectionDispatcher: UniqueSelectionDispatcher, element: ElementRef<HTMLElement>, ngZone: NgZone, parentMenu?: Menu, menuAim?: MenuAim, dir?: Directionality,
|
|
26
|
+
constructor(_selectionDispatcher: UniqueSelectionDispatcher, element: ElementRef<HTMLElement>, ngZone: NgZone, menuStack: MenuStack, parentMenu?: Menu, menuAim?: MenuAim, dir?: Directionality,
|
|
26
27
|
/** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
|
|
27
28
|
menuTrigger?: CdkMenuItemTrigger);
|
|
28
29
|
/** Configure the unique selection dispatcher listener in order to toggle the checked state */
|
|
@@ -30,6 +31,6 @@ export declare class CdkMenuItemRadio extends CdkMenuItemSelectable implements O
|
|
|
30
31
|
/** Toggles the checked state of the radio-button. */
|
|
31
32
|
trigger(): void;
|
|
32
33
|
ngOnDestroy(): void;
|
|
33
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemRadio, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemRadio, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
|
|
34
35
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemRadio, "[cdkMenuItemRadio]", ["cdkMenuItemRadio"], {}, {}, never>;
|
|
35
36
|
}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { ElementRef, Injector, NgZone, OnDestroy, ViewContainerRef } from '@angular/core';
|
|
9
9
|
import { Directionality } from '@angular/cdk/bidi';
|
|
10
10
|
import { Overlay } from '@angular/cdk/overlay';
|
|
11
|
-
import { CdkMenuPanel } from './menu-panel';
|
|
12
11
|
import { Menu } from './menu-interface';
|
|
13
12
|
import { MenuStack } from './menu-stack';
|
|
14
13
|
import { MenuAim } from './menu-aim';
|
|
14
|
+
import { MenuTrigger } from './menu-trigger';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
16
|
/**
|
|
17
17
|
* Whether the target element is a menu item to be ignored by the overlay background click handler.
|
|
@@ -26,7 +26,7 @@ export declare function isClickInsideMenuOverlay(target: Element): boolean;
|
|
|
26
26
|
* The directive must be placed along with the `cdkMenuItem` directive in order to enable full
|
|
27
27
|
* functionality.
|
|
28
28
|
*/
|
|
29
|
-
export declare class CdkMenuItemTrigger implements OnDestroy {
|
|
29
|
+
export declare class CdkMenuItemTrigger extends MenuTrigger implements OnDestroy {
|
|
30
30
|
private readonly _elementRef;
|
|
31
31
|
protected readonly _viewContainerRef: ViewContainerRef;
|
|
32
32
|
private readonly _overlay;
|
|
@@ -34,36 +34,13 @@ export declare class CdkMenuItemTrigger implements OnDestroy {
|
|
|
34
34
|
private readonly _parentMenu?;
|
|
35
35
|
private readonly _menuAim?;
|
|
36
36
|
private readonly _directionality?;
|
|
37
|
-
|
|
38
|
-
get menuPanel(): CdkMenuPanel | undefined;
|
|
39
|
-
set menuPanel(panel: CdkMenuPanel | undefined);
|
|
40
|
-
/** Reference to the MenuPanel this trigger toggles. */
|
|
41
|
-
private _menuPanel?;
|
|
42
|
-
/** Emits when the attached menu is requested to open */
|
|
43
|
-
readonly opened: EventEmitter<void>;
|
|
44
|
-
/** Emits when the attached menu is requested to close */
|
|
45
|
-
readonly closed: EventEmitter<void>;
|
|
46
|
-
/** The menu stack for this trigger and its sub-menus. */
|
|
47
|
-
_menuStack: MenuStack;
|
|
48
|
-
/** A reference to the overlay which manages the triggered menu */
|
|
49
|
-
private _overlayRef;
|
|
50
|
-
/** The content of the menu panel opened by this trigger. */
|
|
51
|
-
private _panelContent;
|
|
52
|
-
/** Emits when this trigger is destroyed. */
|
|
53
|
-
private readonly _destroyed;
|
|
54
|
-
/** Emits when the outside pointer events listener on the overlay should be stopped. */
|
|
55
|
-
private readonly _stopOutsideClicksListener;
|
|
56
|
-
constructor(_elementRef: ElementRef<HTMLElement>, _viewContainerRef: ViewContainerRef, _overlay: Overlay, _ngZone: NgZone, _parentMenu?: Menu | undefined, _menuAim?: MenuAim | undefined, _directionality?: Directionality | undefined);
|
|
37
|
+
constructor(injector: Injector, _elementRef: ElementRef<HTMLElement>, _viewContainerRef: ViewContainerRef, _overlay: Overlay, _ngZone: NgZone, menuStack: MenuStack, _parentMenu?: Menu | undefined, _menuAim?: MenuAim | undefined, _directionality?: Directionality | undefined);
|
|
57
38
|
/** Open/close the attached menu if the trigger has been configured with one */
|
|
58
39
|
toggle(): void;
|
|
59
40
|
/** Open the attached menu. */
|
|
60
|
-
|
|
41
|
+
open(): void;
|
|
61
42
|
/** Close the opened menu. */
|
|
62
|
-
|
|
63
|
-
/** Return true if the trigger has an attached menu */
|
|
64
|
-
hasMenu(): boolean;
|
|
65
|
-
/** Whether the menu this button is a trigger for is open */
|
|
66
|
-
isMenuOpen(): boolean;
|
|
43
|
+
close(): void;
|
|
67
44
|
/**
|
|
68
45
|
* Get a reference to the rendered Menu if the Menu is open and it is visible in the DOM.
|
|
69
46
|
* @return the menu if it is open, otherwise undefined.
|
|
@@ -102,18 +79,11 @@ export declare class CdkMenuItemTrigger implements OnDestroy {
|
|
|
102
79
|
* this triggers when requested.
|
|
103
80
|
*/
|
|
104
81
|
private _registerCloseHandler;
|
|
105
|
-
/** Get the menu stack for this trigger - either from the parent or this trigger. */
|
|
106
|
-
private _getMenuStack;
|
|
107
|
-
ngOnDestroy(): void;
|
|
108
|
-
/** Set the menu panels menu stack back to null. */
|
|
109
|
-
private _resetPanelMenuStack;
|
|
110
82
|
/**
|
|
111
83
|
* Subscribe to the overlays outside pointer events stream and handle closing out the stack if a
|
|
112
84
|
* click occurs outside the menus.
|
|
113
85
|
*/
|
|
114
86
|
private _subscribeToOutsideClicks;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemTrigger, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
118
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemTrigger, "[cdkMenuTriggerFor]", ["cdkMenuTriggerFor"], { "menuPanel": "cdkMenuTriggerFor"; }, { "opened": "cdkMenuOpened"; "closed": "cdkMenuClosed"; }, never>;
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemTrigger, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
88
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemTrigger, "[cdkMenuTriggerFor]", ["cdkMenuTriggerFor"], { "_menuTemplateRef": "cdkMenuTriggerFor"; "menuPosition": "cdkMenuPosition"; }, { "opened": "cdkMenuOpened"; "closed": "cdkMenuClosed"; }, never>;
|
|
119
89
|
}
|
package/menu/menu-item.d.ts
CHANGED
|
@@ -11,8 +11,9 @@ import { FocusableOption } from '@angular/cdk/a11y';
|
|
|
11
11
|
import { Directionality } from '@angular/cdk/bidi';
|
|
12
12
|
import { CdkMenuItemTrigger } from './menu-item-trigger';
|
|
13
13
|
import { Menu } from './menu-interface';
|
|
14
|
+
import { MenuStack } from './menu-stack';
|
|
14
15
|
import { FocusableElement } from './pointer-focus-tracker';
|
|
15
|
-
import {
|
|
16
|
+
import { MenuAim, Toggler } from './menu-aim';
|
|
16
17
|
import * as i0 from "@angular/core";
|
|
17
18
|
/**
|
|
18
19
|
* Directive which provides the ability for an element to be focused and navigated to using the
|
|
@@ -22,6 +23,7 @@ import * as i0 from "@angular/core";
|
|
|
22
23
|
export declare class CdkMenuItem implements FocusableOption, FocusableElement, Toggler, OnDestroy {
|
|
23
24
|
readonly _elementRef: ElementRef<HTMLElement>;
|
|
24
25
|
private readonly _ngZone;
|
|
26
|
+
private readonly _menuStack;
|
|
25
27
|
private readonly _parentMenu?;
|
|
26
28
|
private readonly _menuAim?;
|
|
27
29
|
private readonly _dir?;
|
|
@@ -31,6 +33,11 @@ export declare class CdkMenuItem implements FocusableOption, FocusableElement, T
|
|
|
31
33
|
get disabled(): boolean;
|
|
32
34
|
set disabled(value: BooleanInput);
|
|
33
35
|
private _disabled;
|
|
36
|
+
/**
|
|
37
|
+
* The text used to locate this item during menu typeahead. If not specified,
|
|
38
|
+
* the `textContent` of the item will be used.
|
|
39
|
+
*/
|
|
40
|
+
typeahead: string;
|
|
34
41
|
/**
|
|
35
42
|
* If this MenuItem is a regular MenuItem, outputs when it is triggered by a keyboard or mouse
|
|
36
43
|
* event.
|
|
@@ -43,7 +50,7 @@ export declare class CdkMenuItem implements FocusableOption, FocusableElement, T
|
|
|
43
50
|
_tabindex: 0 | -1;
|
|
44
51
|
/** Emits when the menu item is destroyed. */
|
|
45
52
|
private readonly _destroyed;
|
|
46
|
-
constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _parentMenu?: Menu | undefined, _menuAim?: MenuAim | undefined, _dir?: Directionality | undefined,
|
|
53
|
+
constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _menuStack: MenuStack, _parentMenu?: Menu | undefined, _menuAim?: MenuAim | undefined, _dir?: Directionality | undefined,
|
|
47
54
|
/** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
|
|
48
55
|
_menuTrigger?: CdkMenuItemTrigger | undefined);
|
|
49
56
|
/** Place focus on the element. */
|
|
@@ -92,9 +99,7 @@ export declare class CdkMenuItem implements FocusableOption, FocusableElement, T
|
|
|
92
99
|
* otherwise or if no parent.
|
|
93
100
|
*/
|
|
94
101
|
private _isParentVertical;
|
|
95
|
-
/** Get the MenuStack from the parent menu. */
|
|
96
|
-
private _getMenuStack;
|
|
97
102
|
ngOnDestroy(): void;
|
|
98
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItem, [null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
|
|
99
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItem, "[cdkMenuItem]", ["cdkMenuItem"], { "disabled": "disabled"; }, { "triggered": "cdkMenuItemTriggered"; }, never>;
|
|
103
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItem, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
|
|
104
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItem, "[cdkMenuItem]", ["cdkMenuItem"], { "disabled": "disabled"; "typeahead": "typeahead"; }, { "triggered": "cdkMenuItemTriggered"; }, never>;
|
|
100
105
|
}
|
package/menu/menu-module.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./menu-bar";
|
|
3
3
|
import * as i2 from "./menu";
|
|
4
|
-
import * as i3 from "./menu-
|
|
5
|
-
import * as i4 from "./menu-item";
|
|
6
|
-
import * as i5 from "./menu-item-
|
|
7
|
-
import * as i6 from "./menu-item-
|
|
8
|
-
import * as i7 from "./menu-
|
|
9
|
-
import * as i8 from "./menu
|
|
10
|
-
import * as i9 from "./
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "@angular/cdk/overlay";
|
|
4
|
+
import * as i3 from "./menu-item";
|
|
5
|
+
import * as i4 from "./menu-item-radio";
|
|
6
|
+
import * as i5 from "./menu-item-checkbox";
|
|
7
|
+
import * as i6 from "./menu-item-trigger";
|
|
8
|
+
import * as i7 from "./menu-group";
|
|
9
|
+
import * as i8 from "./context-menu";
|
|
10
|
+
import * as i9 from "./menu-aim";
|
|
11
|
+
import * as i10 from "@angular/cdk/overlay";
|
|
13
12
|
export declare class CdkMenuModule {
|
|
14
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkMenuModule, [typeof i1.CdkMenuBar, typeof i2.CdkMenu, typeof i3.
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkMenuModule, [typeof i1.CdkMenuBar, typeof i2.CdkMenu, typeof i3.CdkMenuItem, typeof i4.CdkMenuItemRadio, typeof i5.CdkMenuItemCheckbox, typeof i6.CdkMenuItemTrigger, typeof i7.CdkMenuGroup, typeof i8.CdkContextMenuTrigger, typeof i9.CdkTargetMenuAim], [typeof i10.OverlayModule], [typeof i1.CdkMenuBar, typeof i2.CdkMenu, typeof i3.CdkMenuItem, typeof i4.CdkMenuItemRadio, typeof i5.CdkMenuItemCheckbox, typeof i6.CdkMenuItemTrigger, typeof i7.CdkMenuGroup, typeof i8.CdkContextMenuTrigger, typeof i9.CdkTargetMenuAim]>;
|
|
16
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<CdkMenuModule>;
|
|
17
16
|
}
|
package/menu/menu-stack.d.ts
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
+
import { InjectionToken, Optional } from '@angular/core';
|
|
8
9
|
import { Observable } from 'rxjs';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
9
11
|
/** Events to emit as specified by the caller once the MenuStack is empty. */
|
|
10
12
|
export declare const enum FocusNext {
|
|
11
13
|
nextItem = 0,
|
|
@@ -17,8 +19,22 @@ export declare const enum FocusNext {
|
|
|
17
19
|
*/
|
|
18
20
|
export interface MenuStackItem {
|
|
19
21
|
/** A reference to the previous Menus MenuStack instance. */
|
|
20
|
-
|
|
22
|
+
menuStack?: MenuStack;
|
|
21
23
|
}
|
|
24
|
+
/** Injection token used for an implementation of MenuStack. */
|
|
25
|
+
export declare const MENU_STACK: InjectionToken<MenuStack>;
|
|
26
|
+
/** A provider that provides the parent menu stack, or a new menu stack if there is no parent one. */
|
|
27
|
+
export declare const PARENT_OR_NEW_MENU_STACK_PROVIDER: {
|
|
28
|
+
provide: InjectionToken<MenuStack>;
|
|
29
|
+
deps: Optional[][];
|
|
30
|
+
useFactory: (parentMenuStack?: MenuStack | undefined) => MenuStack;
|
|
31
|
+
};
|
|
32
|
+
/** A provider that provides the parent menu stack, or a new menu stack if there is no parent one. */
|
|
33
|
+
export declare const PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER: {
|
|
34
|
+
provide: InjectionToken<MenuStack>;
|
|
35
|
+
deps: Optional[][];
|
|
36
|
+
useFactory: (parentMenuStack?: MenuStack | undefined) => MenuStack;
|
|
37
|
+
};
|
|
22
38
|
/**
|
|
23
39
|
* MenuStack allows subscribers to listen for close events (when a MenuStackItem is popped off
|
|
24
40
|
* of the stack) in order to perform closing actions. Upon the MenuStack being empty it emits
|
|
@@ -40,6 +56,8 @@ export declare class MenuStack {
|
|
|
40
56
|
* perform.
|
|
41
57
|
*/
|
|
42
58
|
readonly emptied: Observable<FocusNext | undefined>;
|
|
59
|
+
private _hasInlineMenu;
|
|
60
|
+
static inline(): MenuStack;
|
|
43
61
|
/** @param menu the MenuStackItem to put on the stack. */
|
|
44
62
|
push(menu: MenuStackItem): void;
|
|
45
63
|
/**
|
|
@@ -70,9 +88,7 @@ export declare class MenuStack {
|
|
|
70
88
|
length(): number;
|
|
71
89
|
/** Get the top most element on the stack. */
|
|
72
90
|
peek(): MenuStackItem | undefined;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/** Noop push - does not add elements to the MenuStack. */
|
|
77
|
-
push(_: MenuStackItem): void;
|
|
91
|
+
hasInlineMenu(): boolean;
|
|
92
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuStack, never>;
|
|
93
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MenuStack>;
|
|
78
94
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { EventEmitter, InjectionToken, Injector, OnDestroy, TemplateRef } from '@angular/core';
|
|
9
|
+
import { Menu } from './menu-interface';
|
|
10
|
+
import { MenuStack } from './menu-stack';
|
|
11
|
+
import { ConnectedPosition, OverlayRef } from '@angular/cdk/overlay';
|
|
12
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
13
|
+
import { Subject } from 'rxjs';
|
|
14
|
+
import * as i0 from "@angular/core";
|
|
15
|
+
/** Injection token used for an implementation of MenuStack. */
|
|
16
|
+
export declare const MENU_TRIGGER: InjectionToken<MenuTrigger>;
|
|
17
|
+
export declare abstract class MenuTrigger implements OnDestroy {
|
|
18
|
+
protected injector: Injector;
|
|
19
|
+
protected menuStack: MenuStack;
|
|
20
|
+
/** A list of preferred menu positions to be used when constructing the `FlexibleConnectedPositionStrategy` for this trigger's menu. */
|
|
21
|
+
menuPosition: ConnectedPosition[];
|
|
22
|
+
/** Emits when the attached menu is requested to open */
|
|
23
|
+
readonly opened: EventEmitter<void>;
|
|
24
|
+
/** Emits when the attached menu is requested to close */
|
|
25
|
+
readonly closed: EventEmitter<void>;
|
|
26
|
+
/** Template reference variable to the menu this trigger opens */
|
|
27
|
+
protected _menuTemplateRef: TemplateRef<unknown>;
|
|
28
|
+
/** A reference to the overlay which manages the triggered menu */
|
|
29
|
+
protected _overlayRef: OverlayRef | null;
|
|
30
|
+
/** The content of the menu panel opened by this trigger. */
|
|
31
|
+
protected _menuPortal: TemplatePortal;
|
|
32
|
+
/** Emits when this trigger is destroyed. */
|
|
33
|
+
protected readonly _destroyed: Subject<void>;
|
|
34
|
+
/** Emits when the outside pointer events listener on the overlay should be stopped. */
|
|
35
|
+
protected readonly _stopOutsideClicksListener: import("rxjs").Observable<void>;
|
|
36
|
+
private _childMenuInjector?;
|
|
37
|
+
protected childMenu?: Menu;
|
|
38
|
+
protected constructor(injector: Injector, menuStack: MenuStack);
|
|
39
|
+
ngOnDestroy(): void;
|
|
40
|
+
/** Whether the attached menu is open. */
|
|
41
|
+
isOpen(): boolean;
|
|
42
|
+
registerChildMenu(child: Menu): void;
|
|
43
|
+
protected getChildMenuInjector(): Injector;
|
|
44
|
+
/** Destroy and unset the overlay reference it if exists */
|
|
45
|
+
private _destroyOverlay;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuTrigger, never>;
|
|
47
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuTrigger, never, never, {}, {}, never>;
|
|
48
|
+
}
|
package/menu/menu.d.ts
CHANGED
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
8
|
+
import { AfterContentInit, ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
|
|
10
9
|
import { Directionality } from '@angular/cdk/bidi';
|
|
11
|
-
import { CdkMenuGroup } from './menu-group';
|
|
12
|
-
import { CdkMenuPanel } from './menu-panel';
|
|
13
|
-
import { Menu } from './menu-interface';
|
|
14
10
|
import { MenuStack } from './menu-stack';
|
|
15
11
|
import { MenuAim } from './menu-aim';
|
|
12
|
+
import { MenuTrigger } from './menu-trigger';
|
|
13
|
+
import { CdkMenuBase } from './menu-base';
|
|
16
14
|
import * as i0 from "@angular/core";
|
|
17
15
|
/**
|
|
18
16
|
* Directive which configures the element as a Menu which should contain child elements marked as
|
|
@@ -21,55 +19,19 @@ import * as i0 from "@angular/core";
|
|
|
21
19
|
*
|
|
22
20
|
* It also acts as a RadioGroup for elements marked with role `menuitemradio`.
|
|
23
21
|
*/
|
|
24
|
-
export declare class CdkMenu extends
|
|
22
|
+
export declare class CdkMenu extends CdkMenuBase implements AfterContentInit, OnDestroy {
|
|
25
23
|
private readonly _ngZone;
|
|
26
|
-
|
|
24
|
+
private _parentTrigger?;
|
|
27
25
|
private readonly _menuAim?;
|
|
28
|
-
private readonly _dir?;
|
|
29
|
-
private readonly _menuPanel?;
|
|
30
|
-
/**
|
|
31
|
-
* Sets the aria-orientation attribute and determines where menus will be opened.
|
|
32
|
-
* Does not affect styling/layout.
|
|
33
|
-
*/
|
|
34
|
-
orientation: 'horizontal' | 'vertical';
|
|
35
26
|
/** Event emitted when the menu is closed. */
|
|
36
|
-
readonly closed: EventEmitter<void
|
|
37
|
-
/** Track the Menus making up the open menu stack. */
|
|
38
|
-
_menuStack: MenuStack;
|
|
39
|
-
/** Handles keyboard events for the menu. */
|
|
40
|
-
private _keyManager;
|
|
41
|
-
/** Manages items under mouse focus. */
|
|
42
|
-
private _pointerTracker?;
|
|
27
|
+
readonly closed: EventEmitter<void>;
|
|
43
28
|
/** List of nested CdkMenuGroup elements */
|
|
44
29
|
private readonly _nestedGroups;
|
|
45
|
-
|
|
46
|
-
private readonly _allItems;
|
|
47
|
-
/** The Menu Item which triggered the open submenu. */
|
|
48
|
-
private _openItem?;
|
|
49
|
-
/**
|
|
50
|
-
* A reference to the enclosing parent menu panel.
|
|
51
|
-
*
|
|
52
|
-
* Required to be set when using ViewEngine since ViewEngine does support injecting a reference to
|
|
53
|
-
* the parent directive if the parent directive is placed on an `ng-template`. If using Ivy, the
|
|
54
|
-
* injected value will be used over this one.
|
|
55
|
-
*/
|
|
56
|
-
private readonly _explicitPanel?;
|
|
57
|
-
constructor(_ngZone: NgZone, _elementRef: ElementRef<HTMLElement>, _menuAim?: MenuAim | undefined, _dir?: Directionality | undefined, _menuPanel?: CdkMenuPanel | undefined);
|
|
58
|
-
ngOnInit(): void;
|
|
30
|
+
constructor(_ngZone: NgZone, elementRef: ElementRef<HTMLElement>, menuStack: MenuStack, _parentTrigger?: MenuTrigger | undefined, _menuAim?: MenuAim | undefined, dir?: Directionality);
|
|
59
31
|
ngAfterContentInit(): void;
|
|
60
|
-
|
|
61
|
-
focusFirstItem(focusOrigin?: FocusOrigin): void;
|
|
62
|
-
/** Place focus on the last MenuItem in the menu and set the focus origin. */
|
|
63
|
-
focusLastItem(focusOrigin?: FocusOrigin): void;
|
|
32
|
+
ngOnDestroy(): void;
|
|
64
33
|
/** Handle keyboard events for the Menu. */
|
|
65
34
|
_handleKeyEvent(event: KeyboardEvent): void;
|
|
66
|
-
/** Register this menu with its enclosing parent menu panel */
|
|
67
|
-
private _registerWithParentPanel;
|
|
68
|
-
/**
|
|
69
|
-
* Get the enclosing CdkMenuPanel defaulting to the injected reference over the developer
|
|
70
|
-
* provided reference.
|
|
71
|
-
*/
|
|
72
|
-
private _getMenuPanel;
|
|
73
35
|
/**
|
|
74
36
|
* Complete the change emitter if there are any nested MenuGroups or register to complete the
|
|
75
37
|
* change emitter if a MenuGroup is rendered at some point
|
|
@@ -77,37 +39,19 @@ export declare class CdkMenu extends CdkMenuGroup implements Menu, AfterContentI
|
|
|
77
39
|
private _completeChangeEmitter;
|
|
78
40
|
/** Return true if there are nested CdkMenuGroup elements within the Menu */
|
|
79
41
|
private _hasNestedGroups;
|
|
80
|
-
/** Setup the FocusKeyManager with the correct orientation for the menu. */
|
|
81
|
-
private _setKeyManager;
|
|
82
42
|
/**
|
|
83
43
|
* Set the PointerFocusTracker and ensure that when mouse focus changes the key manager is updated
|
|
84
44
|
* with the latest menu item under mouse focus.
|
|
85
45
|
*/
|
|
86
46
|
private _subscribeToMouseManager;
|
|
87
|
-
/** Subscribe to the MenuStack close and empty observables. */
|
|
88
|
-
private _subscribeToMenuStack;
|
|
89
|
-
/**
|
|
90
|
-
* Close the open menu if the current active item opened the requested MenuStackItem.
|
|
91
|
-
* @param item the MenuStackItem requested to be closed.
|
|
92
|
-
*/
|
|
93
|
-
private _closeOpenMenu;
|
|
94
47
|
/** Set focus the either the current, previous or next item based on the FocusNext event. */
|
|
95
48
|
private _toggleMenuFocus;
|
|
96
|
-
/**
|
|
97
|
-
* Subscribe to the menu trigger's open events in order to track the trigger which opened the menu
|
|
98
|
-
* and stop tracking it when the menu is closed.
|
|
99
|
-
*/
|
|
100
|
-
private _subscribeToMenuOpen;
|
|
101
|
-
/** Return true if this menu has been configured in a horizontal orientation. */
|
|
102
|
-
private _isHorizontal;
|
|
103
49
|
/**
|
|
104
50
|
* Return true if this menu is an inline menu. That is, it does not exist in a pop-up and is
|
|
105
51
|
* always visible in the dom.
|
|
106
52
|
*/
|
|
107
53
|
_isInline(): boolean;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenu, [null, null, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>;
|
|
112
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenu, "[cdkMenu]", ["cdkMenu"], { "orientation": "cdkMenuOrientation"; "_explicitPanel": "cdkMenuPanel"; }, { "closed": "closed"; }, ["_nestedGroups", "_allItems"]>;
|
|
54
|
+
private _subscribeToMenuStackEmptied;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenu, [null, null, null, { optional: true; }, { optional: true; self: true; }, { optional: true; }]>;
|
|
56
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenu, "[cdkMenu]", ["cdkMenu"], {}, { "closed": "closed"; }, ["_nestedGroups"]>;
|
|
113
57
|
}
|
package/menu/public-api.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ export * from './menu-item';
|
|
|
12
12
|
export * from './menu-item-checkbox';
|
|
13
13
|
export * from './menu-item-radio';
|
|
14
14
|
export * from './menu-item-trigger';
|
|
15
|
-
export * from './menu-panel';
|
|
16
15
|
export * from './menu-group';
|
|
17
16
|
export * from './context-menu';
|
|
18
|
-
export
|
|
17
|
+
export * from './menu-trigger';
|
|
18
|
+
export { MenuStack, MenuStackItem, MENU_STACK } from './menu-stack';
|
|
19
19
|
export { CDK_MENU } from './menu-interface';
|
|
20
20
|
export { TargetMenuAim, MenuAim, MENU_AIM, CdkTargetMenuAim } from './menu-aim';
|