@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
|
@@ -42,7 +42,7 @@ function __extends(d, b) {
|
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* @fileoverview added by tsickle
|
|
45
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
45
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
46
46
|
*/
|
|
47
47
|
/**
|
|
48
48
|
* Animations used by the Material drawers.
|
|
@@ -74,7 +74,7 @@ var matDrawerAnimations = {
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @fileoverview added by tsickle
|
|
77
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
77
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
78
78
|
*/
|
|
79
79
|
/**
|
|
80
80
|
* Throws an exception when two MatDrawer are matching the same position.
|
|
@@ -116,9 +116,12 @@ var MatDrawerContent = /** @class */ (function (_super) {
|
|
|
116
116
|
*/
|
|
117
117
|
function () {
|
|
118
118
|
var _this = this;
|
|
119
|
-
this._container._contentMarginChanges.subscribe(
|
|
119
|
+
this._container._contentMarginChanges.subscribe((/**
|
|
120
|
+
* @return {?}
|
|
121
|
+
*/
|
|
122
|
+
function () {
|
|
120
123
|
_this._changeDetectorRef.markForCheck();
|
|
121
|
-
});
|
|
124
|
+
}));
|
|
122
125
|
};
|
|
123
126
|
MatDrawerContent.decorators = [
|
|
124
127
|
{ type: core.Component, args: [{selector: 'mat-drawer-content',
|
|
@@ -135,7 +138,10 @@ var MatDrawerContent = /** @class */ (function (_super) {
|
|
|
135
138
|
/** @nocollapse */
|
|
136
139
|
MatDrawerContent.ctorParameters = function () { return [
|
|
137
140
|
{ type: core.ChangeDetectorRef },
|
|
138
|
-
{ type: MatDrawerContainer, decorators: [{ type: core.Inject, args: [core.forwardRef(
|
|
141
|
+
{ type: MatDrawerContainer, decorators: [{ type: core.Inject, args: [core.forwardRef((/**
|
|
142
|
+
* @return {?}
|
|
143
|
+
*/
|
|
144
|
+
function () { return MatDrawerContainer; })),] }] },
|
|
139
145
|
{ type: core.ElementRef },
|
|
140
146
|
{ type: scrolling.ScrollDispatcher },
|
|
141
147
|
{ type: core.NgZone }
|
|
@@ -174,6 +180,10 @@ var MatDrawer = /** @class */ (function () {
|
|
|
174
180
|
/**
|
|
175
181
|
* Current state of the sidenav animation.
|
|
176
182
|
*/
|
|
183
|
+
// @HostBinding is used in the class as it is expected to be extended. Since @Component decorator
|
|
184
|
+
// metadata is not inherited by child classes, instead the host binding data is defined in a way
|
|
185
|
+
// that can be inherited.
|
|
186
|
+
// tslint:disable:no-host-decorator-in-concrete
|
|
177
187
|
this._animationState = 'void';
|
|
178
188
|
/**
|
|
179
189
|
* Event emitted when the drawer open state is changed.
|
|
@@ -196,7 +206,11 @@ var MatDrawer = /** @class */ (function () {
|
|
|
196
206
|
*/
|
|
197
207
|
this._modeChanged = new rxjs.Subject();
|
|
198
208
|
this._opened = false;
|
|
199
|
-
this.openedChange.subscribe(
|
|
209
|
+
this.openedChange.subscribe((/**
|
|
210
|
+
* @param {?} opened
|
|
211
|
+
* @return {?}
|
|
212
|
+
*/
|
|
213
|
+
function (opened) {
|
|
200
214
|
if (opened) {
|
|
201
215
|
if (_this._doc) {
|
|
202
216
|
_this._elementFocusedBeforeDrawerWasOpened = (/** @type {?} */ (_this._doc.activeElement));
|
|
@@ -208,29 +222,52 @@ var MatDrawer = /** @class */ (function () {
|
|
|
208
222
|
else {
|
|
209
223
|
_this._restoreFocus();
|
|
210
224
|
}
|
|
211
|
-
});
|
|
225
|
+
}));
|
|
212
226
|
/**
|
|
213
227
|
* Listen to `keydown` events outside the zone so that change detection is not run every
|
|
214
228
|
* time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed
|
|
215
229
|
* and we don't have close disabled.
|
|
216
230
|
*/
|
|
217
|
-
this._ngZone.runOutsideAngular(
|
|
218
|
-
|
|
231
|
+
this._ngZone.runOutsideAngular((/**
|
|
232
|
+
* @return {?}
|
|
233
|
+
*/
|
|
234
|
+
function () {
|
|
235
|
+
((/** @type {?} */ (rxjs.fromEvent(_this._elementRef.nativeElement, 'keydown')))).pipe(operators.filter((/**
|
|
236
|
+
* @param {?} event
|
|
237
|
+
* @return {?}
|
|
238
|
+
*/
|
|
239
|
+
function (event) { return event.keyCode === keycodes.ESCAPE && !_this.disableClose; })), operators.takeUntil(_this._destroyed)).subscribe((/**
|
|
240
|
+
* @param {?} event
|
|
241
|
+
* @return {?}
|
|
242
|
+
*/
|
|
243
|
+
function (event) { return _this._ngZone.run((/**
|
|
244
|
+
* @return {?}
|
|
245
|
+
*/
|
|
246
|
+
function () {
|
|
219
247
|
_this.close();
|
|
220
248
|
event.stopPropagation();
|
|
221
|
-
}); });
|
|
222
|
-
});
|
|
249
|
+
})); }));
|
|
250
|
+
}));
|
|
223
251
|
// We need a Subject with distinctUntilChanged, because the `done` event
|
|
224
252
|
// fires twice on some browsers. See https://github.com/angular/angular/issues/24084
|
|
225
|
-
this._animationEnd.pipe(operators.distinctUntilChanged(
|
|
253
|
+
this._animationEnd.pipe(operators.distinctUntilChanged((/**
|
|
254
|
+
* @param {?} x
|
|
255
|
+
* @param {?} y
|
|
256
|
+
* @return {?}
|
|
257
|
+
*/
|
|
258
|
+
function (x, y) {
|
|
226
259
|
return x.fromState === y.fromState && x.toState === y.toState;
|
|
227
|
-
})).subscribe(
|
|
260
|
+
}))).subscribe((/**
|
|
261
|
+
* @param {?} event
|
|
262
|
+
* @return {?}
|
|
263
|
+
*/
|
|
264
|
+
function (event) {
|
|
228
265
|
var fromState = event.fromState, toState = event.toState;
|
|
229
266
|
if ((toState.indexOf('open') === 0 && fromState === 'void') ||
|
|
230
267
|
(toState === 'void' && fromState.indexOf('open') === 0)) {
|
|
231
268
|
_this.openedChange.emit(_this._opened);
|
|
232
269
|
}
|
|
233
|
-
});
|
|
270
|
+
}));
|
|
234
271
|
}
|
|
235
272
|
Object.defineProperty(MatDrawer.prototype, "position", {
|
|
236
273
|
/** The side that the drawer is attached to. */
|
|
@@ -309,7 +346,14 @@ var MatDrawer = /** @class */ (function () {
|
|
|
309
346
|
* @return {?}
|
|
310
347
|
*/
|
|
311
348
|
function () {
|
|
312
|
-
return this.openedChange.pipe(operators.filter(
|
|
349
|
+
return this.openedChange.pipe(operators.filter((/**
|
|
350
|
+
* @param {?} o
|
|
351
|
+
* @return {?}
|
|
352
|
+
*/
|
|
353
|
+
function (o) { return o; })), operators.map((/**
|
|
354
|
+
* @return {?}
|
|
355
|
+
*/
|
|
356
|
+
function () { })));
|
|
313
357
|
},
|
|
314
358
|
enumerable: true,
|
|
315
359
|
configurable: true
|
|
@@ -321,7 +365,14 @@ var MatDrawer = /** @class */ (function () {
|
|
|
321
365
|
* @return {?}
|
|
322
366
|
*/
|
|
323
367
|
function () {
|
|
324
|
-
return this._animationStarted.pipe(operators.filter(
|
|
368
|
+
return this._animationStarted.pipe(operators.filter((/**
|
|
369
|
+
* @param {?} e
|
|
370
|
+
* @return {?}
|
|
371
|
+
*/
|
|
372
|
+
function (e) { return e.fromState !== e.toState && e.toState.indexOf('open') === 0; })), operators.map((/**
|
|
373
|
+
* @return {?}
|
|
374
|
+
*/
|
|
375
|
+
function () { })));
|
|
325
376
|
},
|
|
326
377
|
enumerable: true,
|
|
327
378
|
configurable: true
|
|
@@ -333,7 +384,14 @@ var MatDrawer = /** @class */ (function () {
|
|
|
333
384
|
* @return {?}
|
|
334
385
|
*/
|
|
335
386
|
function () {
|
|
336
|
-
return this.openedChange.pipe(operators.filter(
|
|
387
|
+
return this.openedChange.pipe(operators.filter((/**
|
|
388
|
+
* @param {?} o
|
|
389
|
+
* @return {?}
|
|
390
|
+
*/
|
|
391
|
+
function (o) { return !o; })), operators.map((/**
|
|
392
|
+
* @return {?}
|
|
393
|
+
*/
|
|
394
|
+
function () { })));
|
|
337
395
|
},
|
|
338
396
|
enumerable: true,
|
|
339
397
|
configurable: true
|
|
@@ -345,7 +403,14 @@ var MatDrawer = /** @class */ (function () {
|
|
|
345
403
|
* @return {?}
|
|
346
404
|
*/
|
|
347
405
|
function () {
|
|
348
|
-
return this._animationStarted.pipe(operators.filter(
|
|
406
|
+
return this._animationStarted.pipe(operators.filter((/**
|
|
407
|
+
* @param {?} e
|
|
408
|
+
* @return {?}
|
|
409
|
+
*/
|
|
410
|
+
function (e) { return e.fromState !== e.toState && e.toState === 'void'; })), operators.map((/**
|
|
411
|
+
* @return {?}
|
|
412
|
+
*/
|
|
413
|
+
function () { })));
|
|
349
414
|
},
|
|
350
415
|
enumerable: true,
|
|
351
416
|
configurable: true
|
|
@@ -377,13 +442,17 @@ var MatDrawer = /** @class */ (function () {
|
|
|
377
442
|
if (!this.autoFocus) {
|
|
378
443
|
return;
|
|
379
444
|
}
|
|
380
|
-
this._focusTrap.focusInitialElementWhenReady().then(
|
|
445
|
+
this._focusTrap.focusInitialElementWhenReady().then((/**
|
|
446
|
+
* @param {?} hasMovedFocus
|
|
447
|
+
* @return {?}
|
|
448
|
+
*/
|
|
449
|
+
function (hasMovedFocus) {
|
|
381
450
|
// If there were no focusable elements, focus the sidenav itself so the keyboard navigation
|
|
382
451
|
// still works. We need to check that `focus` is a function due to Universal.
|
|
383
452
|
if (!hasMovedFocus && typeof _this._elementRef.nativeElement.focus === 'function') {
|
|
384
453
|
_this._elementRef.nativeElement.focus();
|
|
385
454
|
}
|
|
386
|
-
});
|
|
455
|
+
}));
|
|
387
456
|
};
|
|
388
457
|
/**
|
|
389
458
|
* If focus is currently inside the drawer, restores it to where it was before the drawer
|
|
@@ -546,9 +615,17 @@ var MatDrawer = /** @class */ (function () {
|
|
|
546
615
|
if (this._focusTrap) {
|
|
547
616
|
this._focusTrap.enabled = this._isFocusTrapEnabled;
|
|
548
617
|
}
|
|
549
|
-
return new Promise(
|
|
550
|
-
|
|
551
|
-
|
|
618
|
+
return new Promise((/**
|
|
619
|
+
* @param {?} resolve
|
|
620
|
+
* @return {?}
|
|
621
|
+
*/
|
|
622
|
+
function (resolve) {
|
|
623
|
+
_this.openedChange.pipe(operators.take(1)).subscribe((/**
|
|
624
|
+
* @param {?} open
|
|
625
|
+
* @return {?}
|
|
626
|
+
*/
|
|
627
|
+
function (open) { return resolve(open ? 'open' : 'close'); }));
|
|
628
|
+
}));
|
|
552
629
|
};
|
|
553
630
|
Object.defineProperty(MatDrawer.prototype, "_width", {
|
|
554
631
|
get: /**
|
|
@@ -560,6 +637,60 @@ var MatDrawer = /** @class */ (function () {
|
|
|
560
637
|
enumerable: true,
|
|
561
638
|
configurable: true
|
|
562
639
|
});
|
|
640
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
641
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
642
|
+
// ViewEngine they're overwritte.
|
|
643
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
644
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
645
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
646
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
647
|
+
// ViewEngine they're overwritte.
|
|
648
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
649
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
650
|
+
/**
|
|
651
|
+
* @param {?} event
|
|
652
|
+
* @return {?}
|
|
653
|
+
*/
|
|
654
|
+
MatDrawer.prototype._animationStartListener =
|
|
655
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
656
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
657
|
+
// ViewEngine they're overwritte.
|
|
658
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
659
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
660
|
+
/**
|
|
661
|
+
* @param {?} event
|
|
662
|
+
* @return {?}
|
|
663
|
+
*/
|
|
664
|
+
function (event) {
|
|
665
|
+
this._animationStarted.next(event);
|
|
666
|
+
};
|
|
667
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
668
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
669
|
+
// ViewEngine they're overwritte.
|
|
670
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
671
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
672
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
673
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
674
|
+
// ViewEngine they're overwritte.
|
|
675
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
676
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
677
|
+
/**
|
|
678
|
+
* @param {?} event
|
|
679
|
+
* @return {?}
|
|
680
|
+
*/
|
|
681
|
+
MatDrawer.prototype._animationDoneListener =
|
|
682
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
683
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
684
|
+
// ViewEngine they're overwritte.
|
|
685
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
686
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
687
|
+
/**
|
|
688
|
+
* @param {?} event
|
|
689
|
+
* @return {?}
|
|
690
|
+
*/
|
|
691
|
+
function (event) {
|
|
692
|
+
this._animationEnd.next(event);
|
|
693
|
+
};
|
|
563
694
|
MatDrawer.decorators = [
|
|
564
695
|
{ type: core.Component, args: [{selector: 'mat-drawer',
|
|
565
696
|
exportAs: 'matDrawer',
|
|
@@ -567,9 +698,6 @@ var MatDrawer = /** @class */ (function () {
|
|
|
567
698
|
animations: [matDrawerAnimations.transformDrawer],
|
|
568
699
|
host: {
|
|
569
700
|
'class': 'mat-drawer',
|
|
570
|
-
'[@transform]': '_animationState',
|
|
571
|
-
'(@transform.start)': '_animationStarted.next($event)',
|
|
572
|
-
'(@transform.done)': '_animationEnd.next($event)',
|
|
573
701
|
// must prevent the browser from aligning text based on value
|
|
574
702
|
'[attr.align]': 'null',
|
|
575
703
|
'[class.mat-drawer-end]': 'position === "end"',
|
|
@@ -596,13 +724,16 @@ var MatDrawer = /** @class */ (function () {
|
|
|
596
724
|
mode: [{ type: core.Input }],
|
|
597
725
|
disableClose: [{ type: core.Input }],
|
|
598
726
|
autoFocus: [{ type: core.Input }],
|
|
727
|
+
_animationState: [{ type: core.HostBinding, args: ['@transform',] }],
|
|
599
728
|
openedChange: [{ type: core.Output }],
|
|
600
729
|
_openedStream: [{ type: core.Output, args: ['opened',] }],
|
|
601
730
|
openedStart: [{ type: core.Output }],
|
|
602
731
|
_closedStream: [{ type: core.Output, args: ['closed',] }],
|
|
603
732
|
closedStart: [{ type: core.Output }],
|
|
604
733
|
onPositionChanged: [{ type: core.Output, args: ['positionChanged',] }],
|
|
605
|
-
opened: [{ type: core.Input }]
|
|
734
|
+
opened: [{ type: core.Input }],
|
|
735
|
+
_animationStartListener: [{ type: core.HostListener, args: ['@transform.start', ['$event'],] }],
|
|
736
|
+
_animationDoneListener: [{ type: core.HostListener, args: ['@transform.done', ['$event'],] }]
|
|
606
737
|
};
|
|
607
738
|
return MatDrawer;
|
|
608
739
|
}());
|
|
@@ -613,14 +744,9 @@ var MatDrawer = /** @class */ (function () {
|
|
|
613
744
|
* and coordinates the backdrop and content styling.
|
|
614
745
|
*/
|
|
615
746
|
var MatDrawerContainer = /** @class */ (function () {
|
|
616
|
-
function MatDrawerContainer(_dir, _element, _ngZone, _changeDetectorRef, defaultAutosize, _animationMode
|
|
617
|
-
/**
|
|
618
|
-
* @deprecated viewportRuler to become a required parameter.
|
|
619
|
-
* @breaking-change 8.0.0
|
|
620
|
-
*/
|
|
621
|
-
viewportRuler) {
|
|
622
|
-
if (defaultAutosize === void 0) { defaultAutosize = false; }
|
|
747
|
+
function MatDrawerContainer(_dir, _element, _ngZone, _changeDetectorRef, viewportRuler, defaultAutosize, _animationMode) {
|
|
623
748
|
var _this = this;
|
|
749
|
+
if (defaultAutosize === void 0) { defaultAutosize = false; }
|
|
624
750
|
this._dir = _dir;
|
|
625
751
|
this._element = _element;
|
|
626
752
|
this._ngZone = _ngZone;
|
|
@@ -648,18 +774,22 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
648
774
|
// If a `Dir` directive exists up the tree, listen direction changes
|
|
649
775
|
// and update the left/right properties to point to the proper start/end.
|
|
650
776
|
if (_dir) {
|
|
651
|
-
_dir.change.pipe(operators.takeUntil(this._destroyed)).subscribe(
|
|
777
|
+
_dir.change.pipe(operators.takeUntil(this._destroyed)).subscribe((/**
|
|
778
|
+
* @return {?}
|
|
779
|
+
*/
|
|
780
|
+
function () {
|
|
652
781
|
_this._validateDrawers();
|
|
653
|
-
_this.
|
|
654
|
-
});
|
|
782
|
+
_this.updateContentMargins();
|
|
783
|
+
}));
|
|
655
784
|
}
|
|
656
785
|
// Since the minimum width of the sidenav depends on the viewport width,
|
|
657
786
|
// we need to recompute the margins if the viewport changes.
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
787
|
+
viewportRuler.change()
|
|
788
|
+
.pipe(operators.takeUntil(this._destroyed))
|
|
789
|
+
.subscribe((/**
|
|
790
|
+
* @return {?}
|
|
791
|
+
*/
|
|
792
|
+
function () { return _this.updateContentMargins(); }));
|
|
663
793
|
this._autosize = defaultAutosize;
|
|
664
794
|
}
|
|
665
795
|
Object.defineProperty(MatDrawerContainer.prototype, "start", {
|
|
@@ -757,22 +887,32 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
757
887
|
*/
|
|
758
888
|
function () {
|
|
759
889
|
var _this = this;
|
|
760
|
-
this._drawers.changes.pipe(operators.startWith(null)).subscribe(
|
|
890
|
+
this._drawers.changes.pipe(operators.startWith(null)).subscribe((/**
|
|
891
|
+
* @return {?}
|
|
892
|
+
*/
|
|
893
|
+
function () {
|
|
761
894
|
_this._validateDrawers();
|
|
762
|
-
_this._drawers.forEach(
|
|
895
|
+
_this._drawers.forEach((/**
|
|
896
|
+
* @param {?} drawer
|
|
897
|
+
* @return {?}
|
|
898
|
+
*/
|
|
899
|
+
function (drawer) {
|
|
763
900
|
_this._watchDrawerToggle(drawer);
|
|
764
901
|
_this._watchDrawerPosition(drawer);
|
|
765
902
|
_this._watchDrawerMode(drawer);
|
|
766
|
-
});
|
|
903
|
+
}));
|
|
767
904
|
if (!_this._drawers.length ||
|
|
768
905
|
_this._isDrawerOpen(_this._start) ||
|
|
769
906
|
_this._isDrawerOpen(_this._end)) {
|
|
770
|
-
_this.
|
|
907
|
+
_this.updateContentMargins();
|
|
771
908
|
}
|
|
772
909
|
_this._changeDetectorRef.markForCheck();
|
|
773
|
-
});
|
|
910
|
+
}));
|
|
774
911
|
this._doCheckSubject.pipe(operators.debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps
|
|
775
|
-
operators.takeUntil(this._destroyed)).subscribe(
|
|
912
|
+
operators.takeUntil(this._destroyed)).subscribe((/**
|
|
913
|
+
* @return {?}
|
|
914
|
+
*/
|
|
915
|
+
function () { return _this.updateContentMargins(); }));
|
|
776
916
|
};
|
|
777
917
|
/**
|
|
778
918
|
* @return {?}
|
|
@@ -796,7 +936,11 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
796
936
|
* @return {?}
|
|
797
937
|
*/
|
|
798
938
|
function () {
|
|
799
|
-
this._drawers.forEach(
|
|
939
|
+
this._drawers.forEach((/**
|
|
940
|
+
* @param {?} drawer
|
|
941
|
+
* @return {?}
|
|
942
|
+
*/
|
|
943
|
+
function (drawer) { return drawer.open(); }));
|
|
800
944
|
};
|
|
801
945
|
/** Calls `close` of both start and end drawers */
|
|
802
946
|
/**
|
|
@@ -808,7 +952,75 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
808
952
|
* @return {?}
|
|
809
953
|
*/
|
|
810
954
|
function () {
|
|
811
|
-
this._drawers.forEach(
|
|
955
|
+
this._drawers.forEach((/**
|
|
956
|
+
* @param {?} drawer
|
|
957
|
+
* @return {?}
|
|
958
|
+
*/
|
|
959
|
+
function (drawer) { return drawer.close(); }));
|
|
960
|
+
};
|
|
961
|
+
/**
|
|
962
|
+
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
963
|
+
* sparingly, because it causes a reflow.
|
|
964
|
+
*/
|
|
965
|
+
/**
|
|
966
|
+
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
967
|
+
* sparingly, because it causes a reflow.
|
|
968
|
+
* @return {?}
|
|
969
|
+
*/
|
|
970
|
+
MatDrawerContainer.prototype.updateContentMargins = /**
|
|
971
|
+
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
972
|
+
* sparingly, because it causes a reflow.
|
|
973
|
+
* @return {?}
|
|
974
|
+
*/
|
|
975
|
+
function () {
|
|
976
|
+
var _this = this;
|
|
977
|
+
// 1. For drawers in `over` mode, they don't affect the content.
|
|
978
|
+
// 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
|
|
979
|
+
// left margin (for left drawer) or right margin (for right the drawer).
|
|
980
|
+
// 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
|
|
981
|
+
// adding to the left or right margin and simultaneously subtracting the same amount of
|
|
982
|
+
// margin from the other side.
|
|
983
|
+
/** @type {?} */
|
|
984
|
+
var left = 0;
|
|
985
|
+
/** @type {?} */
|
|
986
|
+
var right = 0;
|
|
987
|
+
if (this._left && this._left.opened) {
|
|
988
|
+
if (this._left.mode == 'side') {
|
|
989
|
+
left += this._left._width;
|
|
990
|
+
}
|
|
991
|
+
else if (this._left.mode == 'push') {
|
|
992
|
+
/** @type {?} */
|
|
993
|
+
var width = this._left._width;
|
|
994
|
+
left += width;
|
|
995
|
+
right -= width;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
if (this._right && this._right.opened) {
|
|
999
|
+
if (this._right.mode == 'side') {
|
|
1000
|
+
right += this._right._width;
|
|
1001
|
+
}
|
|
1002
|
+
else if (this._right.mode == 'push') {
|
|
1003
|
+
/** @type {?} */
|
|
1004
|
+
var width = this._right._width;
|
|
1005
|
+
right += width;
|
|
1006
|
+
left -= width;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
// If either `right` or `left` is zero, don't set a style to the element. This
|
|
1010
|
+
// allows users to specify a custom size via CSS class in SSR scenarios where the
|
|
1011
|
+
// measured widths will always be zero. Note that we reset to `null` here, rather
|
|
1012
|
+
// than below, in order to ensure that the types in the `if` below are consistent.
|
|
1013
|
+
left = left || (/** @type {?} */ (null));
|
|
1014
|
+
right = right || (/** @type {?} */ (null));
|
|
1015
|
+
if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
|
|
1016
|
+
this._contentMargins = { left: left, right: right };
|
|
1017
|
+
// Pull back into the NgZone since in some cases we could be outside. We need to be careful
|
|
1018
|
+
// to do it only when something changed, otherwise we can end up hitting the zone too often.
|
|
1019
|
+
this._ngZone.run((/**
|
|
1020
|
+
* @return {?}
|
|
1021
|
+
*/
|
|
1022
|
+
function () { return _this._contentMarginChanges.next(_this._contentMargins); }));
|
|
1023
|
+
}
|
|
812
1024
|
};
|
|
813
1025
|
/**
|
|
814
1026
|
* @return {?}
|
|
@@ -821,7 +1033,10 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
821
1033
|
// If users opted into autosizing, do a check every change detection cycle.
|
|
822
1034
|
if (this._autosize && this._isPushed()) {
|
|
823
1035
|
// Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop.
|
|
824
|
-
this._ngZone.runOutsideAngular(
|
|
1036
|
+
this._ngZone.runOutsideAngular((/**
|
|
1037
|
+
* @return {?}
|
|
1038
|
+
*/
|
|
1039
|
+
function () { return _this._doCheckSubject.next(); }));
|
|
825
1040
|
}
|
|
826
1041
|
};
|
|
827
1042
|
/**
|
|
@@ -847,20 +1062,31 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
847
1062
|
*/
|
|
848
1063
|
function (drawer) {
|
|
849
1064
|
var _this = this;
|
|
850
|
-
drawer._animationStarted.pipe(operators.filter(
|
|
851
|
-
|
|
1065
|
+
drawer._animationStarted.pipe(operators.filter((/**
|
|
1066
|
+
* @param {?} event
|
|
1067
|
+
* @return {?}
|
|
1068
|
+
*/
|
|
1069
|
+
function (event) { return event.fromState !== event.toState; })), operators.takeUntil(this._drawers.changes))
|
|
1070
|
+
.subscribe((/**
|
|
1071
|
+
* @param {?} event
|
|
1072
|
+
* @return {?}
|
|
1073
|
+
*/
|
|
1074
|
+
function (event) {
|
|
852
1075
|
// Set the transition class on the container so that the animations occur. This should not
|
|
853
1076
|
// be set initially because animations should only be triggered via a change in state.
|
|
854
1077
|
if (event.toState !== 'open-instant' && _this._animationMode !== 'NoopAnimations') {
|
|
855
1078
|
_this._element.nativeElement.classList.add('mat-drawer-transition');
|
|
856
1079
|
}
|
|
857
|
-
_this.
|
|
1080
|
+
_this.updateContentMargins();
|
|
858
1081
|
_this._changeDetectorRef.markForCheck();
|
|
859
|
-
});
|
|
1082
|
+
}));
|
|
860
1083
|
if (drawer.mode !== 'side') {
|
|
861
|
-
drawer.openedChange.pipe(operators.takeUntil(this._drawers.changes)).subscribe(
|
|
1084
|
+
drawer.openedChange.pipe(operators.takeUntil(this._drawers.changes)).subscribe((/**
|
|
1085
|
+
* @return {?}
|
|
1086
|
+
*/
|
|
1087
|
+
function () {
|
|
862
1088
|
return _this._setContainerClass(drawer.opened);
|
|
863
|
-
});
|
|
1089
|
+
}));
|
|
864
1090
|
}
|
|
865
1091
|
};
|
|
866
1092
|
/**
|
|
@@ -888,11 +1114,17 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
888
1114
|
}
|
|
889
1115
|
// NOTE: We need to wait for the microtask queue to be empty before validating,
|
|
890
1116
|
// since both drawers may be swapping positions at the same time.
|
|
891
|
-
drawer.onPositionChanged.pipe(operators.takeUntil(this._drawers.changes)).subscribe(
|
|
892
|
-
|
|
1117
|
+
drawer.onPositionChanged.pipe(operators.takeUntil(this._drawers.changes)).subscribe((/**
|
|
1118
|
+
* @return {?}
|
|
1119
|
+
*/
|
|
1120
|
+
function () {
|
|
1121
|
+
_this._ngZone.onMicrotaskEmpty.asObservable().pipe(operators.take(1)).subscribe((/**
|
|
1122
|
+
* @return {?}
|
|
1123
|
+
*/
|
|
1124
|
+
function () {
|
|
893
1125
|
_this._validateDrawers();
|
|
894
|
-
});
|
|
895
|
-
});
|
|
1126
|
+
}));
|
|
1127
|
+
}));
|
|
896
1128
|
};
|
|
897
1129
|
/** Subscribes to changes in drawer mode so we can run change detection. */
|
|
898
1130
|
/**
|
|
@@ -911,10 +1143,13 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
911
1143
|
var _this = this;
|
|
912
1144
|
if (drawer) {
|
|
913
1145
|
drawer._modeChanged.pipe(operators.takeUntil(rxjs.merge(this._drawers.changes, this._destroyed)))
|
|
914
|
-
.subscribe(
|
|
915
|
-
|
|
1146
|
+
.subscribe((/**
|
|
1147
|
+
* @return {?}
|
|
1148
|
+
*/
|
|
1149
|
+
function () {
|
|
1150
|
+
_this.updateContentMargins();
|
|
916
1151
|
_this._changeDetectorRef.markForCheck();
|
|
917
|
-
});
|
|
1152
|
+
}));
|
|
918
1153
|
}
|
|
919
1154
|
};
|
|
920
1155
|
/** Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element. */
|
|
@@ -953,7 +1188,11 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
953
1188
|
var _this = this;
|
|
954
1189
|
this._start = this._end = null;
|
|
955
1190
|
// Ensure that we have at most one start and one end drawer.
|
|
956
|
-
this._drawers.forEach(
|
|
1191
|
+
this._drawers.forEach((/**
|
|
1192
|
+
* @param {?} drawer
|
|
1193
|
+
* @return {?}
|
|
1194
|
+
*/
|
|
1195
|
+
function (drawer) {
|
|
957
1196
|
if (drawer.position == 'end') {
|
|
958
1197
|
if (_this._end != null) {
|
|
959
1198
|
throwMatDuplicatedDrawerError('end');
|
|
@@ -966,7 +1205,7 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
966
1205
|
}
|
|
967
1206
|
_this._start = drawer;
|
|
968
1207
|
}
|
|
969
|
-
});
|
|
1208
|
+
}));
|
|
970
1209
|
this._right = this._left = null;
|
|
971
1210
|
// Detect if we're LTR or RTL.
|
|
972
1211
|
if (this._dir && this._dir.value === 'rtl') {
|
|
@@ -1013,8 +1252,16 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
1013
1252
|
var _this = this;
|
|
1014
1253
|
// Close all open drawers where closing is not disabled and the mode is not `side`.
|
|
1015
1254
|
[this._start, this._end]
|
|
1016
|
-
.filter(
|
|
1017
|
-
|
|
1255
|
+
.filter((/**
|
|
1256
|
+
* @param {?} drawer
|
|
1257
|
+
* @return {?}
|
|
1258
|
+
*/
|
|
1259
|
+
function (drawer) { return drawer && !drawer.disableClose && _this._canHaveBackdrop(drawer); }))
|
|
1260
|
+
.forEach((/**
|
|
1261
|
+
* @param {?} drawer
|
|
1262
|
+
* @return {?}
|
|
1263
|
+
*/
|
|
1264
|
+
function (drawer) { return (/** @type {?} */ (drawer)).close(); }));
|
|
1018
1265
|
};
|
|
1019
1266
|
/**
|
|
1020
1267
|
* @return {?}
|
|
@@ -1052,75 +1299,6 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
1052
1299
|
function (drawer) {
|
|
1053
1300
|
return drawer != null && drawer.opened;
|
|
1054
1301
|
};
|
|
1055
|
-
/**
|
|
1056
|
-
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
1057
|
-
* sparingly, because it causes a reflow.
|
|
1058
|
-
*/
|
|
1059
|
-
/**
|
|
1060
|
-
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
1061
|
-
* sparingly, because it causes a reflow.
|
|
1062
|
-
* @private
|
|
1063
|
-
* @return {?}
|
|
1064
|
-
*/
|
|
1065
|
-
MatDrawerContainer.prototype._updateContentMargins = /**
|
|
1066
|
-
* Recalculates and updates the inline styles for the content. Note that this should be used
|
|
1067
|
-
* sparingly, because it causes a reflow.
|
|
1068
|
-
* @private
|
|
1069
|
-
* @return {?}
|
|
1070
|
-
*/
|
|
1071
|
-
function () {
|
|
1072
|
-
// 1. For drawers in `over` mode, they don't affect the content.
|
|
1073
|
-
// 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
|
|
1074
|
-
// left margin (for left drawer) or right margin (for right the drawer).
|
|
1075
|
-
// 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
|
|
1076
|
-
// adding to the left or right margin and simultaneously subtracting the same amount of
|
|
1077
|
-
// margin from the other side.
|
|
1078
|
-
var _this = this;
|
|
1079
|
-
// 1. For drawers in `over` mode, they don't affect the content.
|
|
1080
|
-
// 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
|
|
1081
|
-
// left margin (for left drawer) or right margin (for right the drawer).
|
|
1082
|
-
// 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
|
|
1083
|
-
// adding to the left or right margin and simultaneously subtracting the same amount of
|
|
1084
|
-
// margin from the other side.
|
|
1085
|
-
/** @type {?} */
|
|
1086
|
-
var left = 0;
|
|
1087
|
-
/** @type {?} */
|
|
1088
|
-
var right = 0;
|
|
1089
|
-
if (this._left && this._left.opened) {
|
|
1090
|
-
if (this._left.mode == 'side') {
|
|
1091
|
-
left += this._left._width;
|
|
1092
|
-
}
|
|
1093
|
-
else if (this._left.mode == 'push') {
|
|
1094
|
-
/** @type {?} */
|
|
1095
|
-
var width = this._left._width;
|
|
1096
|
-
left += width;
|
|
1097
|
-
right -= width;
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
if (this._right && this._right.opened) {
|
|
1101
|
-
if (this._right.mode == 'side') {
|
|
1102
|
-
right += this._right._width;
|
|
1103
|
-
}
|
|
1104
|
-
else if (this._right.mode == 'push') {
|
|
1105
|
-
/** @type {?} */
|
|
1106
|
-
var width = this._right._width;
|
|
1107
|
-
right += width;
|
|
1108
|
-
left -= width;
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
// If either `right` or `left` is zero, don't set a style to the element. This
|
|
1112
|
-
// allows users to specify a custom size via CSS class in SSR scenarios where the
|
|
1113
|
-
// measured widths will always be zero. Note that we reset to `null` here, rather
|
|
1114
|
-
// than below, in order to ensure that the types in the `if` below are consistent.
|
|
1115
|
-
left = left || (/** @type {?} */ (null));
|
|
1116
|
-
right = right || (/** @type {?} */ (null));
|
|
1117
|
-
if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
|
|
1118
|
-
this._contentMargins = { left: left, right: right };
|
|
1119
|
-
// Pull back into the NgZone since in some cases we could be outside. We need to be careful
|
|
1120
|
-
// to do it only when something changed, otherwise we can end up hitting the zone too often.
|
|
1121
|
-
this._ngZone.run(function () { return _this._contentMarginChanges.next(_this._contentMargins); });
|
|
1122
|
-
}
|
|
1123
|
-
};
|
|
1124
1302
|
MatDrawerContainer.decorators = [
|
|
1125
1303
|
{ type: core.Component, args: [{selector: 'mat-drawer-container',
|
|
1126
1304
|
exportAs: 'matDrawerContainer',
|
|
@@ -1140,9 +1318,9 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
1140
1318
|
{ type: core.ElementRef },
|
|
1141
1319
|
{ type: core.NgZone },
|
|
1142
1320
|
{ type: core.ChangeDetectorRef },
|
|
1321
|
+
{ type: scrolling.ViewportRuler },
|
|
1143
1322
|
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_DRAWER_DEFAULT_AUTOSIZE,] }] },
|
|
1144
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations$1.ANIMATION_MODULE_TYPE,] }] }
|
|
1145
|
-
{ type: scrolling.ViewportRuler, decorators: [{ type: core.Optional }] }
|
|
1323
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations$1.ANIMATION_MODULE_TYPE,] }] }
|
|
1146
1324
|
]; };
|
|
1147
1325
|
MatDrawerContainer.propDecorators = {
|
|
1148
1326
|
_drawers: [{ type: core.ContentChildren, args: [MatDrawer,] }],
|
|
@@ -1157,7 +1335,7 @@ var MatDrawerContainer = /** @class */ (function () {
|
|
|
1157
1335
|
|
|
1158
1336
|
/**
|
|
1159
1337
|
* @fileoverview added by tsickle
|
|
1160
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1338
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1161
1339
|
*/
|
|
1162
1340
|
var MatSidenavContent = /** @class */ (function (_super) {
|
|
1163
1341
|
__extends(MatSidenavContent, _super);
|
|
@@ -1179,7 +1357,10 @@ var MatSidenavContent = /** @class */ (function (_super) {
|
|
|
1179
1357
|
/** @nocollapse */
|
|
1180
1358
|
MatSidenavContent.ctorParameters = function () { return [
|
|
1181
1359
|
{ type: core.ChangeDetectorRef },
|
|
1182
|
-
{ type: MatSidenavContainer, decorators: [{ type: core.Inject, args: [core.forwardRef(
|
|
1360
|
+
{ type: MatSidenavContainer, decorators: [{ type: core.Inject, args: [core.forwardRef((/**
|
|
1361
|
+
* @return {?}
|
|
1362
|
+
*/
|
|
1363
|
+
function () { return MatSidenavContainer; })),] }] },
|
|
1183
1364
|
{ type: core.ElementRef },
|
|
1184
1365
|
{ type: scrolling.ScrollDispatcher },
|
|
1185
1366
|
{ type: core.NgZone }
|
|
@@ -1256,9 +1437,6 @@ var MatSidenav = /** @class */ (function (_super) {
|
|
|
1256
1437
|
host: {
|
|
1257
1438
|
'class': 'mat-drawer mat-sidenav',
|
|
1258
1439
|
'tabIndex': '-1',
|
|
1259
|
-
'[@transform]': '_animationState',
|
|
1260
|
-
'(@transform.start)': '_animationStarted.next($event)',
|
|
1261
|
-
'(@transform.done)': '_animationEnd.next($event)',
|
|
1262
1440
|
// must prevent the browser from aligning text based on value
|
|
1263
1441
|
'[attr.align]': 'null',
|
|
1264
1442
|
'[class.mat-drawer-end]': 'position === "end"',
|
|
@@ -1307,7 +1485,7 @@ var MatSidenavContainer = /** @class */ (function (_super) {
|
|
|
1307
1485
|
|
|
1308
1486
|
/**
|
|
1309
1487
|
* @fileoverview added by tsickle
|
|
1310
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1488
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1311
1489
|
*/
|
|
1312
1490
|
var MatSidenavModule = /** @class */ (function () {
|
|
1313
1491
|
function MatSidenavModule() {
|