@angular/cdk-experimental 14.0.0-next.7 → 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 (213) 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 +6 -7
  16. package/esm2020/combobox/combobox-popup.mjs +12 -23
  17. package/esm2020/combobox/combobox.mjs +50 -34
  18. package/esm2020/combobox/public-api.mjs +1 -2
  19. package/esm2020/listbox/listbox-module.mjs +5 -5
  20. package/esm2020/listbox/listbox.mjs +26 -44
  21. package/esm2020/popover-edit/edit-event-dispatcher.mjs +7 -7
  22. package/esm2020/popover-edit/edit-ref.mjs +4 -4
  23. package/esm2020/popover-edit/edit-services.mjs +4 -4
  24. package/esm2020/popover-edit/focus-dispatcher.mjs +4 -4
  25. package/esm2020/popover-edit/focus-escape-notifier.mjs +6 -6
  26. package/esm2020/popover-edit/lens-directives.mjs +10 -10
  27. package/esm2020/popover-edit/popover-edit-module.mjs +6 -6
  28. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +7 -7
  29. package/esm2020/popover-edit/table-directives.mjs +19 -19
  30. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +4 -4
  31. package/esm2020/scrolling/scrolling-module.mjs +5 -5
  32. package/esm2020/selection/row-selection.mjs +4 -4
  33. package/esm2020/selection/select-all.mjs +4 -4
  34. package/esm2020/selection/selection-column.mjs +10 -10
  35. package/esm2020/selection/selection-module.mjs +5 -5
  36. package/esm2020/selection/selection-toggle.mjs +4 -4
  37. package/esm2020/selection/selection.mjs +4 -4
  38. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +5 -5
  39. package/esm2020/table-scroll-container/table-scroll-container.mjs +4 -4
  40. package/esm2020/version.mjs +1 -1
  41. package/fesm2015/cdk-experimental.mjs +1 -1
  42. package/fesm2015/cdk-experimental.mjs.map +1 -1
  43. package/fesm2015/column-resize.mjs +50 -50
  44. package/fesm2015/column-resize.mjs.map +1 -1
  45. package/fesm2015/combobox.mjs +63 -106
  46. package/fesm2015/combobox.mjs.map +1 -1
  47. package/fesm2015/listbox.mjs +31 -47
  48. package/fesm2015/listbox.mjs.map +1 -1
  49. package/fesm2015/popover-edit.mjs +58 -58
  50. package/fesm2015/popover-edit.mjs.map +1 -1
  51. package/fesm2015/scrolling.mjs +7 -7
  52. package/fesm2015/scrolling.mjs.map +1 -1
  53. package/fesm2015/selection.mjs +23 -23
  54. package/fesm2015/selection.mjs.map +1 -1
  55. package/fesm2015/table-scroll-container.mjs +7 -7
  56. package/fesm2015/table-scroll-container.mjs.map +1 -1
  57. package/fesm2020/cdk-experimental.mjs +1 -1
  58. package/fesm2020/cdk-experimental.mjs.map +1 -1
  59. package/fesm2020/column-resize.mjs +50 -50
  60. package/fesm2020/column-resize.mjs.map +1 -1
  61. package/fesm2020/combobox.mjs +62 -103
  62. package/fesm2020/combobox.mjs.map +1 -1
  63. package/fesm2020/listbox.mjs +29 -46
  64. package/fesm2020/listbox.mjs.map +1 -1
  65. package/fesm2020/popover-edit.mjs +58 -58
  66. package/fesm2020/popover-edit.mjs.map +1 -1
  67. package/fesm2020/scrolling.mjs +7 -7
  68. package/fesm2020/scrolling.mjs.map +1 -1
  69. package/fesm2020/selection.mjs +23 -23
  70. package/fesm2020/selection.mjs.map +1 -1
  71. package/fesm2020/table-scroll-container.mjs +7 -7
  72. package/fesm2020/table-scroll-container.mjs.map +1 -1
  73. package/index.d.ts +6 -8
  74. package/listbox/index.d.ts +197 -8
  75. package/package.json +9 -25
  76. package/popover-edit/index.d.ts +532 -5
  77. package/scrolling/index.d.ts +173 -6
  78. package/selection/index.d.ts +273 -5
  79. package/table-scroll-container/index.d.ts +61 -5
  80. package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -28
  81. package/column-resize/column-resize-directives/column-resize.d.ts +0 -28
  82. package/column-resize/column-resize-directives/constants.d.ts +0 -10
  83. package/column-resize/column-resize-directives/default-enabled-column-resize-flex.d.ts +0 -28
  84. package/column-resize/column-resize-directives/default-enabled-column-resize.d.ts +0 -28
  85. package/column-resize/column-resize-module.d.ts +0 -23
  86. package/column-resize/column-resize-notifier.d.ts +0 -49
  87. package/column-resize/column-resize.d.ts +0 -39
  88. package/column-resize/column-resize_public_index.d.ts +0 -4
  89. package/column-resize/column-size-store.d.ts +0 -12
  90. package/column-resize/event-dispatcher.d.ts +0 -44
  91. package/column-resize/overlay-handle.d.ts +0 -43
  92. package/column-resize/package.json +0 -9
  93. package/column-resize/public-api.d.ts +0 -20
  94. package/column-resize/resizable.d.ts +0 -69
  95. package/column-resize/resize-ref.d.ts +0 -17
  96. package/column-resize/resize-strategy.d.ts +0 -83
  97. package/column-resize/selectors.d.ts +0 -10
  98. package/combobox/combobox-module.d.ts +0 -10
  99. package/combobox/combobox-panel.d.ts +0 -27
  100. package/combobox/combobox-popup.d.ts +0 -29
  101. package/combobox/combobox.d.ts +0 -71
  102. package/combobox/combobox_public_index.d.ts +0 -4
  103. package/combobox/package.json +0 -9
  104. package/combobox/public-api.d.ts +0 -11
  105. package/dialog/dialog-config.d.ts +0 -77
  106. package/dialog/dialog-container.d.ts +0 -99
  107. package/dialog/dialog-injectors.d.ts +0 -30
  108. package/dialog/dialog-module.d.ts +0 -10
  109. package/dialog/dialog-ref.d.ts +0 -57
  110. package/dialog/dialog.d.ts +0 -100
  111. package/dialog/dialog_public_index.d.ts +0 -4
  112. package/dialog/index.d.ts +0 -8
  113. package/dialog/package.json +0 -9
  114. package/dialog/public-api.d.ts +0 -13
  115. package/esm2020/combobox/combobox-panel.mjs +0 -48
  116. package/esm2020/dialog/dialog-config.mjs +0 -43
  117. package/esm2020/dialog/dialog-container.mjs +0 -295
  118. package/esm2020/dialog/dialog-injectors.mjs +0 -30
  119. package/esm2020/dialog/dialog-module.mjs +0 -56
  120. package/esm2020/dialog/dialog-ref.mjs +0 -116
  121. package/esm2020/dialog/dialog.mjs +0 -252
  122. package/esm2020/dialog/dialog_public_index.mjs +0 -5
  123. package/esm2020/dialog/index.mjs +0 -9
  124. package/esm2020/dialog/public-api.mjs +0 -14
  125. package/esm2020/menu/context-menu.mjs +0 -274
  126. package/esm2020/menu/index.mjs +0 -9
  127. package/esm2020/menu/menu-aim.mjs +0 -199
  128. package/esm2020/menu/menu-bar.mjs +0 -255
  129. package/esm2020/menu/menu-errors.mjs +0 -22
  130. package/esm2020/menu/menu-group.mjs +0 -68
  131. package/esm2020/menu/menu-interface.mjs +0 -11
  132. package/esm2020/menu/menu-item-checkbox.mjs +0 -48
  133. package/esm2020/menu/menu-item-radio.mjs +0 -97
  134. package/esm2020/menu/menu-item-selectable.mjs +0 -57
  135. package/esm2020/menu/menu-item-trigger.mjs +0 -343
  136. package/esm2020/menu/menu-item.mjs +0 -245
  137. package/esm2020/menu/menu-module.mjs +0 -60
  138. package/esm2020/menu/menu-stack.mjs +0 -110
  139. package/esm2020/menu/menu-trigger.mjs +0 -43
  140. package/esm2020/menu/menu.mjs +0 -288
  141. package/esm2020/menu/menu_public_index.mjs +0 -5
  142. package/esm2020/menu/pointer-focus-tracker.mjs +0 -49
  143. package/esm2020/menu/public-api.mjs +0 -21
  144. package/fesm2015/dialog.mjs +0 -797
  145. package/fesm2015/dialog.mjs.map +0 -1
  146. package/fesm2015/menu.mjs +0 -2106
  147. package/fesm2015/menu.mjs.map +0 -1
  148. package/fesm2020/dialog.mjs +0 -792
  149. package/fesm2020/dialog.mjs.map +0 -1
  150. package/fesm2020/menu.mjs +0 -2076
  151. package/fesm2020/menu.mjs.map +0 -1
  152. package/listbox/listbox-module.d.ts +0 -7
  153. package/listbox/listbox.d.ts +0 -169
  154. package/listbox/listbox_public_index.d.ts +0 -4
  155. package/listbox/package.json +0 -9
  156. package/listbox/public-api.d.ts +0 -9
  157. package/menu/context-menu.d.ts +0 -117
  158. package/menu/index.d.ts +0 -8
  159. package/menu/menu-aim.d.ts +0 -96
  160. package/menu/menu-bar.d.ts +0 -88
  161. package/menu/menu-errors.d.ts +0 -17
  162. package/menu/menu-group.d.ts +0 -33
  163. package/menu/menu-interface.d.ts +0 -23
  164. package/menu/menu-item-checkbox.d.ts +0 -12
  165. package/menu/menu-item-radio.d.ts +0 -36
  166. package/menu/menu-item-selectable.d.ts +0 -31
  167. package/menu/menu-item-trigger.d.ts +0 -110
  168. package/menu/menu-item.d.ts +0 -100
  169. package/menu/menu-module.d.ts +0 -16
  170. package/menu/menu-stack.d.ts +0 -79
  171. package/menu/menu-trigger.d.ts +0 -24
  172. package/menu/menu.d.ts +0 -97
  173. package/menu/menu_public_index.d.ts +0 -4
  174. package/menu/package.json +0 -9
  175. package/menu/pointer-focus-tracker.d.ts +0 -44
  176. package/menu/public-api.d.ts +0 -20
  177. package/popover-edit/constants.d.ts +0 -19
  178. package/popover-edit/edit-event-dispatcher.d.ts +0 -99
  179. package/popover-edit/edit-ref.d.ts +0 -52
  180. package/popover-edit/edit-services.d.ts +0 -37
  181. package/popover-edit/focus-dispatcher.d.ts +0 -31
  182. package/popover-edit/focus-escape-notifier.d.ts +0 -40
  183. package/popover-edit/form-value-container.d.ts +0 -24
  184. package/popover-edit/lens-directives.d.ts +0 -82
  185. package/popover-edit/package.json +0 -9
  186. package/popover-edit/polyfill.d.ts +0 -9
  187. package/popover-edit/popover-edit-module.d.ts +0 -9
  188. package/popover-edit/popover-edit-position-strategy-factory.d.ts +0 -42
  189. package/popover-edit/popover-edit_public_index.d.ts +0 -4
  190. package/popover-edit/public-api.d.ts +0 -17
  191. package/popover-edit/table-directives.d.ts +0 -150
  192. package/public-api.d.ts +0 -8
  193. package/scrolling/auto-size-virtual-scroll.d.ts +0 -160
  194. package/scrolling/package.json +0 -9
  195. package/scrolling/public-api.d.ts +0 -9
  196. package/scrolling/scrolling-module.d.ts +0 -7
  197. package/scrolling/scrolling_public_index.d.ts +0 -4
  198. package/selection/package.json +0 -9
  199. package/selection/public-api.d.ts +0 -14
  200. package/selection/row-selection.d.ts +0 -27
  201. package/selection/select-all.d.ts +0 -52
  202. package/selection/selection-column.d.ts +0 -34
  203. package/selection/selection-module.d.ts +0 -13
  204. package/selection/selection-set.d.ts +0 -56
  205. package/selection/selection-toggle.d.ts +0 -46
  206. package/selection/selection.d.ts +0 -65
  207. package/selection/selection_public_index.d.ts +0 -4
  208. package/table-scroll-container/package.json +0 -9
  209. package/table-scroll-container/public-api.d.ts +0 -9
  210. package/table-scroll-container/table-scroll-container-module.d.ts +0 -7
  211. package/table-scroll-container/table-scroll-container.d.ts +0 -53
  212. package/table-scroll-container/table-scroll-container_public_index.d.ts +0 -4
  213. package/version.d.ts +0 -10
