@angular/material 7.0.4 → 7.2.1
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/LICENSE +1 -1
- package/_theming.scss +61 -44
- package/autocomplete/typings/index.d.ts +1 -1
- package/autocomplete/typings/index.metadata.json +1 -1
- package/badge/typings/index.metadata.json +1 -1
- package/bottom-sheet/typings/bottom-sheet-config.d.ts +5 -0
- package/bottom-sheet/typings/bottom-sheet-container.d.ts +1 -1
- package/bottom-sheet/typings/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js +126 -32
- 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 +38 -5
- 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 +68 -21
- 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 +36 -13
- 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 +21 -14
- 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 +3 -3
- package/bundles/material-card.umd.js.map +1 -1
- package/bundles/material-card.umd.min.js +1 -1
- package/bundles/material-card.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +56 -15
- 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 +124 -34
- 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 +189 -126
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +1 -1
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +231 -53
- 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 +138 -40
- 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 +53 -27
- 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 +121 -32
- 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 +66 -15
- 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 +277 -78
- 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 +50 -22
- 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 +69 -21
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +2 -6
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +171 -66
- 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 +52 -10
- 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 +31 -12
- 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 +29 -13
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +38 -40
- 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 +189 -51
- 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 +104 -25
- 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 +30 -14
- 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 +91 -21
- 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 +71 -19
- 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 +46 -24
- 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 +37 -35
- 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 +29 -9
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +170 -68
- 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 +14 -4
- 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 +53 -26
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +1 -1
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +25 -16
- 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 +2853 -1010
- package/bundles/material.umd.js.map +1 -1
- package/bundles/material.umd.min.js +19 -21
- package/bundles/material.umd.min.js.map +1 -1
- package/button/typings/button.d.ts +0 -5
- package/button/typings/index.metadata.json +1 -1
- package/button-toggle/typings/index.metadata.json +1 -1
- package/card/typings/index.metadata.json +1 -1
- package/checkbox/typings/index.metadata.json +1 -1
- package/chips/typings/chip-list.d.ts +1 -1
- package/chips/typings/chip.d.ts +2 -2
- package/chips/typings/index.metadata.json +1 -1
- package/core/typings/index.metadata.json +1 -1
- package/core/typings/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
- package/core/typings/public-api.d.ts +1 -1
- package/datepicker/typings/calendar-body.d.ts +21 -5
- package/datepicker/typings/calendar.d.ts +4 -1
- package/datepicker/typings/datepicker.d.ts +3 -0
- package/datepicker/typings/index.metadata.json +1 -1
- package/datepicker/typings/month-view.d.ts +4 -2
- package/dialog/typings/index.metadata.json +1 -1
- package/esm2015/autocomplete.js +60 -29
- package/esm2015/autocomplete.js.map +1 -1
- package/esm2015/badge.js +29 -6
- package/esm2015/badge.js.map +1 -1
- package/esm2015/bottom-sheet.js +45 -22
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js +20 -11
- package/esm2015/button-toggle.js.map +1 -1
- package/esm2015/button.js +20 -15
- package/esm2015/button.js.map +1 -1
- package/esm2015/card.js +5 -5
- package/esm2015/card.js.map +1 -1
- package/esm2015/checkbox.js +30 -12
- package/esm2015/checkbox.js.map +1 -1
- package/esm2015/chips.js +64 -28
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +148 -129
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +124 -41
- package/esm2015/datepicker.js.map +1 -1
- package/esm2015/dialog.js +77 -40
- package/esm2015/dialog.js.map +1 -1
- package/esm2015/divider.js +4 -4
- package/esm2015/divider.js.map +1 -1
- package/esm2015/expansion.js +58 -31
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +94 -34
- package/esm2015/form-field.js.map +1 -1
- package/esm2015/grid-list.js +45 -17
- package/esm2015/grid-list.js.map +1 -1
- package/esm2015/icon.js +136 -67
- package/esm2015/icon.js.map +1 -1
- package/esm2015/input.js +44 -23
- package/esm2015/input.js.map +1 -1
- package/esm2015/list.js +47 -22
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +13 -12
- package/esm2015/material.js.map +1 -1
- package/esm2015/menu.js +109 -63
- package/esm2015/menu.js.map +1 -1
- package/esm2015/paginator.js +35 -12
- package/esm2015/paginator.js.map +1 -1
- package/esm2015/progress-bar.js +26 -13
- package/esm2015/progress-bar.js.map +1 -1
- package/esm2015/progress-spinner.js +24 -14
- package/esm2015/progress-spinner.js.map +1 -1
- package/esm2015/radio.js +22 -21
- package/esm2015/radio.js.map +1 -1
- package/esm2015/select.js +116 -53
- package/esm2015/select.js.map +1 -1
- package/esm2015/sidenav.js +75 -28
- package/esm2015/sidenav.js.map +1 -1
- package/esm2015/slide-toggle.js +23 -15
- package/esm2015/slide-toggle.js.map +1 -1
- package/esm2015/slider.js +54 -24
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +41 -21
- package/esm2015/snack-bar.js.map +1 -1
- package/esm2015/sort.js +47 -24
- package/esm2015/sort.js.map +1 -1
- package/esm2015/stepper.js +35 -32
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +31 -11
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +113 -53
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/toolbar.js +9 -5
- package/esm2015/toolbar.js.map +1 -1
- package/esm2015/tooltip.js +43 -28
- package/esm2015/tooltip.js.map +1 -1
- package/esm2015/tree.js +22 -17
- package/esm2015/tree.js.map +1 -1
- package/esm5/autocomplete.es5.js +128 -34
- package/esm5/autocomplete.es5.js.map +1 -1
- package/esm5/badge.es5.js +40 -7
- package/esm5/badge.es5.js.map +1 -1
- package/esm5/bottom-sheet.es5.js +70 -23
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js +38 -15
- package/esm5/button-toggle.es5.js.map +1 -1
- package/esm5/button.es5.js +23 -16
- package/esm5/button.es5.js.map +1 -1
- package/esm5/card.es5.js +5 -5
- package/esm5/card.es5.js.map +1 -1
- package/esm5/checkbox.es5.js +58 -17
- package/esm5/checkbox.es5.js.map +1 -1
- package/esm5/chips.es5.js +127 -37
- package/esm5/chips.es5.js.map +1 -1
- package/esm5/core.es5.js +192 -129
- package/esm5/core.es5.js.map +1 -1
- package/esm5/datepicker.es5.js +233 -55
- package/esm5/datepicker.es5.js.map +1 -1
- package/esm5/dialog.es5.js +140 -42
- 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 +56 -31
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +125 -36
- package/esm5/form-field.es5.js.map +1 -1
- package/esm5/grid-list.es5.js +68 -17
- package/esm5/grid-list.es5.js.map +1 -1
- package/esm5/icon.es5.js +279 -80
- package/esm5/icon.es5.js.map +1 -1
- package/esm5/input.es5.js +52 -24
- package/esm5/input.es5.js.map +1 -1
- package/esm5/list.es5.js +72 -24
- package/esm5/list.es5.js.map +1 -1
- package/esm5/material.es5.js +13 -12
- package/esm5/material.es5.js.map +1 -1
- package/esm5/menu.es5.js +170 -65
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/paginator.es5.js +55 -13
- package/esm5/paginator.es5.js.map +1 -1
- package/esm5/progress-bar.es5.js +33 -14
- package/esm5/progress-bar.es5.js.map +1 -1
- package/esm5/progress-spinner.es5.js +31 -15
- package/esm5/progress-spinner.es5.js.map +1 -1
- package/esm5/radio.es5.js +42 -42
- package/esm5/radio.es5.js.map +1 -1
- package/esm5/select.es5.js +193 -55
- package/esm5/select.es5.js.map +1 -1
- package/esm5/sidenav.es5.js +107 -28
- package/esm5/sidenav.es5.js.map +1 -1
- package/esm5/slide-toggle.es5.js +32 -16
- package/esm5/slide-toggle.es5.js.map +1 -1
- package/esm5/slider.es5.js +94 -24
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +73 -21
- package/esm5/snack-bar.es5.js.map +1 -1
- package/esm5/sort.es5.js +53 -26
- package/esm5/sort.es5.js.map +1 -1
- package/esm5/stepper.es5.js +40 -38
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +31 -11
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +162 -61
- package/esm5/tabs.es5.js.map +1 -1
- package/esm5/toolbar.es5.js +16 -6
- package/esm5/toolbar.es5.js.map +1 -1
- package/esm5/tooltip.es5.js +55 -28
- package/esm5/tooltip.es5.js.map +1 -1
- package/esm5/tree.es5.js +27 -18
- package/esm5/tree.es5.js.map +1 -1
- package/expansion/typings/expansion-panel-header.d.ts +2 -2
- package/expansion/typings/expansion-panel.d.ts +19 -2
- package/expansion/typings/index.metadata.json +1 -1
- package/form-field/typings/form-field.d.ts +15 -4
- 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/index.metadata.json +1 -1
- package/list/typings/index.metadata.json +1 -1
- package/material.d.ts +1 -1
- package/material.metadata.json +3 -3
- package/menu/typings/index.d.ts +4 -4
- package/menu/typings/index.metadata.json +1 -1
- package/menu/typings/menu-directive.d.ts +1 -0
- package/menu/typings/menu-item.d.ts +2 -0
- package/package.json +5 -5
- package/paginator/typings/index.metadata.json +1 -1
- package/paginator/typings/paginator.d.ts +7 -3
- 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/radio/typings/index.metadata.json +1 -1
- package/radio/typings/radio.d.ts +2 -6
- package/schematics/ng-add/theming/{custom-theme.d.ts → create-custom-theme.d.ts} +0 -0
- package/schematics/ng-add/theming/{custom-theme.js → create-custom-theme.js} +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js.map +1 -0
- package/schematics/ng-add/theming/theming.js +35 -19
- package/schematics/ng-add/theming/theming.js.map +1 -1
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/select/typings/index.metadata.json +1 -1
- package/select/typings/select.d.ts +12 -2
- package/sidenav/typings/drawer.d.ts +9 -2
- package/sidenav/typings/index.metadata.json +1 -1
- package/slide-toggle/typings/index.metadata.json +1 -1
- package/slider/typings/index.metadata.json +1 -1
- package/snack-bar/typings/index.metadata.json +1 -1
- package/sort/typings/index.metadata.json +1 -1
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/step-header.d.ts +3 -5
- package/tabs/typings/index.d.ts +5 -5
- package/tabs/typings/index.metadata.json +1 -1
- package/tabs/typings/tab-body.d.ts +2 -0
- package/tabs/typings/tab-group.d.ts +11 -2
- package/tabs/typings/tab-header.d.ts +9 -3
- package/toolbar/typings/index.metadata.json +1 -1
- package/tooltip/typings/index.metadata.json +1 -1
- package/tree/typings/data-source/flat-data-source.d.ts +2 -2
- package/tree/typings/index.metadata.json +1 -1
- package/typings/autocomplete/index.d.ts +1 -1
- package/typings/autocomplete/index.metadata.json +1 -1
- package/typings/badge/index.metadata.json +1 -1
- package/typings/bottom-sheet/bottom-sheet-config.d.ts +5 -0
- package/typings/bottom-sheet/bottom-sheet-container.d.ts +1 -1
- package/typings/bottom-sheet/index.metadata.json +1 -1
- package/typings/button/button.d.ts +0 -5
- package/typings/button/index.metadata.json +1 -1
- package/typings/button-toggle/index.metadata.json +1 -1
- package/typings/card/index.metadata.json +1 -1
- package/typings/checkbox/index.metadata.json +1 -1
- package/typings/chips/chip-list.d.ts +1 -1
- package/typings/chips/chip.d.ts +2 -2
- package/typings/chips/index.metadata.json +1 -1
- package/typings/core/index.metadata.json +1 -1
- package/typings/core/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
- package/typings/core/public-api.d.ts +1 -1
- package/typings/datepicker/calendar-body.d.ts +21 -5
- package/typings/datepicker/calendar.d.ts +4 -1
- package/typings/datepicker/datepicker.d.ts +3 -0
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/datepicker/month-view.d.ts +4 -2
- package/typings/dialog/index.metadata.json +1 -1
- package/typings/esm5/autocomplete/index.d.ts +1 -1
- package/typings/esm5/autocomplete/index.metadata.json +1 -1
- package/typings/esm5/badge/index.metadata.json +1 -1
- package/typings/esm5/bottom-sheet/bottom-sheet-config.d.ts +5 -0
- package/typings/esm5/bottom-sheet/bottom-sheet-container.d.ts +1 -1
- package/typings/esm5/bottom-sheet/index.metadata.json +1 -1
- package/typings/esm5/button/button.d.ts +0 -5
- package/typings/esm5/button/index.metadata.json +1 -1
- package/typings/esm5/button-toggle/index.metadata.json +1 -1
- package/typings/esm5/card/index.metadata.json +1 -1
- package/typings/esm5/checkbox/index.metadata.json +1 -1
- package/typings/esm5/chips/chip-list.d.ts +1 -1
- package/typings/esm5/chips/chip.d.ts +2 -2
- package/typings/esm5/chips/index.metadata.json +1 -1
- package/typings/esm5/core/index.metadata.json +1 -1
- package/typings/esm5/core/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
- package/typings/esm5/core/public-api.d.ts +1 -1
- package/typings/esm5/datepicker/calendar-body.d.ts +21 -5
- package/typings/esm5/datepicker/calendar.d.ts +4 -1
- package/typings/esm5/datepicker/datepicker.d.ts +3 -0
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- package/typings/esm5/datepicker/month-view.d.ts +4 -2
- package/typings/esm5/dialog/index.metadata.json +1 -1
- package/typings/esm5/expansion/expansion-panel-header.d.ts +2 -2
- package/typings/esm5/expansion/expansion-panel.d.ts +19 -2
- package/typings/esm5/expansion/index.metadata.json +1 -1
- package/typings/esm5/form-field/form-field.d.ts +15 -4
- 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/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/list/index.metadata.json +1 -1
- package/typings/esm5/menu/index.d.ts +4 -4
- package/typings/esm5/menu/index.metadata.json +1 -1
- package/typings/esm5/menu/menu-directive.d.ts +1 -0
- package/typings/esm5/menu/menu-item.d.ts +2 -0
- package/typings/esm5/paginator/index.metadata.json +1 -1
- package/typings/esm5/paginator/paginator.d.ts +7 -3
- package/typings/esm5/progress-bar/index.metadata.json +1 -1
- package/typings/esm5/radio/index.metadata.json +1 -1
- package/typings/esm5/radio/radio.d.ts +2 -6
- package/typings/esm5/select/index.metadata.json +1 -1
- package/typings/esm5/select/select.d.ts +12 -2
- package/typings/esm5/sidenav/drawer.d.ts +9 -2
- package/typings/esm5/sidenav/index.metadata.json +1 -1
- package/typings/esm5/slide-toggle/index.metadata.json +1 -1
- package/typings/esm5/slider/index.metadata.json +1 -1
- package/typings/esm5/snack-bar/index.metadata.json +1 -1
- package/typings/esm5/sort/index.metadata.json +1 -1
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/step-header.d.ts +3 -5
- package/typings/esm5/tabs/index.d.ts +5 -5
- package/typings/esm5/tabs/index.metadata.json +1 -1
- package/typings/esm5/tabs/tab-body.d.ts +2 -0
- package/typings/esm5/tabs/tab-group.d.ts +11 -2
- package/typings/esm5/tabs/tab-header.d.ts +9 -3
- package/typings/esm5/toolbar/index.metadata.json +1 -1
- package/typings/esm5/tooltip/index.metadata.json +1 -1
- package/typings/esm5/tree/data-source/flat-data-source.d.ts +2 -2
- package/typings/esm5/tree/index.metadata.json +1 -1
- package/typings/expansion/expansion-panel-header.d.ts +2 -2
- package/typings/expansion/expansion-panel.d.ts +19 -2
- package/typings/expansion/index.metadata.json +1 -1
- package/typings/form-field/form-field.d.ts +15 -4
- 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/index.metadata.json +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/list/index.metadata.json +1 -1
- package/typings/menu/index.d.ts +4 -4
- package/typings/menu/index.metadata.json +1 -1
- package/typings/menu/menu-directive.d.ts +1 -0
- package/typings/menu/menu-item.d.ts +2 -0
- package/typings/paginator/index.metadata.json +1 -1
- package/typings/paginator/paginator.d.ts +7 -3
- package/typings/progress-bar/index.metadata.json +1 -1
- package/typings/radio/index.metadata.json +1 -1
- package/typings/radio/radio.d.ts +2 -6
- package/typings/schematics/ng-add/theming/{custom-theme.d.ts → create-custom-theme.d.ts} +0 -0
- package/typings/select/index.metadata.json +1 -1
- package/typings/select/select.d.ts +12 -2
- package/typings/sidenav/drawer.d.ts +9 -2
- package/typings/sidenav/index.metadata.json +1 -1
- package/typings/slide-toggle/index.metadata.json +1 -1
- package/typings/slider/index.metadata.json +1 -1
- package/typings/snack-bar/index.metadata.json +1 -1
- package/typings/sort/index.metadata.json +1 -1
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/step-header.d.ts +3 -5
- package/typings/tabs/index.d.ts +5 -5
- package/typings/tabs/index.metadata.json +1 -1
- package/typings/tabs/tab-body.d.ts +2 -0
- package/typings/tabs/tab-group.d.ts +11 -2
- package/typings/tabs/tab-header.d.ts +9 -3
- package/typings/toolbar/index.metadata.json +1 -1
- package/typings/tooltip/index.metadata.json +1 -1
- package/typings/tree/data-source/flat-data-source.d.ts +2 -2
- package/typings/tree/index.metadata.json +1 -1
- package/schematics/ng-add/theming/custom-theme.js.map +0 -1
package/esm5/menu.es5.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
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 { Directive, TemplateRef, ComponentFactoryResolver, ApplicationRef, Injector, ViewContainerRef, Inject, InjectionToken, ChangeDetectionStrategy, Component, ElementRef, ViewEncapsulation, Optional, ContentChild, ContentChildren, EventEmitter,
|
|
8
|
+
import { Directive, TemplateRef, ComponentFactoryResolver, ApplicationRef, Injector, ViewContainerRef, Inject, InjectionToken, ChangeDetectionStrategy, Component, ElementRef, ViewEncapsulation, Optional, Input, ContentChild, ContentChildren, EventEmitter, NgZone, Output, ViewChild, Self, NgModule } from '@angular/core';
|
|
9
9
|
import { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
|
|
10
10
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
11
11
|
import { Subject, merge, Subscription, asapScheduler, of } from 'rxjs';
|
|
@@ -22,7 +22,7 @@ import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @fileoverview added by tsickle
|
|
25
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
25
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
26
26
|
*/
|
|
27
27
|
/**
|
|
28
28
|
* Menu content that will be rendered lazily once the menu is opened.
|
|
@@ -66,12 +66,11 @@ var MatMenuContent = /** @class */ (function () {
|
|
|
66
66
|
this._outlet = new DomPortalOutlet(this._document.createElement('div'), this._componentFactoryResolver, this._appRef, this._injector);
|
|
67
67
|
}
|
|
68
68
|
/** @type {?} */
|
|
69
|
-
var element = this._template.elementRef.nativeElement;
|
|
70
|
-
((
|
|
69
|
+
var element = this._template.elementRef.nativeElement;
|
|
71
70
|
// Because we support opening the same menu from different triggers (which in turn have their
|
|
72
71
|
// own `OverlayRef` panel), we have to re-insert the host element every time, otherwise we
|
|
73
72
|
// risk it staying attached to a pane that's no longer in the DOM.
|
|
74
|
-
element.parentNode)).insertBefore(this._outlet.outletElement, element);
|
|
73
|
+
(/** @type {?} */ (element.parentNode)).insertBefore(this._outlet.outletElement, element);
|
|
75
74
|
this._portal.attach(this._outlet, context);
|
|
76
75
|
this._attached.next();
|
|
77
76
|
};
|
|
@@ -124,23 +123,24 @@ var MatMenuContent = /** @class */ (function () {
|
|
|
124
123
|
|
|
125
124
|
/**
|
|
126
125
|
* @fileoverview added by tsickle
|
|
127
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
126
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
128
127
|
*/
|
|
129
|
-
/**
|
|
128
|
+
/**
|
|
130
129
|
* Animations used by the mat-menu component.
|
|
131
130
|
* Animation duration and timing values are based on:
|
|
132
131
|
* https://material.io/guidelines/components/menus.html#menus-usage
|
|
133
132
|
* \@docs-private
|
|
134
|
-
|
|
133
|
+
* @type {?}
|
|
134
|
+
*/
|
|
135
135
|
var matMenuAnimations = {
|
|
136
136
|
/**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
144
|
transformMenu: trigger('transformMenu', [
|
|
145
145
|
state('void', style({
|
|
146
146
|
opacity: 0,
|
|
@@ -153,9 +153,9 @@ var matMenuAnimations = {
|
|
|
153
153
|
transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 })))
|
|
154
154
|
]),
|
|
155
155
|
/**
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
* This animation fades in the background color and content of the menu panel
|
|
157
|
+
* after its containing element is scaled in.
|
|
158
|
+
*/
|
|
159
159
|
fadeInItems: trigger('fadeInItems', [
|
|
160
160
|
// TODO(crisbeto): this is inside the `transformMenu`
|
|
161
161
|
// now. Remove next time we do breaking changes.
|
|
@@ -166,22 +166,24 @@ var matMenuAnimations = {
|
|
|
166
166
|
])
|
|
167
167
|
])
|
|
168
168
|
};
|
|
169
|
-
/**
|
|
169
|
+
/**
|
|
170
170
|
* @deprecated
|
|
171
171
|
* \@breaking-change 8.0.0
|
|
172
172
|
* \@docs-private
|
|
173
|
-
|
|
173
|
+
* @type {?}
|
|
174
|
+
*/
|
|
174
175
|
var fadeInItems = matMenuAnimations.fadeInItems;
|
|
175
|
-
/**
|
|
176
|
+
/**
|
|
176
177
|
* @deprecated
|
|
177
178
|
* \@breaking-change 8.0.0
|
|
178
179
|
* \@docs-private
|
|
179
|
-
|
|
180
|
+
* @type {?}
|
|
181
|
+
*/
|
|
180
182
|
var transformMenu = matMenuAnimations.transformMenu;
|
|
181
183
|
|
|
182
184
|
/**
|
|
183
185
|
* @fileoverview added by tsickle
|
|
184
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
186
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
185
187
|
*/
|
|
186
188
|
|
|
187
189
|
/**
|
|
@@ -213,22 +215,26 @@ function throwMatMenuInvalidPositionY() {
|
|
|
213
215
|
|
|
214
216
|
/**
|
|
215
217
|
* @fileoverview added by tsickle
|
|
216
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
218
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
217
219
|
*/
|
|
218
|
-
/**
|
|
220
|
+
/**
|
|
219
221
|
* Injection token used to provide the parent menu to menu-specific components.
|
|
220
222
|
* \@docs-private
|
|
221
|
-
|
|
223
|
+
* @type {?}
|
|
224
|
+
*/
|
|
222
225
|
var MAT_MENU_PANEL = new InjectionToken('MAT_MENU_PANEL');
|
|
223
226
|
|
|
224
227
|
/**
|
|
225
228
|
* @fileoverview added by tsickle
|
|
226
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
229
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
227
230
|
*/
|
|
231
|
+
// Boilerplate for applying mixins to MatMenuItem.
|
|
228
232
|
/**
|
|
229
233
|
* \@docs-private
|
|
230
234
|
*/
|
|
231
|
-
var
|
|
235
|
+
var
|
|
236
|
+
// Boilerplate for applying mixins to MatMenuItem.
|
|
237
|
+
/**
|
|
232
238
|
* \@docs-private
|
|
233
239
|
*/
|
|
234
240
|
MatMenuItemBase = /** @class */ (function () {
|
|
@@ -251,6 +257,10 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
251
257
|
_this._elementRef = _elementRef;
|
|
252
258
|
_this._focusMonitor = _focusMonitor;
|
|
253
259
|
_this._parentMenu = _parentMenu;
|
|
260
|
+
/**
|
|
261
|
+
* ARIA role for the menu item.
|
|
262
|
+
*/
|
|
263
|
+
_this.role = 'menuitem';
|
|
254
264
|
/**
|
|
255
265
|
* Stream that emits when the menu item is hovered.
|
|
256
266
|
*/
|
|
@@ -398,7 +408,7 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
398
408
|
exportAs: 'matMenuItem',
|
|
399
409
|
inputs: ['disabled', 'disableRipple'],
|
|
400
410
|
host: {
|
|
401
|
-
'role': '
|
|
411
|
+
'[attr.role]': 'role',
|
|
402
412
|
'class': 'mat-menu-item',
|
|
403
413
|
'[class.mat-menu-item-highlighted]': '_highlighted',
|
|
404
414
|
'[class.mat-menu-item-submenu-trigger]': '_triggersSubmenu',
|
|
@@ -420,16 +430,20 @@ var MatMenuItem = /** @class */ (function (_super) {
|
|
|
420
430
|
{ type: FocusMonitor },
|
|
421
431
|
{ type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_PANEL,] }, { type: Optional }] }
|
|
422
432
|
]; };
|
|
433
|
+
MatMenuItem.propDecorators = {
|
|
434
|
+
role: [{ type: Input }]
|
|
435
|
+
};
|
|
423
436
|
return MatMenuItem;
|
|
424
437
|
}(_MatMenuItemMixinBase));
|
|
425
438
|
|
|
426
439
|
/**
|
|
427
440
|
* @fileoverview added by tsickle
|
|
428
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
441
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
429
442
|
*/
|
|
430
|
-
/**
|
|
443
|
+
/**
|
|
431
444
|
* Injection token to be used to override the default options for `mat-menu`.
|
|
432
|
-
|
|
445
|
+
* @type {?}
|
|
446
|
+
*/
|
|
433
447
|
var MAT_MENU_DEFAULT_OPTIONS = new InjectionToken('mat-menu-default-options', {
|
|
434
448
|
providedIn: 'root',
|
|
435
449
|
factory: MAT_MENU_DEFAULT_OPTIONS_FACTORY
|
|
@@ -446,10 +460,11 @@ function MAT_MENU_DEFAULT_OPTIONS_FACTORY() {
|
|
|
446
460
|
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
447
461
|
};
|
|
448
462
|
}
|
|
449
|
-
/**
|
|
463
|
+
/**
|
|
450
464
|
* Start elevation for the menu panel.
|
|
451
465
|
* \@docs-private
|
|
452
|
-
|
|
466
|
+
* @type {?}
|
|
467
|
+
*/
|
|
453
468
|
var MAT_MENU_BASE_ELEVATION = 4;
|
|
454
469
|
var MatMenu = /** @class */ (function () {
|
|
455
470
|
function MatMenu(_elementRef, _ngZone, _defaultOptions) {
|
|
@@ -762,6 +777,7 @@ var MatMenu = /** @class */ (function () {
|
|
|
762
777
|
* @return {?}
|
|
763
778
|
*/
|
|
764
779
|
function (depth) {
|
|
780
|
+
// The elevation starts at the base and increases by one for each level.
|
|
765
781
|
/** @type {?} */
|
|
766
782
|
var newElevation = "mat-elevation-z" + (MAT_MENU_BASE_ELEVATION + depth);
|
|
767
783
|
/** @type {?} */
|
|
@@ -898,20 +914,31 @@ var MatMenu = /** @class */ (function () {
|
|
|
898
914
|
function (event) {
|
|
899
915
|
this._animationDone.next(event);
|
|
900
916
|
this._isAnimating = false;
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
917
|
+
};
|
|
918
|
+
/**
|
|
919
|
+
* @param {?} event
|
|
920
|
+
* @return {?}
|
|
921
|
+
*/
|
|
922
|
+
MatMenu.prototype._onAnimationStart = /**
|
|
923
|
+
* @param {?} event
|
|
924
|
+
* @return {?}
|
|
925
|
+
*/
|
|
926
|
+
function (event) {
|
|
927
|
+
this._isAnimating = true;
|
|
928
|
+
// Scroll the content element to the top as soon as the animation starts. This is necessary,
|
|
929
|
+
// because we move focus to the first item while it's still being animated, which can throw
|
|
930
|
+
// the browser off when it determines the scroll position. Alternatively we can move focus
|
|
931
|
+
// when the animation is done, however moving focus asynchronously will interrupt screen
|
|
932
|
+
// readers which are in the process of reading out the menu already. We take the `element`
|
|
933
|
+
// from the `event` since we can't use a `ViewChild` to access the pane.
|
|
907
934
|
if (event.toState === 'enter' && this._keyManager.activeItemIndex === 0) {
|
|
908
935
|
event.element.scrollTop = 0;
|
|
909
936
|
}
|
|
910
937
|
};
|
|
911
938
|
MatMenu.decorators = [
|
|
912
939
|
{ type: Component, args: [{selector: 'mat-menu',
|
|
913
|
-
template: "<ng-template><div class=\"mat-menu-panel\" [ngClass]=\"_classList\" (keydown)=\"_handleKeydown($event)\" (click)=\"closed.emit('click')\" [@transformMenu]=\"_panelAnimationState\" (@transformMenu.start)=\"
|
|
914
|
-
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}@media
|
|
940
|
+
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>",
|
|
941
|
+
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}"],
|
|
915
942
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
916
943
|
encapsulation: ViewEncapsulation.None,
|
|
917
944
|
exportAs: 'matMenu',
|
|
@@ -949,11 +976,12 @@ var MatMenu = /** @class */ (function () {
|
|
|
949
976
|
|
|
950
977
|
/**
|
|
951
978
|
* @fileoverview added by tsickle
|
|
952
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
979
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
953
980
|
*/
|
|
954
|
-
/**
|
|
981
|
+
/**
|
|
955
982
|
* Injection token that determines the scroll handling while the menu is open.
|
|
956
|
-
|
|
983
|
+
* @type {?}
|
|
984
|
+
*/
|
|
957
985
|
var MAT_MENU_SCROLL_STRATEGY = new InjectionToken('mat-menu-scroll-strategy');
|
|
958
986
|
/**
|
|
959
987
|
* \@docs-private
|
|
@@ -963,22 +991,26 @@ var MAT_MENU_SCROLL_STRATEGY = new InjectionToken('mat-menu-scroll-strategy');
|
|
|
963
991
|
function MAT_MENU_SCROLL_STRATEGY_FACTORY(overlay) {
|
|
964
992
|
return function () { return overlay.scrollStrategies.reposition(); };
|
|
965
993
|
}
|
|
966
|
-
/**
|
|
994
|
+
/**
|
|
967
995
|
* \@docs-private
|
|
968
|
-
|
|
996
|
+
* @type {?}
|
|
997
|
+
*/
|
|
969
998
|
var MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
970
999
|
provide: MAT_MENU_SCROLL_STRATEGY,
|
|
971
1000
|
deps: [Overlay],
|
|
972
1001
|
useFactory: MAT_MENU_SCROLL_STRATEGY_FACTORY,
|
|
973
1002
|
};
|
|
974
|
-
/**
|
|
1003
|
+
/**
|
|
975
1004
|
* Default top padding of the menu panel.
|
|
976
|
-
|
|
1005
|
+
* @type {?}
|
|
1006
|
+
*/
|
|
977
1007
|
var MENU_PANEL_TOP_PADDING = 8;
|
|
978
|
-
/**
|
|
1008
|
+
/**
|
|
979
1009
|
* Options for binding a passive event listener.
|
|
980
|
-
|
|
1010
|
+
* @type {?}
|
|
1011
|
+
*/
|
|
981
1012
|
var passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
|
|
1013
|
+
// TODO(andrewseguin): Remove the kebab versions in favor of camelCased attribute selectors
|
|
982
1014
|
/**
|
|
983
1015
|
* This directive is intended to be used in conjunction with an mat-menu tag. It is
|
|
984
1016
|
* responsible for toggling the display of the provided menu instance.
|
|
@@ -1015,6 +1047,7 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1015
1047
|
* @deprecated Switch to `menuOpened` instead
|
|
1016
1048
|
* \@breaking-change 8.0.0
|
|
1017
1049
|
*/
|
|
1050
|
+
// tslint:disable-next-line:no-output-on-prefix
|
|
1018
1051
|
this.onMenuOpen = this.menuOpened;
|
|
1019
1052
|
/**
|
|
1020
1053
|
* Event emitted when the associated menu is closed.
|
|
@@ -1025,6 +1058,7 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1025
1058
|
* @deprecated Switch to `menuClosed` instead
|
|
1026
1059
|
* \@breaking-change 8.0.0
|
|
1027
1060
|
*/
|
|
1061
|
+
// tslint:disable-next-line:no-output-on-prefix
|
|
1028
1062
|
this.onMenuClose = this.menuClosed;
|
|
1029
1063
|
_element.nativeElement.addEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);
|
|
1030
1064
|
if (_menuItemInstance) {
|
|
@@ -1173,7 +1207,11 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1173
1207
|
this._checkMenu();
|
|
1174
1208
|
/** @type {?} */
|
|
1175
1209
|
var overlayRef = this._createOverlay();
|
|
1176
|
-
|
|
1210
|
+
/** @type {?} */
|
|
1211
|
+
var overlayConfig = overlayRef.getConfig();
|
|
1212
|
+
this._setPosition((/** @type {?} */ (overlayConfig.positionStrategy)));
|
|
1213
|
+
overlayConfig.hasBackdrop = this.menu.hasBackdrop == null ? !this.triggersSubmenu() :
|
|
1214
|
+
this.menu.hasBackdrop;
|
|
1177
1215
|
overlayRef.attach(this._getPortal());
|
|
1178
1216
|
if (this.menu.lazyContent) {
|
|
1179
1217
|
this.menu.lazyContent.attach(this.menuData);
|
|
@@ -1219,12 +1257,15 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1219
1257
|
this._element.nativeElement.focus();
|
|
1220
1258
|
}
|
|
1221
1259
|
};
|
|
1260
|
+
/** Closes the menu and does the necessary cleanup. */
|
|
1222
1261
|
/**
|
|
1223
1262
|
* Closes the menu and does the necessary cleanup.
|
|
1263
|
+
* @private
|
|
1224
1264
|
* @return {?}
|
|
1225
1265
|
*/
|
|
1226
1266
|
MatMenuTrigger.prototype._destroyMenu = /**
|
|
1227
1267
|
* Closes the menu and does the necessary cleanup.
|
|
1268
|
+
* @private
|
|
1228
1269
|
* @return {?}
|
|
1229
1270
|
*/
|
|
1230
1271
|
function () {
|
|
@@ -1244,7 +1285,7 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1244
1285
|
.pipe(filter(function (event) { return event.toState === 'void'; }), take(1),
|
|
1245
1286
|
// Interrupt if the content got re-attached.
|
|
1246
1287
|
takeUntil(menu.lazyContent._attached))
|
|
1247
|
-
.subscribe(function () { return ((menu.lazyContent)).detach(); }, undefined, function () {
|
|
1288
|
+
.subscribe(function () { return (/** @type {?} */ (menu.lazyContent)).detach(); }, undefined, function () {
|
|
1248
1289
|
// No matter whether the content got re-attached, reset the menu.
|
|
1249
1290
|
_this._resetMenu();
|
|
1250
1291
|
});
|
|
@@ -1263,11 +1304,17 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1263
1304
|
/**
|
|
1264
1305
|
* This method sets the menu state to open and focuses the first item if
|
|
1265
1306
|
* the menu was opened via the keyboard.
|
|
1307
|
+
*/
|
|
1308
|
+
/**
|
|
1309
|
+
* This method sets the menu state to open and focuses the first item if
|
|
1310
|
+
* the menu was opened via the keyboard.
|
|
1311
|
+
* @private
|
|
1266
1312
|
* @return {?}
|
|
1267
1313
|
*/
|
|
1268
1314
|
MatMenuTrigger.prototype._initMenu = /**
|
|
1269
1315
|
* This method sets the menu state to open and focuses the first item if
|
|
1270
1316
|
* the menu was opened via the keyboard.
|
|
1317
|
+
* @private
|
|
1271
1318
|
* @return {?}
|
|
1272
1319
|
*/
|
|
1273
1320
|
function () {
|
|
@@ -1277,12 +1324,15 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1277
1324
|
this._setIsMenuOpen(true);
|
|
1278
1325
|
this.menu.focusFirstItem(this._openedBy || 'program');
|
|
1279
1326
|
};
|
|
1327
|
+
/** Updates the menu elevation based on the amount of parent menus that it has. */
|
|
1280
1328
|
/**
|
|
1281
1329
|
* Updates the menu elevation based on the amount of parent menus that it has.
|
|
1330
|
+
* @private
|
|
1282
1331
|
* @return {?}
|
|
1283
1332
|
*/
|
|
1284
1333
|
MatMenuTrigger.prototype._setMenuElevation = /**
|
|
1285
1334
|
* Updates the menu elevation based on the amount of parent menus that it has.
|
|
1335
|
+
* @private
|
|
1286
1336
|
* @return {?}
|
|
1287
1337
|
*/
|
|
1288
1338
|
function () {
|
|
@@ -1301,11 +1351,17 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1301
1351
|
/**
|
|
1302
1352
|
* This method resets the menu when it's closed, most importantly restoring
|
|
1303
1353
|
* focus to the menu trigger if the menu was opened via the keyboard.
|
|
1354
|
+
*/
|
|
1355
|
+
/**
|
|
1356
|
+
* This method resets the menu when it's closed, most importantly restoring
|
|
1357
|
+
* focus to the menu trigger if the menu was opened via the keyboard.
|
|
1358
|
+
* @private
|
|
1304
1359
|
* @return {?}
|
|
1305
1360
|
*/
|
|
1306
1361
|
MatMenuTrigger.prototype._resetMenu = /**
|
|
1307
1362
|
* This method resets the menu when it's closed, most importantly restoring
|
|
1308
1363
|
* focus to the menu trigger if the menu was opened via the keyboard.
|
|
1364
|
+
* @private
|
|
1309
1365
|
* @return {?}
|
|
1310
1366
|
*/
|
|
1311
1367
|
function () {
|
|
@@ -1323,11 +1379,17 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1323
1379
|
}
|
|
1324
1380
|
this._openedBy = null;
|
|
1325
1381
|
};
|
|
1382
|
+
// set state rather than toggle to support triggers sharing a menu
|
|
1383
|
+
// set state rather than toggle to support triggers sharing a menu
|
|
1326
1384
|
/**
|
|
1385
|
+
* @private
|
|
1327
1386
|
* @param {?} isOpen
|
|
1328
1387
|
* @return {?}
|
|
1329
1388
|
*/
|
|
1330
|
-
MatMenuTrigger.prototype._setIsMenuOpen =
|
|
1389
|
+
MatMenuTrigger.prototype._setIsMenuOpen =
|
|
1390
|
+
// set state rather than toggle to support triggers sharing a menu
|
|
1391
|
+
/**
|
|
1392
|
+
* @private
|
|
1331
1393
|
* @param {?} isOpen
|
|
1332
1394
|
* @return {?}
|
|
1333
1395
|
*/
|
|
@@ -1341,11 +1403,17 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1341
1403
|
/**
|
|
1342
1404
|
* This method checks that a valid instance of MatMenu has been passed into
|
|
1343
1405
|
* matMenuTriggerFor. If not, an exception is thrown.
|
|
1406
|
+
*/
|
|
1407
|
+
/**
|
|
1408
|
+
* This method checks that a valid instance of MatMenu has been passed into
|
|
1409
|
+
* matMenuTriggerFor. If not, an exception is thrown.
|
|
1410
|
+
* @private
|
|
1344
1411
|
* @return {?}
|
|
1345
1412
|
*/
|
|
1346
1413
|
MatMenuTrigger.prototype._checkMenu = /**
|
|
1347
1414
|
* This method checks that a valid instance of MatMenu has been passed into
|
|
1348
1415
|
* matMenuTriggerFor. If not, an exception is thrown.
|
|
1416
|
+
* @private
|
|
1349
1417
|
* @return {?}
|
|
1350
1418
|
*/
|
|
1351
1419
|
function () {
|
|
@@ -1356,18 +1424,24 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1356
1424
|
/**
|
|
1357
1425
|
* This method creates the overlay from the provided menu's template and saves its
|
|
1358
1426
|
* OverlayRef so that it can be attached to the DOM when openMenu is called.
|
|
1427
|
+
*/
|
|
1428
|
+
/**
|
|
1429
|
+
* This method creates the overlay from the provided menu's template and saves its
|
|
1430
|
+
* OverlayRef so that it can be attached to the DOM when openMenu is called.
|
|
1431
|
+
* @private
|
|
1359
1432
|
* @return {?}
|
|
1360
1433
|
*/
|
|
1361
1434
|
MatMenuTrigger.prototype._createOverlay = /**
|
|
1362
1435
|
* This method creates the overlay from the provided menu's template and saves its
|
|
1363
1436
|
* OverlayRef so that it can be attached to the DOM when openMenu is called.
|
|
1437
|
+
* @private
|
|
1364
1438
|
* @return {?}
|
|
1365
1439
|
*/
|
|
1366
1440
|
function () {
|
|
1367
1441
|
if (!this._overlayRef) {
|
|
1368
1442
|
/** @type {?} */
|
|
1369
1443
|
var config = this._getOverlayConfig();
|
|
1370
|
-
this._subscribeToPositions(/** @type {?} */ (config.positionStrategy));
|
|
1444
|
+
this._subscribeToPositions((/** @type {?} */ (config.positionStrategy)));
|
|
1371
1445
|
this._overlayRef = this._overlay.create(config);
|
|
1372
1446
|
// Consume the `keydownEvents` in order to prevent them from going to another overlay.
|
|
1373
1447
|
// Ideally we'd also have our keyboard event logic in here, however doing so will
|
|
@@ -1378,10 +1452,16 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1378
1452
|
};
|
|
1379
1453
|
/**
|
|
1380
1454
|
* This method builds the configuration object needed to create the overlay, the OverlayState.
|
|
1455
|
+
* @returns OverlayConfig
|
|
1456
|
+
*/
|
|
1457
|
+
/**
|
|
1458
|
+
* This method builds the configuration object needed to create the overlay, the OverlayState.
|
|
1459
|
+
* @private
|
|
1381
1460
|
* @return {?} OverlayConfig
|
|
1382
1461
|
*/
|
|
1383
1462
|
MatMenuTrigger.prototype._getOverlayConfig = /**
|
|
1384
1463
|
* This method builds the configuration object needed to create the overlay, the OverlayState.
|
|
1464
|
+
* @private
|
|
1385
1465
|
* @return {?} OverlayConfig
|
|
1386
1466
|
*/
|
|
1387
1467
|
function () {
|
|
@@ -1390,7 +1470,6 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1390
1470
|
.flexibleConnectedTo(this._element)
|
|
1391
1471
|
.withLockedPosition()
|
|
1392
1472
|
.withTransformOriginOn('.mat-menu-panel'),
|
|
1393
|
-
hasBackdrop: this.menu.hasBackdrop == null ? !this.triggersSubmenu() : this.menu.hasBackdrop,
|
|
1394
1473
|
backdropClass: this.menu.backdropClass || 'cdk-overlay-transparent-backdrop',
|
|
1395
1474
|
scrollStrategy: this._scrollStrategy(),
|
|
1396
1475
|
direction: this._dir
|
|
@@ -1400,6 +1479,12 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1400
1479
|
* Listens to changes in the position of the overlay and sets the correct classes
|
|
1401
1480
|
* on the menu based on the new position. This ensures the animation origin is always
|
|
1402
1481
|
* correct, even if a fallback position is used for the overlay.
|
|
1482
|
+
*/
|
|
1483
|
+
/**
|
|
1484
|
+
* Listens to changes in the position of the overlay and sets the correct classes
|
|
1485
|
+
* on the menu based on the new position. This ensures the animation origin is always
|
|
1486
|
+
* correct, even if a fallback position is used for the overlay.
|
|
1487
|
+
* @private
|
|
1403
1488
|
* @param {?} position
|
|
1404
1489
|
* @return {?}
|
|
1405
1490
|
*/
|
|
@@ -1407,6 +1492,7 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1407
1492
|
* Listens to changes in the position of the overlay and sets the correct classes
|
|
1408
1493
|
* on the menu based on the new position. This ensures the animation origin is always
|
|
1409
1494
|
* correct, even if a fallback position is used for the overlay.
|
|
1495
|
+
* @private
|
|
1410
1496
|
* @param {?} position
|
|
1411
1497
|
* @return {?}
|
|
1412
1498
|
*/
|
|
@@ -1417,20 +1503,27 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1417
1503
|
/** @type {?} */
|
|
1418
1504
|
var posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
|
|
1419
1505
|
/** @type {?} */
|
|
1420
|
-
var posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
|
|
1421
|
-
((_this.menu.setPositionClasses))(posX, posY);
|
|
1506
|
+
var posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
|
|
1507
|
+
(/** @type {?} */ (_this.menu.setPositionClasses))(posX, posY);
|
|
1422
1508
|
});
|
|
1423
1509
|
}
|
|
1424
1510
|
};
|
|
1425
1511
|
/**
|
|
1426
1512
|
* Sets the appropriate positions on a position strategy
|
|
1427
1513
|
* so the overlay connects with the trigger correctly.
|
|
1514
|
+
* @param positionStrategy Strategy whose position to update.
|
|
1515
|
+
*/
|
|
1516
|
+
/**
|
|
1517
|
+
* Sets the appropriate positions on a position strategy
|
|
1518
|
+
* so the overlay connects with the trigger correctly.
|
|
1519
|
+
* @private
|
|
1428
1520
|
* @param {?} positionStrategy Strategy whose position to update.
|
|
1429
1521
|
* @return {?}
|
|
1430
1522
|
*/
|
|
1431
1523
|
MatMenuTrigger.prototype._setPosition = /**
|
|
1432
1524
|
* Sets the appropriate positions on a position strategy
|
|
1433
1525
|
* so the overlay connects with the trigger correctly.
|
|
1526
|
+
* @private
|
|
1434
1527
|
* @param {?} positionStrategy Strategy whose position to update.
|
|
1435
1528
|
* @return {?}
|
|
1436
1529
|
*/
|
|
@@ -1471,32 +1564,38 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1471
1564
|
}
|
|
1472
1565
|
]);
|
|
1473
1566
|
};
|
|
1567
|
+
/** Cleans up the active subscriptions. */
|
|
1474
1568
|
/**
|
|
1475
1569
|
* Cleans up the active subscriptions.
|
|
1570
|
+
* @private
|
|
1476
1571
|
* @return {?}
|
|
1477
1572
|
*/
|
|
1478
1573
|
MatMenuTrigger.prototype._cleanUpSubscriptions = /**
|
|
1479
1574
|
* Cleans up the active subscriptions.
|
|
1575
|
+
* @private
|
|
1480
1576
|
* @return {?}
|
|
1481
1577
|
*/
|
|
1482
1578
|
function () {
|
|
1483
1579
|
this._closeSubscription.unsubscribe();
|
|
1484
1580
|
this._hoverSubscription.unsubscribe();
|
|
1485
1581
|
};
|
|
1582
|
+
/** Returns a stream that emits whenever an action that should close the menu occurs. */
|
|
1486
1583
|
/**
|
|
1487
1584
|
* Returns a stream that emits whenever an action that should close the menu occurs.
|
|
1585
|
+
* @private
|
|
1488
1586
|
* @return {?}
|
|
1489
1587
|
*/
|
|
1490
1588
|
MatMenuTrigger.prototype._menuClosingActions = /**
|
|
1491
1589
|
* Returns a stream that emits whenever an action that should close the menu occurs.
|
|
1590
|
+
* @private
|
|
1492
1591
|
* @return {?}
|
|
1493
1592
|
*/
|
|
1494
1593
|
function () {
|
|
1495
1594
|
var _this = this;
|
|
1496
1595
|
/** @type {?} */
|
|
1497
|
-
var backdrop = /** @type {?} */ (
|
|
1596
|
+
var backdrop = (/** @type {?} */ (this._overlayRef)).backdropClick();
|
|
1498
1597
|
/** @type {?} */
|
|
1499
|
-
var detachments = /** @type {?} */ (
|
|
1598
|
+
var detachments = (/** @type {?} */ (this._overlayRef)).detachments();
|
|
1500
1599
|
/** @type {?} */
|
|
1501
1600
|
var parentClose = this._parentMenu ? this._parentMenu.closed : of();
|
|
1502
1601
|
/** @type {?} */
|
|
@@ -1567,12 +1666,15 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1567
1666
|
this.toggleMenu();
|
|
1568
1667
|
}
|
|
1569
1668
|
};
|
|
1669
|
+
/** Handles the cases where the user hovers over the trigger. */
|
|
1570
1670
|
/**
|
|
1571
1671
|
* Handles the cases where the user hovers over the trigger.
|
|
1672
|
+
* @private
|
|
1572
1673
|
* @return {?}
|
|
1573
1674
|
*/
|
|
1574
1675
|
MatMenuTrigger.prototype._handleHover = /**
|
|
1575
1676
|
* Handles the cases where the user hovers over the trigger.
|
|
1677
|
+
* @private
|
|
1576
1678
|
* @return {?}
|
|
1577
1679
|
*/
|
|
1578
1680
|
function () {
|
|
@@ -1603,12 +1705,15 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1603
1705
|
}
|
|
1604
1706
|
});
|
|
1605
1707
|
};
|
|
1708
|
+
/** Gets the portal that should be attached to the overlay. */
|
|
1606
1709
|
/**
|
|
1607
1710
|
* Gets the portal that should be attached to the overlay.
|
|
1711
|
+
* @private
|
|
1608
1712
|
* @return {?}
|
|
1609
1713
|
*/
|
|
1610
1714
|
MatMenuTrigger.prototype._getPortal = /**
|
|
1611
1715
|
* Gets the portal that should be attached to the overlay.
|
|
1716
|
+
* @private
|
|
1612
1717
|
* @return {?}
|
|
1613
1718
|
*/
|
|
1614
1719
|
function () {
|
|
@@ -1658,7 +1763,7 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
1658
1763
|
|
|
1659
1764
|
/**
|
|
1660
1765
|
* @fileoverview added by tsickle
|
|
1661
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1766
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1662
1767
|
*/
|
|
1663
1768
|
var MatMenuModule = /** @class */ (function () {
|
|
1664
1769
|
function MatMenuModule() {
|
|
@@ -1681,18 +1786,18 @@ var MatMenuModule = /** @class */ (function () {
|
|
|
1681
1786
|
|
|
1682
1787
|
/**
|
|
1683
1788
|
* @fileoverview added by tsickle
|
|
1684
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1789
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1685
1790
|
*/
|
|
1686
1791
|
|
|
1687
1792
|
/**
|
|
1688
1793
|
* @fileoverview added by tsickle
|
|
1689
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1794
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1690
1795
|
*/
|
|
1691
1796
|
|
|
1692
1797
|
/**
|
|
1693
1798
|
* @fileoverview added by tsickle
|
|
1694
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1799
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1695
1800
|
*/
|
|
1696
1801
|
|
|
1697
|
-
export { MAT_MENU_SCROLL_STRATEGY, MatMenuModule, MatMenu, MAT_MENU_DEFAULT_OPTIONS, MatMenuItem, MatMenuTrigger, matMenuAnimations, fadeInItems, transformMenu, MatMenuContent, MAT_MENU_DEFAULT_OPTIONS_FACTORY as ɵ
|
|
1802
|
+
export { MAT_MENU_SCROLL_STRATEGY, MatMenuModule, MatMenu, MAT_MENU_DEFAULT_OPTIONS, MatMenuItem, MatMenuTrigger, matMenuAnimations, fadeInItems, transformMenu, MatMenuContent, MAT_MENU_DEFAULT_OPTIONS_FACTORY as ɵa23, MatMenuItemBase as ɵb23, _MatMenuItemMixinBase as ɵc23, MAT_MENU_PANEL as ɵf23, MAT_MENU_SCROLL_STRATEGY_FACTORY as ɵd23, MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER as ɵe23 };
|
|
1698
1803
|
//# sourceMappingURL=menu.es5.js.map
|