@angular/cdk-experimental 14.0.0-next.1 → 14.0.0-next.12

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 (160) hide show
  1. package/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
  2. package/column-resize/column-resize-directives/column-resize.d.ts +1 -1
  3. package/column-resize/column-resize-directives/default-enabled-column-resize-flex.d.ts +1 -1
  4. package/column-resize/column-resize-directives/default-enabled-column-resize.d.ts +1 -1
  5. package/column-resize/column-resize.d.ts +1 -1
  6. package/column-resize/overlay-handle.d.ts +1 -1
  7. package/column-resize/resizable.d.ts +1 -1
  8. package/combobox/combobox-module.d.ts +3 -4
  9. package/combobox/combobox-popup.d.ts +6 -8
  10. package/combobox/combobox.d.ts +15 -18
  11. package/combobox/public-api.d.ts +0 -1
  12. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  13. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +4 -4
  14. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
  15. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
  16. package/esm2020/column-resize/column-resize-module.mjs +9 -9
  17. package/esm2020/column-resize/column-resize-notifier.mjs +7 -7
  18. package/esm2020/column-resize/column-resize.mjs +6 -5
  19. package/esm2020/column-resize/column-size-store.mjs +4 -4
  20. package/esm2020/column-resize/event-dispatcher.mjs +4 -4
  21. package/esm2020/column-resize/overlay-handle.mjs +4 -4
  22. package/esm2020/column-resize/resizable.mjs +4 -4
  23. package/esm2020/column-resize/resize-strategy.mjs +10 -10
  24. package/esm2020/combobox/combobox-module.mjs +6 -7
  25. package/esm2020/combobox/combobox-popup.mjs +12 -23
  26. package/esm2020/combobox/combobox.mjs +50 -34
  27. package/esm2020/combobox/public-api.mjs +1 -2
  28. package/esm2020/listbox/listbox-module.mjs +5 -5
  29. package/esm2020/listbox/listbox.mjs +26 -44
  30. package/esm2020/popover-edit/edit-event-dispatcher.mjs +4 -4
  31. package/esm2020/popover-edit/edit-ref.mjs +4 -4
  32. package/esm2020/popover-edit/edit-services.mjs +4 -4
  33. package/esm2020/popover-edit/focus-dispatcher.mjs +4 -4
  34. package/esm2020/popover-edit/focus-escape-notifier.mjs +4 -4
  35. package/esm2020/popover-edit/lens-directives.mjs +10 -10
  36. package/esm2020/popover-edit/popover-edit-module.mjs +5 -5
  37. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +7 -7
  38. package/esm2020/popover-edit/table-directives.mjs +16 -16
  39. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +4 -4
  40. package/esm2020/scrolling/scrolling-module.mjs +5 -5
  41. package/esm2020/selection/row-selection.mjs +4 -4
  42. package/esm2020/selection/select-all.mjs +4 -4
  43. package/esm2020/selection/selection-column.mjs +10 -10
  44. package/esm2020/selection/selection-module.mjs +5 -5
  45. package/esm2020/selection/selection-toggle.mjs +4 -4
  46. package/esm2020/selection/selection.mjs +4 -4
  47. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +5 -5
  48. package/esm2020/table-scroll-container/table-scroll-container.mjs +4 -4
  49. package/esm2020/version.mjs +1 -1
  50. package/fesm2015/cdk-experimental.mjs +1 -1
  51. package/fesm2015/cdk-experimental.mjs.map +1 -1
  52. package/fesm2015/column-resize.mjs +52 -51
  53. package/fesm2015/column-resize.mjs.map +1 -1
  54. package/fesm2015/combobox.mjs +63 -106
  55. package/fesm2015/combobox.mjs.map +1 -1
  56. package/fesm2015/listbox.mjs +31 -47
  57. package/fesm2015/listbox.mjs.map +1 -1
  58. package/fesm2015/popover-edit.mjs +49 -49
  59. package/fesm2015/popover-edit.mjs.map +1 -1
  60. package/fesm2015/scrolling.mjs +7 -7
  61. package/fesm2015/scrolling.mjs.map +1 -1
  62. package/fesm2015/selection.mjs +23 -23
  63. package/fesm2015/selection.mjs.map +1 -1
  64. package/fesm2015/table-scroll-container.mjs +7 -7
  65. package/fesm2015/table-scroll-container.mjs.map +1 -1
  66. package/fesm2020/cdk-experimental.mjs +1 -1
  67. package/fesm2020/cdk-experimental.mjs.map +1 -1
  68. package/fesm2020/column-resize.mjs +52 -51
  69. package/fesm2020/column-resize.mjs.map +1 -1
  70. package/fesm2020/combobox.mjs +62 -103
  71. package/fesm2020/combobox.mjs.map +1 -1
  72. package/fesm2020/listbox.mjs +29 -46
  73. package/fesm2020/listbox.mjs.map +1 -1
  74. package/fesm2020/popover-edit.mjs +49 -49
  75. package/fesm2020/popover-edit.mjs.map +1 -1
  76. package/fesm2020/scrolling.mjs +7 -7
  77. package/fesm2020/scrolling.mjs.map +1 -1
  78. package/fesm2020/selection.mjs +23 -23
  79. package/fesm2020/selection.mjs.map +1 -1
  80. package/fesm2020/table-scroll-container.mjs +7 -7
  81. package/fesm2020/table-scroll-container.mjs.map +1 -1
  82. package/listbox/listbox.d.ts +16 -13
  83. package/package.json +3 -19
  84. package/popover-edit/lens-directives.d.ts +3 -3
  85. package/popover-edit/table-directives.d.ts +5 -5
  86. package/scrolling/auto-size-virtual-scroll.d.ts +1 -1
  87. package/selection/row-selection.d.ts +1 -1
  88. package/selection/select-all.d.ts +1 -1
  89. package/selection/selection-column.d.ts +1 -1
  90. package/selection/selection-toggle.d.ts +1 -1
  91. package/selection/selection.d.ts +1 -1
  92. package/table-scroll-container/table-scroll-container.d.ts +1 -1
  93. package/combobox/combobox-panel.d.ts +0 -27
  94. package/dialog/dialog-config.d.ts +0 -77
  95. package/dialog/dialog-container.d.ts +0 -99
  96. package/dialog/dialog-injectors.d.ts +0 -30
  97. package/dialog/dialog-module.d.ts +0 -10
  98. package/dialog/dialog-ref.d.ts +0 -57
  99. package/dialog/dialog.d.ts +0 -100
  100. package/dialog/dialog_public_index.d.ts +0 -4
  101. package/dialog/index.d.ts +0 -8
  102. package/dialog/package.json +0 -9
  103. package/dialog/public-api.d.ts +0 -13
  104. package/esm2020/combobox/combobox-panel.mjs +0 -48
  105. package/esm2020/dialog/dialog-config.mjs +0 -43
  106. package/esm2020/dialog/dialog-container.mjs +0 -283
  107. package/esm2020/dialog/dialog-injectors.mjs +0 -30
  108. package/esm2020/dialog/dialog-module.mjs +0 -56
  109. package/esm2020/dialog/dialog-ref.mjs +0 -116
  110. package/esm2020/dialog/dialog.mjs +0 -252
  111. package/esm2020/dialog/dialog_public_index.mjs +0 -5
  112. package/esm2020/dialog/index.mjs +0 -9
  113. package/esm2020/dialog/public-api.mjs +0 -14
  114. package/esm2020/menu/context-menu.mjs +0 -294
  115. package/esm2020/menu/index.mjs +0 -9
  116. package/esm2020/menu/menu-aim.mjs +0 -199
  117. package/esm2020/menu/menu-bar.mjs +0 -252
  118. package/esm2020/menu/menu-errors.mjs +0 -30
  119. package/esm2020/menu/menu-group.mjs +0 -68
  120. package/esm2020/menu/menu-interface.mjs +0 -11
  121. package/esm2020/menu/menu-item-checkbox.mjs +0 -48
  122. package/esm2020/menu/menu-item-radio.mjs +0 -90
  123. package/esm2020/menu/menu-item-selectable.mjs +0 -57
  124. package/esm2020/menu/menu-item-trigger.mjs +0 -361
  125. package/esm2020/menu/menu-item.mjs +0 -244
  126. package/esm2020/menu/menu-module.mjs +0 -64
  127. package/esm2020/menu/menu-panel.mjs +0 -37
  128. package/esm2020/menu/menu-stack.mjs +0 -106
  129. package/esm2020/menu/menu.mjs +0 -301
  130. package/esm2020/menu/menu_public_index.mjs +0 -5
  131. package/esm2020/menu/pointer-focus-tracker.mjs +0 -49
  132. package/esm2020/menu/public-api.mjs +0 -21
  133. package/fesm2015/dialog.mjs +0 -785
  134. package/fesm2015/dialog.mjs.map +0 -1
  135. package/fesm2015/menu.mjs +0 -2162
  136. package/fesm2015/menu.mjs.map +0 -1
  137. package/fesm2020/dialog.mjs +0 -780
  138. package/fesm2020/dialog.mjs.map +0 -1
  139. package/fesm2020/menu.mjs +0 -2127
  140. package/fesm2020/menu.mjs.map +0 -1
  141. package/menu/context-menu.d.ts +0 -123
  142. package/menu/index.d.ts +0 -8
  143. package/menu/menu-aim.d.ts +0 -96
  144. package/menu/menu-bar.d.ts +0 -88
  145. package/menu/menu-errors.d.ts +0 -22
  146. package/menu/menu-group.d.ts +0 -33
  147. package/menu/menu-interface.d.ts +0 -23
  148. package/menu/menu-item-checkbox.d.ts +0 -12
  149. package/menu/menu-item-radio.d.ts +0 -35
  150. package/menu/menu-item-selectable.d.ts +0 -31
  151. package/menu/menu-item-trigger.d.ts +0 -119
  152. package/menu/menu-item.d.ts +0 -100
  153. package/menu/menu-module.d.ts +0 -17
  154. package/menu/menu-panel.d.ts +0 -30
  155. package/menu/menu-stack.d.ts +0 -78
  156. package/menu/menu.d.ts +0 -113
  157. package/menu/menu_public_index.d.ts +0 -4
  158. package/menu/package.json +0 -9
  159. package/menu/pointer-focus-tracker.d.ts +0 -44
  160. package/menu/public-api.d.ts +0 -20
