@angular/cdk-experimental 14.0.0-next.11 → 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 (145) 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-popup.d.ts +1 -1
  9. package/combobox/combobox.d.ts +1 -1
  10. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
  11. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +3 -3
  12. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +3 -3
  13. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +3 -3
  14. package/esm2020/column-resize/column-resize-module.mjs +8 -8
  15. package/esm2020/column-resize/column-resize-notifier.mjs +6 -6
  16. package/esm2020/column-resize/column-resize.mjs +3 -3
  17. package/esm2020/column-resize/column-size-store.mjs +3 -3
  18. package/esm2020/column-resize/event-dispatcher.mjs +3 -3
  19. package/esm2020/column-resize/overlay-handle.mjs +3 -3
  20. package/esm2020/column-resize/resizable.mjs +3 -3
  21. package/esm2020/column-resize/resize-strategy.mjs +9 -9
  22. package/esm2020/combobox/combobox-module.mjs +4 -4
  23. package/esm2020/combobox/combobox-popup.mjs +3 -3
  24. package/esm2020/combobox/combobox.mjs +3 -3
  25. package/esm2020/listbox/listbox-module.mjs +4 -4
  26. package/esm2020/listbox/listbox.mjs +6 -6
  27. package/esm2020/popover-edit/edit-event-dispatcher.mjs +3 -3
  28. package/esm2020/popover-edit/edit-ref.mjs +3 -3
  29. package/esm2020/popover-edit/edit-services.mjs +3 -3
  30. package/esm2020/popover-edit/focus-dispatcher.mjs +3 -3
  31. package/esm2020/popover-edit/focus-escape-notifier.mjs +3 -3
  32. package/esm2020/popover-edit/lens-directives.mjs +9 -9
  33. package/esm2020/popover-edit/popover-edit-module.mjs +4 -4
  34. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +6 -6
  35. package/esm2020/popover-edit/table-directives.mjs +15 -15
  36. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +3 -3
  37. package/esm2020/scrolling/scrolling-module.mjs +4 -4
  38. package/esm2020/selection/row-selection.mjs +3 -3
  39. package/esm2020/selection/select-all.mjs +3 -3
  40. package/esm2020/selection/selection-column.mjs +9 -9
  41. package/esm2020/selection/selection-module.mjs +4 -4
  42. package/esm2020/selection/selection-toggle.mjs +3 -3
  43. package/esm2020/selection/selection.mjs +3 -3
  44. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +4 -4
  45. package/esm2020/table-scroll-container/table-scroll-container.mjs +3 -3
  46. package/esm2020/version.mjs +1 -1
  47. package/fesm2015/cdk-experimental.mjs +1 -1
  48. package/fesm2015/cdk-experimental.mjs.map +1 -1
  49. package/fesm2015/column-resize.mjs +50 -50
  50. package/fesm2015/combobox.mjs +10 -10
  51. package/fesm2015/listbox.mjs +10 -10
  52. package/fesm2015/popover-edit.mjs +49 -49
  53. package/fesm2015/scrolling.mjs +7 -7
  54. package/fesm2015/selection.mjs +23 -23
  55. package/fesm2015/selection.mjs.map +1 -1
  56. package/fesm2015/table-scroll-container.mjs +7 -7
  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/combobox.mjs +10 -10
  61. package/fesm2020/listbox.mjs +10 -10
  62. package/fesm2020/popover-edit.mjs +49 -49
  63. package/fesm2020/scrolling.mjs +7 -7
  64. package/fesm2020/selection.mjs +23 -23
  65. package/fesm2020/selection.mjs.map +1 -1
  66. package/fesm2020/table-scroll-container.mjs +7 -7
  67. package/listbox/listbox.d.ts +2 -2
  68. package/package.json +2 -18
  69. package/popover-edit/lens-directives.d.ts +3 -3
  70. package/popover-edit/table-directives.d.ts +5 -5
  71. package/scrolling/auto-size-virtual-scroll.d.ts +1 -1
  72. package/selection/row-selection.d.ts +1 -1
  73. package/selection/select-all.d.ts +1 -1
  74. package/selection/selection-column.d.ts +1 -1
  75. package/selection/selection-toggle.d.ts +1 -1
  76. package/selection/selection.d.ts +1 -1
  77. package/table-scroll-container/table-scroll-container.d.ts +1 -1
  78. package/dialog/dialog-config.d.ts +0 -111
  79. package/dialog/dialog-container.d.ts +0 -95
  80. package/dialog/dialog-injectors.d.ts +0 -24
  81. package/dialog/dialog-module.d.ts +0 -10
  82. package/dialog/dialog-ref.d.ts +0 -64
  83. package/dialog/dialog.d.ts +0 -103
  84. package/dialog/dialog_public_index.d.ts +0 -4
  85. package/dialog/index.d.ts +0 -8
  86. package/dialog/package.json +0 -9
  87. package/dialog/public-api.d.ts +0 -13
  88. package/esm2020/dialog/dialog-config.mjs +0 -54
  89. package/esm2020/dialog/dialog-container.mjs +0 -255
  90. package/esm2020/dialog/dialog-injectors.mjs +0 -26
  91. package/esm2020/dialog/dialog-module.mjs +0 -42
  92. package/esm2020/dialog/dialog-ref.mjs +0 -77
  93. package/esm2020/dialog/dialog.mjs +0 -285
  94. package/esm2020/dialog/dialog_public_index.mjs +0 -5
  95. package/esm2020/dialog/index.mjs +0 -9
  96. package/esm2020/dialog/public-api.mjs +0 -14
  97. package/esm2020/menu/context-menu-trigger.mjs +0 -227
  98. package/esm2020/menu/index.mjs +0 -9
  99. package/esm2020/menu/menu-aim.mjs +0 -204
  100. package/esm2020/menu/menu-bar.mjs +0 -159
  101. package/esm2020/menu/menu-base.mjs +0 -203
  102. package/esm2020/menu/menu-errors.mjs +0 -22
  103. package/esm2020/menu/menu-group.mjs +0 -30
  104. package/esm2020/menu/menu-interface.mjs +0 -11
  105. package/esm2020/menu/menu-item-checkbox.mjs +0 -48
  106. package/esm2020/menu/menu-item-radio.mjs +0 -114
  107. package/esm2020/menu/menu-item-selectable.mjs +0 -42
  108. package/esm2020/menu/menu-item.mjs +0 -289
  109. package/esm2020/menu/menu-module.mjs +0 -62
  110. package/esm2020/menu/menu-stack.mjs +0 -156
  111. package/esm2020/menu/menu-trigger-base.mjs +0 -114
  112. package/esm2020/menu/menu-trigger.mjs +0 -302
  113. package/esm2020/menu/menu.mjs +0 -168
  114. package/esm2020/menu/menu_public_index.mjs +0 -5
  115. package/esm2020/menu/pointer-focus-tracker.mjs +0 -51
  116. package/esm2020/menu/public-api.mjs +0 -24
  117. package/fesm2015/dialog.mjs +0 -736
  118. package/fesm2015/dialog.mjs.map +0 -1
  119. package/fesm2015/menu.mjs +0 -2131
  120. package/fesm2015/menu.mjs.map +0 -1
  121. package/fesm2020/dialog.mjs +0 -740
  122. package/fesm2020/dialog.mjs.map +0 -1
  123. package/fesm2020/menu.mjs +0 -2104
  124. package/fesm2020/menu.mjs.map +0 -1
  125. package/menu/context-menu-trigger.d.ts +0 -98
  126. package/menu/index.d.ts +0 -8
  127. package/menu/menu-aim.d.ts +0 -107
  128. package/menu/menu-bar.d.ts +0 -52
  129. package/menu/menu-base.d.ts +0 -104
  130. package/menu/menu-errors.d.ts +0 -17
  131. package/menu/menu-group.d.ts +0 -8
  132. package/menu/menu-interface.d.ts +0 -25
  133. package/menu/menu-item-checkbox.d.ts +0 -18
  134. package/menu/menu-item-radio.d.ts +0 -59
  135. package/menu/menu-item-selectable.d.ts +0 -21
  136. package/menu/menu-item.d.ts +0 -140
  137. package/menu/menu-module.d.ts +0 -17
  138. package/menu/menu-stack.d.ts +0 -122
  139. package/menu/menu-trigger-base.d.ts +0 -77
  140. package/menu/menu-trigger.d.ts +0 -104
  141. package/menu/menu.d.ts +0 -60
  142. package/menu/menu_public_index.d.ts +0 -4
  143. package/menu/package.json +0 -9
  144. package/menu/pointer-focus-tracker.d.ts +0 -47
  145. package/menu/public-api.d.ts +0 -23
