@angular/material 10.0.0-rc.3 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +17 -17
- package/autocomplete/index.metadata.json +1 -1
- package/autocomplete/testing/autocomplete-harness.d.ts +2 -0
- package/bundles/material-autocomplete-testing.umd.js +11 -0
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -2
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +3 -1
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +5 -5
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge-testing.umd.min.js +1 -1
- package/bundles/material-badge-testing.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
- package/bundles/material-button-testing.umd.js +11 -0
- package/bundles/material-button-testing.umd.js.map +1 -1
- package/bundles/material-button-testing.umd.min.js +2 -2
- package/bundles/material-button-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.js +11 -0
- package/bundles/material-button-toggle-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js +3 -3
- package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +12 -3
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +2 -2
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +7 -2
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +4 -4
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card-testing.umd.js +335 -0
- package/bundles/material-card-testing.umd.js.map +1 -0
- package/bundles/material-card-testing.umd.min.js +44 -0
- package/bundles/material-card-testing.umd.min.js.map +1 -0
- package/bundles/material-checkbox-testing.umd.js +11 -0
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +3 -3
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-chips.umd.js +36 -12
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +4 -4
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core-testing.umd.min.js +1 -1
- package/bundles/material-core-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +11 -3
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +11 -11
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +20 -11
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +5 -5
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog-testing.umd.min.js +1 -1
- package/bundles/material-dialog-testing.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +45 -8
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +14 -7
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider-testing.umd.min.js +1 -1
- package/bundles/material-divider-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion-testing.umd.js +11 -0
- package/bundles/material-expansion-testing.umd.js.map +1 -1
- package/bundles/material-expansion-testing.umd.min.js +3 -3
- package/bundles/material-expansion-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +32 -0
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.min.js +4 -4
- package/bundles/material-form-field-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +47 -21
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +5 -5
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.min.js +1 -1
- package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +2 -2
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +2 -2
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-input-testing.umd.js +23 -6
- package/bundles/material-input-testing.umd.js.map +1 -1
- package/bundles/material-input-testing.umd.min.js +3 -3
- package/bundles/material-input-testing.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +28 -3
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +3 -3
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list-testing.umd.js +33 -0
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.min.js +2 -2
- package/bundles/material-list-testing.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +3 -3
- package/bundles/material-list.umd.min.js +1 -1
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +22 -0
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -2
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +13 -2
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +4 -4
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +1 -1
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.js +1 -1
- package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js +2 -2
- package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +2 -2
- package/bundles/material-progress-spinner.umd.min.js +3 -3
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +11 -0
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +3 -3
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +15 -5
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +2 -2
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +11 -0
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -2
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +11 -3
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +4 -4
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.min.js +1 -1
- package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +41 -17
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +2 -2
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +11 -0
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js +2 -2
- package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.js +11 -0
- package/bundles/material-slider-testing.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.min.js +2 -2
- package/bundles/material-slider-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +47 -39
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +2 -2
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort-testing.umd.js +10 -10
- package/bundles/material-sort-testing.umd.js.map +1 -1
- package/bundles/material-sort-testing.umd.min.js +3 -3
- package/bundles/material-sort-testing.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +25 -12
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +5 -5
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-table-testing.umd.min.js +1 -1
- package/bundles/material-table-testing.umd.min.js.map +1 -1
- package/bundles/material-table.umd.min.js +2 -2
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs-testing.umd.min.js +1 -1
- package/bundles/material-tabs-testing.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +23 -4
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +5 -12
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.js +330 -0
- package/bundles/material-toolbar-testing.umd.js.map +1 -0
- package/bundles/material-toolbar-testing.umd.min.js +44 -0
- package/bundles/material-toolbar-testing.umd.min.js.map +1 -0
- package/bundles/material-tooltip-testing.umd.min.js +1 -1
- package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +14 -1
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +3 -3
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js.map +1 -1
- package/button/_button-base.scss +1 -1
- package/button/_button-theme.scss +8 -8
- package/button/index.metadata.json +1 -1
- package/button/testing/button-harness.d.ts +2 -0
- package/button-toggle/button-toggle.d.ts +10 -3
- package/button-toggle/index.metadata.json +1 -1
- package/button-toggle/testing/button-toggle-harness.d.ts +2 -0
- package/card/testing/card-harness-filters.d.ts +17 -0
- package/card/testing/card-harness.d.ts +36 -0
- package/card/testing/index.d.ts +8 -0
- package/card/testing/package.json +9 -0
- package/card/testing/public-api.d.ts +9 -0
- package/checkbox/index.metadata.json +1 -1
- package/checkbox/testing/checkbox-harness.d.ts +2 -0
- package/chips/chip.d.ts +19 -1
- package/chips/index.metadata.json +1 -1
- package/core/focus-indicators/_focus-indicators.scss +6 -6
- package/core/index.metadata.json +1 -1
- package/core/option/optgroup.d.ts +7 -0
- package/core/ripple/ripple-ref.d.ts +21 -2
- package/core/ripple/ripple-renderer.d.ts +1 -19
- package/core/ripple/ripple.d.ts +2 -2
- package/core/style/_list-common.scss +1 -1
- package/datepicker/date-range-input-parts.d.ts +2 -4
- package/datepicker/date-range-input.d.ts +4 -4
- package/datepicker/date-range-picker.d.ts +10 -3
- package/datepicker/datepicker.d.ts +2 -3
- package/datepicker/index.metadata.json +1 -1
- package/datepicker/public-api.d.ts +1 -1
- package/dialog/dialog-container.d.ts +9 -2
- package/dialog/dialog-content-directives.d.ts +1 -0
- package/dialog/dialog-ref.d.ts +7 -0
- package/dialog/index.metadata.json +1 -1
- package/esm2015/autocomplete/autocomplete-module.js +18 -22
- package/esm2015/autocomplete/autocomplete-origin.js +16 -20
- package/esm2015/autocomplete/autocomplete-trigger.js +519 -521
- package/esm2015/autocomplete/autocomplete.js +126 -130
- package/esm2015/autocomplete/testing/autocomplete-harness.js +99 -97
- package/esm2015/badge/badge-module.js +13 -17
- package/esm2015/badge/badge.js +184 -188
- package/esm2015/badge/testing/badge-harness.js +74 -78
- package/esm2015/bottom-sheet/bottom-sheet-container.js +161 -165
- package/esm2015/bottom-sheet/bottom-sheet-module.js +15 -19
- package/esm2015/bottom-sheet/bottom-sheet.js +124 -128
- package/esm2015/bottom-sheet/testing/bottom-sheet-harness.js +29 -33
- package/esm2015/button/button-module.js +20 -24
- package/esm2015/button/button.js +111 -114
- package/esm2015/button/testing/button-harness.js +60 -58
- package/esm2015/button-toggle/button-toggle-module.js +10 -14
- package/esm2015/button-toggle/button-toggle.js +368 -368
- package/esm2015/button-toggle/testing/button-toggle-group-harness.js +42 -46
- package/esm2015/button-toggle/testing/button-toggle-harness.js +113 -111
- package/esm2015/card/card-module.js +30 -34
- package/esm2015/card/card.js +147 -203
- package/esm2015/card/testing/card-harness-filters.js +8 -0
- package/esm2015/card/testing/card-harness.js +52 -0
- package/esm2015/card/testing/index.js +9 -0
- package/esm2015/card/testing/public-api.js +10 -0
- package/esm2015/card/testing/testing.externs.js +0 -0
- package/esm2015/checkbox/checkbox-module.js +21 -29
- package/esm2015/checkbox/checkbox-required-validator.js +9 -13
- package/esm2015/checkbox/checkbox.js +315 -319
- package/esm2015/checkbox/testing/checkbox-harness.js +150 -148
- package/esm2015/chips/chip-input.js +119 -123
- package/esm2015/chips/chip-list.js +572 -576
- package/esm2015/chips/chip.js +333 -328
- package/esm2015/chips/chips-module.js +16 -20
- package/esm2015/core/animation/animation.js +12 -20
- package/esm2015/core/common-behaviors/common-module.js +91 -95
- package/esm2015/core/datetime/index.js +19 -27
- package/esm2015/core/datetime/native-date-adapter.js +202 -206
- package/esm2015/core/error/error-options.js +16 -24
- package/esm2015/core/line/line.js +18 -26
- package/esm2015/core/option/index.js +10 -14
- package/esm2015/core/option/optgroup.js +36 -33
- package/esm2015/core/option/option.js +181 -185
- package/esm2015/core/ripple/index.js +10 -14
- package/esm2015/core/ripple/ripple-ref.js +1 -1
- package/esm2015/core/ripple/ripple-renderer.js +1 -1
- package/esm2015/core/ripple/ripple.js +102 -106
- package/esm2015/core/selection/index.js +9 -13
- package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +32 -36
- package/esm2015/core/testing/optgroup-harness.js +39 -43
- package/esm2015/core/testing/option-harness.js +51 -55
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/calendar-body.js +214 -218
- package/esm2015/datepicker/calendar.js +295 -303
- package/esm2015/datepicker/date-range-input-parts.js +214 -229
- package/esm2015/datepicker/date-range-input.js +244 -242
- package/esm2015/datepicker/date-range-picker.js +19 -23
- package/esm2015/datepicker/date-range-selection-strategy.js +31 -35
- package/esm2015/datepicker/date-selection-model.js +110 -122
- package/esm2015/datepicker/datepicker-base.js +418 -426
- package/esm2015/datepicker/datepicker-input-base.js +227 -224
- package/esm2015/datepicker/datepicker-input.js +111 -115
- package/esm2015/datepicker/datepicker-intl.js +37 -41
- package/esm2015/datepicker/datepicker-module.js +62 -66
- package/esm2015/datepicker/datepicker-toggle.js +81 -89
- package/esm2015/datepicker/datepicker.js +13 -17
- package/esm2015/datepicker/month-view.js +283 -287
- package/esm2015/datepicker/multi-year-view.js +198 -202
- package/esm2015/datepicker/public-api.js +2 -2
- package/esm2015/datepicker/year-view.js +220 -224
- package/esm2015/dialog/dialog-container.js +175 -164
- package/esm2015/dialog/dialog-content-directives.js +105 -114
- package/esm2015/dialog/dialog-module.js +32 -36
- package/esm2015/dialog/dialog-ref.js +17 -3
- package/esm2015/dialog/dialog.js +236 -240
- package/esm2015/dialog/testing/dialog-harness.js +58 -62
- package/esm2015/divider/divider-module.js +10 -14
- package/esm2015/divider/divider.js +33 -37
- package/esm2015/divider/testing/divider-harness.js +16 -20
- package/esm2015/expansion/accordion.js +73 -77
- package/esm2015/expansion/expansion-module.js +26 -30
- package/esm2015/expansion/expansion-panel-content.js +13 -17
- package/esm2015/expansion/expansion-panel-header.js +168 -180
- package/esm2015/expansion/expansion-panel.js +144 -152
- package/esm2015/expansion/testing/accordion-harness.js +24 -28
- package/esm2015/expansion/testing/expansion-harness.js +136 -134
- package/esm2015/form-field/error.js +26 -23
- package/esm2015/form-field/form-field-control.js +6 -10
- package/esm2015/form-field/form-field-module.js +31 -35
- package/esm2015/form-field/form-field.js +407 -409
- package/esm2015/form-field/hint.js +35 -29
- package/esm2015/form-field/label.js +8 -12
- package/esm2015/form-field/placeholder.js +8 -12
- package/esm2015/form-field/prefix.js +16 -13
- package/esm2015/form-field/suffix.js +16 -13
- package/esm2015/form-field/testing/form-field-harness.js +220 -206
- package/esm2015/grid-list/grid-list-module.js +26 -30
- package/esm2015/grid-list/grid-list.js +108 -112
- package/esm2015/grid-list/grid-tile.js +91 -111
- package/esm2015/grid-list/testing/grid-list-harness.js +62 -66
- package/esm2015/grid-list/testing/grid-tile-harness.js +69 -73
- package/esm2015/grid-list/tile-styler.js +1 -1
- package/esm2015/icon/icon-module.js +10 -14
- package/esm2015/icon/icon-registry.js +406 -410
- package/esm2015/icon/icon.js +228 -232
- package/esm2015/icon/testing/fake-icon-registry.js +66 -74
- package/esm2015/input/autosize.js +30 -34
- package/esm2015/input/input-module.js +21 -25
- package/esm2015/input/input.js +305 -284
- package/esm2015/input/testing/input-harness.js +129 -123
- package/esm2015/list/list-module.js +32 -36
- package/esm2015/list/list.js +165 -189
- package/esm2015/list/selection-list.js +503 -511
- package/esm2015/list/testing/action-list-harness.js +55 -57
- package/esm2015/list/testing/list-harness.js +31 -39
- package/esm2015/list/testing/list-item-harness-base.js +13 -17
- package/esm2015/list/testing/nav-list-harness.js +62 -64
- package/esm2015/list/testing/selection-list-harness.js +136 -138
- package/esm2015/menu/menu-content.js +74 -71
- package/esm2015/menu/menu-item.js +119 -123
- package/esm2015/menu/menu-module.js +29 -37
- package/esm2015/menu/menu-panel.js +1 -1
- package/esm2015/menu/menu-trigger.js +402 -405
- package/esm2015/menu/menu.js +329 -339
- package/esm2015/menu/testing/menu-harness.js +193 -189
- package/esm2015/paginator/paginator-intl.js +36 -40
- package/esm2015/paginator/paginator-module.js +16 -20
- package/esm2015/paginator/paginator.js +205 -209
- package/esm2015/paginator/testing/paginator-harness.js +91 -95
- package/esm2015/progress-bar/progress-bar-module.js +10 -14
- package/esm2015/progress-bar/progress-bar.js +114 -118
- package/esm2015/progress-bar/testing/progress-bar-harness.js +27 -31
- package/esm2015/progress-spinner/progress-spinner-module.js +17 -21
- package/esm2015/progress-spinner/progress-spinner.js +181 -189
- package/esm2015/progress-spinner/testing/progress-spinner-harness.js +28 -32
- package/esm2015/radio/radio-module.js +10 -14
- package/esm2015/radio/radio.js +437 -444
- package/esm2015/radio/testing/radio-harness.js +241 -243
- package/esm2015/select/select-module.js +23 -27
- package/esm2015/select/select.js +917 -918
- package/esm2015/select/testing/select-harness.js +138 -136
- package/esm2015/sidenav/drawer.js +632 -620
- package/esm2015/sidenav/sidenav-module.js +31 -35
- package/esm2015/sidenav/sidenav.js +104 -116
- package/esm2015/sidenav/testing/drawer-harness.js +40 -44
- package/esm2015/sidenav/testing/sidenav-harness.js +20 -24
- package/esm2015/slide-toggle/slide-toggle-module.js +27 -35
- package/esm2015/slide-toggle/slide-toggle-required-validator.js +9 -13
- package/esm2015/slide-toggle/slide-toggle.js +184 -188
- package/esm2015/slide-toggle/testing/slide-toggle-harness.js +123 -121
- package/esm2015/slider/slider-module.js +10 -14
- package/esm2015/slider/slider.js +640 -644
- package/esm2015/slider/testing/slider-harness.js +129 -127
- package/esm2015/snack-bar/simple-snack-bar.js +32 -36
- package/esm2015/snack-bar/snack-bar-container.js +144 -148
- package/esm2015/snack-bar/snack-bar-module.js +17 -21
- package/esm2015/snack-bar/snack-bar-ref.js +1 -1
- package/esm2015/snack-bar/snack-bar.js +208 -205
- package/esm2015/snack-bar/testing/snack-bar-harness.js +112 -116
- package/esm2015/sort/sort-header-intl.js +21 -21
- package/esm2015/sort/sort-header.js +200 -194
- package/esm2015/sort/sort-module.js +11 -15
- package/esm2015/sort/sort.js +92 -96
- package/esm2015/sort/testing/sort-harness.js +28 -32
- package/esm2015/sort/testing/sort-header-harness.js +66 -67
- package/esm2015/stepper/step-header.js +78 -82
- package/esm2015/stepper/step-label.js +8 -12
- package/esm2015/stepper/stepper-button.js +23 -31
- package/esm2015/stepper/stepper-icon.js +16 -20
- package/esm2015/stepper/stepper-intl.js +15 -19
- package/esm2015/stepper/stepper-module.js +40 -44
- package/esm2015/stepper/stepper.js +139 -155
- package/esm2015/table/cell.js +94 -122
- package/esm2015/table/row.js +90 -118
- package/esm2015/table/table-module.js +13 -17
- package/esm2015/table/table.js +26 -30
- package/esm2015/table/testing/cell-harness.js +56 -68
- package/esm2015/table/testing/row-harness.js +90 -102
- package/esm2015/table/testing/table-harness.js +65 -69
- package/esm2015/table/text-column.js +17 -21
- package/esm2015/tabs/index.js +4 -2
- package/esm2015/tabs/ink-bar.js +55 -59
- package/esm2015/tabs/paginated-tab-header.js +415 -419
- package/esm2015/tabs/tab-body.js +179 -191
- package/esm2015/tabs/tab-content.js +21 -16
- package/esm2015/tabs/tab-group.js +263 -271
- package/esm2015/tabs/tab-header.js +69 -77
- package/esm2015/tabs/tab-label-wrapper.js +29 -33
- package/esm2015/tabs/tab-label.js +16 -13
- package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +199 -215
- package/esm2015/tabs/tab.js +80 -83
- package/esm2015/tabs/tabs-module.js +38 -42
- package/esm2015/tabs/testing/tab-group-harness.js +52 -56
- package/esm2015/tabs/testing/tab-harness.js +78 -82
- package/esm2015/toolbar/testing/index.js +9 -0
- package/esm2015/toolbar/testing/public-api.js +10 -0
- package/esm2015/toolbar/testing/testing.externs.js +0 -0
- package/esm2015/toolbar/testing/toolbar-harness-filters.js +8 -0
- package/esm2015/toolbar/testing/toolbar-harness.js +47 -0
- package/esm2015/toolbar/toolbar-module.js +10 -14
- package/esm2015/toolbar/toolbar.js +61 -69
- package/esm2015/tooltip/testing/tooltip-harness.js +43 -47
- package/esm2015/tooltip/tooltip-module.js +17 -21
- package/esm2015/tooltip/tooltip.js +502 -497
- package/esm2015/tree/data-source/flat-data-source.js +1 -1
- package/esm2015/tree/node.js +99 -111
- package/esm2015/tree/outlet.js +19 -23
- package/esm2015/tree/padding.js +13 -17
- package/esm2015/tree/toggle.js +15 -19
- package/esm2015/tree/tree-module.js +10 -14
- package/esm2015/tree/tree.js +23 -27
- package/expansion/testing/expansion-harness.d.ts +2 -0
- package/fesm2015/autocomplete/testing.js +98 -95
- package/fesm2015/autocomplete/testing.js.map +1 -1
- package/fesm2015/autocomplete.js +677 -687
- package/fesm2015/autocomplete.js.map +1 -1
- package/fesm2015/badge/testing.js +73 -76
- package/fesm2015/badge/testing.js.map +1 -1
- package/fesm2015/badge.js +195 -201
- package/fesm2015/badge.js.map +1 -1
- package/fesm2015/bottom-sheet/testing.js +28 -31
- package/fesm2015/bottom-sheet/testing.js.map +1 -1
- package/fesm2015/bottom-sheet.js +297 -306
- package/fesm2015/bottom-sheet.js.map +1 -1
- package/fesm2015/button/testing.js +59 -56
- package/fesm2015/button/testing.js.map +1 -1
- package/fesm2015/button-toggle/testing.js +155 -155
- package/fesm2015/button-toggle/testing.js.map +1 -1
- package/fesm2015/button-toggle.js +377 -378
- package/fesm2015/button-toggle.js.map +1 -1
- package/fesm2015/button.js +129 -133
- package/fesm2015/button.js.map +1 -1
- package/fesm2015/card/testing.js +79 -0
- package/fesm2015/card/testing.js.map +1 -0
- package/fesm2015/card.js +175 -220
- package/fesm2015/card.js.map +1 -1
- package/fesm2015/checkbox/testing.js +149 -146
- package/fesm2015/checkbox/testing.js.map +1 -1
- package/fesm2015/checkbox.js +342 -354
- package/fesm2015/checkbox.js.map +1 -1
- package/fesm2015/chips.js +1039 -1039
- package/fesm2015/chips.js.map +1 -1
- package/fesm2015/core/testing.js +88 -94
- package/fesm2015/core/testing.js.map +1 -1
- package/fesm2015/core.js +729 -773
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker.js +2821 -2884
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog/testing.js +57 -60
- package/fesm2015/dialog/testing.js.map +1 -1
- package/fesm2015/dialog.js +564 -549
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/divider/testing.js +15 -18
- package/fesm2015/divider/testing.js.map +1 -1
- package/fesm2015/divider.js +41 -47
- package/fesm2015/divider.js.map +1 -1
- package/fesm2015/expansion/testing.js +159 -159
- package/fesm2015/expansion/testing.js.map +1 -1
- package/fesm2015/expansion.js +422 -446
- package/fesm2015/expansion.js.map +1 -1
- package/fesm2015/form-field/testing.js +219 -204
- package/fesm2015/form-field/testing.js.map +1 -1
- package/fesm2015/form-field.js +538 -532
- package/fesm2015/form-field.js.map +1 -1
- package/fesm2015/grid-list/testing.js +129 -135
- package/fesm2015/grid-list/testing.js.map +1 -1
- package/fesm2015/grid-list.js +221 -242
- package/fesm2015/grid-list.js.map +1 -1
- package/fesm2015/icon/testing.js +65 -71
- package/fesm2015/icon/testing.js.map +1 -1
- package/fesm2015/icon.js +660 -669
- package/fesm2015/icon.js.map +1 -1
- package/fesm2015/input/testing.js +128 -121
- package/fesm2015/input/testing.js.map +1 -1
- package/fesm2015/input.js +353 -337
- package/fesm2015/input.js.map +1 -1
- package/fesm2015/list/testing.js +298 -307
- package/fesm2015/list/testing.js.map +1 -1
- package/fesm2015/list.js +698 -725
- package/fesm2015/list.js.map +1 -1
- package/fesm2015/menu/testing.js +192 -186
- package/fesm2015/menu/testing.js.map +1 -1
- package/fesm2015/menu.js +948 -962
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/paginator/testing.js +90 -93
- package/fesm2015/paginator/testing.js.map +1 -1
- package/fesm2015/paginator.js +247 -256
- package/fesm2015/paginator.js.map +1 -1
- package/fesm2015/progress-bar/testing.js +26 -29
- package/fesm2015/progress-bar/testing.js.map +1 -1
- package/fesm2015/progress-bar.js +122 -128
- package/fesm2015/progress-bar.js.map +1 -1
- package/fesm2015/progress-spinner/testing.js +27 -30
- package/fesm2015/progress-spinner/testing.js.map +1 -1
- package/fesm2015/progress-spinner.js +196 -205
- package/fesm2015/progress-spinner.js.map +1 -1
- package/fesm2015/radio/testing.js +240 -240
- package/fesm2015/radio/testing.js.map +1 -1
- package/fesm2015/radio.js +447 -453
- package/fesm2015/radio.js.map +1 -1
- package/fesm2015/select/testing.js +137 -134
- package/fesm2015/select/testing.js.map +1 -1
- package/fesm2015/select.js +939 -941
- package/fesm2015/select.js.map +1 -1
- package/fesm2015/sidenav/testing.js +58 -64
- package/fesm2015/sidenav/testing.js.map +1 -1
- package/fesm2015/sidenav.js +765 -762
- package/fesm2015/sidenav.js.map +1 -1
- package/fesm2015/slide-toggle/testing.js +122 -119
- package/fesm2015/slide-toggle/testing.js.map +1 -1
- package/fesm2015/slide-toggle.js +217 -229
- package/fesm2015/slide-toggle.js.map +1 -1
- package/fesm2015/slider/testing.js +128 -125
- package/fesm2015/slider/testing.js.map +1 -1
- package/fesm2015/slider.js +648 -654
- package/fesm2015/slider.js.map +1 -1
- package/fesm2015/snack-bar/testing.js +111 -114
- package/fesm2015/snack-bar/testing.js.map +1 -1
- package/fesm2015/snack-bar.js +426 -431
- package/fesm2015/snack-bar.js.map +1 -1
- package/fesm2015/sort/testing.js +92 -95
- package/fesm2015/sort/testing.js.map +1 -1
- package/fesm2015/sort.js +320 -318
- package/fesm2015/sort.js.map +1 -1
- package/fesm2015/stepper.js +312 -345
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/table/testing.js +208 -229
- package/fesm2015/table/testing.js.map +1 -1
- package/fesm2015/table.js +235 -286
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tabs/testing.js +128 -134
- package/fesm2015/tabs/testing.js.map +1 -1
- package/fesm2015/tabs.js +1362 -1399
- package/fesm2015/tabs.js.map +1 -1
- package/fesm2015/toolbar/testing.js +74 -0
- package/fesm2015/toolbar/testing.js.map +1 -0
- package/fesm2015/toolbar.js +69 -78
- package/fesm2015/toolbar.js.map +1 -1
- package/fesm2015/tooltip/testing.js +42 -45
- package/fesm2015/tooltip/testing.js.map +1 -1
- package/fesm2015/tooltip.js +517 -513
- package/fesm2015/tooltip.js.map +1 -1
- package/fesm2015/tree.js +173 -197
- package/fesm2015/tree.js.map +1 -1
- package/form-field/error.d.ts +7 -0
- package/form-field/hint.d.ts +10 -0
- package/form-field/index.metadata.json +1 -1
- package/form-field/prefix.d.ts +7 -0
- package/form-field/suffix.d.ts +7 -0
- package/form-field/testing/form-field-harness.d.ts +8 -0
- package/grid-list/grid-list.d.ts +2 -1
- package/grid-list/index.metadata.json +1 -1
- package/grid-list/tile-styler.d.ts +10 -5
- package/input/_input-theme.scss +2 -2
- package/input/index.metadata.json +1 -1
- package/input/input.d.ts +6 -2
- package/input/testing/input-harness.d.ts +2 -0
- package/list/index.metadata.json +1 -1
- package/list/testing/action-list-harness.d.ts +2 -0
- package/list/testing/nav-list-harness.d.ts +2 -0
- package/list/testing/selection-list-harness.d.ts +2 -0
- package/menu/index.metadata.json +1 -1
- package/menu/menu-content.d.ts +7 -1
- package/menu/menu-panel.d.ts +1 -0
- package/menu/menu.d.ts +4 -0
- package/menu/testing/menu-harness.d.ts +4 -0
- package/package.json +6 -6
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-spinner/index.metadata.json +1 -1
- package/radio/index.metadata.json +1 -1
- package/radio/radio.d.ts +6 -0
- package/radio/testing/radio-harness.d.ts +2 -0
- package/schematics/migration.json +5 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +3 -3
- package/schematics/ng-generate/navigation/schema.json +5 -0
- package/schematics/ng-update/data/index.js +1 -1
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +7 -2
- package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +639 -639
- package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +1 -1
- package/select/index.metadata.json +1 -1
- package/select/select.d.ts +6 -0
- package/select/testing/select-harness.d.ts +2 -0
- package/sidenav/drawer.d.ts +15 -3
- package/sidenav/index.metadata.json +1 -1
- package/slide-toggle/index.metadata.json +1 -1
- package/slide-toggle/testing/slide-toggle-harness.d.ts +2 -0
- package/slider/testing/slider-harness.d.ts +2 -0
- package/snack-bar/index.metadata.json +1 -1
- package/snack-bar/simple-snack-bar.d.ts +13 -1
- package/snack-bar/snack-bar-container.d.ts +16 -3
- package/snack-bar/snack-bar-ref.d.ts +3 -3
- package/snack-bar/snack-bar.d.ts +10 -3
- package/sort/index.metadata.json +1 -1
- package/sort/sort-header-intl.d.ts +5 -1
- package/sort/sort-header.d.ts +3 -1
- package/sort/testing/sort-header-harness.d.ts +6 -2
- package/tabs/index.d.ts +3 -1
- package/tabs/index.metadata.json +1 -1
- package/tabs/tab-content.d.ts +7 -1
- package/tabs/tab-label.d.ts +7 -0
- package/toolbar/testing/index.d.ts +8 -0
- package/toolbar/testing/package.json +9 -0
- package/toolbar/testing/public-api.d.ts +9 -0
- package/toolbar/testing/toolbar-harness-filters.d.ts +13 -0
- package/toolbar/testing/toolbar-harness.d.ts +31 -0
- package/tooltip/index.metadata.json +1 -1
- package/tooltip/tooltip.d.ts +1 -0
- package/tree/data-source/flat-data-source.d.ts +4 -4
- package/tree/index.metadata.json +1 -1
package/fesm2015/sidenav.js
CHANGED
|
@@ -65,672 +65,687 @@ const MAT_DRAWER_CONTAINER = new InjectionToken('MAT_DRAWER_CONTAINER');
|
|
|
65
65
|
function MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY() {
|
|
66
66
|
return false;
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
this.
|
|
77
|
-
|
|
78
|
-
});
|
|
79
|
-
}
|
|
68
|
+
class MatDrawerContent extends CdkScrollable {
|
|
69
|
+
constructor(_changeDetectorRef, _container, elementRef, scrollDispatcher, ngZone) {
|
|
70
|
+
super(elementRef, scrollDispatcher, ngZone);
|
|
71
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
72
|
+
this._container = _container;
|
|
73
|
+
}
|
|
74
|
+
ngAfterContentInit() {
|
|
75
|
+
this._container._contentMarginChanges.subscribe(() => {
|
|
76
|
+
this._changeDetectorRef.markForCheck();
|
|
77
|
+
});
|
|
80
78
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})();
|
|
79
|
+
}
|
|
80
|
+
MatDrawerContent.decorators = [
|
|
81
|
+
{ type: Component, args: [{
|
|
82
|
+
selector: 'mat-drawer-content',
|
|
83
|
+
template: '<ng-content></ng-content>',
|
|
84
|
+
host: {
|
|
85
|
+
'class': 'mat-drawer-content',
|
|
86
|
+
'[style.margin-left.px]': '_container._contentMargins.left',
|
|
87
|
+
'[style.margin-right.px]': '_container._contentMargins.right',
|
|
88
|
+
},
|
|
89
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
90
|
+
encapsulation: ViewEncapsulation.None
|
|
91
|
+
},] }
|
|
92
|
+
];
|
|
93
|
+
MatDrawerContent.ctorParameters = () => [
|
|
94
|
+
{ type: ChangeDetectorRef },
|
|
95
|
+
{ type: MatDrawerContainer, decorators: [{ type: Inject, args: [forwardRef(() => MatDrawerContainer),] }] },
|
|
96
|
+
{ type: ElementRef },
|
|
97
|
+
{ type: ScrollDispatcher },
|
|
98
|
+
{ type: NgZone }
|
|
99
|
+
];
|
|
103
100
|
/**
|
|
104
101
|
* This component corresponds to a drawer that can be opened on the drawer container.
|
|
105
102
|
*/
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
class MatDrawer {
|
|
104
|
+
constructor(_elementRef, _focusTrapFactory, _focusMonitor, _platform, _ngZone, _doc,
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated `_container` parameter to be made required.
|
|
107
|
+
* @breaking-change 10.0.0
|
|
108
|
+
*/
|
|
109
|
+
_container) {
|
|
110
|
+
this._elementRef = _elementRef;
|
|
111
|
+
this._focusTrapFactory = _focusTrapFactory;
|
|
112
|
+
this._focusMonitor = _focusMonitor;
|
|
113
|
+
this._platform = _platform;
|
|
114
|
+
this._ngZone = _ngZone;
|
|
115
|
+
this._doc = _doc;
|
|
116
|
+
this._container = _container;
|
|
117
|
+
this._elementFocusedBeforeDrawerWasOpened = null;
|
|
118
|
+
/** Whether the drawer is initialized. Used for disabling the initial animation. */
|
|
119
|
+
this._enableAnimations = false;
|
|
120
|
+
this._position = 'start';
|
|
121
|
+
this._mode = 'over';
|
|
122
|
+
this._disableClose = false;
|
|
123
|
+
this._opened = false;
|
|
124
|
+
/** Emits whenever the drawer has started animating. */
|
|
125
|
+
this._animationStarted = new Subject();
|
|
126
|
+
/** Emits whenever the drawer is done animating. */
|
|
127
|
+
this._animationEnd = new Subject();
|
|
128
|
+
/** Current state of the sidenav animation. */
|
|
129
|
+
// @HostBinding is used in the class as it is expected to be extended. Since @Component decorator
|
|
130
|
+
// metadata is not inherited by child classes, instead the host binding data is defined in a way
|
|
131
|
+
// that can be inherited.
|
|
132
|
+
// tslint:disable:no-host-decorator-in-concrete
|
|
133
|
+
this._animationState = 'void';
|
|
134
|
+
/** Event emitted when the drawer open state is changed. */
|
|
135
|
+
this.openedChange =
|
|
136
|
+
// Note this has to be async in order to avoid some issues with two-bindings (see #8872).
|
|
137
|
+
new EventEmitter(/* isAsync */ true);
|
|
138
|
+
/** Emits when the component is destroyed. */
|
|
139
|
+
this._destroyed = new Subject();
|
|
140
|
+
/** Event emitted when the drawer's position changes. */
|
|
141
|
+
// tslint:disable-next-line:no-output-on-prefix
|
|
142
|
+
this.onPositionChanged = new EventEmitter();
|
|
109
143
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
144
|
+
* An observable that emits when the drawer mode changes. This is used by the drawer container to
|
|
145
|
+
* to know when to when the mode changes so it can adapt the margins on the content.
|
|
112
146
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this._ngZone = _ngZone;
|
|
119
|
-
this._doc = _doc;
|
|
120
|
-
this._container = _container;
|
|
121
|
-
this._elementFocusedBeforeDrawerWasOpened = null;
|
|
122
|
-
/** Whether the drawer is initialized. Used for disabling the initial animation. */
|
|
123
|
-
this._enableAnimations = false;
|
|
124
|
-
this._position = 'start';
|
|
125
|
-
this._mode = 'over';
|
|
126
|
-
this._disableClose = false;
|
|
127
|
-
this._opened = false;
|
|
128
|
-
/** Emits whenever the drawer has started animating. */
|
|
129
|
-
this._animationStarted = new Subject();
|
|
130
|
-
/** Emits whenever the drawer is done animating. */
|
|
131
|
-
this._animationEnd = new Subject();
|
|
132
|
-
/** Current state of the sidenav animation. */
|
|
133
|
-
// @HostBinding is used in the class as it is expected to be extended. Since @Component decorator
|
|
134
|
-
// metadata is not inherited by child classes, instead the host binding data is defined in a way
|
|
135
|
-
// that can be inherited.
|
|
136
|
-
// tslint:disable:no-host-decorator-in-concrete
|
|
137
|
-
this._animationState = 'void';
|
|
138
|
-
/** Event emitted when the drawer open state is changed. */
|
|
139
|
-
this.openedChange =
|
|
140
|
-
// Note this has to be async in order to avoid some issues with two-bindings (see #8872).
|
|
141
|
-
new EventEmitter(/* isAsync */ true);
|
|
142
|
-
/** Emits when the component is destroyed. */
|
|
143
|
-
this._destroyed = new Subject();
|
|
144
|
-
/** Event emitted when the drawer's position changes. */
|
|
145
|
-
// tslint:disable-next-line:no-output-on-prefix
|
|
146
|
-
this.onPositionChanged = new EventEmitter();
|
|
147
|
-
/**
|
|
148
|
-
* An observable that emits when the drawer mode changes. This is used by the drawer container to
|
|
149
|
-
* to know when to when the mode changes so it can adapt the margins on the content.
|
|
150
|
-
*/
|
|
151
|
-
this._modeChanged = new Subject();
|
|
152
|
-
this.openedChange.subscribe((opened) => {
|
|
153
|
-
if (opened) {
|
|
154
|
-
if (this._doc) {
|
|
155
|
-
this._elementFocusedBeforeDrawerWasOpened = this._doc.activeElement;
|
|
156
|
-
}
|
|
157
|
-
this._takeFocus();
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
this._restoreFocus();
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
/**
|
|
164
|
-
* Listen to `keydown` events outside the zone so that change detection is not run every
|
|
165
|
-
* time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed
|
|
166
|
-
* and we don't have close disabled.
|
|
167
|
-
*/
|
|
168
|
-
this._ngZone.runOutsideAngular(() => {
|
|
169
|
-
fromEvent(this._elementRef.nativeElement, 'keydown').pipe(filter(event => {
|
|
170
|
-
return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);
|
|
171
|
-
}), takeUntil(this._destroyed)).subscribe(event => this._ngZone.run(() => {
|
|
172
|
-
this.close();
|
|
173
|
-
event.stopPropagation();
|
|
174
|
-
event.preventDefault();
|
|
175
|
-
}));
|
|
176
|
-
});
|
|
177
|
-
// We need a Subject with distinctUntilChanged, because the `done` event
|
|
178
|
-
// fires twice on some browsers. See https://github.com/angular/angular/issues/24084
|
|
179
|
-
this._animationEnd.pipe(distinctUntilChanged((x, y) => {
|
|
180
|
-
return x.fromState === y.fromState && x.toState === y.toState;
|
|
181
|
-
})).subscribe((event) => {
|
|
182
|
-
const { fromState, toState } = event;
|
|
183
|
-
if ((toState.indexOf('open') === 0 && fromState === 'void') ||
|
|
184
|
-
(toState === 'void' && fromState.indexOf('open') === 0)) {
|
|
185
|
-
this.openedChange.emit(this._opened);
|
|
147
|
+
this._modeChanged = new Subject();
|
|
148
|
+
this.openedChange.subscribe((opened) => {
|
|
149
|
+
if (opened) {
|
|
150
|
+
if (this._doc) {
|
|
151
|
+
this._elementFocusedBeforeDrawerWasOpened = this._doc.activeElement;
|
|
186
152
|
}
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
/** The side that the drawer is attached to. */
|
|
190
|
-
get position() { return this._position; }
|
|
191
|
-
set position(value) {
|
|
192
|
-
// Make sure we have a valid value.
|
|
193
|
-
value = value === 'end' ? 'end' : 'start';
|
|
194
|
-
if (value != this._position) {
|
|
195
|
-
this._position = value;
|
|
196
|
-
this.onPositionChanged.emit();
|
|
153
|
+
this._takeFocus();
|
|
197
154
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
get mode() { return this._mode; }
|
|
201
|
-
set mode(value) {
|
|
202
|
-
this._mode = value;
|
|
203
|
-
this._updateFocusTrapState();
|
|
204
|
-
this._modeChanged.next();
|
|
205
|
-
}
|
|
206
|
-
/** Whether the drawer can be closed with the escape key or by clicking on the backdrop. */
|
|
207
|
-
get disableClose() { return this._disableClose; }
|
|
208
|
-
set disableClose(value) { this._disableClose = coerceBooleanProperty(value); }
|
|
209
|
-
/**
|
|
210
|
-
* Whether the drawer should focus the first focusable element automatically when opened.
|
|
211
|
-
* Defaults to false in when `mode` is set to `side`, otherwise defaults to `true`. If explicitly
|
|
212
|
-
* enabled, focus will be moved into the sidenav in `side` mode as well.
|
|
213
|
-
*/
|
|
214
|
-
get autoFocus() {
|
|
215
|
-
const value = this._autoFocus;
|
|
216
|
-
// Note that usually we disable auto focusing in `side` mode, because we don't know how the
|
|
217
|
-
// sidenav is being used, but in some cases it still makes sense to do it. If the consumer
|
|
218
|
-
// explicitly enabled `autoFocus`, we take it as them always wanting to enable it.
|
|
219
|
-
return value == null ? this.mode !== 'side' : value;
|
|
220
|
-
}
|
|
221
|
-
set autoFocus(value) { this._autoFocus = coerceBooleanProperty(value); }
|
|
222
|
-
/**
|
|
223
|
-
* Whether the drawer is opened. We overload this because we trigger an event when it
|
|
224
|
-
* starts or end.
|
|
225
|
-
*/
|
|
226
|
-
get opened() { return this._opened; }
|
|
227
|
-
set opened(value) { this.toggle(coerceBooleanProperty(value)); }
|
|
228
|
-
/** Event emitted when the drawer has been opened. */
|
|
229
|
-
get _openedStream() {
|
|
230
|
-
return this.openedChange.pipe(filter(o => o), map(() => { }));
|
|
231
|
-
}
|
|
232
|
-
/** Event emitted when the drawer has started opening. */
|
|
233
|
-
get openedStart() {
|
|
234
|
-
return this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState.indexOf('open') === 0), map(() => { }));
|
|
235
|
-
}
|
|
236
|
-
/** Event emitted when the drawer has been closed. */
|
|
237
|
-
get _closedStream() {
|
|
238
|
-
return this.openedChange.pipe(filter(o => !o), map(() => { }));
|
|
239
|
-
}
|
|
240
|
-
/** Event emitted when the drawer has started closing. */
|
|
241
|
-
get closedStart() {
|
|
242
|
-
return this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState === 'void'), map(() => { }));
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Moves focus into the drawer. Note that this works even if
|
|
246
|
-
* the focus trap is disabled in `side` mode.
|
|
247
|
-
*/
|
|
248
|
-
_takeFocus() {
|
|
249
|
-
if (!this.autoFocus || !this._focusTrap) {
|
|
250
|
-
return;
|
|
155
|
+
else if (this._isFocusWithinDrawer()) {
|
|
156
|
+
this._restoreFocus();
|
|
251
157
|
}
|
|
252
|
-
|
|
253
|
-
// If there were no focusable elements, focus the sidenav itself so the keyboard navigation
|
|
254
|
-
// still works. We need to check that `focus` is a function due to Universal.
|
|
255
|
-
if (!hasMovedFocus && typeof this._elementRef.nativeElement.focus === 'function') {
|
|
256
|
-
this._elementRef.nativeElement.focus();
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
}
|
|
158
|
+
});
|
|
260
159
|
/**
|
|
261
|
-
*
|
|
262
|
-
*
|
|
160
|
+
* Listen to `keydown` events outside the zone so that change detection is not run every
|
|
161
|
+
* time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed
|
|
162
|
+
* and we don't have close disabled.
|
|
263
163
|
*/
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
|
|
283
|
-
this._updateFocusTrapState();
|
|
284
|
-
}
|
|
285
|
-
ngAfterContentChecked() {
|
|
286
|
-
// Enable the animations after the lifecycle hooks have run, in order to avoid animating
|
|
287
|
-
// drawers that are open by default. When we're on the server, we shouldn't enable the
|
|
288
|
-
// animations, because we don't want the drawer to animate the first time the user sees
|
|
289
|
-
// the page.
|
|
290
|
-
if (this._platform.isBrowser) {
|
|
291
|
-
this._enableAnimations = true;
|
|
164
|
+
this._ngZone.runOutsideAngular(() => {
|
|
165
|
+
fromEvent(this._elementRef.nativeElement, 'keydown').pipe(filter(event => {
|
|
166
|
+
return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);
|
|
167
|
+
}), takeUntil(this._destroyed)).subscribe(event => this._ngZone.run(() => {
|
|
168
|
+
this.close();
|
|
169
|
+
event.stopPropagation();
|
|
170
|
+
event.preventDefault();
|
|
171
|
+
}));
|
|
172
|
+
});
|
|
173
|
+
// We need a Subject with distinctUntilChanged, because the `done` event
|
|
174
|
+
// fires twice on some browsers. See https://github.com/angular/angular/issues/24084
|
|
175
|
+
this._animationEnd.pipe(distinctUntilChanged((x, y) => {
|
|
176
|
+
return x.fromState === y.fromState && x.toState === y.toState;
|
|
177
|
+
})).subscribe((event) => {
|
|
178
|
+
const { fromState, toState } = event;
|
|
179
|
+
if ((toState.indexOf('open') === 0 && fromState === 'void') ||
|
|
180
|
+
(toState === 'void' && fromState.indexOf('open') === 0)) {
|
|
181
|
+
this.openedChange.emit(this._opened);
|
|
292
182
|
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/** The side that the drawer is attached to. */
|
|
186
|
+
get position() { return this._position; }
|
|
187
|
+
set position(value) {
|
|
188
|
+
// Make sure we have a valid value.
|
|
189
|
+
value = value === 'end' ? 'end' : 'start';
|
|
190
|
+
if (value != this._position) {
|
|
191
|
+
this._position = value;
|
|
192
|
+
this.onPositionChanged.emit();
|
|
293
193
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
194
|
+
}
|
|
195
|
+
/** Mode of the drawer; one of 'over', 'push' or 'side'. */
|
|
196
|
+
get mode() { return this._mode; }
|
|
197
|
+
set mode(value) {
|
|
198
|
+
this._mode = value;
|
|
199
|
+
this._updateFocusTrapState();
|
|
200
|
+
this._modeChanged.next();
|
|
201
|
+
}
|
|
202
|
+
/** Whether the drawer can be closed with the escape key or by clicking on the backdrop. */
|
|
203
|
+
get disableClose() { return this._disableClose; }
|
|
204
|
+
set disableClose(value) { this._disableClose = coerceBooleanProperty(value); }
|
|
205
|
+
/**
|
|
206
|
+
* Whether the drawer should focus the first focusable element automatically when opened.
|
|
207
|
+
* Defaults to false in when `mode` is set to `side`, otherwise defaults to `true`. If explicitly
|
|
208
|
+
* enabled, focus will be moved into the sidenav in `side` mode as well.
|
|
209
|
+
*/
|
|
210
|
+
get autoFocus() {
|
|
211
|
+
const value = this._autoFocus;
|
|
212
|
+
// Note that usually we disable auto focusing in `side` mode, because we don't know how the
|
|
213
|
+
// sidenav is being used, but in some cases it still makes sense to do it. If the consumer
|
|
214
|
+
// explicitly enabled `autoFocus`, we take it as them always wanting to enable it.
|
|
215
|
+
return value == null ? this.mode !== 'side' : value;
|
|
216
|
+
}
|
|
217
|
+
set autoFocus(value) { this._autoFocus = coerceBooleanProperty(value); }
|
|
218
|
+
/**
|
|
219
|
+
* Whether the drawer is opened. We overload this because we trigger an event when it
|
|
220
|
+
* starts or end.
|
|
221
|
+
*/
|
|
222
|
+
get opened() { return this._opened; }
|
|
223
|
+
set opened(value) { this.toggle(coerceBooleanProperty(value)); }
|
|
224
|
+
/** Event emitted when the drawer has been opened. */
|
|
225
|
+
get _openedStream() {
|
|
226
|
+
return this.openedChange.pipe(filter(o => o), map(() => { }));
|
|
227
|
+
}
|
|
228
|
+
/** Event emitted when the drawer has started opening. */
|
|
229
|
+
get openedStart() {
|
|
230
|
+
return this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState.indexOf('open') === 0), map(() => { }));
|
|
231
|
+
}
|
|
232
|
+
/** Event emitted when the drawer has been closed. */
|
|
233
|
+
get _closedStream() {
|
|
234
|
+
return this.openedChange.pipe(filter(o => !o), map(() => { }));
|
|
235
|
+
}
|
|
236
|
+
/** Event emitted when the drawer has started closing. */
|
|
237
|
+
get closedStart() {
|
|
238
|
+
return this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState === 'void'), map(() => { }));
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Moves focus into the drawer. Note that this works even if
|
|
242
|
+
* the focus trap is disabled in `side` mode.
|
|
243
|
+
*/
|
|
244
|
+
_takeFocus() {
|
|
245
|
+
if (!this.autoFocus || !this._focusTrap) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
this._focusTrap.focusInitialElementWhenReady().then(hasMovedFocus => {
|
|
249
|
+
// If there were no focusable elements, focus the sidenav itself so the keyboard navigation
|
|
250
|
+
// still works. We need to check that `focus` is a function due to Universal.
|
|
251
|
+
if (!hasMovedFocus && typeof this._elementRef.nativeElement.focus === 'function') {
|
|
252
|
+
this._elementRef.nativeElement.focus();
|
|
297
253
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Restores focus to the element that was originally focused when the drawer opened.
|
|
258
|
+
* If no element was focused at that time, the focus will be restored to the drawer.
|
|
259
|
+
*/
|
|
260
|
+
_restoreFocus() {
|
|
261
|
+
if (!this.autoFocus) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
// Note that we don't check via `instanceof HTMLElement` so that we can cover SVGs as well.
|
|
265
|
+
if (this._elementFocusedBeforeDrawerWasOpened) {
|
|
266
|
+
this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, this._openedVia);
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
this._elementRef.nativeElement.blur();
|
|
270
|
+
}
|
|
271
|
+
this._elementFocusedBeforeDrawerWasOpened = null;
|
|
272
|
+
this._openedVia = null;
|
|
273
|
+
}
|
|
274
|
+
/** Whether focus is currently within the drawer. */
|
|
275
|
+
_isFocusWithinDrawer() {
|
|
276
|
+
var _a;
|
|
277
|
+
const activeEl = (_a = this._doc) === null || _a === void 0 ? void 0 : _a.activeElement;
|
|
278
|
+
return !!activeEl && this._elementRef.nativeElement.contains(activeEl);
|
|
279
|
+
}
|
|
280
|
+
ngAfterContentInit() {
|
|
281
|
+
this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
|
|
282
|
+
this._updateFocusTrapState();
|
|
283
|
+
}
|
|
284
|
+
ngAfterContentChecked() {
|
|
285
|
+
// Enable the animations after the lifecycle hooks have run, in order to avoid animating
|
|
286
|
+
// drawers that are open by default. When we're on the server, we shouldn't enable the
|
|
287
|
+
// animations, because we don't want the drawer to animate the first time the user sees
|
|
288
|
+
// the page.
|
|
289
|
+
if (this._platform.isBrowser) {
|
|
290
|
+
this._enableAnimations = true;
|
|
315
291
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
292
|
+
}
|
|
293
|
+
ngOnDestroy() {
|
|
294
|
+
if (this._focusTrap) {
|
|
295
|
+
this._focusTrap.destroy();
|
|
296
|
+
}
|
|
297
|
+
this._animationStarted.complete();
|
|
298
|
+
this._animationEnd.complete();
|
|
299
|
+
this._modeChanged.complete();
|
|
300
|
+
this._destroyed.next();
|
|
301
|
+
this._destroyed.complete();
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Open the drawer.
|
|
305
|
+
* @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
|
|
306
|
+
* Used for focus management after the sidenav is closed.
|
|
307
|
+
*/
|
|
308
|
+
open(openedVia) {
|
|
309
|
+
return this.toggle(true, openedVia);
|
|
310
|
+
}
|
|
311
|
+
/** Close the drawer. */
|
|
312
|
+
close() {
|
|
313
|
+
return this.toggle(false);
|
|
314
|
+
}
|
|
315
|
+
/** Closes the drawer with context that the backdrop was clicked. */
|
|
316
|
+
_closeViaBackdropClick() {
|
|
317
|
+
// If the drawer is closed upon a backdrop click, we always want to restore focus. We
|
|
318
|
+
// don't need to check whether focus is currently in the drawer, as clicking on the
|
|
319
|
+
// backdrop causes blurring of the active element.
|
|
320
|
+
return this._setOpen(/* isOpen */ false, /* restoreFocus */ true);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Toggle this drawer.
|
|
324
|
+
* @param isOpen Whether the drawer should be open.
|
|
325
|
+
* @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
|
|
326
|
+
* Used for focus management after the sidenav is closed.
|
|
327
|
+
*/
|
|
328
|
+
toggle(isOpen = !this.opened, openedVia) {
|
|
329
|
+
// If the focus is currently inside the drawer content and we are closing the drawer,
|
|
330
|
+
// restore the focus to the initially focused element (when the drawer opened).
|
|
331
|
+
return this._setOpen(isOpen, /* restoreFocus */ !isOpen && this._isFocusWithinDrawer(), openedVia);
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Toggles the opened state of the drawer.
|
|
335
|
+
* @param isOpen Whether the drawer should open or close.
|
|
336
|
+
* @param restoreFocus Whether focus should be restored on close.
|
|
337
|
+
* @param openedVia Focus origin that can be optionally set when opening a drawer. The
|
|
338
|
+
* origin will be used later when focus is restored on drawer close.
|
|
339
|
+
*/
|
|
340
|
+
_setOpen(isOpen, restoreFocus, openedVia = 'program') {
|
|
341
|
+
this._opened = isOpen;
|
|
342
|
+
if (isOpen) {
|
|
343
|
+
this._animationState = this._enableAnimations ? 'open' : 'open-instant';
|
|
344
|
+
this._openedVia = openedVia;
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
this._animationState = 'void';
|
|
348
|
+
if (restoreFocus) {
|
|
330
349
|
this._restoreFocus();
|
|
331
350
|
}
|
|
332
|
-
this._updateFocusTrapState();
|
|
333
|
-
return new Promise(resolve => {
|
|
334
|
-
this.openedChange.pipe(take(1)).subscribe(open => resolve(open ? 'open' : 'close'));
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
get _width() {
|
|
338
|
-
return this._elementRef.nativeElement ? (this._elementRef.nativeElement.offsetWidth || 0) : 0;
|
|
339
|
-
}
|
|
340
|
-
/** Updates the enabled state of the focus trap. */
|
|
341
|
-
_updateFocusTrapState() {
|
|
342
|
-
if (this._focusTrap) {
|
|
343
|
-
// The focus trap is only enabled when the drawer is open in any mode other than side.
|
|
344
|
-
this._focusTrap.enabled = this.opened && this.mode !== 'side';
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
348
|
-
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
349
|
-
// ViewEngine they're overwritten.
|
|
350
|
-
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
351
|
-
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
352
|
-
_animationStartListener(event) {
|
|
353
|
-
this._animationStarted.next(event);
|
|
354
351
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
352
|
+
this._updateFocusTrapState();
|
|
353
|
+
return new Promise(resolve => {
|
|
354
|
+
this.openedChange.pipe(take(1)).subscribe(open => resolve(open ? 'open' : 'close'));
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
get _width() {
|
|
358
|
+
return this._elementRef.nativeElement ? (this._elementRef.nativeElement.offsetWidth || 0) : 0;
|
|
359
|
+
}
|
|
360
|
+
/** Updates the enabled state of the focus trap. */
|
|
361
|
+
_updateFocusTrapState() {
|
|
362
|
+
if (this._focusTrap) {
|
|
363
|
+
// The focus trap is only enabled when the drawer is open in any mode other than side.
|
|
364
|
+
this._focusTrap.enabled = this.opened && this.mode !== 'side';
|
|
362
365
|
}
|
|
363
366
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
|
|
367
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
368
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
369
|
+
// ViewEngine they're overwritten.
|
|
370
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
371
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
372
|
+
_animationStartListener(event) {
|
|
373
|
+
this._animationStarted.next(event);
|
|
374
|
+
}
|
|
375
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
376
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
377
|
+
// ViewEngine they're overwritten.
|
|
378
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
379
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
380
|
+
_animationDoneListener(event) {
|
|
381
|
+
this._animationEnd.next(event);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
MatDrawer.decorators = [
|
|
385
|
+
{ type: Component, args: [{
|
|
386
|
+
selector: 'mat-drawer',
|
|
387
|
+
exportAs: 'matDrawer',
|
|
388
|
+
template: "<div class=\"mat-drawer-inner-container\">\r\n <ng-content></ng-content>\r\n</div>\r\n",
|
|
389
|
+
animations: [matDrawerAnimations.transformDrawer],
|
|
390
|
+
host: {
|
|
391
|
+
'class': 'mat-drawer',
|
|
392
|
+
// must prevent the browser from aligning text based on value
|
|
393
|
+
'[attr.align]': 'null',
|
|
394
|
+
'[class.mat-drawer-end]': 'position === "end"',
|
|
395
|
+
'[class.mat-drawer-over]': 'mode === "over"',
|
|
396
|
+
'[class.mat-drawer-push]': 'mode === "push"',
|
|
397
|
+
'[class.mat-drawer-side]': 'mode === "side"',
|
|
398
|
+
'[class.mat-drawer-opened]': 'opened',
|
|
399
|
+
'tabIndex': '-1',
|
|
400
|
+
},
|
|
401
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
402
|
+
encapsulation: ViewEncapsulation.None
|
|
403
|
+
},] }
|
|
404
|
+
];
|
|
405
|
+
MatDrawer.ctorParameters = () => [
|
|
406
|
+
{ type: ElementRef },
|
|
407
|
+
{ type: FocusTrapFactory },
|
|
408
|
+
{ type: FocusMonitor },
|
|
409
|
+
{ type: Platform },
|
|
410
|
+
{ type: NgZone },
|
|
411
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] },
|
|
412
|
+
{ type: MatDrawerContainer, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DRAWER_CONTAINER,] }] }
|
|
413
|
+
];
|
|
414
|
+
MatDrawer.propDecorators = {
|
|
415
|
+
position: [{ type: Input }],
|
|
416
|
+
mode: [{ type: Input }],
|
|
417
|
+
disableClose: [{ type: Input }],
|
|
418
|
+
autoFocus: [{ type: Input }],
|
|
419
|
+
opened: [{ type: Input }],
|
|
420
|
+
_animationState: [{ type: HostBinding, args: ['@transform',] }],
|
|
421
|
+
openedChange: [{ type: Output }],
|
|
422
|
+
_openedStream: [{ type: Output, args: ['opened',] }],
|
|
423
|
+
openedStart: [{ type: Output }],
|
|
424
|
+
_closedStream: [{ type: Output, args: ['closed',] }],
|
|
425
|
+
closedStart: [{ type: Output }],
|
|
426
|
+
onPositionChanged: [{ type: Output, args: ['positionChanged',] }],
|
|
427
|
+
_animationStartListener: [{ type: HostListener, args: ['@transform.start', ['$event'],] }],
|
|
428
|
+
_animationDoneListener: [{ type: HostListener, args: ['@transform.done', ['$event'],] }]
|
|
429
|
+
};
|
|
412
430
|
/**
|
|
413
431
|
* `<mat-drawer-container>` component.
|
|
414
432
|
*
|
|
415
433
|
* This is the parent component to one or two `<mat-drawer>`s that validates the state internally
|
|
416
434
|
* and coordinates the backdrop and content styling.
|
|
417
435
|
*/
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
this._doCheckSubject = new Subject();
|
|
434
|
-
/**
|
|
435
|
-
* Margins to be applied to the content. These are used to push / shrink the drawer content when a
|
|
436
|
-
* drawer is open. We use margin rather than transform even for push mode because transform breaks
|
|
437
|
-
* fixed position elements inside of the transformed element.
|
|
438
|
-
*/
|
|
439
|
-
this._contentMargins = { left: null, right: null };
|
|
440
|
-
this._contentMarginChanges = new Subject();
|
|
441
|
-
// If a `Dir` directive exists up the tree, listen direction changes
|
|
442
|
-
// and update the left/right properties to point to the proper start/end.
|
|
443
|
-
if (_dir) {
|
|
444
|
-
_dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
|
|
445
|
-
this._validateDrawers();
|
|
446
|
-
this.updateContentMargins();
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
// Since the minimum width of the sidenav depends on the viewport width,
|
|
450
|
-
// we need to recompute the margins if the viewport changes.
|
|
451
|
-
viewportRuler.change()
|
|
452
|
-
.pipe(takeUntil(this._destroyed))
|
|
453
|
-
.subscribe(() => this.updateContentMargins());
|
|
454
|
-
this._autosize = defaultAutosize;
|
|
455
|
-
}
|
|
456
|
-
/** The drawer child with the `start` position. */
|
|
457
|
-
get start() { return this._start; }
|
|
458
|
-
/** The drawer child with the `end` position. */
|
|
459
|
-
get end() { return this._end; }
|
|
460
|
-
/**
|
|
461
|
-
* Whether to automatically resize the container whenever
|
|
462
|
-
* the size of any of its drawers changes.
|
|
463
|
-
*
|
|
464
|
-
* **Use at your own risk!** Enabling this option can cause layout thrashing by measuring
|
|
465
|
-
* the drawers on every change detection cycle. Can be configured globally via the
|
|
466
|
-
* `MAT_DRAWER_DEFAULT_AUTOSIZE` token.
|
|
467
|
-
*/
|
|
468
|
-
get autosize() { return this._autosize; }
|
|
469
|
-
set autosize(value) { this._autosize = coerceBooleanProperty(value); }
|
|
436
|
+
class MatDrawerContainer {
|
|
437
|
+
constructor(_dir, _element, _ngZone, _changeDetectorRef, viewportRuler, defaultAutosize = false, _animationMode) {
|
|
438
|
+
this._dir = _dir;
|
|
439
|
+
this._element = _element;
|
|
440
|
+
this._ngZone = _ngZone;
|
|
441
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
442
|
+
this._animationMode = _animationMode;
|
|
443
|
+
/** Drawers that belong to this container. */
|
|
444
|
+
this._drawers = new QueryList();
|
|
445
|
+
/** Event emitted when the drawer backdrop is clicked. */
|
|
446
|
+
this.backdropClick = new EventEmitter();
|
|
447
|
+
/** Emits when the component is destroyed. */
|
|
448
|
+
this._destroyed = new Subject();
|
|
449
|
+
/** Emits on every ngDoCheck. Used for debouncing reflows. */
|
|
450
|
+
this._doCheckSubject = new Subject();
|
|
470
451
|
/**
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
452
|
+
* Margins to be applied to the content. These are used to push / shrink the drawer content when a
|
|
453
|
+
* drawer is open. We use margin rather than transform even for push mode because transform breaks
|
|
454
|
+
* fixed position elements inside of the transformed element.
|
|
474
455
|
*/
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
set hasBackdrop(value) {
|
|
482
|
-
this._backdropOverride = value == null ? null : coerceBooleanProperty(value);
|
|
483
|
-
}
|
|
484
|
-
/** Reference to the CdkScrollable instance that wraps the scrollable content. */
|
|
485
|
-
get scrollable() {
|
|
486
|
-
return this._userContent || this._content;
|
|
487
|
-
}
|
|
488
|
-
ngAfterContentInit() {
|
|
489
|
-
this._allDrawers.changes
|
|
490
|
-
.pipe(startWith(this._allDrawers), takeUntil(this._destroyed))
|
|
491
|
-
.subscribe((drawer) => {
|
|
492
|
-
// @breaking-change 10.0.0 Remove `_container` check once container parameter is required.
|
|
493
|
-
this._drawers.reset(drawer.filter(item => !item._container || item._container === this));
|
|
494
|
-
this._drawers.notifyOnChanges();
|
|
495
|
-
});
|
|
496
|
-
this._drawers.changes.pipe(startWith(null)).subscribe(() => {
|
|
456
|
+
this._contentMargins = { left: null, right: null };
|
|
457
|
+
this._contentMarginChanges = new Subject();
|
|
458
|
+
// If a `Dir` directive exists up the tree, listen direction changes
|
|
459
|
+
// and update the left/right properties to point to the proper start/end.
|
|
460
|
+
if (_dir) {
|
|
461
|
+
_dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
|
|
497
462
|
this._validateDrawers();
|
|
498
|
-
this.
|
|
499
|
-
this._watchDrawerToggle(drawer);
|
|
500
|
-
this._watchDrawerPosition(drawer);
|
|
501
|
-
this._watchDrawerMode(drawer);
|
|
502
|
-
});
|
|
503
|
-
if (!this._drawers.length ||
|
|
504
|
-
this._isDrawerOpen(this._start) ||
|
|
505
|
-
this._isDrawerOpen(this._end)) {
|
|
506
|
-
this.updateContentMargins();
|
|
507
|
-
}
|
|
508
|
-
this._changeDetectorRef.markForCheck();
|
|
463
|
+
this.updateContentMargins();
|
|
509
464
|
});
|
|
510
|
-
this._doCheckSubject.pipe(debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps
|
|
511
|
-
takeUntil(this._destroyed)).subscribe(() => this.updateContentMargins());
|
|
512
|
-
}
|
|
513
|
-
ngOnDestroy() {
|
|
514
|
-
this._contentMarginChanges.complete();
|
|
515
|
-
this._doCheckSubject.complete();
|
|
516
|
-
this._drawers.destroy();
|
|
517
|
-
this._destroyed.next();
|
|
518
|
-
this._destroyed.complete();
|
|
519
|
-
}
|
|
520
|
-
/** Calls `open` of both start and end drawers */
|
|
521
|
-
open() {
|
|
522
|
-
this._drawers.forEach(drawer => drawer.open());
|
|
523
465
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
466
|
+
// Since the minimum width of the sidenav depends on the viewport width,
|
|
467
|
+
// we need to recompute the margins if the viewport changes.
|
|
468
|
+
viewportRuler.change()
|
|
469
|
+
.pipe(takeUntil(this._destroyed))
|
|
470
|
+
.subscribe(() => this.updateContentMargins());
|
|
471
|
+
this._autosize = defaultAutosize;
|
|
472
|
+
}
|
|
473
|
+
/** The drawer child with the `start` position. */
|
|
474
|
+
get start() { return this._start; }
|
|
475
|
+
/** The drawer child with the `end` position. */
|
|
476
|
+
get end() { return this._end; }
|
|
477
|
+
/**
|
|
478
|
+
* Whether to automatically resize the container whenever
|
|
479
|
+
* the size of any of its drawers changes.
|
|
480
|
+
*
|
|
481
|
+
* **Use at your own risk!** Enabling this option can cause layout thrashing by measuring
|
|
482
|
+
* the drawers on every change detection cycle. Can be configured globally via the
|
|
483
|
+
* `MAT_DRAWER_DEFAULT_AUTOSIZE` token.
|
|
484
|
+
*/
|
|
485
|
+
get autosize() { return this._autosize; }
|
|
486
|
+
set autosize(value) { this._autosize = coerceBooleanProperty(value); }
|
|
487
|
+
/**
|
|
488
|
+
* Whether the drawer container should have a backdrop while one of the sidenavs is open.
|
|
489
|
+
* If explicitly set to `true`, the backdrop will be enabled for drawers in the `side`
|
|
490
|
+
* mode as well.
|
|
491
|
+
*/
|
|
492
|
+
get hasBackdrop() {
|
|
493
|
+
if (this._backdropOverride == null) {
|
|
494
|
+
return !this._start || this._start.mode !== 'side' || !this._end || this._end.mode !== 'side';
|
|
495
|
+
}
|
|
496
|
+
return this._backdropOverride;
|
|
497
|
+
}
|
|
498
|
+
set hasBackdrop(value) {
|
|
499
|
+
this._backdropOverride = value == null ? null : coerceBooleanProperty(value);
|
|
500
|
+
}
|
|
501
|
+
/** Reference to the CdkScrollable instance that wraps the scrollable content. */
|
|
502
|
+
get scrollable() {
|
|
503
|
+
return this._userContent || this._content;
|
|
504
|
+
}
|
|
505
|
+
ngAfterContentInit() {
|
|
506
|
+
this._allDrawers.changes
|
|
507
|
+
.pipe(startWith(this._allDrawers), takeUntil(this._destroyed))
|
|
508
|
+
.subscribe((drawer) => {
|
|
509
|
+
// @breaking-change 10.0.0 Remove `_container` check once container parameter is required.
|
|
510
|
+
this._drawers.reset(drawer.filter(item => !item._container || item._container === this));
|
|
511
|
+
this._drawers.notifyOnChanges();
|
|
512
|
+
});
|
|
513
|
+
this._drawers.changes.pipe(startWith(null)).subscribe(() => {
|
|
514
|
+
this._validateDrawers();
|
|
515
|
+
this._drawers.forEach((drawer) => {
|
|
516
|
+
this._watchDrawerToggle(drawer);
|
|
517
|
+
this._watchDrawerPosition(drawer);
|
|
518
|
+
this._watchDrawerMode(drawer);
|
|
519
|
+
});
|
|
520
|
+
if (!this._drawers.length ||
|
|
521
|
+
this._isDrawerOpen(this._start) ||
|
|
522
|
+
this._isDrawerOpen(this._end)) {
|
|
523
|
+
this.updateContentMargins();
|
|
550
524
|
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
525
|
+
this._changeDetectorRef.markForCheck();
|
|
526
|
+
});
|
|
527
|
+
this._doCheckSubject.pipe(debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps
|
|
528
|
+
takeUntil(this._destroyed)).subscribe(() => this.updateContentMargins());
|
|
529
|
+
}
|
|
530
|
+
ngOnDestroy() {
|
|
531
|
+
this._contentMarginChanges.complete();
|
|
532
|
+
this._doCheckSubject.complete();
|
|
533
|
+
this._drawers.destroy();
|
|
534
|
+
this._destroyed.next();
|
|
535
|
+
this._destroyed.complete();
|
|
536
|
+
}
|
|
537
|
+
/** Calls `open` of both start and end drawers */
|
|
538
|
+
open() {
|
|
539
|
+
this._drawers.forEach(drawer => drawer.open());
|
|
540
|
+
}
|
|
541
|
+
/** Calls `close` of both start and end drawers */
|
|
542
|
+
close() {
|
|
543
|
+
this._drawers.forEach(drawer => drawer.close());
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
547
|
+
* sparingly, because it causes a reflow.
|
|
548
|
+
*/
|
|
549
|
+
updateContentMargins() {
|
|
550
|
+
// 1. For drawers in `over` mode, they don't affect the content.
|
|
551
|
+
// 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
|
|
552
|
+
// left margin (for left drawer) or right margin (for right the drawer).
|
|
553
|
+
// 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
|
|
554
|
+
// adding to the left or right margin and simultaneously subtracting the same amount of
|
|
555
|
+
// margin from the other side.
|
|
556
|
+
let left = 0;
|
|
557
|
+
let right = 0;
|
|
558
|
+
if (this._left && this._left.opened) {
|
|
559
|
+
if (this._left.mode == 'side') {
|
|
560
|
+
left += this._left._width;
|
|
560
561
|
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
left = left || null;
|
|
566
|
-
right = right || null;
|
|
567
|
-
if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
|
|
568
|
-
this._contentMargins = { left, right };
|
|
569
|
-
// Pull back into the NgZone since in some cases we could be outside. We need to be careful
|
|
570
|
-
// to do it only when something changed, otherwise we can end up hitting the zone too often.
|
|
571
|
-
this._ngZone.run(() => this._contentMarginChanges.next(this._contentMargins));
|
|
562
|
+
else if (this._left.mode == 'push') {
|
|
563
|
+
const width = this._left._width;
|
|
564
|
+
left += width;
|
|
565
|
+
right -= width;
|
|
572
566
|
}
|
|
573
567
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
// Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop.
|
|
578
|
-
this._ngZone.runOutsideAngular(() => this._doCheckSubject.next());
|
|
568
|
+
if (this._right && this._right.opened) {
|
|
569
|
+
if (this._right.mode == 'side') {
|
|
570
|
+
right += this._right._width;
|
|
579
571
|
}
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
* is properly hidden.
|
|
585
|
-
*/
|
|
586
|
-
_watchDrawerToggle(drawer) {
|
|
587
|
-
drawer._animationStarted.pipe(filter((event) => event.fromState !== event.toState), takeUntil(this._drawers.changes))
|
|
588
|
-
.subscribe((event) => {
|
|
589
|
-
// Set the transition class on the container so that the animations occur. This should not
|
|
590
|
-
// be set initially because animations should only be triggered via a change in state.
|
|
591
|
-
if (event.toState !== 'open-instant' && this._animationMode !== 'NoopAnimations') {
|
|
592
|
-
this._element.nativeElement.classList.add('mat-drawer-transition');
|
|
593
|
-
}
|
|
594
|
-
this.updateContentMargins();
|
|
595
|
-
this._changeDetectorRef.markForCheck();
|
|
596
|
-
});
|
|
597
|
-
if (drawer.mode !== 'side') {
|
|
598
|
-
drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe(() => this._setContainerClass(drawer.opened));
|
|
572
|
+
else if (this._right.mode == 'push') {
|
|
573
|
+
const width = this._right._width;
|
|
574
|
+
right += width;
|
|
575
|
+
left -= width;
|
|
599
576
|
}
|
|
600
577
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
578
|
+
// If either `right` or `left` is zero, don't set a style to the element. This
|
|
579
|
+
// allows users to specify a custom size via CSS class in SSR scenarios where the
|
|
580
|
+
// measured widths will always be zero. Note that we reset to `null` here, rather
|
|
581
|
+
// than below, in order to ensure that the types in the `if` below are consistent.
|
|
582
|
+
left = left || null;
|
|
583
|
+
right = right || null;
|
|
584
|
+
if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
|
|
585
|
+
this._contentMargins = { left, right };
|
|
586
|
+
// Pull back into the NgZone since in some cases we could be outside. We need to be careful
|
|
587
|
+
// to do it only when something changed, otherwise we can end up hitting the zone too often.
|
|
588
|
+
this._ngZone.run(() => this._contentMarginChanges.next(this._contentMargins));
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
ngDoCheck() {
|
|
592
|
+
// If users opted into autosizing, do a check every change detection cycle.
|
|
593
|
+
if (this._autosize && this._isPushed()) {
|
|
594
|
+
// Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop.
|
|
595
|
+
this._ngZone.runOutsideAngular(() => this._doCheckSubject.next());
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Subscribes to drawer events in order to set a class on the main container element when the
|
|
600
|
+
* drawer is open and the backdrop is visible. This ensures any overflow on the container element
|
|
601
|
+
* is properly hidden.
|
|
602
|
+
*/
|
|
603
|
+
_watchDrawerToggle(drawer) {
|
|
604
|
+
drawer._animationStarted.pipe(filter((event) => event.fromState !== event.toState), takeUntil(this._drawers.changes))
|
|
605
|
+
.subscribe((event) => {
|
|
606
|
+
// Set the transition class on the container so that the animations occur. This should not
|
|
607
|
+
// be set initially because animations should only be triggered via a change in state.
|
|
608
|
+
if (event.toState !== 'open-instant' && this._animationMode !== 'NoopAnimations') {
|
|
609
|
+
this._element.nativeElement.classList.add('mat-drawer-transition');
|
|
608
610
|
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
611
|
+
this.updateContentMargins();
|
|
612
|
+
this._changeDetectorRef.markForCheck();
|
|
613
|
+
});
|
|
614
|
+
if (drawer.mode !== 'side') {
|
|
615
|
+
drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe(() => this._setContainerClass(drawer.opened));
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Subscribes to drawer onPositionChanged event in order to
|
|
620
|
+
* re-validate drawers when the position changes.
|
|
621
|
+
*/
|
|
622
|
+
_watchDrawerPosition(drawer) {
|
|
623
|
+
if (!drawer) {
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
626
|
+
// NOTE: We need to wait for the microtask queue to be empty before validating,
|
|
627
|
+
// since both drawers may be swapping positions at the same time.
|
|
628
|
+
drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(() => {
|
|
629
|
+
this._ngZone.onMicrotaskEmpty.asObservable().pipe(take(1)).subscribe(() => {
|
|
630
|
+
this._validateDrawers();
|
|
631
|
+
});
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
/** Subscribes to changes in drawer mode so we can run change detection. */
|
|
635
|
+
_watchDrawerMode(drawer) {
|
|
636
|
+
if (drawer) {
|
|
637
|
+
drawer._modeChanged.pipe(takeUntil(merge(this._drawers.changes, this._destroyed)))
|
|
638
|
+
.subscribe(() => {
|
|
639
|
+
this.updateContentMargins();
|
|
640
|
+
this._changeDetectorRef.markForCheck();
|
|
615
641
|
});
|
|
616
642
|
}
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
});
|
|
625
|
-
}
|
|
643
|
+
}
|
|
644
|
+
/** Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element. */
|
|
645
|
+
_setContainerClass(isAdd) {
|
|
646
|
+
const classList = this._element.nativeElement.classList;
|
|
647
|
+
const className = 'mat-drawer-container-has-open';
|
|
648
|
+
if (isAdd) {
|
|
649
|
+
classList.add(className);
|
|
626
650
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
const classList = this._element.nativeElement.classList;
|
|
630
|
-
const className = 'mat-drawer-container-has-open';
|
|
631
|
-
if (isAdd) {
|
|
632
|
-
classList.add(className);
|
|
633
|
-
}
|
|
634
|
-
else {
|
|
635
|
-
classList.remove(className);
|
|
636
|
-
}
|
|
651
|
+
else {
|
|
652
|
+
classList.remove(className);
|
|
637
653
|
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
this._end = drawer;
|
|
648
|
-
}
|
|
649
|
-
else {
|
|
650
|
-
if (this._start != null) {
|
|
651
|
-
throwMatDuplicatedDrawerError('start');
|
|
652
|
-
}
|
|
653
|
-
this._start = drawer;
|
|
654
|
+
}
|
|
655
|
+
/** Validate the state of the drawer children components. */
|
|
656
|
+
_validateDrawers() {
|
|
657
|
+
this._start = this._end = null;
|
|
658
|
+
// Ensure that we have at most one start and one end drawer.
|
|
659
|
+
this._drawers.forEach(drawer => {
|
|
660
|
+
if (drawer.position == 'end') {
|
|
661
|
+
if (this._end != null) {
|
|
662
|
+
throwMatDuplicatedDrawerError('end');
|
|
654
663
|
}
|
|
655
|
-
|
|
656
|
-
this._right = this._left = null;
|
|
657
|
-
// Detect if we're LTR or RTL.
|
|
658
|
-
if (this._dir && this._dir.value === 'rtl') {
|
|
659
|
-
this._left = this._end;
|
|
660
|
-
this._right = this._start;
|
|
664
|
+
this._end = drawer;
|
|
661
665
|
}
|
|
662
666
|
else {
|
|
663
|
-
this.
|
|
664
|
-
|
|
667
|
+
if (this._start != null) {
|
|
668
|
+
throwMatDuplicatedDrawerError('start');
|
|
669
|
+
}
|
|
670
|
+
this._start = drawer;
|
|
665
671
|
}
|
|
672
|
+
});
|
|
673
|
+
this._right = this._left = null;
|
|
674
|
+
// Detect if we're LTR or RTL.
|
|
675
|
+
if (this._dir && this._dir.value === 'rtl') {
|
|
676
|
+
this._left = this._end;
|
|
677
|
+
this._right = this._start;
|
|
666
678
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
(this._isDrawerOpen(this._end) && this._end.mode != 'over');
|
|
671
|
-
}
|
|
672
|
-
_onBackdropClicked() {
|
|
673
|
-
this.backdropClick.emit();
|
|
674
|
-
this._closeModalDrawer();
|
|
675
|
-
}
|
|
676
|
-
_closeModalDrawer() {
|
|
677
|
-
// Close all open drawers where closing is not disabled and the mode is not `side`.
|
|
678
|
-
[this._start, this._end]
|
|
679
|
-
.filter(drawer => drawer && !drawer.disableClose && this._canHaveBackdrop(drawer))
|
|
680
|
-
.forEach(drawer => drawer.close());
|
|
681
|
-
}
|
|
682
|
-
_isShowingBackdrop() {
|
|
683
|
-
return (this._isDrawerOpen(this._start) && this._canHaveBackdrop(this._start)) ||
|
|
684
|
-
(this._isDrawerOpen(this._end) && this._canHaveBackdrop(this._end));
|
|
685
|
-
}
|
|
686
|
-
_canHaveBackdrop(drawer) {
|
|
687
|
-
return drawer.mode !== 'side' || !!this._backdropOverride;
|
|
688
|
-
}
|
|
689
|
-
_isDrawerOpen(drawer) {
|
|
690
|
-
return drawer != null && drawer.opened;
|
|
679
|
+
else {
|
|
680
|
+
this._left = this._start;
|
|
681
|
+
this._right = this._end;
|
|
691
682
|
}
|
|
692
683
|
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
}
|
|
684
|
+
/** Whether the container is being pushed to the side by one of the drawers. */
|
|
685
|
+
_isPushed() {
|
|
686
|
+
return (this._isDrawerOpen(this._start) && this._start.mode != 'over') ||
|
|
687
|
+
(this._isDrawerOpen(this._end) && this._end.mode != 'over');
|
|
688
|
+
}
|
|
689
|
+
_onBackdropClicked() {
|
|
690
|
+
this.backdropClick.emit();
|
|
691
|
+
this._closeModalDrawersViaBackdrop();
|
|
692
|
+
}
|
|
693
|
+
_closeModalDrawersViaBackdrop() {
|
|
694
|
+
// Close all open drawers where closing is not disabled and the mode is not `side`.
|
|
695
|
+
[this._start, this._end]
|
|
696
|
+
.filter(drawer => drawer && !drawer.disableClose && this._canHaveBackdrop(drawer))
|
|
697
|
+
.forEach(drawer => drawer._closeViaBackdropClick());
|
|
698
|
+
}
|
|
699
|
+
_isShowingBackdrop() {
|
|
700
|
+
return (this._isDrawerOpen(this._start) && this._canHaveBackdrop(this._start)) ||
|
|
701
|
+
(this._isDrawerOpen(this._end) && this._canHaveBackdrop(this._end));
|
|
702
|
+
}
|
|
703
|
+
_canHaveBackdrop(drawer) {
|
|
704
|
+
return drawer.mode !== 'side' || !!this._backdropOverride;
|
|
705
|
+
}
|
|
706
|
+
_isDrawerOpen(drawer) {
|
|
707
|
+
return drawer != null && drawer.opened;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
MatDrawerContainer.decorators = [
|
|
711
|
+
{ type: Component, args: [{
|
|
712
|
+
selector: 'mat-drawer-container',
|
|
713
|
+
exportAs: 'matDrawerContainer',
|
|
714
|
+
template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n\n<ng-content select=\"mat-drawer\"></ng-content>\n\n<ng-content select=\"mat-drawer-content\">\n</ng-content>\n<mat-drawer-content *ngIf=\"!_content\">\n <ng-content></ng-content>\n</mat-drawer-content>\n",
|
|
715
|
+
host: {
|
|
716
|
+
'class': 'mat-drawer-container',
|
|
717
|
+
'[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',
|
|
718
|
+
},
|
|
719
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
720
|
+
encapsulation: ViewEncapsulation.None,
|
|
721
|
+
providers: [{
|
|
722
|
+
provide: MAT_DRAWER_CONTAINER,
|
|
723
|
+
useExisting: MatDrawerContainer
|
|
724
|
+
}],
|
|
725
|
+
styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n"]
|
|
726
|
+
},] }
|
|
727
|
+
];
|
|
728
|
+
MatDrawerContainer.ctorParameters = () => [
|
|
729
|
+
{ type: Directionality, decorators: [{ type: Optional }] },
|
|
730
|
+
{ type: ElementRef },
|
|
731
|
+
{ type: NgZone },
|
|
732
|
+
{ type: ChangeDetectorRef },
|
|
733
|
+
{ type: ViewportRuler },
|
|
734
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DRAWER_DEFAULT_AUTOSIZE,] }] },
|
|
735
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
|
|
736
|
+
];
|
|
737
|
+
MatDrawerContainer.propDecorators = {
|
|
738
|
+
_allDrawers: [{ type: ContentChildren, args: [MatDrawer, {
|
|
739
|
+
// We need to use `descendants: true`, because Ivy will no longer match
|
|
740
|
+
// indirect descendants if it's left as false.
|
|
741
|
+
descendants: true
|
|
742
|
+
},] }],
|
|
743
|
+
_content: [{ type: ContentChild, args: [MatDrawerContent,] }],
|
|
744
|
+
_userContent: [{ type: ViewChild, args: [MatDrawerContent,] }],
|
|
745
|
+
autosize: [{ type: Input }],
|
|
746
|
+
hasBackdrop: [{ type: Input }],
|
|
747
|
+
backdropClick: [{ type: Output }]
|
|
748
|
+
};
|
|
734
749
|
|
|
735
750
|
/**
|
|
736
751
|
* @license
|
|
@@ -739,120 +754,111 @@ let MatDrawerContainer = /** @class */ (() => {
|
|
|
739
754
|
* Use of this source code is governed by an MIT-style license that can be
|
|
740
755
|
* found in the LICENSE file at https://angular.io/license
|
|
741
756
|
*/
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
super(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone);
|
|
746
|
-
}
|
|
757
|
+
class MatSidenavContent extends MatDrawerContent {
|
|
758
|
+
constructor(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone) {
|
|
759
|
+
super(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone);
|
|
747
760
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
]
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
// indirect descendants if it's left as false.
|
|
850
|
-
descendants: true
|
|
851
|
-
},] }],
|
|
852
|
-
_content: [{ type: ContentChild, args: [MatSidenavContent,] }]
|
|
853
|
-
};
|
|
854
|
-
return MatSidenavContainer;
|
|
855
|
-
})();
|
|
761
|
+
}
|
|
762
|
+
MatSidenavContent.decorators = [
|
|
763
|
+
{ type: Component, args: [{
|
|
764
|
+
selector: 'mat-sidenav-content',
|
|
765
|
+
template: '<ng-content></ng-content>',
|
|
766
|
+
host: {
|
|
767
|
+
'class': 'mat-drawer-content mat-sidenav-content',
|
|
768
|
+
'[style.margin-left.px]': '_container._contentMargins.left',
|
|
769
|
+
'[style.margin-right.px]': '_container._contentMargins.right',
|
|
770
|
+
},
|
|
771
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
772
|
+
encapsulation: ViewEncapsulation.None
|
|
773
|
+
},] }
|
|
774
|
+
];
|
|
775
|
+
MatSidenavContent.ctorParameters = () => [
|
|
776
|
+
{ type: ChangeDetectorRef },
|
|
777
|
+
{ type: MatSidenavContainer, decorators: [{ type: Inject, args: [forwardRef(() => MatSidenavContainer),] }] },
|
|
778
|
+
{ type: ElementRef },
|
|
779
|
+
{ type: ScrollDispatcher },
|
|
780
|
+
{ type: NgZone }
|
|
781
|
+
];
|
|
782
|
+
class MatSidenav extends MatDrawer {
|
|
783
|
+
constructor() {
|
|
784
|
+
super(...arguments);
|
|
785
|
+
this._fixedInViewport = false;
|
|
786
|
+
this._fixedTopGap = 0;
|
|
787
|
+
this._fixedBottomGap = 0;
|
|
788
|
+
}
|
|
789
|
+
/** Whether the sidenav is fixed in the viewport. */
|
|
790
|
+
get fixedInViewport() { return this._fixedInViewport; }
|
|
791
|
+
set fixedInViewport(value) { this._fixedInViewport = coerceBooleanProperty(value); }
|
|
792
|
+
/**
|
|
793
|
+
* The gap between the top of the sidenav and the top of the viewport when the sidenav is in fixed
|
|
794
|
+
* mode.
|
|
795
|
+
*/
|
|
796
|
+
get fixedTopGap() { return this._fixedTopGap; }
|
|
797
|
+
set fixedTopGap(value) { this._fixedTopGap = coerceNumberProperty(value); }
|
|
798
|
+
/**
|
|
799
|
+
* The gap between the bottom of the sidenav and the bottom of the viewport when the sidenav is in
|
|
800
|
+
* fixed mode.
|
|
801
|
+
*/
|
|
802
|
+
get fixedBottomGap() { return this._fixedBottomGap; }
|
|
803
|
+
set fixedBottomGap(value) { this._fixedBottomGap = coerceNumberProperty(value); }
|
|
804
|
+
}
|
|
805
|
+
MatSidenav.decorators = [
|
|
806
|
+
{ type: Component, args: [{
|
|
807
|
+
selector: 'mat-sidenav',
|
|
808
|
+
exportAs: 'matSidenav',
|
|
809
|
+
template: "<div class=\"mat-drawer-inner-container\">\r\n <ng-content></ng-content>\r\n</div>\r\n",
|
|
810
|
+
animations: [matDrawerAnimations.transformDrawer],
|
|
811
|
+
host: {
|
|
812
|
+
'class': 'mat-drawer mat-sidenav',
|
|
813
|
+
'tabIndex': '-1',
|
|
814
|
+
// must prevent the browser from aligning text based on value
|
|
815
|
+
'[attr.align]': 'null',
|
|
816
|
+
'[class.mat-drawer-end]': 'position === "end"',
|
|
817
|
+
'[class.mat-drawer-over]': 'mode === "over"',
|
|
818
|
+
'[class.mat-drawer-push]': 'mode === "push"',
|
|
819
|
+
'[class.mat-drawer-side]': 'mode === "side"',
|
|
820
|
+
'[class.mat-drawer-opened]': 'opened',
|
|
821
|
+
'[class.mat-sidenav-fixed]': 'fixedInViewport',
|
|
822
|
+
'[style.top.px]': 'fixedInViewport ? fixedTopGap : null',
|
|
823
|
+
'[style.bottom.px]': 'fixedInViewport ? fixedBottomGap : null',
|
|
824
|
+
},
|
|
825
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
826
|
+
encapsulation: ViewEncapsulation.None
|
|
827
|
+
},] }
|
|
828
|
+
];
|
|
829
|
+
MatSidenav.propDecorators = {
|
|
830
|
+
fixedInViewport: [{ type: Input }],
|
|
831
|
+
fixedTopGap: [{ type: Input }],
|
|
832
|
+
fixedBottomGap: [{ type: Input }]
|
|
833
|
+
};
|
|
834
|
+
class MatSidenavContainer extends MatDrawerContainer {
|
|
835
|
+
}
|
|
836
|
+
MatSidenavContainer.decorators = [
|
|
837
|
+
{ type: Component, args: [{
|
|
838
|
+
selector: 'mat-sidenav-container',
|
|
839
|
+
exportAs: 'matSidenavContainer',
|
|
840
|
+
template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n\n<ng-content select=\"mat-sidenav\"></ng-content>\n\n<ng-content select=\"mat-sidenav-content\">\n</ng-content>\n<mat-sidenav-content *ngIf=\"!_content\" cdkScrollable>\n <ng-content></ng-content>\n</mat-sidenav-content>\n",
|
|
841
|
+
host: {
|
|
842
|
+
'class': 'mat-drawer-container mat-sidenav-container',
|
|
843
|
+
'[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',
|
|
844
|
+
},
|
|
845
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
846
|
+
encapsulation: ViewEncapsulation.None,
|
|
847
|
+
providers: [{
|
|
848
|
+
provide: MAT_DRAWER_CONTAINER,
|
|
849
|
+
useExisting: MatSidenavContainer
|
|
850
|
+
}],
|
|
851
|
+
styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n"]
|
|
852
|
+
},] }
|
|
853
|
+
];
|
|
854
|
+
MatSidenavContainer.propDecorators = {
|
|
855
|
+
_allDrawers: [{ type: ContentChildren, args: [MatSidenav, {
|
|
856
|
+
// We need to use `descendants: true`, because Ivy will no longer match
|
|
857
|
+
// indirect descendants if it's left as false.
|
|
858
|
+
descendants: true
|
|
859
|
+
},] }],
|
|
860
|
+
_content: [{ type: ContentChild, args: [MatSidenavContent,] }]
|
|
861
|
+
};
|
|
856
862
|
|
|
857
863
|
/**
|
|
858
864
|
* @license
|
|
@@ -861,39 +867,36 @@ let MatSidenavContainer = /** @class */ (() => {
|
|
|
861
867
|
* Use of this source code is governed by an MIT-style license that can be
|
|
862
868
|
* found in the LICENSE file at https://angular.io/license
|
|
863
869
|
*/
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
];
|
|
895
|
-
return MatSidenavModule;
|
|
896
|
-
})();
|
|
870
|
+
class MatSidenavModule {
|
|
871
|
+
}
|
|
872
|
+
MatSidenavModule.decorators = [
|
|
873
|
+
{ type: NgModule, args: [{
|
|
874
|
+
imports: [
|
|
875
|
+
CommonModule,
|
|
876
|
+
MatCommonModule,
|
|
877
|
+
PlatformModule,
|
|
878
|
+
CdkScrollableModule,
|
|
879
|
+
],
|
|
880
|
+
exports: [
|
|
881
|
+
CdkScrollableModule,
|
|
882
|
+
MatCommonModule,
|
|
883
|
+
MatDrawer,
|
|
884
|
+
MatDrawerContainer,
|
|
885
|
+
MatDrawerContent,
|
|
886
|
+
MatSidenav,
|
|
887
|
+
MatSidenavContainer,
|
|
888
|
+
MatSidenavContent,
|
|
889
|
+
],
|
|
890
|
+
declarations: [
|
|
891
|
+
MatDrawer,
|
|
892
|
+
MatDrawerContainer,
|
|
893
|
+
MatDrawerContent,
|
|
894
|
+
MatSidenav,
|
|
895
|
+
MatSidenavContainer,
|
|
896
|
+
MatSidenavContent,
|
|
897
|
+
],
|
|
898
|
+
},] }
|
|
899
|
+
];
|
|
897
900
|
|
|
898
901
|
/**
|
|
899
902
|
* @license
|