@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/menu.es5.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { trigger, state, style, animate, transition, query, group } from '@angular/animations';
|
|
9
|
+
import { Directive, TemplateRef, ComponentFactoryResolver, ApplicationRef, Injector, ViewContainerRef, Inject, InjectionToken, ChangeDetectionStrategy, Component, ElementRef, ViewEncapsulation, Optional, Input, HostListener, ContentChild, ContentChildren, EventEmitter, NgZone, Output, ViewChild, Self, NgModule } from '@angular/core';
|
|
9
10
|
import { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
|
|
10
11
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
11
12
|
import { Subject, merge, Subscription, asapScheduler, of } from 'rxjs';
|
|
12
|
-
import { trigger, state, style, animate, transition, query, group } from '@angular/animations';
|
|
13
13
|
import { __extends } from 'tslib';
|
|
14
14
|
import { FocusMonitor, FocusKeyManager, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';
|
|
15
15
|
import { mixinDisabled, mixinDisableRipple, MatCommonModule, MatRippleModule } from '@angular/material/core';
|
|
@@ -22,7 +22,69 @@ import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
|
|
|
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
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Animations used by the mat-menu component.
|
|
29
|
+
* Animation duration and timing values are based on:
|
|
30
|
+
* https://material.io/guidelines/components/menus.html#menus-usage
|
|
31
|
+
* \@docs-private
|
|
32
|
+
* @type {?}
|
|
33
|
+
*/
|
|
34
|
+
var matMenuAnimations = {
|
|
35
|
+
/**
|
|
36
|
+
* This animation controls the menu panel's entry and exit from the page.
|
|
37
|
+
*
|
|
38
|
+
* When the menu panel is added to the DOM, it scales in and fades in its border.
|
|
39
|
+
*
|
|
40
|
+
* When the menu panel is removed from the DOM, it simply fades out after a brief
|
|
41
|
+
* delay to display the ripple.
|
|
42
|
+
*/
|
|
43
|
+
transformMenu: trigger('transformMenu', [
|
|
44
|
+
state('void', style({
|
|
45
|
+
opacity: 0,
|
|
46
|
+
transform: 'scale(0.8)'
|
|
47
|
+
})),
|
|
48
|
+
transition('void => enter', group([
|
|
49
|
+
query('.mat-menu-content, .mat-mdc-menu-content', animate('100ms linear', style({
|
|
50
|
+
opacity: 1
|
|
51
|
+
}))),
|
|
52
|
+
animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scale(1)' })),
|
|
53
|
+
])),
|
|
54
|
+
transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 })))
|
|
55
|
+
]),
|
|
56
|
+
/**
|
|
57
|
+
* This animation fades in the background color and content of the menu panel
|
|
58
|
+
* after its containing element is scaled in.
|
|
59
|
+
*/
|
|
60
|
+
fadeInItems: trigger('fadeInItems', [
|
|
61
|
+
// TODO(crisbeto): this is inside the `transformMenu`
|
|
62
|
+
// now. Remove next time we do breaking changes.
|
|
63
|
+
state('showing', style({ opacity: 1 })),
|
|
64
|
+
transition('void => *', [
|
|
65
|
+
style({ opacity: 0 }),
|
|
66
|
+
animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')
|
|
67
|
+
])
|
|
68
|
+
])
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated
|
|
72
|
+
* \@breaking-change 8.0.0
|
|
73
|
+
* \@docs-private
|
|
74
|
+
* @type {?}
|
|
75
|
+
*/
|
|
76
|
+
var fadeInItems = matMenuAnimations.fadeInItems;
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated
|
|
79
|
+
* \@breaking-change 8.0.0
|
|
80
|
+
* \@docs-private
|
|
81
|
+
* @type {?}
|
|
82
|
+
*/
|
|
83
|
+
var transformMenu = matMenuAnimations.transformMenu;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @fileoverview added by tsickle
|
|
87
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
26
88
|
*/
|
|
27
89
|
/**
|
|
28
90
|
* Menu content that will be rendered lazily once the menu is opened.
|
|
@@ -123,67 +185,7 @@ var MatMenuContent = /** @class */ (function () {
|
|
|
123
185
|
|
|
124
186
|
/**
|
|
125
187
|
* @fileoverview added by tsickle
|
|
126
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
127
|
-
*/
|
|
128
|
-
/**
|
|
129
|
-
* Animations used by the mat-menu component.
|
|
130
|
-
* Animation duration and timing values are based on:
|
|
131
|
-
* https://material.io/guidelines/components/menus.html#menus-usage
|
|
132
|
-
* \@docs-private
|
|
133
|
-
* @type {?}
|
|
134
|
-
*/
|
|
135
|
-
var matMenuAnimations = {
|
|
136
|
-
/**
|
|
137
|
-
* This animation controls the menu panel's entry and exit from the page.
|
|
138
|
-
*
|
|
139
|
-
* When the menu panel is added to the DOM, it scales in and fades in its border.
|
|
140
|
-
*
|
|
141
|
-
* When the menu panel is removed from the DOM, it simply fades out after a brief
|
|
142
|
-
* delay to display the ripple.
|
|
143
|
-
*/
|
|
144
|
-
transformMenu: trigger('transformMenu', [
|
|
145
|
-
state('void', style({
|
|
146
|
-
opacity: 0,
|
|
147
|
-
transform: 'scale(0.8)'
|
|
148
|
-
})),
|
|
149
|
-
transition('void => enter', group([
|
|
150
|
-
query('.mat-menu-content', animate('100ms linear', style({ opacity: 1 }))),
|
|
151
|
-
animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scale(1)' })),
|
|
152
|
-
])),
|
|
153
|
-
transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 })))
|
|
154
|
-
]),
|
|
155
|
-
/**
|
|
156
|
-
* This animation fades in the background color and content of the menu panel
|
|
157
|
-
* after its containing element is scaled in.
|
|
158
|
-
*/
|
|
159
|
-
fadeInItems: trigger('fadeInItems', [
|
|
160
|
-
// TODO(crisbeto): this is inside the `transformMenu`
|
|
161
|
-
// now. Remove next time we do breaking changes.
|
|
162
|
-
state('showing', style({ opacity: 1 })),
|
|
163
|
-
transition('void => *', [
|
|
164
|
-
style({ opacity: 0 }),
|
|
165
|
-
animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')
|
|
166
|
-
])
|
|
167
|
-
])
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* @deprecated
|
|
171
|
-
* \@breaking-change 8.0.0
|
|
172
|
-
* \@docs-private
|
|
173
|
-
* @type {?}
|
|
174
|
-
*/
|
|
175
|
-
var fadeInItems = matMenuAnimations.fadeInItems;
|
|
176
|
-
/**
|
|
177
|
-
* @deprecated
|
|
178
|
-
* \@breaking-change 8.0.0
|
|
179
|
-
* \@docs-private
|
|
180
|
-
* @type {?}
|
|
181
|
-
*/
|
|
182
|
-
var transformMenu = matMenuAnimations.transformMenu;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* @fileoverview added by tsickle
|
|
186
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
188
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
187
189
|
*/
|
|
188
190
|
|
|
189
191
|
/**
|
|
@@ -215,7 +217,7 @@ function throwMatMenuInvalidPositionY() {
|
|
|
215
217
|
|
|
216
218
|
/**
|
|
217
219
|
* @fileoverview added by tsickle
|
|
218
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
220
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
219
221
|
*/
|
|
220
222
|
/**
|
|
221
223
|
* Injection token used to provide the parent menu to menu-specific components.
|
|
@@ -226,13 +228,13 @@ var MAT_MENU_PANEL = new InjectionToken('MAT_MENU_PANEL');
|
|
|
226
228
|
|
|
227
229
|
/**
|
|
228
230
|
* @fileoverview added by tsickle
|
|
229
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
231
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
230
232
|
*/
|
|
231
233
|
// Boilerplate for applying mixins to MatMenuItem.
|
|
232
234
|
/**
|
|
233
235
|
* \@docs-private
|
|
234
236
|
*/
|
|
235
|
-
var
|
|
237
|
+
var
|
|
236
238
|
// Boilerplate for applying mixins to MatMenuItem.
|
|
237
239
|
/**
|
|
238
240
|
* \@docs-private
|
|
@@ -345,16 +347,31 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
345
347
|
return this._elementRef.nativeElement;
|
|
346
348
|
};
|
|
347
349
|
/** Prevents the default element actions if it is disabled. */
|
|
350
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
351
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
352
|
+
// ViewEngine they're overwritte.
|
|
353
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
354
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
348
355
|
/**
|
|
349
356
|
* Prevents the default element actions if it is disabled.
|
|
350
357
|
* @param {?} event
|
|
351
358
|
* @return {?}
|
|
352
359
|
*/
|
|
360
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
361
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
362
|
+
// ViewEngine they're overwritte.
|
|
363
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
364
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
353
365
|
MatMenuItem.prototype._checkDisabled = /**
|
|
354
366
|
* Prevents the default element actions if it is disabled.
|
|
355
367
|
* @param {?} event
|
|
356
368
|
* @return {?}
|
|
357
369
|
*/
|
|
370
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
371
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
372
|
+
// ViewEngine they're overwritte.
|
|
373
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
374
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
358
375
|
function (event) {
|
|
359
376
|
if (this.disabled) {
|
|
360
377
|
event.preventDefault();
|
|
@@ -362,14 +379,29 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
362
379
|
}
|
|
363
380
|
};
|
|
364
381
|
/** Emits to the hover stream. */
|
|
382
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
383
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
384
|
+
// ViewEngine they're overwritte.
|
|
385
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
386
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
365
387
|
/**
|
|
366
388
|
* Emits to the hover stream.
|
|
367
389
|
* @return {?}
|
|
368
390
|
*/
|
|
391
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
392
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
393
|
+
// ViewEngine they're overwritte.
|
|
394
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
395
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
369
396
|
MatMenuItem.prototype._handleMouseEnter = /**
|
|
370
397
|
* Emits to the hover stream.
|
|
371
398
|
* @return {?}
|
|
372
399
|
*/
|
|
400
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
401
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
402
|
+
// ViewEngine they're overwritte.
|
|
403
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
404
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
373
405
|
function () {
|
|
374
406
|
this._hovered.next(this);
|
|
375
407
|
};
|
|
@@ -415,8 +447,6 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
415
447
|
'[attr.tabindex]': '_getTabIndex()',
|
|
416
448
|
'[attr.aria-disabled]': 'disabled.toString()',
|
|
417
449
|
'[attr.disabled]': 'disabled || null',
|
|
418
|
-
'(click)': '_checkDisabled($event)',
|
|
419
|
-
'(mouseenter)': '_handleMouseEnter()',
|
|
420
450
|
},
|
|
421
451
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
422
452
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -431,14 +461,16 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
431
461
|
{ type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_PANEL,] }, { type: Optional }] }
|
|
432
462
|
]; };
|
|
433
463
|
MatMenuItem.propDecorators = {
|
|
434
|
-
role: [{ type: Input }]
|
|
464
|
+
role: [{ type: Input }],
|
|
465
|
+
_checkDisabled: [{ type: HostListener, args: ['click', ['$event'],] }],
|
|
466
|
+
_handleMouseEnter: [{ type: HostListener, args: ['mouseenter',] }]
|
|
435
467
|
};
|
|
436
468
|
return MatMenuItem;
|
|
437
469
|
}(_MatMenuItemMixinBase));
|
|
438
470
|
|
|
439
471
|
/**
|
|
440
472
|
* @fileoverview added by tsickle
|
|
441
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
473
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
442
474
|
*/
|
|
443
475
|
/**
|
|
444
476
|
* Injection token to be used to override the default options for `mat-menu`.
|
|
@@ -466,8 +498,12 @@ function MAT_MENU_DEFAULT_OPTIONS_FACTORY() {
|
|
|
466
498
|
* @type {?}
|
|
467
499
|
*/
|
|
468
500
|
var MAT_MENU_BASE_ELEVATION = 4;
|
|
469
|
-
|
|
470
|
-
|
|
501
|
+
/**
|
|
502
|
+
* Base class with all of the `MatMenu` functionality.
|
|
503
|
+
*/
|
|
504
|
+
// tslint:disable-next-line:class-name
|
|
505
|
+
var _MatMenuBase = /** @class */ (function () {
|
|
506
|
+
function _MatMenuBase(_elementRef, _ngZone, _defaultOptions) {
|
|
471
507
|
this._elementRef = _elementRef;
|
|
472
508
|
this._ngZone = _ngZone;
|
|
473
509
|
this._defaultOptions = _defaultOptions;
|
|
@@ -514,7 +550,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
514
550
|
*/
|
|
515
551
|
this.close = this.closed;
|
|
516
552
|
}
|
|
517
|
-
Object.defineProperty(
|
|
553
|
+
Object.defineProperty(_MatMenuBase.prototype, "xPosition", {
|
|
518
554
|
/** Position of the menu in the X axis. */
|
|
519
555
|
get: /**
|
|
520
556
|
* Position of the menu in the X axis.
|
|
@@ -535,7 +571,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
535
571
|
enumerable: true,
|
|
536
572
|
configurable: true
|
|
537
573
|
});
|
|
538
|
-
Object.defineProperty(
|
|
574
|
+
Object.defineProperty(_MatMenuBase.prototype, "yPosition", {
|
|
539
575
|
/** Position of the menu in the Y axis. */
|
|
540
576
|
get: /**
|
|
541
577
|
* Position of the menu in the Y axis.
|
|
@@ -556,7 +592,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
556
592
|
enumerable: true,
|
|
557
593
|
configurable: true
|
|
558
594
|
});
|
|
559
|
-
Object.defineProperty(
|
|
595
|
+
Object.defineProperty(_MatMenuBase.prototype, "overlapTrigger", {
|
|
560
596
|
/** Whether the menu should overlap its trigger. */
|
|
561
597
|
get: /**
|
|
562
598
|
* Whether the menu should overlap its trigger.
|
|
@@ -573,7 +609,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
573
609
|
enumerable: true,
|
|
574
610
|
configurable: true
|
|
575
611
|
});
|
|
576
|
-
Object.defineProperty(
|
|
612
|
+
Object.defineProperty(_MatMenuBase.prototype, "hasBackdrop", {
|
|
577
613
|
/** Whether the menu has a backdrop. */
|
|
578
614
|
get: /**
|
|
579
615
|
* Whether the menu has a backdrop.
|
|
@@ -590,7 +626,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
590
626
|
enumerable: true,
|
|
591
627
|
configurable: true
|
|
592
628
|
});
|
|
593
|
-
Object.defineProperty(
|
|
629
|
+
Object.defineProperty(_MatMenuBase.prototype, "panelClass", {
|
|
594
630
|
/**
|
|
595
631
|
* This method takes classes set on the host mat-menu element and applies them on the
|
|
596
632
|
* menu template that displays in the overlay container. Otherwise, it's difficult
|
|
@@ -609,22 +645,30 @@ var MatMenu = /** @class */ (function () {
|
|
|
609
645
|
/** @type {?} */
|
|
610
646
|
var previousPanelClass = this._previousPanelClass;
|
|
611
647
|
if (previousPanelClass && previousPanelClass.length) {
|
|
612
|
-
previousPanelClass.split(' ').forEach(
|
|
648
|
+
previousPanelClass.split(' ').forEach((/**
|
|
649
|
+
* @param {?} className
|
|
650
|
+
* @return {?}
|
|
651
|
+
*/
|
|
652
|
+
function (className) {
|
|
613
653
|
_this._classList[className] = false;
|
|
614
|
-
});
|
|
654
|
+
}));
|
|
615
655
|
}
|
|
616
656
|
this._previousPanelClass = classes;
|
|
617
657
|
if (classes && classes.length) {
|
|
618
|
-
classes.split(' ').forEach(
|
|
658
|
+
classes.split(' ').forEach((/**
|
|
659
|
+
* @param {?} className
|
|
660
|
+
* @return {?}
|
|
661
|
+
*/
|
|
662
|
+
function (className) {
|
|
619
663
|
_this._classList[className] = true;
|
|
620
|
-
});
|
|
664
|
+
}));
|
|
621
665
|
this._elementRef.nativeElement.className = '';
|
|
622
666
|
}
|
|
623
667
|
},
|
|
624
668
|
enumerable: true,
|
|
625
669
|
configurable: true
|
|
626
670
|
});
|
|
627
|
-
Object.defineProperty(
|
|
671
|
+
Object.defineProperty(_MatMenuBase.prototype, "classList", {
|
|
628
672
|
/**
|
|
629
673
|
* This method takes classes set on the host mat-menu element and applies them on the
|
|
630
674
|
* menu template that displays in the overlay container. Otherwise, it's difficult
|
|
@@ -652,7 +696,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
652
696
|
/**
|
|
653
697
|
* @return {?}
|
|
654
698
|
*/
|
|
655
|
-
|
|
699
|
+
_MatMenuBase.prototype.ngOnInit = /**
|
|
656
700
|
* @return {?}
|
|
657
701
|
*/
|
|
658
702
|
function () {
|
|
@@ -661,18 +705,21 @@ var MatMenu = /** @class */ (function () {
|
|
|
661
705
|
/**
|
|
662
706
|
* @return {?}
|
|
663
707
|
*/
|
|
664
|
-
|
|
708
|
+
_MatMenuBase.prototype.ngAfterContentInit = /**
|
|
665
709
|
* @return {?}
|
|
666
710
|
*/
|
|
667
711
|
function () {
|
|
668
712
|
var _this = this;
|
|
669
713
|
this._keyManager = new FocusKeyManager(this._items).withWrap().withTypeAhead();
|
|
670
|
-
this._tabSubscription = this._keyManager.tabOut.subscribe(
|
|
714
|
+
this._tabSubscription = this._keyManager.tabOut.subscribe((/**
|
|
715
|
+
* @return {?}
|
|
716
|
+
*/
|
|
717
|
+
function () { return _this.closed.emit('tab'); }));
|
|
671
718
|
};
|
|
672
719
|
/**
|
|
673
720
|
* @return {?}
|
|
674
721
|
*/
|
|
675
|
-
|
|
722
|
+
_MatMenuBase.prototype.ngOnDestroy = /**
|
|
676
723
|
* @return {?}
|
|
677
724
|
*/
|
|
678
725
|
function () {
|
|
@@ -684,12 +731,20 @@ var MatMenu = /** @class */ (function () {
|
|
|
684
731
|
* Stream that emits whenever the hovered menu item changes.
|
|
685
732
|
* @return {?}
|
|
686
733
|
*/
|
|
687
|
-
|
|
734
|
+
_MatMenuBase.prototype._hovered = /**
|
|
688
735
|
* Stream that emits whenever the hovered menu item changes.
|
|
689
736
|
* @return {?}
|
|
690
737
|
*/
|
|
691
738
|
function () {
|
|
692
|
-
return this._itemChanges.pipe(startWith(this._items), switchMap(
|
|
739
|
+
return this._itemChanges.pipe(startWith(this._items), switchMap((/**
|
|
740
|
+
* @param {?} items
|
|
741
|
+
* @return {?}
|
|
742
|
+
*/
|
|
743
|
+
function (items) { return merge.apply(void 0, items.map((/**
|
|
744
|
+
* @param {?} item
|
|
745
|
+
* @return {?}
|
|
746
|
+
*/
|
|
747
|
+
function (item) { return item._hovered; }))); })));
|
|
693
748
|
};
|
|
694
749
|
/** Handle a keyboard event from the menu, delegating to the appropriate action. */
|
|
695
750
|
/**
|
|
@@ -697,7 +752,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
697
752
|
* @param {?} event
|
|
698
753
|
* @return {?}
|
|
699
754
|
*/
|
|
700
|
-
|
|
755
|
+
_MatMenuBase.prototype._handleKeydown = /**
|
|
701
756
|
* Handle a keyboard event from the menu, delegating to the appropriate action.
|
|
702
757
|
* @param {?} event
|
|
703
758
|
* @return {?}
|
|
@@ -744,7 +799,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
744
799
|
* @param {?=} origin Action from which the focus originated. Used to set the correct styling.
|
|
745
800
|
* @return {?}
|
|
746
801
|
*/
|
|
747
|
-
|
|
802
|
+
_MatMenuBase.prototype.focusFirstItem = /**
|
|
748
803
|
* Focus the first item in the menu.
|
|
749
804
|
* @param {?=} origin Action from which the focus originated. Used to set the correct styling.
|
|
750
805
|
* @return {?}
|
|
@@ -756,7 +811,10 @@ var MatMenu = /** @class */ (function () {
|
|
|
756
811
|
if (this.lazyContent) {
|
|
757
812
|
this._ngZone.onStable.asObservable()
|
|
758
813
|
.pipe(take(1))
|
|
759
|
-
.subscribe(
|
|
814
|
+
.subscribe((/**
|
|
815
|
+
* @return {?}
|
|
816
|
+
*/
|
|
817
|
+
function () { return _this._keyManager.setFocusOrigin(origin).setFirstItemActive(); }));
|
|
760
818
|
}
|
|
761
819
|
else {
|
|
762
820
|
this._keyManager.setFocusOrigin(origin).setFirstItemActive();
|
|
@@ -771,7 +829,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
771
829
|
* the user to start from the first option when pressing the down arrow.
|
|
772
830
|
* @return {?}
|
|
773
831
|
*/
|
|
774
|
-
|
|
832
|
+
_MatMenuBase.prototype.resetActiveItem = /**
|
|
775
833
|
* Resets the active item in the menu. This is used when the menu is opened, allowing
|
|
776
834
|
* the user to start from the first option when pressing the down arrow.
|
|
777
835
|
* @return {?}
|
|
@@ -788,7 +846,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
788
846
|
* @param {?} depth Number of parent menus that come before the menu.
|
|
789
847
|
* @return {?}
|
|
790
848
|
*/
|
|
791
|
-
|
|
849
|
+
_MatMenuBase.prototype.setElevation = /**
|
|
792
850
|
* Sets the menu panel elevation.
|
|
793
851
|
* @param {?} depth Number of parent menus that come before the menu.
|
|
794
852
|
* @return {?}
|
|
@@ -798,7 +856,11 @@ var MatMenu = /** @class */ (function () {
|
|
|
798
856
|
/** @type {?} */
|
|
799
857
|
var newElevation = "mat-elevation-z" + (MAT_MENU_BASE_ELEVATION + depth);
|
|
800
858
|
/** @type {?} */
|
|
801
|
-
var customElevation = Object.keys(this._classList).find(
|
|
859
|
+
var customElevation = Object.keys(this._classList).find((/**
|
|
860
|
+
* @param {?} c
|
|
861
|
+
* @return {?}
|
|
862
|
+
*/
|
|
863
|
+
function (c) { return c.startsWith('mat-elevation-z'); }));
|
|
802
864
|
if (!customElevation || customElevation === this._previousElevation) {
|
|
803
865
|
if (this._previousElevation) {
|
|
804
866
|
this._classList[this._previousElevation] = false;
|
|
@@ -817,7 +879,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
817
879
|
* @param {?} item
|
|
818
880
|
* @return {?}
|
|
819
881
|
*/
|
|
820
|
-
|
|
882
|
+
_MatMenuBase.prototype.addItem = /**
|
|
821
883
|
* Registers a menu item with the menu.
|
|
822
884
|
* \@docs-private
|
|
823
885
|
* @param {?} item
|
|
@@ -844,7 +906,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
844
906
|
* @param {?} item
|
|
845
907
|
* @return {?}
|
|
846
908
|
*/
|
|
847
|
-
|
|
909
|
+
_MatMenuBase.prototype.removeItem = /**
|
|
848
910
|
* Removes an item from the menu.
|
|
849
911
|
* \@docs-private
|
|
850
912
|
* @param {?} item
|
|
@@ -873,7 +935,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
873
935
|
* @param {?=} posY Position of the menu along the y axis.
|
|
874
936
|
* @return {?}
|
|
875
937
|
*/
|
|
876
|
-
|
|
938
|
+
_MatMenuBase.prototype.setPositionClasses = /**
|
|
877
939
|
* Adds classes to the menu panel based on its position. Can be used by
|
|
878
940
|
* consumers to add specific styling based on the position.
|
|
879
941
|
* \@docs-private
|
|
@@ -896,7 +958,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
896
958
|
* Starts the enter animation.
|
|
897
959
|
* @return {?}
|
|
898
960
|
*/
|
|
899
|
-
|
|
961
|
+
_MatMenuBase.prototype._startAnimation = /**
|
|
900
962
|
* Starts the enter animation.
|
|
901
963
|
* @return {?}
|
|
902
964
|
*/
|
|
@@ -909,7 +971,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
909
971
|
* Resets the panel animation to its initial state.
|
|
910
972
|
* @return {?}
|
|
911
973
|
*/
|
|
912
|
-
|
|
974
|
+
_MatMenuBase.prototype._resetAnimation = /**
|
|
913
975
|
* Resets the panel animation to its initial state.
|
|
914
976
|
* @return {?}
|
|
915
977
|
*/
|
|
@@ -923,7 +985,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
923
985
|
* @param {?} event
|
|
924
986
|
* @return {?}
|
|
925
987
|
*/
|
|
926
|
-
|
|
988
|
+
_MatMenuBase.prototype._onAnimationDone = /**
|
|
927
989
|
* Callback that is invoked when the panel animation completes.
|
|
928
990
|
* @param {?} event
|
|
929
991
|
* @return {?}
|
|
@@ -936,7 +998,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
936
998
|
* @param {?} event
|
|
937
999
|
* @return {?}
|
|
938
1000
|
*/
|
|
939
|
-
|
|
1001
|
+
_MatMenuBase.prototype._onAnimationStart = /**
|
|
940
1002
|
* @param {?} event
|
|
941
1003
|
* @return {?}
|
|
942
1004
|
*/
|
|
@@ -952,29 +1014,13 @@ var MatMenu = /** @class */ (function () {
|
|
|
952
1014
|
event.element.scrollTop = 0;
|
|
953
1015
|
}
|
|
954
1016
|
};
|
|
955
|
-
MatMenu.decorators = [
|
|
956
|
-
{ type: Component, args: [{selector: 'mat-menu',
|
|
957
|
-
template: "<ng-template><div class=\"mat-menu-panel\" [ngClass]=\"_classList\" (keydown)=\"_handleKeydown($event)\" (click)=\"closed.emit('click')\" [@transformMenu]=\"_panelAnimationState\" (@transformMenu.start)=\"_onAnimationStart($event)\" (@transformMenu.done)=\"_onAnimationDone($event)\" tabindex=\"-1\" role=\"menu\"><div class=\"mat-menu-content\"><ng-content></ng-content></div></div></ng-template>",
|
|
958
|
-
styles: [".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0}.mat-menu-panel.ng-animating{pointer-events:none}@media (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}@media (-ms-high-contrast:active){.mat-menu-item-highlighted,.mat-menu-item.cdk-keyboard-focused,.mat-menu-item.cdk-program-focused{outline:dotted 1px}}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],
|
|
959
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
960
|
-
encapsulation: ViewEncapsulation.None,
|
|
961
|
-
exportAs: 'matMenu',
|
|
962
|
-
animations: [
|
|
963
|
-
matMenuAnimations.transformMenu,
|
|
964
|
-
matMenuAnimations.fadeInItems
|
|
965
|
-
],
|
|
966
|
-
providers: [
|
|
967
|
-
{ provide: MAT_MENU_PANEL, useExisting: MatMenu }
|
|
968
|
-
]
|
|
969
|
-
},] },
|
|
970
|
-
];
|
|
971
1017
|
/** @nocollapse */
|
|
972
|
-
|
|
1018
|
+
_MatMenuBase.ctorParameters = function () { return [
|
|
973
1019
|
{ type: ElementRef },
|
|
974
1020
|
{ type: NgZone },
|
|
975
1021
|
{ type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_DEFAULT_OPTIONS,] }] }
|
|
976
1022
|
]; };
|
|
977
|
-
|
|
1023
|
+
_MatMenuBase.propDecorators = {
|
|
978
1024
|
backdropClass: [{ type: Input }],
|
|
979
1025
|
xPosition: [{ type: Input }],
|
|
980
1026
|
yPosition: [{ type: Input }],
|
|
@@ -988,12 +1034,59 @@ var MatMenu = /** @class */ (function () {
|
|
|
988
1034
|
closed: [{ type: Output }],
|
|
989
1035
|
close: [{ type: Output }]
|
|
990
1036
|
};
|
|
991
|
-
return
|
|
1037
|
+
return _MatMenuBase;
|
|
992
1038
|
}());
|
|
1039
|
+
var MatMenu = /** @class */ (function (_super) {
|
|
1040
|
+
__extends(MatMenu, _super);
|
|
1041
|
+
function MatMenu() {
|
|
1042
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1043
|
+
}
|
|
1044
|
+
return MatMenu;
|
|
1045
|
+
}(_MatMenuBase));
|
|
1046
|
+
// Note on the weird inheritance setup: we need three classes, because the MDC-based menu has to
|
|
1047
|
+
// extend `MatMenu`, however keeping a reference to it will cause the inlined template and styles
|
|
1048
|
+
// to be retained as well. The MDC menu also has to provide itself as a `MatMenu` in order for
|
|
1049
|
+
// queries and DI to work correctly, while still not referencing the actual menu class.
|
|
1050
|
+
// Class responsibility is split up as follows:
|
|
1051
|
+
// * _MatMenuBase - provides all the functionality without any of the Angular metadata.
|
|
1052
|
+
// * MatMenu - keeps the same name symbol name as the current menu and
|
|
1053
|
+
// is used as a provider for DI and query purposes.
|
|
1054
|
+
// * _MatMenu - the actual menu component implementation with the Angular metadata that should
|
|
1055
|
+
// be tree shaken away for MDC.
|
|
1056
|
+
var _MatMenu = /** @class */ (function (_super) {
|
|
1057
|
+
__extends(_MatMenu, _super);
|
|
1058
|
+
function _MatMenu(elementRef, ngZone, defaultOptions) {
|
|
1059
|
+
return _super.call(this, elementRef, ngZone, defaultOptions) || this;
|
|
1060
|
+
}
|
|
1061
|
+
_MatMenu.decorators = [
|
|
1062
|
+
{ type: Component, args: [{selector: 'mat-menu',
|
|
1063
|
+
template: "<ng-template><div class=\"mat-menu-panel\" [ngClass]=\"_classList\" (keydown)=\"_handleKeydown($event)\" (click)=\"closed.emit('click')\" [@transformMenu]=\"_panelAnimationState\" (@transformMenu.start)=\"_onAnimationStart($event)\" (@transformMenu.done)=\"_onAnimationDone($event)\" tabindex=\"-1\" role=\"menu\"><div class=\"mat-menu-content\"><ng-content></ng-content></div></div></ng-template>",
|
|
1064
|
+
styles: [".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}@media (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}@media (-ms-high-contrast:active){.mat-menu-item-highlighted,.mat-menu-item.cdk-keyboard-focused,.mat-menu-item.cdk-program-focused{outline:dotted 1px}}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],
|
|
1065
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1066
|
+
encapsulation: ViewEncapsulation.None,
|
|
1067
|
+
exportAs: 'matMenu',
|
|
1068
|
+
animations: [
|
|
1069
|
+
matMenuAnimations.transformMenu,
|
|
1070
|
+
matMenuAnimations.fadeInItems
|
|
1071
|
+
],
|
|
1072
|
+
providers: [
|
|
1073
|
+
{ provide: MAT_MENU_PANEL, useExisting: MatMenu },
|
|
1074
|
+
{ provide: MatMenu, useExisting: _MatMenu }
|
|
1075
|
+
]
|
|
1076
|
+
},] },
|
|
1077
|
+
];
|
|
1078
|
+
/** @nocollapse */
|
|
1079
|
+
_MatMenu.ctorParameters = function () { return [
|
|
1080
|
+
{ type: ElementRef },
|
|
1081
|
+
{ type: NgZone },
|
|
1082
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_DEFAULT_OPTIONS,] }] }
|
|
1083
|
+
]; };
|
|
1084
|
+
return _MatMenu;
|
|
1085
|
+
}(MatMenu));
|
|
993
1086
|
|
|
994
1087
|
/**
|
|
995
1088
|
* @fileoverview added by tsickle
|
|
996
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1089
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
997
1090
|
*/
|
|
998
1091
|
/**
|
|
999
1092
|
* Injection token that determines the scroll handling while the menu is open.
|
|
@@ -1006,7 +1099,10 @@ var MAT_MENU_SCROLL_STRATEGY = new InjectionToken('mat-menu-scroll-strategy');
|
|
|
1006
1099
|
* @return {?}
|
|
1007
1100
|
*/
|
|
1008
1101
|
function MAT_MENU_SCROLL_STRATEGY_FACTORY(overlay) {
|
|
1009
|
-
return
|
|
1102
|
+
return (/**
|
|
1103
|
+
* @return {?}
|
|
1104
|
+
*/
|
|
1105
|
+
function () { return overlay.scrollStrategies.reposition(); });
|
|
1010
1106
|
}
|
|
1011
1107
|
/**
|
|
1012
1108
|
* \@docs-private
|
|
@@ -1051,7 +1147,10 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1051
1147
|
* Handles touch start events on the trigger.
|
|
1052
1148
|
* Needs to be an arrow function so we can easily use addEventListener and removeEventListener.
|
|
1053
1149
|
*/
|
|
1054
|
-
this._handleTouchStart =
|
|
1150
|
+
this._handleTouchStart = (/**
|
|
1151
|
+
* @return {?}
|
|
1152
|
+
*/
|
|
1153
|
+
function () { return _this._openedBy = 'touch'; });
|
|
1055
1154
|
// Tracking input type is necessary so it's possible to only auto-focus
|
|
1056
1155
|
// the first item of the list when the menu is opened via the keyboard
|
|
1057
1156
|
this._openedBy = null;
|
|
@@ -1129,13 +1228,17 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1129
1228
|
this._menu = menu;
|
|
1130
1229
|
this._menuCloseSubscription.unsubscribe();
|
|
1131
1230
|
if (menu) {
|
|
1132
|
-
this._menuCloseSubscription = menu.close.asObservable().subscribe(
|
|
1231
|
+
this._menuCloseSubscription = menu.close.asObservable().subscribe((/**
|
|
1232
|
+
* @param {?} reason
|
|
1233
|
+
* @return {?}
|
|
1234
|
+
*/
|
|
1235
|
+
function (reason) {
|
|
1133
1236
|
_this._destroyMenu();
|
|
1134
1237
|
// If a click closed the menu, we should close the entire chain of nested menus.
|
|
1135
1238
|
if ((reason === 'click' || reason === 'tab') && _this._parentMenu) {
|
|
1136
1239
|
_this._parentMenu.closed.emit(reason);
|
|
1137
1240
|
}
|
|
1138
|
-
});
|
|
1241
|
+
}));
|
|
1139
1242
|
}
|
|
1140
1243
|
},
|
|
1141
1244
|
enumerable: true,
|
|
@@ -1163,8 +1266,9 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1163
1266
|
this._overlayRef = null;
|
|
1164
1267
|
}
|
|
1165
1268
|
this._element.nativeElement.removeEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);
|
|
1166
|
-
this.
|
|
1269
|
+
this._menuCloseSubscription.unsubscribe();
|
|
1167
1270
|
this._closingActionsSubscription.unsubscribe();
|
|
1271
|
+
this._hoverSubscription.unsubscribe();
|
|
1168
1272
|
};
|
|
1169
1273
|
Object.defineProperty(MatMenuTrigger.prototype, "menuOpen", {
|
|
1170
1274
|
/** Whether the menu is open. */
|
|
@@ -1240,7 +1344,10 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1240
1344
|
if (this.menu.lazyContent) {
|
|
1241
1345
|
this.menu.lazyContent.attach(this.menuData);
|
|
1242
1346
|
}
|
|
1243
|
-
this._closingActionsSubscription = this._menuClosingActions().subscribe(
|
|
1347
|
+
this._closingActionsSubscription = this._menuClosingActions().subscribe((/**
|
|
1348
|
+
* @return {?}
|
|
1349
|
+
*/
|
|
1350
|
+
function () { return _this.closeMenu(); }));
|
|
1244
1351
|
this._initMenu();
|
|
1245
1352
|
if (this.menu instanceof MatMenu) {
|
|
1246
1353
|
this.menu._startAnimation();
|
|
@@ -1306,13 +1413,23 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1306
1413
|
if (menu.lazyContent) {
|
|
1307
1414
|
// Wait for the exit animation to finish before detaching the content.
|
|
1308
1415
|
menu._animationDone
|
|
1309
|
-
.pipe(filter(
|
|
1416
|
+
.pipe(filter((/**
|
|
1417
|
+
* @param {?} event
|
|
1418
|
+
* @return {?}
|
|
1419
|
+
*/
|
|
1420
|
+
function (event) { return event.toState === 'void'; })), take(1),
|
|
1310
1421
|
// Interrupt if the content got re-attached.
|
|
1311
1422
|
takeUntil(menu.lazyContent._attached))
|
|
1312
|
-
.subscribe(
|
|
1423
|
+
.subscribe((/**
|
|
1424
|
+
* @return {?}
|
|
1425
|
+
*/
|
|
1426
|
+
function () { return (/** @type {?} */ (menu.lazyContent)).detach(); }), undefined, (/**
|
|
1427
|
+
* @return {?}
|
|
1428
|
+
*/
|
|
1429
|
+
function () {
|
|
1313
1430
|
// No matter whether the content got re-attached, reset the menu.
|
|
1314
1431
|
_this._resetMenu();
|
|
1315
|
-
});
|
|
1432
|
+
}));
|
|
1316
1433
|
}
|
|
1317
1434
|
else {
|
|
1318
1435
|
this._resetMenu();
|
|
@@ -1495,7 +1612,7 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1495
1612
|
positionStrategy: this._overlay.position()
|
|
1496
1613
|
.flexibleConnectedTo(this._element)
|
|
1497
1614
|
.withLockedPosition()
|
|
1498
|
-
.withTransformOriginOn('.mat-menu-panel'),
|
|
1615
|
+
.withTransformOriginOn('.mat-menu-panel, .mat-mdc-menu-panel'),
|
|
1499
1616
|
backdropClass: this.menu.backdropClass || 'cdk-overlay-transparent-backdrop',
|
|
1500
1617
|
scrollStrategy: this._scrollStrategy(),
|
|
1501
1618
|
direction: this._dir
|
|
@@ -1525,13 +1642,17 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1525
1642
|
function (position) {
|
|
1526
1643
|
var _this = this;
|
|
1527
1644
|
if (this.menu.setPositionClasses) {
|
|
1528
|
-
position.positionChanges.subscribe(
|
|
1645
|
+
position.positionChanges.subscribe((/**
|
|
1646
|
+
* @param {?} change
|
|
1647
|
+
* @return {?}
|
|
1648
|
+
*/
|
|
1649
|
+
function (change) {
|
|
1529
1650
|
/** @type {?} */
|
|
1530
1651
|
var posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
|
|
1531
1652
|
/** @type {?} */
|
|
1532
1653
|
var posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
|
|
1533
1654
|
(/** @type {?} */ (_this.menu.setPositionClasses))(posX, posY);
|
|
1534
|
-
});
|
|
1655
|
+
}));
|
|
1535
1656
|
}
|
|
1536
1657
|
};
|
|
1537
1658
|
/**
|
|
@@ -1590,21 +1711,6 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1590
1711
|
}
|
|
1591
1712
|
]);
|
|
1592
1713
|
};
|
|
1593
|
-
/** Cleans up the active subscriptions. */
|
|
1594
|
-
/**
|
|
1595
|
-
* Cleans up the active subscriptions.
|
|
1596
|
-
* @private
|
|
1597
|
-
* @return {?}
|
|
1598
|
-
*/
|
|
1599
|
-
MatMenuTrigger.prototype._cleanUpSubscriptions = /**
|
|
1600
|
-
* Cleans up the active subscriptions.
|
|
1601
|
-
* @private
|
|
1602
|
-
* @return {?}
|
|
1603
|
-
*/
|
|
1604
|
-
function () {
|
|
1605
|
-
this._closingActionsSubscription.unsubscribe();
|
|
1606
|
-
this._hoverSubscription.unsubscribe();
|
|
1607
|
-
};
|
|
1608
1714
|
/** Returns a stream that emits whenever an action that should close the menu occurs. */
|
|
1609
1715
|
/**
|
|
1610
1716
|
* Returns a stream that emits whenever an action that should close the menu occurs.
|
|
@@ -1625,7 +1731,14 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1625
1731
|
/** @type {?} */
|
|
1626
1732
|
var parentClose = this._parentMenu ? this._parentMenu.closed : of();
|
|
1627
1733
|
/** @type {?} */
|
|
1628
|
-
var hover = this._parentMenu ? this._parentMenu._hovered().pipe(filter(
|
|
1734
|
+
var hover = this._parentMenu ? this._parentMenu._hovered().pipe(filter((/**
|
|
1735
|
+
* @param {?} active
|
|
1736
|
+
* @return {?}
|
|
1737
|
+
*/
|
|
1738
|
+
function (active) { return active !== _this._menuItemInstance; })), filter((/**
|
|
1739
|
+
* @return {?}
|
|
1740
|
+
*/
|
|
1741
|
+
function () { return _this._menuOpen; }))) : of();
|
|
1629
1742
|
return merge(backdrop, parentClose, hover, detachments);
|
|
1630
1743
|
};
|
|
1631
1744
|
/** Handles mouse presses on the trigger. */
|
|
@@ -1713,8 +1826,15 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1713
1826
|
// Since we might have multiple competing triggers for the same menu (e.g. a sub-menu
|
|
1714
1827
|
// with different data and triggers), we have to delay it by a tick to ensure that
|
|
1715
1828
|
// it won't be closed immediately after it is opened.
|
|
1716
|
-
.pipe(filter(
|
|
1717
|
-
|
|
1829
|
+
.pipe(filter((/**
|
|
1830
|
+
* @param {?} active
|
|
1831
|
+
* @return {?}
|
|
1832
|
+
*/
|
|
1833
|
+
function (active) { return active === _this._menuItemInstance && !active.disabled; })), delay(0, asapScheduler))
|
|
1834
|
+
.subscribe((/**
|
|
1835
|
+
* @return {?}
|
|
1836
|
+
*/
|
|
1837
|
+
function () {
|
|
1718
1838
|
_this._openedBy = 'mouse';
|
|
1719
1839
|
// If the same menu is used between multiple triggers, it might still be animating
|
|
1720
1840
|
// while the new trigger tries to re-open it. Wait for the animation to finish
|
|
@@ -1724,12 +1844,15 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1724
1844
|
// 'changed after checked' errors in some cases. See #12194.
|
|
1725
1845
|
_this.menu._animationDone
|
|
1726
1846
|
.pipe(take(1), delay(0, asapScheduler), takeUntil(_this._parentMenu._hovered()))
|
|
1727
|
-
.subscribe(
|
|
1847
|
+
.subscribe((/**
|
|
1848
|
+
* @return {?}
|
|
1849
|
+
*/
|
|
1850
|
+
function () { return _this.openMenu(); }));
|
|
1728
1851
|
}
|
|
1729
1852
|
else {
|
|
1730
1853
|
_this.openMenu();
|
|
1731
1854
|
}
|
|
1732
|
-
});
|
|
1855
|
+
}));
|
|
1733
1856
|
};
|
|
1734
1857
|
/** Gets the portal that should be attached to the overlay. */
|
|
1735
1858
|
/**
|
|
@@ -1790,8 +1913,24 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1790
1913
|
|
|
1791
1914
|
/**
|
|
1792
1915
|
* @fileoverview added by tsickle
|
|
1793
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1916
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1917
|
+
*/
|
|
1918
|
+
/**
|
|
1919
|
+
* Used by both the current `MatMenuModule` and the MDC `MatMenuModule`
|
|
1920
|
+
* to declare the menu-related directives.
|
|
1794
1921
|
*/
|
|
1922
|
+
var _MatMenuDirectivesModule = /** @class */ (function () {
|
|
1923
|
+
function _MatMenuDirectivesModule() {
|
|
1924
|
+
}
|
|
1925
|
+
_MatMenuDirectivesModule.decorators = [
|
|
1926
|
+
{ type: NgModule, args: [{
|
|
1927
|
+
exports: [MatMenuTrigger, MatMenuContent, MatCommonModule],
|
|
1928
|
+
declarations: [MatMenuTrigger, MatMenuContent],
|
|
1929
|
+
providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER]
|
|
1930
|
+
},] },
|
|
1931
|
+
];
|
|
1932
|
+
return _MatMenuDirectivesModule;
|
|
1933
|
+
}());
|
|
1795
1934
|
var MatMenuModule = /** @class */ (function () {
|
|
1796
1935
|
function MatMenuModule() {
|
|
1797
1936
|
}
|
|
@@ -1802,9 +1941,10 @@ var MatMenuModule = /** @class */ (function () {
|
|
|
1802
1941
|
MatCommonModule,
|
|
1803
1942
|
MatRippleModule,
|
|
1804
1943
|
OverlayModule,
|
|
1944
|
+
_MatMenuDirectivesModule,
|
|
1805
1945
|
],
|
|
1806
|
-
exports: [
|
|
1807
|
-
declarations: [
|
|
1946
|
+
exports: [_MatMenu, MatMenuItem, _MatMenuDirectivesModule],
|
|
1947
|
+
declarations: [_MatMenu, MatMenuItem],
|
|
1808
1948
|
providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER]
|
|
1809
1949
|
},] },
|
|
1810
1950
|
];
|
|
@@ -1813,18 +1953,18 @@ var MatMenuModule = /** @class */ (function () {
|
|
|
1813
1953
|
|
|
1814
1954
|
/**
|
|
1815
1955
|
* @fileoverview added by tsickle
|
|
1816
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1956
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1817
1957
|
*/
|
|
1818
1958
|
|
|
1819
1959
|
/**
|
|
1820
1960
|
* @fileoverview added by tsickle
|
|
1821
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1961
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1822
1962
|
*/
|
|
1823
1963
|
|
|
1824
1964
|
/**
|
|
1825
1965
|
* @fileoverview added by tsickle
|
|
1826
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1966
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1827
1967
|
*/
|
|
1828
1968
|
|
|
1829
|
-
export {
|
|
1969
|
+
export { MatMenu, MAT_MENU_DEFAULT_OPTIONS, _MatMenu, _MatMenuBase, MatMenuItem, MatMenuTrigger, MAT_MENU_SCROLL_STRATEGY, MAT_MENU_PANEL, _MatMenuDirectivesModule, MatMenuModule, matMenuAnimations, fadeInItems, transformMenu, MatMenuContent, MAT_MENU_DEFAULT_OPTIONS_FACTORY as ɵa24, MAT_MENU_SCROLL_STRATEGY_FACTORY as ɵb24, MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER as ɵc24 };
|
|
1830
1970
|
//# sourceMappingURL=menu.es5.js.map
|