@@ -1,88 +0,0 @@
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 { AfterContentInit, OnDestroy, NgZone, ElementRef } from '@angular/core';
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
- import { MenuStack } from './menu-stack';
14
- import { MenuAim } from './menu-aim';
15
- import * as i0 from "@angular/core";
16
- /**
17
- * Directive applied to an element which configures it as a MenuBar by setting the appropriate
18
- * role, aria attributes, and accessible keyboard and mouse handling logic. The component that
19
- * this directive is applied to should contain components marked with CdkMenuItem.
20
- *
21
- */
22
- export declare class CdkMenuBar extends CdkMenuGroup implements Menu, AfterContentInit, OnDestroy {
23
- readonly _menuStack: MenuStack;
24
- private readonly _ngZone;
25
- readonly _elementRef: ElementRef<HTMLElement>;
26
- private readonly _menuAim?;
27
- private readonly _dir?;
28
- /**
29
- * Sets the aria-orientation attribute and determines where menus will be opened.
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);
44
- ngAfterContentInit(): void;
45
- /** Place focus on the first MenuItem in the menu and set the focus origin. */
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;
49
- /**
50
- * Handle keyboard events, specifically changing the focused element and/or toggling the active
51
- * items menu.
52
- * @param event the KeyboardEvent to handle.
53
- */
54
- _handleKeyEvent(event: KeyboardEvent): void;
55
- /** Setup the FocusKeyManager with the correct orientation for the menu bar. */
56
- private _setKeyManager;
57
- /**
58
- * Set the PointerFocusTracker and ensure that when mouse focus changes the key manager is updated
59
- * with the latest menu item under mouse focus.
60
- */
61
- 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
- /**
70
- * Set focus to either the current, previous or next item based on the FocusNext event, then
71
- * open the previous or next item.
72
- */
73
- 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;
86
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuBar, [null, null, null, { optional: true; self: true; }, { optional: true; }]>;
87
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuBar, "[cdkMenuBar]", ["cdkMenuBar"], { "orientation": "cdkMenuBarOrientation"; }, {}, ["_allItems"]>;
88
- }
@@ -1,22 +0,0 @@
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
- /**
9
- * Throws an exception when a menu panel already has a menu stack.
10
- * @docs-private
11
- */
12
- export declare function throwExistingMenuStackError(): void;
13
- /**
14
- * Throws an exception when an instance of the PointerFocusTracker is not provided.
15
- * @docs-private
16
- */
17
- export declare function throwMissingPointerFocusTracker(): void;
18
- /**
19
- * Throws an exception when a reference to the parent menu is not provided.
20
- * @docs-private
21
- */
22
- export declare function throwMissingMenuReference(): void;
@@ -1,33 +0,0 @@
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, AfterContentInit, OnDestroy } from '@angular/core';
9
- import { CdkMenuItem } from './menu-item';
10
- import * as i0 from "@angular/core";
11
- /**
12
- * Directive which acts as a grouping container for `CdkMenuItem` instances with
13
- * `role="menuitemradio"`, similar to a `role="radiogroup"` element.
14
- */
15
- export declare class CdkMenuGroup implements AfterContentInit, OnDestroy {
16
- /** Emits the element when checkbox or radiobutton state changed */
17
- readonly change: EventEmitter<CdkMenuItem>;
18
- /** List of menuitemcheckbox or menuitemradio elements which reside in this group */
19
- private readonly _selectableItems;
20
- /** Emits when the _selectableItems QueryList triggers a change */
21
- private readonly _selectableChanges;
22
- ngAfterContentInit(): void;
23
- /**
24
- * Register the child selectable elements with the change emitter and ensure any new child
25
- * elements do so as well.
26
- */
27
- private _registerMenuSelectionListeners;
28
- /** Register each selectable to emit on the change Emitter when clicked */
29
- private _registerClickListener;
30
- ngOnDestroy(): void;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuGroup, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuGroup, "[cdkMenuGroup]", ["cdkMenuGroup"], {}, { "change": "change"; }, ["_selectableItems"]>;
33
- }
@@ -1,23 +0,0 @@
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 { InjectionToken, ElementRef } from '@angular/core';
9
- import { MenuStackItem } from './menu-stack';
10
- import { FocusOrigin } from '@angular/cdk/a11y';
11
- /** Injection token used to return classes implementing the Menu interface */
12
- export declare const CDK_MENU: InjectionToken<Menu>;
13
- /** Interface which specifies Menu operations and used to break circular dependency issues */
14
- export interface Menu extends MenuStackItem {
15
- /** The element the Menu directive is placed on. */
16
- _elementRef: ElementRef<HTMLElement>;
17
- /** The orientation of the menu */
18
- orientation: 'horizontal' | 'vertical';
19
- /** Place focus on the first MenuItem in the menu. */
20
- focusFirstItem(focusOrigin: FocusOrigin): void;
21
- /** Place focus on the last MenuItem in the menu. */
22
- focusLastItem(focusOrigin: FocusOrigin): void;
23
- }
@@ -1,12 +0,0 @@
1
- import { CdkMenuItemSelectable } from './menu-item-selectable';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * A directive providing behavior for the "menuitemcheckbox" ARIA role, which behaves similarly to a
5
- * conventional checkbox.
6
- */
7
- export declare class CdkMenuItemCheckbox extends CdkMenuItemSelectable {
8
- /** Toggle the checked state of the checkbox. */
9
- trigger(): void;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemCheckbox, never>;
11
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemCheckbox, "[cdkMenuItemCheckbox]", ["cdkMenuItemCheckbox"], {}, {}, never>;
12
- }
@@ -1,35 +0,0 @@
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 { UniqueSelectionDispatcher } from '@angular/cdk/collections';
9
- import { OnDestroy, ElementRef, NgZone } from '@angular/core';
10
- import { Directionality } from '@angular/cdk/bidi';
11
- import { CdkMenuItemSelectable } from './menu-item-selectable';
12
- import { CdkMenuItemTrigger } from './menu-item-trigger';
13
- import { Menu } from './menu-interface';
14
- import { MenuAim } from './menu-aim';
15
- import * as i0 from "@angular/core";
16
- /**
17
- * A directive providing behavior for the "menuitemradio" ARIA role, which behaves similarly to
18
- * a conventional radio-button. Any sibling `CdkMenuItemRadio` instances within the same `CdkMenu`
19
- * or `CdkMenuGroup` comprise a radio group with unique selection enforced.
20
- */
21
- export declare class CdkMenuItemRadio extends CdkMenuItemSelectable implements OnDestroy {
22
- private readonly _selectionDispatcher;
23
- /** Function to unregister the selection dispatcher */
24
- private _removeDispatcherListener;
25
- constructor(_selectionDispatcher: UniqueSelectionDispatcher, element: ElementRef<HTMLElement>, ngZone: NgZone, parentMenu?: Menu, menuAim?: MenuAim, dir?: Directionality,
26
- /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
27
- menuTrigger?: CdkMenuItemTrigger);
28
- /** Configure the unique selection dispatcher listener in order to toggle the checked state */
29
- private _registerDispatcherListener;
30
- /** Toggles the checked state of the radio-button. */
31
- trigger(): void;
32
- ngOnDestroy(): void;
33
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemRadio, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
34
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemRadio, "[cdkMenuItemRadio]", ["cdkMenuItemRadio"], {}, {}, never>;
35
- }
@@ -1,31 +0,0 @@
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 { BooleanInput } from '@angular/cdk/coercion';
9
- import { EventEmitter } from '@angular/core';
10
- import { CdkMenuItem } from './menu-item';
11
- import * as i0 from "@angular/core";
12
- /**
13
- * Base class providing checked state for MenuItems along with outputting a clicked event when the
14
- * element is triggered. It provides functionality for selectable elements.
15
- */
16
- export declare abstract class CdkMenuItemSelectable extends CdkMenuItem {
17
- /** Event emitted when the selectable item is clicked */
18
- readonly toggled: EventEmitter<CdkMenuItemSelectable>;
19
- /** Whether the element is checked */
20
- get checked(): boolean;
21
- set checked(value: BooleanInput);
22
- private _checked;
23
- /** The name of the selectable element with a default value */
24
- name: string;
25
- /** The id of the selectable element with a default value */
26
- id: string;
27
- /** If the element is not disabled emit the click event */
28
- trigger(): void;
29
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemSelectable, never>;
30
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemSelectable, never, never, { "checked": "checked"; "name": "name"; "id": "id"; }, { "toggled": "cdkMenuItemToggled"; }, never>;
31
- }
@@ -1,119 +0,0 @@
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, ElementRef, ViewContainerRef, OnDestroy, NgZone } from '@angular/core';
9
- import { Directionality } from '@angular/cdk/bidi';
10
- import { Overlay } from '@angular/cdk/overlay';
11
- import { CdkMenuPanel } from './menu-panel';
12
- import { Menu } from './menu-interface';
13
- import { MenuStack } from './menu-stack';
14
- import { MenuAim } from './menu-aim';
15
- import * as i0 from "@angular/core";
16
- /**
17
- * Whether the target element is a menu item to be ignored by the overlay background click handler.
18
- */
19
- export declare function isClickInsideMenuOverlay(target: Element): boolean;
20
- /**
21
- * A directive to be combined with CdkMenuItem which opens the Menu it is bound to. If the
22
- * element is in a top level MenuBar it will open the menu on click, or if a sibling is already
23
- * opened it will open on hover. If it is inside of a Menu it will open the attached Submenu on
24
- * hover regardless of its sibling state.
25
- *
26
- * The directive must be placed along with the `cdkMenuItem` directive in order to enable full
27
- * functionality.
28
- */
29
- export declare class CdkMenuItemTrigger implements OnDestroy {
30
- private readonly _elementRef;
31
- protected readonly _viewContainerRef: ViewContainerRef;
32
- private readonly _overlay;
33
- private readonly _ngZone;
34
- private readonly _parentMenu?;
35
- private readonly _menuAim?;
36
- private readonly _directionality?;
37
- /** Template reference variable to the menu this trigger opens */
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);
57
- /** Open/close the attached menu if the trigger has been configured with one */
58
- toggle(): void;
59
- /** Open the attached menu. */
60
- openMenu(): void;
61
- /** Close the opened menu. */
62
- closeMenu(): void;
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;
67
- /**
68
- * Get a reference to the rendered Menu if the Menu is open and it is visible in the DOM.
69
- * @return the menu if it is open, otherwise undefined.
70
- */
71
- getMenu(): Menu | undefined;
72
- /**
73
- * Subscribe to the mouseenter events and close any sibling menu items if this element is moused
74
- * into.
75
- */
76
- private _subscribeToMouseEnter;
77
- /**
78
- * Handles keyboard events for the menu item, specifically opening/closing the attached menu and
79
- * focusing the appropriate submenu item.
80
- * @param event the keyboard event to handle
81
- */
82
- _toggleOnKeydown(event: KeyboardEvent): void;
83
- /** Close out any sibling menu trigger menus. */
84
- private _closeSiblingTriggers;
85
- /** Get the configuration object used to create the overlay */
86
- private _getOverlayConfig;
87
- /** Build the position strategy for the overlay which specifies where to place the menu */
88
- private _getOverlayPositionStrategy;
89
- /** Determine and return where to position the opened menu relative to the menu item */
90
- private _getOverlayPositions;
91
- /**
92
- * Get the portal to be attached to the overlay which contains the menu. Allows for the menu
93
- * content to change dynamically and be reflected in the application.
94
- */
95
- private _getPortal;
96
- /**
97
- * @return true if if the enclosing parent menu is configured in a vertical orientation.
98
- */
99
- private _isParentVertical;
100
- /**
101
- * Subscribe to the MenuStack close events if this is a standalone trigger and close out the menu
102
- * this triggers when requested.
103
- */
104
- 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
- /**
111
- * Subscribe to the overlays outside pointer events stream and handle closing out the stack if a
112
- * click occurs outside the menus.
113
- */
114
- private _subscribeToOutsideClicks;
115
- /** Destroy and unset the overlay reference it if exists */
116
- private _destroyOverlay;
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>;
119
- }
@@ -1,100 +0,0 @@
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 { ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
9
- import { BooleanInput } from '@angular/cdk/coercion';
10
- import { FocusableOption } from '@angular/cdk/a11y';
11
- import { Directionality } from '@angular/cdk/bidi';
12
- import { CdkMenuItemTrigger } from './menu-item-trigger';
13
- import { Menu } from './menu-interface';
14
- import { FocusableElement } from './pointer-focus-tracker';
15
- import { Toggler, MenuAim } from './menu-aim';
16
- import * as i0 from "@angular/core";
17
- /**
18
- * Directive which provides the ability for an element to be focused and navigated to using the
19
- * keyboard when residing in a CdkMenu, CdkMenuBar, or CdkMenuGroup. It performs user defined
20
- * behavior when clicked.
21
- */
22
- export declare class CdkMenuItem implements FocusableOption, FocusableElement, Toggler, OnDestroy {
23
- readonly _elementRef: ElementRef<HTMLElement>;
24
- private readonly _ngZone;
25
- private readonly _parentMenu?;
26
- private readonly _menuAim?;
27
- private readonly _dir?;
28
- /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
29
- private readonly _menuTrigger?;
30
- /** Whether the CdkMenuItem is disabled - defaults to false */
31
- get disabled(): boolean;
32
- set disabled(value: BooleanInput);
33
- private _disabled;
34
- /**
35
- * If this MenuItem is a regular MenuItem, outputs when it is triggered by a keyboard or mouse
36
- * event.
37
- */
38
- readonly triggered: EventEmitter<void>;
39
- /**
40
- * The tabindex for this menu item managed internally and used for implementing roving a
41
- * tab index.
42
- */
43
- _tabindex: 0 | -1;
44
- /** Emits when the menu item is destroyed. */
45
- private readonly _destroyed;
46
- constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _parentMenu?: Menu | undefined, _menuAim?: MenuAim | undefined, _dir?: Directionality | undefined,
47
- /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
48
- _menuTrigger?: CdkMenuItemTrigger | undefined);
49
- /** Place focus on the element. */
50
- focus(): void;
51
- /** Reset the _tabindex to -1. */
52
- _resetTabIndex(): void;
53
- /**
54
- * Set the tab index to 0 if not disabled and it's a focus event, or a mouse enter if this element
55
- * is not in a menu bar.
56
- */
57
- _setTabIndex(event?: MouseEvent): void;
58
- /** Whether this menu item is standalone or within a menu or menu bar. */
59
- _isStandaloneItem(): boolean;
60
- /**
61
- * If the menu item is not disabled and the element does not have a menu trigger attached, emit
62
- * on the cdkMenuItemTriggered emitter and close all open menus.
63
- */
64
- trigger(): void;
65
- /** Whether the menu item opens a menu. */
66
- hasMenu(): boolean;
67
- /** Return true if this MenuItem has an attached menu and it is open. */
68
- isMenuOpen(): boolean;
69
- /**
70
- * Get a reference to the rendered Menu if the Menu is open and it is visible in the DOM.
71
- * @return the menu if it is open, otherwise undefined.
72
- */
73
- getMenu(): Menu | undefined;
74
- /** Get the MenuItemTrigger associated with this element. */
75
- getMenuTrigger(): CdkMenuItemTrigger | undefined;
76
- /** Get the label for this element which is required by the FocusableOption interface. */
77
- getLabel(): string;
78
- /**
79
- * Handles keyboard events for the menu item, specifically either triggering the user defined
80
- * callback or opening/closing the current menu based on whether the left or right arrow key was
81
- * pressed.
82
- * @param event the keyboard event to handle
83
- */
84
- _onKeydown(event: KeyboardEvent): void;
85
- /**
86
- * Subscribe to the mouseenter events and close any sibling menu items if this element is moused
87
- * into.
88
- */
89
- private _setupMouseEnter;
90
- /**
91
- * Return true if the enclosing parent menu is configured in a horizontal orientation, false
92
- * otherwise or if no parent.
93
- */
94
- private _isParentVertical;
95
- /** Get the MenuStack from the parent menu. */
96
- private _getMenuStack;
97
- 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>;
100
- }
@@ -1,17 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./menu-bar";
3
- import * as i2 from "./menu";
4
- import * as i3 from "./menu-panel";
5
- import * as i4 from "./menu-item";
6
- import * as i5 from "./menu-item-radio";
7
- import * as i6 from "./menu-item-checkbox";
8
- import * as i7 from "./menu-item-trigger";
9
- import * as i8 from "./menu-group";
10
- import * as i9 from "./context-menu";
11
- import * as i10 from "./menu-aim";
12
- import * as i11 from "@angular/cdk/overlay";
13
- export declare class CdkMenuModule {
14
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuModule, never>;
15
- static ɵmod: i0.ɵɵNgModuleDeclaration<CdkMenuModule, [typeof i1.CdkMenuBar, typeof i2.CdkMenu, typeof i3.CdkMenuPanel, typeof i4.CdkMenuItem, typeof i5.CdkMenuItemRadio, typeof i6.CdkMenuItemCheckbox, typeof i7.CdkMenuItemTrigger, typeof i8.CdkMenuGroup, typeof i9.CdkContextMenuTrigger, typeof i10.CdkTargetMenuAim], [typeof i11.OverlayModule], [typeof i1.CdkMenuBar, typeof i2.CdkMenu, typeof i3.CdkMenuPanel, typeof i4.CdkMenuItem, typeof i5.CdkMenuItemRadio, typeof i6.CdkMenuItemCheckbox, typeof i7.CdkMenuItemTrigger, typeof i8.CdkMenuGroup, typeof i9.CdkContextMenuTrigger, typeof i10.CdkTargetMenuAim]>;
16
- static ɵinj: i0.ɵɵInjectorDeclaration<CdkMenuModule>;
17
- }
@@ -1,30 +0,0 @@
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 { TemplateRef } from '@angular/core';
9
- import { Menu } from './menu-interface';
10
- import { MenuStack } from './menu-stack';
11
- import * as i0 from "@angular/core";
12
- /**
13
- * Directive applied to an ng-template which wraps a CdkMenu and provides a reference to the
14
- * child element it wraps which allows for opening of the CdkMenu in an overlay.
15
- */
16
- export declare class CdkMenuPanel {
17
- readonly _templateRef: TemplateRef<unknown>;
18
- /** Reference to the child menu component */
19
- _menu?: Menu;
20
- /** Keep track of open Menus. */
21
- _menuStack: MenuStack | null;
22
- constructor(_templateRef: TemplateRef<unknown>);
23
- /**
24
- * Set the Menu component on the menu panel. Since we cannot use ContentChild to fetch the
25
- * child Menu component, the child Menu must register its self with the parent MenuPanel.
26
- */
27
- _registerMenu(child: Menu): void;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuPanel, never>;
29
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuPanel, "ng-template[cdkMenuPanel]", ["cdkMenuPanel"], {}, {}, never>;
30
- }
@@ -1,78 +0,0 @@
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 { Observable } from 'rxjs';
9
- /** Events to emit as specified by the caller once the MenuStack is empty. */
10
- export declare const enum FocusNext {
11
- nextItem = 0,
12
- previousItem = 1,
13
- currentItem = 2
14
- }
15
- /**
16
- * Interface for the elements tracked in the MenuStack.
17
- */
18
- export interface MenuStackItem {
19
- /** A reference to the previous Menus MenuStack instance. */
20
- _menuStack: MenuStack | null;
21
- }
22
- /**
23
- * MenuStack allows subscribers to listen for close events (when a MenuStackItem is popped off
24
- * of the stack) in order to perform closing actions. Upon the MenuStack being empty it emits
25
- * from the `empty` observable specifying the next focus action which the listener should perform
26
- * as requested by the closer.
27
- */
28
- export declare class MenuStack {
29
- /** All MenuStackItems tracked by this MenuStack. */
30
- private readonly _elements;
31
- /** Emits the element which was popped off of the stack when requested by a closer. */
32
- private readonly _close;
33
- /** Emits once the MenuStack has become empty after popping off elements. */
34
- private readonly _empty;
35
- /** Observable which emits the MenuStackItem which has been requested to close. */
36
- readonly closed: Observable<MenuStackItem | undefined>;
37
- /**
38
- * Observable which emits when the MenuStack is empty after popping off the last element. It
39
- * emits a FocusNext event which specifies the action the closer has requested the listener
40
- * perform.
41
- */
42
- readonly emptied: Observable<FocusNext | undefined>;
43
- /** @param menu the MenuStackItem to put on the stack. */
44
- push(menu: MenuStackItem): void;
45
- /**
46
- * Pop items off of the stack up to and including `lastItem` and emit each on the close
47
- * observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
48
- * @param lastItem the last item to pop off the stack.
49
- * @param focusNext the event to emit on the `empty` observable if the method call resulted in an
50
- * empty stack. Does not emit if the stack was initially empty or if `lastItem` was not on the
51
- * stack.
52
- */
53
- close(lastItem: MenuStackItem, focusNext?: FocusNext): void;
54
- /**
55
- * Pop items off of the stack up to but excluding `lastItem` and emit each on the close
56
- * observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
57
- * @param lastItem the element which should be left on the stack
58
- * @return whether or not an item was removed from the stack
59
- */
60
- closeSubMenuOf(lastItem: MenuStackItem): boolean;
61
- /**
62
- * Pop off all MenuStackItems and emit each one on the `close` observable one by one.
63
- * @param focusNext the event to emit on the `empty` observable once the stack is emptied. Does
64
- * not emit if the stack was initially empty.
65
- */
66
- closeAll(focusNext?: FocusNext): void;
67
- /** Return true if this stack is empty. */
68
- isEmpty(): boolean;
69
- /** Return the length of the stack. */
70
- length(): number;
71
- /** Get the top most element on the stack. */
72
- peek(): MenuStackItem | undefined;
73
- }
74
- /** NoopMenuStack is a placeholder MenuStack used for inline menus. */
75
- export declare class NoopMenuStack extends MenuStack {
76
- /** Noop push - does not add elements to the MenuStack. */
77
- push(_: MenuStackItem): void;
78
- }