@angular/material 7.0.4 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/_theming.scss +61 -44
- package/autocomplete/typings/index.d.ts +1 -1
- package/autocomplete/typings/index.metadata.json +1 -1
- package/badge/typings/index.metadata.json +1 -1
- package/bottom-sheet/typings/bottom-sheet-config.d.ts +5 -0
- package/bottom-sheet/typings/bottom-sheet-container.d.ts +1 -1
- package/bottom-sheet/typings/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js +126 -32
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +1 -1
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge.umd.js +38 -5
- package/bundles/material-badge.umd.js.map +1 -1
- package/bundles/material-badge.umd.min.js +1 -1
- package/bundles/material-badge.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +68 -21
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +1 -1
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +36 -13
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +1 -1
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +21 -14
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +1 -1
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card.umd.js +3 -3
- package/bundles/material-card.umd.js.map +1 -1
- package/bundles/material-card.umd.min.js +1 -1
- package/bundles/material-card.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +56 -15
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js +1 -1
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips.umd.js +124 -34
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +1 -1
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +189 -126
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +1 -1
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +231 -53
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +2 -2
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +138 -40
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +1 -1
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider.umd.js +2 -2
- package/bundles/material-divider.umd.js.map +1 -1
- package/bundles/material-divider.umd.min.js.map +1 -1
- package/bundles/material-expansion.umd.js +53 -27
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +1 -1
- package/bundles/material-expansion.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +121 -32
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +1 -1
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +66 -15
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +1 -1
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-icon.umd.js +277 -78
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +1 -1
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +50 -22
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +1 -1
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +69 -21
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +2 -6
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +171 -66
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +1 -1
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +52 -10
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +1 -1
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +31 -12
- package/bundles/material-progress-bar.umd.js.map +1 -1
- package/bundles/material-progress-bar.umd.min.js +1 -1
- package/bundles/material-progress-bar.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +29 -13
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +38 -40
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +1 -1
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +189 -51
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +1 -1
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +104 -25
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +1 -1
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +30 -14
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.min.js +1 -1
- package/bundles/material-slide-toggle.umd.min.js.map +1 -1
- package/bundles/material-slider.umd.js +91 -21
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-slider.umd.min.js +1 -1
- package/bundles/material-slider.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +71 -19
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +1 -1
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +46 -24
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +1 -1
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper.umd.js +37 -35
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-stepper.umd.min.js +1 -1
- package/bundles/material-stepper.umd.min.js.map +1 -1
- package/bundles/material-table.umd.js +29 -9
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +170 -68
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +2 -2
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar.umd.js +14 -4
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.min.js +1 -1
- package/bundles/material-toolbar.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +53 -26
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +1 -1
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +25 -16
- package/bundles/material-tree.umd.js.map +1 -1
- package/bundles/material-tree.umd.min.js +1 -1
- package/bundles/material-tree.umd.min.js.map +1 -1
- package/bundles/material.umd.js +2853 -1010
- package/bundles/material.umd.js.map +1 -1
- package/bundles/material.umd.min.js +19 -21
- package/bundles/material.umd.min.js.map +1 -1
- package/button/typings/button.d.ts +0 -5
- package/button/typings/index.metadata.json +1 -1
- package/button-toggle/typings/index.metadata.json +1 -1
- package/card/typings/index.metadata.json +1 -1
- package/checkbox/typings/index.metadata.json +1 -1
- package/chips/typings/chip-list.d.ts +1 -1
- package/chips/typings/chip.d.ts +2 -2
- package/chips/typings/index.metadata.json +1 -1
- package/core/typings/index.metadata.json +1 -1
- package/core/typings/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
- package/core/typings/public-api.d.ts +1 -1
- package/datepicker/typings/calendar-body.d.ts +21 -5
- package/datepicker/typings/calendar.d.ts +4 -1
- package/datepicker/typings/datepicker.d.ts +3 -0
- package/datepicker/typings/index.metadata.json +1 -1
- package/datepicker/typings/month-view.d.ts +4 -2
- package/dialog/typings/index.metadata.json +1 -1
- package/esm2015/autocomplete.js +60 -29
- package/esm2015/autocomplete.js.map +1 -1
- package/esm2015/badge.js +29 -6
- package/esm2015/badge.js.map +1 -1
- package/esm2015/bottom-sheet.js +45 -22
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js +20 -11
- package/esm2015/button-toggle.js.map +1 -1
- package/esm2015/button.js +20 -15
- package/esm2015/button.js.map +1 -1
- package/esm2015/card.js +5 -5
- package/esm2015/card.js.map +1 -1
- package/esm2015/checkbox.js +30 -12
- package/esm2015/checkbox.js.map +1 -1
- package/esm2015/chips.js +64 -28
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +148 -129
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +124 -41
- package/esm2015/datepicker.js.map +1 -1
- package/esm2015/dialog.js +77 -40
- package/esm2015/dialog.js.map +1 -1
- package/esm2015/divider.js +4 -4
- package/esm2015/divider.js.map +1 -1
- package/esm2015/expansion.js +58 -31
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +94 -34
- package/esm2015/form-field.js.map +1 -1
- package/esm2015/grid-list.js +45 -17
- package/esm2015/grid-list.js.map +1 -1
- package/esm2015/icon.js +136 -67
- package/esm2015/icon.js.map +1 -1
- package/esm2015/input.js +44 -23
- package/esm2015/input.js.map +1 -1
- package/esm2015/list.js +47 -22
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +13 -12
- package/esm2015/material.js.map +1 -1
- package/esm2015/menu.js +109 -63
- package/esm2015/menu.js.map +1 -1
- package/esm2015/paginator.js +35 -12
- package/esm2015/paginator.js.map +1 -1
- package/esm2015/progress-bar.js +26 -13
- package/esm2015/progress-bar.js.map +1 -1
- package/esm2015/progress-spinner.js +24 -14
- package/esm2015/progress-spinner.js.map +1 -1
- package/esm2015/radio.js +22 -21
- package/esm2015/radio.js.map +1 -1
- package/esm2015/select.js +116 -53
- package/esm2015/select.js.map +1 -1
- package/esm2015/sidenav.js +75 -28
- package/esm2015/sidenav.js.map +1 -1
- package/esm2015/slide-toggle.js +23 -15
- package/esm2015/slide-toggle.js.map +1 -1
- package/esm2015/slider.js +54 -24
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +41 -21
- package/esm2015/snack-bar.js.map +1 -1
- package/esm2015/sort.js +47 -24
- package/esm2015/sort.js.map +1 -1
- package/esm2015/stepper.js +35 -32
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +31 -11
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +113 -53
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/toolbar.js +9 -5
- package/esm2015/toolbar.js.map +1 -1
- package/esm2015/tooltip.js +43 -28
- package/esm2015/tooltip.js.map +1 -1
- package/esm2015/tree.js +22 -17
- package/esm2015/tree.js.map +1 -1
- package/esm5/autocomplete.es5.js +128 -34
- package/esm5/autocomplete.es5.js.map +1 -1
- package/esm5/badge.es5.js +40 -7
- package/esm5/badge.es5.js.map +1 -1
- package/esm5/bottom-sheet.es5.js +70 -23
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js +38 -15
- package/esm5/button-toggle.es5.js.map +1 -1
- package/esm5/button.es5.js +23 -16
- package/esm5/button.es5.js.map +1 -1
- package/esm5/card.es5.js +5 -5
- package/esm5/card.es5.js.map +1 -1
- package/esm5/checkbox.es5.js +58 -17
- package/esm5/checkbox.es5.js.map +1 -1
- package/esm5/chips.es5.js +127 -37
- package/esm5/chips.es5.js.map +1 -1
- package/esm5/core.es5.js +192 -129
- package/esm5/core.es5.js.map +1 -1
- package/esm5/datepicker.es5.js +233 -55
- package/esm5/datepicker.es5.js.map +1 -1
- package/esm5/dialog.es5.js +140 -42
- package/esm5/dialog.es5.js.map +1 -1
- package/esm5/divider.es5.js +4 -4
- package/esm5/divider.es5.js.map +1 -1
- package/esm5/expansion.es5.js +56 -31
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +125 -36
- package/esm5/form-field.es5.js.map +1 -1
- package/esm5/grid-list.es5.js +68 -17
- package/esm5/grid-list.es5.js.map +1 -1
- package/esm5/icon.es5.js +279 -80
- package/esm5/icon.es5.js.map +1 -1
- package/esm5/input.es5.js +52 -24
- package/esm5/input.es5.js.map +1 -1
- package/esm5/list.es5.js +72 -24
- package/esm5/list.es5.js.map +1 -1
- package/esm5/material.es5.js +13 -12
- package/esm5/material.es5.js.map +1 -1
- package/esm5/menu.es5.js +170 -65
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/paginator.es5.js +55 -13
- package/esm5/paginator.es5.js.map +1 -1
- package/esm5/progress-bar.es5.js +33 -14
- package/esm5/progress-bar.es5.js.map +1 -1
- package/esm5/progress-spinner.es5.js +31 -15
- package/esm5/progress-spinner.es5.js.map +1 -1
- package/esm5/radio.es5.js +42 -42
- package/esm5/radio.es5.js.map +1 -1
- package/esm5/select.es5.js +193 -55
- package/esm5/select.es5.js.map +1 -1
- package/esm5/sidenav.es5.js +107 -28
- package/esm5/sidenav.es5.js.map +1 -1
- package/esm5/slide-toggle.es5.js +32 -16
- package/esm5/slide-toggle.es5.js.map +1 -1
- package/esm5/slider.es5.js +94 -24
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +73 -21
- package/esm5/snack-bar.es5.js.map +1 -1
- package/esm5/sort.es5.js +53 -26
- package/esm5/sort.es5.js.map +1 -1
- package/esm5/stepper.es5.js +40 -38
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +31 -11
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +162 -61
- package/esm5/tabs.es5.js.map +1 -1
- package/esm5/toolbar.es5.js +16 -6
- package/esm5/toolbar.es5.js.map +1 -1
- package/esm5/tooltip.es5.js +55 -28
- package/esm5/tooltip.es5.js.map +1 -1
- package/esm5/tree.es5.js +27 -18
- package/esm5/tree.es5.js.map +1 -1
- package/expansion/typings/expansion-panel-header.d.ts +2 -2
- package/expansion/typings/expansion-panel.d.ts +19 -2
- package/expansion/typings/index.metadata.json +1 -1
- package/form-field/typings/form-field.d.ts +15 -4
- package/form-field/typings/index.metadata.json +1 -1
- package/grid-list/typings/index.d.ts +1 -1
- package/grid-list/typings/index.metadata.json +1 -1
- package/icon/typings/index.metadata.json +1 -1
- package/list/typings/index.metadata.json +1 -1
- package/material.d.ts +1 -1
- package/material.metadata.json +3 -3
- package/menu/typings/index.d.ts +4 -4
- package/menu/typings/index.metadata.json +1 -1
- package/menu/typings/menu-directive.d.ts +1 -0
- package/menu/typings/menu-item.d.ts +2 -0
- package/package.json +5 -5
- package/paginator/typings/index.metadata.json +1 -1
- package/paginator/typings/paginator.d.ts +7 -3
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/typings/index.metadata.json +1 -1
- package/radio/typings/index.metadata.json +1 -1
- package/radio/typings/radio.d.ts +2 -6
- package/schematics/ng-add/theming/{custom-theme.d.ts → create-custom-theme.d.ts} +0 -0
- package/schematics/ng-add/theming/{custom-theme.js → create-custom-theme.js} +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js.map +1 -0
- package/schematics/ng-add/theming/theming.js +35 -19
- package/schematics/ng-add/theming/theming.js.map +1 -1
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/select/typings/index.metadata.json +1 -1
- package/select/typings/select.d.ts +12 -2
- package/sidenav/typings/drawer.d.ts +9 -2
- package/sidenav/typings/index.metadata.json +1 -1
- package/slide-toggle/typings/index.metadata.json +1 -1
- package/slider/typings/index.metadata.json +1 -1
- package/snack-bar/typings/index.metadata.json +1 -1
- package/sort/typings/index.metadata.json +1 -1
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/step-header.d.ts +3 -5
- package/tabs/typings/index.d.ts +5 -5
- package/tabs/typings/index.metadata.json +1 -1
- package/tabs/typings/tab-body.d.ts +2 -0
- package/tabs/typings/tab-group.d.ts +11 -2
- package/tabs/typings/tab-header.d.ts +9 -3
- package/toolbar/typings/index.metadata.json +1 -1
- package/tooltip/typings/index.metadata.json +1 -1
- package/tree/typings/data-source/flat-data-source.d.ts +2 -2
- package/tree/typings/index.metadata.json +1 -1
- package/typings/autocomplete/index.d.ts +1 -1
- package/typings/autocomplete/index.metadata.json +1 -1
- package/typings/badge/index.metadata.json +1 -1
- package/typings/bottom-sheet/bottom-sheet-config.d.ts +5 -0
- package/typings/bottom-sheet/bottom-sheet-container.d.ts +1 -1
- package/typings/bottom-sheet/index.metadata.json +1 -1
- package/typings/button/button.d.ts +0 -5
- package/typings/button/index.metadata.json +1 -1
- package/typings/button-toggle/index.metadata.json +1 -1
- package/typings/card/index.metadata.json +1 -1
- package/typings/checkbox/index.metadata.json +1 -1
- package/typings/chips/chip-list.d.ts +1 -1
- package/typings/chips/chip.d.ts +2 -2
- package/typings/chips/index.metadata.json +1 -1
- package/typings/core/index.metadata.json +1 -1
- package/typings/core/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
- package/typings/core/public-api.d.ts +1 -1
- package/typings/datepicker/calendar-body.d.ts +21 -5
- package/typings/datepicker/calendar.d.ts +4 -1
- package/typings/datepicker/datepicker.d.ts +3 -0
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/datepicker/month-view.d.ts +4 -2
- package/typings/dialog/index.metadata.json +1 -1
- package/typings/esm5/autocomplete/index.d.ts +1 -1
- package/typings/esm5/autocomplete/index.metadata.json +1 -1
- package/typings/esm5/badge/index.metadata.json +1 -1
- package/typings/esm5/bottom-sheet/bottom-sheet-config.d.ts +5 -0
- package/typings/esm5/bottom-sheet/bottom-sheet-container.d.ts +1 -1
- package/typings/esm5/bottom-sheet/index.metadata.json +1 -1
- package/typings/esm5/button/button.d.ts +0 -5
- package/typings/esm5/button/index.metadata.json +1 -1
- package/typings/esm5/button-toggle/index.metadata.json +1 -1
- package/typings/esm5/card/index.metadata.json +1 -1
- package/typings/esm5/checkbox/index.metadata.json +1 -1
- package/typings/esm5/chips/chip-list.d.ts +1 -1
- package/typings/esm5/chips/chip.d.ts +2 -2
- package/typings/esm5/chips/index.metadata.json +1 -1
- package/typings/esm5/core/index.metadata.json +1 -1
- package/typings/esm5/core/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
- package/typings/esm5/core/public-api.d.ts +1 -1
- package/typings/esm5/datepicker/calendar-body.d.ts +21 -5
- package/typings/esm5/datepicker/calendar.d.ts +4 -1
- package/typings/esm5/datepicker/datepicker.d.ts +3 -0
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- package/typings/esm5/datepicker/month-view.d.ts +4 -2
- package/typings/esm5/dialog/index.metadata.json +1 -1
- package/typings/esm5/expansion/expansion-panel-header.d.ts +2 -2
- package/typings/esm5/expansion/expansion-panel.d.ts +19 -2
- package/typings/esm5/expansion/index.metadata.json +1 -1
- package/typings/esm5/form-field/form-field.d.ts +15 -4
- package/typings/esm5/form-field/index.metadata.json +1 -1
- package/typings/esm5/grid-list/index.d.ts +1 -1
- package/typings/esm5/grid-list/index.metadata.json +1 -1
- package/typings/esm5/icon/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/list/index.metadata.json +1 -1
- package/typings/esm5/menu/index.d.ts +4 -4
- package/typings/esm5/menu/index.metadata.json +1 -1
- package/typings/esm5/menu/menu-directive.d.ts +1 -0
- package/typings/esm5/menu/menu-item.d.ts +2 -0
- package/typings/esm5/paginator/index.metadata.json +1 -1
- package/typings/esm5/paginator/paginator.d.ts +7 -3
- package/typings/esm5/progress-bar/index.metadata.json +1 -1
- package/typings/esm5/radio/index.metadata.json +1 -1
- package/typings/esm5/radio/radio.d.ts +2 -6
- package/typings/esm5/select/index.metadata.json +1 -1
- package/typings/esm5/select/select.d.ts +12 -2
- package/typings/esm5/sidenav/drawer.d.ts +9 -2
- package/typings/esm5/sidenav/index.metadata.json +1 -1
- package/typings/esm5/slide-toggle/index.metadata.json +1 -1
- package/typings/esm5/slider/index.metadata.json +1 -1
- package/typings/esm5/snack-bar/index.metadata.json +1 -1
- package/typings/esm5/sort/index.metadata.json +1 -1
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/step-header.d.ts +3 -5
- package/typings/esm5/tabs/index.d.ts +5 -5
- package/typings/esm5/tabs/index.metadata.json +1 -1
- package/typings/esm5/tabs/tab-body.d.ts +2 -0
- package/typings/esm5/tabs/tab-group.d.ts +11 -2
- package/typings/esm5/tabs/tab-header.d.ts +9 -3
- package/typings/esm5/toolbar/index.metadata.json +1 -1
- package/typings/esm5/tooltip/index.metadata.json +1 -1
- package/typings/esm5/tree/data-source/flat-data-source.d.ts +2 -2
- package/typings/esm5/tree/index.metadata.json +1 -1
- package/typings/expansion/expansion-panel-header.d.ts +2 -2
- package/typings/expansion/expansion-panel.d.ts +19 -2
- package/typings/expansion/index.metadata.json +1 -1
- package/typings/form-field/form-field.d.ts +15 -4
- package/typings/form-field/index.metadata.json +1 -1
- package/typings/grid-list/index.d.ts +1 -1
- package/typings/grid-list/index.metadata.json +1 -1
- package/typings/icon/index.metadata.json +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/list/index.metadata.json +1 -1
- package/typings/menu/index.d.ts +4 -4
- package/typings/menu/index.metadata.json +1 -1
- package/typings/menu/menu-directive.d.ts +1 -0
- package/typings/menu/menu-item.d.ts +2 -0
- package/typings/paginator/index.metadata.json +1 -1
- package/typings/paginator/paginator.d.ts +7 -3
- package/typings/progress-bar/index.metadata.json +1 -1
- package/typings/radio/index.metadata.json +1 -1
- package/typings/radio/radio.d.ts +2 -6
- package/typings/schematics/ng-add/theming/{custom-theme.d.ts → create-custom-theme.d.ts} +0 -0
- package/typings/select/index.metadata.json +1 -1
- package/typings/select/select.d.ts +12 -2
- package/typings/sidenav/drawer.d.ts +9 -2
- package/typings/sidenav/index.metadata.json +1 -1
- package/typings/slide-toggle/index.metadata.json +1 -1
- package/typings/slider/index.metadata.json +1 -1
- package/typings/snack-bar/index.metadata.json +1 -1
- package/typings/sort/index.metadata.json +1 -1
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/step-header.d.ts +3 -5
- package/typings/tabs/index.d.ts +5 -5
- package/typings/tabs/index.metadata.json +1 -1
- package/typings/tabs/tab-body.d.ts +2 -0
- package/typings/tabs/tab-group.d.ts +11 -2
- package/typings/tabs/tab-header.d.ts +9 -3
- package/typings/toolbar/index.metadata.json +1 -1
- package/typings/tooltip/index.metadata.json +1 -1
- package/typings/tree/data-source/flat-data-source.d.ts +2 -2
- package/typings/tree/index.metadata.json +1 -1
- package/schematics/ng-add/theming/custom-theme.js.map +0 -1
package/esm5/select.es5.js
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
9
9
|
import { __extends } from 'tslib';
|
|
10
|
-
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
10
|
+
import { ActiveDescendantKeyManager, LiveAnnouncer } 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 () {
|
|
@@ -229,7 +244,7 @@ var MatSelectTrigger = /** @class */ (function () {
|
|
|
229
244
|
}());
|
|
230
245
|
var MatSelect = /** @class */ (function (_super) {
|
|
231
246
|
__extends(MatSelect, _super);
|
|
232
|
-
function MatSelect(_viewportRuler, _changeDetectorRef, _ngZone, _defaultErrorStateMatcher, elementRef, _dir, _parentForm, _parentFormGroup, _parentFormField, ngControl, tabIndex, scrollStrategyFactory) {
|
|
247
|
+
function MatSelect(_viewportRuler, _changeDetectorRef, _ngZone, _defaultErrorStateMatcher, elementRef, _dir, _parentForm, _parentFormGroup, _parentFormField, ngControl, tabIndex, scrollStrategyFactory, _liveAnnouncer) {
|
|
233
248
|
var _this = _super.call(this, elementRef, _defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl) || this;
|
|
234
249
|
_this._viewportRuler = _viewportRuler;
|
|
235
250
|
_this._changeDetectorRef = _changeDetectorRef;
|
|
@@ -237,6 +252,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
237
252
|
_this._dir = _dir;
|
|
238
253
|
_this._parentFormField = _parentFormField;
|
|
239
254
|
_this.ngControl = ngControl;
|
|
255
|
+
_this._liveAnnouncer = _liveAnnouncer;
|
|
240
256
|
/**
|
|
241
257
|
* Whether or not the overlay panel is open.
|
|
242
258
|
*/
|
|
@@ -606,7 +622,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
606
622
|
function (changes) {
|
|
607
623
|
// Updating the disabled state is handled by `mixinDisabled`, but we need to additionally let
|
|
608
624
|
// the parent form field know to run change detection when the disabled state changes.
|
|
609
|
-
if (changes
|
|
625
|
+
if (changes.disabled) {
|
|
610
626
|
this.stateChanges.next();
|
|
611
627
|
}
|
|
612
628
|
};
|
|
@@ -859,13 +875,16 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
859
875
|
this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);
|
|
860
876
|
}
|
|
861
877
|
};
|
|
878
|
+
/** Handles keyboard events while the select is closed. */
|
|
862
879
|
/**
|
|
863
880
|
* Handles keyboard events while the select is closed.
|
|
881
|
+
* @private
|
|
864
882
|
* @param {?} event
|
|
865
883
|
* @return {?}
|
|
866
884
|
*/
|
|
867
885
|
MatSelect.prototype._handleClosedKeydown = /**
|
|
868
886
|
* Handles keyboard events while the select is closed.
|
|
887
|
+
* @private
|
|
869
888
|
* @param {?} event
|
|
870
889
|
* @return {?}
|
|
871
890
|
*/
|
|
@@ -880,11 +899,13 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
880
899
|
/** @type {?} */
|
|
881
900
|
var manager = this._keyManager;
|
|
882
901
|
// Open the select on ALT + arrow key to match the native <select>
|
|
883
|
-
if (isOpenKey || ((this.multiple || event.altKey) && isArrowKey)) {
|
|
902
|
+
if ((isOpenKey && !hasModifierKey(event)) || ((this.multiple || event.altKey) && isArrowKey)) {
|
|
884
903
|
event.preventDefault(); // prevents the page from scrolling down when pressing space
|
|
885
904
|
this.open();
|
|
886
905
|
}
|
|
887
906
|
else if (!this.multiple) {
|
|
907
|
+
/** @type {?} */
|
|
908
|
+
var selectedOption = this.selected;
|
|
888
909
|
if (keyCode === HOME || keyCode === END) {
|
|
889
910
|
keyCode === HOME ? manager.setFirstItemActive() : manager.setLastItemActive();
|
|
890
911
|
event.preventDefault();
|
|
@@ -892,15 +913,23 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
892
913
|
else {
|
|
893
914
|
manager.onKeydown(event);
|
|
894
915
|
}
|
|
916
|
+
// Since the value has changed, we need to announce it ourselves.
|
|
917
|
+
// @breaking-change 8.0.0 remove null check for _liveAnnouncer.
|
|
918
|
+
if (this._liveAnnouncer && selectedOption !== this.selected) {
|
|
919
|
+
this._liveAnnouncer.announce(((/** @type {?} */ (this.selected))).viewValue);
|
|
920
|
+
}
|
|
895
921
|
}
|
|
896
922
|
};
|
|
923
|
+
/** Handles keyboard events when the selected is open. */
|
|
897
924
|
/**
|
|
898
925
|
* Handles keyboard events when the selected is open.
|
|
926
|
+
* @private
|
|
899
927
|
* @param {?} event
|
|
900
928
|
* @return {?}
|
|
901
929
|
*/
|
|
902
930
|
MatSelect.prototype._handleOpenKeydown = /**
|
|
903
931
|
* Handles keyboard events when the selected is open.
|
|
932
|
+
* @private
|
|
904
933
|
* @param {?} event
|
|
905
934
|
* @return {?}
|
|
906
935
|
*/
|
|
@@ -920,7 +949,8 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
920
949
|
event.preventDefault();
|
|
921
950
|
this.close();
|
|
922
951
|
}
|
|
923
|
-
else if ((keyCode === ENTER || keyCode === SPACE) && manager.activeItem
|
|
952
|
+
else if ((keyCode === ENTER || keyCode === SPACE) && manager.activeItem &&
|
|
953
|
+
!hasModifierKey(event)) {
|
|
924
954
|
event.preventDefault();
|
|
925
955
|
manager.activeItem._selectViaInteraction();
|
|
926
956
|
}
|
|
@@ -1010,12 +1040,19 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1010
1040
|
function () {
|
|
1011
1041
|
return this._parentFormField ? "mat-" + this._parentFormField.color : '';
|
|
1012
1042
|
};
|
|
1043
|
+
// TODO(josephperrott): Remove after 2018 spec updates are fully merged.
|
|
1044
|
+
/** Sets the pseudo checkbox padding size based on the width of the pseudo checkbox. */
|
|
1045
|
+
// TODO(josephperrott): Remove after 2018 spec updates are fully merged.
|
|
1013
1046
|
/**
|
|
1014
1047
|
* Sets the pseudo checkbox padding size based on the width of the pseudo checkbox.
|
|
1048
|
+
* @private
|
|
1015
1049
|
* @return {?}
|
|
1016
1050
|
*/
|
|
1017
|
-
MatSelect.prototype._setPseudoCheckboxPaddingSize =
|
|
1051
|
+
MatSelect.prototype._setPseudoCheckboxPaddingSize =
|
|
1052
|
+
// TODO(josephperrott): Remove after 2018 spec updates are fully merged.
|
|
1053
|
+
/**
|
|
1018
1054
|
* Sets the pseudo checkbox padding size based on the width of the pseudo checkbox.
|
|
1055
|
+
* @private
|
|
1019
1056
|
* @return {?}
|
|
1020
1057
|
*/
|
|
1021
1058
|
function () {
|
|
@@ -1040,9 +1077,11 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1040
1077
|
configurable: true
|
|
1041
1078
|
});
|
|
1042
1079
|
/**
|
|
1080
|
+
* @private
|
|
1043
1081
|
* @return {?}
|
|
1044
1082
|
*/
|
|
1045
1083
|
MatSelect.prototype._initializeSelection = /**
|
|
1084
|
+
* @private
|
|
1046
1085
|
* @return {?}
|
|
1047
1086
|
*/
|
|
1048
1087
|
function () {
|
|
@@ -1051,17 +1090,24 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1051
1090
|
// has changed after it was checked" errors from Angular.
|
|
1052
1091
|
Promise.resolve().then(function () {
|
|
1053
1092
|
_this._setSelectionByValue(_this.ngControl ? _this.ngControl.value : _this._value);
|
|
1093
|
+
_this.stateChanges.next();
|
|
1054
1094
|
});
|
|
1055
1095
|
};
|
|
1056
1096
|
/**
|
|
1057
1097
|
* Sets the selected option based on a value. If no option can be
|
|
1058
1098
|
* found with the designated value, the select trigger is cleared.
|
|
1099
|
+
*/
|
|
1100
|
+
/**
|
|
1101
|
+
* Sets the selected option based on a value. If no option can be
|
|
1102
|
+
* found with the designated value, the select trigger is cleared.
|
|
1103
|
+
* @private
|
|
1059
1104
|
* @param {?} value
|
|
1060
1105
|
* @return {?}
|
|
1061
1106
|
*/
|
|
1062
1107
|
MatSelect.prototype._setSelectionByValue = /**
|
|
1063
1108
|
* Sets the selected option based on a value. If no option can be
|
|
1064
1109
|
* found with the designated value, the select trigger is cleared.
|
|
1110
|
+
* @private
|
|
1065
1111
|
* @param {?} value
|
|
1066
1112
|
* @return {?}
|
|
1067
1113
|
*/
|
|
@@ -1089,11 +1135,17 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1089
1135
|
};
|
|
1090
1136
|
/**
|
|
1091
1137
|
* Finds and selects and option based on its value.
|
|
1138
|
+
* @returns Option that has the corresponding value.
|
|
1139
|
+
*/
|
|
1140
|
+
/**
|
|
1141
|
+
* Finds and selects and option based on its value.
|
|
1142
|
+
* @private
|
|
1092
1143
|
* @param {?} value
|
|
1093
1144
|
* @return {?} Option that has the corresponding value.
|
|
1094
1145
|
*/
|
|
1095
1146
|
MatSelect.prototype._selectValue = /**
|
|
1096
1147
|
* Finds and selects and option based on its value.
|
|
1148
|
+
* @private
|
|
1097
1149
|
* @param {?} value
|
|
1098
1150
|
* @return {?} Option that has the corresponding value.
|
|
1099
1151
|
*/
|
|
@@ -1118,12 +1170,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1118
1170
|
}
|
|
1119
1171
|
return correspondingOption;
|
|
1120
1172
|
};
|
|
1173
|
+
/** Sets up a key manager to listen to keyboard events on the overlay panel. */
|
|
1121
1174
|
/**
|
|
1122
1175
|
* Sets up a key manager to listen to keyboard events on the overlay panel.
|
|
1176
|
+
* @private
|
|
1123
1177
|
* @return {?}
|
|
1124
1178
|
*/
|
|
1125
1179
|
MatSelect.prototype._initKeyManager = /**
|
|
1126
1180
|
* Sets up a key manager to listen to keyboard events on the overlay panel.
|
|
1181
|
+
* @private
|
|
1127
1182
|
* @return {?}
|
|
1128
1183
|
*/
|
|
1129
1184
|
function () {
|
|
@@ -1148,12 +1203,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1148
1203
|
}
|
|
1149
1204
|
});
|
|
1150
1205
|
};
|
|
1206
|
+
/** Drops current option subscriptions and IDs and resets from scratch. */
|
|
1151
1207
|
/**
|
|
1152
1208
|
* Drops current option subscriptions and IDs and resets from scratch.
|
|
1209
|
+
* @private
|
|
1153
1210
|
* @return {?}
|
|
1154
1211
|
*/
|
|
1155
1212
|
MatSelect.prototype._resetOptions = /**
|
|
1156
1213
|
* Drops current option subscriptions and IDs and resets from scratch.
|
|
1214
|
+
* @private
|
|
1157
1215
|
* @return {?}
|
|
1158
1216
|
*/
|
|
1159
1217
|
function () {
|
|
@@ -1176,14 +1234,17 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1176
1234
|
});
|
|
1177
1235
|
this._setOptionIds();
|
|
1178
1236
|
};
|
|
1237
|
+
/** Invoked when an option is clicked. */
|
|
1179
1238
|
/**
|
|
1180
1239
|
* Invoked when an option is clicked.
|
|
1240
|
+
* @private
|
|
1181
1241
|
* @param {?} option
|
|
1182
1242
|
* @param {?} isUserInput
|
|
1183
1243
|
* @return {?}
|
|
1184
1244
|
*/
|
|
1185
1245
|
MatSelect.prototype._onSelect = /**
|
|
1186
1246
|
* Invoked when an option is clicked.
|
|
1247
|
+
* @private
|
|
1187
1248
|
* @param {?} option
|
|
1188
1249
|
* @param {?} isUserInput
|
|
1189
1250
|
* @return {?}
|
|
@@ -1217,12 +1278,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1217
1278
|
}
|
|
1218
1279
|
this.stateChanges.next();
|
|
1219
1280
|
};
|
|
1281
|
+
/** Sorts the selected values in the selected based on their order in the panel. */
|
|
1220
1282
|
/**
|
|
1221
1283
|
* Sorts the selected values in the selected based on their order in the panel.
|
|
1284
|
+
* @private
|
|
1222
1285
|
* @return {?}
|
|
1223
1286
|
*/
|
|
1224
1287
|
MatSelect.prototype._sortValues = /**
|
|
1225
1288
|
* Sorts the selected values in the selected based on their order in the panel.
|
|
1289
|
+
* @private
|
|
1226
1290
|
* @return {?}
|
|
1227
1291
|
*/
|
|
1228
1292
|
function () {
|
|
@@ -1237,13 +1301,16 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1237
1301
|
this.stateChanges.next();
|
|
1238
1302
|
}
|
|
1239
1303
|
};
|
|
1304
|
+
/** Emits change event to set the model value. */
|
|
1240
1305
|
/**
|
|
1241
1306
|
* Emits change event to set the model value.
|
|
1307
|
+
* @private
|
|
1242
1308
|
* @param {?=} fallbackValue
|
|
1243
1309
|
* @return {?}
|
|
1244
1310
|
*/
|
|
1245
1311
|
MatSelect.prototype._propagateChanges = /**
|
|
1246
1312
|
* Emits change event to set the model value.
|
|
1313
|
+
* @private
|
|
1247
1314
|
* @param {?=} fallbackValue
|
|
1248
1315
|
* @return {?}
|
|
1249
1316
|
*/
|
|
@@ -1251,10 +1318,10 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1251
1318
|
/** @type {?} */
|
|
1252
1319
|
var valueToEmit = null;
|
|
1253
1320
|
if (this.multiple) {
|
|
1254
|
-
valueToEmit = (/** @type {?} */ (this.selected)).map(function (option) { return option.value; });
|
|
1321
|
+
valueToEmit = ((/** @type {?} */ (this.selected))).map(function (option) { return option.value; });
|
|
1255
1322
|
}
|
|
1256
1323
|
else {
|
|
1257
|
-
valueToEmit = this.selected ? (/** @type {?} */ (this.selected)).value : fallbackValue;
|
|
1324
|
+
valueToEmit = this.selected ? ((/** @type {?} */ (this.selected))).value : fallbackValue;
|
|
1258
1325
|
}
|
|
1259
1326
|
this._value = valueToEmit;
|
|
1260
1327
|
this.valueChange.emit(valueToEmit);
|
|
@@ -1262,12 +1329,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1262
1329
|
this.selectionChange.emit(new MatSelectChange(this, valueToEmit));
|
|
1263
1330
|
this._changeDetectorRef.markForCheck();
|
|
1264
1331
|
};
|
|
1332
|
+
/** Records option IDs to pass to the aria-owns property. */
|
|
1265
1333
|
/**
|
|
1266
1334
|
* Records option IDs to pass to the aria-owns property.
|
|
1335
|
+
* @private
|
|
1267
1336
|
* @return {?}
|
|
1268
1337
|
*/
|
|
1269
1338
|
MatSelect.prototype._setOptionIds = /**
|
|
1270
1339
|
* Records option IDs to pass to the aria-owns property.
|
|
1340
|
+
* @private
|
|
1271
1341
|
* @return {?}
|
|
1272
1342
|
*/
|
|
1273
1343
|
function () {
|
|
@@ -1276,11 +1346,17 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1276
1346
|
/**
|
|
1277
1347
|
* Highlights the selected item. If no option is selected, it will highlight
|
|
1278
1348
|
* the first item instead.
|
|
1349
|
+
*/
|
|
1350
|
+
/**
|
|
1351
|
+
* Highlights the selected item. If no option is selected, it will highlight
|
|
1352
|
+
* the first item instead.
|
|
1353
|
+
* @private
|
|
1279
1354
|
* @return {?}
|
|
1280
1355
|
*/
|
|
1281
1356
|
MatSelect.prototype._highlightCorrectOption = /**
|
|
1282
1357
|
* Highlights the selected item. If no option is selected, it will highlight
|
|
1283
1358
|
* the first item instead.
|
|
1359
|
+
* @private
|
|
1284
1360
|
* @return {?}
|
|
1285
1361
|
*/
|
|
1286
1362
|
function () {
|
|
@@ -1293,12 +1369,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1293
1369
|
}
|
|
1294
1370
|
}
|
|
1295
1371
|
};
|
|
1372
|
+
/** Scrolls the active option into view. */
|
|
1296
1373
|
/**
|
|
1297
1374
|
* Scrolls the active option into view.
|
|
1375
|
+
* @private
|
|
1298
1376
|
* @return {?}
|
|
1299
1377
|
*/
|
|
1300
1378
|
MatSelect.prototype._scrollActiveOptionIntoView = /**
|
|
1301
1379
|
* Scrolls the active option into view.
|
|
1380
|
+
* @private
|
|
1302
1381
|
* @return {?}
|
|
1303
1382
|
*/
|
|
1304
1383
|
function () {
|
|
@@ -1320,13 +1399,16 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1320
1399
|
function () {
|
|
1321
1400
|
this._elementRef.nativeElement.focus();
|
|
1322
1401
|
};
|
|
1402
|
+
/** Gets the index of the provided option in the option list. */
|
|
1323
1403
|
/**
|
|
1324
1404
|
* Gets the index of the provided option in the option list.
|
|
1405
|
+
* @private
|
|
1325
1406
|
* @param {?} option
|
|
1326
1407
|
* @return {?}
|
|
1327
1408
|
*/
|
|
1328
1409
|
MatSelect.prototype._getOptionIndex = /**
|
|
1329
1410
|
* Gets the index of the provided option in the option list.
|
|
1411
|
+
* @private
|
|
1330
1412
|
* @param {?} option
|
|
1331
1413
|
* @return {?}
|
|
1332
1414
|
*/
|
|
@@ -1335,12 +1417,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1335
1417
|
return result === undefined ? (option === current ? index : undefined) : result;
|
|
1336
1418
|
}, undefined);
|
|
1337
1419
|
};
|
|
1420
|
+
/** Calculates the scroll position and x- and y-offsets of the overlay panel. */
|
|
1338
1421
|
/**
|
|
1339
1422
|
* Calculates the scroll position and x- and y-offsets of the overlay panel.
|
|
1423
|
+
* @private
|
|
1340
1424
|
* @return {?}
|
|
1341
1425
|
*/
|
|
1342
1426
|
MatSelect.prototype._calculateOverlayPosition = /**
|
|
1343
1427
|
* Calculates the scroll position and x- and y-offsets of the overlay panel.
|
|
1428
|
+
* @private
|
|
1344
1429
|
* @return {?}
|
|
1345
1430
|
*/
|
|
1346
1431
|
function () {
|
|
@@ -1352,11 +1437,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1352
1437
|
var panelHeight = Math.min(items * itemHeight, SELECT_PANEL_MAX_HEIGHT);
|
|
1353
1438
|
/** @type {?} */
|
|
1354
1439
|
var scrollContainerHeight = items * itemHeight;
|
|
1440
|
+
// The farthest the panel can be scrolled before it hits the bottom
|
|
1355
1441
|
/** @type {?} */
|
|
1356
1442
|
var maxScroll = scrollContainerHeight - panelHeight;
|
|
1443
|
+
// If no value is selected we open the popup to the first item.
|
|
1357
1444
|
/** @type {?} */
|
|
1358
|
-
var selectedOptionOffset = this.empty ? 0 : /** @type {?} */ (
|
|
1445
|
+
var selectedOptionOffset = this.empty ? 0 : (/** @type {?} */ (this._getOptionIndex(this._selectionModel.selected[0])));
|
|
1359
1446
|
selectedOptionOffset += _countGroupLabelsBeforeOption(selectedOptionOffset, this.options, this.optionGroups);
|
|
1447
|
+
// We must maintain a scroll buffer so the selected option will be scrolled to the
|
|
1448
|
+
// center of the overlay panel rather than the top.
|
|
1360
1449
|
/** @type {?} */
|
|
1361
1450
|
var scrollBuffer = panelHeight / 2;
|
|
1362
1451
|
this._scrollTop = this._calculateOverlayScroll(selectedOptionOffset, scrollBuffer, maxScroll);
|
|
@@ -1399,6 +1488,10 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1399
1488
|
var optionOffsetFromScrollTop = itemHeight * selectedIndex;
|
|
1400
1489
|
/** @type {?} */
|
|
1401
1490
|
var halfOptionHeight = itemHeight / 2;
|
|
1491
|
+
// Starts at the optionOffsetFromScrollTop, which scrolls the option to the top of the
|
|
1492
|
+
// scroll container, then subtracts the scroll buffer to scroll the option down to
|
|
1493
|
+
// the center of the overlay panel. Half the option height must be re-added to the
|
|
1494
|
+
// scrollTop so the option is centered based on its middle, not its top edge.
|
|
1402
1495
|
/** @type {?} */
|
|
1403
1496
|
var optimalScrollPosition = optionOffsetFromScrollTop - scrollBuffer + halfOptionHeight;
|
|
1404
1497
|
return Math.min(Math.max(0, optimalScrollPosition), maxScroll);
|
|
@@ -1459,6 +1552,14 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1459
1552
|
* the panel opens. Will change based on LTR or RTL text direction. Note that the offset
|
|
1460
1553
|
* can't be calculated until the panel has been attached, because we need to know the
|
|
1461
1554
|
* content width in order to constrain the panel within the viewport.
|
|
1555
|
+
*/
|
|
1556
|
+
/**
|
|
1557
|
+
* Sets the x-offset of the overlay panel in relation to the trigger's top start corner.
|
|
1558
|
+
* This must be adjusted to align the selected option text over the trigger text when
|
|
1559
|
+
* the panel opens. Will change based on LTR or RTL text direction. Note that the offset
|
|
1560
|
+
* can't be calculated until the panel has been attached, because we need to know the
|
|
1561
|
+
* content width in order to constrain the panel within the viewport.
|
|
1562
|
+
* @private
|
|
1462
1563
|
* @return {?}
|
|
1463
1564
|
*/
|
|
1464
1565
|
MatSelect.prototype._calculateOverlayOffsetX = /**
|
|
@@ -1467,6 +1568,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1467
1568
|
* the panel opens. Will change based on LTR or RTL text direction. Note that the offset
|
|
1468
1569
|
* can't be calculated until the panel has been attached, because we need to know the
|
|
1469
1570
|
* content width in order to constrain the panel within the viewport.
|
|
1571
|
+
* @private
|
|
1470
1572
|
* @return {?}
|
|
1471
1573
|
*/
|
|
1472
1574
|
function () {
|
|
@@ -1494,6 +1596,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1494
1596
|
if (!isRtl) {
|
|
1495
1597
|
offsetX *= -1;
|
|
1496
1598
|
}
|
|
1599
|
+
// Determine how much the select overflows on each side.
|
|
1497
1600
|
/** @type {?} */
|
|
1498
1601
|
var leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));
|
|
1499
1602
|
/** @type {?} */
|
|
@@ -1516,6 +1619,12 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1516
1619
|
* Calculates the y-offset of the select's overlay panel in relation to the
|
|
1517
1620
|
* top start corner of the trigger. It has to be adjusted in order for the
|
|
1518
1621
|
* selected option to be aligned over the trigger when the panel opens.
|
|
1622
|
+
*/
|
|
1623
|
+
/**
|
|
1624
|
+
* Calculates the y-offset of the select's overlay panel in relation to the
|
|
1625
|
+
* top start corner of the trigger. It has to be adjusted in order for the
|
|
1626
|
+
* selected option to be aligned over the trigger when the panel opens.
|
|
1627
|
+
* @private
|
|
1519
1628
|
* @param {?} selectedIndex
|
|
1520
1629
|
* @param {?} scrollBuffer
|
|
1521
1630
|
* @param {?} maxScroll
|
|
@@ -1525,6 +1634,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1525
1634
|
* Calculates the y-offset of the select's overlay panel in relation to the
|
|
1526
1635
|
* top start corner of the trigger. It has to be adjusted in order for the
|
|
1527
1636
|
* selected option to be aligned over the trigger when the panel opens.
|
|
1637
|
+
* @private
|
|
1528
1638
|
* @param {?} selectedIndex
|
|
1529
1639
|
* @param {?} scrollBuffer
|
|
1530
1640
|
* @param {?} maxScroll
|
|
@@ -1551,6 +1661,8 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1551
1661
|
var firstDisplayedIndex = this._getItemCount() - maxOptionsDisplayed;
|
|
1552
1662
|
/** @type {?} */
|
|
1553
1663
|
var selectedDisplayIndex = selectedIndex - firstDisplayedIndex;
|
|
1664
|
+
// The first item is partially out of the viewport. Therefore we need to calculate what
|
|
1665
|
+
// portion of it is shown in the viewport and account for it in our offset.
|
|
1554
1666
|
/** @type {?} */
|
|
1555
1667
|
var partialItemHeight = itemHeight - (this._getItemCount() * itemHeight - SELECT_PANEL_MAX_HEIGHT) % itemHeight;
|
|
1556
1668
|
// Because the panel height is longer than the height of the options alone,
|
|
@@ -1575,6 +1687,13 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1575
1687
|
* If it will not fit, tries to adjust the scroll position and the associated
|
|
1576
1688
|
* y-offset so the panel can open fully on-screen. If it still won't fit,
|
|
1577
1689
|
* sets the offset back to 0 to allow the fallback position to take over.
|
|
1690
|
+
*/
|
|
1691
|
+
/**
|
|
1692
|
+
* Checks that the attempted overlay position will fit within the viewport.
|
|
1693
|
+
* If it will not fit, tries to adjust the scroll position and the associated
|
|
1694
|
+
* y-offset so the panel can open fully on-screen. If it still won't fit,
|
|
1695
|
+
* sets the offset back to 0 to allow the fallback position to take over.
|
|
1696
|
+
* @private
|
|
1578
1697
|
* @param {?} maxScroll
|
|
1579
1698
|
* @return {?}
|
|
1580
1699
|
*/
|
|
@@ -1583,6 +1702,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1583
1702
|
* If it will not fit, tries to adjust the scroll position and the associated
|
|
1584
1703
|
* y-offset so the panel can open fully on-screen. If it still won't fit,
|
|
1585
1704
|
* sets the offset back to 0 to allow the fallback position to take over.
|
|
1705
|
+
* @private
|
|
1586
1706
|
* @param {?} maxScroll
|
|
1587
1707
|
* @return {?}
|
|
1588
1708
|
*/
|
|
@@ -1611,19 +1731,23 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1611
1731
|
this._transformOrigin = this._getOriginBasedOnOption();
|
|
1612
1732
|
}
|
|
1613
1733
|
};
|
|
1734
|
+
/** Adjusts the overlay panel up to fit in the viewport. */
|
|
1614
1735
|
/**
|
|
1615
1736
|
* Adjusts the overlay panel up to fit in the viewport.
|
|
1737
|
+
* @private
|
|
1616
1738
|
* @param {?} panelHeightBottom
|
|
1617
1739
|
* @param {?} bottomSpaceAvailable
|
|
1618
1740
|
* @return {?}
|
|
1619
1741
|
*/
|
|
1620
1742
|
MatSelect.prototype._adjustPanelUp = /**
|
|
1621
1743
|
* Adjusts the overlay panel up to fit in the viewport.
|
|
1744
|
+
* @private
|
|
1622
1745
|
* @param {?} panelHeightBottom
|
|
1623
1746
|
* @param {?} bottomSpaceAvailable
|
|
1624
1747
|
* @return {?}
|
|
1625
1748
|
*/
|
|
1626
1749
|
function (panelHeightBottom, bottomSpaceAvailable) {
|
|
1750
|
+
// Browsers ignore fractional scroll offsets, so we need to round.
|
|
1627
1751
|
/** @type {?} */
|
|
1628
1752
|
var distanceBelowViewport = Math.round(panelHeightBottom - bottomSpaceAvailable);
|
|
1629
1753
|
// Scrolls the panel up by the distance it was extending past the boundary, then
|
|
@@ -1640,8 +1764,10 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1640
1764
|
this._transformOrigin = "50% bottom 0px";
|
|
1641
1765
|
}
|
|
1642
1766
|
};
|
|
1767
|
+
/** Adjusts the overlay panel down to fit in the viewport. */
|
|
1643
1768
|
/**
|
|
1644
1769
|
* Adjusts the overlay panel down to fit in the viewport.
|
|
1770
|
+
* @private
|
|
1645
1771
|
* @param {?} panelHeightTop
|
|
1646
1772
|
* @param {?} topSpaceAvailable
|
|
1647
1773
|
* @param {?} maxScroll
|
|
@@ -1649,12 +1775,14 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1649
1775
|
*/
|
|
1650
1776
|
MatSelect.prototype._adjustPanelDown = /**
|
|
1651
1777
|
* Adjusts the overlay panel down to fit in the viewport.
|
|
1778
|
+
* @private
|
|
1652
1779
|
* @param {?} panelHeightTop
|
|
1653
1780
|
* @param {?} topSpaceAvailable
|
|
1654
1781
|
* @param {?} maxScroll
|
|
1655
1782
|
* @return {?}
|
|
1656
1783
|
*/
|
|
1657
1784
|
function (panelHeightTop, topSpaceAvailable, maxScroll) {
|
|
1785
|
+
// Browsers ignore fractional scroll offsets, so we need to round.
|
|
1658
1786
|
/** @type {?} */
|
|
1659
1787
|
var distanceAboveViewport = Math.round(panelHeightTop - topSpaceAvailable);
|
|
1660
1788
|
// Scrolls the panel down by the distance it was extending past the boundary, then
|
|
@@ -1672,12 +1800,15 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1672
1800
|
return;
|
|
1673
1801
|
}
|
|
1674
1802
|
};
|
|
1803
|
+
/** Sets the transform origin point based on the selected option. */
|
|
1675
1804
|
/**
|
|
1676
1805
|
* Sets the transform origin point based on the selected option.
|
|
1806
|
+
* @private
|
|
1677
1807
|
* @return {?}
|
|
1678
1808
|
*/
|
|
1679
1809
|
MatSelect.prototype._getOriginBasedOnOption = /**
|
|
1680
1810
|
* Sets the transform origin point based on the selected option.
|
|
1811
|
+
* @private
|
|
1681
1812
|
* @return {?}
|
|
1682
1813
|
*/
|
|
1683
1814
|
function () {
|
|
@@ -1689,23 +1820,29 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1689
1820
|
var originY = Math.abs(this._offsetY) - optionHeightAdjustment + itemHeight / 2;
|
|
1690
1821
|
return "50% " + originY + "px 0px";
|
|
1691
1822
|
};
|
|
1823
|
+
/** Calculates the amount of items in the select. This includes options and group labels. */
|
|
1692
1824
|
/**
|
|
1693
1825
|
* Calculates the amount of items in the select. This includes options and group labels.
|
|
1826
|
+
* @private
|
|
1694
1827
|
* @return {?}
|
|
1695
1828
|
*/
|
|
1696
1829
|
MatSelect.prototype._getItemCount = /**
|
|
1697
1830
|
* Calculates the amount of items in the select. This includes options and group labels.
|
|
1831
|
+
* @private
|
|
1698
1832
|
* @return {?}
|
|
1699
1833
|
*/
|
|
1700
1834
|
function () {
|
|
1701
1835
|
return this.options.length + this.optionGroups.length;
|
|
1702
1836
|
};
|
|
1837
|
+
/** Calculates the height of the select's options. */
|
|
1703
1838
|
/**
|
|
1704
1839
|
* Calculates the height of the select's options.
|
|
1840
|
+
* @private
|
|
1705
1841
|
* @return {?}
|
|
1706
1842
|
*/
|
|
1707
1843
|
MatSelect.prototype._getItemHeight = /**
|
|
1708
1844
|
* Calculates the height of the select's options.
|
|
1845
|
+
* @private
|
|
1709
1846
|
* @return {?}
|
|
1710
1847
|
*/
|
|
1711
1848
|
function () {
|
|
@@ -1768,7 +1905,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1768
1905
|
{ type: Component, args: [{selector: 'mat-select',
|
|
1769
1906
|
exportAs: 'matSelect',
|
|
1770
1907
|
template: "<div cdk-overlay-origin class=\"mat-select-trigger\" aria-hidden=\"true\" (click)=\"toggle()\" #origin=\"cdkOverlayOrigin\" #trigger><div class=\"mat-select-value\" [ngSwitch]=\"empty\"><span class=\"mat-select-placeholder\" *ngSwitchCase=\"true\">{{placeholder || '\u00A0'}}</span> <span class=\"mat-select-value-text\" *ngSwitchCase=\"false\" [ngSwitch]=\"!!customTrigger\"><span *ngSwitchDefault>{{triggerValue || '\u00A0'}}</span><ng-content select=\"mat-select-trigger\" *ngSwitchCase=\"true\"></ng-content></span></div><div class=\"mat-select-arrow-wrapper\"><div class=\"mat-select-arrow\"></div></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\" [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\" [cdkConnectedOverlayOrigin]=\"origin\" [cdkConnectedOverlayOpen]=\"panelOpen\" [cdkConnectedOverlayPositions]=\"_positions\" [cdkConnectedOverlayMinWidth]=\"_triggerRect?.width\" [cdkConnectedOverlayOffsetY]=\"_offsetY\" (backdropClick)=\"close()\" (attach)=\"_onAttached()\" (detach)=\"close()\"><div #panel class=\"mat-select-panel {{ _getPanelTheme() }}\" [ngClass]=\"panelClass\" [@transformPanel]=\"multiple ? 'showing-multiple' : 'showing'\" (@transformPanel.done)=\"_panelDoneAnimatingStream.next($event.toState)\" [style.transformOrigin]=\"_transformOrigin\" [style.font-size.px]=\"_triggerFontSize\" (keydown)=\"_handleKeydown($event)\"><ng-content></ng-content></div></ng-template>",
|
|
1771
|
-
styles: [".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform .4s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}@media
|
|
1908
|
+
styles: [".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform .4s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}@media (-ms-high-contrast:active){.mat-select-panel{outline:solid 1px}}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}"],
|
|
1772
1909
|
inputs: ['disabled', 'disableRipple', 'tabIndex'],
|
|
1773
1910
|
encapsulation: ViewEncapsulation.None,
|
|
1774
1911
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1816,7 +1953,8 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1816
1953
|
{ type: MatFormField, decorators: [{ type: Optional }] },
|
|
1817
1954
|
{ type: NgControl, decorators: [{ type: Self }, { type: Optional }] },
|
|
1818
1955
|
{ type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] },
|
|
1819
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_SELECT_SCROLL_STRATEGY,] }] }
|
|
1956
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_SELECT_SCROLL_STRATEGY,] }] },
|
|
1957
|
+
{ type: LiveAnnouncer }
|
|
1820
1958
|
]; };
|
|
1821
1959
|
MatSelect.propDecorators = {
|
|
1822
1960
|
trigger: [{ type: ViewChild, args: ['trigger',] }],
|
|
@@ -1848,7 +1986,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
1848
1986
|
|
|
1849
1987
|
/**
|
|
1850
1988
|
* @fileoverview added by tsickle
|
|
1851
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1989
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1852
1990
|
*/
|
|
1853
1991
|
var MatSelectModule = /** @class */ (function () {
|
|
1854
1992
|
function MatSelectModule() {
|
|
@@ -1871,12 +2009,12 @@ var MatSelectModule = /** @class */ (function () {
|
|
|
1871
2009
|
|
|
1872
2010
|
/**
|
|
1873
2011
|
* @fileoverview added by tsickle
|
|
1874
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2012
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1875
2013
|
*/
|
|
1876
2014
|
|
|
1877
2015
|
/**
|
|
1878
2016
|
* @fileoverview added by tsickle
|
|
1879
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2017
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1880
2018
|
*/
|
|
1881
2019
|
|
|
1882
2020
|
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 };
|