@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
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
(function (global, factory) {
|
|
9
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/
|
|
10
|
-
typeof define === 'function' && define.amd ? define('@angular/material/menu', ['exports', '@angular/core', '@angular/cdk/portal', '@angular/common', 'rxjs', '@angular/
|
|
11
|
-
(factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.menu = {}),global.ng.core,global.ng.cdk.portal,global.ng.common,global.rxjs,global.ng.
|
|
12
|
-
}(this, (function (exports,core,portal,common,rxjs,
|
|
9
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/animations'), require('@angular/core'), require('@angular/cdk/portal'), require('@angular/common'), require('rxjs'), require('@angular/cdk/a11y'), require('@angular/material/core'), require('@angular/cdk/coercion'), require('@angular/cdk/keycodes'), require('rxjs/operators'), require('@angular/cdk/bidi'), require('@angular/cdk/overlay'), require('@angular/cdk/platform')) :
|
|
10
|
+
typeof define === 'function' && define.amd ? define('@angular/material/menu', ['exports', '@angular/animations', '@angular/core', '@angular/cdk/portal', '@angular/common', 'rxjs', '@angular/cdk/a11y', '@angular/material/core', '@angular/cdk/coercion', '@angular/cdk/keycodes', 'rxjs/operators', '@angular/cdk/bidi', '@angular/cdk/overlay', '@angular/cdk/platform'], factory) :
|
|
11
|
+
(factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.menu = {}),global.ng.animations,global.ng.core,global.ng.cdk.portal,global.ng.common,global.rxjs,global.ng.cdk.a11y,global.ng.material.core,global.ng.cdk.coercion,global.ng.cdk.keycodes,global.rxjs.operators,global.ng.cdk.bidi,global.ng.cdk.overlay,global.ng.cdk.platform));
|
|
12
|
+
}(this, (function (exports,animations,core,portal,common,rxjs,a11y,core$1,coercion,keycodes,operators,bidi,overlay,platform) { 'use strict';
|
|
13
13
|
|
|
14
14
|
/*! *****************************************************************************
|
|
15
15
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -42,7 +42,69 @@ 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
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* Animations used by the mat-menu component.
|
|
49
|
+
* Animation duration and timing values are based on:
|
|
50
|
+
* https://material.io/guidelines/components/menus.html#menus-usage
|
|
51
|
+
* \@docs-private
|
|
52
|
+
* @type {?}
|
|
53
|
+
*/
|
|
54
|
+
var matMenuAnimations = {
|
|
55
|
+
/**
|
|
56
|
+
* This animation controls the menu panel's entry and exit from the page.
|
|
57
|
+
*
|
|
58
|
+
* When the menu panel is added to the DOM, it scales in and fades in its border.
|
|
59
|
+
*
|
|
60
|
+
* When the menu panel is removed from the DOM, it simply fades out after a brief
|
|
61
|
+
* delay to display the ripple.
|
|
62
|
+
*/
|
|
63
|
+
transformMenu: animations.trigger('transformMenu', [
|
|
64
|
+
animations.state('void', animations.style({
|
|
65
|
+
opacity: 0,
|
|
66
|
+
transform: 'scale(0.8)'
|
|
67
|
+
})),
|
|
68
|
+
animations.transition('void => enter', animations.group([
|
|
69
|
+
animations.query('.mat-menu-content, .mat-mdc-menu-content', animations.animate('100ms linear', animations.style({
|
|
70
|
+
opacity: 1
|
|
71
|
+
}))),
|
|
72
|
+
animations.animate('120ms cubic-bezier(0, 0, 0.2, 1)', animations.style({ transform: 'scale(1)' })),
|
|
73
|
+
])),
|
|
74
|
+
animations.transition('* => void', animations.animate('100ms 25ms linear', animations.style({ opacity: 0 })))
|
|
75
|
+
]),
|
|
76
|
+
/**
|
|
77
|
+
* This animation fades in the background color and content of the menu panel
|
|
78
|
+
* after its containing element is scaled in.
|
|
79
|
+
*/
|
|
80
|
+
fadeInItems: animations.trigger('fadeInItems', [
|
|
81
|
+
// TODO(crisbeto): this is inside the `transformMenu`
|
|
82
|
+
// now. Remove next time we do breaking changes.
|
|
83
|
+
animations.state('showing', animations.style({ opacity: 1 })),
|
|
84
|
+
animations.transition('void => *', [
|
|
85
|
+
animations.style({ opacity: 0 }),
|
|
86
|
+
animations.animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')
|
|
87
|
+
])
|
|
88
|
+
])
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated
|
|
92
|
+
* \@breaking-change 8.0.0
|
|
93
|
+
* \@docs-private
|
|
94
|
+
* @type {?}
|
|
95
|
+
*/
|
|
96
|
+
var fadeInItems = matMenuAnimations.fadeInItems;
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated
|
|
99
|
+
* \@breaking-change 8.0.0
|
|
100
|
+
* \@docs-private
|
|
101
|
+
* @type {?}
|
|
102
|
+
*/
|
|
103
|
+
var transformMenu = matMenuAnimations.transformMenu;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @fileoverview added by tsickle
|
|
107
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
46
108
|
*/
|
|
47
109
|
/**
|
|
48
110
|
* Menu content that will be rendered lazily once the menu is opened.
|
|
@@ -143,67 +205,7 @@ var MatMenuContent = /** @class */ (function () {
|
|
|
143
205
|
|
|
144
206
|
/**
|
|
145
207
|
* @fileoverview added by tsickle
|
|
146
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
147
|
-
*/
|
|
148
|
-
/**
|
|
149
|
-
* Animations used by the mat-menu component.
|
|
150
|
-
* Animation duration and timing values are based on:
|
|
151
|
-
* https://material.io/guidelines/components/menus.html#menus-usage
|
|
152
|
-
* \@docs-private
|
|
153
|
-
* @type {?}
|
|
154
|
-
*/
|
|
155
|
-
var matMenuAnimations = {
|
|
156
|
-
/**
|
|
157
|
-
* This animation controls the menu panel's entry and exit from the page.
|
|
158
|
-
*
|
|
159
|
-
* When the menu panel is added to the DOM, it scales in and fades in its border.
|
|
160
|
-
*
|
|
161
|
-
* When the menu panel is removed from the DOM, it simply fades out after a brief
|
|
162
|
-
* delay to display the ripple.
|
|
163
|
-
*/
|
|
164
|
-
transformMenu: animations.trigger('transformMenu', [
|
|
165
|
-
animations.state('void', animations.style({
|
|
166
|
-
opacity: 0,
|
|
167
|
-
transform: 'scale(0.8)'
|
|
168
|
-
})),
|
|
169
|
-
animations.transition('void => enter', animations.group([
|
|
170
|
-
animations.query('.mat-menu-content', animations.animate('100ms linear', animations.style({ opacity: 1 }))),
|
|
171
|
-
animations.animate('120ms cubic-bezier(0, 0, 0.2, 1)', animations.style({ transform: 'scale(1)' })),
|
|
172
|
-
])),
|
|
173
|
-
animations.transition('* => void', animations.animate('100ms 25ms linear', animations.style({ opacity: 0 })))
|
|
174
|
-
]),
|
|
175
|
-
/**
|
|
176
|
-
* This animation fades in the background color and content of the menu panel
|
|
177
|
-
* after its containing element is scaled in.
|
|
178
|
-
*/
|
|
179
|
-
fadeInItems: animations.trigger('fadeInItems', [
|
|
180
|
-
// TODO(crisbeto): this is inside the `transformMenu`
|
|
181
|
-
// now. Remove next time we do breaking changes.
|
|
182
|
-
animations.state('showing', animations.style({ opacity: 1 })),
|
|
183
|
-
animations.transition('void => *', [
|
|
184
|
-
animations.style({ opacity: 0 }),
|
|
185
|
-
animations.animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')
|
|
186
|
-
])
|
|
187
|
-
])
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* @deprecated
|
|
191
|
-
* \@breaking-change 8.0.0
|
|
192
|
-
* \@docs-private
|
|
193
|
-
* @type {?}
|
|
194
|
-
*/
|
|
195
|
-
var fadeInItems = matMenuAnimations.fadeInItems;
|
|
196
|
-
/**
|
|
197
|
-
* @deprecated
|
|
198
|
-
* \@breaking-change 8.0.0
|
|
199
|
-
* \@docs-private
|
|
200
|
-
* @type {?}
|
|
201
|
-
*/
|
|
202
|
-
var transformMenu = matMenuAnimations.transformMenu;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* @fileoverview added by tsickle
|
|
206
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
208
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
207
209
|
*/
|
|
208
210
|
|
|
209
211
|
/**
|
|
@@ -235,7 +237,7 @@ function throwMatMenuInvalidPositionY() {
|
|
|
235
237
|
|
|
236
238
|
/**
|
|
237
239
|
* @fileoverview added by tsickle
|
|
238
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
240
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
239
241
|
*/
|
|
240
242
|
/**
|
|
241
243
|
* Injection token used to provide the parent menu to menu-specific components.
|
|
@@ -246,13 +248,13 @@ var MAT_MENU_PANEL = new core.InjectionToken('MAT_MENU_PANEL');
|
|
|
246
248
|
|
|
247
249
|
/**
|
|
248
250
|
* @fileoverview added by tsickle
|
|
249
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
251
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
250
252
|
*/
|
|
251
253
|
// Boilerplate for applying mixins to MatMenuItem.
|
|
252
254
|
/**
|
|
253
255
|
* \@docs-private
|
|
254
256
|
*/
|
|
255
|
-
var
|
|
257
|
+
var
|
|
256
258
|
// Boilerplate for applying mixins to MatMenuItem.
|
|
257
259
|
/**
|
|
258
260
|
* \@docs-private
|
|
@@ -365,16 +367,31 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
365
367
|
return this._elementRef.nativeElement;
|
|
366
368
|
};
|
|
367
369
|
/** Prevents the default element actions if it is disabled. */
|
|
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
|
|
368
375
|
/**
|
|
369
376
|
* Prevents the default element actions if it is disabled.
|
|
370
377
|
* @param {?} event
|
|
371
378
|
* @return {?}
|
|
372
379
|
*/
|
|
380
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
381
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
382
|
+
// ViewEngine they're overwritte.
|
|
383
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
384
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
373
385
|
MatMenuItem.prototype._checkDisabled = /**
|
|
374
386
|
* Prevents the default element actions if it is disabled.
|
|
375
387
|
* @param {?} event
|
|
376
388
|
* @return {?}
|
|
377
389
|
*/
|
|
390
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
391
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
392
|
+
// ViewEngine they're overwritte.
|
|
393
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
394
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
378
395
|
function (event) {
|
|
379
396
|
if (this.disabled) {
|
|
380
397
|
event.preventDefault();
|
|
@@ -382,14 +399,29 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
382
399
|
}
|
|
383
400
|
};
|
|
384
401
|
/** Emits to the hover stream. */
|
|
402
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
403
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
404
|
+
// ViewEngine they're overwritte.
|
|
405
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
406
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
385
407
|
/**
|
|
386
408
|
* Emits to the hover stream.
|
|
387
409
|
* @return {?}
|
|
388
410
|
*/
|
|
411
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
412
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
413
|
+
// ViewEngine they're overwritte.
|
|
414
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
415
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
389
416
|
MatMenuItem.prototype._handleMouseEnter = /**
|
|
390
417
|
* Emits to the hover stream.
|
|
391
418
|
* @return {?}
|
|
392
419
|
*/
|
|
420
|
+
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
421
|
+
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
422
|
+
// ViewEngine they're overwritte.
|
|
423
|
+
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
424
|
+
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
393
425
|
function () {
|
|
394
426
|
this._hovered.next(this);
|
|
395
427
|
};
|
|
@@ -435,8 +467,6 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
435
467
|
'[attr.tabindex]': '_getTabIndex()',
|
|
436
468
|
'[attr.aria-disabled]': 'disabled.toString()',
|
|
437
469
|
'[attr.disabled]': 'disabled || null',
|
|
438
|
-
'(click)': '_checkDisabled($event)',
|
|
439
|
-
'(mouseenter)': '_handleMouseEnter()',
|
|
440
470
|
},
|
|
441
471
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
442
472
|
encapsulation: core.ViewEncapsulation.None,
|
|
@@ -451,14 +481,16 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
451
481
|
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_MENU_PANEL,] }, { type: core.Optional }] }
|
|
452
482
|
]; };
|
|
453
483
|
MatMenuItem.propDecorators = {
|
|
454
|
-
role: [{ type: core.Input }]
|
|
484
|
+
role: [{ type: core.Input }],
|
|
485
|
+
_checkDisabled: [{ type: core.HostListener, args: ['click', ['$event'],] }],
|
|
486
|
+
_handleMouseEnter: [{ type: core.HostListener, args: ['mouseenter',] }]
|
|
455
487
|
};
|
|
456
488
|
return MatMenuItem;
|
|
457
489
|
}(_MatMenuItemMixinBase));
|
|
458
490
|
|
|
459
491
|
/**
|
|
460
492
|
* @fileoverview added by tsickle
|
|
461
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
493
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
462
494
|
*/
|
|
463
495
|
/**
|
|
464
496
|
* Injection token to be used to override the default options for `mat-menu`.
|
|
@@ -486,8 +518,12 @@ function MAT_MENU_DEFAULT_OPTIONS_FACTORY() {
|
|
|
486
518
|
* @type {?}
|
|
487
519
|
*/
|
|
488
520
|
var MAT_MENU_BASE_ELEVATION = 4;
|
|
489
|
-
|
|
490
|
-
|
|
521
|
+
/**
|
|
522
|
+
* Base class with all of the `MatMenu` functionality.
|
|
523
|
+
*/
|
|
524
|
+
// tslint:disable-next-line:class-name
|
|
525
|
+
var _MatMenuBase = /** @class */ (function () {
|
|
526
|
+
function _MatMenuBase(_elementRef, _ngZone, _defaultOptions) {
|
|
491
527
|
this._elementRef = _elementRef;
|
|
492
528
|
this._ngZone = _ngZone;
|
|
493
529
|
this._defaultOptions = _defaultOptions;
|
|
@@ -534,7 +570,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
534
570
|
*/
|
|
535
571
|
this.close = this.closed;
|
|
536
572
|
}
|
|
537
|
-
Object.defineProperty(
|
|
573
|
+
Object.defineProperty(_MatMenuBase.prototype, "xPosition", {
|
|
538
574
|
/** Position of the menu in the X axis. */
|
|
539
575
|
get: /**
|
|
540
576
|
* Position of the menu in the X axis.
|
|
@@ -555,7 +591,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
555
591
|
enumerable: true,
|
|
556
592
|
configurable: true
|
|
557
593
|
});
|
|
558
|
-
Object.defineProperty(
|
|
594
|
+
Object.defineProperty(_MatMenuBase.prototype, "yPosition", {
|
|
559
595
|
/** Position of the menu in the Y axis. */
|
|
560
596
|
get: /**
|
|
561
597
|
* Position of the menu in the Y axis.
|
|
@@ -576,7 +612,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
576
612
|
enumerable: true,
|
|
577
613
|
configurable: true
|
|
578
614
|
});
|
|
579
|
-
Object.defineProperty(
|
|
615
|
+
Object.defineProperty(_MatMenuBase.prototype, "overlapTrigger", {
|
|
580
616
|
/** Whether the menu should overlap its trigger. */
|
|
581
617
|
get: /**
|
|
582
618
|
* Whether the menu should overlap its trigger.
|
|
@@ -593,7 +629,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
593
629
|
enumerable: true,
|
|
594
630
|
configurable: true
|
|
595
631
|
});
|
|
596
|
-
Object.defineProperty(
|
|
632
|
+
Object.defineProperty(_MatMenuBase.prototype, "hasBackdrop", {
|
|
597
633
|
/** Whether the menu has a backdrop. */
|
|
598
634
|
get: /**
|
|
599
635
|
* Whether the menu has a backdrop.
|
|
@@ -610,7 +646,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
610
646
|
enumerable: true,
|
|
611
647
|
configurable: true
|
|
612
648
|
});
|
|
613
|
-
Object.defineProperty(
|
|
649
|
+
Object.defineProperty(_MatMenuBase.prototype, "panelClass", {
|
|
614
650
|
/**
|
|
615
651
|
* This method takes classes set on the host mat-menu element and applies them on the
|
|
616
652
|
* menu template that displays in the overlay container. Otherwise, it's difficult
|
|
@@ -629,22 +665,30 @@ var MatMenu = /** @class */ (function () {
|
|
|
629
665
|
/** @type {?} */
|
|
630
666
|
var previousPanelClass = this._previousPanelClass;
|
|
631
667
|
if (previousPanelClass && previousPanelClass.length) {
|
|
632
|
-
previousPanelClass.split(' ').forEach(
|
|
668
|
+
previousPanelClass.split(' ').forEach((/**
|
|
669
|
+
* @param {?} className
|
|
670
|
+
* @return {?}
|
|
671
|
+
*/
|
|
672
|
+
function (className) {
|
|
633
673
|
_this._classList[className] = false;
|
|
634
|
-
});
|
|
674
|
+
}));
|
|
635
675
|
}
|
|
636
676
|
this._previousPanelClass = classes;
|
|
637
677
|
if (classes && classes.length) {
|
|
638
|
-
classes.split(' ').forEach(
|
|
678
|
+
classes.split(' ').forEach((/**
|
|
679
|
+
* @param {?} className
|
|
680
|
+
* @return {?}
|
|
681
|
+
*/
|
|
682
|
+
function (className) {
|
|
639
683
|
_this._classList[className] = true;
|
|
640
|
-
});
|
|
684
|
+
}));
|
|
641
685
|
this._elementRef.nativeElement.className = '';
|
|
642
686
|
}
|
|
643
687
|
},
|
|
644
688
|
enumerable: true,
|
|
645
689
|
configurable: true
|
|
646
690
|
});
|
|
647
|
-
Object.defineProperty(
|
|
691
|
+
Object.defineProperty(_MatMenuBase.prototype, "classList", {
|
|
648
692
|
/**
|
|
649
693
|
* This method takes classes set on the host mat-menu element and applies them on the
|
|
650
694
|
* menu template that displays in the overlay container. Otherwise, it's difficult
|
|
@@ -672,7 +716,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
672
716
|
/**
|
|
673
717
|
* @return {?}
|
|
674
718
|
*/
|
|
675
|
-
|
|
719
|
+
_MatMenuBase.prototype.ngOnInit = /**
|
|
676
720
|
* @return {?}
|
|
677
721
|
*/
|
|
678
722
|
function () {
|
|
@@ -681,18 +725,21 @@ var MatMenu = /** @class */ (function () {
|
|
|
681
725
|
/**
|
|
682
726
|
* @return {?}
|
|
683
727
|
*/
|
|
684
|
-
|
|
728
|
+
_MatMenuBase.prototype.ngAfterContentInit = /**
|
|
685
729
|
* @return {?}
|
|
686
730
|
*/
|
|
687
731
|
function () {
|
|
688
732
|
var _this = this;
|
|
689
733
|
this._keyManager = new a11y.FocusKeyManager(this._items).withWrap().withTypeAhead();
|
|
690
|
-
this._tabSubscription = this._keyManager.tabOut.subscribe(
|
|
734
|
+
this._tabSubscription = this._keyManager.tabOut.subscribe((/**
|
|
735
|
+
* @return {?}
|
|
736
|
+
*/
|
|
737
|
+
function () { return _this.closed.emit('tab'); }));
|
|
691
738
|
};
|
|
692
739
|
/**
|
|
693
740
|
* @return {?}
|
|
694
741
|
*/
|
|
695
|
-
|
|
742
|
+
_MatMenuBase.prototype.ngOnDestroy = /**
|
|
696
743
|
* @return {?}
|
|
697
744
|
*/
|
|
698
745
|
function () {
|
|
@@ -704,12 +751,20 @@ var MatMenu = /** @class */ (function () {
|
|
|
704
751
|
* Stream that emits whenever the hovered menu item changes.
|
|
705
752
|
* @return {?}
|
|
706
753
|
*/
|
|
707
|
-
|
|
754
|
+
_MatMenuBase.prototype._hovered = /**
|
|
708
755
|
* Stream that emits whenever the hovered menu item changes.
|
|
709
756
|
* @return {?}
|
|
710
757
|
*/
|
|
711
758
|
function () {
|
|
712
|
-
return this._itemChanges.pipe(operators.startWith(this._items), operators.switchMap(
|
|
759
|
+
return this._itemChanges.pipe(operators.startWith(this._items), operators.switchMap((/**
|
|
760
|
+
* @param {?} items
|
|
761
|
+
* @return {?}
|
|
762
|
+
*/
|
|
763
|
+
function (items) { return rxjs.merge.apply(void 0, items.map((/**
|
|
764
|
+
* @param {?} item
|
|
765
|
+
* @return {?}
|
|
766
|
+
*/
|
|
767
|
+
function (item) { return item._hovered; }))); })));
|
|
713
768
|
};
|
|
714
769
|
/** Handle a keyboard event from the menu, delegating to the appropriate action. */
|
|
715
770
|
/**
|
|
@@ -717,7 +772,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
717
772
|
* @param {?} event
|
|
718
773
|
* @return {?}
|
|
719
774
|
*/
|
|
720
|
-
|
|
775
|
+
_MatMenuBase.prototype._handleKeydown = /**
|
|
721
776
|
* Handle a keyboard event from the menu, delegating to the appropriate action.
|
|
722
777
|
* @param {?} event
|
|
723
778
|
* @return {?}
|
|
@@ -764,7 +819,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
764
819
|
* @param {?=} origin Action from which the focus originated. Used to set the correct styling.
|
|
765
820
|
* @return {?}
|
|
766
821
|
*/
|
|
767
|
-
|
|
822
|
+
_MatMenuBase.prototype.focusFirstItem = /**
|
|
768
823
|
* Focus the first item in the menu.
|
|
769
824
|
* @param {?=} origin Action from which the focus originated. Used to set the correct styling.
|
|
770
825
|
* @return {?}
|
|
@@ -776,7 +831,10 @@ var MatMenu = /** @class */ (function () {
|
|
|
776
831
|
if (this.lazyContent) {
|
|
777
832
|
this._ngZone.onStable.asObservable()
|
|
778
833
|
.pipe(operators.take(1))
|
|
779
|
-
.subscribe(
|
|
834
|
+
.subscribe((/**
|
|
835
|
+
* @return {?}
|
|
836
|
+
*/
|
|
837
|
+
function () { return _this._keyManager.setFocusOrigin(origin).setFirstItemActive(); }));
|
|
780
838
|
}
|
|
781
839
|
else {
|
|
782
840
|
this._keyManager.setFocusOrigin(origin).setFirstItemActive();
|
|
@@ -791,7 +849,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
791
849
|
* the user to start from the first option when pressing the down arrow.
|
|
792
850
|
* @return {?}
|
|
793
851
|
*/
|
|
794
|
-
|
|
852
|
+
_MatMenuBase.prototype.resetActiveItem = /**
|
|
795
853
|
* Resets the active item in the menu. This is used when the menu is opened, allowing
|
|
796
854
|
* the user to start from the first option when pressing the down arrow.
|
|
797
855
|
* @return {?}
|
|
@@ -808,7 +866,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
808
866
|
* @param {?} depth Number of parent menus that come before the menu.
|
|
809
867
|
* @return {?}
|
|
810
868
|
*/
|
|
811
|
-
|
|
869
|
+
_MatMenuBase.prototype.setElevation = /**
|
|
812
870
|
* Sets the menu panel elevation.
|
|
813
871
|
* @param {?} depth Number of parent menus that come before the menu.
|
|
814
872
|
* @return {?}
|
|
@@ -818,7 +876,11 @@ var MatMenu = /** @class */ (function () {
|
|
|
818
876
|
/** @type {?} */
|
|
819
877
|
var newElevation = "mat-elevation-z" + (MAT_MENU_BASE_ELEVATION + depth);
|
|
820
878
|
/** @type {?} */
|
|
821
|
-
var customElevation = Object.keys(this._classList).find(
|
|
879
|
+
var customElevation = Object.keys(this._classList).find((/**
|
|
880
|
+
* @param {?} c
|
|
881
|
+
* @return {?}
|
|
882
|
+
*/
|
|
883
|
+
function (c) { return c.startsWith('mat-elevation-z'); }));
|
|
822
884
|
if (!customElevation || customElevation === this._previousElevation) {
|
|
823
885
|
if (this._previousElevation) {
|
|
824
886
|
this._classList[this._previousElevation] = false;
|
|
@@ -837,7 +899,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
837
899
|
* @param {?} item
|
|
838
900
|
* @return {?}
|
|
839
901
|
*/
|
|
840
|
-
|
|
902
|
+
_MatMenuBase.prototype.addItem = /**
|
|
841
903
|
* Registers a menu item with the menu.
|
|
842
904
|
* \@docs-private
|
|
843
905
|
* @param {?} item
|
|
@@ -864,7 +926,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
864
926
|
* @param {?} item
|
|
865
927
|
* @return {?}
|
|
866
928
|
*/
|
|
867
|
-
|
|
929
|
+
_MatMenuBase.prototype.removeItem = /**
|
|
868
930
|
* Removes an item from the menu.
|
|
869
931
|
* \@docs-private
|
|
870
932
|
* @param {?} item
|
|
@@ -893,7 +955,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
893
955
|
* @param {?=} posY Position of the menu along the y axis.
|
|
894
956
|
* @return {?}
|
|
895
957
|
*/
|
|
896
|
-
|
|
958
|
+
_MatMenuBase.prototype.setPositionClasses = /**
|
|
897
959
|
* Adds classes to the menu panel based on its position. Can be used by
|
|
898
960
|
* consumers to add specific styling based on the position.
|
|
899
961
|
* \@docs-private
|
|
@@ -916,7 +978,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
916
978
|
* Starts the enter animation.
|
|
917
979
|
* @return {?}
|
|
918
980
|
*/
|
|
919
|
-
|
|
981
|
+
_MatMenuBase.prototype._startAnimation = /**
|
|
920
982
|
* Starts the enter animation.
|
|
921
983
|
* @return {?}
|
|
922
984
|
*/
|
|
@@ -929,7 +991,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
929
991
|
* Resets the panel animation to its initial state.
|
|
930
992
|
* @return {?}
|
|
931
993
|
*/
|
|
932
|
-
|
|
994
|
+
_MatMenuBase.prototype._resetAnimation = /**
|
|
933
995
|
* Resets the panel animation to its initial state.
|
|
934
996
|
* @return {?}
|
|
935
997
|
*/
|
|
@@ -943,7 +1005,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
943
1005
|
* @param {?} event
|
|
944
1006
|
* @return {?}
|
|
945
1007
|
*/
|
|
946
|
-
|
|
1008
|
+
_MatMenuBase.prototype._onAnimationDone = /**
|
|
947
1009
|
* Callback that is invoked when the panel animation completes.
|
|
948
1010
|
* @param {?} event
|
|
949
1011
|
* @return {?}
|
|
@@ -956,7 +1018,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
956
1018
|
* @param {?} event
|
|
957
1019
|
* @return {?}
|
|
958
1020
|
*/
|
|
959
|
-
|
|
1021
|
+
_MatMenuBase.prototype._onAnimationStart = /**
|
|
960
1022
|
* @param {?} event
|
|
961
1023
|
* @return {?}
|
|
962
1024
|
*/
|
|
@@ -972,29 +1034,13 @@ var MatMenu = /** @class */ (function () {
|
|
|
972
1034
|
event.element.scrollTop = 0;
|
|
973
1035
|
}
|
|
974
1036
|
};
|
|
975
|
-
MatMenu.decorators = [
|
|
976
|
-
{ type: core.Component, args: [{selector: 'mat-menu',
|
|
977
|
-
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>",
|
|
978
|
-
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}"],
|
|
979
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
980
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
981
|
-
exportAs: 'matMenu',
|
|
982
|
-
animations: [
|
|
983
|
-
matMenuAnimations.transformMenu,
|
|
984
|
-
matMenuAnimations.fadeInItems
|
|
985
|
-
],
|
|
986
|
-
providers: [
|
|
987
|
-
{ provide: MAT_MENU_PANEL, useExisting: MatMenu }
|
|
988
|
-
]
|
|
989
|
-
},] },
|
|
990
|
-
];
|
|
991
1037
|
/** @nocollapse */
|
|
992
|
-
|
|
1038
|
+
_MatMenuBase.ctorParameters = function () { return [
|
|
993
1039
|
{ type: core.ElementRef },
|
|
994
1040
|
{ type: core.NgZone },
|
|
995
1041
|
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_MENU_DEFAULT_OPTIONS,] }] }
|
|
996
1042
|
]; };
|
|
997
|
-
|
|
1043
|
+
_MatMenuBase.propDecorators = {
|
|
998
1044
|
backdropClass: [{ type: core.Input }],
|
|
999
1045
|
xPosition: [{ type: core.Input }],
|
|
1000
1046
|
yPosition: [{ type: core.Input }],
|
|
@@ -1008,12 +1054,59 @@ var MatMenu = /** @class */ (function () {
|
|
|
1008
1054
|
closed: [{ type: core.Output }],
|
|
1009
1055
|
close: [{ type: core.Output }]
|
|
1010
1056
|
};
|
|
1011
|
-
return
|
|
1057
|
+
return _MatMenuBase;
|
|
1012
1058
|
}());
|
|
1059
|
+
var MatMenu = /** @class */ (function (_super) {
|
|
1060
|
+
__extends(MatMenu, _super);
|
|
1061
|
+
function MatMenu() {
|
|
1062
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1063
|
+
}
|
|
1064
|
+
return MatMenu;
|
|
1065
|
+
}(_MatMenuBase));
|
|
1066
|
+
// Note on the weird inheritance setup: we need three classes, because the MDC-based menu has to
|
|
1067
|
+
// extend `MatMenu`, however keeping a reference to it will cause the inlined template and styles
|
|
1068
|
+
// to be retained as well. The MDC menu also has to provide itself as a `MatMenu` in order for
|
|
1069
|
+
// queries and DI to work correctly, while still not referencing the actual menu class.
|
|
1070
|
+
// Class responsibility is split up as follows:
|
|
1071
|
+
// * _MatMenuBase - provides all the functionality without any of the Angular metadata.
|
|
1072
|
+
// * MatMenu - keeps the same name symbol name as the current menu and
|
|
1073
|
+
// is used as a provider for DI and query purposes.
|
|
1074
|
+
// * _MatMenu - the actual menu component implementation with the Angular metadata that should
|
|
1075
|
+
// be tree shaken away for MDC.
|
|
1076
|
+
var _MatMenu = /** @class */ (function (_super) {
|
|
1077
|
+
__extends(_MatMenu, _super);
|
|
1078
|
+
function _MatMenu(elementRef, ngZone, defaultOptions) {
|
|
1079
|
+
return _super.call(this, elementRef, ngZone, defaultOptions) || this;
|
|
1080
|
+
}
|
|
1081
|
+
_MatMenu.decorators = [
|
|
1082
|
+
{ type: core.Component, args: [{selector: 'mat-menu',
|
|
1083
|
+
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>",
|
|
1084
|
+
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}"],
|
|
1085
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1086
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
1087
|
+
exportAs: 'matMenu',
|
|
1088
|
+
animations: [
|
|
1089
|
+
matMenuAnimations.transformMenu,
|
|
1090
|
+
matMenuAnimations.fadeInItems
|
|
1091
|
+
],
|
|
1092
|
+
providers: [
|
|
1093
|
+
{ provide: MAT_MENU_PANEL, useExisting: MatMenu },
|
|
1094
|
+
{ provide: MatMenu, useExisting: _MatMenu }
|
|
1095
|
+
]
|
|
1096
|
+
},] },
|
|
1097
|
+
];
|
|
1098
|
+
/** @nocollapse */
|
|
1099
|
+
_MatMenu.ctorParameters = function () { return [
|
|
1100
|
+
{ type: core.ElementRef },
|
|
1101
|
+
{ type: core.NgZone },
|
|
1102
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_MENU_DEFAULT_OPTIONS,] }] }
|
|
1103
|
+
]; };
|
|
1104
|
+
return _MatMenu;
|
|
1105
|
+
}(MatMenu));
|
|
1013
1106
|
|
|
1014
1107
|
/**
|
|
1015
1108
|
* @fileoverview added by tsickle
|
|
1016
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1109
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1017
1110
|
*/
|
|
1018
1111
|
/**
|
|
1019
1112
|
* Injection token that determines the scroll handling while the menu is open.
|
|
@@ -1026,7 +1119,10 @@ var MAT_MENU_SCROLL_STRATEGY = new core.InjectionToken('mat-menu-scroll-strategy
|
|
|
1026
1119
|
* @return {?}
|
|
1027
1120
|
*/
|
|
1028
1121
|
function MAT_MENU_SCROLL_STRATEGY_FACTORY(overlay$$1) {
|
|
1029
|
-
return
|
|
1122
|
+
return (/**
|
|
1123
|
+
* @return {?}
|
|
1124
|
+
*/
|
|
1125
|
+
function () { return overlay$$1.scrollStrategies.reposition(); });
|
|
1030
1126
|
}
|
|
1031
1127
|
/**
|
|
1032
1128
|
* \@docs-private
|
|
@@ -1071,7 +1167,10 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1071
1167
|
* Handles touch start events on the trigger.
|
|
1072
1168
|
* Needs to be an arrow function so we can easily use addEventListener and removeEventListener.
|
|
1073
1169
|
*/
|
|
1074
|
-
this._handleTouchStart =
|
|
1170
|
+
this._handleTouchStart = (/**
|
|
1171
|
+
* @return {?}
|
|
1172
|
+
*/
|
|
1173
|
+
function () { return _this._openedBy = 'touch'; });
|
|
1075
1174
|
// Tracking input type is necessary so it's possible to only auto-focus
|
|
1076
1175
|
// the first item of the list when the menu is opened via the keyboard
|
|
1077
1176
|
this._openedBy = null;
|
|
@@ -1149,13 +1248,17 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1149
1248
|
this._menu = menu;
|
|
1150
1249
|
this._menuCloseSubscription.unsubscribe();
|
|
1151
1250
|
if (menu) {
|
|
1152
|
-
this._menuCloseSubscription = menu.close.asObservable().subscribe(
|
|
1251
|
+
this._menuCloseSubscription = menu.close.asObservable().subscribe((/**
|
|
1252
|
+
* @param {?} reason
|
|
1253
|
+
* @return {?}
|
|
1254
|
+
*/
|
|
1255
|
+
function (reason) {
|
|
1153
1256
|
_this._destroyMenu();
|
|
1154
1257
|
// If a click closed the menu, we should close the entire chain of nested menus.
|
|
1155
1258
|
if ((reason === 'click' || reason === 'tab') && _this._parentMenu) {
|
|
1156
1259
|
_this._parentMenu.closed.emit(reason);
|
|
1157
1260
|
}
|
|
1158
|
-
});
|
|
1261
|
+
}));
|
|
1159
1262
|
}
|
|
1160
1263
|
},
|
|
1161
1264
|
enumerable: true,
|
|
@@ -1183,8 +1286,9 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1183
1286
|
this._overlayRef = null;
|
|
1184
1287
|
}
|
|
1185
1288
|
this._element.nativeElement.removeEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);
|
|
1186
|
-
this.
|
|
1289
|
+
this._menuCloseSubscription.unsubscribe();
|
|
1187
1290
|
this._closingActionsSubscription.unsubscribe();
|
|
1291
|
+
this._hoverSubscription.unsubscribe();
|
|
1188
1292
|
};
|
|
1189
1293
|
Object.defineProperty(MatMenuTrigger.prototype, "menuOpen", {
|
|
1190
1294
|
/** Whether the menu is open. */
|
|
@@ -1260,7 +1364,10 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1260
1364
|
if (this.menu.lazyContent) {
|
|
1261
1365
|
this.menu.lazyContent.attach(this.menuData);
|
|
1262
1366
|
}
|
|
1263
|
-
this._closingActionsSubscription = this._menuClosingActions().subscribe(
|
|
1367
|
+
this._closingActionsSubscription = this._menuClosingActions().subscribe((/**
|
|
1368
|
+
* @return {?}
|
|
1369
|
+
*/
|
|
1370
|
+
function () { return _this.closeMenu(); }));
|
|
1264
1371
|
this._initMenu();
|
|
1265
1372
|
if (this.menu instanceof MatMenu) {
|
|
1266
1373
|
this.menu._startAnimation();
|
|
@@ -1326,13 +1433,23 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1326
1433
|
if (menu.lazyContent) {
|
|
1327
1434
|
// Wait for the exit animation to finish before detaching the content.
|
|
1328
1435
|
menu._animationDone
|
|
1329
|
-
.pipe(operators.filter(
|
|
1436
|
+
.pipe(operators.filter((/**
|
|
1437
|
+
* @param {?} event
|
|
1438
|
+
* @return {?}
|
|
1439
|
+
*/
|
|
1440
|
+
function (event) { return event.toState === 'void'; })), operators.take(1),
|
|
1330
1441
|
// Interrupt if the content got re-attached.
|
|
1331
1442
|
operators.takeUntil(menu.lazyContent._attached))
|
|
1332
|
-
.subscribe(
|
|
1443
|
+
.subscribe((/**
|
|
1444
|
+
* @return {?}
|
|
1445
|
+
*/
|
|
1446
|
+
function () { return (/** @type {?} */ (menu.lazyContent)).detach(); }), undefined, (/**
|
|
1447
|
+
* @return {?}
|
|
1448
|
+
*/
|
|
1449
|
+
function () {
|
|
1333
1450
|
// No matter whether the content got re-attached, reset the menu.
|
|
1334
1451
|
_this._resetMenu();
|
|
1335
|
-
});
|
|
1452
|
+
}));
|
|
1336
1453
|
}
|
|
1337
1454
|
else {
|
|
1338
1455
|
this._resetMenu();
|
|
@@ -1515,7 +1632,7 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1515
1632
|
positionStrategy: this._overlay.position()
|
|
1516
1633
|
.flexibleConnectedTo(this._element)
|
|
1517
1634
|
.withLockedPosition()
|
|
1518
|
-
.withTransformOriginOn('.mat-menu-panel'),
|
|
1635
|
+
.withTransformOriginOn('.mat-menu-panel, .mat-mdc-menu-panel'),
|
|
1519
1636
|
backdropClass: this.menu.backdropClass || 'cdk-overlay-transparent-backdrop',
|
|
1520
1637
|
scrollStrategy: this._scrollStrategy(),
|
|
1521
1638
|
direction: this._dir
|
|
@@ -1545,13 +1662,17 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1545
1662
|
function (position) {
|
|
1546
1663
|
var _this = this;
|
|
1547
1664
|
if (this.menu.setPositionClasses) {
|
|
1548
|
-
position.positionChanges.subscribe(
|
|
1665
|
+
position.positionChanges.subscribe((/**
|
|
1666
|
+
* @param {?} change
|
|
1667
|
+
* @return {?}
|
|
1668
|
+
*/
|
|
1669
|
+
function (change) {
|
|
1549
1670
|
/** @type {?} */
|
|
1550
1671
|
var posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
|
|
1551
1672
|
/** @type {?} */
|
|
1552
1673
|
var posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
|
|
1553
1674
|
(/** @type {?} */ (_this.menu.setPositionClasses))(posX, posY);
|
|
1554
|
-
});
|
|
1675
|
+
}));
|
|
1555
1676
|
}
|
|
1556
1677
|
};
|
|
1557
1678
|
/**
|
|
@@ -1610,21 +1731,6 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1610
1731
|
}
|
|
1611
1732
|
]);
|
|
1612
1733
|
};
|
|
1613
|
-
/** Cleans up the active subscriptions. */
|
|
1614
|
-
/**
|
|
1615
|
-
* Cleans up the active subscriptions.
|
|
1616
|
-
* @private
|
|
1617
|
-
* @return {?}
|
|
1618
|
-
*/
|
|
1619
|
-
MatMenuTrigger.prototype._cleanUpSubscriptions = /**
|
|
1620
|
-
* Cleans up the active subscriptions.
|
|
1621
|
-
* @private
|
|
1622
|
-
* @return {?}
|
|
1623
|
-
*/
|
|
1624
|
-
function () {
|
|
1625
|
-
this._closingActionsSubscription.unsubscribe();
|
|
1626
|
-
this._hoverSubscription.unsubscribe();
|
|
1627
|
-
};
|
|
1628
1734
|
/** Returns a stream that emits whenever an action that should close the menu occurs. */
|
|
1629
1735
|
/**
|
|
1630
1736
|
* Returns a stream that emits whenever an action that should close the menu occurs.
|
|
@@ -1645,7 +1751,14 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1645
1751
|
/** @type {?} */
|
|
1646
1752
|
var parentClose = this._parentMenu ? this._parentMenu.closed : rxjs.of();
|
|
1647
1753
|
/** @type {?} */
|
|
1648
|
-
var hover = this._parentMenu ? this._parentMenu._hovered().pipe(operators.filter(
|
|
1754
|
+
var hover = this._parentMenu ? this._parentMenu._hovered().pipe(operators.filter((/**
|
|
1755
|
+
* @param {?} active
|
|
1756
|
+
* @return {?}
|
|
1757
|
+
*/
|
|
1758
|
+
function (active) { return active !== _this._menuItemInstance; })), operators.filter((/**
|
|
1759
|
+
* @return {?}
|
|
1760
|
+
*/
|
|
1761
|
+
function () { return _this._menuOpen; }))) : rxjs.of();
|
|
1649
1762
|
return rxjs.merge(backdrop, parentClose, hover, detachments);
|
|
1650
1763
|
};
|
|
1651
1764
|
/** Handles mouse presses on the trigger. */
|
|
@@ -1733,8 +1846,15 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1733
1846
|
// Since we might have multiple competing triggers for the same menu (e.g. a sub-menu
|
|
1734
1847
|
// with different data and triggers), we have to delay it by a tick to ensure that
|
|
1735
1848
|
// it won't be closed immediately after it is opened.
|
|
1736
|
-
.pipe(operators.filter(
|
|
1737
|
-
|
|
1849
|
+
.pipe(operators.filter((/**
|
|
1850
|
+
* @param {?} active
|
|
1851
|
+
* @return {?}
|
|
1852
|
+
*/
|
|
1853
|
+
function (active) { return active === _this._menuItemInstance && !active.disabled; })), operators.delay(0, rxjs.asapScheduler))
|
|
1854
|
+
.subscribe((/**
|
|
1855
|
+
* @return {?}
|
|
1856
|
+
*/
|
|
1857
|
+
function () {
|
|
1738
1858
|
_this._openedBy = 'mouse';
|
|
1739
1859
|
// If the same menu is used between multiple triggers, it might still be animating
|
|
1740
1860
|
// while the new trigger tries to re-open it. Wait for the animation to finish
|
|
@@ -1744,12 +1864,15 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1744
1864
|
// 'changed after checked' errors in some cases. See #12194.
|
|
1745
1865
|
_this.menu._animationDone
|
|
1746
1866
|
.pipe(operators.take(1), operators.delay(0, rxjs.asapScheduler), operators.takeUntil(_this._parentMenu._hovered()))
|
|
1747
|
-
.subscribe(
|
|
1867
|
+
.subscribe((/**
|
|
1868
|
+
* @return {?}
|
|
1869
|
+
*/
|
|
1870
|
+
function () { return _this.openMenu(); }));
|
|
1748
1871
|
}
|
|
1749
1872
|
else {
|
|
1750
1873
|
_this.openMenu();
|
|
1751
1874
|
}
|
|
1752
|
-
});
|
|
1875
|
+
}));
|
|
1753
1876
|
};
|
|
1754
1877
|
/** Gets the portal that should be attached to the overlay. */
|
|
1755
1878
|
/**
|
|
@@ -1810,8 +1933,24 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1810
1933
|
|
|
1811
1934
|
/**
|
|
1812
1935
|
* @fileoverview added by tsickle
|
|
1813
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1936
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1814
1937
|
*/
|
|
1938
|
+
/**
|
|
1939
|
+
* Used by both the current `MatMenuModule` and the MDC `MatMenuModule`
|
|
1940
|
+
* to declare the menu-related directives.
|
|
1941
|
+
*/
|
|
1942
|
+
var _MatMenuDirectivesModule = /** @class */ (function () {
|
|
1943
|
+
function _MatMenuDirectivesModule() {
|
|
1944
|
+
}
|
|
1945
|
+
_MatMenuDirectivesModule.decorators = [
|
|
1946
|
+
{ type: core.NgModule, args: [{
|
|
1947
|
+
exports: [MatMenuTrigger, MatMenuContent, core$1.MatCommonModule],
|
|
1948
|
+
declarations: [MatMenuTrigger, MatMenuContent],
|
|
1949
|
+
providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER]
|
|
1950
|
+
},] },
|
|
1951
|
+
];
|
|
1952
|
+
return _MatMenuDirectivesModule;
|
|
1953
|
+
}());
|
|
1815
1954
|
var MatMenuModule = /** @class */ (function () {
|
|
1816
1955
|
function MatMenuModule() {
|
|
1817
1956
|
}
|
|
@@ -1822,31 +1961,33 @@ var MatMenuModule = /** @class */ (function () {
|
|
|
1822
1961
|
core$1.MatCommonModule,
|
|
1823
1962
|
core$1.MatRippleModule,
|
|
1824
1963
|
overlay.OverlayModule,
|
|
1964
|
+
_MatMenuDirectivesModule,
|
|
1825
1965
|
],
|
|
1826
|
-
exports: [
|
|
1827
|
-
declarations: [
|
|
1966
|
+
exports: [_MatMenu, MatMenuItem, _MatMenuDirectivesModule],
|
|
1967
|
+
declarations: [_MatMenu, MatMenuItem],
|
|
1828
1968
|
providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER]
|
|
1829
1969
|
},] },
|
|
1830
1970
|
];
|
|
1831
1971
|
return MatMenuModule;
|
|
1832
1972
|
}());
|
|
1833
1973
|
|
|
1834
|
-
exports.MAT_MENU_SCROLL_STRATEGY = MAT_MENU_SCROLL_STRATEGY;
|
|
1835
|
-
exports.MatMenuModule = MatMenuModule;
|
|
1836
1974
|
exports.MatMenu = MatMenu;
|
|
1837
1975
|
exports.MAT_MENU_DEFAULT_OPTIONS = MAT_MENU_DEFAULT_OPTIONS;
|
|
1976
|
+
exports._MatMenu = _MatMenu;
|
|
1977
|
+
exports._MatMenuBase = _MatMenuBase;
|
|
1838
1978
|
exports.MatMenuItem = MatMenuItem;
|
|
1839
1979
|
exports.MatMenuTrigger = MatMenuTrigger;
|
|
1980
|
+
exports.MAT_MENU_SCROLL_STRATEGY = MAT_MENU_SCROLL_STRATEGY;
|
|
1981
|
+
exports.MAT_MENU_PANEL = MAT_MENU_PANEL;
|
|
1982
|
+
exports._MatMenuDirectivesModule = _MatMenuDirectivesModule;
|
|
1983
|
+
exports.MatMenuModule = MatMenuModule;
|
|
1840
1984
|
exports.matMenuAnimations = matMenuAnimations;
|
|
1841
1985
|
exports.fadeInItems = fadeInItems;
|
|
1842
1986
|
exports.transformMenu = transformMenu;
|
|
1843
1987
|
exports.MatMenuContent = MatMenuContent;
|
|
1844
|
-
exports.ɵ
|
|
1845
|
-
exports.ɵ
|
|
1846
|
-
exports.ɵ
|
|
1847
|
-
exports.ɵf23 = MAT_MENU_PANEL;
|
|
1848
|
-
exports.ɵd23 = MAT_MENU_SCROLL_STRATEGY_FACTORY;
|
|
1849
|
-
exports.ɵe23 = MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER;
|
|
1988
|
+
exports.ɵa24 = MAT_MENU_DEFAULT_OPTIONS_FACTORY;
|
|
1989
|
+
exports.ɵb24 = MAT_MENU_SCROLL_STRATEGY_FACTORY;
|
|
1990
|
+
exports.ɵc24 = MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER;
|
|
1850
1991
|
|
|
1851
1992
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1852
1993
|
|