@angular/cdk-experimental 13.0.0-next.7 → 13.0.0-rc.2
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/column-resize/column-resize-directives/column-resize-flex.d.ts +3 -0
- package/column-resize/column-resize-directives/column-resize.d.ts +3 -0
- package/column-resize/column-resize-directives/default-enabled-column-resize-flex.d.ts +3 -0
- package/column-resize/column-resize-directives/default-enabled-column-resize.d.ts +3 -0
- package/column-resize/column-resize-module.d.ts +11 -7
- package/column-resize/column-resize-notifier.d.ts +5 -7
- package/column-resize/column-resize.d.ts +3 -0
- package/column-resize/column-resize_public_index.d.ts +4 -0
- package/column-resize/column-size-store.d.ts +3 -7
- package/column-resize/event-dispatcher.d.ts +3 -0
- package/column-resize/index.d.ts +5 -2
- package/column-resize/overlay-handle.d.ts +3 -0
- package/column-resize/package.json +6 -6
- package/column-resize/resizable.d.ts +3 -0
- package/column-resize/resize-strategy.d.ts +7 -0
- package/combobox/combobox-module.d.ts +8 -7
- package/combobox/combobox-panel.d.ts +5 -2
- package/combobox/combobox-popup.d.ts +3 -0
- package/combobox/combobox.d.ts +8 -5
- package/combobox/combobox_public_index.d.ts +4 -0
- package/combobox/index.d.ts +5 -1
- package/combobox/package.json +6 -6
- package/dialog/dialog-container.d.ts +4 -1
- package/dialog/dialog-module.d.ts +8 -7
- package/dialog/dialog.d.ts +3 -0
- package/dialog/dialog_public_index.d.ts +4 -0
- package/dialog/index.d.ts +5 -1
- package/dialog/package.json +6 -6
- package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +42 -0
- package/esm2020/column-resize/column-resize-directives/column-resize.mjs +42 -0
- package/{esm2015/column-resize/column-resize-directives/constants.js → esm2020/column-resize/column-resize-directives/constants.mjs} +0 -0
- package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +48 -0
- package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +48 -0
- package/esm2020/column-resize/column-resize-module.mjs +46 -0
- package/esm2020/column-resize/column-resize-notifier.mjs +52 -0
- package/esm2020/column-resize/column-resize.mjs +82 -0
- package/esm2020/column-resize/column-resize_public_index.mjs +5 -0
- package/esm2020/column-resize/column-size-store.mjs +20 -0
- package/esm2020/column-resize/event-dispatcher.mjs +70 -0
- package/esm2020/column-resize/index.mjs +9 -0
- package/esm2020/column-resize/overlay-handle.mjs +146 -0
- package/{esm2015/column-resize/public-api.js → esm2020/column-resize/public-api.mjs} +0 -0
- package/esm2020/column-resize/resizable.mjs +195 -0
- package/{esm2015/column-resize/resize-ref.js → esm2020/column-resize/resize-ref.mjs} +1 -1
- package/esm2020/column-resize/resize-strategy.mjs +230 -0
- package/{esm2015/column-resize/selectors.js → esm2020/column-resize/selectors.mjs} +0 -0
- package/esm2020/combobox/combobox-module.mjs +28 -0
- package/esm2020/combobox/combobox-panel.mjs +48 -0
- package/esm2020/combobox/combobox-popup.mjs +83 -0
- package/esm2020/combobox/combobox.mjs +261 -0
- package/esm2020/combobox/combobox_public_index.mjs +5 -0
- package/esm2020/combobox/index.mjs +9 -0
- package/{esm2015/combobox/public-api.js → esm2020/combobox/public-api.mjs} +0 -0
- package/{esm2015/dialog/dialog-config.js → esm2020/dialog/dialog-config.mjs} +0 -0
- package/esm2020/dialog/dialog-container.mjs +310 -0
- package/esm2020/dialog/dialog-injectors.mjs +30 -0
- package/esm2020/dialog/dialog-module.mjs +57 -0
- package/esm2020/dialog/dialog-ref.mjs +116 -0
- package/esm2020/dialog/dialog.mjs +252 -0
- package/esm2020/dialog/dialog_public_index.mjs +5 -0
- package/esm2020/dialog/index.mjs +9 -0
- package/{esm2015/dialog/public-api.js → esm2020/dialog/public-api.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/esm2020/listbox/index.mjs +9 -0
- package/esm2020/listbox/listbox-module.mjs +24 -0
- package/esm2020/listbox/listbox.mjs +499 -0
- package/esm2020/listbox/listbox_public_index.mjs +5 -0
- package/{esm2015/listbox/public-api.js → esm2020/listbox/public-api.mjs} +0 -0
- package/esm2020/menu/context-menu.mjs +287 -0
- package/esm2020/menu/index.mjs +9 -0
- package/esm2020/menu/menu-aim.mjs +199 -0
- package/esm2020/menu/menu-bar.mjs +272 -0
- package/{esm2015/menu/menu-errors.js → esm2020/menu/menu-errors.mjs} +1 -1
- package/esm2020/menu/menu-group.mjs +68 -0
- package/{esm2015/menu/menu-interface.js → esm2020/menu/menu-interface.mjs} +0 -0
- package/esm2020/menu/menu-item-checkbox.mjs +48 -0
- package/esm2020/menu/menu-item-radio.mjs +90 -0
- package/esm2020/menu/menu-item-selectable.mjs +57 -0
- package/esm2020/menu/menu-item-trigger.mjs +361 -0
- package/esm2020/menu/menu-item.mjs +291 -0
- package/esm2020/menu/menu-module.mjs +64 -0
- package/esm2020/menu/menu-panel.mjs +37 -0
- package/{esm2015/menu/menu-stack.js → esm2020/menu/menu-stack.mjs} +0 -0
- package/esm2020/menu/menu.mjs +316 -0
- package/esm2020/menu/menu_public_index.mjs +5 -0
- package/{esm2015/menu/pointer-focus-tracker.js → esm2020/menu/pointer-focus-tracker.mjs} +1 -1
- package/{esm2015/menu/public-api.js → esm2020/menu/public-api.mjs} +0 -0
- package/{esm2015/popover-edit/constants.js → esm2020/popover-edit/constants.mjs} +0 -0
- package/esm2020/popover-edit/edit-event-dispatcher.mjs +215 -0
- package/esm2020/popover-edit/edit-ref.mjs +84 -0
- package/esm2020/popover-edit/edit-services.mjs +48 -0
- package/esm2020/popover-edit/focus-dispatcher.mjs +82 -0
- package/esm2020/popover-edit/focus-escape-notifier.mjs +63 -0
- package/{esm2015/popover-edit/form-value-container.js → esm2020/popover-edit/form-value-container.mjs} +0 -0
- package/esm2020/popover-edit/index.mjs +9 -0
- package/esm2020/popover-edit/lens-directives.mjs +210 -0
- package/esm2020/popover-edit/polyfill.mjs +37 -0
- package/esm2020/popover-edit/popover-edit-module.mjs +62 -0
- package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +76 -0
- package/esm2020/popover-edit/popover-edit_public_index.mjs +5 -0
- package/{esm2015/popover-edit/public-api.js → esm2020/popover-edit/public-api.mjs} +0 -0
- package/esm2020/popover-edit/table-directives.mjs +400 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/esm2020/scrolling/auto-size-virtual-scroll.mjs +421 -0
- package/esm2020/scrolling/index.mjs +9 -0
- package/{esm2015/scrolling/public-api.js → esm2020/scrolling/public-api.mjs} +0 -0
- package/esm2020/scrolling/scrolling-module.mjs +23 -0
- package/esm2020/scrolling/scrolling_public_index.mjs +5 -0
- package/esm2020/selection/index.mjs +9 -0
- package/{esm2015/selection/public-api.js → esm2020/selection/public-api.mjs} +0 -0
- package/esm2020/selection/row-selection.mjs +49 -0
- package/esm2020/selection/select-all.mjs +109 -0
- package/esm2020/selection/selection-column.mjs +134 -0
- package/esm2020/selection/selection-module.mjs +40 -0
- package/{esm2015/selection/selection-set.js → esm2020/selection/selection-set.mjs} +1 -1
- package/esm2020/selection/selection-toggle.mjs +101 -0
- package/esm2020/selection/selection.mjs +186 -0
- package/esm2020/selection/selection_public_index.mjs +5 -0
- package/esm2020/table-scroll-container/index.mjs +9 -0
- package/{esm2015/table-scroll-container/public-api.js → esm2020/table-scroll-container/public-api.mjs} +0 -0
- package/esm2020/table-scroll-container/table-scroll-container-module.mjs +23 -0
- package/esm2020/table-scroll-container/table-scroll-container.mjs +131 -0
- package/esm2020/table-scroll-container/table-scroll-container_public_index.mjs +5 -0
- package/{esm2015/version.js → esm2020/version.mjs} +1 -1
- package/fesm2015/{cdk-experimental.js → cdk-experimental.mjs} +2 -2
- package/fesm2015/cdk-experimental.mjs.map +1 -0
- package/fesm2015/{column-resize.js → column-resize.mjs} +213 -175
- package/fesm2015/column-resize.mjs.map +1 -0
- package/fesm2015/{combobox.js → combobox.mjs} +134 -102
- package/fesm2015/combobox.mjs.map +1 -0
- package/fesm2015/dialog.mjs +813 -0
- package/fesm2015/dialog.mjs.map +1 -0
- package/fesm2015/{listbox.js → listbox.mjs} +128 -91
- package/fesm2015/listbox.mjs.map +1 -0
- package/fesm2015/{menu.js → menu.mjs} +576 -397
- package/fesm2015/menu.mjs.map +1 -0
- package/fesm2015/{popover-edit.js → popover-edit.mjs} +257 -230
- package/fesm2015/popover-edit.mjs.map +1 -0
- package/fesm2015/{scrolling.js → scrolling.mjs} +66 -36
- package/fesm2015/scrolling.mjs.map +1 -0
- package/fesm2015/selection.mjs +693 -0
- package/fesm2015/selection.mjs.map +1 -0
- package/fesm2015/{table-scroll-container.js → table-scroll-container.mjs} +43 -30
- package/fesm2015/table-scroll-container.mjs.map +1 -0
- package/fesm2020/cdk-experimental.mjs +30 -0
- package/fesm2020/cdk-experimental.mjs.map +1 -0
- package/fesm2020/column-resize.mjs +1016 -0
- package/fesm2020/column-resize.mjs.map +1 -0
- package/fesm2020/combobox.mjs +430 -0
- package/fesm2020/combobox.mjs.map +1 -0
- package/{fesm2015/dialog.js → fesm2020/dialog.mjs} +156 -104
- package/fesm2020/dialog.mjs.map +1 -0
- package/fesm2020/listbox.mjs +541 -0
- package/fesm2020/listbox.mjs.map +1 -0
- package/fesm2020/menu.mjs +2202 -0
- package/fesm2020/menu.mjs.map +1 -0
- package/fesm2020/popover-edit.mjs +1289 -0
- package/fesm2020/popover-edit.mjs.map +1 -0
- package/fesm2020/scrolling.mjs +464 -0
- package/fesm2020/scrolling.mjs.map +1 -0
- package/{fesm2015/selection.js → fesm2020/selection.mjs} +195 -107
- package/fesm2020/selection.mjs.map +1 -0
- package/fesm2020/table-scroll-container.mjs +173 -0
- package/fesm2020/table-scroll-container.mjs.map +1 -0
- package/listbox/index.d.ts +5 -1
- package/listbox/listbox-module.d.ts +5 -7
- package/listbox/listbox.d.ts +5 -0
- package/listbox/listbox_public_index.d.ts +4 -0
- package/listbox/package.json +6 -6
- package/menu/context-menu.d.ts +5 -0
- package/menu/index.d.ts +5 -3
- package/menu/menu-aim.d.ts +5 -0
- package/menu/menu-bar.d.ts +3 -0
- package/menu/menu-group.d.ts +3 -0
- package/menu/menu-item-checkbox.d.ts +3 -7
- package/menu/menu-item-radio.d.ts +3 -0
- package/menu/menu-item-selectable.d.ts +3 -0
- package/menu/menu-item-trigger.d.ts +3 -0
- package/menu/menu-item.d.ts +3 -0
- package/menu/menu-module.d.ts +15 -7
- package/menu/menu-panel.d.ts +3 -0
- package/menu/menu.d.ts +3 -0
- package/menu/menu_public_index.d.ts +4 -0
- package/menu/package.json +6 -6
- package/package.json +94 -8
- package/popover-edit/edit-event-dispatcher.d.ts +3 -0
- package/popover-edit/edit-ref.d.ts +3 -0
- package/popover-edit/edit-services.d.ts +3 -0
- package/popover-edit/focus-dispatcher.d.ts +3 -0
- package/popover-edit/focus-escape-notifier.d.ts +3 -0
- package/popover-edit/index.d.ts +5 -3
- package/popover-edit/lens-directives.d.ts +7 -0
- package/popover-edit/package.json +6 -6
- package/popover-edit/popover-edit-module.d.ts +7 -7
- package/popover-edit/popover-edit-position-strategy-factory.d.ts +5 -0
- package/popover-edit/popover-edit_public_index.d.ts +4 -0
- package/popover-edit/table-directives.d.ts +11 -0
- package/scrolling/auto-size-virtual-scroll.d.ts +3 -0
- package/scrolling/index.d.ts +5 -1
- package/scrolling/package.json +6 -6
- package/scrolling/scrolling-module.d.ts +5 -7
- package/scrolling/scrolling_public_index.d.ts +4 -0
- package/selection/index.d.ts +5 -1
- package/selection/package.json +6 -6
- package/selection/row-selection.d.ts +3 -0
- package/selection/select-all.d.ts +3 -0
- package/selection/selection-column.d.ts +3 -0
- package/selection/selection-module.d.ts +11 -7
- package/selection/selection-toggle.d.ts +3 -0
- package/selection/selection.d.ts +3 -0
- package/selection/selection_public_index.d.ts +4 -0
- package/table-scroll-container/index.d.ts +5 -1
- package/table-scroll-container/package.json +6 -6
- package/table-scroll-container/table-scroll-container-module.d.ts +5 -7
- package/table-scroll-container/table-scroll-container.d.ts +3 -0
- package/table-scroll-container/table-scroll-container_public_index.d.ts +4 -0
- package/bundles/cdk-experimental-column-resize.umd.js +0 -1324
- package/bundles/cdk-experimental-column-resize.umd.js.map +0 -1
- package/bundles/cdk-experimental-combobox.umd.js +0 -443
- package/bundles/cdk-experimental-combobox.umd.js.map +0 -1
- package/bundles/cdk-experimental-dialog.umd.js +0 -1113
- package/bundles/cdk-experimental-dialog.umd.js.map +0 -1
- package/bundles/cdk-experimental-listbox.umd.js +0 -935
- package/bundles/cdk-experimental-listbox.umd.js.map +0 -1
- package/bundles/cdk-experimental-menu.umd.js +0 -2461
- package/bundles/cdk-experimental-menu.umd.js.map +0 -1
- package/bundles/cdk-experimental-popover-edit.umd.js +0 -1679
- package/bundles/cdk-experimental-popover-edit.umd.js.map +0 -1
- package/bundles/cdk-experimental-scrolling.umd.js +0 -459
- package/bundles/cdk-experimental-scrolling.umd.js.map +0 -1
- package/bundles/cdk-experimental-selection.umd.js +0 -961
- package/bundles/cdk-experimental-selection.umd.js.map +0 -1
- package/bundles/cdk-experimental-table-scroll-container.umd.js +0 -499
- package/bundles/cdk-experimental-table-scroll-container.umd.js.map +0 -1
- package/bundles/cdk-experimental.umd.js +0 -38
- package/bundles/cdk-experimental.umd.js.map +0 -1
- package/column-resize/index.metadata.json +0 -1
- package/combobox/index.metadata.json +0 -1
- package/dialog/index.metadata.json +0 -1
- package/esm2015/cdk-experimental.externs.js +0 -0
- package/esm2015/column-resize/column-resize-directives/column-resize-flex.js +0 -46
- package/esm2015/column-resize/column-resize-directives/column-resize.js +0 -46
- package/esm2015/column-resize/column-resize-directives/default-enabled-column-resize-flex.js +0 -46
- package/esm2015/column-resize/column-resize-directives/default-enabled-column-resize.js +0 -46
- package/esm2015/column-resize/column-resize-module.js +0 -37
- package/esm2015/column-resize/column-resize-notifier.js +0 -45
- package/esm2015/column-resize/column-resize.externs.js +0 -6
- package/esm2015/column-resize/column-resize.js +0 -71
- package/esm2015/column-resize/column-size-store.js +0 -17
- package/esm2015/column-resize/event-dispatcher.js +0 -70
- package/esm2015/column-resize/index.js +0 -6
- package/esm2015/column-resize/overlay-handle.js +0 -139
- package/esm2015/column-resize/resizable.js +0 -185
- package/esm2015/column-resize/resize-strategy.js +0 -227
- package/esm2015/combobox/combobox-module.js +0 -23
- package/esm2015/combobox/combobox-panel.js +0 -55
- package/esm2015/combobox/combobox-popup.js +0 -74
- package/esm2015/combobox/combobox.externs.js +0 -6
- package/esm2015/combobox/combobox.js +0 -248
- package/esm2015/combobox/index.js +0 -5
- package/esm2015/dialog/dialog-container.js +0 -289
- package/esm2015/dialog/dialog-injectors.js +0 -30
- package/esm2015/dialog/dialog-module.js +0 -47
- package/esm2015/dialog/dialog-ref.js +0 -115
- package/esm2015/dialog/dialog.externs.js +0 -6
- package/esm2015/dialog/dialog.js +0 -238
- package/esm2015/dialog/index.js +0 -5
- package/esm2015/listbox/index.js +0 -5
- package/esm2015/listbox/listbox-module.js +0 -19
- package/esm2015/listbox/listbox.externs.js +0 -6
- package/esm2015/listbox/listbox.js +0 -481
- package/esm2015/menu/context-menu.js +0 -280
- package/esm2015/menu/index.js +0 -6
- package/esm2015/menu/menu-aim.js +0 -195
- package/esm2015/menu/menu-bar.js +0 -252
- package/esm2015/menu/menu-group.js +0 -63
- package/esm2015/menu/menu-item-checkbox.js +0 -41
- package/esm2015/menu/menu-item-radio.js +0 -73
- package/esm2015/menu/menu-item-selectable.js +0 -51
- package/esm2015/menu/menu-item-trigger.js +0 -354
- package/esm2015/menu/menu-item.js +0 -253
- package/esm2015/menu/menu-module.js +0 -41
- package/esm2015/menu/menu-panel.js +0 -37
- package/esm2015/menu/menu.externs.js +0 -6
- package/esm2015/menu/menu.js +0 -293
- package/esm2015/popover-edit/edit-event-dispatcher.js +0 -215
- package/esm2015/popover-edit/edit-ref.js +0 -82
- package/esm2015/popover-edit/edit-services.js +0 -49
- package/esm2015/popover-edit/focus-dispatcher.js +0 -83
- package/esm2015/popover-edit/focus-escape-notifier.js +0 -64
- package/esm2015/popover-edit/index.js +0 -7
- package/esm2015/popover-edit/lens-directives.js +0 -199
- package/esm2015/popover-edit/polyfill.js +0 -35
- package/esm2015/popover-edit/popover-edit-module.js +0 -38
- package/esm2015/popover-edit/popover-edit-position-strategy-factory.js +0 -70
- package/esm2015/popover-edit/popover-edit.externs.js +0 -6
- package/esm2015/popover-edit/table-directives.js +0 -390
- package/esm2015/scrolling/auto-size-virtual-scroll.js +0 -403
- package/esm2015/scrolling/index.js +0 -5
- package/esm2015/scrolling/scrolling-module.js +0 -18
- package/esm2015/scrolling/scrolling.externs.js +0 -6
- package/esm2015/selection/index.js +0 -5
- package/esm2015/selection/row-selection.js +0 -41
- package/esm2015/selection/select-all.js +0 -96
- package/esm2015/selection/selection-column.js +0 -93
- package/esm2015/selection/selection-module.js +0 -40
- package/esm2015/selection/selection-toggle.js +0 -82
- package/esm2015/selection/selection.externs.js +0 -6
- package/esm2015/selection/selection.js +0 -176
- package/esm2015/table-scroll-container/index.js +0 -5
- package/esm2015/table-scroll-container/table-scroll-container-module.js +0 -18
- package/esm2015/table-scroll-container/table-scroll-container.externs.js +0 -6
- package/esm2015/table-scroll-container/table-scroll-container.js +0 -133
- package/fesm2015/cdk-experimental.js.map +0 -1
- package/fesm2015/column-resize.js.map +0 -1
- package/fesm2015/combobox.js.map +0 -1
- package/fesm2015/dialog.js.map +0 -1
- package/fesm2015/listbox.js.map +0 -1
- package/fesm2015/menu.js.map +0 -1
- package/fesm2015/popover-edit.js.map +0 -1
- package/fesm2015/scrolling.js.map +0 -1
- package/fesm2015/selection.js.map +0 -1
- package/fesm2015/table-scroll-container.js.map +0 -1
- package/listbox/index.metadata.json +0 -1
- package/menu/index.metadata.json +0 -1
- package/popover-edit/index.metadata.json +0 -1
- package/scrolling/index.metadata.json +0 -1
- package/selection/index.metadata.json +0 -1
- package/table-scroll-container/index.metadata.json +0 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable,
|
|
3
|
-
import
|
|
2
|
+
import { InjectionToken, Injectable, Directive, EventEmitter, Optional, Inject, Input, Output, Self, HostListener, ContentChildren, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
4
|
+
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
4
5
|
import { FocusKeyManager } from '@angular/cdk/a11y';
|
|
5
6
|
import { UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, TAB, ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
6
|
-
import { Directionality } from '@angular/cdk/bidi';
|
|
7
7
|
import { Subject, fromEvent, merge, defer } from 'rxjs';
|
|
8
8
|
import { filter, takeUntil, startWith, mergeMap, mapTo, mergeAll, take, switchMap } from 'rxjs/operators';
|
|
9
|
+
import * as i1$1 from '@angular/cdk/collections';
|
|
9
10
|
import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
|
|
10
11
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
12
|
+
import * as i2 from '@angular/cdk/bidi';
|
|
11
13
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -20,111 +22,6 @@ import { TemplatePortal } from '@angular/cdk/portal';
|
|
|
20
22
|
/** Injection token used to return classes implementing the Menu interface */
|
|
21
23
|
const CDK_MENU = new InjectionToken('cdk-menu');
|
|
22
24
|
|
|
23
|
-
/**
|
|
24
|
-
* @license
|
|
25
|
-
* Copyright Google LLC All Rights Reserved.
|
|
26
|
-
*
|
|
27
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
28
|
-
* found in the LICENSE file at https://angular.io/license
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* MenuStack allows subscribers to listen for close events (when a MenuStackItem is popped off
|
|
32
|
-
* of the stack) in order to perform closing actions. Upon the MenuStack being empty it emits
|
|
33
|
-
* from the `empty` observable specifying the next focus action which the listener should perform
|
|
34
|
-
* as requested by the closer.
|
|
35
|
-
*/
|
|
36
|
-
class MenuStack {
|
|
37
|
-
constructor() {
|
|
38
|
-
/** All MenuStackItems tracked by this MenuStack. */
|
|
39
|
-
this._elements = [];
|
|
40
|
-
/** Emits the element which was popped off of the stack when requested by a closer. */
|
|
41
|
-
this._close = new Subject();
|
|
42
|
-
/** Emits once the MenuStack has become empty after popping off elements. */
|
|
43
|
-
this._empty = new Subject();
|
|
44
|
-
/** Observable which emits the MenuStackItem which has been requested to close. */
|
|
45
|
-
this.closed = this._close;
|
|
46
|
-
/**
|
|
47
|
-
* Observable which emits when the MenuStack is empty after popping off the last element. It
|
|
48
|
-
* emits a FocusNext event which specifies the action the closer has requested the listener
|
|
49
|
-
* perform.
|
|
50
|
-
*/
|
|
51
|
-
this.emptied = this._empty;
|
|
52
|
-
}
|
|
53
|
-
/** @param menu the MenuStackItem to put on the stack. */
|
|
54
|
-
push(menu) {
|
|
55
|
-
this._elements.push(menu);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Pop items off of the stack up to and including `lastItem` and emit each on the close
|
|
59
|
-
* observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
|
|
60
|
-
* @param lastItem the last item to pop off the stack.
|
|
61
|
-
* @param focusNext the event to emit on the `empty` observable if the method call resulted in an
|
|
62
|
-
* empty stack. Does not emit if the stack was initially empty or if `lastItem` was not on the
|
|
63
|
-
* stack.
|
|
64
|
-
*/
|
|
65
|
-
close(lastItem, focusNext) {
|
|
66
|
-
if (this._elements.indexOf(lastItem) >= 0) {
|
|
67
|
-
let poppedElement;
|
|
68
|
-
do {
|
|
69
|
-
poppedElement = this._elements.pop();
|
|
70
|
-
this._close.next(poppedElement);
|
|
71
|
-
} while (poppedElement !== lastItem);
|
|
72
|
-
if (this.isEmpty()) {
|
|
73
|
-
this._empty.next(focusNext);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Pop items off of the stack up to but excluding `lastItem` and emit each on the close
|
|
79
|
-
* observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
|
|
80
|
-
* @param lastItem the element which should be left on the stack
|
|
81
|
-
* @return whether or not an item was removed from the stack
|
|
82
|
-
*/
|
|
83
|
-
closeSubMenuOf(lastItem) {
|
|
84
|
-
let removed = false;
|
|
85
|
-
if (this._elements.indexOf(lastItem) >= 0) {
|
|
86
|
-
removed = this.peek() !== lastItem;
|
|
87
|
-
while (this.peek() !== lastItem) {
|
|
88
|
-
this._close.next(this._elements.pop());
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return removed;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Pop off all MenuStackItems and emit each one on the `close` observable one by one.
|
|
95
|
-
* @param focusNext the event to emit on the `empty` observable once the stack is emptied. Does
|
|
96
|
-
* not emit if the stack was initially empty.
|
|
97
|
-
*/
|
|
98
|
-
closeAll(focusNext) {
|
|
99
|
-
if (!this.isEmpty()) {
|
|
100
|
-
while (!this.isEmpty()) {
|
|
101
|
-
const menuStackItem = this._elements.pop();
|
|
102
|
-
if (menuStackItem) {
|
|
103
|
-
this._close.next(menuStackItem);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
this._empty.next(focusNext);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
/** Return true if this stack is empty. */
|
|
110
|
-
isEmpty() {
|
|
111
|
-
return !this._elements.length;
|
|
112
|
-
}
|
|
113
|
-
/** Return the length of the stack. */
|
|
114
|
-
length() {
|
|
115
|
-
return this._elements.length;
|
|
116
|
-
}
|
|
117
|
-
/** Get the top most element on the stack. */
|
|
118
|
-
peek() {
|
|
119
|
-
return this._elements[this._elements.length - 1];
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
/** NoopMenuStack is a placeholder MenuStack used for inline menus. */
|
|
123
|
-
class NoopMenuStack extends MenuStack {
|
|
124
|
-
/** Noop push - does not add elements to the MenuStack. */
|
|
125
|
-
push(_) { }
|
|
126
|
-
}
|
|
127
|
-
|
|
128
25
|
/**
|
|
129
26
|
* @license
|
|
130
27
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -326,25 +223,132 @@ class TargetMenuAim {
|
|
|
326
223
|
this._destroyed.complete();
|
|
327
224
|
}
|
|
328
225
|
}
|
|
329
|
-
TargetMenuAim
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
];
|
|
226
|
+
TargetMenuAim.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: TargetMenuAim, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
227
|
+
TargetMenuAim.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: TargetMenuAim });
|
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: TargetMenuAim, decorators: [{
|
|
229
|
+
type: Injectable
|
|
230
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
335
231
|
/**
|
|
336
232
|
* CdkTargetMenuAim is a provider for the TargetMenuAim service. It should be added to an
|
|
337
233
|
* element with either the `cdkMenu` or `cdkMenuBar` directive and child menu items.
|
|
338
234
|
*/
|
|
339
235
|
class CdkTargetMenuAim {
|
|
340
236
|
}
|
|
341
|
-
CdkTargetMenuAim
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
237
|
+
CdkTargetMenuAim.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkTargetMenuAim, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
238
|
+
CdkTargetMenuAim.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkTargetMenuAim, selector: "[cdkTargetMenuAim]", providers: [{ provide: MENU_AIM, useClass: TargetMenuAim }], exportAs: ["cdkTargetMenuAim"], ngImport: i0 });
|
|
239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkTargetMenuAim, decorators: [{
|
|
240
|
+
type: Directive,
|
|
241
|
+
args: [{
|
|
242
|
+
selector: '[cdkTargetMenuAim]',
|
|
243
|
+
exportAs: 'cdkTargetMenuAim',
|
|
244
|
+
providers: [{ provide: MENU_AIM, useClass: TargetMenuAim }],
|
|
245
|
+
}]
|
|
246
|
+
}] });
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @license
|
|
250
|
+
* Copyright Google LLC All Rights Reserved.
|
|
251
|
+
*
|
|
252
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
253
|
+
* found in the LICENSE file at https://angular.io/license
|
|
254
|
+
*/
|
|
255
|
+
/**
|
|
256
|
+
* MenuStack allows subscribers to listen for close events (when a MenuStackItem is popped off
|
|
257
|
+
* of the stack) in order to perform closing actions. Upon the MenuStack being empty it emits
|
|
258
|
+
* from the `empty` observable specifying the next focus action which the listener should perform
|
|
259
|
+
* as requested by the closer.
|
|
260
|
+
*/
|
|
261
|
+
class MenuStack {
|
|
262
|
+
constructor() {
|
|
263
|
+
/** All MenuStackItems tracked by this MenuStack. */
|
|
264
|
+
this._elements = [];
|
|
265
|
+
/** Emits the element which was popped off of the stack when requested by a closer. */
|
|
266
|
+
this._close = new Subject();
|
|
267
|
+
/** Emits once the MenuStack has become empty after popping off elements. */
|
|
268
|
+
this._empty = new Subject();
|
|
269
|
+
/** Observable which emits the MenuStackItem which has been requested to close. */
|
|
270
|
+
this.closed = this._close;
|
|
271
|
+
/**
|
|
272
|
+
* Observable which emits when the MenuStack is empty after popping off the last element. It
|
|
273
|
+
* emits a FocusNext event which specifies the action the closer has requested the listener
|
|
274
|
+
* perform.
|
|
275
|
+
*/
|
|
276
|
+
this.emptied = this._empty;
|
|
277
|
+
}
|
|
278
|
+
/** @param menu the MenuStackItem to put on the stack. */
|
|
279
|
+
push(menu) {
|
|
280
|
+
this._elements.push(menu);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Pop items off of the stack up to and including `lastItem` and emit each on the close
|
|
284
|
+
* observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
|
|
285
|
+
* @param lastItem the last item to pop off the stack.
|
|
286
|
+
* @param focusNext the event to emit on the `empty` observable if the method call resulted in an
|
|
287
|
+
* empty stack. Does not emit if the stack was initially empty or if `lastItem` was not on the
|
|
288
|
+
* stack.
|
|
289
|
+
*/
|
|
290
|
+
close(lastItem, focusNext) {
|
|
291
|
+
if (this._elements.indexOf(lastItem) >= 0) {
|
|
292
|
+
let poppedElement;
|
|
293
|
+
do {
|
|
294
|
+
poppedElement = this._elements.pop();
|
|
295
|
+
this._close.next(poppedElement);
|
|
296
|
+
} while (poppedElement !== lastItem);
|
|
297
|
+
if (this.isEmpty()) {
|
|
298
|
+
this._empty.next(focusNext);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Pop items off of the stack up to but excluding `lastItem` and emit each on the close
|
|
304
|
+
* observable. If the stack is empty or `lastItem` is not on the stack it does nothing.
|
|
305
|
+
* @param lastItem the element which should be left on the stack
|
|
306
|
+
* @return whether or not an item was removed from the stack
|
|
307
|
+
*/
|
|
308
|
+
closeSubMenuOf(lastItem) {
|
|
309
|
+
let removed = false;
|
|
310
|
+
if (this._elements.indexOf(lastItem) >= 0) {
|
|
311
|
+
removed = this.peek() !== lastItem;
|
|
312
|
+
while (this.peek() !== lastItem) {
|
|
313
|
+
this._close.next(this._elements.pop());
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return removed;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Pop off all MenuStackItems and emit each one on the `close` observable one by one.
|
|
320
|
+
* @param focusNext the event to emit on the `empty` observable once the stack is emptied. Does
|
|
321
|
+
* not emit if the stack was initially empty.
|
|
322
|
+
*/
|
|
323
|
+
closeAll(focusNext) {
|
|
324
|
+
if (!this.isEmpty()) {
|
|
325
|
+
while (!this.isEmpty()) {
|
|
326
|
+
const menuStackItem = this._elements.pop();
|
|
327
|
+
if (menuStackItem) {
|
|
328
|
+
this._close.next(menuStackItem);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
this._empty.next(focusNext);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
/** Return true if this stack is empty. */
|
|
335
|
+
isEmpty() {
|
|
336
|
+
return !this._elements.length;
|
|
337
|
+
}
|
|
338
|
+
/** Return the length of the stack. */
|
|
339
|
+
length() {
|
|
340
|
+
return this._elements.length;
|
|
341
|
+
}
|
|
342
|
+
/** Get the top most element on the stack. */
|
|
343
|
+
peek() {
|
|
344
|
+
return this._elements[this._elements.length - 1];
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
/** NoopMenuStack is a placeholder MenuStack used for inline menus. */
|
|
348
|
+
class NoopMenuStack extends MenuStack {
|
|
349
|
+
/** Noop push - does not add elements to the MenuStack. */
|
|
350
|
+
push(_) { }
|
|
351
|
+
}
|
|
348
352
|
|
|
349
353
|
/**
|
|
350
354
|
* @license
|
|
@@ -661,33 +665,45 @@ class CdkMenuItemTrigger {
|
|
|
661
665
|
}
|
|
662
666
|
}
|
|
663
667
|
}
|
|
664
|
-
CdkMenuItemTrigger
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
]
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
]
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
}
|
|
668
|
+
CdkMenuItemTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItemTrigger, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1.Overlay }, { token: i0.NgZone }, { token: CDK_MENU, optional: true }, { token: MENU_AIM, optional: true }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
669
|
+
CdkMenuItemTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkMenuItemTrigger, selector: "[cdkMenuTriggerFor]", inputs: { menuPanel: ["cdkMenuTriggerFor", "menuPanel"] }, outputs: { opened: "cdkMenuOpened", closed: "cdkMenuClosed" }, host: { attributes: { "aria-haspopup": "menu" }, listeners: { "keydown": "_toggleOnKeydown($event)", "click": "toggle()" }, properties: { "attr.aria-expanded": "isMenuOpen()" }, classAttribute: "cdk-menu-trigger" }, exportAs: ["cdkMenuTriggerFor"], ngImport: i0 });
|
|
670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItemTrigger, decorators: [{
|
|
671
|
+
type: Directive,
|
|
672
|
+
args: [{
|
|
673
|
+
selector: '[cdkMenuTriggerFor]',
|
|
674
|
+
exportAs: 'cdkMenuTriggerFor',
|
|
675
|
+
host: {
|
|
676
|
+
'(keydown)': '_toggleOnKeydown($event)',
|
|
677
|
+
'(click)': 'toggle()',
|
|
678
|
+
'class': 'cdk-menu-trigger',
|
|
679
|
+
'aria-haspopup': 'menu',
|
|
680
|
+
'[attr.aria-expanded]': 'isMenuOpen()',
|
|
681
|
+
},
|
|
682
|
+
}]
|
|
683
|
+
}], ctorParameters: function () {
|
|
684
|
+
return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1.Overlay }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
685
|
+
type: Optional
|
|
686
|
+
}, {
|
|
687
|
+
type: Inject,
|
|
688
|
+
args: [CDK_MENU]
|
|
689
|
+
}] }, { type: undefined, decorators: [{
|
|
690
|
+
type: Optional
|
|
691
|
+
}, {
|
|
692
|
+
type: Inject,
|
|
693
|
+
args: [MENU_AIM]
|
|
694
|
+
}] }, { type: i2.Directionality, decorators: [{
|
|
695
|
+
type: Optional
|
|
696
|
+
}] }];
|
|
697
|
+
}, propDecorators: { menuPanel: [{
|
|
698
|
+
type: Input,
|
|
699
|
+
args: ['cdkMenuTriggerFor']
|
|
700
|
+
}], opened: [{
|
|
701
|
+
type: Output,
|
|
702
|
+
args: ['cdkMenuOpened']
|
|
703
|
+
}], closed: [{
|
|
704
|
+
type: Output,
|
|
705
|
+
args: ['cdkMenuClosed']
|
|
706
|
+
}] } });
|
|
691
707
|
|
|
692
708
|
/**
|
|
693
709
|
* @license
|
|
@@ -699,9 +715,8 @@ CdkMenuItemTrigger.propDecorators = {
|
|
|
699
715
|
// TODO refactor this to be configurable allowing for custom elements to be removed
|
|
700
716
|
/** Removes all icons from within the given element. */
|
|
701
717
|
function removeIcons(element) {
|
|
702
|
-
var _a;
|
|
703
718
|
for (const icon of Array.from(element.querySelectorAll('mat-icon, .material-icons'))) {
|
|
704
|
-
|
|
719
|
+
icon.remove();
|
|
705
720
|
}
|
|
706
721
|
}
|
|
707
722
|
/**
|
|
@@ -903,35 +918,82 @@ class CdkMenuItem {
|
|
|
903
918
|
this._destroyed.next();
|
|
904
919
|
}
|
|
905
920
|
}
|
|
906
|
-
CdkMenuItem
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
'[
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
]
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
]
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
}
|
|
921
|
+
CdkMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItem, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: CDK_MENU, optional: true }, { token: MENU_AIM, optional: true }, { token: i2.Directionality, optional: true }, { token: CdkMenuItemTrigger, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
922
|
+
CdkMenuItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkMenuItem, selector: "[cdkMenuItem]", inputs: { disabled: "disabled" }, outputs: { triggered: "cdkMenuItemTriggered" }, host: { attributes: { "type": "button", "role": "menuitem" }, listeners: { "blur": "_resetTabIndex()", "mouseout": "_resetTabIndex()", "focus": "_setTabIndex()", "mouseenter": "_setTabIndex($event)", "click": "trigger()", "keydown": "_onKeydown($event)" }, properties: { "tabindex": "_tabindex", "attr.aria-disabled": "disabled || null" }, classAttribute: "cdk-menu-item" }, exportAs: ["cdkMenuItem"], ngImport: i0 });
|
|
923
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItem, decorators: [{
|
|
924
|
+
type: Directive,
|
|
925
|
+
args: [{
|
|
926
|
+
selector: '[cdkMenuItem]',
|
|
927
|
+
exportAs: 'cdkMenuItem',
|
|
928
|
+
host: {
|
|
929
|
+
'[tabindex]': '_tabindex',
|
|
930
|
+
'type': 'button',
|
|
931
|
+
'role': 'menuitem',
|
|
932
|
+
'class': 'cdk-menu-item',
|
|
933
|
+
'[attr.aria-disabled]': 'disabled || null',
|
|
934
|
+
},
|
|
935
|
+
}]
|
|
936
|
+
}], ctorParameters: function () {
|
|
937
|
+
return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
938
|
+
type: Optional
|
|
939
|
+
}, {
|
|
940
|
+
type: Inject,
|
|
941
|
+
args: [CDK_MENU]
|
|
942
|
+
}] }, { type: undefined, decorators: [{
|
|
943
|
+
type: Optional
|
|
944
|
+
}, {
|
|
945
|
+
type: Inject,
|
|
946
|
+
args: [MENU_AIM]
|
|
947
|
+
}] }, { type: i2.Directionality, decorators: [{
|
|
948
|
+
type: Optional
|
|
949
|
+
}] }, { type: CdkMenuItemTrigger, decorators: [{
|
|
950
|
+
type: Self
|
|
951
|
+
}, {
|
|
952
|
+
type: Optional
|
|
953
|
+
}] }];
|
|
954
|
+
}, propDecorators: { disabled: [{
|
|
955
|
+
type: Input
|
|
956
|
+
}], triggered: [{
|
|
957
|
+
type: Output,
|
|
958
|
+
args: ['cdkMenuItemTriggered']
|
|
959
|
+
}],
|
|
960
|
+
/** Reset the _tabindex to -1. */
|
|
961
|
+
_resetTabIndex: [{
|
|
962
|
+
type: HostListener,
|
|
963
|
+
args: ['blur']
|
|
964
|
+
}, {
|
|
965
|
+
type: HostListener,
|
|
966
|
+
args: ['mouseout']
|
|
967
|
+
}],
|
|
968
|
+
/**
|
|
969
|
+
* Set the tab index to 0 if not disabled and it's a focus event, or a mouse enter if this element
|
|
970
|
+
* is not in a menu bar.
|
|
971
|
+
*/
|
|
972
|
+
_setTabIndex: [{
|
|
973
|
+
type: HostListener,
|
|
974
|
+
args: ['focus']
|
|
975
|
+
}, {
|
|
976
|
+
type: HostListener,
|
|
977
|
+
args: ['mouseenter', ['$event']]
|
|
978
|
+
}],
|
|
979
|
+
/**
|
|
980
|
+
* If the menu item is not disabled and the element does not have a menu trigger attached, emit
|
|
981
|
+
* on the cdkMenuItemTriggered emitter and close all open menus.
|
|
982
|
+
*/
|
|
983
|
+
trigger: [{
|
|
984
|
+
type: HostListener,
|
|
985
|
+
args: ['click']
|
|
986
|
+
}],
|
|
987
|
+
/**
|
|
988
|
+
* Handles keyboard events for the menu item, specifically either triggering the user defined
|
|
989
|
+
* callback or opening/closing the current menu based on whether the left or right arrow key was
|
|
990
|
+
* pressed.
|
|
991
|
+
* @param event the keyboard event to handle
|
|
992
|
+
*/
|
|
993
|
+
_onKeydown: [{
|
|
994
|
+
type: HostListener,
|
|
995
|
+
args: ['keydown', ['$event']]
|
|
996
|
+
}] } });
|
|
935
997
|
|
|
936
998
|
/**
|
|
937
999
|
* @license
|
|
@@ -971,15 +1033,20 @@ class CdkMenuItemSelectable extends CdkMenuItem {
|
|
|
971
1033
|
}
|
|
972
1034
|
}
|
|
973
1035
|
}
|
|
974
|
-
CdkMenuItemSelectable
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1036
|
+
CdkMenuItemSelectable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItemSelectable, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1037
|
+
CdkMenuItemSelectable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkMenuItemSelectable, inputs: { checked: "checked", name: "name", id: "id" }, outputs: { toggled: "cdkMenuItemToggled" }, usesInheritance: true, ngImport: i0 });
|
|
1038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItemSelectable, decorators: [{
|
|
1039
|
+
type: Directive
|
|
1040
|
+
}], propDecorators: { toggled: [{
|
|
1041
|
+
type: Output,
|
|
1042
|
+
args: ['cdkMenuItemToggled']
|
|
1043
|
+
}], checked: [{
|
|
1044
|
+
type: Input
|
|
1045
|
+
}], name: [{
|
|
1046
|
+
type: Input
|
|
1047
|
+
}], id: [{
|
|
1048
|
+
type: Input
|
|
1049
|
+
}] } });
|
|
983
1050
|
|
|
984
1051
|
/**
|
|
985
1052
|
* @license
|
|
@@ -1024,57 +1091,25 @@ class CdkMenuGroup {
|
|
|
1024
1091
|
this._selectableChanges.complete();
|
|
1025
1092
|
}
|
|
1026
1093
|
}
|
|
1027
|
-
CdkMenuGroup
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
*
|
|
1047
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1048
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1049
|
-
*/
|
|
1050
|
-
/**
|
|
1051
|
-
* Directive applied to an ng-template which wraps a CdkMenu and provides a reference to the
|
|
1052
|
-
* child element it wraps which allows for opening of the CdkMenu in an overlay.
|
|
1053
|
-
*/
|
|
1054
|
-
class CdkMenuPanel {
|
|
1055
|
-
constructor(_templateRef) {
|
|
1056
|
-
this._templateRef = _templateRef;
|
|
1057
|
-
}
|
|
1058
|
-
/**
|
|
1059
|
-
* Set the Menu component on the menu panel. Since we cannot use ContentChild to fetch the
|
|
1060
|
-
* child Menu component, the child Menu must register its self with the parent MenuPanel.
|
|
1061
|
-
*/
|
|
1062
|
-
_registerMenu(child) {
|
|
1063
|
-
var _a;
|
|
1064
|
-
this._menu = child;
|
|
1065
|
-
// The ideal solution would be to affect the CdkMenuPanel injector from the CdkMenuTrigger and
|
|
1066
|
-
// inject the menu stack reference into the child menu and menu items, however this isn't
|
|
1067
|
-
// possible at this time.
|
|
1068
|
-
this._menu._menuStack = this._menuStack;
|
|
1069
|
-
(_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.push(child);
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
CdkMenuPanel.decorators = [
|
|
1073
|
-
{ type: Directive, args: [{ selector: 'ng-template[cdkMenuPanel]', exportAs: 'cdkMenuPanel' },] }
|
|
1074
|
-
];
|
|
1075
|
-
CdkMenuPanel.ctorParameters = () => [
|
|
1076
|
-
{ type: TemplateRef }
|
|
1077
|
-
];
|
|
1094
|
+
CdkMenuGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1095
|
+
CdkMenuGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkMenuGroup, selector: "[cdkMenuGroup]", outputs: { change: "change" }, host: { attributes: { "role": "group" }, classAttribute: "cdk-menu-group" }, providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }], queries: [{ propertyName: "_selectableItems", predicate: CdkMenuItemSelectable, descendants: true }], exportAs: ["cdkMenuGroup"], ngImport: i0 });
|
|
1096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuGroup, decorators: [{
|
|
1097
|
+
type: Directive,
|
|
1098
|
+
args: [{
|
|
1099
|
+
selector: '[cdkMenuGroup]',
|
|
1100
|
+
exportAs: 'cdkMenuGroup',
|
|
1101
|
+
host: {
|
|
1102
|
+
'role': 'group',
|
|
1103
|
+
'class': 'cdk-menu-group',
|
|
1104
|
+
},
|
|
1105
|
+
providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }],
|
|
1106
|
+
}]
|
|
1107
|
+
}], propDecorators: { change: [{
|
|
1108
|
+
type: Output
|
|
1109
|
+
}], _selectableItems: [{
|
|
1110
|
+
type: ContentChildren,
|
|
1111
|
+
args: [CdkMenuItemSelectable, { descendants: true }]
|
|
1112
|
+
}] } });
|
|
1078
1113
|
|
|
1079
1114
|
/**
|
|
1080
1115
|
* @license
|
|
@@ -1123,6 +1158,42 @@ class PointerFocusTracker {
|
|
|
1123
1158
|
}
|
|
1124
1159
|
}
|
|
1125
1160
|
|
|
1161
|
+
/**
|
|
1162
|
+
* @license
|
|
1163
|
+
* Copyright Google LLC All Rights Reserved.
|
|
1164
|
+
*
|
|
1165
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
1166
|
+
* found in the LICENSE file at https://angular.io/license
|
|
1167
|
+
*/
|
|
1168
|
+
/**
|
|
1169
|
+
* Directive applied to an ng-template which wraps a CdkMenu and provides a reference to the
|
|
1170
|
+
* child element it wraps which allows for opening of the CdkMenu in an overlay.
|
|
1171
|
+
*/
|
|
1172
|
+
class CdkMenuPanel {
|
|
1173
|
+
constructor(_templateRef) {
|
|
1174
|
+
this._templateRef = _templateRef;
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Set the Menu component on the menu panel. Since we cannot use ContentChild to fetch the
|
|
1178
|
+
* child Menu component, the child Menu must register its self with the parent MenuPanel.
|
|
1179
|
+
*/
|
|
1180
|
+
_registerMenu(child) {
|
|
1181
|
+
var _a;
|
|
1182
|
+
this._menu = child;
|
|
1183
|
+
// The ideal solution would be to affect the CdkMenuPanel injector from the CdkMenuTrigger and
|
|
1184
|
+
// inject the menu stack reference into the child menu and menu items, however this isn't
|
|
1185
|
+
// possible at this time.
|
|
1186
|
+
this._menu._menuStack = this._menuStack;
|
|
1187
|
+
(_a = this._menuStack) === null || _a === void 0 ? void 0 : _a.push(child);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
CdkMenuPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuPanel, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1191
|
+
CdkMenuPanel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkMenuPanel, selector: "ng-template[cdkMenuPanel]", exportAs: ["cdkMenuPanel"], ngImport: i0 });
|
|
1192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuPanel, decorators: [{
|
|
1193
|
+
type: Directive,
|
|
1194
|
+
args: [{ selector: 'ng-template[cdkMenuPanel]', exportAs: 'cdkMenuPanel' }]
|
|
1195
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
1196
|
+
|
|
1126
1197
|
/**
|
|
1127
1198
|
* @license
|
|
1128
1199
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -1369,39 +1440,66 @@ class CdkMenu extends CdkMenuGroup {
|
|
|
1369
1440
|
this.closed.complete();
|
|
1370
1441
|
}
|
|
1371
1442
|
}
|
|
1372
|
-
CdkMenu
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
'[
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
}
|
|
1443
|
+
CdkMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenu, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: MENU_AIM, optional: true, self: true }, { token: i2.Directionality, optional: true }, { token: CdkMenuPanel, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1444
|
+
CdkMenu.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkMenu, selector: "[cdkMenu]", inputs: { orientation: ["cdkMenuOrientation", "orientation"], _explicitPanel: ["cdkMenuPanel", "_explicitPanel"] }, outputs: { closed: "closed" }, host: { attributes: { "role": "menu" }, listeners: { "focus": "focusFirstItem()", "keydown": "_handleKeyEvent($event)" }, properties: { "tabindex": "_isInline() ? 0 : null", "class.cdk-menu-inline": "_isInline()", "attr.aria-orientation": "orientation" }, classAttribute: "cdk-menu" }, providers: [
|
|
1445
|
+
{ provide: CdkMenuGroup, useExisting: CdkMenu },
|
|
1446
|
+
{ provide: CDK_MENU, useExisting: CdkMenu },
|
|
1447
|
+
], queries: [{ propertyName: "_nestedGroups", predicate: CdkMenuGroup, descendants: true }, { propertyName: "_allItems", predicate: CdkMenuItem, descendants: true }], exportAs: ["cdkMenu"], usesInheritance: true, ngImport: i0 });
|
|
1448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenu, decorators: [{
|
|
1449
|
+
type: Directive,
|
|
1450
|
+
args: [{
|
|
1451
|
+
selector: '[cdkMenu]',
|
|
1452
|
+
exportAs: 'cdkMenu',
|
|
1453
|
+
host: {
|
|
1454
|
+
'[tabindex]': '_isInline() ? 0 : null',
|
|
1455
|
+
'role': 'menu',
|
|
1456
|
+
'class': 'cdk-menu',
|
|
1457
|
+
'[class.cdk-menu-inline]': '_isInline()',
|
|
1458
|
+
'[attr.aria-orientation]': 'orientation',
|
|
1459
|
+
},
|
|
1460
|
+
providers: [
|
|
1461
|
+
{ provide: CdkMenuGroup, useExisting: CdkMenu },
|
|
1462
|
+
{ provide: CDK_MENU, useExisting: CdkMenu },
|
|
1463
|
+
],
|
|
1464
|
+
}]
|
|
1465
|
+
}], ctorParameters: function () {
|
|
1466
|
+
return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
1467
|
+
type: Self
|
|
1468
|
+
}, {
|
|
1469
|
+
type: Optional
|
|
1470
|
+
}, {
|
|
1471
|
+
type: Inject,
|
|
1472
|
+
args: [MENU_AIM]
|
|
1473
|
+
}] }, { type: i2.Directionality, decorators: [{
|
|
1474
|
+
type: Optional
|
|
1475
|
+
}] }, { type: CdkMenuPanel, decorators: [{
|
|
1476
|
+
type: Optional
|
|
1477
|
+
}] }];
|
|
1478
|
+
}, propDecorators: { orientation: [{
|
|
1479
|
+
type: Input,
|
|
1480
|
+
args: ['cdkMenuOrientation']
|
|
1481
|
+
}], closed: [{
|
|
1482
|
+
type: Output
|
|
1483
|
+
}], _nestedGroups: [{
|
|
1484
|
+
type: ContentChildren,
|
|
1485
|
+
args: [CdkMenuGroup, { descendants: true }]
|
|
1486
|
+
}], _allItems: [{
|
|
1487
|
+
type: ContentChildren,
|
|
1488
|
+
args: [CdkMenuItem, { descendants: true }]
|
|
1489
|
+
}], _explicitPanel: [{
|
|
1490
|
+
type: Input,
|
|
1491
|
+
args: ['cdkMenuPanel']
|
|
1492
|
+
}],
|
|
1493
|
+
/** Place focus on the first MenuItem in the menu and set the focus origin. */
|
|
1494
|
+
focusFirstItem: [{
|
|
1495
|
+
type: HostListener,
|
|
1496
|
+
args: ['focus']
|
|
1497
|
+
}],
|
|
1498
|
+
/** Handle keyboard events for the Menu. */
|
|
1499
|
+
_handleKeyEvent: [{
|
|
1500
|
+
type: HostListener,
|
|
1501
|
+
args: ['keydown', ['$event']]
|
|
1502
|
+
}] } });
|
|
1405
1503
|
|
|
1406
1504
|
/**
|
|
1407
1505
|
* @license
|
|
@@ -1612,44 +1710,62 @@ class CdkMenuBar extends CdkMenuGroup {
|
|
|
1612
1710
|
(_a = this._pointerTracker) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
1613
1711
|
}
|
|
1614
1712
|
}
|
|
1615
|
-
CdkMenuBar
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
]
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1713
|
+
CdkMenuBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuBar, deps: [{ token: MenuStack }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: MENU_AIM, optional: true, self: true }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1714
|
+
CdkMenuBar.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkMenuBar, selector: "[cdkMenuBar]", inputs: { orientation: ["cdkMenuBarOrientation", "orientation"] }, host: { attributes: { "role": "menubar", "tabindex": "0" }, listeners: { "focus": "focusFirstItem()", "keydown": "_handleKeyEvent($event)" }, properties: { "attr.aria-orientation": "orientation" }, classAttribute: "cdk-menu-bar" }, providers: [
|
|
1715
|
+
{ provide: CdkMenuGroup, useExisting: CdkMenuBar },
|
|
1716
|
+
{ provide: CDK_MENU, useExisting: CdkMenuBar },
|
|
1717
|
+
{ provide: MenuStack, useClass: MenuStack },
|
|
1718
|
+
], queries: [{ propertyName: "_allItems", predicate: CdkMenuItem, descendants: true }], exportAs: ["cdkMenuBar"], usesInheritance: true, ngImport: i0 });
|
|
1719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuBar, decorators: [{
|
|
1720
|
+
type: Directive,
|
|
1721
|
+
args: [{
|
|
1722
|
+
selector: '[cdkMenuBar]',
|
|
1723
|
+
exportAs: 'cdkMenuBar',
|
|
1724
|
+
host: {
|
|
1725
|
+
'role': 'menubar',
|
|
1726
|
+
'class': 'cdk-menu-bar',
|
|
1727
|
+
'tabindex': '0',
|
|
1728
|
+
'[attr.aria-orientation]': 'orientation',
|
|
1729
|
+
},
|
|
1730
|
+
providers: [
|
|
1731
|
+
{ provide: CdkMenuGroup, useExisting: CdkMenuBar },
|
|
1732
|
+
{ provide: CDK_MENU, useExisting: CdkMenuBar },
|
|
1733
|
+
{ provide: MenuStack, useClass: MenuStack },
|
|
1734
|
+
],
|
|
1735
|
+
}]
|
|
1736
|
+
}], ctorParameters: function () {
|
|
1737
|
+
return [{ type: MenuStack }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
1738
|
+
type: Self
|
|
1739
|
+
}, {
|
|
1740
|
+
type: Optional
|
|
1741
|
+
}, {
|
|
1742
|
+
type: Inject,
|
|
1743
|
+
args: [MENU_AIM]
|
|
1744
|
+
}] }, { type: i2.Directionality, decorators: [{
|
|
1745
|
+
type: Optional
|
|
1746
|
+
}] }];
|
|
1747
|
+
}, propDecorators: { orientation: [{
|
|
1748
|
+
type: Input,
|
|
1749
|
+
args: ['cdkMenuBarOrientation']
|
|
1750
|
+
}], _allItems: [{
|
|
1751
|
+
type: ContentChildren,
|
|
1752
|
+
args: [CdkMenuItem, { descendants: true }]
|
|
1753
|
+
}],
|
|
1754
|
+
/** Place focus on the first MenuItem in the menu and set the focus origin. */
|
|
1755
|
+
focusFirstItem: [{
|
|
1756
|
+
type: HostListener,
|
|
1757
|
+
args: ['focus']
|
|
1758
|
+
}],
|
|
1759
|
+
/**
|
|
1760
|
+
* Handle keyboard events, specifically changing the focused element and/or toggling the active
|
|
1761
|
+
* items menu.
|
|
1762
|
+
* @param event the KeyboardEvent to handle.
|
|
1763
|
+
*/
|
|
1764
|
+
_handleKeyEvent: [{
|
|
1765
|
+
type: HostListener,
|
|
1766
|
+
args: ['keydown', ['$event']]
|
|
1767
|
+
}] } });
|
|
1645
1768
|
|
|
1646
|
-
/**
|
|
1647
|
-
* @license
|
|
1648
|
-
* Copyright Google LLC All Rights Reserved.
|
|
1649
|
-
*
|
|
1650
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1651
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1652
|
-
*/
|
|
1653
1769
|
/**
|
|
1654
1770
|
* A directive providing behavior for the "menuitemradio" ARIA role, which behaves similarly to
|
|
1655
1771
|
* a conventional radio-button. Any sibling `CdkMenuItemRadio` instances within the same `CdkMenu`
|
|
@@ -1681,32 +1797,47 @@ class CdkMenuItemRadio extends CdkMenuItemSelectable {
|
|
|
1681
1797
|
this._removeDispatcherListener();
|
|
1682
1798
|
}
|
|
1683
1799
|
}
|
|
1684
|
-
CdkMenuItemRadio
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
'[
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1800
|
+
CdkMenuItemRadio.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItemRadio, deps: [{ token: i1$1.UniqueSelectionDispatcher }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: CDK_MENU, optional: true }, { token: MENU_AIM, optional: true }, { token: i2.Directionality, optional: true }, { token: CdkMenuItemTrigger, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1801
|
+
CdkMenuItemRadio.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkMenuItemRadio, selector: "[cdkMenuItemRadio]", host: { attributes: { "type": "button", "role": "menuitemradio" }, properties: { "tabindex": "_tabindex", "attr.aria-checked": "checked || null", "attr.aria-disabled": "disabled || null" } }, providers: [
|
|
1802
|
+
{ provide: CdkMenuItemSelectable, useExisting: CdkMenuItemRadio },
|
|
1803
|
+
{ provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
|
|
1804
|
+
], exportAs: ["cdkMenuItemRadio"], usesInheritance: true, ngImport: i0 });
|
|
1805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItemRadio, decorators: [{
|
|
1806
|
+
type: Directive,
|
|
1807
|
+
args: [{
|
|
1808
|
+
selector: '[cdkMenuItemRadio]',
|
|
1809
|
+
exportAs: 'cdkMenuItemRadio',
|
|
1810
|
+
host: {
|
|
1811
|
+
'[tabindex]': '_tabindex',
|
|
1812
|
+
'type': 'button',
|
|
1813
|
+
'role': 'menuitemradio',
|
|
1814
|
+
'[attr.aria-checked]': 'checked || null',
|
|
1815
|
+
'[attr.aria-disabled]': 'disabled || null',
|
|
1816
|
+
},
|
|
1817
|
+
providers: [
|
|
1818
|
+
{ provide: CdkMenuItemSelectable, useExisting: CdkMenuItemRadio },
|
|
1819
|
+
{ provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
|
|
1820
|
+
],
|
|
1821
|
+
}]
|
|
1822
|
+
}], ctorParameters: function () {
|
|
1823
|
+
return [{ type: i1$1.UniqueSelectionDispatcher }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
1824
|
+
type: Optional
|
|
1825
|
+
}, {
|
|
1826
|
+
type: Inject,
|
|
1827
|
+
args: [CDK_MENU]
|
|
1828
|
+
}] }, { type: undefined, decorators: [{
|
|
1829
|
+
type: Optional
|
|
1830
|
+
}, {
|
|
1831
|
+
type: Inject,
|
|
1832
|
+
args: [MENU_AIM]
|
|
1833
|
+
}] }, { type: i2.Directionality, decorators: [{
|
|
1834
|
+
type: Optional
|
|
1835
|
+
}] }, { type: CdkMenuItemTrigger, decorators: [{
|
|
1836
|
+
type: Self
|
|
1837
|
+
}, {
|
|
1838
|
+
type: Optional
|
|
1839
|
+
}] }];
|
|
1840
|
+
} });
|
|
1710
1841
|
|
|
1711
1842
|
/**
|
|
1712
1843
|
* @license
|
|
@@ -1728,23 +1859,29 @@ class CdkMenuItemCheckbox extends CdkMenuItemSelectable {
|
|
|
1728
1859
|
}
|
|
1729
1860
|
}
|
|
1730
1861
|
}
|
|
1731
|
-
CdkMenuItemCheckbox
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
'[
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1862
|
+
CdkMenuItemCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItemCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1863
|
+
CdkMenuItemCheckbox.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkMenuItemCheckbox, selector: "[cdkMenuItemCheckbox]", host: { attributes: { "type": "button", "role": "menuitemcheckbox" }, properties: { "tabindex": "_tabindex", "attr.aria-checked": "checked || null", "attr.aria-disabled": "disabled || null" } }, providers: [
|
|
1864
|
+
{ provide: CdkMenuItemSelectable, useExisting: CdkMenuItemCheckbox },
|
|
1865
|
+
{ provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
|
|
1866
|
+
], exportAs: ["cdkMenuItemCheckbox"], usesInheritance: true, ngImport: i0 });
|
|
1867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuItemCheckbox, decorators: [{
|
|
1868
|
+
type: Directive,
|
|
1869
|
+
args: [{
|
|
1870
|
+
selector: '[cdkMenuItemCheckbox]',
|
|
1871
|
+
exportAs: 'cdkMenuItemCheckbox',
|
|
1872
|
+
host: {
|
|
1873
|
+
'[tabindex]': '_tabindex',
|
|
1874
|
+
'type': 'button',
|
|
1875
|
+
'role': 'menuitemcheckbox',
|
|
1876
|
+
'[attr.aria-checked]': 'checked || null',
|
|
1877
|
+
'[attr.aria-disabled]': 'disabled || null',
|
|
1878
|
+
},
|
|
1879
|
+
providers: [
|
|
1880
|
+
{ provide: CdkMenuItemSelectable, useExisting: CdkMenuItemCheckbox },
|
|
1881
|
+
{ provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
|
|
1882
|
+
],
|
|
1883
|
+
}]
|
|
1884
|
+
}] });
|
|
1748
1885
|
|
|
1749
1886
|
/**
|
|
1750
1887
|
* @license
|
|
@@ -1767,13 +1904,14 @@ class ContextMenuTracker {
|
|
|
1767
1904
|
}
|
|
1768
1905
|
}
|
|
1769
1906
|
}
|
|
1770
|
-
ContextMenuTracker.ɵ
|
|
1771
|
-
ContextMenuTracker
|
|
1772
|
-
|
|
1773
|
-
|
|
1907
|
+
ContextMenuTracker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: ContextMenuTracker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1908
|
+
ContextMenuTracker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: ContextMenuTracker, providedIn: 'root' });
|
|
1909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: ContextMenuTracker, decorators: [{
|
|
1910
|
+
type: Injectable,
|
|
1911
|
+
args: [{ providedIn: 'root' }]
|
|
1912
|
+
}] });
|
|
1774
1913
|
/** Injection token for the ContextMenu options object. */
|
|
1775
1914
|
const CDK_CONTEXT_MENU_DEFAULT_OPTIONS = new InjectionToken('cdk-context-menu-default-options');
|
|
1776
|
-
const ɵ0 = { offsetX: 2, offsetY: 2 };
|
|
1777
1915
|
/**
|
|
1778
1916
|
* A directive which when placed on some element opens a the Menu it is bound to when a user
|
|
1779
1917
|
* right-clicks within that element. It is aware of nested Context Menus and the lowest level
|
|
@@ -1833,15 +1971,13 @@ class CdkContextMenuTrigger {
|
|
|
1833
1971
|
// since we're moving this menu we need to close any submenus first otherwise they end up
|
|
1834
1972
|
// disconnected from this one.
|
|
1835
1973
|
this._menuStack.closeSubMenuOf(this._menuPanel._menu);
|
|
1836
|
-
this._overlayRef.getConfig()
|
|
1837
|
-
.positionStrategy.setOrigin(coordinates);
|
|
1974
|
+
this._overlayRef.getConfig().positionStrategy.setOrigin(coordinates);
|
|
1838
1975
|
this._overlayRef.updatePosition();
|
|
1839
1976
|
}
|
|
1840
1977
|
else {
|
|
1841
1978
|
this.opened.next();
|
|
1842
1979
|
if (this._overlayRef) {
|
|
1843
|
-
this._overlayRef.getConfig()
|
|
1844
|
-
.positionStrategy.setOrigin(coordinates);
|
|
1980
|
+
this._overlayRef.getConfig().positionStrategy.setOrigin(coordinates);
|
|
1845
1981
|
this._overlayRef.updatePosition();
|
|
1846
1982
|
}
|
|
1847
1983
|
else {
|
|
@@ -1985,33 +2121,46 @@ class CdkContextMenuTrigger {
|
|
|
1985
2121
|
}
|
|
1986
2122
|
}
|
|
1987
2123
|
}
|
|
1988
|
-
CdkContextMenuTrigger
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
]
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
};
|
|
2124
|
+
CdkContextMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkContextMenuTrigger, deps: [{ token: i0.ViewContainerRef }, { token: i1.Overlay }, { token: ContextMenuTracker }, { token: CDK_CONTEXT_MENU_DEFAULT_OPTIONS }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2125
|
+
CdkContextMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkContextMenuTrigger, selector: "[cdkContextMenuTriggerFor]", inputs: { menuPanel: ["cdkContextMenuTriggerFor", "menuPanel"], disabled: ["cdkContextMenuDisabled", "disabled"] }, outputs: { opened: "cdkContextMenuOpened", closed: "cdkContextMenuClosed" }, host: { listeners: { "contextmenu": "_openOnContextMenu($event)" } }, providers: [
|
|
2126
|
+
// In cases where the first menu item in the context menu is a trigger the submenu opens on a
|
|
2127
|
+
// hover event. Offsetting the opened context menu by 2px prevents this from occurring.
|
|
2128
|
+
{ provide: CDK_CONTEXT_MENU_DEFAULT_OPTIONS, useValue: { offsetX: 2, offsetY: 2 } },
|
|
2129
|
+
], exportAs: ["cdkContextMenuTriggerFor"], ngImport: i0 });
|
|
2130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkContextMenuTrigger, decorators: [{
|
|
2131
|
+
type: Directive,
|
|
2132
|
+
args: [{
|
|
2133
|
+
selector: '[cdkContextMenuTriggerFor]',
|
|
2134
|
+
exportAs: 'cdkContextMenuTriggerFor',
|
|
2135
|
+
host: {
|
|
2136
|
+
'(contextmenu)': '_openOnContextMenu($event)',
|
|
2137
|
+
},
|
|
2138
|
+
providers: [
|
|
2139
|
+
// In cases where the first menu item in the context menu is a trigger the submenu opens on a
|
|
2140
|
+
// hover event. Offsetting the opened context menu by 2px prevents this from occurring.
|
|
2141
|
+
{ provide: CDK_CONTEXT_MENU_DEFAULT_OPTIONS, useValue: { offsetX: 2, offsetY: 2 } },
|
|
2142
|
+
],
|
|
2143
|
+
}]
|
|
2144
|
+
}], ctorParameters: function () {
|
|
2145
|
+
return [{ type: i0.ViewContainerRef }, { type: i1.Overlay }, { type: ContextMenuTracker }, { type: undefined, decorators: [{
|
|
2146
|
+
type: Inject,
|
|
2147
|
+
args: [CDK_CONTEXT_MENU_DEFAULT_OPTIONS]
|
|
2148
|
+
}] }, { type: i2.Directionality, decorators: [{
|
|
2149
|
+
type: Optional
|
|
2150
|
+
}] }];
|
|
2151
|
+
}, propDecorators: { menuPanel: [{
|
|
2152
|
+
type: Input,
|
|
2153
|
+
args: ['cdkContextMenuTriggerFor']
|
|
2154
|
+
}], opened: [{
|
|
2155
|
+
type: Output,
|
|
2156
|
+
args: ['cdkContextMenuOpened']
|
|
2157
|
+
}], closed: [{
|
|
2158
|
+
type: Output,
|
|
2159
|
+
args: ['cdkContextMenuClosed']
|
|
2160
|
+
}], disabled: [{
|
|
2161
|
+
type: Input,
|
|
2162
|
+
args: ['cdkContextMenuDisabled']
|
|
2163
|
+
}] } });
|
|
2015
2164
|
|
|
2016
2165
|
/**
|
|
2017
2166
|
* @license
|
|
@@ -2034,13 +2183,43 @@ const EXPORTED_DECLARATIONS = [
|
|
|
2034
2183
|
];
|
|
2035
2184
|
class CdkMenuModule {
|
|
2036
2185
|
}
|
|
2037
|
-
CdkMenuModule
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2186
|
+
CdkMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2187
|
+
CdkMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuModule, declarations: [CdkMenuBar,
|
|
2188
|
+
CdkMenu,
|
|
2189
|
+
CdkMenuPanel,
|
|
2190
|
+
CdkMenuItem,
|
|
2191
|
+
CdkMenuItemRadio,
|
|
2192
|
+
CdkMenuItemCheckbox,
|
|
2193
|
+
CdkMenuItemTrigger,
|
|
2194
|
+
CdkMenuGroup,
|
|
2195
|
+
CdkContextMenuTrigger,
|
|
2196
|
+
CdkTargetMenuAim], imports: [OverlayModule], exports: [CdkMenuBar,
|
|
2197
|
+
CdkMenu,
|
|
2198
|
+
CdkMenuPanel,
|
|
2199
|
+
CdkMenuItem,
|
|
2200
|
+
CdkMenuItemRadio,
|
|
2201
|
+
CdkMenuItemCheckbox,
|
|
2202
|
+
CdkMenuItemTrigger,
|
|
2203
|
+
CdkMenuGroup,
|
|
2204
|
+
CdkContextMenuTrigger,
|
|
2205
|
+
CdkTargetMenuAim] });
|
|
2206
|
+
CdkMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuModule, imports: [[OverlayModule]] });
|
|
2207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkMenuModule, decorators: [{
|
|
2208
|
+
type: NgModule,
|
|
2209
|
+
args: [{
|
|
2210
|
+
imports: [OverlayModule],
|
|
2211
|
+
exports: EXPORTED_DECLARATIONS,
|
|
2212
|
+
declarations: EXPORTED_DECLARATIONS,
|
|
2213
|
+
}]
|
|
2214
|
+
}] });
|
|
2215
|
+
|
|
2216
|
+
/**
|
|
2217
|
+
* @license
|
|
2218
|
+
* Copyright Google LLC All Rights Reserved.
|
|
2219
|
+
*
|
|
2220
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
2221
|
+
* found in the LICENSE file at https://angular.io/license
|
|
2222
|
+
*/
|
|
2044
2223
|
|
|
2045
2224
|
/**
|
|
2046
2225
|
* @license
|
|
@@ -2054,5 +2233,5 @@ CdkMenuModule.decorators = [
|
|
|
2054
2233
|
* Generated bundle index. Do not edit.
|
|
2055
2234
|
*/
|
|
2056
2235
|
|
|
2057
|
-
export { CDK_CONTEXT_MENU_DEFAULT_OPTIONS, CDK_MENU, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemTrigger, CdkMenuModule, CdkMenuPanel, CdkTargetMenuAim, ContextMenuTracker, MENU_AIM, MenuStack, TargetMenuAim, isClickInsideMenuOverlay
|
|
2058
|
-
//# sourceMappingURL=menu.
|
|
2236
|
+
export { CDK_CONTEXT_MENU_DEFAULT_OPTIONS, CDK_MENU, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemTrigger, CdkMenuModule, CdkMenuPanel, CdkTargetMenuAim, ContextMenuTracker, MENU_AIM, MenuStack, TargetMenuAim, isClickInsideMenuOverlay };
|
|
2237
|
+
//# sourceMappingURL=menu.mjs.map
|