@angular/cdk 14.0.0-next.1 → 14.0.0-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/_index.scss +11 -0
- package/a11y/a11y-module.d.ts +2 -3
- package/a11y/focus-monitor/focus-monitor.d.ts +1 -1
- package/a11y/focus-trap/focus-trap.d.ts +1 -1
- package/a11y/live-announcer/live-announcer.d.ts +5 -1
- package/a11y-prebuilt.css +1 -1
- package/accordion/accordion-item.d.ts +1 -1
- package/accordion/accordion.d.ts +1 -1
- package/bidi/dir.d.ts +1 -1
- package/clipboard/copy-to-clipboard.d.ts +1 -1
- package/dialog/dialog-config.d.ts +115 -0
- package/dialog/dialog-container.d.ts +95 -0
- package/dialog/dialog-injectors.d.ts +24 -0
- package/dialog/dialog-module.d.ts +10 -0
- package/dialog/dialog-ref.d.ts +64 -0
- package/dialog/dialog.d.ts +103 -0
- package/dialog/dialog_public_index.d.ts +4 -0
- package/dialog/index.d.ts +8 -0
- package/dialog/package.json +9 -0
- package/dialog/public-api.d.ts +13 -0
- package/drag-drop/directives/drag-handle.d.ts +1 -1
- package/drag-drop/directives/drag-placeholder.d.ts +1 -1
- package/drag-drop/directives/drag-preview.d.ts +1 -1
- package/drag-drop/directives/drag.d.ts +8 -9
- package/drag-drop/directives/drop-list-group.d.ts +1 -1
- package/drag-drop/directives/drop-list.d.ts +1 -1
- package/drag-drop/drag-events.d.ts +8 -0
- package/drag-drop/drag-ref.d.ts +11 -1
- package/drag-drop/drop-list-ref.d.ts +5 -1
- package/drag-drop/parent-position-tracker.d.ts +11 -3
- package/esm2020/a11y/a11y-module.mjs +6 -7
- package/esm2020/a11y/aria-describer/aria-describer.mjs +4 -4
- package/esm2020/a11y/focus-monitor/focus-monitor.mjs +13 -11
- package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +4 -4
- package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +4 -4
- package/esm2020/a11y/focus-trap/focus-trap.mjs +7 -7
- package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +7 -12
- package/esm2020/a11y/input-modality/input-modality-detector.mjs +4 -4
- package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +4 -4
- package/esm2020/a11y/live-announcer/live-announcer.mjs +26 -18
- package/esm2020/accordion/accordion-item.mjs +4 -4
- package/esm2020/accordion/accordion-module.mjs +5 -5
- package/esm2020/accordion/accordion.mjs +4 -4
- package/esm2020/bidi/bidi-module.mjs +5 -5
- package/esm2020/bidi/dir.mjs +4 -4
- package/esm2020/bidi/directionality.mjs +4 -4
- package/esm2020/clipboard/clipboard-module.mjs +5 -5
- package/esm2020/clipboard/clipboard.mjs +4 -4
- package/esm2020/clipboard/copy-to-clipboard.mjs +4 -4
- package/esm2020/collections/unique-selection-dispatcher.mjs +4 -4
- package/esm2020/dialog/dialog-config.mjs +58 -0
- package/esm2020/dialog/dialog-container.mjs +265 -0
- package/esm2020/dialog/dialog-injectors.mjs +26 -0
- package/esm2020/dialog/dialog-module.mjs +42 -0
- package/esm2020/dialog/dialog-ref.mjs +76 -0
- package/esm2020/dialog/dialog.mjs +285 -0
- package/esm2020/dialog/dialog_public_index.mjs +5 -0
- package/esm2020/dialog/index.mjs +9 -0
- package/esm2020/dialog/public-api.mjs +14 -0
- package/esm2020/drag-drop/directives/drag-handle.mjs +4 -4
- package/esm2020/drag-drop/directives/drag-placeholder.mjs +4 -4
- package/esm2020/drag-drop/directives/drag-preview.mjs +4 -4
- package/esm2020/drag-drop/directives/drag.mjs +33 -24
- package/esm2020/drag-drop/directives/drop-list-group.mjs +4 -4
- package/esm2020/drag-drop/directives/drop-list.mjs +14 -13
- package/esm2020/drag-drop/drag-drop-module.mjs +5 -5
- package/esm2020/drag-drop/drag-drop-registry.mjs +4 -4
- package/esm2020/drag-drop/drag-drop.mjs +4 -4
- package/esm2020/drag-drop/drag-events.mjs +1 -1
- package/esm2020/drag-drop/drag-ref.mjs +48 -24
- package/esm2020/drag-drop/drop-list-ref.mjs +7 -3
- package/esm2020/drag-drop/parent-position-tracker.mjs +13 -5
- package/esm2020/layout/breakpoints-observer.mjs +4 -4
- package/esm2020/layout/layout-module.mjs +5 -5
- package/esm2020/layout/media-matcher.mjs +4 -4
- package/esm2020/menu/context-menu-trigger.mjs +227 -0
- package/esm2020/menu/index.mjs +9 -0
- package/esm2020/menu/menu-aim.mjs +204 -0
- package/esm2020/menu/menu-bar.mjs +159 -0
- package/esm2020/menu/menu-base.mjs +203 -0
- package/esm2020/menu/menu-errors.mjs +22 -0
- package/esm2020/menu/menu-group.mjs +30 -0
- package/esm2020/menu/menu-interface.mjs +11 -0
- package/esm2020/menu/menu-item-checkbox.mjs +48 -0
- package/esm2020/menu/menu-item-radio.mjs +114 -0
- package/esm2020/menu/menu-item-selectable.mjs +42 -0
- package/esm2020/menu/menu-item.mjs +289 -0
- package/esm2020/menu/menu-module.mjs +62 -0
- package/esm2020/menu/menu-stack.mjs +156 -0
- package/esm2020/menu/menu-trigger-base.mjs +114 -0
- package/esm2020/menu/menu-trigger.mjs +302 -0
- package/esm2020/menu/menu.mjs +168 -0
- package/esm2020/menu/menu_public_index.mjs +5 -0
- package/esm2020/menu/pointer-focus-tracker.mjs +51 -0
- package/esm2020/menu/public-api.mjs +24 -0
- package/esm2020/observers/observe-content.mjs +14 -14
- package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +4 -4
- package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +26 -8
- package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +33 -12
- package/esm2020/overlay/fullscreen-overlay-container.mjs +4 -4
- package/esm2020/overlay/overlay-container.mjs +4 -4
- package/esm2020/overlay/overlay-directives.mjs +7 -7
- package/esm2020/overlay/overlay-module.mjs +5 -5
- package/esm2020/overlay/overlay-ref.mjs +27 -20
- package/esm2020/overlay/overlay.mjs +14 -8
- package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +13 -1
- package/esm2020/overlay/position/global-position-strategy.mjs +64 -30
- package/esm2020/overlay/position/overlay-position-builder.mjs +4 -4
- package/esm2020/overlay/public-api.mjs +2 -2
- package/esm2020/overlay/scroll/scroll-strategy-options.mjs +4 -4
- package/esm2020/platform/platform-module.mjs +5 -5
- package/esm2020/platform/platform.mjs +4 -4
- package/esm2020/portal/dom-portal-outlet.mjs +29 -5
- package/esm2020/portal/portal-directives.mjs +20 -18
- package/esm2020/portal/portal.mjs +12 -3
- package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +4 -4
- package/esm2020/scrolling/scroll-dispatcher.mjs +4 -4
- package/esm2020/scrolling/scrollable.mjs +4 -4
- package/esm2020/scrolling/scrolling-module.mjs +10 -11
- package/esm2020/scrolling/viewport-ruler.mjs +4 -4
- package/esm2020/scrolling/virtual-for-of.mjs +7 -5
- package/esm2020/scrolling/virtual-scroll-viewport.mjs +8 -6
- package/esm2020/stepper/step-header.mjs +4 -4
- package/esm2020/stepper/step-label.mjs +4 -4
- package/esm2020/stepper/stepper-button.mjs +7 -7
- package/esm2020/stepper/stepper-module.mjs +5 -5
- package/esm2020/stepper/stepper.mjs +9 -22
- package/esm2020/table/cell.mjs +22 -22
- package/esm2020/table/coalesced-style-scheduler.mjs +4 -4
- package/esm2020/table/row.mjs +28 -28
- package/esm2020/table/table-module.mjs +5 -5
- package/esm2020/table/table.mjs +21 -21
- package/esm2020/table/text-column.mjs +5 -5
- package/esm2020/testing/component-harness.mjs +7 -1
- package/esm2020/testing/harness-environment.mjs +12 -1
- package/esm2020/testing/public-api.mjs +2 -1
- package/esm2020/testing/selenium-webdriver/selenium-web-driver-element.mjs +8 -3
- package/esm2020/testing/test-element-errors.mjs +15 -0
- package/esm2020/testing/test-element.mjs +1 -1
- package/esm2020/testing/testbed/fake-events/type-in-element.mjs +13 -4
- package/esm2020/testing/testbed/unit-test-element.mjs +21 -5
- package/esm2020/text-field/autofill.mjs +7 -7
- package/esm2020/text-field/autosize.mjs +4 -4
- package/esm2020/text-field/text-field-module.mjs +5 -7
- package/esm2020/tree/nested-node.mjs +4 -4
- package/esm2020/tree/node.mjs +4 -4
- package/esm2020/tree/outlet.mjs +4 -4
- package/esm2020/tree/padding.mjs +4 -4
- package/esm2020/tree/toggle.mjs +4 -4
- package/esm2020/tree/tree-module.mjs +5 -5
- package/esm2020/tree/tree.mjs +7 -7
- package/esm2020/version.mjs +1 -1
- package/fesm2015/a11y.mjs +71 -66
- package/fesm2015/a11y.mjs.map +1 -1
- package/fesm2015/accordion.mjs +10 -10
- package/fesm2015/accordion.mjs.map +1 -1
- package/fesm2015/bidi.mjs +10 -10
- package/fesm2015/bidi.mjs.map +1 -1
- package/fesm2015/cdk.mjs +1 -1
- package/fesm2015/cdk.mjs.map +1 -1
- package/fesm2015/clipboard.mjs +10 -10
- package/fesm2015/clipboard.mjs.map +1 -1
- package/fesm2015/coercion.mjs.map +1 -1
- package/fesm2015/collections.mjs +3 -3
- package/fesm2015/collections.mjs.map +1 -1
- package/fesm2015/dialog.mjs +749 -0
- package/fesm2015/dialog.mjs.map +1 -0
- package/fesm2015/drag-drop.mjs +133 -86
- package/fesm2015/drag-drop.mjs.map +1 -1
- package/fesm2015/keycodes.mjs.map +1 -1
- package/fesm2015/layout.mjs +10 -10
- package/fesm2015/layout.mjs.map +1 -1
- package/fesm2015/menu.mjs +2131 -0
- package/fesm2015/menu.mjs.map +1 -0
- package/fesm2015/observers.mjs +13 -13
- package/fesm2015/observers.mjs.map +1 -1
- package/fesm2015/overlay.mjs +197 -99
- package/fesm2015/overlay.mjs.map +1 -1
- package/fesm2015/platform.mjs +7 -7
- package/fesm2015/platform.mjs.map +1 -1
- package/fesm2015/portal.mjs +58 -24
- package/fesm2015/portal.mjs.map +1 -1
- package/fesm2015/scrolling.mjs +35 -31
- package/fesm2015/scrolling.mjs.map +1 -1
- package/fesm2015/stepper.mjs +24 -37
- package/fesm2015/stepper.mjs.map +1 -1
- package/fesm2015/table.mjs +79 -79
- package/fesm2015/table.mjs.map +1 -1
- package/fesm2015/testing/selenium-webdriver.mjs +7 -2
- package/fesm2015/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2015/testing/testbed.mjs +32 -8
- package/fesm2015/testing/testbed.mjs.map +1 -1
- package/fesm2015/testing.mjs +39 -1
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/text-field.mjs +14 -15
- package/fesm2015/text-field.mjs.map +1 -1
- package/fesm2015/tree.mjs +25 -25
- package/fesm2015/tree.mjs.map +1 -1
- package/fesm2020/a11y.mjs +70 -65
- package/fesm2020/a11y.mjs.map +1 -1
- package/fesm2020/accordion.mjs +10 -10
- package/fesm2020/accordion.mjs.map +1 -1
- package/fesm2020/bidi.mjs +10 -10
- package/fesm2020/bidi.mjs.map +1 -1
- package/fesm2020/cdk.mjs +1 -1
- package/fesm2020/cdk.mjs.map +1 -1
- package/fesm2020/clipboard.mjs +10 -10
- package/fesm2020/clipboard.mjs.map +1 -1
- package/fesm2020/coercion.mjs.map +1 -1
- package/fesm2020/collections.mjs +3 -3
- package/fesm2020/collections.mjs.map +1 -1
- package/fesm2020/dialog.mjs +753 -0
- package/fesm2020/dialog.mjs.map +1 -0
- package/fesm2020/drag-drop.mjs +132 -86
- package/fesm2020/drag-drop.mjs.map +1 -1
- package/fesm2020/keycodes.mjs.map +1 -1
- package/fesm2020/layout.mjs +10 -10
- package/fesm2020/layout.mjs.map +1 -1
- package/fesm2020/menu.mjs +2104 -0
- package/fesm2020/menu.mjs.map +1 -0
- package/fesm2020/observers.mjs +13 -13
- package/fesm2020/observers.mjs.map +1 -1
- package/fesm2020/overlay.mjs +197 -99
- package/fesm2020/overlay.mjs.map +1 -1
- package/fesm2020/platform.mjs +7 -7
- package/fesm2020/platform.mjs.map +1 -1
- package/fesm2020/portal.mjs +58 -24
- package/fesm2020/portal.mjs.map +1 -1
- package/fesm2020/scrolling.mjs +35 -31
- package/fesm2020/scrolling.mjs.map +1 -1
- package/fesm2020/stepper.mjs +24 -37
- package/fesm2020/stepper.mjs.map +1 -1
- package/fesm2020/table.mjs +79 -79
- package/fesm2020/table.mjs.map +1 -1
- package/fesm2020/testing/selenium-webdriver.mjs +7 -2
- package/fesm2020/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2020/testing/testbed.mjs +32 -8
- package/fesm2020/testing/testbed.mjs.map +1 -1
- package/fesm2020/testing.mjs +33 -1
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/text-field.mjs +14 -15
- package/fesm2020/text-field.mjs.map +1 -1
- package/fesm2020/tree.mjs +25 -25
- package/fesm2020/tree.mjs.map +1 -1
- package/menu/context-menu-trigger.d.ts +98 -0
- package/menu/index.d.ts +8 -0
- package/menu/menu-aim.d.ts +107 -0
- package/menu/menu-bar.d.ts +52 -0
- package/menu/menu-base.d.ts +104 -0
- package/menu/menu-errors.d.ts +17 -0
- package/menu/menu-group.d.ts +8 -0
- package/menu/menu-interface.d.ts +25 -0
- package/menu/menu-item-checkbox.d.ts +18 -0
- package/menu/menu-item-radio.d.ts +59 -0
- package/menu/menu-item-selectable.d.ts +21 -0
- package/menu/menu-item.d.ts +140 -0
- package/menu/menu-module.d.ts +17 -0
- package/menu/menu-stack.d.ts +122 -0
- package/menu/menu-trigger-base.d.ts +77 -0
- package/menu/menu-trigger.d.ts +104 -0
- package/menu/menu.d.ts +60 -0
- package/menu/menu_public_index.d.ts +4 -0
- package/menu/package.json +9 -0
- package/menu/pointer-focus-tracker.d.ts +47 -0
- package/menu/public-api.d.ts +23 -0
- package/observers/observe-content.d.ts +1 -1
- package/overlay/_index.scss +11 -1
- package/overlay/dispatchers/overlay-keyboard-dispatcher.d.ts +7 -2
- package/overlay/dispatchers/overlay-outside-click-dispatcher.d.ts +8 -2
- package/overlay/overlay-directives.d.ts +2 -2
- package/overlay/overlay-ref.d.ts +4 -1
- package/overlay/overlay.d.ts +3 -2
- package/overlay/position/flexible-connected-position-strategy.d.ts +2 -0
- package/overlay/position/global-position-strategy.d.ts +14 -3
- package/overlay/public-api.d.ts +1 -1
- package/overlay-prebuilt.css +1 -1
- package/package.json +19 -3
- package/portal/dom-portal-outlet.d.ts +17 -6
- package/portal/portal-directives.d.ts +4 -4
- package/portal/portal.d.ts +12 -2
- package/schematics/collection.json +2 -1
- package/schematics/index.js +6 -2
- package/schematics/index.mjs +6 -2
- package/schematics/migration.json +5 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/drag-drop/index.js +5 -14
- package/schematics/ng-generate/drag-drop/index.mjs +5 -14
- package/schematics/ng-generate/drag-drop/schema.json +1 -1
- package/schematics/ng-update/data/constructor-checks.js +7 -1
- package/schematics/ng-update/data/constructor-checks.mjs +7 -1
- package/schematics/ng-update/data/index.js +6 -2
- package/schematics/ng-update/data/index.mjs +6 -2
- package/schematics/ng-update/devkit-migration-rule.js +5 -14
- package/schematics/ng-update/devkit-migration-rule.mjs +5 -14
- package/schematics/ng-update/devkit-migration.js +1 -1
- package/schematics/ng-update/devkit-migration.mjs +1 -1
- package/schematics/ng-update/html-parsing/elements.js +2 -3
- package/schematics/ng-update/html-parsing/elements.mjs +2 -3
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +7 -2
- package/schematics/ng-update/index.mjs +7 -2
- package/schematics/ng-update/migrations/symbol-removal.js +2 -3
- package/schematics/ng-update/migrations/symbol-removal.mjs +2 -3
- package/schematics/ng-update/public-api.js +6 -2
- package/schematics/ng-update/public-api.mjs +6 -2
- package/schematics/tsconfig.json +2 -10
- package/schematics/update-tool/public-api.js +6 -2
- package/schematics/update-tool/public-api.mjs +6 -2
- package/schematics/update-tool/target-version.d.ts +2 -1
- package/schematics/update-tool/target-version.js +2 -1
- package/schematics/update-tool/target-version.mjs +2 -1
- package/schematics/utils/ast.js +11 -22
- package/schematics/utils/ast.mjs +11 -22
- package/schematics/utils/build-component.js +10 -15
- package/schematics/utils/build-component.mjs +10 -15
- package/schematics/utils/get-project.d.ts +1 -1
- package/schematics/utils/get-project.js +7 -2
- package/schematics/utils/get-project.mjs +7 -2
- package/schematics/utils/index.js +6 -2
- package/schematics/utils/index.mjs +6 -2
- package/schematics/utils/project-index-file.js +2 -2
- package/schematics/utils/project-index-file.mjs +2 -2
- package/schematics/utils/project-targets.js +3 -4
- package/schematics/utils/project-targets.mjs +3 -4
- package/schematics/utils/project-tsconfig-paths.js +16 -28
- package/schematics/utils/project-tsconfig-paths.mjs +16 -28
- package/scrolling/fixed-size-virtual-scroll.d.ts +1 -1
- package/scrolling/scrollable.d.ts +1 -1
- package/scrolling/scrolling-module.d.ts +1 -2
- package/scrolling/virtual-for-of.d.ts +1 -1
- package/scrolling/virtual-scroll-viewport.d.ts +1 -1
- package/stepper/step-header.d.ts +1 -1
- package/stepper/step-label.d.ts +1 -1
- package/stepper/stepper-button.d.ts +2 -2
- package/stepper/stepper.d.ts +5 -14
- package/table/cell.d.ts +7 -7
- package/table/row.d.ts +9 -9
- package/table/table.d.ts +8 -12
- package/table/text-column.d.ts +2 -2
- package/testing/component-harness.d.ts +18 -0
- package/testing/harness-environment.d.ts +2 -0
- package/testing/public-api.d.ts +1 -0
- package/testing/test-element-errors.d.ts +12 -0
- package/testing/test-element.d.ts +4 -2
- package/testing/testbed/fake-events/type-in-element.d.ts +2 -2
- package/testing/testbed/unit-test-element.d.ts +4 -1
- package/text-field/autofill.d.ts +1 -1
- package/text-field/autosize.d.ts +1 -1
- package/text-field/text-field-module.d.ts +1 -2
- package/text-field-prebuilt.css +1 -1
- package/tree/nested-node.d.ts +1 -1
- package/tree/node.d.ts +1 -1
- package/tree/outlet.d.ts +1 -1
- package/tree/padding.d.ts +1 -1
- package/tree/toggle.d.ts +1 -1
- package/tree/tree.d.ts +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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, never, false>;
|
|
77
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
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 { CdkMenuTriggerBase } from './menu-trigger-base';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
/**
|
|
17
|
+
* A directive that turns its host element into a trigger for a popup menu.
|
|
18
|
+
* It can be combined with cdkMenuItem to create sub-menus. If the element is in a top level
|
|
19
|
+
* MenuBar it will open the menu on click, or if a sibling is already opened it will open on hover.
|
|
20
|
+
* If it is inside of a Menu it will open the attached Submenu on hover regardless of its sibling
|
|
21
|
+
* state.
|
|
22
|
+
*/
|
|
23
|
+
export declare class CdkMenuTrigger extends CdkMenuTriggerBase implements OnDestroy {
|
|
24
|
+
/** The host element. */
|
|
25
|
+
private readonly _elementRef;
|
|
26
|
+
/** The CDK overlay service. */
|
|
27
|
+
private readonly _overlay;
|
|
28
|
+
/** The Angular zone. */
|
|
29
|
+
private readonly _ngZone;
|
|
30
|
+
/** The parent menu this trigger belongs to. */
|
|
31
|
+
private readonly _parentMenu?;
|
|
32
|
+
/** The menu aim service used by this menu. */
|
|
33
|
+
private readonly _menuAim?;
|
|
34
|
+
/** The directionality of the page. */
|
|
35
|
+
private readonly _directionality?;
|
|
36
|
+
constructor(
|
|
37
|
+
/** The DI injector for this component. */
|
|
38
|
+
injector: Injector,
|
|
39
|
+
/** The host element. */
|
|
40
|
+
_elementRef: ElementRef<HTMLElement>,
|
|
41
|
+
/** The view container ref for this component. */
|
|
42
|
+
viewContainerRef: ViewContainerRef,
|
|
43
|
+
/** The CDK overlay service. */
|
|
44
|
+
_overlay: Overlay,
|
|
45
|
+
/** The Angular zone. */
|
|
46
|
+
_ngZone: NgZone,
|
|
47
|
+
/** The menu stack this trigger belongs to. */
|
|
48
|
+
menuStack: MenuStack,
|
|
49
|
+
/** The parent menu this trigger belongs to. */
|
|
50
|
+
_parentMenu?: Menu | undefined,
|
|
51
|
+
/** The menu aim service used by this menu. */
|
|
52
|
+
_menuAim?: MenuAim | undefined,
|
|
53
|
+
/** The directionality of the page. */
|
|
54
|
+
_directionality?: Directionality | undefined);
|
|
55
|
+
/** Toggle the attached menu. */
|
|
56
|
+
toggle(): void;
|
|
57
|
+
/** Open the attached menu. */
|
|
58
|
+
open(): void;
|
|
59
|
+
/** Close the opened menu. */
|
|
60
|
+
close(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Get a reference to the rendered Menu if the Menu is open and rendered in the DOM.
|
|
63
|
+
*/
|
|
64
|
+
getMenu(): Menu | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Handles keyboard events for the menu item.
|
|
67
|
+
* @param event The keyboard event to handle
|
|
68
|
+
*/
|
|
69
|
+
_toggleOnKeydown(event: KeyboardEvent): void;
|
|
70
|
+
/**
|
|
71
|
+
* Sets whether the trigger's menu stack has focus.
|
|
72
|
+
* @param hasFocus Whether the menu stack has focus.
|
|
73
|
+
*/
|
|
74
|
+
_setHasFocus(hasFocus: boolean): void;
|
|
75
|
+
/**
|
|
76
|
+
* Subscribe to the mouseenter events and close any sibling menu items if this element is moused
|
|
77
|
+
* into.
|
|
78
|
+
*/
|
|
79
|
+
private _subscribeToMouseEnter;
|
|
80
|
+
/** Close out any sibling menu trigger menus. */
|
|
81
|
+
private _closeSiblingTriggers;
|
|
82
|
+
/** Get the configuration object used to create the overlay. */
|
|
83
|
+
private _getOverlayConfig;
|
|
84
|
+
/** Build the position strategy for the overlay which specifies where to place the menu. */
|
|
85
|
+
private _getOverlayPositionStrategy;
|
|
86
|
+
/** Get the preferred positions for the opened menu relative to the menu item. */
|
|
87
|
+
private _getOverlayPositions;
|
|
88
|
+
/**
|
|
89
|
+
* Subscribe to the MenuStack close events if this is a standalone trigger and close out the menu
|
|
90
|
+
* this triggers when requested.
|
|
91
|
+
*/
|
|
92
|
+
private _registerCloseHandler;
|
|
93
|
+
/**
|
|
94
|
+
* Subscribe to the overlays outside pointer events stream and handle closing out the stack if a
|
|
95
|
+
* click occurs outside the menus.
|
|
96
|
+
*/
|
|
97
|
+
private _subscribeToOutsideClicks;
|
|
98
|
+
/** Subscribe to the MenuStack hasFocus events. */
|
|
99
|
+
private _subscribeToMenuStackHasFocus;
|
|
100
|
+
/** Subscribe to the MenuStack closed events. */
|
|
101
|
+
private _subscribeToMenuStackClosed;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuTrigger, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
103
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuTrigger, "[cdkMenuTriggerFor]", ["cdkMenuTriggerFor"], { "menuTemplateRef": "cdkMenuTriggerFor"; "menuPosition": "cdkMenuPosition"; }, { "opened": "cdkMenuOpened"; "closed": "cdkMenuClosed"; }, never, never, false>;
|
|
104
|
+
}
|
package/menu/menu.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
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, EventEmitter, 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 { CdkMenuTriggerBase } from './menu-trigger-base';
|
|
13
|
+
import { CdkMenuBase } from './menu-base';
|
|
14
|
+
import * as i0 from "@angular/core";
|
|
15
|
+
/**
|
|
16
|
+
* Directive which configures the element as a Menu which should contain child elements marked as
|
|
17
|
+
* CdkMenuItem or CdkMenuGroup. Sets the appropriate role and aria-attributes for a menu and
|
|
18
|
+
* contains accessible keyboard and mouse handling logic.
|
|
19
|
+
*
|
|
20
|
+
* It also acts as a RadioGroup for elements marked with role `menuitemradio`.
|
|
21
|
+
*/
|
|
22
|
+
export declare class CdkMenu extends CdkMenuBase implements AfterContentInit, OnDestroy {
|
|
23
|
+
/** The trigger that opened this menu. */
|
|
24
|
+
private _parentTrigger?;
|
|
25
|
+
/** Event emitted when the menu is closed. */
|
|
26
|
+
readonly closed: EventEmitter<void>;
|
|
27
|
+
/** The direction items in the menu flow. */
|
|
28
|
+
readonly orientation = "vertical";
|
|
29
|
+
/** Whether the menu is displayed inline (i.e. always present vs a conditional popup that the user triggers with a trigger element). */
|
|
30
|
+
readonly isInline: boolean;
|
|
31
|
+
constructor(
|
|
32
|
+
/** The host element. */
|
|
33
|
+
elementRef: ElementRef<HTMLElement>,
|
|
34
|
+
/** The Angular zone. */
|
|
35
|
+
ngZone: NgZone,
|
|
36
|
+
/** The menu stack this menu is part of. */
|
|
37
|
+
menuStack: MenuStack,
|
|
38
|
+
/** The trigger that opened this menu. */
|
|
39
|
+
_parentTrigger?: CdkMenuTriggerBase | undefined,
|
|
40
|
+
/** The menu aim service used by this menu. */
|
|
41
|
+
menuAim?: MenuAim,
|
|
42
|
+
/** The directionality of the page. */
|
|
43
|
+
dir?: Directionality);
|
|
44
|
+
ngAfterContentInit(): void;
|
|
45
|
+
ngOnDestroy(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Handle keyboard events for the Menu.
|
|
48
|
+
* @param event The keyboard event to be handled.
|
|
49
|
+
*/
|
|
50
|
+
_handleKeyEvent(event: KeyboardEvent): void;
|
|
51
|
+
/**
|
|
52
|
+
* Set focus the either the current, previous or next item based on the FocusNext event.
|
|
53
|
+
* @param focusNext The element to focus.
|
|
54
|
+
*/
|
|
55
|
+
private _toggleMenuFocus;
|
|
56
|
+
/** Subscribe to the MenuStack emptied events. */
|
|
57
|
+
private _subscribeToMenuStackEmptied;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenu, [null, null, null, { optional: true; }, { optional: true; self: true; }, { optional: true; }]>;
|
|
59
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenu, "[cdkMenu]", ["cdkMenu"], {}, { "closed": "closed"; }, never, never, false>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@angular/cdk/menu",
|
|
3
|
+
"fesm2020": "../fesm2020/menu.mjs",
|
|
4
|
+
"fesm2015": "../fesm2015/menu.mjs",
|
|
5
|
+
"esm2020": "../esm2020/menu/menu_public_index.mjs",
|
|
6
|
+
"typings": "./menu_public_index.d.ts",
|
|
7
|
+
"module": "../fesm2015/menu.mjs",
|
|
8
|
+
"es2020": "../fesm2020/menu.mjs"
|
|
9
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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, QueryList } from '@angular/core';
|
|
9
|
+
import { Observable } from 'rxjs';
|
|
10
|
+
/** Item to track for mouse focus events. */
|
|
11
|
+
export interface FocusableElement {
|
|
12
|
+
/** A reference to the element to be tracked. */
|
|
13
|
+
_elementRef: ElementRef<HTMLElement>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* PointerFocusTracker keeps track of the currently active item under mouse focus. It also has
|
|
17
|
+
* observables which emit when the users mouse enters and leaves a tracked element.
|
|
18
|
+
*/
|
|
19
|
+
export declare class PointerFocusTracker<T extends FocusableElement> {
|
|
20
|
+
/** The list of items being tracked. */
|
|
21
|
+
private readonly _items;
|
|
22
|
+
/** Emits when an element is moused into. */
|
|
23
|
+
readonly entered: Observable<T>;
|
|
24
|
+
/** Emits when an element is moused out. */
|
|
25
|
+
readonly exited: Observable<T>;
|
|
26
|
+
/** The element currently under mouse focus. */
|
|
27
|
+
activeElement?: T;
|
|
28
|
+
/** The element previously under mouse focus. */
|
|
29
|
+
previousElement?: T;
|
|
30
|
+
/** Emits when this is destroyed. */
|
|
31
|
+
private readonly _destroyed;
|
|
32
|
+
constructor(
|
|
33
|
+
/** The list of items being tracked. */
|
|
34
|
+
_items: QueryList<T>);
|
|
35
|
+
/** Stop the managers listeners. */
|
|
36
|
+
destroy(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Gets a stream of pointer (mouse) entries into the given items.
|
|
39
|
+
* This should typically run outside the Angular zone.
|
|
40
|
+
*/
|
|
41
|
+
private _getItemPointerEntries;
|
|
42
|
+
/**
|
|
43
|
+
* Gets a stream of pointer (mouse) exits out of the given items.
|
|
44
|
+
* This should typically run outside the Angular zone.
|
|
45
|
+
*/
|
|
46
|
+
private _getItemPointerExits;
|
|
47
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 './menu-module';
|
|
9
|
+
export * from './menu-bar';
|
|
10
|
+
export * from './menu';
|
|
11
|
+
export * from './menu-base';
|
|
12
|
+
export * from './menu-item';
|
|
13
|
+
export * from './menu-item-checkbox';
|
|
14
|
+
export * from './menu-item-radio';
|
|
15
|
+
export * from './menu-trigger';
|
|
16
|
+
export * from './menu-group';
|
|
17
|
+
export * from './menu-item-selectable';
|
|
18
|
+
export * from './context-menu-trigger';
|
|
19
|
+
export * from './menu-trigger-base';
|
|
20
|
+
export * from './pointer-focus-tracker';
|
|
21
|
+
export * from './menu-stack';
|
|
22
|
+
export * from './menu-interface';
|
|
23
|
+
export * from './menu-aim';
|
|
@@ -78,7 +78,7 @@ export declare class CdkObserveContent implements AfterContentInit, OnDestroy {
|
|
|
78
78
|
private _subscribe;
|
|
79
79
|
private _unsubscribe;
|
|
80
80
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkObserveContent, never>;
|
|
81
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkObserveContent, "[cdkObserveContent]", ["cdkObserveContent"], { "disabled": "cdkObserveContentDisabled"; "debounce": "debounce"; }, { "event": "cdkObserveContent"; }, never>;
|
|
81
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkObserveContent, "[cdkObserveContent]", ["cdkObserveContent"], { "disabled": "cdkObserveContentDisabled"; "debounce": "debounce"; }, { "event": "cdkObserveContent"; }, never, never, false>;
|
|
82
82
|
}
|
|
83
83
|
export declare class ObserversModule {
|
|
84
84
|
static ɵfac: i0.ɵɵFactoryDeclaration<ObserversModule, never>;
|
package/overlay/_index.scss
CHANGED
|
@@ -96,15 +96,25 @@ $backdrop-animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1) !default;
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.cdk-overlay-transparent-backdrop {
|
|
99
|
+
// Define a transition on the visibility so that the `transitionend` event can fire immediately.
|
|
100
|
+
transition: visibility 1ms linear, opacity 1ms linear;
|
|
101
|
+
visibility: hidden;
|
|
102
|
+
opacity: 1;
|
|
103
|
+
|
|
99
104
|
// Note: as of Firefox 57, having the backdrop be `background: none` will prevent it from
|
|
100
105
|
// capturing the user's mouse scroll events. Since we also can't use something like
|
|
101
106
|
// `rgba(0, 0, 0, 0)`, we work around the inconsistency by not setting the background at
|
|
102
107
|
// all and using `opacity` to make the element transparent.
|
|
103
|
-
|
|
108
|
+
&.cdk-overlay-backdrop-showing {
|
|
104
109
|
opacity: 0;
|
|
110
|
+
visibility: visible;
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
|
|
114
|
+
.cdk-overlay-backdrop-noop-animation {
|
|
115
|
+
transition: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
108
118
|
// Overlay parent element used with the connected position strategy. Used to constrain the
|
|
109
119
|
// overlay element's size to fit within the viewport.
|
|
110
120
|
.cdk-overlay-connected-position-bounding-box {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
1
2
|
import { OverlayReference } from '../overlay-reference';
|
|
2
3
|
import { BaseOverlayDispatcher } from './base-overlay-dispatcher';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
@@ -7,13 +8,17 @@ import * as i0 from "@angular/core";
|
|
|
7
8
|
* on event target and order of overlay opens.
|
|
8
9
|
*/
|
|
9
10
|
export declare class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
10
|
-
|
|
11
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
12
|
+
private _ngZone?;
|
|
13
|
+
constructor(document: any,
|
|
14
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
15
|
+
_ngZone?: NgZone | undefined);
|
|
11
16
|
/** Add a new overlay to the list of attached overlay refs. */
|
|
12
17
|
add(overlayRef: OverlayReference): void;
|
|
13
18
|
/** Detaches the global keyboard event listener. */
|
|
14
19
|
protected detach(): void;
|
|
15
20
|
/** Keyboard event listener that will be attached to the body. */
|
|
16
21
|
private _keydownListener;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayKeyboardDispatcher,
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayKeyboardDispatcher, [null, { optional: true; }]>;
|
|
18
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<OverlayKeyboardDispatcher>;
|
|
19
24
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
1
2
|
import { OverlayReference } from '../overlay-reference';
|
|
2
3
|
import { Platform } from '@angular/cdk/platform';
|
|
3
4
|
import { BaseOverlayDispatcher } from './base-overlay-dispatcher';
|
|
@@ -9,18 +10,23 @@ import * as i0 from "@angular/core";
|
|
|
9
10
|
*/
|
|
10
11
|
export declare class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
11
12
|
private _platform;
|
|
13
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
14
|
+
private _ngZone?;
|
|
12
15
|
private _cursorOriginalValue;
|
|
13
16
|
private _cursorStyleIsSet;
|
|
14
17
|
private _pointerDownEventTarget;
|
|
15
|
-
constructor(document: any, _platform: Platform
|
|
18
|
+
constructor(document: any, _platform: Platform,
|
|
19
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
20
|
+
_ngZone?: NgZone | undefined);
|
|
16
21
|
/** Add a new overlay to the list of attached overlay refs. */
|
|
17
22
|
add(overlayRef: OverlayReference): void;
|
|
18
23
|
/** Detaches the global keyboard event listener. */
|
|
19
24
|
protected detach(): void;
|
|
25
|
+
private _addEventListeners;
|
|
20
26
|
/** Store pointerdown event target to track origin of click. */
|
|
21
27
|
private _pointerDownListener;
|
|
22
28
|
/** Click event listener that will be attached to the body propagate phase. */
|
|
23
29
|
private _clickListener;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayOutsideClickDispatcher,
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayOutsideClickDispatcher, [null, null, { optional: true; }]>;
|
|
25
31
|
static ɵprov: i0.ɵɵInjectableDeclaration<OverlayOutsideClickDispatcher>;
|
|
26
32
|
}
|
|
@@ -27,7 +27,7 @@ export declare class CdkOverlayOrigin {
|
|
|
27
27
|
/** Reference to the element on which the directive is applied. */
|
|
28
28
|
elementRef: ElementRef);
|
|
29
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkOverlayOrigin, never>;
|
|
30
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkOverlayOrigin, "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", ["cdkOverlayOrigin"], {}, {}, never>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkOverlayOrigin, "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", ["cdkOverlayOrigin"], {}, {}, never, never, false>;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Directive to facilitate declarative creation of an
|
|
@@ -136,7 +136,7 @@ export declare class CdkConnectedOverlay implements OnDestroy, OnChanges {
|
|
|
136
136
|
/** Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists */
|
|
137
137
|
private _detachOverlay;
|
|
138
138
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkConnectedOverlay, [null, null, null, null, { optional: true; }]>;
|
|
139
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkConnectedOverlay, "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", ["cdkConnectedOverlay"], { "origin": "cdkConnectedOverlayOrigin"; "positions": "cdkConnectedOverlayPositions"; "positionStrategy": "cdkConnectedOverlayPositionStrategy"; "offsetX": "cdkConnectedOverlayOffsetX"; "offsetY": "cdkConnectedOverlayOffsetY"; "width": "cdkConnectedOverlayWidth"; "height": "cdkConnectedOverlayHeight"; "minWidth": "cdkConnectedOverlayMinWidth"; "minHeight": "cdkConnectedOverlayMinHeight"; "backdropClass": "cdkConnectedOverlayBackdropClass"; "panelClass": "cdkConnectedOverlayPanelClass"; "viewportMargin": "cdkConnectedOverlayViewportMargin"; "scrollStrategy": "cdkConnectedOverlayScrollStrategy"; "open": "cdkConnectedOverlayOpen"; "disableClose": "cdkConnectedOverlayDisableClose"; "transformOriginSelector": "cdkConnectedOverlayTransformOriginOn"; "hasBackdrop": "cdkConnectedOverlayHasBackdrop"; "lockPosition": "cdkConnectedOverlayLockPosition"; "flexibleDimensions": "cdkConnectedOverlayFlexibleDimensions"; "growAfterOpen": "cdkConnectedOverlayGrowAfterOpen"; "push": "cdkConnectedOverlayPush"; }, { "backdropClick": "backdropClick"; "positionChange": "positionChange"; "attach": "attach"; "detach": "detach"; "overlayKeydown": "overlayKeydown"; "overlayOutsideClick": "overlayOutsideClick"; }, never>;
|
|
139
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkConnectedOverlay, "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", ["cdkConnectedOverlay"], { "origin": "cdkConnectedOverlayOrigin"; "positions": "cdkConnectedOverlayPositions"; "positionStrategy": "cdkConnectedOverlayPositionStrategy"; "offsetX": "cdkConnectedOverlayOffsetX"; "offsetY": "cdkConnectedOverlayOffsetY"; "width": "cdkConnectedOverlayWidth"; "height": "cdkConnectedOverlayHeight"; "minWidth": "cdkConnectedOverlayMinWidth"; "minHeight": "cdkConnectedOverlayMinHeight"; "backdropClass": "cdkConnectedOverlayBackdropClass"; "panelClass": "cdkConnectedOverlayPanelClass"; "viewportMargin": "cdkConnectedOverlayViewportMargin"; "scrollStrategy": "cdkConnectedOverlayScrollStrategy"; "open": "cdkConnectedOverlayOpen"; "disableClose": "cdkConnectedOverlayDisableClose"; "transformOriginSelector": "cdkConnectedOverlayTransformOriginOn"; "hasBackdrop": "cdkConnectedOverlayHasBackdrop"; "lockPosition": "cdkConnectedOverlayLockPosition"; "flexibleDimensions": "cdkConnectedOverlayFlexibleDimensions"; "growAfterOpen": "cdkConnectedOverlayGrowAfterOpen"; "push": "cdkConnectedOverlayPush"; }, { "backdropClick": "backdropClick"; "positionChange": "positionChange"; "attach": "attach"; "detach": "detach"; "overlayKeydown": "overlayKeydown"; "overlayOutsideClick": "overlayOutsideClick"; }, never, never, false>;
|
|
140
140
|
}
|
|
141
141
|
/** @docs-private */
|
|
142
142
|
export declare function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => RepositionScrollStrategy;
|
package/overlay/overlay-ref.d.ts
CHANGED
|
@@ -34,7 +34,9 @@ export declare class OverlayRef implements PortalOutlet, OverlayReference {
|
|
|
34
34
|
private _document;
|
|
35
35
|
private _location;
|
|
36
36
|
private _outsideClickDispatcher;
|
|
37
|
+
private _animationsDisabled;
|
|
37
38
|
private _backdropElement;
|
|
39
|
+
private _backdropTimeout;
|
|
38
40
|
private readonly _backdropClick;
|
|
39
41
|
private readonly _attachments;
|
|
40
42
|
private readonly _detachments;
|
|
@@ -42,6 +44,7 @@ export declare class OverlayRef implements PortalOutlet, OverlayReference {
|
|
|
42
44
|
private _scrollStrategy;
|
|
43
45
|
private _locationChanges;
|
|
44
46
|
private _backdropClickHandler;
|
|
47
|
+
private _backdropTransitionendHandler;
|
|
45
48
|
/**
|
|
46
49
|
* Reference to the parent of the `_host` at the time it was detached. Used to restore
|
|
47
50
|
* the `_host` to its original position in the DOM when it gets re-attached.
|
|
@@ -51,7 +54,7 @@ export declare class OverlayRef implements PortalOutlet, OverlayReference {
|
|
|
51
54
|
readonly _keydownEvents: Subject<KeyboardEvent>;
|
|
52
55
|
/** Stream of mouse outside events dispatched to this overlay. */
|
|
53
56
|
readonly _outsidePointerEvents: Subject<MouseEvent>;
|
|
54
|
-
constructor(_portalOutlet: PortalOutlet, _host: HTMLElement, _pane: HTMLElement, _config: ImmutableObject<OverlayConfig>, _ngZone: NgZone, _keyboardDispatcher: OverlayKeyboardDispatcher, _document: Document, _location: Location, _outsideClickDispatcher: OverlayOutsideClickDispatcher);
|
|
57
|
+
constructor(_portalOutlet: PortalOutlet, _host: HTMLElement, _pane: HTMLElement, _config: ImmutableObject<OverlayConfig>, _ngZone: NgZone, _keyboardDispatcher: OverlayKeyboardDispatcher, _document: Document, _location: Location, _outsideClickDispatcher: OverlayOutsideClickDispatcher, _animationsDisabled?: boolean);
|
|
55
58
|
/** The overlay's HTML element */
|
|
56
59
|
get overlayElement(): HTMLElement;
|
|
57
60
|
/** The overlay's backdrop HTML element. */
|
package/overlay/overlay.d.ts
CHANGED
|
@@ -37,10 +37,11 @@ export declare class Overlay {
|
|
|
37
37
|
private _directionality;
|
|
38
38
|
private _location;
|
|
39
39
|
private _outsideClickDispatcher;
|
|
40
|
+
private _animationsModuleType?;
|
|
40
41
|
private _appRef;
|
|
41
42
|
constructor(
|
|
42
43
|
/** Scrolling strategies that can be used when creating an overlay. */
|
|
43
|
-
scrollStrategies: ScrollStrategyOptions, _overlayContainer: OverlayContainer, _componentFactoryResolver: ComponentFactoryResolver, _positionBuilder: OverlayPositionBuilder, _keyboardDispatcher: OverlayKeyboardDispatcher, _injector: Injector, _ngZone: NgZone, _document: any, _directionality: Directionality, _location: Location, _outsideClickDispatcher: OverlayOutsideClickDispatcher);
|
|
44
|
+
scrollStrategies: ScrollStrategyOptions, _overlayContainer: OverlayContainer, _componentFactoryResolver: ComponentFactoryResolver, _positionBuilder: OverlayPositionBuilder, _keyboardDispatcher: OverlayKeyboardDispatcher, _injector: Injector, _ngZone: NgZone, _document: any, _directionality: Directionality, _location: Location, _outsideClickDispatcher: OverlayOutsideClickDispatcher, _animationsModuleType?: string | undefined);
|
|
44
45
|
/**
|
|
45
46
|
* Creates an overlay.
|
|
46
47
|
* @param config Configuration applied to the overlay.
|
|
@@ -70,6 +71,6 @@ export declare class Overlay {
|
|
|
70
71
|
* @returns A portal outlet for the given DOM element.
|
|
71
72
|
*/
|
|
72
73
|
private _createPortalOutlet;
|
|
73
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Overlay,
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Overlay, [null, null, null, null, null, null, null, null, null, null, null, { optional: true; }]>;
|
|
74
75
|
static ɵprov: i0.ɵɵInjectableDeclaration<Overlay>;
|
|
75
76
|
}
|
|
@@ -277,4 +277,6 @@ export interface ConnectedPosition {
|
|
|
277
277
|
offsetY?: number;
|
|
278
278
|
panelClass?: string | string[];
|
|
279
279
|
}
|
|
280
|
+
export declare const STANDARD_DROPDOWN_BELOW_POSITIONS: ConnectedPosition[];
|
|
281
|
+
export declare const STANDARD_DROPDOWN_ADJACENT_POSITIONS: ConnectedPosition[];
|
|
280
282
|
export {};
|