@angular/material 7.0.3 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +57 -49
- 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 +124 -30
- 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 -25
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +1 -1
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +40 -15
- 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 +19 -12
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +1 -1
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card.umd.js +2 -2
- package/bundles/material-card.umd.js.map +1 -1
- package/bundles/material-card.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +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 +186 -123
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +2 -1
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +241 -59
- 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 +136 -44
- 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 +32 -22
- 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 +120 -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 +280 -79
- 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 +46 -24
- 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 +71 -22
- 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 +157 -55
- 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 +35 -14
- 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 +26 -7
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +178 -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 +102 -23
- 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 +33 -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 +89 -19
- 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 +74 -22
- 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 +45 -23
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper.umd.js +37 -44
- 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 -19
- 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 +156 -56
- 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 +13 -3
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +52 -25
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +25 -26
- 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 +2780 -979
- 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/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-toggle.d.ts +5 -0
- 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 +58 -27
- 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 +46 -27
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js +24 -13
- package/esm2015/button-toggle.js.map +1 -1
- package/esm2015/button.js +18 -13
- package/esm2015/button.js.map +1 -1
- package/esm2015/card.js +4 -4
- 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 +145 -126
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +131 -44
- package/esm2015/datepicker.js.map +1 -1
- package/esm2015/dialog.js +76 -45
- package/esm2015/dialog.js.map +1 -1
- package/esm2015/divider.js +4 -4
- package/esm2015/divider.js.map +1 -1
- package/esm2015/expansion.js +35 -25
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +93 -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 +139 -68
- package/esm2015/icon.js.map +1 -1
- package/esm2015/input.js +40 -23
- package/esm2015/input.js.map +1 -1
- package/esm2015/list.js +49 -23
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +10 -9
- package/esm2015/material.js.map +1 -1
- package/esm2015/menu.js +100 -53
- 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 +30 -15
- 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 +17 -7
- package/esm2015/radio.js.map +1 -1
- package/esm2015/select.js +103 -50
- package/esm2015/select.js.map +1 -1
- package/esm2015/sidenav.js +73 -26
- package/esm2015/sidenav.js.map +1 -1
- package/esm2015/slide-toggle.js +26 -16
- package/esm2015/slide-toggle.js.map +1 -1
- package/esm2015/slider.js +50 -20
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +44 -24
- package/esm2015/snack-bar.js.map +1 -1
- package/esm2015/sort.js +46 -23
- package/esm2015/sort.js.map +1 -1
- package/esm2015/stepper.js +35 -39
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +31 -21
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +110 -52
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/toolbar.js +8 -4
- package/esm2015/toolbar.js.map +1 -1
- package/esm2015/tooltip.js +42 -27
- package/esm2015/tooltip.js.map +1 -1
- package/esm2015/tree.js +22 -25
- package/esm2015/tree.js.map +1 -1
- package/esm5/autocomplete.es5.js +126 -32
- 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 +71 -28
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js +42 -17
- package/esm5/button-toggle.es5.js.map +1 -1
- package/esm5/button.es5.js +21 -14
- package/esm5/button.es5.js.map +1 -1
- package/esm5/card.es5.js +4 -4
- package/esm5/card.es5.js.map +1 -1
- package/esm5/checkbox.es5.js +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 +189 -126
- package/esm5/core.es5.js.map +1 -1
- package/esm5/datepicker.es5.js +240 -58
- package/esm5/datepicker.es5.js.map +1 -1
- package/esm5/dialog.es5.js +139 -47
- 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 +35 -25
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +124 -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 +282 -81
- package/esm5/icon.es5.js.map +1 -1
- package/esm5/input.es5.js +48 -26
- package/esm5/input.es5.js.map +1 -1
- package/esm5/list.es5.js +74 -25
- package/esm5/list.es5.js.map +1 -1
- package/esm5/material.es5.js +10 -9
- package/esm5/material.es5.js.map +1 -1
- package/esm5/menu.es5.js +158 -55
- 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 +37 -16
- 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 +28 -9
- package/esm5/radio.es5.js.map +1 -1
- package/esm5/select.es5.js +181 -52
- package/esm5/select.es5.js.map +1 -1
- package/esm5/sidenav.es5.js +105 -26
- package/esm5/sidenav.es5.js.map +1 -1
- package/esm5/slide-toggle.es5.js +35 -17
- package/esm5/slide-toggle.es5.js.map +1 -1
- package/esm5/slider.es5.js +91 -21
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +76 -24
- package/esm5/snack-bar.es5.js.map +1 -1
- package/esm5/sort.es5.js +52 -25
- package/esm5/sort.es5.js.map +1 -1
- package/esm5/stepper.es5.js +40 -47
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +31 -21
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +159 -60
- package/esm5/tabs.es5.js.map +1 -1
- package/esm5/toolbar.es5.js +15 -5
- package/esm5/toolbar.es5.js.map +1 -1
- package/esm5/tooltip.es5.js +54 -27
- package/esm5/tooltip.es5.js.map +1 -1
- package/esm5/tree.es5.js +27 -28
- package/esm5/tree.es5.js.map +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.metadata.json +1 -1
- package/menu/typings/menu-item.d.ts +2 -0
- package/menu/typings/menu-trigger.d.ts +5 -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/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/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/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/step-header.d.ts +3 -5
- package/table/typings/index.metadata.json +1 -1
- 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/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/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-toggle.d.ts +5 -0
- 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/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-toggle.d.ts +5 -0
- 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/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.metadata.json +1 -1
- package/typings/esm5/menu/menu-item.d.ts +2 -0
- package/typings/esm5/menu/menu-trigger.d.ts +5 -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/select/index.metadata.json +1 -1
- 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/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/step-header.d.ts +3 -5
- package/typings/esm5/table/index.metadata.json +1 -1
- 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/tree/data-source/flat-data-source.d.ts +2 -2
- package/typings/esm5/tree/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.metadata.json +1 -1
- package/typings/menu/menu-item.d.ts +2 -0
- package/typings/menu/menu-trigger.d.ts +5 -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/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/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/stepper/index.metadata.json +1 -1
- package/typings/stepper/step-header.d.ts +3 -5
- package/typings/table/index.metadata.json +1 -1
- 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/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/select.es5.js
CHANGED
|
@@ -11,7 +11,7 @@ import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
|
11
11
|
import { Directionality } from '@angular/cdk/bidi';
|
|
12
12
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
13
13
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
14
|
-
import { A, DOWN_ARROW, END, ENTER, HOME, LEFT_ARROW, RIGHT_ARROW, SPACE, UP_ARROW } from '@angular/cdk/keycodes';
|
|
14
|
+
import { A, DOWN_ARROW, END, ENTER, HOME, LEFT_ARROW, RIGHT_ARROW, SPACE, UP_ARROW, hasModifierKey } from '@angular/cdk/keycodes';
|
|
15
15
|
import { CdkConnectedOverlay, Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
16
16
|
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
17
17
|
import { Attribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, Directive, ElementRef, EventEmitter, Inject, InjectionToken, Input, isDevMode, NgZone, Optional, Output, Self, ViewChild, ViewEncapsulation, NgModule } from '@angular/core';
|
|
@@ -24,25 +24,26 @@ import { CommonModule } from '@angular/common';
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* @fileoverview added by tsickle
|
|
27
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
27
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
28
28
|
*/
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
30
|
* The following are all the animations for the mat-select component, with each
|
|
31
31
|
* const containing the metadata for one animation.
|
|
32
32
|
*
|
|
33
33
|
* The values below match the implementation of the AngularJS Material mat-select animation.
|
|
34
34
|
* \@docs-private
|
|
35
|
-
|
|
35
|
+
* @type {?}
|
|
36
|
+
*/
|
|
36
37
|
var matSelectAnimations = {
|
|
37
38
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
* This animation transforms the select's overlay panel on and off the page.
|
|
40
|
+
*
|
|
41
|
+
* When the panel is attached to the DOM, it expands its width by the amount of padding, scales it
|
|
42
|
+
* up to 100% on the Y axis, fades in its border, and translates slightly up and to the
|
|
43
|
+
* side to ensure the option text correctly overlaps the trigger text.
|
|
44
|
+
*
|
|
45
|
+
* When the panel is removed from the DOM, it simply fades out linearly.
|
|
46
|
+
*/
|
|
46
47
|
transformPanel: trigger('transformPanel', [
|
|
47
48
|
state('void', style({
|
|
48
49
|
transform: 'scaleY(0.8)',
|
|
@@ -65,12 +66,12 @@ var matSelectAnimations = {
|
|
|
65
66
|
transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 })))
|
|
66
67
|
]),
|
|
67
68
|
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
* This animation fades in the background color and text content of the
|
|
70
|
+
* select's options. It is time delayed to occur 100ms after the overlay
|
|
71
|
+
* panel has transformed in.
|
|
72
|
+
* @deprecated Not used anymore. To be removed.
|
|
73
|
+
* \@breaking-change 8.0.0
|
|
74
|
+
*/
|
|
74
75
|
fadeInContent: trigger('fadeInContent', [
|
|
75
76
|
state('showing', style({ opacity: 1 })),
|
|
76
77
|
transition('void => showing', [
|
|
@@ -79,22 +80,24 @@ var matSelectAnimations = {
|
|
|
79
80
|
])
|
|
80
81
|
])
|
|
81
82
|
};
|
|
82
|
-
/**
|
|
83
|
+
/**
|
|
83
84
|
* @deprecated
|
|
84
85
|
* \@breaking-change 8.0.0
|
|
85
86
|
* \@docs-private
|
|
86
|
-
|
|
87
|
+
* @type {?}
|
|
88
|
+
*/
|
|
87
89
|
var transformPanel = matSelectAnimations.transformPanel;
|
|
88
|
-
/**
|
|
90
|
+
/**
|
|
89
91
|
* @deprecated
|
|
90
92
|
* \@breaking-change 8.0.0
|
|
91
93
|
* \@docs-private
|
|
92
|
-
|
|
94
|
+
* @type {?}
|
|
95
|
+
*/
|
|
93
96
|
var fadeInContent = matSelectAnimations.fadeInContent;
|
|
94
97
|
|
|
95
98
|
/**
|
|
96
99
|
* @fileoverview added by tsickle
|
|
97
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
100
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
98
101
|
*/
|
|
99
102
|
|
|
100
103
|
/**
|
|
@@ -128,27 +131,32 @@ function getMatSelectNonFunctionValueError() {
|
|
|
128
131
|
|
|
129
132
|
/**
|
|
130
133
|
* @fileoverview added by tsickle
|
|
131
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
134
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
132
135
|
*/
|
|
133
136
|
/** @type {?} */
|
|
134
137
|
var nextUniqueId = 0;
|
|
135
|
-
/**
|
|
138
|
+
/**
|
|
136
139
|
* The max height of the select's overlay panel
|
|
137
|
-
|
|
140
|
+
* @type {?}
|
|
141
|
+
*/
|
|
138
142
|
var SELECT_PANEL_MAX_HEIGHT = 256;
|
|
139
|
-
/**
|
|
143
|
+
/**
|
|
140
144
|
* The panel's padding on the x-axis
|
|
141
|
-
|
|
145
|
+
* @type {?}
|
|
146
|
+
*/
|
|
142
147
|
var SELECT_PANEL_PADDING_X = 16;
|
|
143
|
-
/**
|
|
148
|
+
/**
|
|
144
149
|
* The panel's x axis padding if it is indented (e.g. there is an option group).
|
|
145
|
-
|
|
150
|
+
* @type {?}
|
|
151
|
+
*/
|
|
146
152
|
var SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;
|
|
147
|
-
/**
|
|
153
|
+
/**
|
|
148
154
|
* The height of the select items in `em` units.
|
|
149
|
-
|
|
155
|
+
* @type {?}
|
|
156
|
+
*/
|
|
150
157
|
var SELECT_ITEM_HEIGHT_EM = 3;
|
|
151
|
-
|
|
158
|
+
// TODO(josephperrott): Revert to a constant after 2018 spec updates are fully merged.
|
|
159
|
+
/**
|
|
152
160
|
* Distance between the panel edge and the option text in
|
|
153
161
|
* multi-selection mode.
|
|
154
162
|
*
|
|
@@ -156,16 +164,19 @@ var SELECT_ITEM_HEIGHT_EM = 3;
|
|
|
156
164
|
* (SELECT_PANEL_PADDING_X * 1.5) + 20 = 44
|
|
157
165
|
* The padding is multiplied by 1.5 because the checkbox's margin is half the padding.
|
|
158
166
|
* The checkbox width is 16px.
|
|
159
|
-
|
|
167
|
+
* @type {?}
|
|
168
|
+
*/
|
|
160
169
|
var SELECT_MULTIPLE_PANEL_PADDING_X = 0;
|
|
161
|
-
/**
|
|
170
|
+
/**
|
|
162
171
|
* The select panel will only "fit" inside the viewport if it is positioned at
|
|
163
172
|
* this value or more away from the viewport boundary.
|
|
164
|
-
|
|
173
|
+
* @type {?}
|
|
174
|
+
*/
|
|
165
175
|
var SELECT_PANEL_VIEWPORT_PADDING = 8;
|
|
166
|
-
/**
|
|
176
|
+
/**
|
|
167
177
|
* Injection token that determines the scroll handling while a select is open.
|
|
168
|
-
|
|
178
|
+
* @type {?}
|
|
179
|
+
*/
|
|
169
180
|
var MAT_SELECT_SCROLL_STRATEGY = new InjectionToken('mat-select-scroll-strategy');
|
|
170
181
|
/**
|
|
171
182
|
* \@docs-private
|
|
@@ -175,9 +186,10 @@ var MAT_SELECT_SCROLL_STRATEGY = new InjectionToken('mat-select-scroll-strategy'
|
|
|
175
186
|
function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
|
|
176
187
|
return function () { return overlay.scrollStrategies.reposition(); };
|
|
177
188
|
}
|
|
178
|
-
/**
|
|
189
|
+
/**
|
|
179
190
|
* \@docs-private
|
|
180
|
-
|
|
191
|
+
* @type {?}
|
|
192
|
+
*/
|
|
181
193
|
var MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {
|
|
182
194
|
provide: MAT_SELECT_SCROLL_STRATEGY,
|
|
183
195
|
deps: [Overlay],
|
|
@@ -196,10 +208,13 @@ MatSelectChange = /** @class */ (function () {
|
|
|
196
208
|
}
|
|
197
209
|
return MatSelectChange;
|
|
198
210
|
}());
|
|
211
|
+
// Boilerplate for applying mixins to MatSelect.
|
|
199
212
|
/**
|
|
200
213
|
* \@docs-private
|
|
201
214
|
*/
|
|
202
|
-
var
|
|
215
|
+
var
|
|
216
|
+
// Boilerplate for applying mixins to MatSelect.
|
|
217
|
+
/**
|
|
203
218
|
* \@docs-private
|
|
204
219
|
*/
|
|
205
220
|
MatSelectBase = /** @class */ (function () {
|
|
@@ -606,7 +621,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
606
621
|
function (changes) {
|
|
607
622
|
// Updating the disabled state is handled by `mixinDisabled`, but we need to additionally let
|
|
608
623
|
// the parent form field know to run change detection when the disabled state changes.
|
|
609
|
-
if (changes
|
|
624
|
+
if (changes.disabled) {
|
|
610
625
|
this.stateChanges.next();
|
|
611
626
|
}
|
|
612
627
|
};
|
|
@@ -859,13 +874,16 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
859
874
|
this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);
|
|
860
875
|
}
|
|
861
876
|
};
|
|
877
|
+
/** Handles keyboard events while the select is closed. */
|
|
862
878
|
/**
|
|
863
879
|
* Handles keyboard events while the select is closed.
|
|
880
|
+
* @private
|
|
864
881
|
* @param {?} event
|
|
865
882
|
* @return {?}
|
|
866
883
|
*/
|
|
867
884
|
MatSelect.prototype._handleClosedKeydown = /**
|
|
868
885
|
* Handles keyboard events while the select is closed.
|
|
886
|
+
* @private
|
|
869
887
|
* @param {?} event
|
|
870
888
|
* @return {?}
|
|
871
889
|
*/
|
|
@@ -880,7 +898,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
880
898
|
/** @type {?} */
|
|
881
899
|
var manager = this._keyManager;
|
|
882
900
|
// Open the select on ALT + arrow key to match the native <select>
|
|
883
|
-
if (isOpenKey || ((this.multiple || event.altKey) && isArrowKey)) {
|
|
901
|
+
if ((isOpenKey && !hasModifierKey(event)) || ((this.multiple || event.altKey) && isArrowKey)) {
|
|
884
902
|
event.preventDefault(); // prevents the page from scrolling down when pressing space
|
|
885
903
|
this.open();
|
|
886
904
|
}
|
|
@@ -894,13 +912,16 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
894
912
|
}
|
|
895
913
|
}
|
|
896
914
|
};
|
|
915
|
+
/** Handles keyboard events when the selected is open. */
|
|
897
916
|
/**
|
|
898
917
|
* Handles keyboard events when the selected is open.
|
|
918
|
+
* @private
|
|
899
919
|
* @param {?} event
|
|
900
920
|
* @return {?}
|
|
901
921
|
*/
|
|
902
922
|
MatSelect.prototype._handleOpenKeydown = /**
|
|
903
923
|
* Handles keyboard events when the selected is open.
|
|
924
|
+
* @private
|
|
904
925
|
* @param {?} event
|
|
905
926
|
* @return {?}
|
|
906
927
|
*/
|
|
@@ -920,7 +941,8 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
920
941
|
event.preventDefault();
|
|
921
942
|
this.close();
|
|
922
943
|
}
|
|
923
|
-
else if ((keyCode === ENTER || keyCode === SPACE) && manager.activeItem
|
|
944
|
+
else if ((keyCode === ENTER || keyCode === SPACE) && manager.activeItem &&
|
|
945
|
+
!hasModifierKey(event)) {
|
|
924
946
|
event.preventDefault();
|
|
925
947
|
manager.activeItem._selectViaInteraction();
|
|
926
948
|
}
|
|
@@ -1010,12 +1032,19 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1010
1032
|
function () {
|
|
1011
1033
|
return this._parentFormField ? "mat-" + this._parentFormField.color : '';
|
|
1012
1034
|
};
|
|
1035
|
+
// TODO(josephperrott): Remove after 2018 spec updates are fully merged.
|
|
1036
|
+
/** Sets the pseudo checkbox padding size based on the width of the pseudo checkbox. */
|
|
1037
|
+
// TODO(josephperrott): Remove after 2018 spec updates are fully merged.
|
|
1013
1038
|
/**
|
|
1014
1039
|
* Sets the pseudo checkbox padding size based on the width of the pseudo checkbox.
|
|
1040
|
+
* @private
|
|
1015
1041
|
* @return {?}
|
|
1016
1042
|
*/
|
|
1017
|
-
MatSelect.prototype._setPseudoCheckboxPaddingSize =
|
|
1043
|
+
MatSelect.prototype._setPseudoCheckboxPaddingSize =
|
|
1044
|
+
// TODO(josephperrott): Remove after 2018 spec updates are fully merged.
|
|
1045
|
+
/**
|
|
1018
1046
|
* Sets the pseudo checkbox padding size based on the width of the pseudo checkbox.
|
|
1047
|
+
* @private
|
|
1019
1048
|
* @return {?}
|
|
1020
1049
|
*/
|
|
1021
1050
|
function () {
|
|
@@ -1040,9 +1069,11 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1040
1069
|
configurable: true
|
|
1041
1070
|
});
|
|
1042
1071
|
/**
|
|
1072
|
+
* @private
|
|
1043
1073
|
* @return {?}
|
|
1044
1074
|
*/
|
|
1045
1075
|
MatSelect.prototype._initializeSelection = /**
|
|
1076
|
+
* @private
|
|
1046
1077
|
* @return {?}
|
|
1047
1078
|
*/
|
|
1048
1079
|
function () {
|
|
@@ -1056,12 +1087,18 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1056
1087
|
/**
|
|
1057
1088
|
* Sets the selected option based on a value. If no option can be
|
|
1058
1089
|
* found with the designated value, the select trigger is cleared.
|
|
1090
|
+
*/
|
|
1091
|
+
/**
|
|
1092
|
+
* Sets the selected option based on a value. If no option can be
|
|
1093
|
+
* found with the designated value, the select trigger is cleared.
|
|
1094
|
+
* @private
|
|
1059
1095
|
* @param {?} value
|
|
1060
1096
|
* @return {?}
|
|
1061
1097
|
*/
|
|
1062
1098
|
MatSelect.prototype._setSelectionByValue = /**
|
|
1063
1099
|
* Sets the selected option based on a value. If no option can be
|
|
1064
1100
|
* found with the designated value, the select trigger is cleared.
|
|
1101
|
+
* @private
|
|
1065
1102
|
* @param {?} value
|
|
1066
1103
|
* @return {?}
|
|
1067
1104
|
*/
|
|
@@ -1089,11 +1126,17 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1089
1126
|
};
|
|
1090
1127
|
/**
|
|
1091
1128
|
* Finds and selects and option based on its value.
|
|
1129
|
+
* @returns Option that has the corresponding value.
|
|
1130
|
+
*/
|
|
1131
|
+
/**
|
|
1132
|
+
* Finds and selects and option based on its value.
|
|
1133
|
+
* @private
|
|
1092
1134
|
* @param {?} value
|
|
1093
1135
|
* @return {?} Option that has the corresponding value.
|
|
1094
1136
|
*/
|
|
1095
1137
|
MatSelect.prototype._selectValue = /**
|
|
1096
1138
|
* Finds and selects and option based on its value.
|
|
1139
|
+
* @private
|
|
1097
1140
|
* @param {?} value
|
|
1098
1141
|
* @return {?} Option that has the corresponding value.
|
|
1099
1142
|
*/
|
|
@@ -1118,12 +1161,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1118
1161
|
}
|
|
1119
1162
|
return correspondingOption;
|
|
1120
1163
|
};
|
|
1164
|
+
/** Sets up a key manager to listen to keyboard events on the overlay panel. */
|
|
1121
1165
|
/**
|
|
1122
1166
|
* Sets up a key manager to listen to keyboard events on the overlay panel.
|
|
1167
|
+
* @private
|
|
1123
1168
|
* @return {?}
|
|
1124
1169
|
*/
|
|
1125
1170
|
MatSelect.prototype._initKeyManager = /**
|
|
1126
1171
|
* Sets up a key manager to listen to keyboard events on the overlay panel.
|
|
1172
|
+
* @private
|
|
1127
1173
|
* @return {?}
|
|
1128
1174
|
*/
|
|
1129
1175
|
function () {
|
|
@@ -1131,7 +1177,8 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1131
1177
|
this._keyManager = new ActiveDescendantKeyManager(this.options)
|
|
1132
1178
|
.withTypeAhead()
|
|
1133
1179
|
.withVerticalOrientation()
|
|
1134
|
-
.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')
|
|
1180
|
+
.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')
|
|
1181
|
+
.withAllowedModifierKeys(['shiftKey']);
|
|
1135
1182
|
this._keyManager.tabOut.pipe(takeUntil(this._destroy)).subscribe(function () {
|
|
1136
1183
|
// Restore focus to the trigger before closing. Ensures that the focus
|
|
1137
1184
|
// position won't be lost if the user got focus into the overlay.
|
|
@@ -1147,12 +1194,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1147
1194
|
}
|
|
1148
1195
|
});
|
|
1149
1196
|
};
|
|
1197
|
+
/** Drops current option subscriptions and IDs and resets from scratch. */
|
|
1150
1198
|
/**
|
|
1151
1199
|
* Drops current option subscriptions and IDs and resets from scratch.
|
|
1200
|
+
* @private
|
|
1152
1201
|
* @return {?}
|
|
1153
1202
|
*/
|
|
1154
1203
|
MatSelect.prototype._resetOptions = /**
|
|
1155
1204
|
* Drops current option subscriptions and IDs and resets from scratch.
|
|
1205
|
+
* @private
|
|
1156
1206
|
* @return {?}
|
|
1157
1207
|
*/
|
|
1158
1208
|
function () {
|
|
@@ -1175,14 +1225,17 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1175
1225
|
});
|
|
1176
1226
|
this._setOptionIds();
|
|
1177
1227
|
};
|
|
1228
|
+
/** Invoked when an option is clicked. */
|
|
1178
1229
|
/**
|
|
1179
1230
|
* Invoked when an option is clicked.
|
|
1231
|
+
* @private
|
|
1180
1232
|
* @param {?} option
|
|
1181
1233
|
* @param {?} isUserInput
|
|
1182
1234
|
* @return {?}
|
|
1183
1235
|
*/
|
|
1184
1236
|
MatSelect.prototype._onSelect = /**
|
|
1185
1237
|
* Invoked when an option is clicked.
|
|
1238
|
+
* @private
|
|
1186
1239
|
* @param {?} option
|
|
1187
1240
|
* @param {?} isUserInput
|
|
1188
1241
|
* @return {?}
|
|
@@ -1216,12 +1269,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1216
1269
|
}
|
|
1217
1270
|
this.stateChanges.next();
|
|
1218
1271
|
};
|
|
1272
|
+
/** Sorts the selected values in the selected based on their order in the panel. */
|
|
1219
1273
|
/**
|
|
1220
1274
|
* Sorts the selected values in the selected based on their order in the panel.
|
|
1275
|
+
* @private
|
|
1221
1276
|
* @return {?}
|
|
1222
1277
|
*/
|
|
1223
1278
|
MatSelect.prototype._sortValues = /**
|
|
1224
1279
|
* Sorts the selected values in the selected based on their order in the panel.
|
|
1280
|
+
* @private
|
|
1225
1281
|
* @return {?}
|
|
1226
1282
|
*/
|
|
1227
1283
|
function () {
|
|
@@ -1236,13 +1292,16 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1236
1292
|
this.stateChanges.next();
|
|
1237
1293
|
}
|
|
1238
1294
|
};
|
|
1295
|
+
/** Emits change event to set the model value. */
|
|
1239
1296
|
/**
|
|
1240
1297
|
* Emits change event to set the model value.
|
|
1298
|
+
* @private
|
|
1241
1299
|
* @param {?=} fallbackValue
|
|
1242
1300
|
* @return {?}
|
|
1243
1301
|
*/
|
|
1244
1302
|
MatSelect.prototype._propagateChanges = /**
|
|
1245
1303
|
* Emits change event to set the model value.
|
|
1304
|
+
* @private
|
|
1246
1305
|
* @param {?=} fallbackValue
|
|
1247
1306
|
* @return {?}
|
|
1248
1307
|
*/
|
|
@@ -1250,10 +1309,10 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1250
1309
|
/** @type {?} */
|
|
1251
1310
|
var valueToEmit = null;
|
|
1252
1311
|
if (this.multiple) {
|
|
1253
|
-
valueToEmit = (/** @type {?} */ (this.selected)).map(function (option) { return option.value; });
|
|
1312
|
+
valueToEmit = ((/** @type {?} */ (this.selected))).map(function (option) { return option.value; });
|
|
1254
1313
|
}
|
|
1255
1314
|
else {
|
|
1256
|
-
valueToEmit = this.selected ? (/** @type {?} */ (this.selected)).value : fallbackValue;
|
|
1315
|
+
valueToEmit = this.selected ? ((/** @type {?} */ (this.selected))).value : fallbackValue;
|
|
1257
1316
|
}
|
|
1258
1317
|
this._value = valueToEmit;
|
|
1259
1318
|
this.valueChange.emit(valueToEmit);
|
|
@@ -1261,12 +1320,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1261
1320
|
this.selectionChange.emit(new MatSelectChange(this, valueToEmit));
|
|
1262
1321
|
this._changeDetectorRef.markForCheck();
|
|
1263
1322
|
};
|
|
1323
|
+
/** Records option IDs to pass to the aria-owns property. */
|
|
1264
1324
|
/**
|
|
1265
1325
|
* Records option IDs to pass to the aria-owns property.
|
|
1326
|
+
* @private
|
|
1266
1327
|
* @return {?}
|
|
1267
1328
|
*/
|
|
1268
1329
|
MatSelect.prototype._setOptionIds = /**
|
|
1269
1330
|
* Records option IDs to pass to the aria-owns property.
|
|
1331
|
+
* @private
|
|
1270
1332
|
* @return {?}
|
|
1271
1333
|
*/
|
|
1272
1334
|
function () {
|
|
@@ -1275,11 +1337,17 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1275
1337
|
/**
|
|
1276
1338
|
* Highlights the selected item. If no option is selected, it will highlight
|
|
1277
1339
|
* the first item instead.
|
|
1340
|
+
*/
|
|
1341
|
+
/**
|
|
1342
|
+
* Highlights the selected item. If no option is selected, it will highlight
|
|
1343
|
+
* the first item instead.
|
|
1344
|
+
* @private
|
|
1278
1345
|
* @return {?}
|
|
1279
1346
|
*/
|
|
1280
1347
|
MatSelect.prototype._highlightCorrectOption = /**
|
|
1281
1348
|
* Highlights the selected item. If no option is selected, it will highlight
|
|
1282
1349
|
* the first item instead.
|
|
1350
|
+
* @private
|
|
1283
1351
|
* @return {?}
|
|
1284
1352
|
*/
|
|
1285
1353
|
function () {
|
|
@@ -1292,12 +1360,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1292
1360
|
}
|
|
1293
1361
|
}
|
|
1294
1362
|
};
|
|
1363
|
+
/** Scrolls the active option into view. */
|
|
1295
1364
|
/**
|
|
1296
1365
|
* Scrolls the active option into view.
|
|
1366
|
+
* @private
|
|
1297
1367
|
* @return {?}
|
|
1298
1368
|
*/
|
|
1299
1369
|
MatSelect.prototype._scrollActiveOptionIntoView = /**
|
|
1300
1370
|
* Scrolls the active option into view.
|
|
1371
|
+
* @private
|
|
1301
1372
|
* @return {?}
|
|
1302
1373
|
*/
|
|
1303
1374
|
function () {
|
|
@@ -1319,13 +1390,16 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1319
1390
|
function () {
|
|
1320
1391
|
this._elementRef.nativeElement.focus();
|
|
1321
1392
|
};
|
|
1393
|
+
/** Gets the index of the provided option in the option list. */
|
|
1322
1394
|
/**
|
|
1323
1395
|
* Gets the index of the provided option in the option list.
|
|
1396
|
+
* @private
|
|
1324
1397
|
* @param {?} option
|
|
1325
1398
|
* @return {?}
|
|
1326
1399
|
*/
|
|
1327
1400
|
MatSelect.prototype._getOptionIndex = /**
|
|
1328
1401
|
* Gets the index of the provided option in the option list.
|
|
1402
|
+
* @private
|
|
1329
1403
|
* @param {?} option
|
|
1330
1404
|
* @return {?}
|
|
1331
1405
|
*/
|
|
@@ -1334,12 +1408,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1334
1408
|
return result === undefined ? (option === current ? index : undefined) : result;
|
|
1335
1409
|
}, undefined);
|
|
1336
1410
|
};
|
|
1411
|
+
/** Calculates the scroll position and x- and y-offsets of the overlay panel. */
|
|
1337
1412
|
/**
|
|
1338
1413
|
* Calculates the scroll position and x- and y-offsets of the overlay panel.
|
|
1414
|
+
* @private
|
|
1339
1415
|
* @return {?}
|
|
1340
1416
|
*/
|
|
1341
1417
|
MatSelect.prototype._calculateOverlayPosition = /**
|
|
1342
1418
|
* Calculates the scroll position and x- and y-offsets of the overlay panel.
|
|
1419
|
+
* @private
|
|
1343
1420
|
* @return {?}
|
|
1344
1421
|
*/
|
|
1345
1422
|
function () {
|
|
@@ -1351,11 +1428,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1351
1428
|
var panelHeight = Math.min(items * itemHeight, SELECT_PANEL_MAX_HEIGHT);
|
|
1352
1429
|
/** @type {?} */
|
|
1353
1430
|
var scrollContainerHeight = items * itemHeight;
|
|
1431
|
+
// The farthest the panel can be scrolled before it hits the bottom
|
|
1354
1432
|
/** @type {?} */
|
|
1355
1433
|
var maxScroll = scrollContainerHeight - panelHeight;
|
|
1434
|
+
// If no value is selected we open the popup to the first item.
|
|
1356
1435
|
/** @type {?} */
|
|
1357
|
-
var selectedOptionOffset = this.empty ? 0 : /** @type {?} */ (
|
|
1436
|
+
var selectedOptionOffset = this.empty ? 0 : (/** @type {?} */ (this._getOptionIndex(this._selectionModel.selected[0])));
|
|
1358
1437
|
selectedOptionOffset += _countGroupLabelsBeforeOption(selectedOptionOffset, this.options, this.optionGroups);
|
|
1438
|
+
// We must maintain a scroll buffer so the selected option will be scrolled to the
|
|
1439
|
+
// center of the overlay panel rather than the top.
|
|
1359
1440
|
/** @type {?} */
|
|
1360
1441
|
var scrollBuffer = panelHeight / 2;
|
|
1361
1442
|
this._scrollTop = this._calculateOverlayScroll(selectedOptionOffset, scrollBuffer, maxScroll);
|
|
@@ -1398,6 +1479,10 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1398
1479
|
var optionOffsetFromScrollTop = itemHeight * selectedIndex;
|
|
1399
1480
|
/** @type {?} */
|
|
1400
1481
|
var halfOptionHeight = itemHeight / 2;
|
|
1482
|
+
// Starts at the optionOffsetFromScrollTop, which scrolls the option to the top of the
|
|
1483
|
+
// scroll container, then subtracts the scroll buffer to scroll the option down to
|
|
1484
|
+
// the center of the overlay panel. Half the option height must be re-added to the
|
|
1485
|
+
// scrollTop so the option is centered based on its middle, not its top edge.
|
|
1401
1486
|
/** @type {?} */
|
|
1402
1487
|
var optimalScrollPosition = optionOffsetFromScrollTop - scrollBuffer + halfOptionHeight;
|
|
1403
1488
|
return Math.min(Math.max(0, optimalScrollPosition), maxScroll);
|
|
@@ -1458,6 +1543,14 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1458
1543
|
* the panel opens. Will change based on LTR or RTL text direction. Note that the offset
|
|
1459
1544
|
* can't be calculated until the panel has been attached, because we need to know the
|
|
1460
1545
|
* content width in order to constrain the panel within the viewport.
|
|
1546
|
+
*/
|
|
1547
|
+
/**
|
|
1548
|
+
* Sets the x-offset of the overlay panel in relation to the trigger's top start corner.
|
|
1549
|
+
* This must be adjusted to align the selected option text over the trigger text when
|
|
1550
|
+
* the panel opens. Will change based on LTR or RTL text direction. Note that the offset
|
|
1551
|
+
* can't be calculated until the panel has been attached, because we need to know the
|
|
1552
|
+
* content width in order to constrain the panel within the viewport.
|
|
1553
|
+
* @private
|
|
1461
1554
|
* @return {?}
|
|
1462
1555
|
*/
|
|
1463
1556
|
MatSelect.prototype._calculateOverlayOffsetX = /**
|
|
@@ -1466,6 +1559,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1466
1559
|
* the panel opens. Will change based on LTR or RTL text direction. Note that the offset
|
|
1467
1560
|
* can't be calculated until the panel has been attached, because we need to know the
|
|
1468
1561
|
* content width in order to constrain the panel within the viewport.
|
|
1562
|
+
* @private
|
|
1469
1563
|
* @return {?}
|
|
1470
1564
|
*/
|
|
1471
1565
|
function () {
|
|
@@ -1493,6 +1587,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1493
1587
|
if (!isRtl) {
|
|
1494
1588
|
offsetX *= -1;
|
|
1495
1589
|
}
|
|
1590
|
+
// Determine how much the select overflows on each side.
|
|
1496
1591
|
/** @type {?} */
|
|
1497
1592
|
var leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));
|
|
1498
1593
|
/** @type {?} */
|
|
@@ -1515,6 +1610,12 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1515
1610
|
* Calculates the y-offset of the select's overlay panel in relation to the
|
|
1516
1611
|
* top start corner of the trigger. It has to be adjusted in order for the
|
|
1517
1612
|
* selected option to be aligned over the trigger when the panel opens.
|
|
1613
|
+
*/
|
|
1614
|
+
/**
|
|
1615
|
+
* Calculates the y-offset of the select's overlay panel in relation to the
|
|
1616
|
+
* top start corner of the trigger. It has to be adjusted in order for the
|
|
1617
|
+
* selected option to be aligned over the trigger when the panel opens.
|
|
1618
|
+
* @private
|
|
1518
1619
|
* @param {?} selectedIndex
|
|
1519
1620
|
* @param {?} scrollBuffer
|
|
1520
1621
|
* @param {?} maxScroll
|
|
@@ -1524,6 +1625,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1524
1625
|
* Calculates the y-offset of the select's overlay panel in relation to the
|
|
1525
1626
|
* top start corner of the trigger. It has to be adjusted in order for the
|
|
1526
1627
|
* selected option to be aligned over the trigger when the panel opens.
|
|
1628
|
+
* @private
|
|
1527
1629
|
* @param {?} selectedIndex
|
|
1528
1630
|
* @param {?} scrollBuffer
|
|
1529
1631
|
* @param {?} maxScroll
|
|
@@ -1550,6 +1652,8 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1550
1652
|
var firstDisplayedIndex = this._getItemCount() - maxOptionsDisplayed;
|
|
1551
1653
|
/** @type {?} */
|
|
1552
1654
|
var selectedDisplayIndex = selectedIndex - firstDisplayedIndex;
|
|
1655
|
+
// The first item is partially out of the viewport. Therefore we need to calculate what
|
|
1656
|
+
// portion of it is shown in the viewport and account for it in our offset.
|
|
1553
1657
|
/** @type {?} */
|
|
1554
1658
|
var partialItemHeight = itemHeight - (this._getItemCount() * itemHeight - SELECT_PANEL_MAX_HEIGHT) % itemHeight;
|
|
1555
1659
|
// Because the panel height is longer than the height of the options alone,
|
|
@@ -1574,6 +1678,13 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1574
1678
|
* If it will not fit, tries to adjust the scroll position and the associated
|
|
1575
1679
|
* y-offset so the panel can open fully on-screen. If it still won't fit,
|
|
1576
1680
|
* sets the offset back to 0 to allow the fallback position to take over.
|
|
1681
|
+
*/
|
|
1682
|
+
/**
|
|
1683
|
+
* Checks that the attempted overlay position will fit within the viewport.
|
|
1684
|
+
* If it will not fit, tries to adjust the scroll position and the associated
|
|
1685
|
+
* y-offset so the panel can open fully on-screen. If it still won't fit,
|
|
1686
|
+
* sets the offset back to 0 to allow the fallback position to take over.
|
|
1687
|
+
* @private
|
|
1577
1688
|
* @param {?} maxScroll
|
|
1578
1689
|
* @return {?}
|
|
1579
1690
|
*/
|
|
@@ -1582,6 +1693,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1582
1693
|
* If it will not fit, tries to adjust the scroll position and the associated
|
|
1583
1694
|
* y-offset so the panel can open fully on-screen. If it still won't fit,
|
|
1584
1695
|
* sets the offset back to 0 to allow the fallback position to take over.
|
|
1696
|
+
* @private
|
|
1585
1697
|
* @param {?} maxScroll
|
|
1586
1698
|
* @return {?}
|
|
1587
1699
|
*/
|
|
@@ -1610,19 +1722,23 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1610
1722
|
this._transformOrigin = this._getOriginBasedOnOption();
|
|
1611
1723
|
}
|
|
1612
1724
|
};
|
|
1725
|
+
/** Adjusts the overlay panel up to fit in the viewport. */
|
|
1613
1726
|
/**
|
|
1614
1727
|
* Adjusts the overlay panel up to fit in the viewport.
|
|
1728
|
+
* @private
|
|
1615
1729
|
* @param {?} panelHeightBottom
|
|
1616
1730
|
* @param {?} bottomSpaceAvailable
|
|
1617
1731
|
* @return {?}
|
|
1618
1732
|
*/
|
|
1619
1733
|
MatSelect.prototype._adjustPanelUp = /**
|
|
1620
1734
|
* Adjusts the overlay panel up to fit in the viewport.
|
|
1735
|
+
* @private
|
|
1621
1736
|
* @param {?} panelHeightBottom
|
|
1622
1737
|
* @param {?} bottomSpaceAvailable
|
|
1623
1738
|
* @return {?}
|
|
1624
1739
|
*/
|
|
1625
1740
|
function (panelHeightBottom, bottomSpaceAvailable) {
|
|
1741
|
+
// Browsers ignore fractional scroll offsets, so we need to round.
|
|
1626
1742
|
/** @type {?} */
|
|
1627
1743
|
var distanceBelowViewport = Math.round(panelHeightBottom - bottomSpaceAvailable);
|
|
1628
1744
|
// Scrolls the panel up by the distance it was extending past the boundary, then
|
|
@@ -1639,8 +1755,10 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1639
1755
|
this._transformOrigin = "50% bottom 0px";
|
|
1640
1756
|
}
|
|
1641
1757
|
};
|
|
1758
|
+
/** Adjusts the overlay panel down to fit in the viewport. */
|
|
1642
1759
|
/**
|
|
1643
1760
|
* Adjusts the overlay panel down to fit in the viewport.
|
|
1761
|
+
* @private
|
|
1644
1762
|
* @param {?} panelHeightTop
|
|
1645
1763
|
* @param {?} topSpaceAvailable
|
|
1646
1764
|
* @param {?} maxScroll
|
|
@@ -1648,12 +1766,14 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1648
1766
|
*/
|
|
1649
1767
|
MatSelect.prototype._adjustPanelDown = /**
|
|
1650
1768
|
* Adjusts the overlay panel down to fit in the viewport.
|
|
1769
|
+
* @private
|
|
1651
1770
|
* @param {?} panelHeightTop
|
|
1652
1771
|
* @param {?} topSpaceAvailable
|
|
1653
1772
|
* @param {?} maxScroll
|
|
1654
1773
|
* @return {?}
|
|
1655
1774
|
*/
|
|
1656
1775
|
function (panelHeightTop, topSpaceAvailable, maxScroll) {
|
|
1776
|
+
// Browsers ignore fractional scroll offsets, so we need to round.
|
|
1657
1777
|
/** @type {?} */
|
|
1658
1778
|
var distanceAboveViewport = Math.round(panelHeightTop - topSpaceAvailable);
|
|
1659
1779
|
// Scrolls the panel down by the distance it was extending past the boundary, then
|
|
@@ -1671,12 +1791,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1671
1791
|
return;
|
|
1672
1792
|
}
|
|
1673
1793
|
};
|
|
1794
|
+
/** Sets the transform origin point based on the selected option. */
|
|
1674
1795
|
/**
|
|
1675
1796
|
* Sets the transform origin point based on the selected option.
|
|
1797
|
+
* @private
|
|
1676
1798
|
* @return {?}
|
|
1677
1799
|
*/
|
|
1678
1800
|
MatSelect.prototype._getOriginBasedOnOption = /**
|
|
1679
1801
|
* Sets the transform origin point based on the selected option.
|
|
1802
|
+
* @private
|
|
1680
1803
|
* @return {?}
|
|
1681
1804
|
*/
|
|
1682
1805
|
function () {
|
|
@@ -1688,23 +1811,29 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1688
1811
|
var originY = Math.abs(this._offsetY) - optionHeightAdjustment + itemHeight / 2;
|
|
1689
1812
|
return "50% " + originY + "px 0px";
|
|
1690
1813
|
};
|
|
1814
|
+
/** Calculates the amount of items in the select. This includes options and group labels. */
|
|
1691
1815
|
/**
|
|
1692
1816
|
* Calculates the amount of items in the select. This includes options and group labels.
|
|
1817
|
+
* @private
|
|
1693
1818
|
* @return {?}
|
|
1694
1819
|
*/
|
|
1695
1820
|
MatSelect.prototype._getItemCount = /**
|
|
1696
1821
|
* Calculates the amount of items in the select. This includes options and group labels.
|
|
1822
|
+
* @private
|
|
1697
1823
|
* @return {?}
|
|
1698
1824
|
*/
|
|
1699
1825
|
function () {
|
|
1700
1826
|
return this.options.length + this.optionGroups.length;
|
|
1701
1827
|
};
|
|
1828
|
+
/** Calculates the height of the select's options. */
|
|
1702
1829
|
/**
|
|
1703
1830
|
* Calculates the height of the select's options.
|
|
1831
|
+
* @private
|
|
1704
1832
|
* @return {?}
|
|
1705
1833
|
*/
|
|
1706
1834
|
MatSelect.prototype._getItemHeight = /**
|
|
1707
1835
|
* Calculates the height of the select's options.
|
|
1836
|
+
* @private
|
|
1708
1837
|
* @return {?}
|
|
1709
1838
|
*/
|
|
1710
1839
|
function () {
|
|
@@ -1847,7 +1976,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1847
1976
|
|
|
1848
1977
|
/**
|
|
1849
1978
|
* @fileoverview added by tsickle
|
|
1850
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1979
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1851
1980
|
*/
|
|
1852
1981
|
var MatSelectModule = /** @class */ (function () {
|
|
1853
1982
|
function MatSelectModule() {
|
|
@@ -1870,12 +1999,12 @@ var MatSelectModule = /** @class */ (function () {
|
|
|
1870
1999
|
|
|
1871
2000
|
/**
|
|
1872
2001
|
* @fileoverview added by tsickle
|
|
1873
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2002
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1874
2003
|
*/
|
|
1875
2004
|
|
|
1876
2005
|
/**
|
|
1877
2006
|
* @fileoverview added by tsickle
|
|
1878
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2007
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1879
2008
|
*/
|
|
1880
2009
|
|
|
1881
2010
|
export { MatSelectModule, MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_INDENT_PADDING_X, SELECT_ITEM_HEIGHT_EM, SELECT_MULTIPLE_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, MAT_SELECT_SCROLL_STRATEGY, MAT_SELECT_SCROLL_STRATEGY_PROVIDER, MatSelectChange, MatSelectBase, _MatSelectMixinBase, MatSelectTrigger, MatSelect, matSelectAnimations, transformPanel, fadeInContent };
|