@angular/material 8.0.0-beta.2 → 8.0.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/README.md +2 -2
- package/_theming.scss +18 -11
- package/autocomplete/typings/autocomplete-trigger.d.ts +13 -2
- package/autocomplete/typings/autocomplete.d.ts +3 -2
- package/autocomplete/typings/index.metadata.json +1 -1
- package/badge/typings/badge.d.ts +8 -2
- package/badge/typings/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js +196 -68
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +1 -1
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge.umd.js +37 -9
- package/bundles/material-badge.umd.js.map +1 -1
- package/bundles/material-badge.umd.min.js +1 -1
- package/bundles/material-badge.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +72 -25
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +1 -1
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +97 -28
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +1 -1
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +11 -9
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +1 -1
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card.umd.js +2 -2
- package/bundles/material-card.umd.js.map +1 -1
- package/bundles/material-card.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +69 -25
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js +1 -1
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips.umd.js +229 -82
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +1 -1
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +159 -75
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +2 -1
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +157 -62
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +2 -2
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +98 -33
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +1 -1
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider.umd.js +2 -2
- package/bundles/material-divider.umd.js.map +1 -1
- package/bundles/material-divider.umd.min.js.map +1 -1
- package/bundles/material-expansion.umd.js +63 -23
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +1 -1
- package/bundles/material-expansion.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +114 -42
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +1 -1
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +42 -17
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +1 -1
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-icon.umd.js +101 -31
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +1 -1
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +29 -16
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +1 -1
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +97 -38
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +2 -2
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +308 -167
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +1 -1
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +28 -12
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +1 -1
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +26 -16
- package/bundles/material-progress-bar.umd.js.map +1 -1
- package/bundles/material-progress-bar.umd.min.js +1 -1
- package/bundles/material-progress-bar.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +10 -12
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js +1 -1
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +77 -21
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +1 -1
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +186 -57
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +1 -1
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +323 -145
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +1 -1
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +49 -31
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.min.js +1 -1
- package/bundles/material-slide-toggle.umd.min.js.map +1 -1
- package/bundles/material-slider.umd.js +26 -12
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-slider.umd.min.js +1 -1
- package/bundles/material-slider.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +55 -23
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +1 -1
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +20 -17
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +1 -1
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper.umd.js +50 -16
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-stepper.umd.min.js +1 -1
- package/bundles/material-stepper.umd.min.js.map +1 -1
- package/bundles/material-table.umd.js +116 -26
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js +1 -1
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +162 -77
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +2 -2
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar.umd.js +22 -9
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.min.js +1 -1
- package/bundles/material-toolbar.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +79 -25
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +49 -28
- package/bundles/material-tree.umd.js.map +1 -1
- package/bundles/material-tree.umd.min.js +1 -1
- package/bundles/material-tree.umd.min.js.map +1 -1
- package/bundles/material.umd.js +3157 -1278
- package/bundles/material.umd.js.map +1 -1
- package/bundles/material.umd.min.js +19 -19
- package/bundles/material.umd.min.js.map +1 -1
- package/button/typings/button.d.ts +4 -3
- package/button/typings/index.metadata.json +1 -1
- package/button-toggle/typings/button-toggle.d.ts +7 -3
- package/button-toggle/typings/index.metadata.json +1 -1
- package/checkbox/typings/checkbox-module.d.ts +3 -0
- package/checkbox/typings/checkbox.d.ts +3 -2
- package/checkbox/typings/index.metadata.json +1 -1
- package/chips/typings/chip-list.d.ts +9 -2
- package/chips/typings/chip.d.ts +3 -2
- package/chips/typings/index.metadata.json +1 -1
- package/core/typings/index.metadata.json +1 -1
- package/core/typings/option/optgroup.d.ts +3 -2
- package/core/typings/public-api.d.ts +1 -0
- package/core/typings/ripple/ripple-renderer.d.ts +4 -4
- package/{typings/esm5 → core/typings}/version.d.ts +0 -0
- package/datepicker/typings/datepicker.d.ts +3 -2
- package/datepicker/typings/index.d.ts +0 -1
- package/datepicker/typings/index.metadata.json +1 -1
- package/datepicker/typings/public-api.d.ts +1 -0
- package/esm2015/autocomplete.js +187 -68
- package/esm2015/autocomplete.js.map +1 -1
- package/esm2015/badge.js +31 -10
- package/esm2015/badge.js.map +1 -1
- package/esm2015/bottom-sheet.js +75 -28
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js +89 -27
- package/esm2015/button-toggle.js.map +1 -1
- package/esm2015/button.js +13 -9
- package/esm2015/button.js.map +1 -1
- package/esm2015/card.js +4 -4
- package/esm2015/card.js.map +1 -1
- package/esm2015/checkbox.js +68 -25
- package/esm2015/checkbox.js.map +1 -1
- package/esm2015/chips.js +219 -79
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +160 -75
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +157 -62
- package/esm2015/datepicker.js.map +1 -1
- package/esm2015/dialog.js +99 -34
- package/esm2015/dialog.js.map +1 -1
- package/esm2015/divider.js +4 -4
- package/esm2015/divider.js.map +1 -1
- package/esm2015/expansion.js +65 -25
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +108 -42
- package/esm2015/form-field.js.map +1 -1
- package/esm2015/grid-list.js +44 -19
- package/esm2015/grid-list.js.map +1 -1
- package/esm2015/icon.js +104 -32
- package/esm2015/icon.js.map +1 -1
- package/esm2015/input.js +31 -16
- package/esm2015/input.js.map +1 -1
- package/esm2015/list.js +96 -29
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +28 -41
- package/esm2015/material.js.map +1 -1
- package/esm2015/menu.js +254 -131
- package/esm2015/menu.js.map +1 -1
- package/esm2015/paginator.js +31 -13
- package/esm2015/paginator.js.map +1 -1
- package/esm2015/progress-bar.js +28 -14
- package/esm2015/progress-bar.js.map +1 -1
- package/esm2015/progress-spinner.js +12 -12
- package/esm2015/progress-spinner.js.map +1 -1
- package/esm2015/radio.js +75 -22
- package/esm2015/radio.js.map +1 -1
- package/esm2015/select.js +188 -57
- package/esm2015/select.js.map +1 -1
- package/esm2015/sidenav.js +285 -136
- package/esm2015/sidenav.js.map +1 -1
- package/esm2015/slide-toggle.js +47 -29
- package/esm2015/slide-toggle.js.map +1 -1
- package/esm2015/slider.js +28 -12
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +58 -26
- package/esm2015/snack-bar.js.map +1 -1
- package/esm2015/sort.js +23 -16
- package/esm2015/sort.js.map +1 -1
- package/esm2015/stepper.js +47 -18
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +120 -27
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +160 -63
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/toolbar.js +24 -9
- package/esm2015/toolbar.js.map +1 -1
- package/esm2015/tooltip.js +82 -28
- package/esm2015/tooltip.js.map +1 -1
- package/esm2015/tree.js +54 -31
- package/esm2015/tree.js.map +1 -1
- package/esm5/autocomplete.es5.js +199 -69
- package/esm5/autocomplete.es5.js.map +1 -1
- package/esm5/badge.es5.js +41 -11
- package/esm5/badge.es5.js.map +1 -1
- package/esm5/bottom-sheet.es5.js +75 -28
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js +100 -29
- package/esm5/button-toggle.es5.js.map +1 -1
- package/esm5/button.es5.js +14 -10
- package/esm5/button.es5.js.map +1 -1
- package/esm5/card.es5.js +4 -4
- package/esm5/card.es5.js.map +1 -1
- package/esm5/checkbox.es5.js +71 -26
- package/esm5/checkbox.es5.js.map +1 -1
- package/esm5/chips.es5.js +233 -82
- package/esm5/chips.es5.js.map +1 -1
- package/esm5/core.es5.js +162 -77
- package/esm5/core.es5.js.map +1 -1
- package/esm5/datepicker.es5.js +158 -63
- package/esm5/datepicker.es5.js.map +1 -1
- package/esm5/dialog.es5.js +100 -35
- package/esm5/dialog.es5.js.map +1 -1
- package/esm5/divider.es5.js +4 -4
- package/esm5/divider.es5.js.map +1 -1
- package/esm5/expansion.es5.js +65 -25
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +117 -43
- package/esm5/form-field.es5.js.map +1 -1
- package/esm5/grid-list.es5.js +44 -19
- package/esm5/grid-list.es5.js.map +1 -1
- package/esm5/icon.es5.js +105 -33
- package/esm5/icon.es5.js.map +1 -1
- package/esm5/input.es5.js +32 -17
- package/esm5/input.es5.js.map +1 -1
- package/esm5/list.es5.js +100 -33
- package/esm5/list.es5.js.map +1 -1
- package/esm5/material.es5.js +28 -41
- package/esm5/material.es5.js.map +1 -1
- package/esm5/menu.es5.js +301 -161
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/paginator.es5.js +32 -14
- package/esm5/paginator.es5.js.map +1 -1
- package/esm5/progress-bar.es5.js +29 -17
- package/esm5/progress-bar.es5.js.map +1 -1
- package/esm5/progress-spinner.es5.js +13 -13
- package/esm5/progress-spinner.es5.js.map +1 -1
- package/esm5/radio.es5.js +81 -23
- package/esm5/radio.es5.js.map +1 -1
- package/esm5/select.es5.js +189 -58
- package/esm5/select.es5.js.map +1 -1
- package/esm5/sidenav.es5.js +326 -148
- package/esm5/sidenav.es5.js.map +1 -1
- package/esm5/slide-toggle.es5.js +48 -29
- package/esm5/slide-toggle.es5.js.map +1 -1
- package/esm5/slider.es5.js +29 -13
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +58 -26
- package/esm5/snack-bar.es5.js.map +1 -1
- package/esm5/sort.es5.js +25 -18
- package/esm5/sort.es5.js.map +1 -1
- package/esm5/stepper.es5.js +53 -19
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +119 -30
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +165 -68
- package/esm5/tabs.es5.js.map +1 -1
- package/esm5/toolbar.es5.js +25 -10
- package/esm5/toolbar.es5.js.map +1 -1
- package/esm5/tooltip.es5.js +81 -27
- package/esm5/tooltip.es5.js.map +1 -1
- package/esm5/tree.es5.js +52 -29
- package/esm5/tree.es5.js.map +1 -1
- package/form-field/typings/form-field.d.ts +9 -3
- package/form-field/typings/index.metadata.json +1 -1
- package/grid-list/typings/index.d.ts +1 -1
- package/grid-list/typings/index.metadata.json +1 -1
- package/icon/typings/icon.d.ts +3 -2
- package/icon/typings/index.metadata.json +1 -1
- package/input/typings/index.metadata.json +1 -1
- package/input/typings/input.d.ts +3 -2
- package/list/typings/index.metadata.json +1 -1
- package/list/typings/list.d.ts +5 -4
- package/list/typings/selection-list.d.ts +7 -4
- package/material.d.ts +1 -1
- package/material.metadata.json +3 -3
- package/menu/typings/index.d.ts +2 -4
- package/menu/typings/index.metadata.json +1 -1
- package/menu/typings/menu-item.d.ts +3 -2
- package/menu/typings/menu-module.d.ts +6 -0
- package/menu/typings/menu-trigger.d.ts +1 -3
- package/menu/typings/menu.d.ts +158 -5
- package/menu/typings/public-api.d.ts +5 -2
- package/package.json +11 -11
- package/paginator/typings/index.metadata.json +1 -1
- package/paginator/typings/paginator.d.ts +3 -2
- 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-bar/typings/index.metadata.json +1 -1
- package/progress-bar/typings/progress-bar.d.ts +8 -7
- package/progress-spinner/typings/index.metadata.json +1 -1
- package/progress-spinner/typings/progress-spinner.d.ts +5 -4
- package/radio/typings/index.metadata.json +1 -1
- package/radio/typings/radio.d.ts +10 -4
- package/schematics/ng-add/fonts/material-fonts.js.map +1 -1
- package/schematics/ng-add/fonts/project-index-html.d.ts +1 -1
- package/schematics/ng-add/fonts/project-index-html.js.map +1 -1
- package/schematics/ng-add/gestures/hammerjs-import.js.map +1 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/package-config.js.map +1 -1
- package/schematics/ng-add/schema.js.map +1 -1
- package/schematics/ng-add/setup-project.js.map +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js.map +1 -1
- package/schematics/ng-add/theming/theming.js +1 -1
- package/schematics/ng-add/theming/theming.js.map +1 -1
- package/schematics/ng-add/version-names.d.ts +1 -1
- package/schematics/ng-add/version-names.js +1 -1
- package/schematics/ng-add/version-names.js.map +1 -1
- package/schematics/ng-generate/address-form/index.js.map +1 -1
- package/schematics/ng-generate/address-form/schema.js.map +1 -1
- package/schematics/ng-generate/dashboard/index.js.map +1 -1
- package/schematics/ng-generate/dashboard/schema.js.map +1 -1
- package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +2 -2
- package/schematics/ng-generate/nav/index.js.map +1 -1
- package/schematics/ng-generate/nav/schema.js.map +1 -1
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__-datasource.ts +3 -4
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +2 -2
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +11 -4
- package/schematics/ng-generate/table/index.js.map +1 -1
- package/schematics/ng-generate/table/schema.js.map +1 -1
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/example-data.ts +1 -1
- package/schematics/ng-generate/tree/index.js.map +1 -1
- package/schematics/ng-generate/tree/schema.js.map +1 -1
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.js +1 -1
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.js +22 -14
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/css-selectors.js +2 -2
- package/schematics/ng-update/data/css-selectors.js.map +1 -1
- package/schematics/ng-update/data/element-selectors.js +1 -1
- package/schematics/ng-update/data/element-selectors.js.map +1 -1
- package/schematics/ng-update/data/index.js.map +1 -1
- package/schematics/ng-update/data/input-names.js +7 -7
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/output-names.js +4 -4
- package/schematics/ng-update/data/output-names.js.map +1 -1
- package/schematics/ng-update/data/property-names.js +11 -11
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassInheritanceMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassNamesMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.d.ts +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.js +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/ripple-speed-factor.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/rippleSpeedFactorAssignmentRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/rippleSpeedFactorTemplateRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.js +21 -10
- package/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.js.map +1 -1
- package/select/typings/index.metadata.json +1 -1
- package/select/typings/select.d.ts +3 -2
- package/sidenav/typings/drawer.d.ts +8 -11
- package/sidenav/typings/index.metadata.json +1 -1
- package/slide-toggle/typings/index.metadata.json +1 -1
- package/slide-toggle/typings/slide-toggle.d.ts +6 -11
- package/slider/typings/index.metadata.json +1 -1
- package/slider/typings/slider.d.ts +3 -2
- package/sort/typings/index.metadata.json +1 -1
- package/sort/typings/sort-header.d.ts +2 -2
- package/sort/typings/sort.d.ts +3 -2
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/step-header.d.ts +2 -0
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/public-api.d.ts +1 -0
- package/table/typings/text-column.d.ts +19 -0
- package/tabs/typings/index.d.ts +1 -5
- package/tabs/typings/index.metadata.json +1 -1
- package/tabs/typings/tab-group.d.ts +3 -2
- package/tabs/typings/tab-header.d.ts +3 -2
- package/tabs/typings/tab-label-wrapper.d.ts +3 -2
- package/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts +5 -4
- package/tabs/typings/tab.d.ts +3 -2
- package/toolbar/typings/index.metadata.json +1 -1
- package/toolbar/typings/toolbar.d.ts +3 -2
- package/tree/typings/data-source/flat-data-source.d.ts +3 -3
- package/tree/typings/index.metadata.json +1 -1
- package/tree/typings/node.d.ts +3 -2
- package/typings/autocomplete/autocomplete-trigger.d.ts +13 -2
- package/typings/autocomplete/autocomplete.d.ts +3 -2
- package/typings/autocomplete/index.metadata.json +1 -1
- package/typings/badge/badge.d.ts +8 -2
- package/typings/badge/index.metadata.json +1 -1
- package/typings/button/button.d.ts +4 -3
- package/typings/button/index.metadata.json +1 -1
- package/typings/button-toggle/button-toggle.d.ts +7 -3
- package/typings/button-toggle/index.metadata.json +1 -1
- package/typings/checkbox/checkbox-module.d.ts +3 -0
- package/typings/checkbox/checkbox.d.ts +3 -2
- package/typings/checkbox/index.metadata.json +1 -1
- package/typings/chips/chip-list.d.ts +9 -2
- package/typings/chips/chip.d.ts +3 -2
- package/typings/chips/index.metadata.json +1 -1
- package/typings/core/index.metadata.json +1 -1
- package/typings/core/option/optgroup.d.ts +3 -2
- package/typings/core/public-api.d.ts +1 -0
- package/typings/core/ripple/ripple-renderer.d.ts +4 -4
- package/typings/{version.d.ts → core/version.d.ts} +0 -0
- package/typings/datepicker/datepicker.d.ts +3 -2
- package/typings/datepicker/index.d.ts +0 -1
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/datepicker/public-api.d.ts +1 -0
- package/typings/esm5/autocomplete/autocomplete-trigger.d.ts +13 -2
- package/typings/esm5/autocomplete/autocomplete.d.ts +3 -2
- package/typings/esm5/autocomplete/index.metadata.json +1 -1
- package/typings/esm5/badge/badge.d.ts +8 -2
- package/typings/esm5/badge/index.metadata.json +1 -1
- package/typings/esm5/button/button.d.ts +4 -3
- package/typings/esm5/button/index.metadata.json +1 -1
- package/typings/esm5/button-toggle/button-toggle.d.ts +7 -3
- package/typings/esm5/button-toggle/index.metadata.json +1 -1
- package/typings/esm5/checkbox/checkbox-module.d.ts +3 -0
- package/typings/esm5/checkbox/checkbox.d.ts +3 -2
- package/typings/esm5/checkbox/index.metadata.json +1 -1
- package/typings/esm5/chips/chip-list.d.ts +9 -2
- package/typings/esm5/chips/chip.d.ts +3 -2
- package/typings/esm5/chips/index.metadata.json +1 -1
- package/typings/esm5/core/index.metadata.json +1 -1
- package/typings/esm5/core/option/optgroup.d.ts +3 -2
- package/typings/esm5/core/public-api.d.ts +1 -0
- package/typings/esm5/core/ripple/ripple-renderer.d.ts +4 -4
- package/typings/esm5/core/version.d.ts +10 -0
- package/typings/esm5/datepicker/datepicker.d.ts +3 -2
- package/typings/esm5/datepicker/index.d.ts +0 -1
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- package/typings/esm5/datepicker/public-api.d.ts +1 -0
- package/typings/esm5/form-field/form-field.d.ts +9 -3
- package/typings/esm5/form-field/index.metadata.json +1 -1
- package/typings/esm5/grid-list/index.d.ts +1 -1
- package/typings/esm5/grid-list/index.metadata.json +1 -1
- package/typings/esm5/icon/icon.d.ts +3 -2
- package/typings/esm5/icon/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/input/index.metadata.json +1 -1
- package/typings/esm5/input/input.d.ts +3 -2
- package/typings/esm5/list/index.metadata.json +1 -1
- package/typings/esm5/list/list.d.ts +5 -4
- package/typings/esm5/list/selection-list.d.ts +7 -4
- package/typings/esm5/menu/index.d.ts +2 -4
- package/typings/esm5/menu/index.metadata.json +1 -1
- package/typings/esm5/menu/menu-item.d.ts +3 -2
- package/typings/esm5/menu/menu-module.d.ts +6 -0
- package/typings/esm5/menu/menu-trigger.d.ts +1 -3
- package/typings/esm5/menu/menu.d.ts +158 -5
- package/typings/esm5/menu/public-api.d.ts +5 -2
- package/typings/esm5/paginator/index.metadata.json +1 -1
- package/typings/esm5/paginator/paginator.d.ts +3 -2
- package/typings/esm5/progress-bar/index.metadata.json +1 -1
- package/typings/esm5/progress-bar/progress-bar.d.ts +8 -7
- package/typings/esm5/progress-spinner/index.metadata.json +1 -1
- package/typings/esm5/progress-spinner/progress-spinner.d.ts +5 -4
- package/typings/esm5/public-api.d.ts +0 -1
- package/typings/esm5/radio/index.metadata.json +1 -1
- package/typings/esm5/radio/radio.d.ts +10 -4
- package/typings/esm5/select/index.metadata.json +1 -1
- package/typings/esm5/select/select.d.ts +3 -2
- package/typings/esm5/sidenav/drawer.d.ts +8 -11
- package/typings/esm5/sidenav/index.metadata.json +1 -1
- package/typings/esm5/slide-toggle/index.metadata.json +1 -1
- package/typings/esm5/slide-toggle/slide-toggle.d.ts +6 -11
- package/typings/esm5/slider/index.metadata.json +1 -1
- package/typings/esm5/slider/slider.d.ts +3 -2
- package/typings/esm5/sort/index.metadata.json +1 -1
- package/typings/esm5/sort/sort-header.d.ts +2 -2
- package/typings/esm5/sort/sort.d.ts +3 -2
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/step-header.d.ts +2 -0
- package/typings/esm5/table/index.metadata.json +1 -1
- package/typings/esm5/table/public-api.d.ts +1 -0
- package/typings/esm5/table/text-column.d.ts +19 -0
- package/typings/esm5/tabs/index.d.ts +1 -5
- package/typings/esm5/tabs/index.metadata.json +1 -1
- package/typings/esm5/tabs/tab-group.d.ts +3 -2
- package/typings/esm5/tabs/tab-header.d.ts +3 -2
- package/typings/esm5/tabs/tab-label-wrapper.d.ts +3 -2
- package/typings/esm5/tabs/tab-nav-bar/tab-nav-bar.d.ts +5 -4
- package/typings/esm5/tabs/tab.d.ts +3 -2
- package/typings/esm5/toolbar/index.metadata.json +1 -1
- package/typings/esm5/toolbar/toolbar.d.ts +3 -2
- package/typings/esm5/tree/data-source/flat-data-source.d.ts +3 -3
- package/typings/esm5/tree/index.metadata.json +1 -1
- package/typings/esm5/tree/node.d.ts +3 -2
- package/typings/form-field/form-field.d.ts +9 -3
- package/typings/form-field/index.metadata.json +1 -1
- package/typings/grid-list/index.d.ts +1 -1
- package/typings/grid-list/index.metadata.json +1 -1
- package/typings/icon/icon.d.ts +3 -2
- package/typings/icon/index.metadata.json +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/input/index.metadata.json +1 -1
- package/typings/input/input.d.ts +3 -2
- package/typings/list/index.metadata.json +1 -1
- package/typings/list/list.d.ts +5 -4
- package/typings/list/selection-list.d.ts +7 -4
- package/typings/menu/index.d.ts +2 -4
- package/typings/menu/index.metadata.json +1 -1
- package/typings/menu/menu-item.d.ts +3 -2
- package/typings/menu/menu-module.d.ts +6 -0
- package/typings/menu/menu-trigger.d.ts +1 -3
- package/typings/menu/menu.d.ts +158 -5
- package/typings/menu/public-api.d.ts +5 -2
- package/typings/paginator/index.metadata.json +1 -1
- package/typings/paginator/paginator.d.ts +3 -2
- package/typings/progress-bar/index.metadata.json +1 -1
- package/typings/progress-bar/progress-bar.d.ts +8 -7
- package/typings/progress-spinner/index.metadata.json +1 -1
- package/typings/progress-spinner/progress-spinner.d.ts +5 -4
- package/typings/public-api.d.ts +0 -1
- package/typings/radio/index.metadata.json +1 -1
- package/typings/radio/radio.d.ts +10 -4
- package/typings/schematics/ng-add/fonts/project-index-html.d.ts +1 -1
- package/typings/schematics/ng-add/version-names.d.ts +1 -1
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.d.ts +1 -1
- package/typings/select/index.metadata.json +1 -1
- package/typings/select/select.d.ts +3 -2
- package/typings/sidenav/drawer.d.ts +8 -11
- package/typings/sidenav/index.metadata.json +1 -1
- package/typings/slide-toggle/index.metadata.json +1 -1
- package/typings/slide-toggle/slide-toggle.d.ts +6 -11
- package/typings/slider/index.metadata.json +1 -1
- package/typings/slider/slider.d.ts +3 -2
- package/typings/sort/index.metadata.json +1 -1
- package/typings/sort/sort-header.d.ts +2 -2
- package/typings/sort/sort.d.ts +3 -2
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/step-header.d.ts +2 -0
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/public-api.d.ts +1 -0
- package/typings/table/text-column.d.ts +19 -0
- package/typings/tabs/index.d.ts +1 -5
- package/typings/tabs/index.metadata.json +1 -1
- package/typings/tabs/tab-group.d.ts +3 -2
- package/typings/tabs/tab-header.d.ts +3 -2
- package/typings/tabs/tab-label-wrapper.d.ts +3 -2
- package/typings/tabs/tab-nav-bar/tab-nav-bar.d.ts +5 -4
- package/typings/tabs/tab.d.ts +3 -2
- package/typings/toolbar/index.metadata.json +1 -1
- package/typings/toolbar/toolbar.d.ts +3 -2
- package/typings/tree/data-source/flat-data-source.d.ts +3 -3
- package/typings/tree/index.metadata.json +1 -1
- package/typings/tree/node.d.ts +3 -2
- package/menu/typings/menu-directive.d.ts +0 -159
- package/typings/esm5/menu/menu-directive.d.ts +0 -159
- package/typings/menu/menu-directive.d.ts +0 -159
package/esm5/sidenav.es5.js
CHANGED
|
@@ -14,7 +14,7 @@ import { ESCAPE } from '@angular/cdk/keycodes';
|
|
|
14
14
|
import { Platform, PlatformModule } from '@angular/cdk/platform';
|
|
15
15
|
import { CdkScrollable, ScrollDispatcher, ViewportRuler, ScrollingModule } from '@angular/cdk/scrolling';
|
|
16
16
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
17
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, ElementRef, EventEmitter, forwardRef, Inject, InjectionToken, Input, NgZone, Optional, Output, ViewChild, ViewEncapsulation, NgModule } from '@angular/core';
|
|
17
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, ElementRef, EventEmitter, forwardRef, Inject, InjectionToken, Input, NgZone, Optional, Output, ViewChild, ViewEncapsulation, HostListener, HostBinding, NgModule } from '@angular/core';
|
|
18
18
|
import { fromEvent, merge, Subject } from 'rxjs';
|
|
19
19
|
import { debounceTime, filter, map, startWith, take, takeUntil, distinctUntilChanged } from 'rxjs/operators';
|
|
20
20
|
import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
|
@@ -22,7 +22,7 @@ import { MatCommonModule } from '@angular/material/core';
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @fileoverview added by tsickle
|
|
25
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
25
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
26
26
|
*/
|
|
27
27
|
/**
|
|
28
28
|
* Animations used by the Material drawers.
|
|
@@ -54,7 +54,7 @@ var matDrawerAnimations = {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* @fileoverview added by tsickle
|
|
57
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
57
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
58
58
|
*/
|
|
59
59
|
/**
|
|
60
60
|
* Throws an exception when two MatDrawer are matching the same position.
|
|
@@ -96,9 +96,12 @@ var MatDrawerContent = /** @class */ (function (_super) {
|
|
|
96
96
|
*/
|
|
97
97
|
function () {
|
|
98
98
|
var _this = this;
|
|
99
|
-
this._container._contentMarginChanges.subscribe(
|
|
99
|
+
this._container._contentMarginChanges.subscribe((/**
|
|
100
|
+
* @return {?}
|
|
101
|
+
*/
|
|
102
|
+
function () {
|
|
100
103
|
_this._changeDetectorRef.markForCheck();
|
|
101
|
-
});
|
|
104
|
+
}));
|
|
102
105
|
};
|
|
103
106
|
MatDrawerContent.decorators = [
|
|
104
107
|
{ type: Component, args: [{selector: 'mat-drawer-content',
|
|
@@ -115,7 +118,10 @@ var MatDrawerContent = /** @class */ (function (_super) {
|
|
|
115
118
|
/** @nocollapse */
|
|
116
119
|
MatDrawerContent.ctorParameters = function () { return [
|
|
117
120
|
{ type: ChangeDetectorRef },
|
|
118
|
-
{ type: MatDrawerContainer, decorators: [{ type: Inject, args: [forwardRef(
|
|
121
|
+
{ type: MatDrawerContainer, decorators: [{ type: Inject, args: [forwardRef((/**
|
|
122
|
+
* @return {?}
|
|
123
|
+
*/
|
|
124
|
+
function () { return MatDrawerContainer; })),] }] },
|
|
119
125
|
{ type: ElementRef },
|
|
120
126
|
{ type: ScrollDispatcher },
|
|
121
127
|
{ type: NgZone }
|
|
@@ -154,6 +160,10 @@ var MatDrawer = /** @class */ (function () {
|
|
|
154
160
|
/**
|
|
155
161
|
* Current state of the sidenav animation.
|
|
156
162
|
*/
|
|
163
|
+
// @HostBinding is used in the class as it is expected to be extended. Since @Component decorator
|
|
164
|
+
// metadata is not inherited by child classes, instead the host binding data is defined in a way
|
|
165
|
+
// that can be inherited.
|
|
166
|
+
// tslint:disable:no-host-decorator-in-concrete
|
|
157
167
|
this._animationState = 'void';
|
|
158
168
|
/**
|
|
159
169
|
* Event emitted when the drawer open state is changed.
|
|
@@ -176,7 +186,11 @@ var MatDrawer = /** @class */ (function () {
|
|
|
176
186
|
*/
|
|
177
187
|
this._modeChanged = new Subject();
|
|
178
188
|
this._opened = false;
|
|
179
|
-
this.openedChange.subscribe(
|
|
189
|
+
this.openedChange.subscribe((/**
|
|
190
|
+
* @param {?} opened
|
|
191
|
+
* @return {?}
|
|
192
|
+
*/
|
|
193
|
+
function (opened) {
|
|
180
194
|
if (opened) {
|
|
181
195
|
if (_this._doc) {
|
|
182
196
|
_this._elementFocusedBeforeDrawerWasOpened = (/** @type {?} */ (_this._doc.activeElement));
|
|
@@ -188,29 +202,52 @@ var MatDrawer = /** @class */ (function () {
|
|
|
188
202
|
else {
|
|
189
203
|
_this._restoreFocus();
|
|
190
204
|
}
|
|
191
|
-
});
|
|
205
|
+
}));
|
|
192
206
|
/**
|
|
193
207
|
* Listen to `keydown` events outside the zone so that change detection is not run every
|
|
194
208
|
* time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed
|
|
195
209
|
* and we don't have close disabled.
|
|
196
210
|
*/
|
|
197
|
-
this._ngZone.runOutsideAngular(
|
|
198
|
-
|
|
211
|
+
this._ngZone.runOutsideAngular((/**
|
|
212
|
+
* @return {?}
|
|
213
|
+
*/
|
|
214
|
+
function () {
|
|
215
|
+
((/** @type {?} */ (fromEvent(_this._elementRef.nativeElement, 'keydown')))).pipe(filter((/**
|
|
216
|
+
* @param {?} event
|
|
217
|
+
* @return {?}
|
|
218
|
+
*/
|
|
219
|
+
function (event) { return event.keyCode === ESCAPE && !_this.disableClose; })), takeUntil(_this._destroyed)).subscribe((/**
|
|
220
|
+
* @param {?} event
|
|
221
|
+
* @return {?}
|
|
222
|
+
*/
|
|
223
|
+
function (event) { return _this._ngZone.run((/**
|
|
224
|
+
* @return {?}
|
|
225
|
+
*/
|
|
226
|
+
function () {
|
|
199
227
|
_this.close();
|
|
200
228
|
event.stopPropagation();
|
|
201
|
-
}); });
|
|
202
|
-
});
|
|
229
|
+
})); }));
|
|
230
|
+
}));
|
|
203
231
|
// We need a Subject with distinctUntilChanged, because the `done` event
|
|
204
232
|
// fires twice on some browsers. See https://github.com/angular/angular/issues/24084
|
|
205
|
-
this._animationEnd.pipe(distinctUntilChanged(
|
|
233
|
+
this._animationEnd.pipe(distinctUntilChanged((/**
|
|
234
|
+
* @param {?} x
|
|
235
|
+
* @param {?} y
|
|
236
|
+
* @return {?}
|
|
237
|
+
*/
|
|
238
|
+
function (x, y) {
|
|
206
239
|
return x.fromState === y.fromState && x.toState === y.toState;
|
|
207
|
-
})).subscribe(
|
|
240
|
+
}))).subscribe((/**
|
|
241
|
+
* @param {?} event
|
|
242
|
+
* @return {?}
|
|
243
|
+
*/
|
|
244
|
+
function (event) {
|
|
208
245
|
var fromState = event.fromState, toState = event.toState;
|
|
209
246
|
if ((toState.indexOf('open') === 0 && fromState === 'void') ||
|
|
210
247
|
(toState === 'void' && fromState.indexOf('open') === 0)) {
|
|
211
248
|
_this.openedChange.emit(_this._opened);
|
|
212
249
|
}
|
|
213
|
-
});
|
|
250
|
+
}));
|
|
214
251
|
}
|
|
215
252
|
Object.defineProperty(MatDrawer.prototype, "position", {
|
|
216
253
|
/** The side that the drawer is attached to. */
|
|
@@ -289,7 +326,14 @@ var MatDrawer = /** @class */ (function () {
|
|
|
289
326
|
* @return {?}
|
|
290
327
|
*/
|
|
291
328
|
function () {
|
|
292
|
-
return this.openedChange.pipe(filter(
|
|
329
|
+
return this.openedChange.pipe(filter((/**
|
|
330
|
+
* @param {?} o
|
|
331
|
+
* @return {?}
|
|
332
|
+
*/
|
|
333
|
+
function (o) { return o; })), map((/**
|
|
334
|
+
* @return {?}
|
|
335
|
+
*/
|
|
336
|
+
function () { })));
|
|
293
337
|
},
|
|
294
338
|
enumerable: true,
|
|
295
339
|
configurable: true
|
|
@@ -301,7 +345,14 @@ var MatDrawer = /** @class */ (function () {
|
|
|
301
345
|
* @return {?}
|
|
302
346
|
*/
|
|
303
347
|
function () {
|
|
304
|
-
return this._animationStarted.pipe(filter(
|
|
348
|
+
return this._animationStarted.pipe(filter((/**
|
|
349
|
+
* @param {?} e
|
|
350
|
+
* @return {?}
|
|
351
|
+
*/
|
|
352
|
+
function (e) { return e.fromState !== e.toState && e.toState.indexOf('open') === 0; })), map((/**
|
|
353
|
+
* @return {?}
|
|
354
|
+
*/
|
|
355
|
+
function () { })));
|
|
305
356
|
},
|
|
306
357
|
enumerable: true,
|
|
307
358
|
configurable: true
|
|
@@ -313,7 +364,14 @@ var MatDrawer = /** @class */ (function () {
|
|
|
313
364
|
* @return {?}
|
|
314
365
|
*/
|
|
315
366
|
function () {
|
|
316
|
-
return this.openedChange.pipe(filter(
|
|
367
|
+
return this.openedChange.pipe(filter((/**
|
|
368
|
+
* @param {?} o
|
|
369
|
+
* @return {?}
|
|
370
|
+
*/
|
|
371
|
+
function (o) { return !o; })), map((/**
|
|
372
|
+
* @return {?}
|
|
373
|
+
*/
|
|
374
|
+
function () { })));
|
|
317
375
|
},
|
|
318
376
|
enumerable: true,
|
|
319
377
|
configurable: true
|
|
@@ -325,7 +383,14 @@ var MatDrawer = /** @class */ (function () {
|
|
|
325
383
|
* @return {?}
|
|
326
384
|
*/
|
|
327
385
|
function () {
|
|
328
|
-
return this._animationStarted.pipe(filter(
|
|
386
|
+
return this._animationStarted.pipe(filter((/**
|
|
387
|
+
* @param {?} e
|
|
388
|
+
* @return {?}
|
|
389
|
+
*/
|
|
390
|
+
function (e) { return e.fromState !== e.toState && e.toState === 'void'; })), map((/**
|
|
391
|
+
* @return {?}
|
|
392
|
+
*/
|
|
393
|
+
function () { })));
|
|
329
394
|
},
|
|
330
395
|
enumerable: true,
|
|
331
396
|
configurable: true
|
|
@@ -357,13 +422,17 @@ var MatDrawer = /** @class */ (function () {
|
|
|
357
422
|
if (!this.autoFocus) {
|
|
358
423
|
return;
|
|
359
424
|
}
|
|
360
|
-
this._focusTrap.focusInitialElementWhenReady().then(
|
|
425
|
+
this._focusTrap.focusInitialElementWhenReady().then((/**
|
|
426
|
+
* @param {?} hasMovedFocus
|
|
427
|
+
* @return {?}
|
|
428
|
+
*/
|
|
429
|
+
function (hasMovedFocus) {
|
|
361
430
|
// If there were no focusable elements, focus the sidenav itself so the keyboard navigation
|
|
362
431
|
// still works. We need to check that `focus` is a function due to Universal.
|
|
363
432
|
if (!hasMovedFocus && typeof _this._elementRef.nativeElement.focus === 'function') {
|
|
364
433
|
_this._elementRef.nativeElement.focus();
|
|
365
434
|
}
|
|
366
|
-
});
|
|
435
|
+
}));
|
|
367
436
|
};
|
|
368
437
|
/**
|
|
369
438
|
* If focus is currently inside the drawer, restores it to where it was before the drawer
|
|
@@ -526,9 +595,17 @@ var MatDrawer = /** @class */ (function () {
|
|
|
526
595
|
if (this._focusTrap) {
|
|
527
596
|
this._focusTrap.enabled = this._isFocusTrapEnabled;
|
|
528
597
|
}
|
|
529
|
-
return new Promise(
|
|
530
|
-
|
|
531
|
-
|
|
598
|
+
return new Promise((/**
|
|
599
|
+
* @param {?} resolve
|
|
600
|
+
* @return {?}
|
|
601
|
+
*/
|
|
602
|
+
function (resolve) {
|
|
603
|
+
_this.openedChange.pipe(take(1)).subscribe((/**
|
|
604
|
+
* @param {?} open
|
|
605
|
+
* @return {?}
|
|
606
|
+
*/
|
|
607
|
+
function (open) { return resolve(open ? 'open' : 'close'); }));
|
|
608
|
+
}));
|
|
532
609
|
};
|
|
533
610
|
Object.defineProperty(MatDrawer.prototype, "_width", {
|
|
534
611
|
get: /**
|
|
@@ -540,6 +617,60 @@ var MatDrawer = /** @class */ (function () {
|
|
|
540
617
|
enumerable: true,
|
|
541
618
|
configurable: true
|
|
542
619
|
});
|
|
620
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
621
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
622
|
+
// ViewEngine they're overwritte.
|
|
623
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
624
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
625
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
626
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
627
|
+
// ViewEngine they're overwritte.
|
|
628
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
629
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
630
|
+
/**
|
|
631
|
+
* @param {?} event
|
|
632
|
+
* @return {?}
|
|
633
|
+
*/
|
|
634
|
+
MatDrawer.prototype._animationStartListener =
|
|
635
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
636
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
637
|
+
// ViewEngine they're overwritte.
|
|
638
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
639
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
640
|
+
/**
|
|
641
|
+
* @param {?} event
|
|
642
|
+
* @return {?}
|
|
643
|
+
*/
|
|
644
|
+
function (event) {
|
|
645
|
+
this._animationStarted.next(event);
|
|
646
|
+
};
|
|
647
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
648
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
649
|
+
// ViewEngine they're overwritte.
|
|
650
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
651
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
652
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
653
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
654
|
+
// ViewEngine they're overwritte.
|
|
655
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
656
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
657
|
+
/**
|
|
658
|
+
* @param {?} event
|
|
659
|
+
* @return {?}
|
|
660
|
+
*/
|
|
661
|
+
MatDrawer.prototype._animationDoneListener =
|
|
662
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
663
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
664
|
+
// ViewEngine they're overwritte.
|
|
665
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
666
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
667
|
+
/**
|
|
668
|
+
* @param {?} event
|
|
669
|
+
* @return {?}
|
|
670
|
+
*/
|
|
671
|
+
function (event) {
|
|
672
|
+
this._animationEnd.next(event);
|
|
673
|
+
};
|
|
543
674
|
MatDrawer.decorators = [
|
|
544
675
|
{ type: Component, args: [{selector: 'mat-drawer',
|
|
545
676
|
exportAs: 'matDrawer',
|
|
@@ -547,9 +678,6 @@ var MatDrawer = /** @class */ (function () {
|
|
|
547
678
|
animations: [matDrawerAnimations.transformDrawer],
|
|
548
679
|
host: {
|
|
549
680
|
'class': 'mat-drawer',
|
|
550
|
-
'[@transform]': '_animationState',
|
|
551
|
-
'(@transform.start)': '_animationStarted.next($event)',
|
|
552
|
-
'(@transform.done)': '_animationEnd.next($event)',
|
|
553
681
|
// must prevent the browser from aligning text based on value
|
|
554
682
|
'[attr.align]': 'null',
|
|
555
683
|
'[class.mat-drawer-end]': 'position === "end"',
|
|
@@ -576,13 +704,16 @@ var MatDrawer = /** @class */ (function () {
|
|
|
576
704
|
mode: [{ type: Input }],
|
|
577
705
|
disableClose: [{ type: Input }],
|
|
578
706
|
autoFocus: [{ type: Input }],
|
|
707
|
+
_animationState: [{ type: HostBinding, args: ['@transform',] }],
|
|
579
708
|
openedChange: [{ type: Output }],
|
|
580
709
|
_openedStream: [{ type: Output, args: ['opened',] }],
|
|
581
710
|
openedStart: [{ type: Output }],
|
|
582
711
|
_closedStream: [{ type: Output, args: ['closed',] }],
|
|
583
712
|
closedStart: [{ type: Output }],
|
|
584
713
|
onPositionChanged: [{ type: Output, args: ['positionChanged',] }],
|
|
585
|
-
opened: [{ type: Input }]
|
|
714
|
+
opened: [{ type: Input }],
|
|
715
|
+
_animationStartListener: [{ type: HostListener, args: ['@transform.start', ['$event'],] }],
|
|
716
|
+
_animationDoneListener: [{ type: HostListener, args: ['@transform.done', ['$event'],] }]
|
|
586
717
|
};
|
|
587
718
|
return MatDrawer;
|
|
588
719
|
}());
|
|
@@ -593,14 +724,9 @@ var MatDrawer = /** @class */ (function () {
|
|
|
593
724
|
* and coordinates the backdrop and content styling.
|
|
594
725
|
*/
|
|
595
726
|
var MatDrawerContainer = /** @class */ (function () {
|
|
596
|
-
function MatDrawerContainer(_dir, _element, _ngZone, _changeDetectorRef, defaultAutosize, _animationMode
|
|
597
|
-
/**
|
|
598
|
-
* @deprecated viewportRuler to become a required parameter.
|
|
599
|
-
* @breaking-change 8.0.0
|
|
600
|
-
*/
|
|
601
|
-
viewportRuler) {
|
|
602
|
-
if (defaultAutosize === void 0) { defaultAutosize = false; }
|
|
727
|
+
function MatDrawerContainer(_dir, _element, _ngZone, _changeDetectorRef, viewportRuler, defaultAutosize, _animationMode) {
|
|
603
728
|
var _this = this;
|
|
729
|
+
if (defaultAutosize === void 0) { defaultAutosize = false; }
|
|
604
730
|
this._dir = _dir;
|
|
605
731
|
this._element = _element;
|
|
606
732
|
this._ngZone = _ngZone;
|
|
@@ -628,18 +754,22 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
628
754
|
// If a `Dir` directive exists up the tree, listen direction changes
|
|
629
755
|
// and update the left/right properties to point to the proper start/end.
|
|
630
756
|
if (_dir) {
|
|
631
|
-
_dir.change.pipe(takeUntil(this._destroyed)).subscribe(
|
|
757
|
+
_dir.change.pipe(takeUntil(this._destroyed)).subscribe((/**
|
|
758
|
+
* @return {?}
|
|
759
|
+
*/
|
|
760
|
+
function () {
|
|
632
761
|
_this._validateDrawers();
|
|
633
|
-
_this.
|
|
634
|
-
});
|
|
762
|
+
_this.updateContentMargins();
|
|
763
|
+
}));
|
|
635
764
|
}
|
|
636
765
|
// Since the minimum width of the sidenav depends on the viewport width,
|
|
637
766
|
// we need to recompute the margins if the viewport changes.
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
767
|
+
viewportRuler.change()
|
|
768
|
+
.pipe(takeUntil(this._destroyed))
|
|
769
|
+
.subscribe((/**
|
|
770
|
+
* @return {?}
|
|
771
|
+
*/
|
|
772
|
+
function () { return _this.updateContentMargins(); }));
|
|
643
773
|
this._autosize = defaultAutosize;
|
|
644
774
|
}
|
|
645
775
|
Object.defineProperty(MatDrawerContainer.prototype, "start", {
|
|
@@ -737,22 +867,32 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
737
867
|
*/
|
|
738
868
|
function () {
|
|
739
869
|
var _this = this;
|
|
740
|
-
this._drawers.changes.pipe(startWith(null)).subscribe(
|
|
870
|
+
this._drawers.changes.pipe(startWith(null)).subscribe((/**
|
|
871
|
+
* @return {?}
|
|
872
|
+
*/
|
|
873
|
+
function () {
|
|
741
874
|
_this._validateDrawers();
|
|
742
|
-
_this._drawers.forEach(
|
|
875
|
+
_this._drawers.forEach((/**
|
|
876
|
+
* @param {?} drawer
|
|
877
|
+
* @return {?}
|
|
878
|
+
*/
|
|
879
|
+
function (drawer) {
|
|
743
880
|
_this._watchDrawerToggle(drawer);
|
|
744
881
|
_this._watchDrawerPosition(drawer);
|
|
745
882
|
_this._watchDrawerMode(drawer);
|
|
746
|
-
});
|
|
883
|
+
}));
|
|
747
884
|
if (!_this._drawers.length ||
|
|
748
885
|
_this._isDrawerOpen(_this._start) ||
|
|
749
886
|
_this._isDrawerOpen(_this._end)) {
|
|
750
|
-
_this.
|
|
887
|
+
_this.updateContentMargins();
|
|
751
888
|
}
|
|
752
889
|
_this._changeDetectorRef.markForCheck();
|
|
753
|
-
});
|
|
890
|
+
}));
|
|
754
891
|
this._doCheckSubject.pipe(debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps
|
|
755
|
-
takeUntil(this._destroyed)).subscribe(
|
|
892
|
+
takeUntil(this._destroyed)).subscribe((/**
|
|
893
|
+
* @return {?}
|
|
894
|
+
*/
|
|
895
|
+
function () { return _this.updateContentMargins(); }));
|
|
756
896
|
};
|
|
757
897
|
/**
|
|
758
898
|
* @return {?}
|
|
@@ -776,7 +916,11 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
776
916
|
* @return {?}
|
|
777
917
|
*/
|
|
778
918
|
function () {
|
|
779
|
-
this._drawers.forEach(
|
|
919
|
+
this._drawers.forEach((/**
|
|
920
|
+
* @param {?} drawer
|
|
921
|
+
* @return {?}
|
|
922
|
+
*/
|
|
923
|
+
function (drawer) { return drawer.open(); }));
|
|
780
924
|
};
|
|
781
925
|
/** Calls `close` of both start and end drawers */
|
|
782
926
|
/**
|
|
@@ -788,7 +932,75 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
788
932
|
* @return {?}
|
|
789
933
|
*/
|
|
790
934
|
function () {
|
|
791
|
-
this._drawers.forEach(
|
|
935
|
+
this._drawers.forEach((/**
|
|
936
|
+
* @param {?} drawer
|
|
937
|
+
* @return {?}
|
|
938
|
+
*/
|
|
939
|
+
function (drawer) { return drawer.close(); }));
|
|
940
|
+
};
|
|
941
|
+
/**
|
|
942
|
+
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
943
|
+
* sparingly, because it causes a reflow.
|
|
944
|
+
*/
|
|
945
|
+
/**
|
|
946
|
+
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
947
|
+
* sparingly, because it causes a reflow.
|
|
948
|
+
* @return {?}
|
|
949
|
+
*/
|
|
950
|
+
MatDrawerContainer.prototype.updateContentMargins = /**
|
|
951
|
+
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
952
|
+
* sparingly, because it causes a reflow.
|
|
953
|
+
* @return {?}
|
|
954
|
+
*/
|
|
955
|
+
function () {
|
|
956
|
+
var _this = this;
|
|
957
|
+
// 1. For drawers in `over` mode, they don't affect the content.
|
|
958
|
+
// 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
|
|
959
|
+
// left margin (for left drawer) or right margin (for right the drawer).
|
|
960
|
+
// 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
|
|
961
|
+
// adding to the left or right margin and simultaneously subtracting the same amount of
|
|
962
|
+
// margin from the other side.
|
|
963
|
+
/** @type {?} */
|
|
964
|
+
var left = 0;
|
|
965
|
+
/** @type {?} */
|
|
966
|
+
var right = 0;
|
|
967
|
+
if (this._left && this._left.opened) {
|
|
968
|
+
if (this._left.mode == 'side') {
|
|
969
|
+
left += this._left._width;
|
|
970
|
+
}
|
|
971
|
+
else if (this._left.mode == 'push') {
|
|
972
|
+
/** @type {?} */
|
|
973
|
+
var width = this._left._width;
|
|
974
|
+
left += width;
|
|
975
|
+
right -= width;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
if (this._right && this._right.opened) {
|
|
979
|
+
if (this._right.mode == 'side') {
|
|
980
|
+
right += this._right._width;
|
|
981
|
+
}
|
|
982
|
+
else if (this._right.mode == 'push') {
|
|
983
|
+
/** @type {?} */
|
|
984
|
+
var width = this._right._width;
|
|
985
|
+
right += width;
|
|
986
|
+
left -= width;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
// If either `right` or `left` is zero, don't set a style to the element. This
|
|
990
|
+
// allows users to specify a custom size via CSS class in SSR scenarios where the
|
|
991
|
+
// measured widths will always be zero. Note that we reset to `null` here, rather
|
|
992
|
+
// than below, in order to ensure that the types in the `if` below are consistent.
|
|
993
|
+
left = left || (/** @type {?} */ (null));
|
|
994
|
+
right = right || (/** @type {?} */ (null));
|
|
995
|
+
if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
|
|
996
|
+
this._contentMargins = { left: left, right: right };
|
|
997
|
+
// Pull back into the NgZone since in some cases we could be outside. We need to be careful
|
|
998
|
+
// to do it only when something changed, otherwise we can end up hitting the zone too often.
|
|
999
|
+
this._ngZone.run((/**
|
|
1000
|
+
* @return {?}
|
|
1001
|
+
*/
|
|
1002
|
+
function () { return _this._contentMarginChanges.next(_this._contentMargins); }));
|
|
1003
|
+
}
|
|
792
1004
|
};
|
|
793
1005
|
/**
|
|
794
1006
|
* @return {?}
|
|
@@ -801,7 +1013,10 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
801
1013
|
// If users opted into autosizing, do a check every change detection cycle.
|
|
802
1014
|
if (this._autosize && this._isPushed()) {
|
|
803
1015
|
// Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop.
|
|
804
|
-
this._ngZone.runOutsideAngular(
|
|
1016
|
+
this._ngZone.runOutsideAngular((/**
|
|
1017
|
+
* @return {?}
|
|
1018
|
+
*/
|
|
1019
|
+
function () { return _this._doCheckSubject.next(); }));
|
|
805
1020
|
}
|
|
806
1021
|
};
|
|
807
1022
|
/**
|
|
@@ -827,20 +1042,31 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
827
1042
|
*/
|
|
828
1043
|
function (drawer) {
|
|
829
1044
|
var _this = this;
|
|
830
|
-
drawer._animationStarted.pipe(filter(
|
|
831
|
-
|
|
1045
|
+
drawer._animationStarted.pipe(filter((/**
|
|
1046
|
+
* @param {?} event
|
|
1047
|
+
* @return {?}
|
|
1048
|
+
*/
|
|
1049
|
+
function (event) { return event.fromState !== event.toState; })), takeUntil(this._drawers.changes))
|
|
1050
|
+
.subscribe((/**
|
|
1051
|
+
* @param {?} event
|
|
1052
|
+
* @return {?}
|
|
1053
|
+
*/
|
|
1054
|
+
function (event) {
|
|
832
1055
|
// Set the transition class on the container so that the animations occur. This should not
|
|
833
1056
|
// be set initially because animations should only be triggered via a change in state.
|
|
834
1057
|
if (event.toState !== 'open-instant' && _this._animationMode !== 'NoopAnimations') {
|
|
835
1058
|
_this._element.nativeElement.classList.add('mat-drawer-transition');
|
|
836
1059
|
}
|
|
837
|
-
_this.
|
|
1060
|
+
_this.updateContentMargins();
|
|
838
1061
|
_this._changeDetectorRef.markForCheck();
|
|
839
|
-
});
|
|
1062
|
+
}));
|
|
840
1063
|
if (drawer.mode !== 'side') {
|
|
841
|
-
drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe(
|
|
1064
|
+
drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe((/**
|
|
1065
|
+
* @return {?}
|
|
1066
|
+
*/
|
|
1067
|
+
function () {
|
|
842
1068
|
return _this._setContainerClass(drawer.opened);
|
|
843
|
-
});
|
|
1069
|
+
}));
|
|
844
1070
|
}
|
|
845
1071
|
};
|
|
846
1072
|
/**
|
|
@@ -868,11 +1094,17 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
868
1094
|
}
|
|
869
1095
|
// NOTE: We need to wait for the microtask queue to be empty before validating,
|
|
870
1096
|
// since both drawers may be swapping positions at the same time.
|
|
871
|
-
drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(
|
|
872
|
-
|
|
1097
|
+
drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe((/**
|
|
1098
|
+
* @return {?}
|
|
1099
|
+
*/
|
|
1100
|
+
function () {
|
|
1101
|
+
_this._ngZone.onMicrotaskEmpty.asObservable().pipe(take(1)).subscribe((/**
|
|
1102
|
+
* @return {?}
|
|
1103
|
+
*/
|
|
1104
|
+
function () {
|
|
873
1105
|
_this._validateDrawers();
|
|
874
|
-
});
|
|
875
|
-
});
|
|
1106
|
+
}));
|
|
1107
|
+
}));
|
|
876
1108
|
};
|
|
877
1109
|
/** Subscribes to changes in drawer mode so we can run change detection. */
|
|
878
1110
|
/**
|
|
@@ -891,10 +1123,13 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
891
1123
|
var _this = this;
|
|
892
1124
|
if (drawer) {
|
|
893
1125
|
drawer._modeChanged.pipe(takeUntil(merge(this._drawers.changes, this._destroyed)))
|
|
894
|
-
.subscribe(
|
|
895
|
-
|
|
1126
|
+
.subscribe((/**
|
|
1127
|
+
* @return {?}
|
|
1128
|
+
*/
|
|
1129
|
+
function () {
|
|
1130
|
+
_this.updateContentMargins();
|
|
896
1131
|
_this._changeDetectorRef.markForCheck();
|
|
897
|
-
});
|
|
1132
|
+
}));
|
|
898
1133
|
}
|
|
899
1134
|
};
|
|
900
1135
|
/** Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element. */
|
|
@@ -933,7 +1168,11 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
933
1168
|
var _this = this;
|
|
934
1169
|
this._start = this._end = null;
|
|
935
1170
|
// Ensure that we have at most one start and one end drawer.
|
|
936
|
-
this._drawers.forEach(
|
|
1171
|
+
this._drawers.forEach((/**
|
|
1172
|
+
* @param {?} drawer
|
|
1173
|
+
* @return {?}
|
|
1174
|
+
*/
|
|
1175
|
+
function (drawer) {
|
|
937
1176
|
if (drawer.position == 'end') {
|
|
938
1177
|
if (_this._end != null) {
|
|
939
1178
|
throwMatDuplicatedDrawerError('end');
|
|
@@ -946,7 +1185,7 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
946
1185
|
}
|
|
947
1186
|
_this._start = drawer;
|
|
948
1187
|
}
|
|
949
|
-
});
|
|
1188
|
+
}));
|
|
950
1189
|
this._right = this._left = null;
|
|
951
1190
|
// Detect if we're LTR or RTL.
|
|
952
1191
|
if (this._dir && this._dir.value === 'rtl') {
|
|
@@ -993,8 +1232,16 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
993
1232
|
var _this = this;
|
|
994
1233
|
// Close all open drawers where closing is not disabled and the mode is not `side`.
|
|
995
1234
|
[this._start, this._end]
|
|
996
|
-
.filter(
|
|
997
|
-
|
|
1235
|
+
.filter((/**
|
|
1236
|
+
* @param {?} drawer
|
|
1237
|
+
* @return {?}
|
|
1238
|
+
*/
|
|
1239
|
+
function (drawer) { return drawer && !drawer.disableClose && _this._canHaveBackdrop(drawer); }))
|
|
1240
|
+
.forEach((/**
|
|
1241
|
+
* @param {?} drawer
|
|
1242
|
+
* @return {?}
|
|
1243
|
+
*/
|
|
1244
|
+
function (drawer) { return (/** @type {?} */ (drawer)).close(); }));
|
|
998
1245
|
};
|
|
999
1246
|
/**
|
|
1000
1247
|
* @return {?}
|
|
@@ -1032,75 +1279,6 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
1032
1279
|
function (drawer) {
|
|
1033
1280
|
return drawer != null && drawer.opened;
|
|
1034
1281
|
};
|
|
1035
|
-
/**
|
|
1036
|
-
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
1037
|
-
* sparingly, because it causes a reflow.
|
|
1038
|
-
*/
|
|
1039
|
-
/**
|
|
1040
|
-
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
1041
|
-
* sparingly, because it causes a reflow.
|
|
1042
|
-
* @private
|
|
1043
|
-
* @return {?}
|
|
1044
|
-
*/
|
|
1045
|
-
MatDrawerContainer.prototype._updateContentMargins = /**
|
|
1046
|
-
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
1047
|
-
* sparingly, because it causes a reflow.
|
|
1048
|
-
* @private
|
|
1049
|
-
* @return {?}
|
|
1050
|
-
*/
|
|
1051
|
-
function () {
|
|
1052
|
-
// 1. For drawers in `over` mode, they don't affect the content.
|
|
1053
|
-
// 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
|
|
1054
|
-
// left margin (for left drawer) or right margin (for right the drawer).
|
|
1055
|
-
// 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
|
|
1056
|
-
// adding to the left or right margin and simultaneously subtracting the same amount of
|
|
1057
|
-
// margin from the other side.
|
|
1058
|
-
var _this = this;
|
|
1059
|
-
// 1. For drawers in `over` mode, they don't affect the content.
|
|
1060
|
-
// 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
|
|
1061
|
-
// left margin (for left drawer) or right margin (for right the drawer).
|
|
1062
|
-
// 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
|
|
1063
|
-
// adding to the left or right margin and simultaneously subtracting the same amount of
|
|
1064
|
-
// margin from the other side.
|
|
1065
|
-
/** @type {?} */
|
|
1066
|
-
var left = 0;
|
|
1067
|
-
/** @type {?} */
|
|
1068
|
-
var right = 0;
|
|
1069
|
-
if (this._left && this._left.opened) {
|
|
1070
|
-
if (this._left.mode == 'side') {
|
|
1071
|
-
left += this._left._width;
|
|
1072
|
-
}
|
|
1073
|
-
else if (this._left.mode == 'push') {
|
|
1074
|
-
/** @type {?} */
|
|
1075
|
-
var width = this._left._width;
|
|
1076
|
-
left += width;
|
|
1077
|
-
right -= width;
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
if (this._right && this._right.opened) {
|
|
1081
|
-
if (this._right.mode == 'side') {
|
|
1082
|
-
right += this._right._width;
|
|
1083
|
-
}
|
|
1084
|
-
else if (this._right.mode == 'push') {
|
|
1085
|
-
/** @type {?} */
|
|
1086
|
-
var width = this._right._width;
|
|
1087
|
-
right += width;
|
|
1088
|
-
left -= width;
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
// If either `right` or `left` is zero, don't set a style to the element. This
|
|
1092
|
-
// allows users to specify a custom size via CSS class in SSR scenarios where the
|
|
1093
|
-
// measured widths will always be zero. Note that we reset to `null` here, rather
|
|
1094
|
-
// than below, in order to ensure that the types in the `if` below are consistent.
|
|
1095
|
-
left = left || (/** @type {?} */ (null));
|
|
1096
|
-
right = right || (/** @type {?} */ (null));
|
|
1097
|
-
if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
|
|
1098
|
-
this._contentMargins = { left: left, right: right };
|
|
1099
|
-
// Pull back into the NgZone since in some cases we could be outside. We need to be careful
|
|
1100
|
-
// to do it only when something changed, otherwise we can end up hitting the zone too often.
|
|
1101
|
-
this._ngZone.run(function () { return _this._contentMarginChanges.next(_this._contentMargins); });
|
|
1102
|
-
}
|
|
1103
|
-
};
|
|
1104
1282
|
MatDrawerContainer.decorators = [
|
|
1105
1283
|
{ type: Component, args: [{selector: 'mat-drawer-container',
|
|
1106
1284
|
exportAs: 'matDrawerContainer',
|
|
@@ -1120,9 +1298,9 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
1120
1298
|
{ type: ElementRef },
|
|
1121
1299
|
{ type: NgZone },
|
|
1122
1300
|
{ type: ChangeDetectorRef },
|
|
1301
|
+
{ type: ViewportRuler },
|
|
1123
1302
|
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DRAWER_DEFAULT_AUTOSIZE,] }] },
|
|
1124
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
|
|
1125
|
-
{ type: ViewportRuler, decorators: [{ type: Optional }] }
|
|
1303
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
|
|
1126
1304
|
]; };
|
|
1127
1305
|
MatDrawerContainer.propDecorators = {
|
|
1128
1306
|
_drawers: [{ type: ContentChildren, args: [MatDrawer,] }],
|
|
@@ -1137,7 +1315,7 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
1137
1315
|
|
|
1138
1316
|
/**
|
|
1139
1317
|
* @fileoverview added by tsickle
|
|
1140
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1318
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1141
1319
|
*/
|
|
1142
1320
|
var MatSidenavContent = /** @class */ (function (_super) {
|
|
1143
1321
|
__extends(MatSidenavContent, _super);
|
|
@@ -1159,7 +1337,10 @@ var MatSidenavContent = /** @class */ (function (_super) {
|
|
|
1159
1337
|
/** @nocollapse */
|
|
1160
1338
|
MatSidenavContent.ctorParameters = function () { return [
|
|
1161
1339
|
{ type: ChangeDetectorRef },
|
|
1162
|
-
{ type: MatSidenavContainer, decorators: [{ type: Inject, args: [forwardRef(
|
|
1340
|
+
{ type: MatSidenavContainer, decorators: [{ type: Inject, args: [forwardRef((/**
|
|
1341
|
+
* @return {?}
|
|
1342
|
+
*/
|
|
1343
|
+
function () { return MatSidenavContainer; })),] }] },
|
|
1163
1344
|
{ type: ElementRef },
|
|
1164
1345
|
{ type: ScrollDispatcher },
|
|
1165
1346
|
{ type: NgZone }
|
|
@@ -1236,9 +1417,6 @@ var MatSidenav = /** @class */ (function (_super) {
|
|
|
1236
1417
|
host: {
|
|
1237
1418
|
'class': 'mat-drawer mat-sidenav',
|
|
1238
1419
|
'tabIndex': '-1',
|
|
1239
|
-
'[@transform]': '_animationState',
|
|
1240
|
-
'(@transform.start)': '_animationStarted.next($event)',
|
|
1241
|
-
'(@transform.done)': '_animationEnd.next($event)',
|
|
1242
1420
|
// must prevent the browser from aligning text based on value
|
|
1243
1421
|
'[attr.align]': 'null',
|
|
1244
1422
|
'[class.mat-drawer-end]': 'position === "end"',
|
|
@@ -1287,7 +1465,7 @@ var MatSidenavContainer = /** @class */ (function (_super) {
|
|
|
1287
1465
|
|
|
1288
1466
|
/**
|
|
1289
1467
|
* @fileoverview added by tsickle
|
|
1290
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1468
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1291
1469
|
*/
|
|
1292
1470
|
var MatSidenavModule = /** @class */ (function () {
|
|
1293
1471
|
function MatSidenavModule() {
|
|
@@ -1324,12 +1502,12 @@ var MatSidenavModule = /** @class */ (function () {
|
|
|
1324
1502
|
|
|
1325
1503
|
/**
|
|
1326
1504
|
* @fileoverview added by tsickle
|
|
1327
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1505
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1328
1506
|
*/
|
|
1329
1507
|
|
|
1330
1508
|
/**
|
|
1331
1509
|
* @fileoverview added by tsickle
|
|
1332
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1510
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1333
1511
|
*/
|
|
1334
1512
|
|
|
1335
1513
|
export { MatSidenavModule, throwMatDuplicatedDrawerError, MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY, MAT_DRAWER_DEFAULT_AUTOSIZE, MatDrawerContent, MatDrawer, MatDrawerContainer, MatSidenavContent, MatSidenav, MatSidenavContainer, matDrawerAnimations };
|