@@ -1,117 +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, InjectionToken, Injector, OnDestroy, ViewContainerRef } from '@angular/core';
9
- import { Directionality } from '@angular/cdk/bidi';
10
- import { Overlay } from '@angular/cdk/overlay';
11
- import { BooleanInput } from '@angular/cdk/coercion';
12
- import { MenuStack } from './menu-stack';
13
- import { MenuTrigger } from './menu-trigger';
14
- import * as i0 from "@angular/core";
15
- /** Tracks the last open context menu trigger across the entire application. */
16
- export declare class ContextMenuTracker {
17
- /** The last open context menu trigger. */
18
- private static _openContextMenuTrigger?;
19
- /**
20
- * Close the previous open context menu and set the given one as being open.
21
- * @param trigger the trigger for the currently open Context Menu.
22
- */
23
- update(trigger: CdkContextMenuTrigger): void;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuTracker, never>;
25
- static ɵprov: i0.ɵɵInjectableDeclaration<ContextMenuTracker>;
26
- }
27
- /** Configuration options passed to the context menu. */
28
- export declare type ContextMenuOptions = {
29
- /** The opened menus X coordinate offset from the triggering position. */
30
- offsetX: number;
31
- /** The opened menus Y coordinate offset from the triggering position. */
32
- offsetY: number;
33
- };
34
- /** Injection token for the ContextMenu options object. */
35
- export declare const CDK_CONTEXT_MENU_DEFAULT_OPTIONS: InjectionToken<ContextMenuOptions>;
36
- /** The coordinates of where the context menu should open. */
37
- export declare type ContextMenuCoordinates = {
38
- x: number;
39
- y: number;
40
- };
41
- /**
42
- * A directive which when placed on some element opens a the Menu it is bound to when a user
43
- * right-clicks within that element. It is aware of nested Context Menus and the lowest level
44
- * non-disabled context menu will trigger.
45
- */
46
- export declare class CdkContextMenuTrigger extends MenuTrigger implements OnDestroy {
47
- protected readonly _viewContainerRef: ViewContainerRef;
48
- private readonly _overlay;
49
- private readonly _contextMenuTracker;
50
- private readonly _options;
51
- private readonly _directionality?;
52
- /** Template reference variable to the menu to open on right click. */
53
- private _menuTemplateRef;
54
- /** Emits when the attached menu is requested to open. */
55
- readonly opened: EventEmitter<void>;
56
- /** Emits when the attached menu is requested to close. */
57
- readonly closed: EventEmitter<void>;
58
- /** Whether the context menu should be disabled. */
59
- get disabled(): boolean;
60
- set disabled(value: BooleanInput);
61
- private _disabled;
62
- /** A reference to the overlay which manages the triggered menu. */
63
- private _overlayRef;
64
- /** The content of the menu panel opened by this trigger. */
65
- private _menuPortal;
66
- /** Emits when the element is destroyed. */
67
- private readonly _destroyed;
68
- /** Emits when the outside pointer events listener on the overlay should be stopped. */
69
- private readonly _stopOutsideClicksListener;
70
- constructor(injector: Injector, _viewContainerRef: ViewContainerRef, _overlay: Overlay, _contextMenuTracker: ContextMenuTracker, menuStack: MenuStack, _options: ContextMenuOptions, _directionality?: Directionality | undefined);
71
- /**
72
- * Open the attached menu at the specified location.
73
- * @param coordinates where to open the context menu
74
- */
75
- open(coordinates: ContextMenuCoordinates): void;
76
- private _open;
77
- /** Close the opened menu. */
78
- close(): void;
79
- /**
80
- * Open the context menu and close any previously open menus.
81
- * @param event the mouse event which opens the context menu.
82
- */
83
- _openOnContextMenu(event: MouseEvent): void;
84
- /** Whether the attached menu is open. */
85
- isOpen(): boolean;
86
- /**
87
- * Get the configuration object used to create the overlay.
88
- * @param coordinates the location to place the opened menu
89
- */
90
- private _getOverlayConfig;
91
- /**
92
- * Build the position strategy for the overlay which specifies where to place the menu.
93
- * @param coordinates the location to place the opened menu
94
- */
95
- private _getOverlayPositionStrategy;
96
- /**
97
- * Determine and return where to position the opened menu relative to the mouse location.
98
- */
99
- private _getOverlayPositions;
100
- /**
101
- * Get the portal to be attached to the overlay which contains the menu. Allows for the menu
102
- * content to change dynamically and be reflected in the application.
103
- */
104
- private _getMenuContent;
105
- /** Subscribe to the menu stack close events and close this menu when requested. */
106
- private _setMenuStackListener;
107
- /**
108
- * Subscribe to the overlays outside pointer events stream and handle closing out the stack if a
109
- * click occurs outside the menus.
110
- */
111
- private _subscribeToOutsideClicks;
112
- ngOnDestroy(): void;
113
- /** Destroy and unset the overlay reference it if exists. */
114
- private _destroyOverlay;
115
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkContextMenuTrigger, [null, null, null, null, null, null, { optional: true; }]>;
116
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkContextMenuTrigger, "[cdkContextMenuTriggerFor]", ["cdkContextMenuTriggerFor"], { "_menuTemplateRef": "cdkContextMenuTriggerFor"; "disabled": "cdkContextMenuDisabled"; }, { "opened": "cdkContextMenuOpened"; "closed": "cdkContextMenuClosed"; }, never>;
117
- }
package/menu/index.d.ts DELETED
@@ -1,8 +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
- export * from './public-api';
@@ -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,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
- private readonly _ngZone;
24
- readonly _elementRef: ElementRef<HTMLElement>;
25
- readonly _menuStack: MenuStack;
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(_ngZone: NgZone, _elementRef: ElementRef<HTMLElement>, _menuStack: MenuStack, _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,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 { 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,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, { optional: true; }, { 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,110 +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, Injector, NgZone, OnDestroy, TemplateRef, 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
- /** Template reference variable to the menu this trigger opens */
38
- _menuTemplateRef?: TemplateRef<unknown>;
39
- /** Emits when the attached menu is requested to open */
40
- readonly opened: EventEmitter<void>;
41
- /** Emits when the attached menu is requested to close */
42
- readonly closed: EventEmitter<void>;
43
- /** A reference to the overlay which manages the triggered menu */
44
- private _overlayRef;
45
- /** The content of the menu panel opened by this trigger. */
46
- private _menuPortal;
47
- /** Emits when this trigger is destroyed. */
48
- private readonly _destroyed;
49
- /** Emits when the outside pointer events listener on the overlay should be stopped. */
50
- private readonly _stopOutsideClicksListener;
51
- constructor(injector: Injector, _elementRef: ElementRef<HTMLElement>, _viewContainerRef: ViewContainerRef, _overlay: Overlay, _ngZone: NgZone, menuStack: MenuStack, _parentMenu?: Menu | undefined, _menuAim?: MenuAim | undefined, _directionality?: Directionality | undefined);
52
- /** Open/close the attached menu if the trigger has been configured with one */
53
- toggle(): void;
54
- /** Open the attached menu. */
55
- openMenu(): void;
56
- /** Close the opened menu. */
57
- closeMenu(): void;
58
- /** Return true if the trigger has an attached menu */
59
- hasMenu(): boolean;
60
- /** Whether the menu this button is a trigger for is open */
61
- isMenuOpen(): boolean;
62
- /**
63
- * Get a reference to the rendered Menu if the Menu is open and it is visible in the DOM.
64
- * @return the menu if it is open, otherwise undefined.
65
- */
66
- getMenu(): Menu | undefined;
67
- /**
68
- * Subscribe to the mouseenter events and close any sibling menu items if this element is moused
69
- * into.
70
- */
71
- private _subscribeToMouseEnter;
72
- /**
73
- * Handles keyboard events for the menu item, specifically opening/closing the attached menu and
74
- * focusing the appropriate submenu item.
75
- * @param event the keyboard event to handle
76
- */
77
- _toggleOnKeydown(event: KeyboardEvent): void;
78
- /** Close out any sibling menu trigger menus. */
79
- private _closeSiblingTriggers;
80
- /** Get the configuration object used to create the overlay */
81
- private _getOverlayConfig;
82
- /** Build the position strategy for the overlay which specifies where to place the menu */
83
- private _getOverlayPositionStrategy;
84
- /** Determine and return where to position the opened menu relative to the menu item */
85
- private _getOverlayPositions;
86
- /**
87
- * Get the portal to be attached to the overlay which contains the menu. Allows for the menu
88
- * content to change dynamically and be reflected in the application.
89
- */
90
- private _getPortal;
91
- /**
92
- * @return true if if the enclosing parent menu is configured in a vertical orientation.
93
- */
94
- private _isParentVertical;
95
- /**
96
- * Subscribe to the MenuStack close events if this is a standalone trigger and close out the menu
97
- * this triggers when requested.
98
- */
99
- private _registerCloseHandler;
100
- ngOnDestroy(): void;
101
- /**
102
- * Subscribe to the overlays outside pointer events stream and handle closing out the stack if a
103
- * click occurs outside the menus.
104
- */
105
- private _subscribeToOutsideClicks;
106
- /** Destroy and unset the overlay reference it if exists */
107
- private _destroyOverlay;
108
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemTrigger, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
109
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemTrigger, "[cdkMenuTriggerFor]", ["cdkMenuTriggerFor"], { "_menuTemplateRef": "cdkMenuTriggerFor"; }, { "opened": "cdkMenuOpened"; "closed": "cdkMenuClosed"; }, never>;
110
- }