@angular/cdk-experimental 14.0.0-next.9 → 14.0.0-rc.0

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 (212) hide show
  1. package/column-resize/index.d.ts +419 -6
  2. package/combobox/index.d.ts +123 -8
  3. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  4. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +4 -4
  5. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
  6. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
  7. package/esm2020/column-resize/column-resize-module.mjs +9 -9
  8. package/esm2020/column-resize/column-resize-notifier.mjs +7 -7
  9. package/esm2020/column-resize/column-resize.mjs +4 -4
  10. package/esm2020/column-resize/column-size-store.mjs +4 -4
  11. package/esm2020/column-resize/event-dispatcher.mjs +4 -4
  12. package/esm2020/column-resize/overlay-handle.mjs +4 -4
  13. package/esm2020/column-resize/resizable.mjs +4 -4
  14. package/esm2020/column-resize/resize-strategy.mjs +10 -10
  15. package/esm2020/combobox/combobox-module.mjs +5 -5
  16. package/esm2020/combobox/combobox-popup.mjs +4 -4
  17. package/esm2020/combobox/combobox.mjs +4 -4
  18. package/esm2020/listbox/listbox-module.mjs +5 -5
  19. package/esm2020/listbox/listbox.mjs +7 -7
  20. package/esm2020/popover-edit/edit-event-dispatcher.mjs +7 -7
  21. package/esm2020/popover-edit/edit-ref.mjs +4 -4
  22. package/esm2020/popover-edit/edit-services.mjs +4 -4
  23. package/esm2020/popover-edit/focus-dispatcher.mjs +4 -4
  24. package/esm2020/popover-edit/focus-escape-notifier.mjs +6 -6
  25. package/esm2020/popover-edit/lens-directives.mjs +10 -10
  26. package/esm2020/popover-edit/popover-edit-module.mjs +6 -6
  27. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +7 -7
  28. package/esm2020/popover-edit/table-directives.mjs +19 -19
  29. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +4 -4
  30. package/esm2020/scrolling/scrolling-module.mjs +5 -5
  31. package/esm2020/selection/row-selection.mjs +4 -4
  32. package/esm2020/selection/select-all.mjs +4 -4
  33. package/esm2020/selection/selection-column.mjs +10 -10
  34. package/esm2020/selection/selection-module.mjs +5 -5
  35. package/esm2020/selection/selection-toggle.mjs +4 -4
  36. package/esm2020/selection/selection.mjs +4 -4
  37. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +5 -5
  38. package/esm2020/table-scroll-container/table-scroll-container.mjs +4 -4
  39. package/esm2020/version.mjs +1 -1
  40. package/fesm2015/cdk-experimental.mjs +1 -1
  41. package/fesm2015/cdk-experimental.mjs.map +1 -1
  42. package/fesm2015/column-resize.mjs +50 -50
  43. package/fesm2015/column-resize.mjs.map +1 -1
  44. package/fesm2015/combobox.mjs +10 -10
  45. package/fesm2015/combobox.mjs.map +1 -1
  46. package/fesm2015/listbox.mjs +10 -10
  47. package/fesm2015/listbox.mjs.map +1 -1
  48. package/fesm2015/popover-edit.mjs +58 -58
  49. package/fesm2015/popover-edit.mjs.map +1 -1
  50. package/fesm2015/scrolling.mjs +7 -7
  51. package/fesm2015/scrolling.mjs.map +1 -1
  52. package/fesm2015/selection.mjs +23 -23
  53. package/fesm2015/selection.mjs.map +1 -1
  54. package/fesm2015/table-scroll-container.mjs +7 -7
  55. package/fesm2015/table-scroll-container.mjs.map +1 -1
  56. package/fesm2020/cdk-experimental.mjs +1 -1
  57. package/fesm2020/cdk-experimental.mjs.map +1 -1
  58. package/fesm2020/column-resize.mjs +50 -50
  59. package/fesm2020/column-resize.mjs.map +1 -1
  60. package/fesm2020/combobox.mjs +10 -10
  61. package/fesm2020/combobox.mjs.map +1 -1
  62. package/fesm2020/listbox.mjs +10 -10
  63. package/fesm2020/listbox.mjs.map +1 -1
  64. package/fesm2020/popover-edit.mjs +58 -58
  65. package/fesm2020/popover-edit.mjs.map +1 -1
  66. package/fesm2020/scrolling.mjs +7 -7
  67. package/fesm2020/scrolling.mjs.map +1 -1
  68. package/fesm2020/selection.mjs +23 -23
  69. package/fesm2020/selection.mjs.map +1 -1
  70. package/fesm2020/table-scroll-container.mjs +7 -7
  71. package/fesm2020/table-scroll-container.mjs.map +1 -1
  72. package/index.d.ts +6 -8
  73. package/listbox/index.d.ts +197 -8
  74. package/package.json +9 -25
  75. package/popover-edit/index.d.ts +532 -5
  76. package/scrolling/index.d.ts +173 -6
  77. package/selection/index.d.ts +273 -5
  78. package/table-scroll-container/index.d.ts +61 -5
  79. package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -28
  80. package/column-resize/column-resize-directives/column-resize.d.ts +0 -28
  81. package/column-resize/column-resize-directives/constants.d.ts +0 -10
  82. package/column-resize/column-resize-directives/default-enabled-column-resize-flex.d.ts +0 -28
  83. package/column-resize/column-resize-directives/default-enabled-column-resize.d.ts +0 -28
  84. package/column-resize/column-resize-module.d.ts +0 -23
  85. package/column-resize/column-resize-notifier.d.ts +0 -49
  86. package/column-resize/column-resize.d.ts +0 -39
  87. package/column-resize/column-resize_public_index.d.ts +0 -4
  88. package/column-resize/column-size-store.d.ts +0 -12
  89. package/column-resize/event-dispatcher.d.ts +0 -44
  90. package/column-resize/overlay-handle.d.ts +0 -43
  91. package/column-resize/package.json +0 -9
  92. package/column-resize/public-api.d.ts +0 -20
  93. package/column-resize/resizable.d.ts +0 -69
  94. package/column-resize/resize-ref.d.ts +0 -17
  95. package/column-resize/resize-strategy.d.ts +0 -83
  96. package/column-resize/selectors.d.ts +0 -10
  97. package/combobox/combobox-module.d.ts +0 -9
  98. package/combobox/combobox-popup.d.ts +0 -27
  99. package/combobox/combobox.d.ts +0 -68
  100. package/combobox/combobox_public_index.d.ts +0 -4
  101. package/combobox/package.json +0 -9
  102. package/combobox/public-api.d.ts +0 -10
  103. package/dialog/dialog-config.d.ts +0 -82
  104. package/dialog/dialog-container.d.ts +0 -99
  105. package/dialog/dialog-injectors.d.ts +0 -30
  106. package/dialog/dialog-module.d.ts +0 -10
  107. package/dialog/dialog-ref.d.ts +0 -57
  108. package/dialog/dialog.d.ts +0 -100
  109. package/dialog/dialog_public_index.d.ts +0 -4
  110. package/dialog/index.d.ts +0 -8
  111. package/dialog/package.json +0 -9
  112. package/dialog/public-api.d.ts +0 -13
  113. package/esm2020/dialog/dialog-config.mjs +0 -43
  114. package/esm2020/dialog/dialog-container.mjs +0 -300
  115. package/esm2020/dialog/dialog-injectors.mjs +0 -30
  116. package/esm2020/dialog/dialog-module.mjs +0 -56
  117. package/esm2020/dialog/dialog-ref.mjs +0 -116
  118. package/esm2020/dialog/dialog.mjs +0 -252
  119. package/esm2020/dialog/dialog_public_index.mjs +0 -5
  120. package/esm2020/dialog/index.mjs +0 -9
  121. package/esm2020/dialog/public-api.mjs +0 -14
  122. package/esm2020/menu/context-menu.mjs +0 -222
  123. package/esm2020/menu/index.mjs +0 -9
  124. package/esm2020/menu/menu-aim.mjs +0 -199
  125. package/esm2020/menu/menu-bar.mjs +0 -164
  126. package/esm2020/menu/menu-base.mjs +0 -129
  127. package/esm2020/menu/menu-errors.mjs +0 -22
  128. package/esm2020/menu/menu-group.mjs +0 -68
  129. package/esm2020/menu/menu-interface.mjs +0 -11
  130. package/esm2020/menu/menu-item-checkbox.mjs +0 -48
  131. package/esm2020/menu/menu-item-radio.mjs +0 -95
  132. package/esm2020/menu/menu-item-selectable.mjs +0 -57
  133. package/esm2020/menu/menu-item-trigger.mjs +0 -276
  134. package/esm2020/menu/menu-item.mjs +0 -250
  135. package/esm2020/menu/menu-module.mjs +0 -60
  136. package/esm2020/menu/menu-stack.mjs +0 -131
  137. package/esm2020/menu/menu-trigger.mjs +0 -70
  138. package/esm2020/menu/menu.mjs +0 -204
  139. package/esm2020/menu/menu_public_index.mjs +0 -5
  140. package/esm2020/menu/pointer-focus-tracker.mjs +0 -49
  141. package/esm2020/menu/public-api.mjs +0 -21
  142. package/fesm2015/dialog.mjs +0 -803
  143. package/fesm2015/dialog.mjs.map +0 -1
  144. package/fesm2015/menu.mjs +0 -1983
  145. package/fesm2015/menu.mjs.map +0 -1
  146. package/fesm2020/dialog.mjs +0 -797
  147. package/fesm2020/dialog.mjs.map +0 -1
  148. package/fesm2020/menu.mjs +0 -1954
  149. package/fesm2020/menu.mjs.map +0 -1
  150. package/listbox/listbox-module.d.ts +0 -7
  151. package/listbox/listbox.d.ts +0 -172
  152. package/listbox/listbox_public_index.d.ts +0 -4
  153. package/listbox/package.json +0 -9
  154. package/listbox/public-api.d.ts +0 -9
  155. package/menu/context-menu.d.ts +0 -84
  156. package/menu/index.d.ts +0 -8
  157. package/menu/menu-aim.d.ts +0 -96
  158. package/menu/menu-bar.d.ts +0 -47
  159. package/menu/menu-base.d.ts +0 -64
  160. package/menu/menu-errors.d.ts +0 -17
  161. package/menu/menu-group.d.ts +0 -33
  162. package/menu/menu-interface.d.ts +0 -23
  163. package/menu/menu-item-checkbox.d.ts +0 -12
  164. package/menu/menu-item-radio.d.ts +0 -36
  165. package/menu/menu-item-selectable.d.ts +0 -31
  166. package/menu/menu-item-trigger.d.ts +0 -89
  167. package/menu/menu-item.d.ts +0 -105
  168. package/menu/menu-module.d.ts +0 -16
  169. package/menu/menu-stack.d.ts +0 -94
  170. package/menu/menu-trigger.d.ts +0 -48
  171. package/menu/menu.d.ts +0 -57
  172. package/menu/menu_public_index.d.ts +0 -4
  173. package/menu/package.json +0 -9
  174. package/menu/pointer-focus-tracker.d.ts +0 -44
  175. package/menu/public-api.d.ts +0 -20
  176. package/popover-edit/constants.d.ts +0 -19
  177. package/popover-edit/edit-event-dispatcher.d.ts +0 -99
  178. package/popover-edit/edit-ref.d.ts +0 -52
  179. package/popover-edit/edit-services.d.ts +0 -37
  180. package/popover-edit/focus-dispatcher.d.ts +0 -31
  181. package/popover-edit/focus-escape-notifier.d.ts +0 -40
  182. package/popover-edit/form-value-container.d.ts +0 -24
  183. package/popover-edit/lens-directives.d.ts +0 -82
  184. package/popover-edit/package.json +0 -9
  185. package/popover-edit/polyfill.d.ts +0 -9
  186. package/popover-edit/popover-edit-module.d.ts +0 -9
  187. package/popover-edit/popover-edit-position-strategy-factory.d.ts +0 -42
  188. package/popover-edit/popover-edit_public_index.d.ts +0 -4
  189. package/popover-edit/public-api.d.ts +0 -17
  190. package/popover-edit/table-directives.d.ts +0 -150
  191. package/public-api.d.ts +0 -8
  192. package/scrolling/auto-size-virtual-scroll.d.ts +0 -160
  193. package/scrolling/package.json +0 -9
  194. package/scrolling/public-api.d.ts +0 -9
  195. package/scrolling/scrolling-module.d.ts +0 -7
  196. package/scrolling/scrolling_public_index.d.ts +0 -4
  197. package/selection/package.json +0 -9
  198. package/selection/public-api.d.ts +0 -14
  199. package/selection/row-selection.d.ts +0 -27
  200. package/selection/select-all.d.ts +0 -52
  201. package/selection/selection-column.d.ts +0 -34
  202. package/selection/selection-module.d.ts +0 -13
  203. package/selection/selection-set.d.ts +0 -56
  204. package/selection/selection-toggle.d.ts +0 -46
  205. package/selection/selection.d.ts +0 -65
  206. package/selection/selection_public_index.d.ts +0 -4
  207. package/table-scroll-container/package.json +0 -9
  208. package/table-scroll-container/public-api.d.ts +0 -9
  209. package/table-scroll-container/table-scroll-container-module.d.ts +0 -7
  210. package/table-scroll-container/table-scroll-container.d.ts +0 -53
  211. package/table-scroll-container/table-scroll-container_public_index.d.ts +0 -4
  212. package/version.d.ts +0 -10
