@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
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, Inject, Optional, NgModule } from '@angular/core';
|
|
3
|
+
import { DOCUMENT } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/cdk/bidi';
|
|
5
|
+
import { _getShadowRoot } from '@angular/cdk/platform';
|
|
6
|
+
import { STICKY_POSITIONING_LISTENER } from '@angular/cdk/table';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11
|
+
*
|
|
12
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
13
|
+
* found in the LICENSE file at https://angular.io/license
|
|
14
|
+
*/
|
|
15
|
+
let nextId = 0;
|
|
16
|
+
/**
|
|
17
|
+
* Applies styles to the host element that make its scrollbars match up with
|
|
18
|
+
* the non-sticky scrollable portions of the CdkTable contained within.
|
|
19
|
+
*
|
|
20
|
+
* This visual effect only works in Webkit and Blink based browsers (eg Chrome,
|
|
21
|
+
* Safari, Edge). Other browsers such as Firefox will gracefully degrade to
|
|
22
|
+
* normal scrollbar appearance.
|
|
23
|
+
* Further note: These styles have no effect when the browser is using OS-default
|
|
24
|
+
* scrollbars. The easiest way to force them into custom mode is to specify width
|
|
25
|
+
* and height for the scrollbar and thumb.
|
|
26
|
+
*/
|
|
27
|
+
class CdkTableScrollContainer {
|
|
28
|
+
constructor(_elementRef, _document, _directionality) {
|
|
29
|
+
this._elementRef = _elementRef;
|
|
30
|
+
this._document = _document;
|
|
31
|
+
this._directionality = _directionality;
|
|
32
|
+
/** The most recent sticky column size values from the CdkTable. */
|
|
33
|
+
this._startSizes = [];
|
|
34
|
+
this._endSizes = [];
|
|
35
|
+
this._headerSizes = [];
|
|
36
|
+
this._footerSizes = [];
|
|
37
|
+
this._uniqueClassName = `cdk-table-scroll-container-${++nextId}`;
|
|
38
|
+
_elementRef.nativeElement.classList.add(this._uniqueClassName);
|
|
39
|
+
}
|
|
40
|
+
ngOnInit() {
|
|
41
|
+
// Note that we need to look up the root node in ngOnInit, rather than the constructor, because
|
|
42
|
+
// Angular seems to create the element outside the shadow root and then moves it inside, if the
|
|
43
|
+
// node is inside an `ngIf` and a ShadowDom-encapsulated component.
|
|
44
|
+
this._styleRoot = _getShadowRoot(this._elementRef.nativeElement) ?? this._document.head;
|
|
45
|
+
}
|
|
46
|
+
ngOnDestroy() {
|
|
47
|
+
this._styleElement?.remove();
|
|
48
|
+
this._styleElement = undefined;
|
|
49
|
+
}
|
|
50
|
+
stickyColumnsUpdated({ sizes }) {
|
|
51
|
+
this._startSizes = sizes;
|
|
52
|
+
this._updateScrollbar();
|
|
53
|
+
}
|
|
54
|
+
stickyEndColumnsUpdated({ sizes }) {
|
|
55
|
+
this._endSizes = sizes;
|
|
56
|
+
this._updateScrollbar();
|
|
57
|
+
}
|
|
58
|
+
stickyHeaderRowsUpdated({ sizes }) {
|
|
59
|
+
this._headerSizes = sizes;
|
|
60
|
+
this._updateScrollbar();
|
|
61
|
+
}
|
|
62
|
+
stickyFooterRowsUpdated({ sizes }) {
|
|
63
|
+
this._footerSizes = sizes;
|
|
64
|
+
this._updateScrollbar();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Set padding on the scrollbar track based on the sticky states from CdkTable.
|
|
68
|
+
*/
|
|
69
|
+
_updateScrollbar() {
|
|
70
|
+
const topMargin = computeMargin(this._headerSizes);
|
|
71
|
+
const bottomMargin = computeMargin(this._footerSizes);
|
|
72
|
+
const startMargin = computeMargin(this._startSizes);
|
|
73
|
+
const endMargin = computeMargin(this._endSizes);
|
|
74
|
+
if (topMargin === 0 && bottomMargin === 0 && startMargin === 0 && endMargin === 0) {
|
|
75
|
+
this._clearCss();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const direction = this._directionality ? this._directionality.value : 'ltr';
|
|
79
|
+
const leftMargin = direction === 'rtl' ? endMargin : startMargin;
|
|
80
|
+
const rightMargin = direction === 'rtl' ? startMargin : endMargin;
|
|
81
|
+
this._applyCss(`${topMargin}px ${rightMargin}px ${bottomMargin}px ${leftMargin}px`);
|
|
82
|
+
}
|
|
83
|
+
/** Gets the stylesheet for the scrollbar styles and creates it if need be. */
|
|
84
|
+
_getStyleSheet() {
|
|
85
|
+
if (!this._styleElement) {
|
|
86
|
+
this._styleElement = this._document.createElement('style');
|
|
87
|
+
this._styleRoot.appendChild(this._styleElement);
|
|
88
|
+
}
|
|
89
|
+
return this._styleElement.sheet;
|
|
90
|
+
}
|
|
91
|
+
/** Updates the stylesheet with the specified scrollbar style. */
|
|
92
|
+
_applyCss(value) {
|
|
93
|
+
this._clearCss();
|
|
94
|
+
const selector = `.${this._uniqueClassName}::-webkit-scrollbar-track`;
|
|
95
|
+
this._getStyleSheet().insertRule(`${selector} {margin: ${value}}`, 0);
|
|
96
|
+
}
|
|
97
|
+
_clearCss() {
|
|
98
|
+
const styleSheet = this._getStyleSheet();
|
|
99
|
+
if (styleSheet.cssRules.length > 0) {
|
|
100
|
+
styleSheet.deleteRule(0);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
CdkTableScrollContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkTableScrollContainer, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
105
|
+
CdkTableScrollContainer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", type: CdkTableScrollContainer, selector: "[cdkTableScrollContainer]", host: { classAttribute: "cdk-table-scroll-container" }, providers: [{ provide: STICKY_POSITIONING_LISTENER, useExisting: CdkTableScrollContainer }], ngImport: i0 });
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkTableScrollContainer, decorators: [{
|
|
107
|
+
type: Directive,
|
|
108
|
+
args: [{
|
|
109
|
+
selector: '[cdkTableScrollContainer]',
|
|
110
|
+
host: {
|
|
111
|
+
'class': 'cdk-table-scroll-container',
|
|
112
|
+
},
|
|
113
|
+
providers: [{ provide: STICKY_POSITIONING_LISTENER, useExisting: CdkTableScrollContainer }],
|
|
114
|
+
}]
|
|
115
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: Document, decorators: [{
|
|
116
|
+
type: Inject,
|
|
117
|
+
args: [DOCUMENT]
|
|
118
|
+
}] }, { type: i1.Directionality, decorators: [{
|
|
119
|
+
type: Optional
|
|
120
|
+
}] }]; } });
|
|
121
|
+
function computeMargin(sizes) {
|
|
122
|
+
let margin = 0;
|
|
123
|
+
for (const size of sizes) {
|
|
124
|
+
if (size == null) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
margin += size;
|
|
128
|
+
}
|
|
129
|
+
return margin;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @license
|
|
134
|
+
* Copyright Google LLC All Rights Reserved.
|
|
135
|
+
*
|
|
136
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
137
|
+
* found in the LICENSE file at https://angular.io/license
|
|
138
|
+
*/
|
|
139
|
+
class CdkTableScrollContainerModule {
|
|
140
|
+
}
|
|
141
|
+
CdkTableScrollContainerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkTableScrollContainerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
142
|
+
CdkTableScrollContainerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkTableScrollContainerModule, declarations: [CdkTableScrollContainer], exports: [CdkTableScrollContainer] });
|
|
143
|
+
CdkTableScrollContainerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkTableScrollContainerModule });
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkTableScrollContainerModule, decorators: [{
|
|
145
|
+
type: NgModule,
|
|
146
|
+
args: [{
|
|
147
|
+
declarations: [CdkTableScrollContainer],
|
|
148
|
+
exports: [CdkTableScrollContainer],
|
|
149
|
+
}]
|
|
150
|
+
}] });
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @license
|
|
154
|
+
* Copyright Google LLC All Rights Reserved.
|
|
155
|
+
*
|
|
156
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
157
|
+
* found in the LICENSE file at https://angular.io/license
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @license
|
|
162
|
+
* Copyright Google LLC All Rights Reserved.
|
|
163
|
+
*
|
|
164
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
165
|
+
* found in the LICENSE file at https://angular.io/license
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Generated bundle index. Do not edit.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
export { CdkTableScrollContainer, CdkTableScrollContainerModule };
|
|
173
|
+
//# sourceMappingURL=table-scroll-container.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-scroll-container.mjs","sources":["../../../../../../src/cdk-experimental/table-scroll-container/table-scroll-container.ts","../../../../../../src/cdk-experimental/table-scroll-container/table-scroll-container-module.ts","../../../../../../src/cdk-experimental/table-scroll-container/public-api.ts","../../../../../../src/cdk-experimental/table-scroll-container/index.ts","../../../../../../src/cdk-experimental/table-scroll-container/table-scroll-container_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Inject, OnDestroy, OnInit, Optional} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {_getShadowRoot} from '@angular/cdk/platform';\nimport {\n STICKY_POSITIONING_LISTENER,\n StickyPositioningListener,\n StickySize,\n StickyUpdate,\n} from '@angular/cdk/table';\n\nlet nextId = 0;\n\n/**\n * Applies styles to the host element that make its scrollbars match up with\n * the non-sticky scrollable portions of the CdkTable contained within.\n *\n * This visual effect only works in Webkit and Blink based browsers (eg Chrome,\n * Safari, Edge). Other browsers such as Firefox will gracefully degrade to\n * normal scrollbar appearance.\n * Further note: These styles have no effect when the browser is using OS-default\n * scrollbars. The easiest way to force them into custom mode is to specify width\n * and height for the scrollbar and thumb.\n */\n@Directive({\n selector: '[cdkTableScrollContainer]',\n host: {\n 'class': 'cdk-table-scroll-container',\n },\n providers: [{provide: STICKY_POSITIONING_LISTENER, useExisting: CdkTableScrollContainer}],\n})\nexport class CdkTableScrollContainer implements StickyPositioningListener, OnDestroy, OnInit {\n private readonly _uniqueClassName: string;\n private _styleRoot!: Node;\n private _styleElement?: HTMLStyleElement;\n\n /** The most recent sticky column size values from the CdkTable. */\n private _startSizes: StickySize[] = [];\n private _endSizes: StickySize[] = [];\n private _headerSizes: StickySize[] = [];\n private _footerSizes: StickySize[] = [];\n\n constructor(\n private readonly _elementRef: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) private readonly _document: Document,\n @Optional() private readonly _directionality?: Directionality,\n ) {\n this._uniqueClassName = `cdk-table-scroll-container-${++nextId}`;\n _elementRef.nativeElement.classList.add(this._uniqueClassName);\n }\n\n ngOnInit() {\n // Note that we need to look up the root node in ngOnInit, rather than the constructor, because\n // Angular seems to create the element outside the shadow root and then moves it inside, if the\n // node is inside an `ngIf` and a ShadowDom-encapsulated component.\n this._styleRoot = _getShadowRoot(this._elementRef.nativeElement) ?? this._document.head;\n }\n\n ngOnDestroy(): void {\n this._styleElement?.remove();\n this._styleElement = undefined;\n }\n\n stickyColumnsUpdated({sizes}: StickyUpdate): void {\n this._startSizes = sizes;\n this._updateScrollbar();\n }\n\n stickyEndColumnsUpdated({sizes}: StickyUpdate): void {\n this._endSizes = sizes;\n this._updateScrollbar();\n }\n\n stickyHeaderRowsUpdated({sizes}: StickyUpdate): void {\n this._headerSizes = sizes;\n this._updateScrollbar();\n }\n\n stickyFooterRowsUpdated({sizes}: StickyUpdate): void {\n this._footerSizes = sizes;\n this._updateScrollbar();\n }\n\n /**\n * Set padding on the scrollbar track based on the sticky states from CdkTable.\n */\n private _updateScrollbar(): void {\n const topMargin = computeMargin(this._headerSizes);\n const bottomMargin = computeMargin(this._footerSizes);\n const startMargin = computeMargin(this._startSizes);\n const endMargin = computeMargin(this._endSizes);\n\n if (topMargin === 0 && bottomMargin === 0 && startMargin === 0 && endMargin === 0) {\n this._clearCss();\n return;\n }\n\n const direction = this._directionality ? this._directionality.value : 'ltr';\n const leftMargin = direction === 'rtl' ? endMargin : startMargin;\n const rightMargin = direction === 'rtl' ? startMargin : endMargin;\n\n this._applyCss(`${topMargin}px ${rightMargin}px ${bottomMargin}px ${leftMargin}px`);\n }\n\n /** Gets the stylesheet for the scrollbar styles and creates it if need be. */\n private _getStyleSheet(): CSSStyleSheet {\n if (!this._styleElement) {\n this._styleElement = this._document.createElement('style');\n this._styleRoot.appendChild(this._styleElement);\n }\n\n return this._styleElement.sheet as CSSStyleSheet;\n }\n\n /** Updates the stylesheet with the specified scrollbar style. */\n private _applyCss(value: string) {\n this._clearCss();\n\n const selector = `.${this._uniqueClassName}::-webkit-scrollbar-track`;\n this._getStyleSheet().insertRule(`${selector} {margin: ${value}}`, 0);\n }\n\n private _clearCss() {\n const styleSheet = this._getStyleSheet();\n if (styleSheet.cssRules.length > 0) {\n styleSheet.deleteRule(0);\n }\n }\n}\n\nfunction computeMargin(sizes: (number | null | undefined)[]): number {\n let margin = 0;\n for (const size of sizes) {\n if (size == null) {\n break;\n }\n margin += size;\n }\n return margin;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {CdkTableScrollContainer} from './table-scroll-container';\n\n@NgModule({\n declarations: [CdkTableScrollContainer],\n exports: [CdkTableScrollContainer],\n})\nexport class CdkTableScrollContainerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './table-scroll-container';\nexport * from './table-scroll-container-module';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAmBA,IAAI,MAAM,GAAG,CAAC,CAAC;AAEf;;;;;;;;;;;MAkBa,uBAAuB;IAWlC,YACmB,WAAoC,EAClB,SAAmB,EACzB,eAAgC;QAF5C,gBAAW,GAAX,WAAW,CAAyB;QAClB,cAAS,GAAT,SAAS,CAAU;QACzB,oBAAe,GAAf,eAAe,CAAiB;;QARvD,gBAAW,GAAiB,EAAE,CAAC;QAC/B,cAAS,GAAiB,EAAE,CAAC;QAC7B,iBAAY,GAAiB,EAAE,CAAC;QAChC,iBAAY,GAAiB,EAAE,CAAC;QAOtC,IAAI,CAAC,gBAAgB,GAAG,8BAA8B,EAAE,MAAM,EAAE,CAAC;QACjE,WAAW,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;KAChE;IAED,QAAQ;;;;QAIN,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KACzF;IAED,WAAW;QACT,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;KAChC;IAED,oBAAoB,CAAC,EAAC,KAAK,EAAe;QACxC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,uBAAuB,CAAC,EAAC,KAAK,EAAe;QAC3C,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,uBAAuB,CAAC,EAAC,KAAK,EAAe;QAC3C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,uBAAuB,CAAC,EAAC,KAAK,EAAe;QAC3C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;;;;IAKO,gBAAgB;QACtB,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnD,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtD,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACpD,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEhD,IAAI,SAAS,KAAK,CAAC,IAAI,YAAY,KAAK,CAAC,IAAI,WAAW,KAAK,CAAC,IAAI,SAAS,KAAK,CAAC,EAAE;YACjF,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,OAAO;SACR;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,GAAG,KAAK,CAAC;QAC5E,MAAM,UAAU,GAAG,SAAS,KAAK,KAAK,GAAG,SAAS,GAAG,WAAW,CAAC;QACjE,MAAM,WAAW,GAAG,SAAS,KAAK,KAAK,GAAG,WAAW,GAAG,SAAS,CAAC;QAElE,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,MAAM,WAAW,MAAM,YAAY,MAAM,UAAU,IAAI,CAAC,CAAC;KACrF;;IAGO,cAAc;QACpB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACvB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YAC3D,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SACjD;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,KAAsB,CAAC;KAClD;;IAGO,SAAS,CAAC,KAAa;QAC7B,IAAI,CAAC,SAAS,EAAE,CAAC;QAEjB,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,gBAAgB,2BAA2B,CAAC;QACtE,IAAI,CAAC,cAAc,EAAE,CAAC,UAAU,CAAC,GAAG,QAAQ,aAAa,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;KACvE;IAEO,SAAS;QACf,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACzC,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YAClC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAC1B;KACF;;4HAhGU,uBAAuB,4CAaxB,QAAQ;gHAbP,uBAAuB,4GAFvB,CAAC,EAAC,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,uBAAuB,EAAC,CAAC;mGAE9E,uBAAuB;kBAPnC,SAAS;mBAAC;oBACT,QAAQ,EAAE,2BAA2B;oBACrC,IAAI,EAAE;wBACJ,OAAO,EAAE,4BAA4B;qBACtC;oBACD,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,2BAA2B,EAAE,WAAW,yBAAyB,EAAC,CAAC;iBAC1F;mFAciD,QAAQ;0BAArD,MAAM;2BAAC,QAAQ;;0BACf,QAAQ;;AAqFb,SAAS,aAAa,CAAC,KAAoC;IACzD,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI,IAAI,IAAI,IAAI,EAAE;YAChB,MAAM;SACP;QACD,MAAM,IAAI,IAAI,CAAC;KAChB;IACD,OAAO,MAAM,CAAC;AAChB;;ACnJA;;;;;;;MAgBa,6BAA6B;;kIAA7B,6BAA6B;mIAA7B,6BAA6B,iBAHzB,uBAAuB,aAC5B,uBAAuB;mIAEtB,6BAA6B;mGAA7B,6BAA6B;kBAJzC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;iBACnC;;;ACfD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
|
package/listbox/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
|
|
3
7
|
*/
|
|
4
8
|
export * from './public-api';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
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
|
-
*/
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./listbox";
|
|
8
3
|
export declare class CdkListboxModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkListboxModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkListboxModule, [typeof i1.CdkListbox, typeof i1.CdkOption], never, [typeof i1.CdkListbox, typeof i1.CdkOption]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CdkListboxModule>;
|
|
9
7
|
}
|
package/listbox/listbox.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { Observable } from 'rxjs';
|
|
|
13
13
|
import { ControlValueAccessor } from '@angular/forms';
|
|
14
14
|
import { CdkComboboxPanel } from '@angular/cdk-experimental/combobox';
|
|
15
15
|
import { Directionality } from '@angular/cdk/bidi';
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
16
17
|
export declare const CDK_LISTBOX_VALUE_ACCESSOR: any;
|
|
17
18
|
export declare const PANEL: InjectionToken<CdkComboboxPanel<unknown>>;
|
|
18
19
|
export declare class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightable {
|
|
@@ -62,6 +63,8 @@ export declare class CdkOption<T = unknown> implements ListKeyManagerOption, Hig
|
|
|
62
63
|
setInactiveStyles(): void;
|
|
63
64
|
static ngAcceptInputType_selected: BooleanInput;
|
|
64
65
|
static ngAcceptInputType_disabled: BooleanInput;
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkOption<any>, never>;
|
|
67
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkOption<any>, "[cdkOption]", ["cdkOption"], { "id": "id"; "selected": "selected"; "disabled": "disabled"; "value": "value"; }, { "selectionChange": "selectionChange"; }, never>;
|
|
65
68
|
}
|
|
66
69
|
export declare class CdkListbox<T> implements AfterContentInit, OnDestroy, OnInit, ControlValueAccessor {
|
|
67
70
|
readonly _parentPanel?: CdkComboboxPanel<T> | undefined;
|
|
@@ -153,6 +156,8 @@ export declare class CdkListbox<T> implements AfterContentInit, OnDestroy, OnIni
|
|
|
153
156
|
static ngAcceptInputType_multiple: BooleanInput;
|
|
154
157
|
static ngAcceptInputType_useActiveDescendant: BooleanInput;
|
|
155
158
|
static ngAcceptInputType_autoFocus: BooleanInput;
|
|
159
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkListbox<any>, [{ optional: true; }, { optional: true; }]>;
|
|
160
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkListbox<any>, "[cdkListbox]", ["cdkListbox"], { "id": "id"; "multiple": "multiple"; "disabled": "disabled"; "useActiveDescendant": "useActiveDescendant"; "autoFocus": "autoFocus"; "orientation": "listboxOrientation"; "compareWith": "compareWith"; "_explicitPanel": "parentPanel"; }, { "selectionChange": "selectionChange"; }, ["_options"]>;
|
|
156
161
|
}
|
|
157
162
|
/** Change event that is being fired whenever the selected state of an option changes. */
|
|
158
163
|
export interface ListboxSelectionChangeEvent<T> {
|
package/listbox/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cdk-experimental/listbox",
|
|
3
|
-
"
|
|
4
|
-
"fesm2015": "../fesm2015/listbox.
|
|
5
|
-
"
|
|
6
|
-
"typings": "./
|
|
7
|
-
"module": "../fesm2015/listbox.
|
|
8
|
-
"
|
|
3
|
+
"fesm2020": "../fesm2020/listbox.mjs",
|
|
4
|
+
"fesm2015": "../fesm2015/listbox.mjs",
|
|
5
|
+
"esm2020": "../esm2020/listbox/listbox_public_index.mjs",
|
|
6
|
+
"typings": "./listbox_public_index.d.ts",
|
|
7
|
+
"module": "../fesm2015/listbox.mjs",
|
|
8
|
+
"es2020": "../fesm2020/listbox.mjs"
|
|
9
9
|
}
|
package/menu/context-menu.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { Directionality } from '@angular/cdk/bidi';
|
|
|
10
10
|
import { Overlay } from '@angular/cdk/overlay';
|
|
11
11
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
12
12
|
import { CdkMenuPanel } from './menu-panel';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
13
14
|
/** Tracks the last open context menu trigger across the entire application. */
|
|
14
15
|
export declare class ContextMenuTracker {
|
|
15
16
|
/** The last open context menu trigger. */
|
|
@@ -19,6 +20,8 @@ export declare class ContextMenuTracker {
|
|
|
19
20
|
* @param trigger the trigger for the currently open Context Menu.
|
|
20
21
|
*/
|
|
21
22
|
update(trigger: CdkContextMenuTrigger): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuTracker, never>;
|
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ContextMenuTracker>;
|
|
22
25
|
}
|
|
23
26
|
/** Configuration options passed to the context menu. */
|
|
24
27
|
export declare type ContextMenuOptions = {
|
|
@@ -115,4 +118,6 @@ export declare class CdkContextMenuTrigger implements OnDestroy {
|
|
|
115
118
|
/** Set the menu panels menu stack back to null. */
|
|
116
119
|
private _resetPanelMenuStack;
|
|
117
120
|
static ngAcceptInputType_disabled: BooleanInput;
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkContextMenuTrigger, [null, null, null, null, { optional: true; }]>;
|
|
122
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkContextMenuTrigger, "[cdkContextMenuTriggerFor]", ["cdkContextMenuTriggerFor"], { "menuPanel": "cdkContextMenuTriggerFor"; "disabled": "cdkContextMenuDisabled"; }, { "opened": "cdkContextMenuOpened"; "closed": "cdkContextMenuClosed"; }, never>;
|
|
118
123
|
}
|
package/menu/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
|
|
3
7
|
*/
|
|
4
8
|
export * from './public-api';
|
|
5
|
-
export { Menu as ɵangular_material_src_cdk_experimental_menu_menu_a } from './menu-interface';
|
|
6
|
-
export { CdkMenuItemSelectable as ɵangular_material_src_cdk_experimental_menu_menu_b } from './menu-item-selectable';
|
package/menu/menu-aim.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { NgZone, OnDestroy, InjectionToken } from '@angular/core';
|
|
9
9
|
import { PointerFocusTracker, FocusableElement } from './pointer-focus-tracker';
|
|
10
10
|
import { Menu } from './menu-interface';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
11
12
|
/**
|
|
12
13
|
* MenuAim is responsible for determining if a sibling menuitem's menu should be closed when a
|
|
13
14
|
* Toggler item is hovered into. It is up to the hovered in item to call the MenuAim service in
|
|
@@ -82,10 +83,14 @@ export declare class TargetMenuAim implements MenuAim, OnDestroy {
|
|
|
82
83
|
/** Subscribe to the root menus mouse move events and update the tracked mouse points. */
|
|
83
84
|
private _subscribeToMouseMoves;
|
|
84
85
|
ngOnDestroy(): void;
|
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TargetMenuAim, never>;
|
|
87
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TargetMenuAim>;
|
|
85
88
|
}
|
|
86
89
|
/**
|
|
87
90
|
* CdkTargetMenuAim is a provider for the TargetMenuAim service. It should be added to an
|
|
88
91
|
* element with either the `cdkMenu` or `cdkMenuBar` directive and child menu items.
|
|
89
92
|
*/
|
|
90
93
|
export declare class CdkTargetMenuAim {
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkTargetMenuAim, never>;
|
|
95
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkTargetMenuAim, "[cdkTargetMenuAim]", ["cdkTargetMenuAim"], {}, {}, never>;
|
|
91
96
|
}
|
package/menu/menu-bar.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { CdkMenuGroup } from './menu-group';
|
|
|
12
12
|
import { Menu } from './menu-interface';
|
|
13
13
|
import { MenuStack } from './menu-stack';
|
|
14
14
|
import { MenuAim } from './menu-aim';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
15
16
|
/**
|
|
16
17
|
* Directive applied to an element which configures it as a MenuBar by setting the appropriate
|
|
17
18
|
* role, aria attributes, and accessible keyboard and mouse handling logic. The component that
|
|
@@ -82,4 +83,6 @@ export declare class CdkMenuBar extends CdkMenuGroup implements Menu, AfterConte
|
|
|
82
83
|
/** Return true if the MenuBar has an open submenu. */
|
|
83
84
|
private _hasOpenSubmenu;
|
|
84
85
|
ngOnDestroy(): void;
|
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuBar, [null, null, null, { optional: true; self: true; }, { optional: true; }]>;
|
|
87
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuBar, "[cdkMenuBar]", ["cdkMenuBar"], { "orientation": "cdkMenuBarOrientation"; }, {}, ["_allItems"]>;
|
|
85
88
|
}
|
package/menu/menu-group.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { EventEmitter, AfterContentInit, OnDestroy } from '@angular/core';
|
|
9
9
|
import { CdkMenuItem } from './menu-item';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
10
11
|
/**
|
|
11
12
|
* Directive which acts as a grouping container for `CdkMenuItem` instances with
|
|
12
13
|
* `role="menuitemradio"`, similar to a `role="radiogroup"` element.
|
|
@@ -27,4 +28,6 @@ export declare class CdkMenuGroup implements AfterContentInit, OnDestroy {
|
|
|
27
28
|
/** Register each selectable to emit on the change Emitter when clicked */
|
|
28
29
|
private _registerClickListener;
|
|
29
30
|
ngOnDestroy(): void;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuGroup, never>;
|
|
32
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuGroup, "[cdkMenuGroup]", ["cdkMenuGroup"], {}, { "change": "change"; }, ["_selectableItems"]>;
|
|
30
33
|
}
|
|
@@ -1,11 +1,5 @@
|
|
|
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
1
|
import { CdkMenuItemSelectable } from './menu-item-selectable';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
9
3
|
/**
|
|
10
4
|
* A directive providing behavior for the "menuitemcheckbox" ARIA role, which behaves similarly to a
|
|
11
5
|
* conventional checkbox.
|
|
@@ -13,4 +7,6 @@ import { CdkMenuItemSelectable } from './menu-item-selectable';
|
|
|
13
7
|
export declare class CdkMenuItemCheckbox extends CdkMenuItemSelectable {
|
|
14
8
|
/** Toggle the checked state of the checkbox. */
|
|
15
9
|
trigger(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemCheckbox, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemCheckbox, "[cdkMenuItemCheckbox]", ["cdkMenuItemCheckbox"], {}, {}, never>;
|
|
16
12
|
}
|
|
@@ -12,6 +12,7 @@ import { CdkMenuItemSelectable } from './menu-item-selectable';
|
|
|
12
12
|
import { CdkMenuItemTrigger } from './menu-item-trigger';
|
|
13
13
|
import { Menu } from './menu-interface';
|
|
14
14
|
import { MenuAim } from './menu-aim';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
15
16
|
/**
|
|
16
17
|
* A directive providing behavior for the "menuitemradio" ARIA role, which behaves similarly to
|
|
17
18
|
* a conventional radio-button. Any sibling `CdkMenuItemRadio` instances within the same `CdkMenu`
|
|
@@ -29,4 +30,6 @@ export declare class CdkMenuItemRadio extends CdkMenuItemSelectable implements O
|
|
|
29
30
|
/** Toggles the checked state of the radio-button. */
|
|
30
31
|
trigger(): void;
|
|
31
32
|
ngOnDestroy(): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemRadio, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
|
|
34
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemRadio, "[cdkMenuItemRadio]", ["cdkMenuItemRadio"], {}, {}, never>;
|
|
32
35
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
9
9
|
import { EventEmitter } from '@angular/core';
|
|
10
10
|
import { CdkMenuItem } from './menu-item';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
11
12
|
/**
|
|
12
13
|
* Base class providing checked state for MenuItems along with outputting a clicked event when the
|
|
13
14
|
* element is triggered. It provides functionality for selectable elements.
|
|
@@ -26,4 +27,6 @@ export declare abstract class CdkMenuItemSelectable extends CdkMenuItem {
|
|
|
26
27
|
/** If the element is not disabled emit the click event */
|
|
27
28
|
trigger(): void;
|
|
28
29
|
static ngAcceptInputType_checked: BooleanInput;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemSelectable, never>;
|
|
31
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemSelectable, never, never, { "checked": "checked"; "name": "name"; "id": "id"; }, { "toggled": "cdkMenuItemToggled"; }, never>;
|
|
29
32
|
}
|
|
@@ -12,6 +12,7 @@ import { CdkMenuPanel } from './menu-panel';
|
|
|
12
12
|
import { Menu } from './menu-interface';
|
|
13
13
|
import { MenuStack } from './menu-stack';
|
|
14
14
|
import { MenuAim } from './menu-aim';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
15
16
|
/**
|
|
16
17
|
* Whether the target element is a menu item to be ignored by the overlay background click handler.
|
|
17
18
|
*/
|
|
@@ -113,4 +114,6 @@ export declare class CdkMenuItemTrigger implements OnDestroy {
|
|
|
113
114
|
private _subscribeToOutsideClicks;
|
|
114
115
|
/** Destroy and unset the overlay reference it if exists */
|
|
115
116
|
private _destroyOverlay;
|
|
117
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemTrigger, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
118
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemTrigger, "[cdkMenuTriggerFor]", ["cdkMenuTriggerFor"], { "menuPanel": "cdkMenuTriggerFor"; }, { "opened": "cdkMenuOpened"; "closed": "cdkMenuClosed"; }, never>;
|
|
116
119
|
}
|
package/menu/menu-item.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { CdkMenuItemTrigger } from './menu-item-trigger';
|
|
|
13
13
|
import { Menu } from './menu-interface';
|
|
14
14
|
import { FocusableElement } from './pointer-focus-tracker';
|
|
15
15
|
import { Toggler, MenuAim } from './menu-aim';
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
16
17
|
/**
|
|
17
18
|
* Directive which provides the ability for an element to be focused and navigated to using the
|
|
18
19
|
* keyboard when residing in a CdkMenu, CdkMenuBar, or CdkMenuGroup. It performs user defined
|
|
@@ -95,4 +96,6 @@ export declare class CdkMenuItem implements FocusableOption, FocusableElement, T
|
|
|
95
96
|
private _getMenuStack;
|
|
96
97
|
ngOnDestroy(): void;
|
|
97
98
|
static ngAcceptInputType_disabled: BooleanInput;
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItem, [null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
|
|
100
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItem, "[cdkMenuItem]", ["cdkMenuItem"], { "disabled": "disabled"; }, { "triggered": "cdkMenuItemTriggered"; }, never>;
|
|
98
101
|
}
|
package/menu/menu-module.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
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-panel";
|
|
5
|
+
import * as i4 from "./menu-item";
|
|
6
|
+
import * as i5 from "./menu-item-radio";
|
|
7
|
+
import * as i6 from "./menu-item-checkbox";
|
|
8
|
+
import * as i7 from "./menu-item-trigger";
|
|
9
|
+
import * as i8 from "./menu-group";
|
|
10
|
+
import * as i9 from "./context-menu";
|
|
11
|
+
import * as i10 from "./menu-aim";
|
|
12
|
+
import * as i11 from "@angular/cdk/overlay";
|
|
8
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.CdkMenuPanel, typeof i4.CdkMenuItem, typeof i5.CdkMenuItemRadio, typeof i6.CdkMenuItemCheckbox, typeof i7.CdkMenuItemTrigger, typeof i8.CdkMenuGroup, typeof i9.CdkContextMenuTrigger, typeof i10.CdkTargetMenuAim], [typeof i11.OverlayModule], [typeof i1.CdkMenuBar, typeof i2.CdkMenu, typeof i3.CdkMenuPanel, typeof i4.CdkMenuItem, typeof i5.CdkMenuItemRadio, typeof i6.CdkMenuItemCheckbox, typeof i7.CdkMenuItemTrigger, typeof i8.CdkMenuGroup, typeof i9.CdkContextMenuTrigger, typeof i10.CdkTargetMenuAim]>;
|
|
16
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CdkMenuModule>;
|
|
9
17
|
}
|
package/menu/menu-panel.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { TemplateRef } from '@angular/core';
|
|
9
9
|
import { Menu } from './menu-interface';
|
|
10
10
|
import { MenuStack } from './menu-stack';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
11
12
|
/**
|
|
12
13
|
* Directive applied to an ng-template which wraps a CdkMenu and provides a reference to the
|
|
13
14
|
* child element it wraps which allows for opening of the CdkMenu in an overlay.
|
|
@@ -24,4 +25,6 @@ export declare class CdkMenuPanel {
|
|
|
24
25
|
* child Menu component, the child Menu must register its self with the parent MenuPanel.
|
|
25
26
|
*/
|
|
26
27
|
_registerMenu(child: Menu): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuPanel, never>;
|
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuPanel, "ng-template[cdkMenuPanel]", ["cdkMenuPanel"], {}, {}, never>;
|
|
27
30
|
}
|
package/menu/menu.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { CdkMenuPanel } from './menu-panel';
|
|
|
13
13
|
import { Menu } from './menu-interface';
|
|
14
14
|
import { MenuStack } from './menu-stack';
|
|
15
15
|
import { MenuAim } from './menu-aim';
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
16
17
|
/**
|
|
17
18
|
* Directive which configures the element as a Menu which should contain child elements marked as
|
|
18
19
|
* CdkMenuItem or CdkMenuGroup. Sets the appropriate role and aria-attributes for a menu and
|
|
@@ -107,4 +108,6 @@ export declare class CdkMenu extends CdkMenuGroup implements Menu, AfterContentI
|
|
|
107
108
|
ngOnDestroy(): void;
|
|
108
109
|
/** Emit and complete the closed event emitter */
|
|
109
110
|
private _emitClosedEvent;
|
|
111
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenu, [null, null, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>;
|
|
112
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenu, "[cdkMenu]", ["cdkMenu"], { "orientation": "cdkMenuOrientation"; "_explicitPanel": "cdkMenuPanel"; }, { "closed": "closed"; }, ["_nestedGroups", "_allItems"]>;
|
|
110
113
|
}
|
package/menu/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cdk-experimental/menu",
|
|
3
|
-
"
|
|
4
|
-
"fesm2015": "../fesm2015/menu.
|
|
5
|
-
"
|
|
6
|
-
"typings": "./
|
|
7
|
-
"module": "../fesm2015/menu.
|
|
8
|
-
"
|
|
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
9
|
}
|