@@ -1,104 +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, NgZone, 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 { MenuAim } from './menu-aim';
18
- import * as i0 from "@angular/core";
19
- /**
20
- * Abstract directive that implements shared logic common to all menus.
21
- * This class can be extended to create custom menu types.
22
- */
23
- export declare abstract class CdkMenuBase extends CdkMenuGroup implements Menu, AfterContentInit, OnDestroy {
24
- /** The Angular zone. */
25
- protected ngZone: NgZone;
26
- /** The stack of menus this menu belongs to. */
27
- readonly menuStack: MenuStack;
28
- /** The menu aim service used by this menu. */
29
- protected readonly menuAim?: MenuAim | undefined;
30
- /** The directionality of the current page. */
31
- protected readonly dir?: Directionality | undefined;
32
- /** The id of the menu's host element. */
33
- id: string;
34
- /** All child MenuItem elements nested in this Menu. */
35
- readonly items: QueryList<CdkMenuItem>;
36
- /** The direction items in the menu flow. */
37
- orientation: 'horizontal' | 'vertical';
38
- /** Whether the menu is displayed inline (i.e. always present vs a conditional popup that the user triggers with a trigger element). */
39
- isInline: boolean;
40
- /** The menu's native DOM host element. */
41
- readonly nativeElement: HTMLElement;
42
- /** Handles keyboard events for the menu. */
43
- protected keyManager: FocusKeyManager<CdkMenuItem>;
44
- /** Emits when the MenuBar is destroyed. */
45
- protected readonly destroyed: Subject<void>;
46
- /** The Menu Item which triggered the open submenu. */
47
- protected triggerItem?: CdkMenuItem;
48
- /** Tracks the users mouse movements over the menu. */
49
- protected pointerTracker?: PointerFocusTracker<CdkMenuItem>;
50
- /** Whether this menu's menu stack has focus. */
51
- private _menuStackHasFocus;
52
- protected constructor(
53
- /** The host element. */
54
- elementRef: ElementRef<HTMLElement>,
55
- /** The Angular zone. */
56
- ngZone: NgZone,
57
- /** The stack of menus this menu belongs to. */
58
- menuStack: MenuStack,
59
- /** The menu aim service used by this menu. */
60
- menuAim?: MenuAim | undefined,
61
- /** The directionality of the current page. */
62
- dir?: Directionality | undefined);
63
- ngAfterContentInit(): void;
64
- ngOnDestroy(): void;
65
- /**
66
- * Place focus on the first MenuItem in the menu and set the focus origin.
67
- * @param focusOrigin The origin input mode of the focus event.
68
- */
69
- focusFirstItem(focusOrigin?: FocusOrigin): void;
70
- /**
71
- * Place focus on the last MenuItem in the menu and set the focus origin.
72
- * @param focusOrigin The origin input mode of the focus event.
73
- */
74
- focusLastItem(focusOrigin?: FocusOrigin): void;
75
- /** Gets the tabindex for this menu. */
76
- _getTabIndex(): 0 | -1 | null;
77
- /**
78
- * Close the open menu if the current active item opened the requested MenuStackItem.
79
- * @param menu The menu requested to be closed.
80
- * @param options Options to configure the behavior on close.
81
- * - `focusParentTrigger` Whether to focus the parent trigger after closing the menu.
82
- */
83
- protected closeOpenMenu(menu: MenuStackItem, options?: {
84
- focusParentTrigger?: boolean;
85
- }): void;
86
- /** Setup the FocusKeyManager with the correct orientation for the menu. */
87
- private _setKeyManager;
88
- /**
89
- * Subscribe to the menu trigger's open events in order to track the trigger which opened the menu
90
- * and stop tracking it when the menu is closed.
91
- */
92
- private _subscribeToMenuOpen;
93
- /** Subscribe to the MenuStack close events. */
94
- private _subscribeToMenuStackClosed;
95
- /** Subscribe to the MenuStack hasFocus events. */
96
- private _subscribeToMenuStackHasFocus;
97
- /**
98
- * Set the PointerFocusTracker and ensure that when mouse focus changes the key manager is updated
99
- * with the latest menu item under mouse focus.
100
- */
101
- private _setUpPointerTracker;
102
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuBase, [null, null, null, { optional: true; self: true; }, { optional: true; }]>;
103
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuBase, never, never, { "id": "id"; }, {}, ["items"]>;
104
- }
@@ -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,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * A grouping container for `CdkMenuItemRadio` instances, similar to a `role="radiogroup"` element.
4
- */
5
- export declare class CdkMenuGroup {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuGroup, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuGroup, "[cdkMenuGroup]", ["cdkMenuGroup"], {}, {}, never>;
8
- }
@@ -1,25 +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 } 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 id of the menu's host element. */
16
- id: string;
17
- /** The menu's native DOM host element. */
18
- nativeElement: HTMLElement;
19
- /** The direction items in the menu flow. */
20
- readonly orientation: 'horizontal' | 'vertical';
21
- /** Place focus on the first MenuItem in the menu. */
22
- focusFirstItem(focusOrigin: FocusOrigin): void;
23
- /** Place focus on the last MenuItem in the menu. */
24
- focusLastItem(focusOrigin: FocusOrigin): void;
25
- }
@@ -1,18 +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
- /**
9
- * Toggle the checked state of the checkbox.
10
- * @param options Options the configure how the item is triggered
11
- * - keepOpen: specifies that the menu should be kept open after triggering the item.
12
- */
13
- trigger(options?: {
14
- keepOpen: boolean;
15
- }): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemCheckbox, never>;
17
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemCheckbox, "[cdkMenuItemCheckbox]", ["cdkMenuItemCheckbox"], {}, {}, never>;
18
- }
@@ -1,59 +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 { CdkMenuTrigger } from './menu-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
- /** The unique selection dispatcher for this radio's `CdkMenuGroup`. */
24
- private readonly _selectionDispatcher;
25
- /** An ID to identify this radio item to the `UniqueSelectionDisptcher`. */
26
- private _id;
27
- /** Function to unregister the selection dispatcher */
28
- private _removeDispatcherListener;
29
- constructor(
30
- /** The host element for this radio item. */
31
- element: ElementRef<HTMLElement>,
32
- /** The Angular zone. */
33
- ngZone: NgZone,
34
- /** The unique selection dispatcher for this radio's `CdkMenuGroup`. */
35
- _selectionDispatcher: UniqueSelectionDispatcher,
36
- /** The menu stack this item belongs to. */
37
- menuStack: MenuStack,
38
- /** The parent menu for this item. */
39
- parentMenu?: Menu,
40
- /** The menu aim used for this item. */
41
- menuAim?: MenuAim,
42
- /** The directionality of the page. */
43
- dir?: Directionality,
44
- /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
45
- menuTrigger?: CdkMenuTrigger);
46
- ngOnDestroy(): void;
47
- /**
48
- * Toggles the checked state of the radio-button.
49
- * @param options Options the configure how the item is triggered
50
- * - keepOpen: specifies that the menu should be kept open after triggering the item.
51
- */
52
- trigger(options?: {
53
- keepOpen: boolean;
54
- }): void;
55
- /** Configure the unique selection dispatcher listener in order to toggle the checked state */
56
- private _registerDispatcherListener;
57
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemRadio, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
58
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemRadio, "[cdkMenuItemRadio]", ["cdkMenuItemRadio"], {}, {}, never>;
59
- }
@@ -1,21 +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 { CdkMenuItem } from './menu-item';
10
- import * as i0 from "@angular/core";
11
- /** Base class providing checked state for selectable MenuItems. */
12
- export declare abstract class CdkMenuItemSelectable extends CdkMenuItem {
13
- /** Whether the element is checked */
14
- get checked(): boolean;
15
- set checked(value: BooleanInput);
16
- private _checked;
17
- /** Whether the item should close the menu if triggered by the spacebar. */
18
- protected closeOnSpacebarTrigger: boolean;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemSelectable, never>;
20
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemSelectable, never, never, { "checked": "cdkMenuItemChecked"; }, {}, never>;
21
- }
@@ -1,140 +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 { Subject } from 'rxjs';
13
- import { CdkMenuTrigger } from './menu-trigger';
14
- import { Menu } from './menu-interface';
15
- import { MenuStack } from './menu-stack';
16
- import { FocusableElement } from './pointer-focus-tracker';
17
- import { MenuAim, Toggler } from './menu-aim';
18
- import * as i0 from "@angular/core";
19
- /**
20
- * Directive which provides the ability for an element to be focused and navigated to using the
21
- * keyboard when residing in a CdkMenu, CdkMenuBar, or CdkMenuGroup. It performs user defined
22
- * behavior when clicked.
23
- */
24
- export declare class CdkMenuItem implements FocusableOption, FocusableElement, Toggler, OnDestroy {
25
- /** The host element for this item. */
26
- readonly _elementRef: ElementRef<HTMLElement>;
27
- /** The Angular zone. */
28
- private readonly _ngZone;
29
- /** The menu stack this item belongs to. */
30
- private readonly _menuStack;
31
- /** The parent menu this item belongs to. */
32
- private readonly _parentMenu?;
33
- /** The menu aim service used for this item. */
34
- private readonly _menuAim?;
35
- /** The directionality of the page. */
36
- private readonly _dir?;
37
- /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
38
- private readonly _menuTrigger?;
39
- /** Whether the CdkMenuItem is disabled - defaults to false */
40
- get disabled(): boolean;
41
- set disabled(value: BooleanInput);
42
- private _disabled;
43
- /**
44
- * The text used to locate this item during menu typeahead. If not specified,
45
- * the `textContent` of the item will be used.
46
- */
47
- typeaheadLabel: string | null;
48
- /**
49
- * If this MenuItem is a regular MenuItem, outputs when it is triggered by a keyboard or mouse
50
- * event.
51
- */
52
- readonly triggered: EventEmitter<void>;
53
- /** Whether the menu item opens a menu. */
54
- readonly hasMenu: boolean;
55
- /**
56
- * The tabindex for this menu item managed internally and used for implementing roving a
57
- * tab index.
58
- */
59
- _tabindex: 0 | -1;
60
- /** Whether the item should close the menu if triggered by the spacebar. */
61
- protected closeOnSpacebarTrigger: boolean;
62
- /** Emits when the menu item is destroyed. */
63
- protected readonly destroyed: Subject<void>;
64
- constructor(
65
- /** The host element for this item. */
66
- _elementRef: ElementRef<HTMLElement>,
67
- /** The Angular zone. */
68
- _ngZone: NgZone,
69
- /** The menu stack this item belongs to. */
70
- _menuStack: MenuStack,
71
- /** The parent menu this item belongs to. */
72
- _parentMenu?: Menu | undefined,
73
- /** The menu aim service used for this item. */
74
- _menuAim?: MenuAim | undefined,
75
- /** The directionality of the page. */
76
- _dir?: Directionality | undefined,
77
- /** Reference to the CdkMenuItemTrigger directive if one is added to the same element */
78
- _menuTrigger?: CdkMenuTrigger | undefined);
79
- ngOnDestroy(): void;
80
- /** Place focus on the element. */
81
- focus(): void;
82
- /**
83
- * If the menu item is not disabled and the element does not have a menu trigger attached, emit
84
- * on the cdkMenuItemTriggered emitter and close all open menus.
85
- * @param options Options the configure how the item is triggered
86
- * - keepOpen: specifies that the menu should be kept open after triggering the item.
87
- */
88
- trigger(options?: {
89
- keepOpen: boolean;
90
- }): void;
91
- /** Return true if this MenuItem has an attached menu and it is open. */
92
- isMenuOpen(): boolean;
93
- /**
94
- * Get a reference to the rendered Menu if the Menu is open and it is visible in the DOM.
95
- * @return the menu if it is open, otherwise undefined.
96
- */
97
- getMenu(): Menu | undefined;
98
- /** Get the CdkMenuTrigger associated with this element. */
99
- getMenuTrigger(): CdkMenuTrigger | undefined;
100
- /** Get the label for this element which is required by the FocusableOption interface. */
101
- getLabel(): string;
102
- /** Reset the tabindex to -1. */
103
- _resetTabIndex(): void;
104
- /**
105
- * Set the tab index to 0 if not disabled and it's a focus event, or a mouse enter if this element
106
- * is not in a menu bar.
107
- */
108
- _setTabIndex(event?: MouseEvent): void;
109
- /**
110
- * Handles keyboard events for the menu item, specifically either triggering the user defined
111
- * callback or opening/closing the current menu based on whether the left or right arrow key was
112
- * pressed.
113
- * @param event the keyboard event to handle
114
- */
115
- _onKeydown(event: KeyboardEvent): void;
116
- /** Whether this menu item is standalone or within a menu or menu bar. */
117
- private _isStandaloneItem;
118
- /**
119
- * Handles the user pressing the back arrow key.
120
- * @param event The keyboard event.
121
- */
122
- private _backArrowPressed;
123
- /**
124
- * Handles the user pressing the forward arrow key.
125
- * @param event The keyboard event.
126
- */
127
- private _forwardArrowPressed;
128
- /**
129
- * Subscribe to the mouseenter events and close any sibling menu items if this element is moused
130
- * into.
131
- */
132
- private _setupMouseEnter;
133
- /**
134
- * Return true if the enclosing parent menu is configured in a horizontal orientation, false
135
- * otherwise or if no parent.
136
- */
137
- private _isParentVertical;
138
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItem, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
139
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItem, "[cdkMenuItem]", ["cdkMenuItem"], { "disabled": "cdkMenuItemDisabled"; "typeaheadLabel": "cdkMenuitemTypeaheadLabel"; }, { "triggered": "cdkMenuItemTriggered"; }, never>;
140
- }
@@ -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-item";
5
- import * as i4 from "./menu-item-radio";
6
- import * as i5 from "./menu-item-checkbox";
7
- import * as i6 from "./menu-trigger";
8
- import * as i7 from "./menu-group";
9
- import * as i8 from "./context-menu-trigger";
10
- import * as i9 from "./menu-aim";
11
- import * as i10 from "@angular/cdk/overlay";
12
- /** Module that declares components and directives for the CDK menu. */
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.CdkMenuItem, typeof i4.CdkMenuItemRadio, typeof i5.CdkMenuItemCheckbox, typeof i6.CdkMenuTrigger, 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.CdkMenuTrigger, typeof i7.CdkMenuGroup, typeof i8.CdkContextMenuTrigger, typeof i9.CdkTargetMenuAim]>;
16
- static ɵinj: i0.ɵɵInjectorDeclaration<CdkMenuModule>;
17
- }
@@ -1,122 +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, Optional } from '@angular/core';
9
- import { Observable } from 'rxjs';
10
- import * as i0 from "@angular/core";
11
- /** The relative item in the inline menu to focus after closing all popup menus. */
12
- export declare const enum FocusNext {
13
- nextItem = 0,
14
- previousItem = 1,
15
- currentItem = 2
16
- }
17
- /** A single item (menu) in the menu stack. */
18
- export interface MenuStackItem {
19
- /** A reference to the menu stack this menu stack item belongs to. */
20
- menuStack?: MenuStack;
21
- }
22
- /** Injection token used for an implementation of MenuStack. */
23
- export declare const MENU_STACK: InjectionToken<MenuStack>;
24
- /** Provider that provides the parent menu stack, or a new menu stack if there is no parent one. */
25
- export declare const PARENT_OR_NEW_MENU_STACK_PROVIDER: {
26
- provide: InjectionToken<MenuStack>;
27
- deps: Optional[][];
28
- useFactory: (parentMenuStack?: MenuStack | undefined) => MenuStack;
29
- };
30
- /** Provider that provides the parent menu stack, or a new inline menu stack if there is no parent one. */
31
- export declare const PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER: (orientation: 'vertical' | 'horizontal') => {
32
- provide: InjectionToken<MenuStack>;
33
- deps: Optional[][];
34
- useFactory: (parentMenuStack?: MenuStack | undefined) => MenuStack;
35
- };
36
- /** Options that can be provided to the close or closeAll methods. */
37
- export interface CloseOptions {
38
- /** The element to focus next if the close operation causes the menu stack to become empty. */
39
- focusNextOnEmpty?: FocusNext;
40
- /** Whether to focus the parent trigger after closing the menu. */
41
- focusParentTrigger?: boolean;
42
- }
43
- /** Event dispatched when a menu is closed. */
44
- export interface MenuStackCloseEvent {
45
- /** The menu being closed. */
46
- item: MenuStackItem;
47
- /** Whether to focus the parent trigger after closing the menu. */
48
- focusParentTrigger?: boolean;
49
- }
50
- /**
51
- * MenuStack allows subscribers to listen for close events (when a MenuStackItem is popped off
52
- * of the stack) in order to perform closing actions. Upon the MenuStack being empty it emits
53
- * from the `empty` observable specifying the next focus action which the listener should perform
54
- * as requested by the closer.
55
- */
56
- export declare class MenuStack {
57
- /** The ID of this menu stack. */
58
- readonly id: string;
59
- /** All MenuStackItems tracked by this MenuStack. */
60
- private readonly _elements;
61
- /** Emits the element which was popped off of the stack when requested by a closer. */
62
- private readonly _close;
63
- /** Emits once the MenuStack has become empty after popping off elements. */
64
- private readonly _empty;
65
- /** Emits whether any menu in the menu stack has focus. */
66
- private readonly _hasFocus;
67
- /** Observable which emits the MenuStackItem which has been requested to close. */
68
- readonly closed: Observable<MenuStackCloseEvent>;
69
- /** Observable which emits whether any menu in the menu stack has focus. */
70
- readonly hasFocus: Observable<boolean>;
71
- /**
72
- * Observable which emits when the MenuStack is empty after popping off the last element. It
73
- * emits a FocusNext event which specifies the action the closer has requested the listener
74
- * perform.
75
- */
76
- readonly emptied: Observable<FocusNext | undefined>;
77
- /**
78
- * Whether the inline menu associated with this menu stack is vertical or horizontal.
79
- * `null` indicates there is no inline menu associated with this menu stack.
80
- */
81
- private _inlineMenuOrientation;
82
- /** Creates a menu stack that originates from an inline menu. */
83
- static inline(orientation: 'vertical' | 'horizontal'): MenuStack;
84
- /**
85
- * Adds an item to the menu stack.
86
- * @param menu the MenuStackItem to put on the stack.
87
- */
88
- push(menu: MenuStackItem): void;
89
- /**
90
- * Pop items off of the stack up to and including `lastItem` and emit each on the close
91
- * observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
92
- * @param lastItem the last item to pop off the stack.
93
- * @param options Options that configure behavior on close.
94
- */
95
- close(lastItem: MenuStackItem, options?: CloseOptions): void;
96
- /**
97
- * Pop items off of the stack up to but excluding `lastItem` and emit each on the close
98
- * observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
99
- * @param lastItem the element which should be left on the stack
100
- * @return whether or not an item was removed from the stack
101
- */
102
- closeSubMenuOf(lastItem: MenuStackItem): boolean;
103
- /**
104
- * Pop off all MenuStackItems and emit each one on the `close` observable one by one.
105
- * @param options Options that configure behavior on close.
106
- */
107
- closeAll(options?: CloseOptions): void;
108
- /** Return true if this stack is empty. */
109
- isEmpty(): boolean;
110
- /** Return the length of the stack. */
111
- length(): number;
112
- /** Get the top most element on the stack. */
113
- peek(): MenuStackItem | undefined;
114
- /** Whether the menu stack is associated with an inline menu. */
115
- hasInlineMenu(): boolean;
116
- /** The orientation of the associated inline menu. */
117
- inlineMenuOrientation(): "vertical" | "horizontal" | null;
118
- /** Sets whether the menu stack contains the focused element. */
119
- setHasFocus(hasFocus: boolean): void;
120
- static ɵfac: i0.ɵɵFactoryDeclaration<MenuStack, never>;
121
- static ɵprov: i0.ɵɵInjectableDeclaration<MenuStack>;
122
- }
@@ -1,77 +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, TemplateRef, ViewContainerRef } from '@angular/core';
9
- import { Menu } from './menu-interface';
10
- import { MenuStack } from './menu-stack';
11
- import { ConnectedPosition, OverlayRef } from '@angular/cdk/overlay';
12
- import { TemplatePortal } from '@angular/cdk/portal';
13
- import { Subject } from 'rxjs';
14
- import * as i0 from "@angular/core";
15
- /** Injection token used for an implementation of MenuStack. */
16
- export declare const MENU_TRIGGER: InjectionToken<CdkMenuTriggerBase>;
17
- /**
18
- * Abstract directive that implements shared logic common to all menu triggers.
19
- * This class can be extended to create custom menu trigger types.
20
- */
21
- export declare abstract class CdkMenuTriggerBase implements OnDestroy {
22
- /** The DI injector for this component */
23
- protected readonly injector: Injector;
24
- /** The view container ref for this component */
25
- protected readonly viewContainerRef: ViewContainerRef;
26
- /** The menu stack this menu is part of. */
27
- protected readonly menuStack: MenuStack;
28
- /** A list of preferred menu positions to be used when constructing the `FlexibleConnectedPositionStrategy` for this trigger's menu. */
29
- menuPosition: ConnectedPosition[];
30
- /** Emits when the attached menu is requested to open */
31
- readonly opened: EventEmitter<void>;
32
- /** Emits when the attached menu is requested to close */
33
- readonly closed: EventEmitter<void>;
34
- /** Template reference variable to the menu this trigger opens */
35
- menuTemplateRef: TemplateRef<unknown>;
36
- /** A reference to the overlay which manages the triggered menu */
37
- protected overlayRef: OverlayRef | null;
38
- /** Emits when this trigger is destroyed. */
39
- protected readonly destroyed: Subject<void>;
40
- /** Emits when the outside pointer events listener on the overlay should be stopped. */
41
- protected readonly stopOutsideClicksListener: import("rxjs").Observable<void>;
42
- /** The child menu opened by this trigger. */
43
- protected childMenu?: Menu;
44
- /** The content of the menu panel opened by this trigger. */
45
- private _menuPortal;
46
- /** The injector to use for the child menu opened by this trigger. */
47
- private _childMenuInjector?;
48
- protected constructor(
49
- /** The DI injector for this component */
50
- injector: Injector,
51
- /** The view container ref for this component */
52
- viewContainerRef: ViewContainerRef,
53
- /** The menu stack this menu is part of. */
54
- menuStack: MenuStack);
55
- ngOnDestroy(): void;
56
- /** Whether the attached menu is open. */
57
- isOpen(): boolean;
58
- /** Registers a child menu as having been opened by this trigger. */
59
- registerChildMenu(child: Menu): void;
60
- /**
61
- * Get the portal to be attached to the overlay which contains the menu. Allows for the menu
62
- * content to change dynamically and be reflected in the application.
63
- */
64
- protected getMenuContentPortal(): TemplatePortal<any>;
65
- /**
66
- * Whether the given element is inside the scope of this trigger's menu stack.
67
- * @param element The element to check.
68
- * @return Whether the element is inside the scope of this trigger's menu stack.
69
- */
70
- protected isElementInsideMenuStack(element: Element): boolean;
71
- /** Destroy and unset the overlay reference it if exists */
72
- private _destroyOverlay;
73
- /** Gets the injector to use when creating a child menu. */
74
- private _getChildMenuInjector;
75
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuTriggerBase, never>;
76
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuTriggerBase, never, never, {}, {}, never>;
77
- }