@@ -1,96 +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 { NgZone, OnDestroy, InjectionToken } from '@angular/core';
9
- import { PointerFocusTracker, FocusableElement } from './pointer-focus-tracker';
10
- import { Menu } from './menu-interface';
11
- import * as i0 from "@angular/core";
12
- /**
13
- * MenuAim is responsible for determining if a sibling menuitem's menu should be closed when a
14
- * Toggler item is hovered into. It is up to the hovered in item to call the MenuAim service in
15
- * order to determine if it may perform its close actions.
16
- */
17
- export interface MenuAim {
18
- /** Set the Menu and its PointerFocusTracker. */
19
- initialize(menu: Menu, pointerTracker: PointerFocusTracker<FocusableElement & Toggler>): void;
20
- /**
21
- * Calls the `doToggle` callback when it is deemed that the user is not moving towards
22
- * the submenu.
23
- * @param doToggle the function called when the user is not moving towards the submenu.
24
- */
25
- toggle(doToggle: () => void): void;
26
- }
27
- /** Injection token used for an implementation of MenuAim. */
28
- export declare const MENU_AIM: InjectionToken<MenuAim>;
29
- /**
30
- * An element which when hovered over may perform closing actions on the open submenu and
31
- * potentially open its own menu.
32
- */
33
- export interface Toggler {
34
- getMenu(): Menu | undefined;
35
- }
36
- /**
37
- * TargetMenuAim predicts if a user is moving into a submenu. It calculates the
38
- * trajectory of the user's mouse movement in the current menu to determine if the
39
- * mouse is moving towards an open submenu.
40
- *
41
- * The determination is made by calculating the slope of the users last NUM_POINTS moves where each
42
- * pair of points determines if the trajectory line points into the submenu. It uses consensus
43
- * approach by checking if at least NUM_POINTS / 2 pairs determine that the user is moving towards
44
- * to submenu.
45
- */
46
- export declare class TargetMenuAim implements MenuAim, OnDestroy {
47
- private readonly _ngZone;
48
- /** The last NUM_POINTS mouse move events. */
49
- private readonly _points;
50
- /** Reference to the root menu in which we are tracking mouse moves. */
51
- private _menu;
52
- /** Reference to the root menu's mouse manager. */
53
- private _pointerTracker;
54
- /** The id associated with the current timeout call waiting to resolve. */
55
- private _timeoutId;
56
- /** Emits when this service is destroyed. */
57
- private readonly _destroyed;
58
- constructor(_ngZone: NgZone);
59
- /** Set the Menu and its PointerFocusTracker. */
60
- initialize(menu: Menu, pointerTracker: PointerFocusTracker<FocusableElement & Toggler>): void;
61
- /**
62
- * Calls the `doToggle` callback when it is deemed that the user is not moving towards
63
- * the submenu.
64
- * @param doToggle the function called when the user is not moving towards the submenu.
65
- */
66
- toggle(doToggle: () => void): void;
67
- /**
68
- * Start the delayed toggle handler if one isn't running already.
69
- *
70
- * The delayed toggle handler executes the `doToggle` callback after some period of time iff the
71
- * users mouse is on an item in the current menu.
72
- */
73
- private _startTimeout;
74
- /** Whether the user is heading towards the open submenu. */
75
- private _isMovingToSubmenu;
76
- /** Get the bounding DOMRect for the open submenu. */
77
- private _getSubmenuBounds;
78
- /**
79
- * Check if a reference to the PointerFocusTracker and menu element is provided.
80
- * @throws an error if neither reference is provided.
81
- */
82
- private _checkConfigured;
83
- /** Subscribe to the root menus mouse move events and update the tracked mouse points. */
84
- private _subscribeToMouseMoves;
85
- ngOnDestroy(): void;
86
- static ɵfac: i0.ɵɵFactoryDeclaration<TargetMenuAim, never>;
87
- static ɵprov: i0.ɵɵInjectableDeclaration<TargetMenuAim>;
88
- }
89
- /**
90
- * CdkTargetMenuAim is a provider for the TargetMenuAim service. It should be added to an
91
- * element with either the `cdkMenu` or `cdkMenuBar` directive and child menu items.
92
- */
93
- export declare class CdkTargetMenuAim {
94
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkTargetMenuAim, never>;
95
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkTargetMenuAim, "[cdkTargetMenuAim]", ["cdkTargetMenuAim"], {}, {}, never>;
96
- }
@@ -1,47 +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, ElementRef, NgZone, OnDestroy } from '@angular/core';
9
- import { Directionality } from '@angular/cdk/bidi';
10
- import { MenuStack } from './menu-stack';
11
- import { MenuAim } from './menu-aim';
12
- import { CdkMenuBase } from './menu-base';
13
- import * as i0 from "@angular/core";
14
- /**
15
- * Directive applied to an element which configures it as a MenuBar by setting the appropriate
16
- * role, aria attributes, and accessible keyboard and mouse handling logic. The component that
17
- * this directive is applied to should contain components marked with CdkMenuItem.
18
- *
19
- */
20
- export declare class CdkMenuBar extends CdkMenuBase implements AfterContentInit, OnDestroy {
21
- private readonly _ngZone;
22
- private readonly _menuAim?;
23
- readonly orientation: 'horizontal' | 'vertical';
24
- menuStack: MenuStack;
25
- constructor(_ngZone: NgZone, elementRef: ElementRef<HTMLElement>, menuStack: MenuStack, _menuAim?: MenuAim | undefined, dir?: Directionality);
26
- ngAfterContentInit(): void;
27
- ngOnDestroy(): void;
28
- /**
29
- * Handle keyboard events, specifically changing the focused element and/or toggling the active
30
- * items menu.
31
- * @param event the KeyboardEvent to handle.
32
- */
33
- _handleKeyEvent(event: KeyboardEvent): void;
34
- /**
35
- * Set the PointerFocusTracker and ensure that when mouse focus changes the key manager is updated
36
- * with the latest menu item under mouse focus.
37
- */
38
- private _subscribeToMouseManager;
39
- /**
40
- * Set focus to either the current, previous or next item based on the FocusNext event, then
41
- * open the previous or next item.
42
- */
43
- private _toggleOpenMenu;
44
- private _subscribeToMenuStackEmptied;
45
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuBar, [null, null, null, { optional: true; self: true; }, { optional: true; }]>;
46
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuBar, "[cdkMenuBar]", ["cdkMenuBar"], {}, {}, never>;
47
- }
@@ -1,64 +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 { 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
- }
@@ -1,17 +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 an instance of the PointerFocusTracker is not provided.
10
- * @docs-private
11
- */
12
- export declare function throwMissingPointerFocusTracker(): void;
13
- /**
14
- * Throws an exception when a reference to the parent menu is not provided.
15
- * @docs-private
16
- */
17
- 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 { AfterContentInit, EventEmitter, 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
- ngOnDestroy(): void;
24
- /**
25
- * Register the child selectable elements with the change emitter and ensure any new child
26
- * elements do so as well.
27
- */
28
- private _registerMenuSelectionListeners;
29
- /** Register each selectable to emit on the change Emitter when clicked */
30
- private _registerClickListener;
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
- readonly 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,36 +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 { ElementRef, NgZone, OnDestroy } 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 { MenuStack } from './menu-stack';
16
- import * as i0 from "@angular/core";
17
- /**
18
- * A directive providing behavior for the "menuitemradio" ARIA role, which behaves similarly to
19
- * a conventional radio-button. Any sibling `CdkMenuItemRadio` instances within the same `CdkMenu`
20
- * or `CdkMenuGroup` comprise a radio group with unique selection enforced.
21
- */
22
- export declare class CdkMenuItemRadio extends CdkMenuItemSelectable implements OnDestroy {
23
- private readonly _selectionDispatcher;
24
- /** Function to unregister the selection dispatcher */
25
- private _removeDispatcherListener;
26
- constructor(_selectionDispatcher: UniqueSelectionDispatcher, element: ElementRef<HTMLElement>, ngZone: NgZone, menuStack: MenuStack, parentMenu?: Menu, menuAim?: MenuAim, dir?: Directionality,
27
- /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
28
- menuTrigger?: CdkMenuItemTrigger);
29
- /** Configure the unique selection dispatcher listener in order to toggle the checked state */
30
- private _registerDispatcherListener;
31
- /** Toggles the checked state of the radio-button. */
32
- trigger(): void;
33
- ngOnDestroy(): void;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemRadio, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
35
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemRadio, "[cdkMenuItemRadio]", ["cdkMenuItemRadio"], {}, {}, never>;
36
- }
@@ -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,89 +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, Injector, NgZone, OnDestroy, ViewContainerRef } from '@angular/core';
9
- import { Directionality } from '@angular/cdk/bidi';
10
- import { Overlay } from '@angular/cdk/overlay';
11
- import { Menu } from './menu-interface';
12
- import { MenuStack } from './menu-stack';
13
- import { MenuAim } from './menu-aim';
14
- import { MenuTrigger } from './menu-trigger';
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 extends MenuTrigger 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
- constructor(injector: Injector, _elementRef: ElementRef<HTMLElement>, _viewContainerRef: ViewContainerRef, _overlay: Overlay, _ngZone: NgZone, menuStack: MenuStack, _parentMenu?: Menu | undefined, _menuAim?: MenuAim | undefined, _directionality?: Directionality | undefined);
38
- /** Open/close the attached menu if the trigger has been configured with one */
39
- toggle(): void;
40
- /** Open the attached menu. */
41
- open(): void;
42
- /** Close the opened menu. */
43
- close(): void;
44
- /**
45
- * Get a reference to the rendered Menu if the Menu is open and it is visible in the DOM.
46
- * @return the menu if it is open, otherwise undefined.
47
- */
48
- getMenu(): Menu | undefined;
49
- /**
50
- * Subscribe to the mouseenter events and close any sibling menu items if this element is moused
51
- * into.
52
- */
53
- private _subscribeToMouseEnter;
54
- /**
55
- * Handles keyboard events for the menu item, specifically opening/closing the attached menu and
56
- * focusing the appropriate submenu item.
57
- * @param event the keyboard event to handle
58
- */
59
- _toggleOnKeydown(event: KeyboardEvent): void;
60
- /** Close out any sibling menu trigger menus. */
61
- private _closeSiblingTriggers;
62
- /** Get the configuration object used to create the overlay */
63
- private _getOverlayConfig;
64
- /** Build the position strategy for the overlay which specifies where to place the menu */
65
- private _getOverlayPositionStrategy;
66
- /** Determine and return where to position the opened menu relative to the menu item */
67
- private _getOverlayPositions;
68
- /**
69
- * Get the portal to be attached to the overlay which contains the menu. Allows for the menu
70
- * content to change dynamically and be reflected in the application.
71
- */
72
- private _getPortal;
73
- /**
74
- * @return true if if the enclosing parent menu is configured in a vertical orientation.
75
- */
76
- private _isParentVertical;
77
- /**
78
- * Subscribe to the MenuStack close events if this is a standalone trigger and close out the menu
79
- * this triggers when requested.
80
- */
81
- private _registerCloseHandler;
82
- /**
83
- * Subscribe to the overlays outside pointer events stream and handle closing out the stack if a
84
- * click occurs outside the menus.
85
- */
86
- private _subscribeToOutsideClicks;
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>;
89
- }
@@ -1,105 +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 { MenuStack } from './menu-stack';
15
- import { FocusableElement } from './pointer-focus-tracker';
16
- import { MenuAim, Toggler } from './menu-aim';
17
- import * as i0 from "@angular/core";
18
- /**
19
- * Directive which provides the ability for an element to be focused and navigated to using the
20
- * keyboard when residing in a CdkMenu, CdkMenuBar, or CdkMenuGroup. It performs user defined
21
- * behavior when clicked.
22
- */
23
- export declare class CdkMenuItem implements FocusableOption, FocusableElement, Toggler, OnDestroy {
24
- readonly _elementRef: ElementRef<HTMLElement>;
25
- private readonly _ngZone;
26
- private readonly _menuStack;
27
- private readonly _parentMenu?;
28
- private readonly _menuAim?;
29
- private readonly _dir?;
30
- /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
31
- private readonly _menuTrigger?;
32
- /** Whether the CdkMenuItem is disabled - defaults to false */
33
- get disabled(): boolean;
34
- set disabled(value: BooleanInput);
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;
41
- /**
42
- * If this MenuItem is a regular MenuItem, outputs when it is triggered by a keyboard or mouse
43
- * event.
44
- */
45
- readonly triggered: EventEmitter<void>;
46
- /**
47
- * The tabindex for this menu item managed internally and used for implementing roving a
48
- * tab index.
49
- */
50
- _tabindex: 0 | -1;
51
- /** Emits when the menu item is destroyed. */
52
- private readonly _destroyed;
53
- constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _menuStack: MenuStack, _parentMenu?: Menu | undefined, _menuAim?: MenuAim | undefined, _dir?: Directionality | undefined,
54
- /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
55
- _menuTrigger?: CdkMenuItemTrigger | undefined);
56
- /** Place focus on the element. */
57
- focus(): void;
58
- /** Reset the _tabindex to -1. */
59
- _resetTabIndex(): void;
60
- /**
61
- * Set the tab index to 0 if not disabled and it's a focus event, or a mouse enter if this element
62
- * is not in a menu bar.
63
- */
64
- _setTabIndex(event?: MouseEvent): void;
65
- /** Whether this menu item is standalone or within a menu or menu bar. */
66
- _isStandaloneItem(): boolean;
67
- /**
68
- * If the menu item is not disabled and the element does not have a menu trigger attached, emit
69
- * on the cdkMenuItemTriggered emitter and close all open menus.
70
- */
71
- trigger(): void;
72
- /** Whether the menu item opens a menu. */
73
- hasMenu(): boolean;
74
- /** Return true if this MenuItem has an attached menu and it is open. */
75
- isMenuOpen(): boolean;
76
- /**
77
- * Get a reference to the rendered Menu if the Menu is open and it is visible in the DOM.
78
- * @return the menu if it is open, otherwise undefined.
79
- */
80
- getMenu(): Menu | undefined;
81
- /** Get the MenuItemTrigger associated with this element. */
82
- getMenuTrigger(): CdkMenuItemTrigger | undefined;
83
- /** Get the label for this element which is required by the FocusableOption interface. */
84
- getLabel(): string;
85
- /**
86
- * Handles keyboard events for the menu item, specifically either triggering the user defined
87
- * callback or opening/closing the current menu based on whether the left or right arrow key was
88
- * pressed.
89
- * @param event the keyboard event to handle
90
- */
91
- _onKeydown(event: KeyboardEvent): void;
92
- /**
93
- * Subscribe to the mouseenter events and close any sibling menu items if this element is moused
94
- * into.
95
- */
96
- private _setupMouseEnter;
97
- /**
98
- * Return true if the enclosing parent menu is configured in a horizontal orientation, false
99
- * otherwise or if no parent.
100
- */
101
- private _isParentVertical;
102
- ngOnDestroy(): void;
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>;
105
- }
@@ -1,16 +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-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";
12
- export declare class CdkMenuModule {
13
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuModule, never>;
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]>;
15
- static ɵinj: i0.ɵɵInjectorDeclaration<CdkMenuModule>;
16
- }