@angular/material 7.1.0 → 7.2.2
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 +50 -19
- package/autocomplete/typings/index.d.ts +0 -1
- package/autocomplete/typings/index.metadata.json +1 -1
- package/autocomplete/typings/public-api.d.ts +1 -0
- package/badge/typings/index.metadata.json +1 -1
- package/bottom-sheet/typings/bottom-sheet-ref.d.ts +2 -0
- package/bottom-sheet/typings/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js +139 -39
- 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 +67 -22
- 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 +45 -14
- 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 +126 -38
- 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 +190 -127
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +1 -2
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +205 -42
- 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 +52 -26
- 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 +123 -34
- 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 +67 -16
- 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 +288 -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 +159 -26
- 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 +176 -70
- 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 +25 -8
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +32 -13
- 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 +30 -14
- 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 +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 +186 -49
- 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 +31 -15
- 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 +88 -20
- 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 +69 -20
- 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 +29 -20
- 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 +48 -15
- 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 -61
- 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 +62 -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 +2927 -995
- package/bundles/material.umd.js.map +1 -1
- package/bundles/material.umd.min.js +18 -18
- 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 +2 -2
- 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/core/typings/ripple/ripple.d.ts +1 -1
- package/datepicker/typings/calendar.d.ts +2 -2
- package/datepicker/typings/index.metadata.json +1 -1
- package/dialog/typings/index.metadata.json +1 -1
- package/esm2015/autocomplete.js +73 -36
- 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 +44 -23
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js +27 -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 -30
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +147 -128
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +103 -37
- 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 +56 -29
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +95 -35
- 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 +144 -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 +118 -24
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +13 -12
- package/esm2015/material.js.map +1 -1
- package/esm2015/menu.js +114 -67
- package/esm2015/menu.js.map +1 -1
- package/esm2015/paginator.js +17 -9
- 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 +112 -50
- 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 +51 -23
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +38 -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 +32 -23
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +51 -18
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +112 -49
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/toolbar.js +9 -5
- package/esm2015/toolbar.js.map +1 -1
- package/esm2015/tooltip.js +49 -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 +141 -41
- 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 +68 -23
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js +46 -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 +129 -41
- 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 +207 -44
- 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 +54 -29
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +126 -37
- 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 +290 -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 +161 -27
- 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 +175 -69
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/paginator.es5.js +27 -10
- 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 +189 -52
- 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 +91 -23
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +70 -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 +32 -23
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +51 -18
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +156 -55
- 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 +64 -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/form-field/typings/prefix.d.ts +1 -1
- package/grid-list/typings/index.d.ts +1 -1
- package/grid-list/typings/index.metadata.json +1 -1
- package/icon/typings/icon-registry.d.ts +3 -2
- package/icon/typings/index.metadata.json +1 -1
- package/list/typings/index.metadata.json +1 -1
- package/list/typings/list.d.ts +16 -5
- package/list/typings/selection-list.d.ts +1 -0
- 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/menu/typings/menu-trigger.d.ts +1 -1
- package/package.json +5 -5
- 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/table/typings/index.metadata.json +1 -1
- package/table/typings/table-data-source.d.ts +2 -0
- package/tabs/typings/index.d.ts +5 -5
- package/tabs/typings/index.metadata.json +1 -1
- package/tabs/typings/tab-group.d.ts +2 -1
- package/tabs/typings/tab-header.d.ts +8 -4
- package/toolbar/typings/index.metadata.json +1 -1
- package/tooltip/typings/index.metadata.json +1 -1
- package/tooltip/typings/tooltip.d.ts +2 -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 +0 -1
- package/typings/autocomplete/index.metadata.json +1 -1
- package/typings/autocomplete/public-api.d.ts +1 -0
- package/typings/badge/index.metadata.json +1 -1
- package/typings/bottom-sheet/bottom-sheet-ref.d.ts +2 -0
- 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 +2 -2
- 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/core/ripple/ripple.d.ts +1 -1
- package/typings/datepicker/calendar.d.ts +2 -2
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/dialog/index.metadata.json +1 -1
- package/typings/esm5/autocomplete/index.d.ts +0 -1
- package/typings/esm5/autocomplete/index.metadata.json +1 -1
- package/typings/esm5/autocomplete/public-api.d.ts +1 -0
- package/typings/esm5/badge/index.metadata.json +1 -1
- package/typings/esm5/bottom-sheet/bottom-sheet-ref.d.ts +2 -0
- 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 +2 -2
- 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/core/ripple/ripple.d.ts +1 -1
- package/typings/esm5/datepicker/calendar.d.ts +2 -2
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- 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/form-field/prefix.d.ts +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-registry.d.ts +3 -2
- 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/list/list.d.ts +16 -5
- package/typings/esm5/list/selection-list.d.ts +1 -0
- 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/menu/menu-trigger.d.ts +1 -1
- 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/table/index.metadata.json +1 -1
- package/typings/esm5/table/table-data-source.d.ts +2 -0
- package/typings/esm5/tabs/index.d.ts +5 -5
- package/typings/esm5/tabs/index.metadata.json +1 -1
- package/typings/esm5/tabs/tab-group.d.ts +2 -1
- package/typings/esm5/tabs/tab-header.d.ts +8 -4
- package/typings/esm5/toolbar/index.metadata.json +1 -1
- package/typings/esm5/tooltip/index.metadata.json +1 -1
- package/typings/esm5/tooltip/tooltip.d.ts +2 -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/form-field/prefix.d.ts +1 -1
- package/typings/grid-list/index.d.ts +1 -1
- package/typings/grid-list/index.metadata.json +1 -1
- package/typings/icon/icon-registry.d.ts +3 -2
- 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/list/list.d.ts +16 -5
- package/typings/list/selection-list.d.ts +1 -0
- 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/menu/menu-trigger.d.ts +1 -1
- 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/table/index.metadata.json +1 -1
- package/typings/table/table-data-source.d.ts +2 -0
- package/typings/tabs/index.d.ts +5 -5
- package/typings/tabs/index.metadata.json +1 -1
- package/typings/tabs/tab-group.d.ts +2 -1
- package/typings/tabs/tab-header.d.ts +8 -4
- package/typings/toolbar/index.metadata.json +1 -1
- package/typings/tooltip/index.metadata.json +1 -1
- package/typings/tooltip/tooltip.d.ts +2 -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/esm2015/menu.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';
|
|
@@ -21,7 +21,7 @@ import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* @fileoverview added by tsickle
|
|
24
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
24
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
25
25
|
*/
|
|
26
26
|
/**
|
|
27
27
|
* Menu content that will be rendered lazily once the menu is opened.
|
|
@@ -62,12 +62,11 @@ class MatMenuContent {
|
|
|
62
62
|
this._outlet = new DomPortalOutlet(this._document.createElement('div'), this._componentFactoryResolver, this._appRef, this._injector);
|
|
63
63
|
}
|
|
64
64
|
/** @type {?} */
|
|
65
|
-
const element = this._template.elementRef.nativeElement;
|
|
66
|
-
((
|
|
65
|
+
const element = this._template.elementRef.nativeElement;
|
|
67
66
|
// Because we support opening the same menu from different triggers (which in turn have their
|
|
68
67
|
// own `OverlayRef` panel), we have to re-insert the host element every time, otherwise we
|
|
69
68
|
// risk it staying attached to a pane that's no longer in the DOM.
|
|
70
|
-
element.parentNode)).insertBefore(this._outlet.outletElement, element);
|
|
69
|
+
(/** @type {?} */ (element.parentNode)).insertBefore(this._outlet.outletElement, element);
|
|
71
70
|
this._portal.attach(this._outlet, context);
|
|
72
71
|
this._attached.next();
|
|
73
72
|
}
|
|
@@ -107,23 +106,24 @@ MatMenuContent.ctorParameters = () => [
|
|
|
107
106
|
|
|
108
107
|
/**
|
|
109
108
|
* @fileoverview added by tsickle
|
|
110
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
109
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
111
110
|
*/
|
|
112
|
-
/**
|
|
111
|
+
/**
|
|
113
112
|
* Animations used by the mat-menu component.
|
|
114
113
|
* Animation duration and timing values are based on:
|
|
115
114
|
* https://material.io/guidelines/components/menus.html#menus-usage
|
|
116
115
|
* \@docs-private
|
|
117
|
-
|
|
116
|
+
* @type {?}
|
|
117
|
+
*/
|
|
118
118
|
const matMenuAnimations = {
|
|
119
119
|
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
* This animation controls the menu panel's entry and exit from the page.
|
|
121
|
+
*
|
|
122
|
+
* When the menu panel is added to the DOM, it scales in and fades in its border.
|
|
123
|
+
*
|
|
124
|
+
* When the menu panel is removed from the DOM, it simply fades out after a brief
|
|
125
|
+
* delay to display the ripple.
|
|
126
|
+
*/
|
|
127
127
|
transformMenu: trigger('transformMenu', [
|
|
128
128
|
state('void', style({
|
|
129
129
|
opacity: 0,
|
|
@@ -136,9 +136,9 @@ const matMenuAnimations = {
|
|
|
136
136
|
transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 })))
|
|
137
137
|
]),
|
|
138
138
|
/**
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
* This animation fades in the background color and content of the menu panel
|
|
140
|
+
* after its containing element is scaled in.
|
|
141
|
+
*/
|
|
142
142
|
fadeInItems: trigger('fadeInItems', [
|
|
143
143
|
// TODO(crisbeto): this is inside the `transformMenu`
|
|
144
144
|
// now. Remove next time we do breaking changes.
|
|
@@ -149,22 +149,24 @@ const matMenuAnimations = {
|
|
|
149
149
|
])
|
|
150
150
|
])
|
|
151
151
|
};
|
|
152
|
-
/**
|
|
152
|
+
/**
|
|
153
153
|
* @deprecated
|
|
154
154
|
* \@breaking-change 8.0.0
|
|
155
155
|
* \@docs-private
|
|
156
|
-
|
|
156
|
+
* @type {?}
|
|
157
|
+
*/
|
|
157
158
|
const fadeInItems = matMenuAnimations.fadeInItems;
|
|
158
|
-
/**
|
|
159
|
+
/**
|
|
159
160
|
* @deprecated
|
|
160
161
|
* \@breaking-change 8.0.0
|
|
161
162
|
* \@docs-private
|
|
162
|
-
|
|
163
|
+
* @type {?}
|
|
164
|
+
*/
|
|
163
165
|
const transformMenu = matMenuAnimations.transformMenu;
|
|
164
166
|
|
|
165
167
|
/**
|
|
166
168
|
* @fileoverview added by tsickle
|
|
167
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
169
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
168
170
|
*/
|
|
169
171
|
|
|
170
172
|
/**
|
|
@@ -202,18 +204,20 @@ function throwMatMenuInvalidPositionY() {
|
|
|
202
204
|
|
|
203
205
|
/**
|
|
204
206
|
* @fileoverview added by tsickle
|
|
205
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
207
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
206
208
|
*/
|
|
207
|
-
/**
|
|
209
|
+
/**
|
|
208
210
|
* Injection token used to provide the parent menu to menu-specific components.
|
|
209
211
|
* \@docs-private
|
|
210
|
-
|
|
212
|
+
* @type {?}
|
|
213
|
+
*/
|
|
211
214
|
const MAT_MENU_PANEL = new InjectionToken('MAT_MENU_PANEL');
|
|
212
215
|
|
|
213
216
|
/**
|
|
214
217
|
* @fileoverview added by tsickle
|
|
215
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
218
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
216
219
|
*/
|
|
220
|
+
// Boilerplate for applying mixins to MatMenuItem.
|
|
217
221
|
/**
|
|
218
222
|
* \@docs-private
|
|
219
223
|
*/
|
|
@@ -238,6 +242,10 @@ class MatMenuItem extends _MatMenuItemMixinBase {
|
|
|
238
242
|
this._elementRef = _elementRef;
|
|
239
243
|
this._focusMonitor = _focusMonitor;
|
|
240
244
|
this._parentMenu = _parentMenu;
|
|
245
|
+
/**
|
|
246
|
+
* ARIA role for the menu item.
|
|
247
|
+
*/
|
|
248
|
+
this.role = 'menuitem';
|
|
241
249
|
/**
|
|
242
250
|
* Stream that emits when the menu item is hovered.
|
|
243
251
|
*/
|
|
@@ -349,7 +357,7 @@ MatMenuItem.decorators = [
|
|
|
349
357
|
exportAs: 'matMenuItem',
|
|
350
358
|
inputs: ['disabled', 'disableRipple'],
|
|
351
359
|
host: {
|
|
352
|
-
'role': '
|
|
360
|
+
'[attr.role]': 'role',
|
|
353
361
|
'class': 'mat-menu-item',
|
|
354
362
|
'[class.mat-menu-item-highlighted]': '_highlighted',
|
|
355
363
|
'[class.mat-menu-item-submenu-trigger]': '_triggersSubmenu',
|
|
@@ -371,14 +379,18 @@ MatMenuItem.ctorParameters = () => [
|
|
|
371
379
|
{ type: FocusMonitor },
|
|
372
380
|
{ type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_PANEL,] }, { type: Optional }] }
|
|
373
381
|
];
|
|
382
|
+
MatMenuItem.propDecorators = {
|
|
383
|
+
role: [{ type: Input }]
|
|
384
|
+
};
|
|
374
385
|
|
|
375
386
|
/**
|
|
376
387
|
* @fileoverview added by tsickle
|
|
377
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
388
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
378
389
|
*/
|
|
379
|
-
/**
|
|
390
|
+
/**
|
|
380
391
|
* Injection token to be used to override the default options for `mat-menu`.
|
|
381
|
-
|
|
392
|
+
* @type {?}
|
|
393
|
+
*/
|
|
382
394
|
const MAT_MENU_DEFAULT_OPTIONS = new InjectionToken('mat-menu-default-options', {
|
|
383
395
|
providedIn: 'root',
|
|
384
396
|
factory: MAT_MENU_DEFAULT_OPTIONS_FACTORY
|
|
@@ -395,10 +407,11 @@ function MAT_MENU_DEFAULT_OPTIONS_FACTORY() {
|
|
|
395
407
|
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
396
408
|
};
|
|
397
409
|
}
|
|
398
|
-
/**
|
|
410
|
+
/**
|
|
399
411
|
* Start elevation for the menu panel.
|
|
400
412
|
* \@docs-private
|
|
401
|
-
|
|
413
|
+
* @type {?}
|
|
414
|
+
*/
|
|
402
415
|
const MAT_MENU_BASE_ELEVATION = 4;
|
|
403
416
|
class MatMenu {
|
|
404
417
|
/**
|
|
@@ -625,6 +638,7 @@ class MatMenu {
|
|
|
625
638
|
* @return {?}
|
|
626
639
|
*/
|
|
627
640
|
setElevation(depth) {
|
|
641
|
+
// The elevation starts at the base and increases by one for each level.
|
|
628
642
|
/** @type {?} */
|
|
629
643
|
const newElevation = `mat-elevation-z${MAT_MENU_BASE_ELEVATION + depth}`;
|
|
630
644
|
/** @type {?} */
|
|
@@ -708,12 +722,19 @@ class MatMenu {
|
|
|
708
722
|
_onAnimationDone(event) {
|
|
709
723
|
this._animationDone.next(event);
|
|
710
724
|
this._isAnimating = false;
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* @param {?} event
|
|
728
|
+
* @return {?}
|
|
729
|
+
*/
|
|
730
|
+
_onAnimationStart(event) {
|
|
731
|
+
this._isAnimating = true;
|
|
732
|
+
// Scroll the content element to the top as soon as the animation starts. This is necessary,
|
|
733
|
+
// because we move focus to the first item while it's still being animated, which can throw
|
|
734
|
+
// the browser off when it determines the scroll position. Alternatively we can move focus
|
|
735
|
+
// when the animation is done, however moving focus asynchronously will interrupt screen
|
|
736
|
+
// readers which are in the process of reading out the menu already. We take the `element`
|
|
737
|
+
// from the `event` since we can't use a `ViewChild` to access the pane.
|
|
717
738
|
if (event.toState === 'enter' && this._keyManager.activeItemIndex === 0) {
|
|
718
739
|
event.element.scrollTop = 0;
|
|
719
740
|
}
|
|
@@ -721,8 +742,8 @@ class MatMenu {
|
|
|
721
742
|
}
|
|
722
743
|
MatMenu.decorators = [
|
|
723
744
|
{ type: Component, args: [{selector: 'mat-menu',
|
|
724
|
-
template: "<ng-template><div class=\"mat-menu-panel\" [ngClass]=\"_classList\" (keydown)=\"_handleKeydown($event)\" (click)=\"closed.emit('click')\" [@transformMenu]=\"_panelAnimationState\" (@transformMenu.start)=\"
|
|
725
|
-
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
|
|
745
|
+
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>",
|
|
746
|
+
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}"],
|
|
726
747
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
727
748
|
encapsulation: ViewEncapsulation.None,
|
|
728
749
|
exportAs: 'matMenu',
|
|
@@ -758,11 +779,12 @@ MatMenu.propDecorators = {
|
|
|
758
779
|
|
|
759
780
|
/**
|
|
760
781
|
* @fileoverview added by tsickle
|
|
761
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
782
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
762
783
|
*/
|
|
763
|
-
/**
|
|
784
|
+
/**
|
|
764
785
|
* Injection token that determines the scroll handling while the menu is open.
|
|
765
|
-
|
|
786
|
+
* @type {?}
|
|
787
|
+
*/
|
|
766
788
|
const MAT_MENU_SCROLL_STRATEGY = new InjectionToken('mat-menu-scroll-strategy');
|
|
767
789
|
/**
|
|
768
790
|
* \@docs-private
|
|
@@ -772,22 +794,26 @@ const MAT_MENU_SCROLL_STRATEGY = new InjectionToken('mat-menu-scroll-strategy');
|
|
|
772
794
|
function MAT_MENU_SCROLL_STRATEGY_FACTORY(overlay) {
|
|
773
795
|
return () => overlay.scrollStrategies.reposition();
|
|
774
796
|
}
|
|
775
|
-
/**
|
|
797
|
+
/**
|
|
776
798
|
* \@docs-private
|
|
777
|
-
|
|
799
|
+
* @type {?}
|
|
800
|
+
*/
|
|
778
801
|
const MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
779
802
|
provide: MAT_MENU_SCROLL_STRATEGY,
|
|
780
803
|
deps: [Overlay],
|
|
781
804
|
useFactory: MAT_MENU_SCROLL_STRATEGY_FACTORY,
|
|
782
805
|
};
|
|
783
|
-
/**
|
|
806
|
+
/**
|
|
784
807
|
* Default top padding of the menu panel.
|
|
785
|
-
|
|
808
|
+
* @type {?}
|
|
809
|
+
*/
|
|
786
810
|
const MENU_PANEL_TOP_PADDING = 8;
|
|
787
|
-
/**
|
|
811
|
+
/**
|
|
788
812
|
* Options for binding a passive event listener.
|
|
789
|
-
|
|
813
|
+
* @type {?}
|
|
814
|
+
*/
|
|
790
815
|
const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
|
|
816
|
+
// TODO(andrewseguin): Remove the kebab versions in favor of camelCased attribute selectors
|
|
791
817
|
/**
|
|
792
818
|
* This directive is intended to be used in conjunction with an mat-menu tag. It is
|
|
793
819
|
* responsible for toggling the display of the provided menu instance.
|
|
@@ -813,7 +839,7 @@ class MatMenuTrigger {
|
|
|
813
839
|
this._focusMonitor = _focusMonitor;
|
|
814
840
|
this._overlayRef = null;
|
|
815
841
|
this._menuOpen = false;
|
|
816
|
-
this.
|
|
842
|
+
this._closingActionsSubscription = Subscription.EMPTY;
|
|
817
843
|
this._hoverSubscription = Subscription.EMPTY;
|
|
818
844
|
this._menuCloseSubscription = Subscription.EMPTY;
|
|
819
845
|
/**
|
|
@@ -833,6 +859,7 @@ class MatMenuTrigger {
|
|
|
833
859
|
* @deprecated Switch to `menuOpened` instead
|
|
834
860
|
* \@breaking-change 8.0.0
|
|
835
861
|
*/
|
|
862
|
+
// tslint:disable-next-line:no-output-on-prefix
|
|
836
863
|
this.onMenuOpen = this.menuOpened;
|
|
837
864
|
/**
|
|
838
865
|
* Event emitted when the associated menu is closed.
|
|
@@ -843,6 +870,7 @@ class MatMenuTrigger {
|
|
|
843
870
|
* @deprecated Switch to `menuClosed` instead
|
|
844
871
|
* \@breaking-change 8.0.0
|
|
845
872
|
*/
|
|
873
|
+
// tslint:disable-next-line:no-output-on-prefix
|
|
846
874
|
this.onMenuClose = this.menuClosed;
|
|
847
875
|
_element.nativeElement.addEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);
|
|
848
876
|
if (_menuItemInstance) {
|
|
@@ -905,6 +933,7 @@ class MatMenuTrigger {
|
|
|
905
933
|
}
|
|
906
934
|
this._element.nativeElement.removeEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);
|
|
907
935
|
this._cleanUpSubscriptions();
|
|
936
|
+
this._closingActionsSubscription.unsubscribe();
|
|
908
937
|
}
|
|
909
938
|
/**
|
|
910
939
|
* Whether the menu is open.
|
|
@@ -945,12 +974,16 @@ class MatMenuTrigger {
|
|
|
945
974
|
this._checkMenu();
|
|
946
975
|
/** @type {?} */
|
|
947
976
|
const overlayRef = this._createOverlay();
|
|
948
|
-
|
|
977
|
+
/** @type {?} */
|
|
978
|
+
const overlayConfig = overlayRef.getConfig();
|
|
979
|
+
this._setPosition((/** @type {?} */ (overlayConfig.positionStrategy)));
|
|
980
|
+
overlayConfig.hasBackdrop = this.menu.hasBackdrop == null ? !this.triggersSubmenu() :
|
|
981
|
+
this.menu.hasBackdrop;
|
|
949
982
|
overlayRef.attach(this._getPortal());
|
|
950
983
|
if (this.menu.lazyContent) {
|
|
951
984
|
this.menu.lazyContent.attach(this.menuData);
|
|
952
985
|
}
|
|
953
|
-
this.
|
|
986
|
+
this._closingActionsSubscription = this._menuClosingActions().subscribe(() => this.closeMenu());
|
|
954
987
|
this._initMenu();
|
|
955
988
|
if (this.menu instanceof MatMenu) {
|
|
956
989
|
this.menu._startAnimation();
|
|
@@ -978,6 +1011,7 @@ class MatMenuTrigger {
|
|
|
978
1011
|
}
|
|
979
1012
|
/**
|
|
980
1013
|
* Closes the menu and does the necessary cleanup.
|
|
1014
|
+
* @private
|
|
981
1015
|
* @return {?}
|
|
982
1016
|
*/
|
|
983
1017
|
_destroyMenu() {
|
|
@@ -986,7 +1020,7 @@ class MatMenuTrigger {
|
|
|
986
1020
|
}
|
|
987
1021
|
/** @type {?} */
|
|
988
1022
|
const menu = this.menu;
|
|
989
|
-
this.
|
|
1023
|
+
this._closingActionsSubscription.unsubscribe();
|
|
990
1024
|
this._overlayRef.detach();
|
|
991
1025
|
if (menu instanceof MatMenu) {
|
|
992
1026
|
menu._resetAnimation();
|
|
@@ -996,7 +1030,7 @@ class MatMenuTrigger {
|
|
|
996
1030
|
.pipe(filter(event => event.toState === 'void'), take(1),
|
|
997
1031
|
// Interrupt if the content got re-attached.
|
|
998
1032
|
takeUntil(menu.lazyContent._attached))
|
|
999
|
-
.subscribe(() => /** @type {?} */ (
|
|
1033
|
+
.subscribe(() => (/** @type {?} */ (menu.lazyContent)).detach(), undefined, () => {
|
|
1000
1034
|
// No matter whether the content got re-attached, reset the menu.
|
|
1001
1035
|
this._resetMenu();
|
|
1002
1036
|
});
|
|
@@ -1015,6 +1049,7 @@ class MatMenuTrigger {
|
|
|
1015
1049
|
/**
|
|
1016
1050
|
* This method sets the menu state to open and focuses the first item if
|
|
1017
1051
|
* the menu was opened via the keyboard.
|
|
1052
|
+
* @private
|
|
1018
1053
|
* @return {?}
|
|
1019
1054
|
*/
|
|
1020
1055
|
_initMenu() {
|
|
@@ -1026,6 +1061,7 @@ class MatMenuTrigger {
|
|
|
1026
1061
|
}
|
|
1027
1062
|
/**
|
|
1028
1063
|
* Updates the menu elevation based on the amount of parent menus that it has.
|
|
1064
|
+
* @private
|
|
1029
1065
|
* @return {?}
|
|
1030
1066
|
*/
|
|
1031
1067
|
_setMenuElevation() {
|
|
@@ -1044,6 +1080,7 @@ class MatMenuTrigger {
|
|
|
1044
1080
|
/**
|
|
1045
1081
|
* This method resets the menu when it's closed, most importantly restoring
|
|
1046
1082
|
* focus to the menu trigger if the menu was opened via the keyboard.
|
|
1083
|
+
* @private
|
|
1047
1084
|
* @return {?}
|
|
1048
1085
|
*/
|
|
1049
1086
|
_resetMenu() {
|
|
@@ -1061,7 +1098,9 @@ class MatMenuTrigger {
|
|
|
1061
1098
|
}
|
|
1062
1099
|
this._openedBy = null;
|
|
1063
1100
|
}
|
|
1101
|
+
// set state rather than toggle to support triggers sharing a menu
|
|
1064
1102
|
/**
|
|
1103
|
+
* @private
|
|
1065
1104
|
* @param {?} isOpen
|
|
1066
1105
|
* @return {?}
|
|
1067
1106
|
*/
|
|
@@ -1075,6 +1114,7 @@ class MatMenuTrigger {
|
|
|
1075
1114
|
/**
|
|
1076
1115
|
* This method checks that a valid instance of MatMenu has been passed into
|
|
1077
1116
|
* matMenuTriggerFor. If not, an exception is thrown.
|
|
1117
|
+
* @private
|
|
1078
1118
|
* @return {?}
|
|
1079
1119
|
*/
|
|
1080
1120
|
_checkMenu() {
|
|
@@ -1085,13 +1125,14 @@ class MatMenuTrigger {
|
|
|
1085
1125
|
/**
|
|
1086
1126
|
* This method creates the overlay from the provided menu's template and saves its
|
|
1087
1127
|
* OverlayRef so that it can be attached to the DOM when openMenu is called.
|
|
1128
|
+
* @private
|
|
1088
1129
|
* @return {?}
|
|
1089
1130
|
*/
|
|
1090
1131
|
_createOverlay() {
|
|
1091
1132
|
if (!this._overlayRef) {
|
|
1092
1133
|
/** @type {?} */
|
|
1093
1134
|
const config = this._getOverlayConfig();
|
|
1094
|
-
this._subscribeToPositions(/** @type {?} */ (config.positionStrategy));
|
|
1135
|
+
this._subscribeToPositions((/** @type {?} */ (config.positionStrategy)));
|
|
1095
1136
|
this._overlayRef = this._overlay.create(config);
|
|
1096
1137
|
// Consume the `keydownEvents` in order to prevent them from going to another overlay.
|
|
1097
1138
|
// Ideally we'd also have our keyboard event logic in here, however doing so will
|
|
@@ -1102,6 +1143,7 @@ class MatMenuTrigger {
|
|
|
1102
1143
|
}
|
|
1103
1144
|
/**
|
|
1104
1145
|
* This method builds the configuration object needed to create the overlay, the OverlayState.
|
|
1146
|
+
* @private
|
|
1105
1147
|
* @return {?} OverlayConfig
|
|
1106
1148
|
*/
|
|
1107
1149
|
_getOverlayConfig() {
|
|
@@ -1110,7 +1152,6 @@ class MatMenuTrigger {
|
|
|
1110
1152
|
.flexibleConnectedTo(this._element)
|
|
1111
1153
|
.withLockedPosition()
|
|
1112
1154
|
.withTransformOriginOn('.mat-menu-panel'),
|
|
1113
|
-
hasBackdrop: this.menu.hasBackdrop == null ? !this.triggersSubmenu() : this.menu.hasBackdrop,
|
|
1114
1155
|
backdropClass: this.menu.backdropClass || 'cdk-overlay-transparent-backdrop',
|
|
1115
1156
|
scrollStrategy: this._scrollStrategy(),
|
|
1116
1157
|
direction: this._dir
|
|
@@ -1120,6 +1161,7 @@ class MatMenuTrigger {
|
|
|
1120
1161
|
* Listens to changes in the position of the overlay and sets the correct classes
|
|
1121
1162
|
* on the menu based on the new position. This ensures the animation origin is always
|
|
1122
1163
|
* correct, even if a fallback position is used for the overlay.
|
|
1164
|
+
* @private
|
|
1123
1165
|
* @param {?} position
|
|
1124
1166
|
* @return {?}
|
|
1125
1167
|
*/
|
|
@@ -1129,14 +1171,15 @@ class MatMenuTrigger {
|
|
|
1129
1171
|
/** @type {?} */
|
|
1130
1172
|
const posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
|
|
1131
1173
|
/** @type {?} */
|
|
1132
|
-
const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
|
|
1133
|
-
((this.menu.setPositionClasses))(posX, posY);
|
|
1174
|
+
const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
|
|
1175
|
+
(/** @type {?} */ (this.menu.setPositionClasses))(posX, posY);
|
|
1134
1176
|
});
|
|
1135
1177
|
}
|
|
1136
1178
|
}
|
|
1137
1179
|
/**
|
|
1138
1180
|
* Sets the appropriate positions on a position strategy
|
|
1139
1181
|
* so the overlay connects with the trigger correctly.
|
|
1182
|
+
* @private
|
|
1140
1183
|
* @param {?} positionStrategy Strategy whose position to update.
|
|
1141
1184
|
* @return {?}
|
|
1142
1185
|
*/
|
|
@@ -1179,21 +1222,23 @@ class MatMenuTrigger {
|
|
|
1179
1222
|
}
|
|
1180
1223
|
/**
|
|
1181
1224
|
* Cleans up the active subscriptions.
|
|
1225
|
+
* @private
|
|
1182
1226
|
* @return {?}
|
|
1183
1227
|
*/
|
|
1184
1228
|
_cleanUpSubscriptions() {
|
|
1185
|
-
this.
|
|
1229
|
+
this._closingActionsSubscription.unsubscribe();
|
|
1186
1230
|
this._hoverSubscription.unsubscribe();
|
|
1187
1231
|
}
|
|
1188
1232
|
/**
|
|
1189
1233
|
* Returns a stream that emits whenever an action that should close the menu occurs.
|
|
1234
|
+
* @private
|
|
1190
1235
|
* @return {?}
|
|
1191
1236
|
*/
|
|
1192
1237
|
_menuClosingActions() {
|
|
1193
1238
|
/** @type {?} */
|
|
1194
|
-
const backdrop = /** @type {?} */ (
|
|
1239
|
+
const backdrop = (/** @type {?} */ (this._overlayRef)).backdropClick();
|
|
1195
1240
|
/** @type {?} */
|
|
1196
|
-
const detachments = /** @type {?} */ (
|
|
1241
|
+
const detachments = (/** @type {?} */ (this._overlayRef)).detachments();
|
|
1197
1242
|
/** @type {?} */
|
|
1198
1243
|
const parentClose = this._parentMenu ? this._parentMenu.closed : of();
|
|
1199
1244
|
/** @type {?} */
|
|
@@ -1248,6 +1293,7 @@ class MatMenuTrigger {
|
|
|
1248
1293
|
}
|
|
1249
1294
|
/**
|
|
1250
1295
|
* Handles the cases where the user hovers over the trigger.
|
|
1296
|
+
* @private
|
|
1251
1297
|
* @return {?}
|
|
1252
1298
|
*/
|
|
1253
1299
|
_handleHover() {
|
|
@@ -1279,6 +1325,7 @@ class MatMenuTrigger {
|
|
|
1279
1325
|
}
|
|
1280
1326
|
/**
|
|
1281
1327
|
* Gets the portal that should be attached to the overlay.
|
|
1328
|
+
* @private
|
|
1282
1329
|
* @return {?}
|
|
1283
1330
|
*/
|
|
1284
1331
|
_getPortal() {
|
|
@@ -1327,7 +1374,7 @@ MatMenuTrigger.propDecorators = {
|
|
|
1327
1374
|
|
|
1328
1375
|
/**
|
|
1329
1376
|
* @fileoverview added by tsickle
|
|
1330
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1377
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1331
1378
|
*/
|
|
1332
1379
|
class MatMenuModule {
|
|
1333
1380
|
}
|
|
@@ -1347,18 +1394,18 @@ MatMenuModule.decorators = [
|
|
|
1347
1394
|
|
|
1348
1395
|
/**
|
|
1349
1396
|
* @fileoverview added by tsickle
|
|
1350
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1397
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1351
1398
|
*/
|
|
1352
1399
|
|
|
1353
1400
|
/**
|
|
1354
1401
|
* @fileoverview added by tsickle
|
|
1355
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1402
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1356
1403
|
*/
|
|
1357
1404
|
|
|
1358
1405
|
/**
|
|
1359
1406
|
* @fileoverview added by tsickle
|
|
1360
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1407
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1361
1408
|
*/
|
|
1362
1409
|
|
|
1363
|
-
export { MAT_MENU_SCROLL_STRATEGY, MatMenuModule, MatMenu, MAT_MENU_DEFAULT_OPTIONS, MatMenuItem, MatMenuTrigger, matMenuAnimations, fadeInItems, transformMenu, MatMenuContent, MAT_MENU_DEFAULT_OPTIONS_FACTORY as ɵ
|
|
1410
|
+
export { MAT_MENU_SCROLL_STRATEGY, MatMenuModule, MatMenu, MAT_MENU_DEFAULT_OPTIONS, MatMenuItem, MatMenuTrigger, matMenuAnimations, fadeInItems, transformMenu, MatMenuContent, MAT_MENU_DEFAULT_OPTIONS_FACTORY as ɵa21, MatMenuItemBase as ɵb21, _MatMenuItemMixinBase as ɵc21, MAT_MENU_PANEL as ɵf21, MAT_MENU_SCROLL_STRATEGY_FACTORY as ɵd21, MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER as ɵe21 };
|
|
1364
1411
|
//# sourceMappingURL=menu.js.map
|