@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/esm2015/radio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sources":["../../../src/lib/radio/radio-module.ts","../../../src/lib/radio/radio.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatRadioButton, MatRadioGroup} from './radio';\n\n\n@NgModule({\n imports: [CommonModule, MatRippleModule, MatCommonModule],\n exports: [MatRadioGroup, MatRadioButton, MatCommonModule],\n declarations: [MatRadioGroup, MatRadioButton],\n})\nexport class MatRadioModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanColorCtor,\n CanDisable,\n CanDisableCtor,\n CanDisableRipple,\n CanDisableRippleCtor,\n HasTabIndex,\n HasTabIndexCtor,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\n// Increasing integer for generating unique ids for radio components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nexport const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true\n};\n\n/** Change event object emitted by MatRadio and MatRadioGroup. */\nexport class MatRadioChange {\n constructor(\n /** The MatRadioButton that emits the change event. */\n public source: MatRadioButton,\n /** The value of the MatRadioButton. */\n public value: any) {}\n}\n\n\n// Boilerplate for applying mixins to MatRadioGroup.\n/** @docs-private */\nexport class MatRadioGroupBase { }\nexport const _MatRadioGroupMixinBase: CanDisableCtor & typeof MatRadioGroupBase =\n mixinDisabled(MatRadioGroupBase);\n\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\n@Directive({\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-radio-group',\n },\n inputs: ['disabled'],\n})\nexport class MatRadioGroup extends _MatRadioGroupMixinBase\n implements AfterContentInit, ControlValueAccessor, CanDisable {\n\n /** Selected value for the radio group. */\n private _value: any = null;\n\n /** The HTML name attribute applied to radio buttons in this group. */\n private _name: string = `mat-radio-group-${nextUniqueId++}`;\n\n /** The currently selected radio button. Should match value. */\n private _selected: MatRadioButton | null = null;\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n private _labelPosition: 'before' | 'after' = 'after';\n\n /** Whether the radio group is disabled. */\n private _disabled: boolean = false;\n\n /** Whether the radio group is required. */\n private _required: boolean = false;\n\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** Child radio buttons. */\n @ContentChildren(forwardRef(() => MatRadioButton), { descendants: true })\n _radios: QueryList<MatRadioButton>;\n\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n @Input()\n get name(): string { return this._name; }\n set name(value: string) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n @Input()\n get selected() { return this._selected; }\n set selected(selected: MatRadioButton | null) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n\n /** Whether the radio group is disabled */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n /** Whether the radio group is required */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n constructor(private _changeDetector: ChangeDetectorRef) {\n super();\n }\n\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n\n private _updateRadioButtonNames(): void {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n });\n }\n }\n\n /** Updates the `selected` radio button from the internal _value state. */\n private _updateSelectedRadioFromValue(): void {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected!, this._value));\n }\n }\n\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n}\n\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nexport class MatRadioButtonBase {\n // Since the disabled property is manually defined for the MatRadioButton and isn't set up in\n // the mixin base class. To be able to use the tabindex mixin, a disabled property must be\n // defined to properly work.\n disabled: boolean;\n\n constructor(public _elementRef: ElementRef) {}\n}\n// As per Material design specifications the selection control radio should use the accent color\n// palette by default. https://material.io/guidelines/components/selection-controls.html\nexport const _MatRadioButtonMixinBase:\n CanColorCtor & CanDisableRippleCtor & HasTabIndexCtor & typeof MatRadioButtonBase =\n mixinColor(mixinDisableRipple(mixinTabIndex(MatRadioButtonBase)), 'accent');\n\n/**\n * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-radio-button',\n templateUrl: 'radio.html',\n styleUrls: ['radio.css'],\n inputs: ['color', 'disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRadioButton',\n host: {\n 'class': 'mat-radio-button',\n '[class.mat-radio-checked]': 'checked',\n '[class.mat-radio-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n '[attr.tabindex]': 'null',\n '[attr.id]': 'id',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatRadioButton extends _MatRadioButtonMixinBase\n implements OnInit, AfterViewInit, OnDestroy, CanColor, CanDisableRipple, HasTabIndex {\n\n private _uniqueId: string = `mat-radio-${++nextUniqueId}`;\n\n /** The unique ID for the radio button. */\n @Input() id: string = this._uniqueId;\n\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string;\n\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether this radio button is checked. */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /** The value of this radio button. */\n @Input()\n get value(): any { return this._value; }\n set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n private _labelPosition: 'before' | 'after';\n\n /** Whether the radio button is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value: boolean) {\n const newDisabledState = coerceBooleanProperty(value);\n if (this._disabled !== newDisabledState) {\n this._disabled = newDisabledState;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Whether the radio button is required. */\n @Input()\n get required(): boolean {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n }\n\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** The parent radio group. May or may not be present. */\n radioGroup: MatRadioGroup;\n\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether this radio is checked. */\n private _checked: boolean = false;\n\n /** Whether this radio is disabled. */\n private _disabled: boolean;\n\n /** Whether this radio is required. */\n private _required: boolean;\n\n /** Value assigned to this radio. */\n private _value: any = null;\n\n /** Unregister function for _radioDispatcher */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n /** The native `<input type=radio>` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n constructor(@Optional() radioGroup: MatRadioGroup,\n elementRef: ElementRef,\n private _changeDetector: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _radioDispatcher: UniqueSelectionDispatcher,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string) {\n super(elementRef);\n\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n\n this._removeUniqueSelectionListener =\n _radioDispatcher.listen((id: string, name: string) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n\n /** Focuses the radio button. */\n focus(): void {\n this._focusMonitor.focusVia(this._inputElement, 'keyboard');\n }\n\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor\n .monitor(this._elementRef, true)\n .subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n\n /** Dispatch change event with current value. */\n private _emitChangeEvent(): void {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n\n /**\n * Triggered when the radio button received a click or the input recognized any change.\n * Clicking on a label element, will trigger a change event on the associated input.\n */\n _onInputChange(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n this.radioGroup._touch();\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;ACmDA,IAAI,YAAY,GAAG,CAAC,CAAC;;;;;;AAOrB,AAAA,MAAa,sCAAsC,GAAQ;IACzD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,aAAa,CAAC;IAC5C,KAAK,EAAE,IAAI;CACZ,CAAC;;;;AAGF,AAAA,MAAa,cAAc,CAA3B;;;;;IACE,WAAF,CAEW,MAFX,EAIW,KAJX,EAAA;QAEW,IAAX,CAAA,MAAiB,GAAN,MAAM,CAAjB;QAEW,IAAX,CAAA,KAAgB,GAAL,KAAK,CAAhB;KAAyB;CACxB;;;;AAKD,AAAA,MAAa,iBAAiB,CAA9B;CAAkC;;AAClC,AAAA,MAAa,uBAAuB,GAChC,aAAa,CAAC,iBAAiB,CAAC,CAAC;;;;AAerC,AAAA,MAAa,aAAc,SAAQ,uBAAuB,CAA1D;;;;IAkHE,WAAF,CAAsB,eAAkC,EAAxD;QACI,KAAK,EAAE,CAAC;QADU,IAAtB,CAAA,eAAqC,GAAf,eAAe,CAAmB;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EAAA,CAAA,iBAAA,EAAA,EAAA,CAAA;IAGA,eAAA,EAAA,CAAA,EAAG,IAAH,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,CAAA;IAGA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAG,CAAH;IAGA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAGA,aAAA,EAAA,CAAA,EAAG,IAAH,EAAA,KAAA,EAAA,CAAA;IAwBA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAkBA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAG,EAAH,CAAA;IAUA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA;IAaA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAQ,SAAR,EAAA,IAAA,EAAA,CAAA,OAAA,EAAA,EAAA,CAAA;CAaA,CAAA;;;;;;AD3aA,MAAa,cAAc,CAA3B;;;IALA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC;gBACzD,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,CAAC;gBACzD,YAAY,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;aAC9C,EAAD,EAAA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"radio.js","sources":["../../../src/lib/radio/radio-module.ts","../../../src/lib/radio/radio.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatRadioButton, MatRadioGroup} from './radio';\n\n\n@NgModule({\n imports: [CommonModule, MatRippleModule, MatCommonModule],\n exports: [MatRadioGroup, MatRadioButton, MatCommonModule],\n declarations: [MatRadioGroup, MatRadioButton],\n})\nexport class MatRadioModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanColorCtor,\n CanDisable,\n CanDisableCtor,\n CanDisableRipple,\n CanDisableRippleCtor,\n HasTabIndex,\n HasTabIndexCtor,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\n// Increasing integer for generating unique ids for radio components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nexport const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true\n};\n\n/** Change event object emitted by MatRadio and MatRadioGroup. */\nexport class MatRadioChange {\n constructor(\n /** The MatRadioButton that emits the change event. */\n public source: MatRadioButton,\n /** The value of the MatRadioButton. */\n public value: any) {}\n}\n\n\n// Boilerplate for applying mixins to MatRadioGroup.\n/** @docs-private */\nexport class MatRadioGroupBase { }\nexport const _MatRadioGroupMixinBase: CanDisableCtor & typeof MatRadioGroupBase =\n mixinDisabled(MatRadioGroupBase);\n\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\n@Directive({\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-radio-group',\n },\n inputs: ['disabled'],\n})\nexport class MatRadioGroup extends _MatRadioGroupMixinBase\n implements AfterContentInit, ControlValueAccessor, CanDisable {\n\n /** Selected value for the radio group. */\n private _value: any = null;\n\n /** The HTML name attribute applied to radio buttons in this group. */\n private _name: string = `mat-radio-group-${nextUniqueId++}`;\n\n /** The currently selected radio button. Should match value. */\n private _selected: MatRadioButton | null = null;\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n private _labelPosition: 'before' | 'after' = 'after';\n\n /** Whether the radio group is disabled. */\n private _disabled: boolean = false;\n\n /** Whether the radio group is required. */\n private _required: boolean = false;\n\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** Child radio buttons. */\n @ContentChildren(forwardRef(() => MatRadioButton), { descendants: true })\n _radios: QueryList<MatRadioButton>;\n\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n @Input()\n get name(): string { return this._name; }\n set name(value: string) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n @Input()\n get selected() { return this._selected; }\n set selected(selected: MatRadioButton | null) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n\n /** Whether the radio group is disabled */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n /** Whether the radio group is required */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n constructor(private _changeDetector: ChangeDetectorRef) {\n super();\n }\n\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n\n private _updateRadioButtonNames(): void {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n });\n }\n }\n\n /** Updates the `selected` radio button from the internal _value state. */\n private _updateSelectedRadioFromValue(): void {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected!, this._value));\n }\n }\n\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n}\n\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nexport class MatRadioButtonBase {\n // Since the disabled property is manually defined for the MatRadioButton and isn't set up in\n // the mixin base class. To be able to use the tabindex mixin, a disabled property must be\n // defined to properly work.\n disabled: boolean;\n\n constructor(public _elementRef: ElementRef) {}\n}\n// As per Material design specifications the selection control radio should use the accent color\n// palette by default. https://material.io/guidelines/components/selection-controls.html\nexport const _MatRadioButtonMixinBase:\n CanColorCtor & CanDisableRippleCtor & HasTabIndexCtor & typeof MatRadioButtonBase =\n mixinColor(mixinDisableRipple(mixinTabIndex(MatRadioButtonBase)), 'accent');\n\n/**\n * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-radio-button',\n templateUrl: 'radio.html',\n styleUrls: ['radio.css'],\n inputs: ['color', 'disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRadioButton',\n host: {\n 'class': 'mat-radio-button',\n '[class.mat-radio-checked]': 'checked',\n '[class.mat-radio-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n '[attr.tabindex]': 'null',\n '[attr.id]': 'id',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatRadioButton extends _MatRadioButtonMixinBase\n implements OnInit, AfterViewInit, OnDestroy, CanColor, CanDisableRipple, HasTabIndex {\n\n private _uniqueId: string = `mat-radio-${++nextUniqueId}`;\n\n /** The unique ID for the radio button. */\n @Input() id: string = this._uniqueId;\n\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string;\n\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether this radio button is checked. */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /** The value of this radio button. */\n @Input()\n get value(): any { return this._value; }\n set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n private _labelPosition: 'before' | 'after';\n\n /** Whether the radio button is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value: boolean) {\n const newDisabledState = coerceBooleanProperty(value);\n if (this._disabled !== newDisabledState) {\n this._disabled = newDisabledState;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Whether the radio button is required. */\n @Input()\n get required(): boolean {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n }\n\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** The parent radio group. May or may not be present. */\n radioGroup: MatRadioGroup;\n\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether this radio is checked. */\n private _checked: boolean = false;\n\n /** Whether this radio is disabled. */\n private _disabled: boolean;\n\n /** Whether this radio is required. */\n private _required: boolean;\n\n /** Value assigned to this radio. */\n private _value: any = null;\n\n /** Unregister function for _radioDispatcher */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n /** The native `<input type=radio>` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n constructor(@Optional() radioGroup: MatRadioGroup,\n elementRef: ElementRef,\n private _changeDetector: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _radioDispatcher: UniqueSelectionDispatcher,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string) {\n super(elementRef);\n\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n\n this._removeUniqueSelectionListener =\n _radioDispatcher.listen((id: string, name: string) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n\n /** Focuses the radio button. */\n focus(): void {\n this._focusMonitor.focusVia(this._inputElement, 'keyboard');\n }\n\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor\n .monitor(this._elementRef, true)\n .subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n\n /** Dispatch change event with current value. */\n private _emitChangeEvent(): void {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n\n /**\n * Triggered when the radio button received a click or the input recognized any change.\n * Clicking on a label element, will trigger a change event on the associated input.\n */\n _onInputChange(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n this.radioGroup._touch();\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;ACmDA,IAAI,YAAY,GAAG,CAAC,CAApB;;;;;;;AAOA,AAAA,MAAa,sCAAsC,GAAQ;IACzD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,aAAa,CAAC;IAC5C,KAAK,EAAE,IAAI;CACZ,CAAD;;;;AAGA,AAAA,MAAa,cAAc,CAA3B;;;;;IACE,WAAF,CAEW,MAAsB,EAEtB,KAAU,EAJrB;QAEW,IAAX,CAAA,MAAiB,GAAN,MAAM,CAAgB;QAEtB,IAAX,CAAA,KAAgB,GAAL,KAAK,CAAK;KAAI;CACxB;;;;;AAKD,AAAA,MAAa,iBAAiB,CAA9B;CAAkC;;AAClC,AAAA,MAAa,uBAAuB,GAChC,aAAa,CAAC,iBAAiB,CAAC,CADpC;;;;AAgBA,AAAA,MAAa,aAAc,SAAQ,uBAAuB,CAA1D;;;;IAkHE,WAAF,CAAsB,eAAkC,EAAxD;QACI,KAAK,EAAE,CAAC;QADU,IAAtB,CAAA,eAAqC,GAAf,eAAe,CAAmB;;;;QA9G9C,IAAV,CAAA,MAAg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AA,iBAAA,EAAA,EAAA,CAAA;IAGA,eAAA,EAAA,CAAA,EAAG,IAAH,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,CAAA;IAGA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAG,CAAH;IAGA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAGA,aAAA,EAAA,CAAA,EAAG,IAAH,EAAA,KAAA,EAAA,CAAA;IAwBA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAkBA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAG,EAAH,CAAA;IAUA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA;IAaA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAQ,SAAR,EAAA,IAAA,EAAA,CAAA,OAAA,EAAA,EAAA,CAAA;CAaA,CAAA;;;;;;AD3aA,MAAa,cAAc,CAA3B;;;IALA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC;gBACzD,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,CAAC;gBACzD,YAAY,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;aAC9C,EAAD,EAAA;;;;;;;;;;;;;;;"}
|
package/esm2015/select.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
|
10
10
|
import { Directionality } from '@angular/cdk/bidi';
|
|
11
11
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
12
12
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
13
|
-
import { A, DOWN_ARROW, END, ENTER, HOME, LEFT_ARROW, RIGHT_ARROW, SPACE, UP_ARROW } from '@angular/cdk/keycodes';
|
|
13
|
+
import { A, DOWN_ARROW, END, ENTER, HOME, LEFT_ARROW, RIGHT_ARROW, SPACE, UP_ARROW, hasModifierKey } from '@angular/cdk/keycodes';
|
|
14
14
|
import { CdkConnectedOverlay, Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
15
15
|
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
16
16
|
import { Attribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, Directive, ElementRef, EventEmitter, Inject, InjectionToken, Input, isDevMode, NgZone, Optional, Output, Self, ViewChild, ViewEncapsulation, NgModule } from '@angular/core';
|
|
@@ -23,25 +23,26 @@ import { CommonModule } from '@angular/common';
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @fileoverview added by tsickle
|
|
26
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
26
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
27
27
|
*/
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
29
|
* The following are all the animations for the mat-select component, with each
|
|
30
30
|
* const containing the metadata for one animation.
|
|
31
31
|
*
|
|
32
32
|
* The values below match the implementation of the AngularJS Material mat-select animation.
|
|
33
33
|
* \@docs-private
|
|
34
|
-
|
|
34
|
+
* @type {?}
|
|
35
|
+
*/
|
|
35
36
|
const matSelectAnimations = {
|
|
36
37
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
* This animation transforms the select's overlay panel on and off the page.
|
|
39
|
+
*
|
|
40
|
+
* When the panel is attached to the DOM, it expands its width by the amount of padding, scales it
|
|
41
|
+
* up to 100% on the Y axis, fades in its border, and translates slightly up and to the
|
|
42
|
+
* side to ensure the option text correctly overlaps the trigger text.
|
|
43
|
+
*
|
|
44
|
+
* When the panel is removed from the DOM, it simply fades out linearly.
|
|
45
|
+
*/
|
|
45
46
|
transformPanel: trigger('transformPanel', [
|
|
46
47
|
state('void', style({
|
|
47
48
|
transform: 'scaleY(0.8)',
|
|
@@ -64,12 +65,12 @@ const matSelectAnimations = {
|
|
|
64
65
|
transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 })))
|
|
65
66
|
]),
|
|
66
67
|
/**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
* This animation fades in the background color and text content of the
|
|
69
|
+
* select's options. It is time delayed to occur 100ms after the overlay
|
|
70
|
+
* panel has transformed in.
|
|
71
|
+
* @deprecated Not used anymore. To be removed.
|
|
72
|
+
* \@breaking-change 8.0.0
|
|
73
|
+
*/
|
|
73
74
|
fadeInContent: trigger('fadeInContent', [
|
|
74
75
|
state('showing', style({ opacity: 1 })),
|
|
75
76
|
transition('void => showing', [
|
|
@@ -78,22 +79,24 @@ const matSelectAnimations = {
|
|
|
78
79
|
])
|
|
79
80
|
])
|
|
80
81
|
};
|
|
81
|
-
/**
|
|
82
|
+
/**
|
|
82
83
|
* @deprecated
|
|
83
84
|
* \@breaking-change 8.0.0
|
|
84
85
|
* \@docs-private
|
|
85
|
-
|
|
86
|
+
* @type {?}
|
|
87
|
+
*/
|
|
86
88
|
const transformPanel = matSelectAnimations.transformPanel;
|
|
87
|
-
/**
|
|
89
|
+
/**
|
|
88
90
|
* @deprecated
|
|
89
91
|
* \@breaking-change 8.0.0
|
|
90
92
|
* \@docs-private
|
|
91
|
-
|
|
93
|
+
* @type {?}
|
|
94
|
+
*/
|
|
92
95
|
const fadeInContent = matSelectAnimations.fadeInContent;
|
|
93
96
|
|
|
94
97
|
/**
|
|
95
98
|
* @fileoverview added by tsickle
|
|
96
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
99
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
97
100
|
*/
|
|
98
101
|
|
|
99
102
|
/**
|
|
@@ -127,27 +130,32 @@ function getMatSelectNonFunctionValueError() {
|
|
|
127
130
|
|
|
128
131
|
/**
|
|
129
132
|
* @fileoverview added by tsickle
|
|
130
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
133
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
131
134
|
*/
|
|
132
135
|
/** @type {?} */
|
|
133
136
|
let nextUniqueId = 0;
|
|
134
|
-
/**
|
|
137
|
+
/**
|
|
135
138
|
* The max height of the select's overlay panel
|
|
136
|
-
|
|
139
|
+
* @type {?}
|
|
140
|
+
*/
|
|
137
141
|
const SELECT_PANEL_MAX_HEIGHT = 256;
|
|
138
|
-
/**
|
|
142
|
+
/**
|
|
139
143
|
* The panel's padding on the x-axis
|
|
140
|
-
|
|
144
|
+
* @type {?}
|
|
145
|
+
*/
|
|
141
146
|
const SELECT_PANEL_PADDING_X = 16;
|
|
142
|
-
/**
|
|
147
|
+
/**
|
|
143
148
|
* The panel's x axis padding if it is indented (e.g. there is an option group).
|
|
144
|
-
|
|
149
|
+
* @type {?}
|
|
150
|
+
*/
|
|
145
151
|
const SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;
|
|
146
|
-
/**
|
|
152
|
+
/**
|
|
147
153
|
* The height of the select items in `em` units.
|
|
148
|
-
|
|
154
|
+
* @type {?}
|
|
155
|
+
*/
|
|
149
156
|
const SELECT_ITEM_HEIGHT_EM = 3;
|
|
150
|
-
|
|
157
|
+
// TODO(josephperrott): Revert to a constant after 2018 spec updates are fully merged.
|
|
158
|
+
/**
|
|
151
159
|
* Distance between the panel edge and the option text in
|
|
152
160
|
* multi-selection mode.
|
|
153
161
|
*
|
|
@@ -155,16 +163,19 @@ const SELECT_ITEM_HEIGHT_EM = 3;
|
|
|
155
163
|
* (SELECT_PANEL_PADDING_X * 1.5) + 20 = 44
|
|
156
164
|
* The padding is multiplied by 1.5 because the checkbox's margin is half the padding.
|
|
157
165
|
* The checkbox width is 16px.
|
|
158
|
-
|
|
166
|
+
* @type {?}
|
|
167
|
+
*/
|
|
159
168
|
let SELECT_MULTIPLE_PANEL_PADDING_X = 0;
|
|
160
|
-
/**
|
|
169
|
+
/**
|
|
161
170
|
* The select panel will only "fit" inside the viewport if it is positioned at
|
|
162
171
|
* this value or more away from the viewport boundary.
|
|
163
|
-
|
|
172
|
+
* @type {?}
|
|
173
|
+
*/
|
|
164
174
|
const SELECT_PANEL_VIEWPORT_PADDING = 8;
|
|
165
|
-
/**
|
|
175
|
+
/**
|
|
166
176
|
* Injection token that determines the scroll handling while a select is open.
|
|
167
|
-
|
|
177
|
+
* @type {?}
|
|
178
|
+
*/
|
|
168
179
|
const MAT_SELECT_SCROLL_STRATEGY = new InjectionToken('mat-select-scroll-strategy');
|
|
169
180
|
/**
|
|
170
181
|
* \@docs-private
|
|
@@ -174,9 +185,10 @@ const MAT_SELECT_SCROLL_STRATEGY = new InjectionToken('mat-select-scroll-strateg
|
|
|
174
185
|
function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
|
|
175
186
|
return () => overlay.scrollStrategies.reposition();
|
|
176
187
|
}
|
|
177
|
-
/**
|
|
188
|
+
/**
|
|
178
189
|
* \@docs-private
|
|
179
|
-
|
|
190
|
+
* @type {?}
|
|
191
|
+
*/
|
|
180
192
|
const MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {
|
|
181
193
|
provide: MAT_SELECT_SCROLL_STRATEGY,
|
|
182
194
|
deps: [Overlay],
|
|
@@ -195,6 +207,7 @@ class MatSelectChange {
|
|
|
195
207
|
this.value = value;
|
|
196
208
|
}
|
|
197
209
|
}
|
|
210
|
+
// Boilerplate for applying mixins to MatSelect.
|
|
198
211
|
/**
|
|
199
212
|
* \@docs-private
|
|
200
213
|
*/
|
|
@@ -554,7 +567,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
554
567
|
ngOnChanges(changes) {
|
|
555
568
|
// Updating the disabled state is handled by `mixinDisabled`, but we need to additionally let
|
|
556
569
|
// the parent form field know to run change detection when the disabled state changes.
|
|
557
|
-
if (changes
|
|
570
|
+
if (changes.disabled) {
|
|
558
571
|
this.stateChanges.next();
|
|
559
572
|
}
|
|
560
573
|
}
|
|
@@ -708,6 +721,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
708
721
|
}
|
|
709
722
|
/**
|
|
710
723
|
* Handles keyboard events while the select is closed.
|
|
724
|
+
* @private
|
|
711
725
|
* @param {?} event
|
|
712
726
|
* @return {?}
|
|
713
727
|
*/
|
|
@@ -722,7 +736,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
722
736
|
/** @type {?} */
|
|
723
737
|
const manager = this._keyManager;
|
|
724
738
|
// Open the select on ALT + arrow key to match the native <select>
|
|
725
|
-
if (isOpenKey || ((this.multiple || event.altKey) && isArrowKey)) {
|
|
739
|
+
if ((isOpenKey && !hasModifierKey(event)) || ((this.multiple || event.altKey) && isArrowKey)) {
|
|
726
740
|
event.preventDefault(); // prevents the page from scrolling down when pressing space
|
|
727
741
|
this.open();
|
|
728
742
|
}
|
|
@@ -738,6 +752,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
738
752
|
}
|
|
739
753
|
/**
|
|
740
754
|
* Handles keyboard events when the selected is open.
|
|
755
|
+
* @private
|
|
741
756
|
* @param {?} event
|
|
742
757
|
* @return {?}
|
|
743
758
|
*/
|
|
@@ -757,7 +772,8 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
757
772
|
event.preventDefault();
|
|
758
773
|
this.close();
|
|
759
774
|
}
|
|
760
|
-
else if ((keyCode === ENTER || keyCode === SPACE) && manager.activeItem
|
|
775
|
+
else if ((keyCode === ENTER || keyCode === SPACE) && manager.activeItem &&
|
|
776
|
+
!hasModifierKey(event)) {
|
|
761
777
|
event.preventDefault();
|
|
762
778
|
manager.activeItem._selectViaInteraction();
|
|
763
779
|
}
|
|
@@ -822,8 +838,10 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
822
838
|
_getPanelTheme() {
|
|
823
839
|
return this._parentFormField ? `mat-${this._parentFormField.color}` : '';
|
|
824
840
|
}
|
|
841
|
+
// TODO(josephperrott): Remove after 2018 spec updates are fully merged.
|
|
825
842
|
/**
|
|
826
843
|
* Sets the pseudo checkbox padding size based on the width of the pseudo checkbox.
|
|
844
|
+
* @private
|
|
827
845
|
* @return {?}
|
|
828
846
|
*/
|
|
829
847
|
_setPseudoCheckboxPaddingSize() {
|
|
@@ -843,6 +861,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
843
861
|
return !this._selectionModel || this._selectionModel.isEmpty();
|
|
844
862
|
}
|
|
845
863
|
/**
|
|
864
|
+
* @private
|
|
846
865
|
* @return {?}
|
|
847
866
|
*/
|
|
848
867
|
_initializeSelection() {
|
|
@@ -855,6 +874,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
855
874
|
/**
|
|
856
875
|
* Sets the selected option based on a value. If no option can be
|
|
857
876
|
* found with the designated value, the select trigger is cleared.
|
|
877
|
+
* @private
|
|
858
878
|
* @param {?} value
|
|
859
879
|
* @return {?}
|
|
860
880
|
*/
|
|
@@ -881,6 +901,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
881
901
|
}
|
|
882
902
|
/**
|
|
883
903
|
* Finds and selects and option based on its value.
|
|
904
|
+
* @private
|
|
884
905
|
* @param {?} value
|
|
885
906
|
* @return {?} Option that has the corresponding value.
|
|
886
907
|
*/
|
|
@@ -906,13 +927,15 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
906
927
|
}
|
|
907
928
|
/**
|
|
908
929
|
* Sets up a key manager to listen to keyboard events on the overlay panel.
|
|
930
|
+
* @private
|
|
909
931
|
* @return {?}
|
|
910
932
|
*/
|
|
911
933
|
_initKeyManager() {
|
|
912
934
|
this._keyManager = new ActiveDescendantKeyManager(this.options)
|
|
913
935
|
.withTypeAhead()
|
|
914
936
|
.withVerticalOrientation()
|
|
915
|
-
.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')
|
|
937
|
+
.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')
|
|
938
|
+
.withAllowedModifierKeys(['shiftKey']);
|
|
916
939
|
this._keyManager.tabOut.pipe(takeUntil(this._destroy)).subscribe(() => {
|
|
917
940
|
// Restore focus to the trigger before closing. Ensures that the focus
|
|
918
941
|
// position won't be lost if the user got focus into the overlay.
|
|
@@ -930,6 +953,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
930
953
|
}
|
|
931
954
|
/**
|
|
932
955
|
* Drops current option subscriptions and IDs and resets from scratch.
|
|
956
|
+
* @private
|
|
933
957
|
* @return {?}
|
|
934
958
|
*/
|
|
935
959
|
_resetOptions() {
|
|
@@ -954,6 +978,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
954
978
|
}
|
|
955
979
|
/**
|
|
956
980
|
* Invoked when an option is clicked.
|
|
981
|
+
* @private
|
|
957
982
|
* @param {?} option
|
|
958
983
|
* @param {?} isUserInput
|
|
959
984
|
* @return {?}
|
|
@@ -989,6 +1014,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
989
1014
|
}
|
|
990
1015
|
/**
|
|
991
1016
|
* Sorts the selected values in the selected based on their order in the panel.
|
|
1017
|
+
* @private
|
|
992
1018
|
* @return {?}
|
|
993
1019
|
*/
|
|
994
1020
|
_sortValues() {
|
|
@@ -1004,6 +1030,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1004
1030
|
}
|
|
1005
1031
|
/**
|
|
1006
1032
|
* Emits change event to set the model value.
|
|
1033
|
+
* @private
|
|
1007
1034
|
* @param {?=} fallbackValue
|
|
1008
1035
|
* @return {?}
|
|
1009
1036
|
*/
|
|
@@ -1011,10 +1038,10 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1011
1038
|
/** @type {?} */
|
|
1012
1039
|
let valueToEmit = null;
|
|
1013
1040
|
if (this.multiple) {
|
|
1014
|
-
valueToEmit = (/** @type {?} */ (this.selected)).map(option => option.value);
|
|
1041
|
+
valueToEmit = ((/** @type {?} */ (this.selected))).map(option => option.value);
|
|
1015
1042
|
}
|
|
1016
1043
|
else {
|
|
1017
|
-
valueToEmit = this.selected ? (/** @type {?} */ (this.selected)).value : fallbackValue;
|
|
1044
|
+
valueToEmit = this.selected ? ((/** @type {?} */ (this.selected))).value : fallbackValue;
|
|
1018
1045
|
}
|
|
1019
1046
|
this._value = valueToEmit;
|
|
1020
1047
|
this.valueChange.emit(valueToEmit);
|
|
@@ -1024,6 +1051,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1024
1051
|
}
|
|
1025
1052
|
/**
|
|
1026
1053
|
* Records option IDs to pass to the aria-owns property.
|
|
1054
|
+
* @private
|
|
1027
1055
|
* @return {?}
|
|
1028
1056
|
*/
|
|
1029
1057
|
_setOptionIds() {
|
|
@@ -1032,6 +1060,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1032
1060
|
/**
|
|
1033
1061
|
* Highlights the selected item. If no option is selected, it will highlight
|
|
1034
1062
|
* the first item instead.
|
|
1063
|
+
* @private
|
|
1035
1064
|
* @return {?}
|
|
1036
1065
|
*/
|
|
1037
1066
|
_highlightCorrectOption() {
|
|
@@ -1046,6 +1075,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1046
1075
|
}
|
|
1047
1076
|
/**
|
|
1048
1077
|
* Scrolls the active option into view.
|
|
1078
|
+
* @private
|
|
1049
1079
|
* @return {?}
|
|
1050
1080
|
*/
|
|
1051
1081
|
_scrollActiveOptionIntoView() {
|
|
@@ -1064,6 +1094,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1064
1094
|
}
|
|
1065
1095
|
/**
|
|
1066
1096
|
* Gets the index of the provided option in the option list.
|
|
1097
|
+
* @private
|
|
1067
1098
|
* @param {?} option
|
|
1068
1099
|
* @return {?}
|
|
1069
1100
|
*/
|
|
@@ -1074,6 +1105,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1074
1105
|
}
|
|
1075
1106
|
/**
|
|
1076
1107
|
* Calculates the scroll position and x- and y-offsets of the overlay panel.
|
|
1108
|
+
* @private
|
|
1077
1109
|
* @return {?}
|
|
1078
1110
|
*/
|
|
1079
1111
|
_calculateOverlayPosition() {
|
|
@@ -1085,11 +1117,15 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1085
1117
|
const panelHeight = Math.min(items * itemHeight, SELECT_PANEL_MAX_HEIGHT);
|
|
1086
1118
|
/** @type {?} */
|
|
1087
1119
|
const scrollContainerHeight = items * itemHeight;
|
|
1120
|
+
// The farthest the panel can be scrolled before it hits the bottom
|
|
1088
1121
|
/** @type {?} */
|
|
1089
1122
|
const maxScroll = scrollContainerHeight - panelHeight;
|
|
1123
|
+
// If no value is selected we open the popup to the first item.
|
|
1090
1124
|
/** @type {?} */
|
|
1091
|
-
let selectedOptionOffset = this.empty ? 0 : /** @type {?} */ (
|
|
1125
|
+
let selectedOptionOffset = this.empty ? 0 : (/** @type {?} */ (this._getOptionIndex(this._selectionModel.selected[0])));
|
|
1092
1126
|
selectedOptionOffset += _countGroupLabelsBeforeOption(selectedOptionOffset, this.options, this.optionGroups);
|
|
1127
|
+
// We must maintain a scroll buffer so the selected option will be scrolled to the
|
|
1128
|
+
// center of the overlay panel rather than the top.
|
|
1093
1129
|
/** @type {?} */
|
|
1094
1130
|
const scrollBuffer = panelHeight / 2;
|
|
1095
1131
|
this._scrollTop = this._calculateOverlayScroll(selectedOptionOffset, scrollBuffer, maxScroll);
|
|
@@ -1114,6 +1150,10 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1114
1150
|
const optionOffsetFromScrollTop = itemHeight * selectedIndex;
|
|
1115
1151
|
/** @type {?} */
|
|
1116
1152
|
const halfOptionHeight = itemHeight / 2;
|
|
1153
|
+
// Starts at the optionOffsetFromScrollTop, which scrolls the option to the top of the
|
|
1154
|
+
// scroll container, then subtracts the scroll buffer to scroll the option down to
|
|
1155
|
+
// the center of the overlay panel. Half the option height must be re-added to the
|
|
1156
|
+
// scrollTop so the option is centered based on its middle, not its top edge.
|
|
1117
1157
|
/** @type {?} */
|
|
1118
1158
|
const optimalScrollPosition = optionOffsetFromScrollTop - scrollBuffer + halfOptionHeight;
|
|
1119
1159
|
return Math.min(Math.max(0, optimalScrollPosition), maxScroll);
|
|
@@ -1159,6 +1199,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1159
1199
|
* the panel opens. Will change based on LTR or RTL text direction. Note that the offset
|
|
1160
1200
|
* can't be calculated until the panel has been attached, because we need to know the
|
|
1161
1201
|
* content width in order to constrain the panel within the viewport.
|
|
1202
|
+
* @private
|
|
1162
1203
|
* @return {?}
|
|
1163
1204
|
*/
|
|
1164
1205
|
_calculateOverlayOffsetX() {
|
|
@@ -1186,6 +1227,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1186
1227
|
if (!isRtl) {
|
|
1187
1228
|
offsetX *= -1;
|
|
1188
1229
|
}
|
|
1230
|
+
// Determine how much the select overflows on each side.
|
|
1189
1231
|
/** @type {?} */
|
|
1190
1232
|
const leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));
|
|
1191
1233
|
/** @type {?} */
|
|
@@ -1208,6 +1250,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1208
1250
|
* Calculates the y-offset of the select's overlay panel in relation to the
|
|
1209
1251
|
* top start corner of the trigger. It has to be adjusted in order for the
|
|
1210
1252
|
* selected option to be aligned over the trigger when the panel opens.
|
|
1253
|
+
* @private
|
|
1211
1254
|
* @param {?} selectedIndex
|
|
1212
1255
|
* @param {?} scrollBuffer
|
|
1213
1256
|
* @param {?} maxScroll
|
|
@@ -1234,6 +1277,8 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1234
1277
|
const firstDisplayedIndex = this._getItemCount() - maxOptionsDisplayed;
|
|
1235
1278
|
/** @type {?} */
|
|
1236
1279
|
const selectedDisplayIndex = selectedIndex - firstDisplayedIndex;
|
|
1280
|
+
// The first item is partially out of the viewport. Therefore we need to calculate what
|
|
1281
|
+
// portion of it is shown in the viewport and account for it in our offset.
|
|
1237
1282
|
/** @type {?} */
|
|
1238
1283
|
let partialItemHeight = itemHeight - (this._getItemCount() * itemHeight - SELECT_PANEL_MAX_HEIGHT) % itemHeight;
|
|
1239
1284
|
// Because the panel height is longer than the height of the options alone,
|
|
@@ -1258,6 +1303,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1258
1303
|
* If it will not fit, tries to adjust the scroll position and the associated
|
|
1259
1304
|
* y-offset so the panel can open fully on-screen. If it still won't fit,
|
|
1260
1305
|
* sets the offset back to 0 to allow the fallback position to take over.
|
|
1306
|
+
* @private
|
|
1261
1307
|
* @param {?} maxScroll
|
|
1262
1308
|
* @return {?}
|
|
1263
1309
|
*/
|
|
@@ -1288,11 +1334,13 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1288
1334
|
}
|
|
1289
1335
|
/**
|
|
1290
1336
|
* Adjusts the overlay panel up to fit in the viewport.
|
|
1337
|
+
* @private
|
|
1291
1338
|
* @param {?} panelHeightBottom
|
|
1292
1339
|
* @param {?} bottomSpaceAvailable
|
|
1293
1340
|
* @return {?}
|
|
1294
1341
|
*/
|
|
1295
1342
|
_adjustPanelUp(panelHeightBottom, bottomSpaceAvailable) {
|
|
1343
|
+
// Browsers ignore fractional scroll offsets, so we need to round.
|
|
1296
1344
|
/** @type {?} */
|
|
1297
1345
|
const distanceBelowViewport = Math.round(panelHeightBottom - bottomSpaceAvailable);
|
|
1298
1346
|
// Scrolls the panel up by the distance it was extending past the boundary, then
|
|
@@ -1311,12 +1359,14 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1311
1359
|
}
|
|
1312
1360
|
/**
|
|
1313
1361
|
* Adjusts the overlay panel down to fit in the viewport.
|
|
1362
|
+
* @private
|
|
1314
1363
|
* @param {?} panelHeightTop
|
|
1315
1364
|
* @param {?} topSpaceAvailable
|
|
1316
1365
|
* @param {?} maxScroll
|
|
1317
1366
|
* @return {?}
|
|
1318
1367
|
*/
|
|
1319
1368
|
_adjustPanelDown(panelHeightTop, topSpaceAvailable, maxScroll) {
|
|
1369
|
+
// Browsers ignore fractional scroll offsets, so we need to round.
|
|
1320
1370
|
/** @type {?} */
|
|
1321
1371
|
const distanceAboveViewport = Math.round(panelHeightTop - topSpaceAvailable);
|
|
1322
1372
|
// Scrolls the panel down by the distance it was extending past the boundary, then
|
|
@@ -1336,6 +1386,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1336
1386
|
}
|
|
1337
1387
|
/**
|
|
1338
1388
|
* Sets the transform origin point based on the selected option.
|
|
1389
|
+
* @private
|
|
1339
1390
|
* @return {?}
|
|
1340
1391
|
*/
|
|
1341
1392
|
_getOriginBasedOnOption() {
|
|
@@ -1349,6 +1400,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1349
1400
|
}
|
|
1350
1401
|
/**
|
|
1351
1402
|
* Calculates the amount of items in the select. This includes options and group labels.
|
|
1403
|
+
* @private
|
|
1352
1404
|
* @return {?}
|
|
1353
1405
|
*/
|
|
1354
1406
|
_getItemCount() {
|
|
@@ -1356,6 +1408,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1356
1408
|
}
|
|
1357
1409
|
/**
|
|
1358
1410
|
* Calculates the height of the select's options.
|
|
1411
|
+
* @private
|
|
1359
1412
|
* @return {?}
|
|
1360
1413
|
*/
|
|
1361
1414
|
_getItemHeight() {
|
|
@@ -1470,7 +1523,7 @@ MatSelect.propDecorators = {
|
|
|
1470
1523
|
|
|
1471
1524
|
/**
|
|
1472
1525
|
* @fileoverview added by tsickle
|
|
1473
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1526
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1474
1527
|
*/
|
|
1475
1528
|
class MatSelectModule {
|
|
1476
1529
|
}
|
|
@@ -1490,12 +1543,12 @@ MatSelectModule.decorators = [
|
|
|
1490
1543
|
|
|
1491
1544
|
/**
|
|
1492
1545
|
* @fileoverview added by tsickle
|
|
1493
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1546
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1494
1547
|
*/
|
|
1495
1548
|
|
|
1496
1549
|
/**
|
|
1497
1550
|
* @fileoverview added by tsickle
|
|
1498
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1551
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1499
1552
|
*/
|
|
1500
1553
|
|
|
1501
1554
|
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 };
|