@angular/material 8.0.0-beta.2 → 8.0.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/README.md +2 -2
- package/_theming.scss +18 -11
- package/autocomplete/typings/autocomplete-trigger.d.ts +13 -2
- package/autocomplete/typings/autocomplete.d.ts +3 -2
- package/autocomplete/typings/index.metadata.json +1 -1
- package/badge/typings/badge.d.ts +8 -2
- package/badge/typings/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js +196 -68
- 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 +37 -9
- 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 +72 -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 +97 -28
- 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 +11 -9
- 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 +69 -25
- 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 +229 -82
- 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 +159 -75
- 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 +157 -62
- 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 +98 -33
- 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 +63 -23
- 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 +114 -42
- 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 +42 -17
- 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 +101 -31
- 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 +29 -16
- 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 +97 -38
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +2 -2
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +308 -167
- 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 +28 -12
- 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 +26 -16
- 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 +10 -12
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js +1 -1
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +77 -21
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +1 -1
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +186 -57
- 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 +323 -145
- 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 +49 -31
- 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 +26 -12
- 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 +55 -23
- 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 +20 -17
- 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 +50 -16
- 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 +116 -26
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js +1 -1
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +162 -77
- 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 +22 -9
- 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 +79 -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 +49 -28
- 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 +3157 -1278
- package/bundles/material.umd.js.map +1 -1
- package/bundles/material.umd.min.js +19 -19
- package/bundles/material.umd.min.js.map +1 -1
- package/button/typings/button.d.ts +4 -3
- package/button/typings/index.metadata.json +1 -1
- package/button-toggle/typings/button-toggle.d.ts +7 -3
- package/button-toggle/typings/index.metadata.json +1 -1
- package/checkbox/typings/checkbox-module.d.ts +3 -0
- package/checkbox/typings/checkbox.d.ts +3 -2
- package/checkbox/typings/index.metadata.json +1 -1
- package/chips/typings/chip-list.d.ts +9 -2
- package/chips/typings/chip.d.ts +3 -2
- package/chips/typings/index.metadata.json +1 -1
- package/core/typings/index.metadata.json +1 -1
- package/core/typings/option/optgroup.d.ts +3 -2
- package/core/typings/public-api.d.ts +1 -0
- package/core/typings/ripple/ripple-renderer.d.ts +4 -4
- package/{typings/esm5 → core/typings}/version.d.ts +0 -0
- package/datepicker/typings/datepicker.d.ts +3 -2
- package/datepicker/typings/index.d.ts +0 -1
- package/datepicker/typings/index.metadata.json +1 -1
- package/datepicker/typings/public-api.d.ts +1 -0
- package/esm2015/autocomplete.js +187 -68
- package/esm2015/autocomplete.js.map +1 -1
- package/esm2015/badge.js +31 -10
- package/esm2015/badge.js.map +1 -1
- package/esm2015/bottom-sheet.js +75 -28
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js +89 -27
- package/esm2015/button-toggle.js.map +1 -1
- package/esm2015/button.js +13 -9
- package/esm2015/button.js.map +1 -1
- package/esm2015/card.js +4 -4
- package/esm2015/card.js.map +1 -1
- package/esm2015/checkbox.js +68 -25
- package/esm2015/checkbox.js.map +1 -1
- package/esm2015/chips.js +219 -79
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +160 -75
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +157 -62
- package/esm2015/datepicker.js.map +1 -1
- package/esm2015/dialog.js +99 -34
- package/esm2015/dialog.js.map +1 -1
- package/esm2015/divider.js +4 -4
- package/esm2015/divider.js.map +1 -1
- package/esm2015/expansion.js +65 -25
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +108 -42
- package/esm2015/form-field.js.map +1 -1
- package/esm2015/grid-list.js +44 -19
- package/esm2015/grid-list.js.map +1 -1
- package/esm2015/icon.js +104 -32
- package/esm2015/icon.js.map +1 -1
- package/esm2015/input.js +31 -16
- package/esm2015/input.js.map +1 -1
- package/esm2015/list.js +96 -29
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +28 -41
- package/esm2015/material.js.map +1 -1
- package/esm2015/menu.js +254 -131
- package/esm2015/menu.js.map +1 -1
- package/esm2015/paginator.js +31 -13
- package/esm2015/paginator.js.map +1 -1
- package/esm2015/progress-bar.js +28 -14
- package/esm2015/progress-bar.js.map +1 -1
- package/esm2015/progress-spinner.js +12 -12
- package/esm2015/progress-spinner.js.map +1 -1
- package/esm2015/radio.js +75 -22
- package/esm2015/radio.js.map +1 -1
- package/esm2015/select.js +188 -57
- package/esm2015/select.js.map +1 -1
- package/esm2015/sidenav.js +285 -136
- package/esm2015/sidenav.js.map +1 -1
- package/esm2015/slide-toggle.js +47 -29
- package/esm2015/slide-toggle.js.map +1 -1
- package/esm2015/slider.js +28 -12
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +58 -26
- package/esm2015/snack-bar.js.map +1 -1
- package/esm2015/sort.js +23 -16
- package/esm2015/sort.js.map +1 -1
- package/esm2015/stepper.js +47 -18
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +120 -27
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +160 -63
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/toolbar.js +24 -9
- package/esm2015/toolbar.js.map +1 -1
- package/esm2015/tooltip.js +82 -28
- package/esm2015/tooltip.js.map +1 -1
- package/esm2015/tree.js +54 -31
- package/esm2015/tree.js.map +1 -1
- package/esm5/autocomplete.es5.js +199 -69
- package/esm5/autocomplete.es5.js.map +1 -1
- package/esm5/badge.es5.js +41 -11
- package/esm5/badge.es5.js.map +1 -1
- package/esm5/bottom-sheet.es5.js +75 -28
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js +100 -29
- package/esm5/button-toggle.es5.js.map +1 -1
- package/esm5/button.es5.js +14 -10
- 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 +71 -26
- package/esm5/checkbox.es5.js.map +1 -1
- package/esm5/chips.es5.js +233 -82
- package/esm5/chips.es5.js.map +1 -1
- package/esm5/core.es5.js +162 -77
- package/esm5/core.es5.js.map +1 -1
- package/esm5/datepicker.es5.js +158 -63
- package/esm5/datepicker.es5.js.map +1 -1
- package/esm5/dialog.es5.js +100 -35
- 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 +65 -25
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +117 -43
- package/esm5/form-field.es5.js.map +1 -1
- package/esm5/grid-list.es5.js +44 -19
- package/esm5/grid-list.es5.js.map +1 -1
- package/esm5/icon.es5.js +105 -33
- package/esm5/icon.es5.js.map +1 -1
- package/esm5/input.es5.js +32 -17
- package/esm5/input.es5.js.map +1 -1
- package/esm5/list.es5.js +100 -33
- package/esm5/list.es5.js.map +1 -1
- package/esm5/material.es5.js +28 -41
- package/esm5/material.es5.js.map +1 -1
- package/esm5/menu.es5.js +301 -161
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/paginator.es5.js +32 -14
- package/esm5/paginator.es5.js.map +1 -1
- package/esm5/progress-bar.es5.js +29 -17
- package/esm5/progress-bar.es5.js.map +1 -1
- package/esm5/progress-spinner.es5.js +13 -13
- package/esm5/progress-spinner.es5.js.map +1 -1
- package/esm5/radio.es5.js +81 -23
- package/esm5/radio.es5.js.map +1 -1
- package/esm5/select.es5.js +189 -58
- package/esm5/select.es5.js.map +1 -1
- package/esm5/sidenav.es5.js +326 -148
- package/esm5/sidenav.es5.js.map +1 -1
- package/esm5/slide-toggle.es5.js +48 -29
- package/esm5/slide-toggle.es5.js.map +1 -1
- package/esm5/slider.es5.js +29 -13
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +58 -26
- package/esm5/snack-bar.es5.js.map +1 -1
- package/esm5/sort.es5.js +25 -18
- package/esm5/sort.es5.js.map +1 -1
- package/esm5/stepper.es5.js +53 -19
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +119 -30
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +165 -68
- package/esm5/tabs.es5.js.map +1 -1
- package/esm5/toolbar.es5.js +25 -10
- package/esm5/toolbar.es5.js.map +1 -1
- package/esm5/tooltip.es5.js +81 -27
- package/esm5/tooltip.es5.js.map +1 -1
- package/esm5/tree.es5.js +52 -29
- package/esm5/tree.es5.js.map +1 -1
- package/form-field/typings/form-field.d.ts +9 -3
- 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/icon.d.ts +3 -2
- package/icon/typings/index.metadata.json +1 -1
- package/input/typings/index.metadata.json +1 -1
- package/input/typings/input.d.ts +3 -2
- package/list/typings/index.metadata.json +1 -1
- package/list/typings/list.d.ts +5 -4
- package/list/typings/selection-list.d.ts +7 -4
- package/material.d.ts +1 -1
- package/material.metadata.json +3 -3
- package/menu/typings/index.d.ts +2 -4
- package/menu/typings/index.metadata.json +1 -1
- package/menu/typings/menu-item.d.ts +3 -2
- package/menu/typings/menu-module.d.ts +6 -0
- package/menu/typings/menu-trigger.d.ts +1 -3
- package/menu/typings/menu.d.ts +158 -5
- package/menu/typings/public-api.d.ts +5 -2
- package/package.json +11 -11
- package/paginator/typings/index.metadata.json +1 -1
- package/paginator/typings/paginator.d.ts +3 -2
- 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/progress-bar/typings/progress-bar.d.ts +8 -7
- package/progress-spinner/typings/index.metadata.json +1 -1
- package/progress-spinner/typings/progress-spinner.d.ts +5 -4
- package/radio/typings/index.metadata.json +1 -1
- package/radio/typings/radio.d.ts +10 -4
- package/schematics/ng-add/fonts/material-fonts.js.map +1 -1
- package/schematics/ng-add/fonts/project-index-html.d.ts +1 -1
- package/schematics/ng-add/fonts/project-index-html.js.map +1 -1
- package/schematics/ng-add/gestures/hammerjs-import.js.map +1 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/package-config.js.map +1 -1
- package/schematics/ng-add/schema.js.map +1 -1
- package/schematics/ng-add/setup-project.js.map +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js.map +1 -1
- package/schematics/ng-add/theming/theming.js +1 -1
- package/schematics/ng-add/theming/theming.js.map +1 -1
- package/schematics/ng-add/version-names.d.ts +1 -1
- package/schematics/ng-add/version-names.js +1 -1
- package/schematics/ng-add/version-names.js.map +1 -1
- package/schematics/ng-generate/address-form/index.js.map +1 -1
- package/schematics/ng-generate/address-form/schema.js.map +1 -1
- package/schematics/ng-generate/dashboard/index.js.map +1 -1
- package/schematics/ng-generate/dashboard/schema.js.map +1 -1
- package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +2 -2
- package/schematics/ng-generate/nav/index.js.map +1 -1
- package/schematics/ng-generate/nav/schema.js.map +1 -1
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__-datasource.ts +3 -4
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +2 -2
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +11 -4
- package/schematics/ng-generate/table/index.js.map +1 -1
- package/schematics/ng-generate/table/schema.js.map +1 -1
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/example-data.ts +1 -1
- package/schematics/ng-generate/tree/index.js.map +1 -1
- package/schematics/ng-generate/tree/schema.js.map +1 -1
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.js +1 -1
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.js +22 -14
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/css-selectors.js +2 -2
- package/schematics/ng-update/data/css-selectors.js.map +1 -1
- package/schematics/ng-update/data/element-selectors.js +1 -1
- package/schematics/ng-update/data/element-selectors.js.map +1 -1
- package/schematics/ng-update/data/index.js.map +1 -1
- package/schematics/ng-update/data/input-names.js +7 -7
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/output-names.js +4 -4
- package/schematics/ng-update/data/output-names.js.map +1 -1
- package/schematics/ng-update/data/property-names.js +11 -11
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassInheritanceMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassNamesMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.d.ts +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.js +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/ripple-speed-factor.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/rippleSpeedFactorAssignmentRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/rippleSpeedFactorTemplateRule.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.js +21 -10
- package/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.js.map +1 -1
- package/select/typings/index.metadata.json +1 -1
- package/select/typings/select.d.ts +3 -2
- package/sidenav/typings/drawer.d.ts +8 -11
- package/sidenav/typings/index.metadata.json +1 -1
- package/slide-toggle/typings/index.metadata.json +1 -1
- package/slide-toggle/typings/slide-toggle.d.ts +6 -11
- package/slider/typings/index.metadata.json +1 -1
- package/slider/typings/slider.d.ts +3 -2
- package/sort/typings/index.metadata.json +1 -1
- package/sort/typings/sort-header.d.ts +2 -2
- package/sort/typings/sort.d.ts +3 -2
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/step-header.d.ts +2 -0
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/public-api.d.ts +1 -0
- package/table/typings/text-column.d.ts +19 -0
- package/tabs/typings/index.d.ts +1 -5
- package/tabs/typings/index.metadata.json +1 -1
- package/tabs/typings/tab-group.d.ts +3 -2
- package/tabs/typings/tab-header.d.ts +3 -2
- package/tabs/typings/tab-label-wrapper.d.ts +3 -2
- package/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts +5 -4
- package/tabs/typings/tab.d.ts +3 -2
- package/toolbar/typings/index.metadata.json +1 -1
- package/toolbar/typings/toolbar.d.ts +3 -2
- package/tree/typings/data-source/flat-data-source.d.ts +3 -3
- package/tree/typings/index.metadata.json +1 -1
- package/tree/typings/node.d.ts +3 -2
- package/typings/autocomplete/autocomplete-trigger.d.ts +13 -2
- package/typings/autocomplete/autocomplete.d.ts +3 -2
- package/typings/autocomplete/index.metadata.json +1 -1
- package/typings/badge/badge.d.ts +8 -2
- package/typings/badge/index.metadata.json +1 -1
- package/typings/button/button.d.ts +4 -3
- package/typings/button/index.metadata.json +1 -1
- package/typings/button-toggle/button-toggle.d.ts +7 -3
- package/typings/button-toggle/index.metadata.json +1 -1
- package/typings/checkbox/checkbox-module.d.ts +3 -0
- package/typings/checkbox/checkbox.d.ts +3 -2
- package/typings/checkbox/index.metadata.json +1 -1
- package/typings/chips/chip-list.d.ts +9 -2
- package/typings/chips/chip.d.ts +3 -2
- package/typings/chips/index.metadata.json +1 -1
- package/typings/core/index.metadata.json +1 -1
- package/typings/core/option/optgroup.d.ts +3 -2
- package/typings/core/public-api.d.ts +1 -0
- package/typings/core/ripple/ripple-renderer.d.ts +4 -4
- package/typings/{version.d.ts → core/version.d.ts} +0 -0
- package/typings/datepicker/datepicker.d.ts +3 -2
- package/typings/datepicker/index.d.ts +0 -1
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/datepicker/public-api.d.ts +1 -0
- package/typings/esm5/autocomplete/autocomplete-trigger.d.ts +13 -2
- package/typings/esm5/autocomplete/autocomplete.d.ts +3 -2
- package/typings/esm5/autocomplete/index.metadata.json +1 -1
- package/typings/esm5/badge/badge.d.ts +8 -2
- package/typings/esm5/badge/index.metadata.json +1 -1
- package/typings/esm5/button/button.d.ts +4 -3
- package/typings/esm5/button/index.metadata.json +1 -1
- package/typings/esm5/button-toggle/button-toggle.d.ts +7 -3
- package/typings/esm5/button-toggle/index.metadata.json +1 -1
- package/typings/esm5/checkbox/checkbox-module.d.ts +3 -0
- package/typings/esm5/checkbox/checkbox.d.ts +3 -2
- package/typings/esm5/checkbox/index.metadata.json +1 -1
- package/typings/esm5/chips/chip-list.d.ts +9 -2
- package/typings/esm5/chips/chip.d.ts +3 -2
- package/typings/esm5/chips/index.metadata.json +1 -1
- package/typings/esm5/core/index.metadata.json +1 -1
- package/typings/esm5/core/option/optgroup.d.ts +3 -2
- package/typings/esm5/core/public-api.d.ts +1 -0
- package/typings/esm5/core/ripple/ripple-renderer.d.ts +4 -4
- package/typings/esm5/core/version.d.ts +10 -0
- package/typings/esm5/datepicker/datepicker.d.ts +3 -2
- package/typings/esm5/datepicker/index.d.ts +0 -1
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- package/typings/esm5/datepicker/public-api.d.ts +1 -0
- package/typings/esm5/form-field/form-field.d.ts +9 -3
- 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/icon.d.ts +3 -2
- package/typings/esm5/icon/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/input/index.metadata.json +1 -1
- package/typings/esm5/input/input.d.ts +3 -2
- package/typings/esm5/list/index.metadata.json +1 -1
- package/typings/esm5/list/list.d.ts +5 -4
- package/typings/esm5/list/selection-list.d.ts +7 -4
- package/typings/esm5/menu/index.d.ts +2 -4
- package/typings/esm5/menu/index.metadata.json +1 -1
- package/typings/esm5/menu/menu-item.d.ts +3 -2
- package/typings/esm5/menu/menu-module.d.ts +6 -0
- package/typings/esm5/menu/menu-trigger.d.ts +1 -3
- package/typings/esm5/menu/menu.d.ts +158 -5
- package/typings/esm5/menu/public-api.d.ts +5 -2
- package/typings/esm5/paginator/index.metadata.json +1 -1
- package/typings/esm5/paginator/paginator.d.ts +3 -2
- package/typings/esm5/progress-bar/index.metadata.json +1 -1
- package/typings/esm5/progress-bar/progress-bar.d.ts +8 -7
- package/typings/esm5/progress-spinner/index.metadata.json +1 -1
- package/typings/esm5/progress-spinner/progress-spinner.d.ts +5 -4
- package/typings/esm5/public-api.d.ts +0 -1
- package/typings/esm5/radio/index.metadata.json +1 -1
- package/typings/esm5/radio/radio.d.ts +10 -4
- package/typings/esm5/select/index.metadata.json +1 -1
- package/typings/esm5/select/select.d.ts +3 -2
- package/typings/esm5/sidenav/drawer.d.ts +8 -11
- package/typings/esm5/sidenav/index.metadata.json +1 -1
- package/typings/esm5/slide-toggle/index.metadata.json +1 -1
- package/typings/esm5/slide-toggle/slide-toggle.d.ts +6 -11
- package/typings/esm5/slider/index.metadata.json +1 -1
- package/typings/esm5/slider/slider.d.ts +3 -2
- package/typings/esm5/sort/index.metadata.json +1 -1
- package/typings/esm5/sort/sort-header.d.ts +2 -2
- package/typings/esm5/sort/sort.d.ts +3 -2
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/step-header.d.ts +2 -0
- package/typings/esm5/table/index.metadata.json +1 -1
- package/typings/esm5/table/public-api.d.ts +1 -0
- package/typings/esm5/table/text-column.d.ts +19 -0
- package/typings/esm5/tabs/index.d.ts +1 -5
- package/typings/esm5/tabs/index.metadata.json +1 -1
- package/typings/esm5/tabs/tab-group.d.ts +3 -2
- package/typings/esm5/tabs/tab-header.d.ts +3 -2
- package/typings/esm5/tabs/tab-label-wrapper.d.ts +3 -2
- package/typings/esm5/tabs/tab-nav-bar/tab-nav-bar.d.ts +5 -4
- package/typings/esm5/tabs/tab.d.ts +3 -2
- package/typings/esm5/toolbar/index.metadata.json +1 -1
- package/typings/esm5/toolbar/toolbar.d.ts +3 -2
- package/typings/esm5/tree/data-source/flat-data-source.d.ts +3 -3
- package/typings/esm5/tree/index.metadata.json +1 -1
- package/typings/esm5/tree/node.d.ts +3 -2
- package/typings/form-field/form-field.d.ts +9 -3
- 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/icon.d.ts +3 -2
- package/typings/icon/index.metadata.json +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/input/index.metadata.json +1 -1
- package/typings/input/input.d.ts +3 -2
- package/typings/list/index.metadata.json +1 -1
- package/typings/list/list.d.ts +5 -4
- package/typings/list/selection-list.d.ts +7 -4
- package/typings/menu/index.d.ts +2 -4
- package/typings/menu/index.metadata.json +1 -1
- package/typings/menu/menu-item.d.ts +3 -2
- package/typings/menu/menu-module.d.ts +6 -0
- package/typings/menu/menu-trigger.d.ts +1 -3
- package/typings/menu/menu.d.ts +158 -5
- package/typings/menu/public-api.d.ts +5 -2
- package/typings/paginator/index.metadata.json +1 -1
- package/typings/paginator/paginator.d.ts +3 -2
- package/typings/progress-bar/index.metadata.json +1 -1
- package/typings/progress-bar/progress-bar.d.ts +8 -7
- package/typings/progress-spinner/index.metadata.json +1 -1
- package/typings/progress-spinner/progress-spinner.d.ts +5 -4
- package/typings/public-api.d.ts +0 -1
- package/typings/radio/index.metadata.json +1 -1
- package/typings/radio/radio.d.ts +10 -4
- package/typings/schematics/ng-add/fonts/project-index-html.d.ts +1 -1
- package/typings/schematics/ng-add/version-names.d.ts +1 -1
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.d.ts +1 -1
- package/typings/select/index.metadata.json +1 -1
- package/typings/select/select.d.ts +3 -2
- package/typings/sidenav/drawer.d.ts +8 -11
- package/typings/sidenav/index.metadata.json +1 -1
- package/typings/slide-toggle/index.metadata.json +1 -1
- package/typings/slide-toggle/slide-toggle.d.ts +6 -11
- package/typings/slider/index.metadata.json +1 -1
- package/typings/slider/slider.d.ts +3 -2
- package/typings/sort/index.metadata.json +1 -1
- package/typings/sort/sort-header.d.ts +2 -2
- package/typings/sort/sort.d.ts +3 -2
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/step-header.d.ts +2 -0
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/public-api.d.ts +1 -0
- package/typings/table/text-column.d.ts +19 -0
- package/typings/tabs/index.d.ts +1 -5
- package/typings/tabs/index.metadata.json +1 -1
- package/typings/tabs/tab-group.d.ts +3 -2
- package/typings/tabs/tab-header.d.ts +3 -2
- package/typings/tabs/tab-label-wrapper.d.ts +3 -2
- package/typings/tabs/tab-nav-bar/tab-nav-bar.d.ts +5 -4
- package/typings/tabs/tab.d.ts +3 -2
- package/typings/toolbar/index.metadata.json +1 -1
- package/typings/toolbar/toolbar.d.ts +3 -2
- package/typings/tree/data-source/flat-data-source.d.ts +3 -3
- package/typings/tree/index.metadata.json +1 -1
- package/typings/tree/node.d.ts +3 -2
- package/menu/typings/menu-directive.d.ts +0 -159
- package/typings/esm5/menu/menu-directive.d.ts +0 -159
- package/typings/menu/menu-directive.d.ts +0 -159
package/esm2015/input.js
CHANGED
|
@@ -17,7 +17,7 @@ import { CommonModule } from '@angular/common';
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @fileoverview added by tsickle
|
|
20
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
20
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
23
|
* Directive to automatically resize a textarea to fit its content.
|
|
@@ -85,7 +85,7 @@ MatTextareaAutosize.propDecorators = {
|
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* @fileoverview added by tsickle
|
|
88
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
88
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
89
89
|
*/
|
|
90
90
|
|
|
91
91
|
/**
|
|
@@ -99,7 +99,7 @@ function getMatInputUnsupportedTypeError(type) {
|
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* @fileoverview added by tsickle
|
|
102
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
102
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
103
103
|
*/
|
|
104
104
|
/**
|
|
105
105
|
* This token is used to inject the object whose value should be set into `MatInput`. If none is
|
|
@@ -112,7 +112,7 @@ const MAT_INPUT_VALUE_ACCESSOR = new InjectionToken('MAT_INPUT_VALUE_ACCESSOR');
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* @fileoverview added by tsickle
|
|
115
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
115
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
116
116
|
*/
|
|
117
117
|
// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.
|
|
118
118
|
/** @type {?} */
|
|
@@ -210,7 +210,11 @@ class MatInput extends _MatInputMixinBase {
|
|
|
210
210
|
'month',
|
|
211
211
|
'time',
|
|
212
212
|
'week'
|
|
213
|
-
].filter(
|
|
213
|
+
].filter((/**
|
|
214
|
+
* @param {?} t
|
|
215
|
+
* @return {?}
|
|
216
|
+
*/
|
|
217
|
+
t => getSupportedInputTypes().has(t)));
|
|
214
218
|
/** @type {?} */
|
|
215
219
|
const element = this._elementRef.nativeElement;
|
|
216
220
|
// If no input value accessor was explicitly specified, use the element as the input value
|
|
@@ -223,8 +227,15 @@ class MatInput extends _MatInputMixinBase {
|
|
|
223
227
|
// key. In order to get around this we need to "jiggle" the caret loose. Since this bug only
|
|
224
228
|
// exists on iOS, we only bother to install the listener on iOS.
|
|
225
229
|
if (_platform.IOS) {
|
|
226
|
-
ngZone.runOutsideAngular((
|
|
227
|
-
|
|
230
|
+
ngZone.runOutsideAngular((/**
|
|
231
|
+
* @return {?}
|
|
232
|
+
*/
|
|
233
|
+
() => {
|
|
234
|
+
_elementRef.nativeElement.addEventListener('keyup', (/**
|
|
235
|
+
* @param {?} event
|
|
236
|
+
* @return {?}
|
|
237
|
+
*/
|
|
238
|
+
(event) => {
|
|
228
239
|
/** @type {?} */
|
|
229
240
|
let el = (/** @type {?} */ (event.target));
|
|
230
241
|
if (!el.value && !el.selectionStart && !el.selectionEnd) {
|
|
@@ -235,8 +246,8 @@ class MatInput extends _MatInputMixinBase {
|
|
|
235
246
|
el.setSelectionRange(1, 1);
|
|
236
247
|
el.setSelectionRange(0, 0);
|
|
237
248
|
}
|
|
238
|
-
});
|
|
239
|
-
});
|
|
249
|
+
}));
|
|
250
|
+
}));
|
|
240
251
|
}
|
|
241
252
|
this._isServer = !this._platform.isBrowser;
|
|
242
253
|
this._isNativeSelect = element.nodeName.toLowerCase() === 'select';
|
|
@@ -341,10 +352,14 @@ class MatInput extends _MatInputMixinBase {
|
|
|
341
352
|
*/
|
|
342
353
|
ngOnInit() {
|
|
343
354
|
if (this._platform.isBrowser) {
|
|
344
|
-
this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(
|
|
355
|
+
this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe((/**
|
|
356
|
+
* @param {?} event
|
|
357
|
+
* @return {?}
|
|
358
|
+
*/
|
|
359
|
+
event => {
|
|
345
360
|
this.autofilled = event.isAutofilled;
|
|
346
361
|
this.stateChanges.next();
|
|
347
|
-
});
|
|
362
|
+
}));
|
|
348
363
|
}
|
|
349
364
|
}
|
|
350
365
|
/**
|
|
@@ -506,7 +521,7 @@ class MatInput extends _MatInputMixinBase {
|
|
|
506
521
|
onContainerClick() {
|
|
507
522
|
// Do not re-focus the input element if the element is already focused. Otherwise it can happen
|
|
508
523
|
// that someone clicks on a time input and the cursor resets to the "hours" field while the
|
|
509
|
-
// "minutes" field was actually clicked. See: https://github.com/angular/
|
|
524
|
+
// "minutes" field was actually clicked. See: https://github.com/angular/components/issues/12849
|
|
510
525
|
if (!this.focused) {
|
|
511
526
|
this.focus();
|
|
512
527
|
}
|
|
@@ -565,7 +580,7 @@ MatInput.propDecorators = {
|
|
|
565
580
|
|
|
566
581
|
/**
|
|
567
582
|
* @fileoverview added by tsickle
|
|
568
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
583
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
569
584
|
*/
|
|
570
585
|
class MatInputModule {
|
|
571
586
|
}
|
|
@@ -591,13 +606,13 @@ MatInputModule.decorators = [
|
|
|
591
606
|
|
|
592
607
|
/**
|
|
593
608
|
* @fileoverview added by tsickle
|
|
594
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
609
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
595
610
|
*/
|
|
596
611
|
|
|
597
612
|
/**
|
|
598
613
|
* @fileoverview added by tsickle
|
|
599
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
614
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
600
615
|
*/
|
|
601
616
|
|
|
602
|
-
export { MatTextareaAutosize,
|
|
617
|
+
export { MatTextareaAutosize, MatInput, getMatInputUnsupportedTypeError, MatInputModule, MAT_INPUT_VALUE_ACCESSOR };
|
|
603
618
|
//# sourceMappingURL=input.js.map
|
package/esm2015/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../../src/lib/input/input-module.ts","../../../src/lib/input/input.ts","../../../src/lib/input/input-value-accessor.ts","../../../src/lib/input/input-errors.ts","../../../src/lib/input/autosize.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 {TextFieldModule} from '@angular/cdk/text-field';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {ErrorStateMatcher} from '@angular/material/core';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatTextareaAutosize} from './autosize';\nimport {MatInput} from './input';\n\n\n@NgModule({\n declarations: [MatInput, MatTextareaAutosize],\n imports: [\n CommonModule,\n TextFieldModule,\n MatFormFieldModule,\n ],\n exports: [\n TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput,\n MatTextareaAutosize,\n ],\n providers: [ErrorStateMatcher],\n})\nexport class MatInputModule {}\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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {getSupportedInputTypes, Platform} from '@angular/cdk/platform';\nimport {AutofillMonitor} from '@angular/cdk/text-field';\nimport {\n Directive,\n DoCheck,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n} from '@angular/core';\nimport {FormGroupDirective, NgControl, NgForm} from '@angular/forms';\nimport {\n CanUpdateErrorState,\n CanUpdateErrorStateCtor,\n ErrorStateMatcher,\n mixinErrorState,\n} from '@angular/material/core';\nimport {MatFormFieldControl} from '@angular/material/form-field';\nimport {Subject} from 'rxjs';\nimport {getMatInputUnsupportedTypeError} from './input-errors';\nimport {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor';\n\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit'\n];\n\nlet nextUniqueId = 0;\n\n// Boilerplate for applying mixins to MatInput.\n/** @docs-private */\nexport class MatInputBase {\n constructor(public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n /** @docs-private */\n public ngControl: NgControl) {}\n}\nexport const _MatInputMixinBase: CanUpdateErrorStateCtor & typeof MatInputBase =\n mixinErrorState(MatInputBase);\n\n/** Directive that allows a native input to work inside a `MatFormField`. */\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n /**\n * @breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.\n */\n 'class': 'mat-input-element mat-form-field-autofill-control',\n '[class.mat-input-server]': '_isServer',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n '[attr.placeholder]': 'placeholder',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n '[attr.aria-describedby]': '_ariaDescribedby || null',\n '[attr.aria-invalid]': 'errorState',\n '[attr.aria-required]': 'required.toString()',\n '(blur)': '_focusChanged(false)',\n '(focus)': '_focusChanged(true)',\n '(input)': '_onInput()',\n },\n providers: [{provide: MatFormFieldControl, useExisting: MatInput}],\n})\nexport class MatInput extends _MatInputMixinBase implements MatFormFieldControl<any>, OnChanges,\n OnDestroy, OnInit, DoCheck, CanUpdateErrorState {\n protected _uid = `mat-input-${nextUniqueId++}`;\n protected _previousNativeValue: any;\n private _inputValueAccessor: {value: any};\n /** The aria-describedby attribute on the input for improved a11y. */\n _ariaDescribedby: string;\n\n /** Whether the component is being rendered on the server. */\n _isServer = false;\n\n /** Whether the component is a native html select. */\n _isNativeSelect = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n controlType: string = 'mat-input';\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n autofilled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get id(): string { return this._id; }\n set id(value: string) { this._id = value || this._uid; }\n protected _id: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() placeholder: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n protected _required = false;\n\n /** Input type of the element. */\n @Input()\n get type(): string { return this._type; }\n set type(value: string) {\n this._type = value || 'text';\n this._validateType();\n\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea() && getSupportedInputTypes().has(this._type)) {\n (this._elementRef.nativeElement as HTMLInputElement).type = this._type;\n }\n }\n protected _type = 'text';\n\n /** An object used to control when error messages are shown. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get value(): string { return this._inputValueAccessor.value; }\n set value(value: string) {\n if (value !== this.value) {\n this._inputValueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean { return this._readonly; }\n set readonly(value: boolean) { this._readonly = coerceBooleanProperty(value); }\n private _readonly = false;\n\n protected _neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week'\n ].filter(t => getSupportedInputTypes().has(t));\n\n constructor(\n protected _elementRef: ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>,\n protected _platform: Platform,\n /** @docs-private */\n @Optional() @Self() public ngControl: NgControl,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n @Optional() @Self() @Inject(MAT_INPUT_VALUE_ACCESSOR) inputValueAccessor: any,\n private _autofillMonitor: AutofillMonitor,\n ngZone: NgZone) {\n\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n\n const element = this._elementRef.nativeElement;\n\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = inputValueAccessor || element;\n\n this._previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (_platform.IOS) {\n ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keyup', (event: Event) => {\n let el = event.target as HTMLInputElement;\n if (!el.value && !el.selectionStart && !el.selectionEnd) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n });\n });\n }\n\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = element.nodeName.toLowerCase() === 'select';\n\n if (this._isNativeSelect) {\n this.controlType = (element as HTMLSelectElement).multiple ? 'mat-native-select-multiple' :\n 'mat-native-select';\n }\n }\n\n ngOnInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n }\n\n /** Focuses the input. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n /** Callback for the cases where the focused state of the input changes. */\n _focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n\n /** Does some manual dirty checking on the native input `value` property. */\n protected _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Make sure the input is a supported type. */\n protected _validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n\n /** Checks whether the input type is one of the types that are never empty. */\n protected _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n\n /** Checks whether the input is invalid based on the native validation. */\n protected _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = (this._elementRef.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n /** Determines if the component host is a textarea. */\n protected _isTextarea() {\n return this._elementRef.nativeElement.nodeName.toLowerCase() === 'textarea';\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() &&\n !this.autofilled;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement as HTMLSelectElement;\n const firstOption: HTMLOptionElement | undefined = selectElement.options[0];\n\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return this.focused || selectElement.multiple || !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label);\n } else {\n return this.focused || !this.empty;\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/material2/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n}\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 {InjectionToken} from '@angular/core';\n\n\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nexport const MAT_INPUT_VALUE_ACCESSOR =\n new InjectionToken<{value: any}>('MAT_INPUT_VALUE_ACCESSOR');\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\n/** @docs-private */\nexport function getMatInputUnsupportedTypeError(type: string): Error {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\n}\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 {CdkTextareaAutosize} from '@angular/cdk/text-field';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Directive to automatically resize a textarea to fit its content.\n * @deprecated Use `cdkTextareaAutosize` from `@angular/cdk/text-field` instead.\n * @breaking-change 8.0.0\n */\n@Directive({\n selector: 'textarea[mat-autosize], textarea[matTextareaAutosize]',\n exportAs: 'matTextareaAutosize',\n inputs: ['cdkAutosizeMinRows', 'cdkAutosizeMaxRows'],\n host: {\n 'class': 'cdk-textarea-autosize mat-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class MatTextareaAutosize extends CdkTextareaAutosize {\n @Input()\n get matAutosizeMinRows(): number { return this.minRows; }\n set matAutosizeMinRows(value: number) { this.minRows = value; }\n\n @Input()\n get matAutosizeMaxRows(): number { return this.maxRows; }\n set matAutosizeMaxRows(value: number) { this.maxRows = value; }\n\n @Input('mat-autosize')\n get matAutosize(): boolean { return this.enabled; }\n set matAutosize(value: boolean) { this.enabled = value; }\n\n @Input()\n get matTextareaAutosize(): boolean { return this.enabled; }\n set matTextareaAutosize(value: boolean) { this.enabled = value; }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AI4BA,AAAA,MAAa,mBAAoB,SAAQ,mBAAmB,CAA5D;;;;IACE,IACI,kBAAkB,GADxB,EACqC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;;;;;IACzD,IAAI,kBAAkB,CAAC,KAAa,EAAtC,EAA0C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;;IAE/D,IACI,kBAAkB,GADxB,EACqC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;;;;;IACzD,IAAI,kBAAkB,CAAC,KAAa,EAAtC,EAA0C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;;IAE/D,IACI,WAAW,GADjB,EAC+B,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;;;;;IACnD,IAAI,WAAW,CAAC,KAAc,EAAhC,EAAoC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;;IAEzD,IACI,mBAAmB,GADzB,EACuC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;;;;;IAC3D,IAAI,mBAAmB,CAAC,KAAc,EAAxC,EAA4C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;IA3BnE,EAAA,IAAA,EAAC,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R,CAAA;IAMA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;IAMA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;IAgBA,iBAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;IAMA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;IAUA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;;;;;;;AD/KA,MAAa,cAAc,CAA3B;;;IAjBA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,YAAY,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC;gBAC7C,OAAO,EAAE;oBACP,YAAY;oBACZ,eAAe;oBACf,kBAAkB;iBACnB;gBACD,OAAO,EAAE;oBACP,eAAe;;;oBAGf,kBAAkB;oBAClB,QAAQ;oBACR,mBAAmB;iBACpB;gBACD,SAAS,EAAE,CAAC,iBAAiB,CAAC;aAC/B,EAAD,EAAA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../src/material/input/input-module.ts","../../../src/material/input/input.ts","../../../src/material/input/input-value-accessor.ts","../../../src/material/input/input-errors.ts","../../../src/material/input/autosize.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 {TextFieldModule} from '@angular/cdk/text-field';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {ErrorStateMatcher} from '@angular/material/core';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatTextareaAutosize} from './autosize';\nimport {MatInput} from './input';\n\n\n@NgModule({\n declarations: [MatInput, MatTextareaAutosize],\n imports: [\n CommonModule,\n TextFieldModule,\n MatFormFieldModule,\n ],\n exports: [\n TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput,\n MatTextareaAutosize,\n ],\n providers: [ErrorStateMatcher],\n})\nexport class MatInputModule {}\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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {getSupportedInputTypes, Platform} from '@angular/cdk/platform';\nimport {AutofillMonitor} from '@angular/cdk/text-field';\nimport {\n Directive,\n DoCheck,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n} from '@angular/core';\nimport {FormGroupDirective, NgControl, NgForm} from '@angular/forms';\nimport {\n CanUpdateErrorState,\n CanUpdateErrorStateCtor,\n ErrorStateMatcher,\n mixinErrorState,\n} from '@angular/material/core';\nimport {MatFormFieldControl} from '@angular/material/form-field';\nimport {Subject} from 'rxjs';\nimport {getMatInputUnsupportedTypeError} from './input-errors';\nimport {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor';\n\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit'\n];\n\nlet nextUniqueId = 0;\n\n// Boilerplate for applying mixins to MatInput.\n/** @docs-private */\nclass MatInputBase {\n constructor(public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n /** @docs-private */\n public ngControl: NgControl) {}\n}\nconst _MatInputMixinBase: CanUpdateErrorStateCtor & typeof MatInputBase =\n mixinErrorState(MatInputBase);\n\n/** Directive that allows a native input to work inside a `MatFormField`. */\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n /**\n * @breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.\n */\n 'class': 'mat-input-element mat-form-field-autofill-control',\n '[class.mat-input-server]': '_isServer',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n '[attr.placeholder]': 'placeholder',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n '[attr.aria-describedby]': '_ariaDescribedby || null',\n '[attr.aria-invalid]': 'errorState',\n '[attr.aria-required]': 'required.toString()',\n '(blur)': '_focusChanged(false)',\n '(focus)': '_focusChanged(true)',\n '(input)': '_onInput()',\n },\n providers: [{provide: MatFormFieldControl, useExisting: MatInput}],\n})\nexport class MatInput extends _MatInputMixinBase implements MatFormFieldControl<any>, OnChanges,\n OnDestroy, OnInit, DoCheck, CanUpdateErrorState {\n protected _uid = `mat-input-${nextUniqueId++}`;\n protected _previousNativeValue: any;\n private _inputValueAccessor: {value: any};\n /** The aria-describedby attribute on the input for improved a11y. */\n _ariaDescribedby: string;\n\n /** Whether the component is being rendered on the server. */\n _isServer = false;\n\n /** Whether the component is a native html select. */\n _isNativeSelect = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n controlType: string = 'mat-input';\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n autofilled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get id(): string { return this._id; }\n set id(value: string) { this._id = value || this._uid; }\n protected _id: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() placeholder: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n protected _required = false;\n\n /** Input type of the element. */\n @Input()\n get type(): string { return this._type; }\n set type(value: string) {\n this._type = value || 'text';\n this._validateType();\n\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea() && getSupportedInputTypes().has(this._type)) {\n (this._elementRef.nativeElement as HTMLInputElement).type = this._type;\n }\n }\n protected _type = 'text';\n\n /** An object used to control when error messages are shown. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get value(): string { return this._inputValueAccessor.value; }\n set value(value: string) {\n if (value !== this.value) {\n this._inputValueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean { return this._readonly; }\n set readonly(value: boolean) { this._readonly = coerceBooleanProperty(value); }\n private _readonly = false;\n\n protected _neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week'\n ].filter(t => getSupportedInputTypes().has(t));\n\n constructor(\n protected _elementRef: ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>,\n protected _platform: Platform,\n /** @docs-private */\n @Optional() @Self() public ngControl: NgControl,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n @Optional() @Self() @Inject(MAT_INPUT_VALUE_ACCESSOR) inputValueAccessor: any,\n private _autofillMonitor: AutofillMonitor,\n ngZone: NgZone) {\n\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n\n const element = this._elementRef.nativeElement;\n\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = inputValueAccessor || element;\n\n this._previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (_platform.IOS) {\n ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keyup', (event: Event) => {\n let el = event.target as HTMLInputElement;\n if (!el.value && !el.selectionStart && !el.selectionEnd) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n });\n });\n }\n\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = element.nodeName.toLowerCase() === 'select';\n\n if (this._isNativeSelect) {\n this.controlType = (element as HTMLSelectElement).multiple ? 'mat-native-select-multiple' :\n 'mat-native-select';\n }\n }\n\n ngOnInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n }\n\n /** Focuses the input. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n /** Callback for the cases where the focused state of the input changes. */\n _focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n\n /** Does some manual dirty checking on the native input `value` property. */\n protected _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Make sure the input is a supported type. */\n protected _validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n\n /** Checks whether the input type is one of the types that are never empty. */\n protected _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n\n /** Checks whether the input is invalid based on the native validation. */\n protected _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = (this._elementRef.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n /** Determines if the component host is a textarea. */\n protected _isTextarea() {\n return this._elementRef.nativeElement.nodeName.toLowerCase() === 'textarea';\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() &&\n !this.autofilled;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement as HTMLSelectElement;\n const firstOption: HTMLOptionElement | undefined = selectElement.options[0];\n\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return this.focused || selectElement.multiple || !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label);\n } else {\n return this.focused || !this.empty;\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n}\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 {InjectionToken} from '@angular/core';\n\n\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nexport const MAT_INPUT_VALUE_ACCESSOR =\n new InjectionToken<{value: any}>('MAT_INPUT_VALUE_ACCESSOR');\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\n/** @docs-private */\nexport function getMatInputUnsupportedTypeError(type: string): Error {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\n}\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 {CdkTextareaAutosize} from '@angular/cdk/text-field';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Directive to automatically resize a textarea to fit its content.\n * @deprecated Use `cdkTextareaAutosize` from `@angular/cdk/text-field` instead.\n * @breaking-change 8.0.0\n */\n@Directive({\n selector: 'textarea[mat-autosize], textarea[matTextareaAutosize]',\n exportAs: 'matTextareaAutosize',\n inputs: ['cdkAutosizeMinRows', 'cdkAutosizeMaxRows'],\n host: {\n 'class': 'cdk-textarea-autosize mat-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class MatTextareaAutosize extends CdkTextareaAutosize {\n @Input()\n get matAutosizeMinRows(): number { return this.minRows; }\n set matAutosizeMinRows(value: number) { this.minRows = value; }\n\n @Input()\n get matAutosizeMaxRows(): number { return this.maxRows; }\n set matAutosizeMaxRows(value: number) { this.maxRows = value; }\n\n @Input('mat-autosize')\n get matAutosize(): boolean { return this.enabled; }\n set matAutosize(value: boolean) { this.enabled = value; }\n\n @Input()\n get matTextareaAutosize(): boolean { return this.enabled; }\n set matTextareaAutosize(value: boolean) { this.enabled = value; }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AI4BA,AAAA,MAAa,mBAAoB,SAAQ,mBAAmB,CAA5D;;;;IACE,IACI,kBAAkB,GADxB,EACqC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;;;;;IACzD,IAAI,kBAAkB,CAAC,KAAa,EAAtC,EAA0C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;;IAE/D,IACI,kBAAkB,GADxB,EACqC,OAAO,I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material/divider';
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @fileoverview added by tsickle
|
|
22
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
22
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
23
23
|
*/
|
|
24
24
|
// Boilerplate for applying mixins to MatList.
|
|
25
25
|
/**
|
|
@@ -194,9 +194,12 @@ class MatListItem extends _MatListItemMixinBase {
|
|
|
194
194
|
if (this._list) {
|
|
195
195
|
// React to changes in the state of the parent list since
|
|
196
196
|
// some of the item's properties depend on it (e.g. `disableRipple`).
|
|
197
|
-
this._list._stateChanges.pipe(takeUntil(this._destroyed)).subscribe((
|
|
197
|
+
this._list._stateChanges.pipe(takeUntil(this._destroyed)).subscribe((/**
|
|
198
|
+
* @return {?}
|
|
199
|
+
*/
|
|
200
|
+
() => {
|
|
198
201
|
_changeDetectorRef.markForCheck();
|
|
199
|
-
});
|
|
202
|
+
}));
|
|
200
203
|
}
|
|
201
204
|
}
|
|
202
205
|
/**
|
|
@@ -258,7 +261,7 @@ MatListItem.propDecorators = {
|
|
|
258
261
|
|
|
259
262
|
/**
|
|
260
263
|
* @fileoverview added by tsickle
|
|
261
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
264
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
262
265
|
*/
|
|
263
266
|
/**
|
|
264
267
|
* \@docs-private
|
|
@@ -280,7 +283,10 @@ const _MatListOptionMixinBase = mixinDisableRipple(MatListOptionBase);
|
|
|
280
283
|
*/
|
|
281
284
|
const MAT_SELECTION_LIST_VALUE_ACCESSOR = {
|
|
282
285
|
provide: NG_VALUE_ACCESSOR,
|
|
283
|
-
useExisting: forwardRef((
|
|
286
|
+
useExisting: forwardRef((/**
|
|
287
|
+
* @return {?}
|
|
288
|
+
*/
|
|
289
|
+
() => MatSelectionList)),
|
|
284
290
|
multi: true
|
|
285
291
|
};
|
|
286
292
|
/**
|
|
@@ -390,12 +396,15 @@ class MatListOption extends _MatListOptionMixinBase {
|
|
|
390
396
|
// that the form control value is not being overwritten.
|
|
391
397
|
/** @type {?} */
|
|
392
398
|
const wasSelected = this._selected;
|
|
393
|
-
Promise.resolve().then((
|
|
399
|
+
Promise.resolve().then((/**
|
|
400
|
+
* @return {?}
|
|
401
|
+
*/
|
|
402
|
+
() => {
|
|
394
403
|
if (this._selected || wasSelected) {
|
|
395
404
|
this.selected = true;
|
|
396
405
|
this._changeDetector.markForCheck();
|
|
397
406
|
}
|
|
398
|
-
});
|
|
407
|
+
}));
|
|
399
408
|
}
|
|
400
409
|
/**
|
|
401
410
|
* @return {?}
|
|
@@ -410,7 +419,12 @@ class MatListOption extends _MatListOptionMixinBase {
|
|
|
410
419
|
if (this.selected) {
|
|
411
420
|
// We have to delay this until the next tick in order
|
|
412
421
|
// to avoid changed after checked errors.
|
|
413
|
-
Promise.resolve().then((
|
|
422
|
+
Promise.resolve().then((/**
|
|
423
|
+
* @return {?}
|
|
424
|
+
*/
|
|
425
|
+
() => {
|
|
426
|
+
this.selected = false;
|
|
427
|
+
}));
|
|
414
428
|
}
|
|
415
429
|
/** @type {?} */
|
|
416
430
|
const hadFocus = this._hasFocus;
|
|
@@ -540,7 +554,10 @@ MatListOption.decorators = [
|
|
|
540
554
|
MatListOption.ctorParameters = () => [
|
|
541
555
|
{ type: ElementRef },
|
|
542
556
|
{ type: ChangeDetectorRef },
|
|
543
|
-
{ type: MatSelectionList, decorators: [{ type: Inject, args: [forwardRef((
|
|
557
|
+
{ type: MatSelectionList, decorators: [{ type: Inject, args: [forwardRef((/**
|
|
558
|
+
* @return {?}
|
|
559
|
+
*/
|
|
560
|
+
() => MatSelectionList)),] }] }
|
|
544
561
|
];
|
|
545
562
|
MatListOption.propDecorators = {
|
|
546
563
|
_avatar: [{ type: ContentChild, args: [MatListAvatarCssMatStyler, { static: false },] }],
|
|
@@ -584,7 +601,11 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
584
601
|
/**
|
|
585
602
|
* View to model callback that should be called whenever the selected options change.
|
|
586
603
|
*/
|
|
587
|
-
this._onChange = (
|
|
604
|
+
this._onChange = (/**
|
|
605
|
+
* @param {?} _
|
|
606
|
+
* @return {?}
|
|
607
|
+
*/
|
|
608
|
+
(_) => { });
|
|
588
609
|
/**
|
|
589
610
|
* Subscription to sync value changes in the SelectionModel back to the SelectionList.
|
|
590
611
|
*/
|
|
@@ -592,7 +613,10 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
592
613
|
/**
|
|
593
614
|
* View to model callback that should be called if the list or its options lost focus.
|
|
594
615
|
*/
|
|
595
|
-
this._onTouched = (
|
|
616
|
+
this._onTouched = (/**
|
|
617
|
+
* @return {?}
|
|
618
|
+
*/
|
|
619
|
+
() => { });
|
|
596
620
|
this.tabIndex = parseInt(tabIndex) || 0;
|
|
597
621
|
}
|
|
598
622
|
/**
|
|
@@ -621,14 +645,21 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
621
645
|
.withTypeAhead()
|
|
622
646
|
// Allow disabled items to be focusable. For accessibility reasons, there must be a way for
|
|
623
647
|
// screenreader users, that allows reading the different options of the list.
|
|
624
|
-
.skipPredicate((
|
|
648
|
+
.skipPredicate((/**
|
|
649
|
+
* @return {?}
|
|
650
|
+
*/
|
|
651
|
+
() => false))
|
|
625
652
|
.withAllowedModifierKeys(['shiftKey']);
|
|
626
653
|
if (this._tempValues) {
|
|
627
654
|
this._setOptionsFromValues(this._tempValues);
|
|
628
655
|
this._tempValues = null;
|
|
629
656
|
}
|
|
630
657
|
// Sync external changes to the model back to the options.
|
|
631
|
-
this._modelChanges = this.selectedOptions.onChange.subscribe(
|
|
658
|
+
this._modelChanges = this.selectedOptions.onChange.subscribe((/**
|
|
659
|
+
* @param {?} event
|
|
660
|
+
* @return {?}
|
|
661
|
+
*/
|
|
662
|
+
event => {
|
|
632
663
|
if (event.added) {
|
|
633
664
|
for (let item of event.added) {
|
|
634
665
|
item.selected = true;
|
|
@@ -639,7 +670,7 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
639
670
|
item.selected = false;
|
|
640
671
|
}
|
|
641
672
|
}
|
|
642
|
-
});
|
|
673
|
+
}));
|
|
643
674
|
}
|
|
644
675
|
/**
|
|
645
676
|
* @param {?} changes
|
|
@@ -659,6 +690,7 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
659
690
|
* @return {?}
|
|
660
691
|
*/
|
|
661
692
|
ngOnDestroy() {
|
|
693
|
+
this._destroyed = true;
|
|
662
694
|
this._modelChanges.unsubscribe();
|
|
663
695
|
}
|
|
664
696
|
/**
|
|
@@ -741,7 +773,11 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
741
773
|
break;
|
|
742
774
|
case A:
|
|
743
775
|
if (hasModifierKey(event, 'ctrlKey')) {
|
|
744
|
-
this.options.find(
|
|
776
|
+
this.options.find((/**
|
|
777
|
+
* @param {?} option
|
|
778
|
+
* @return {?}
|
|
779
|
+
*/
|
|
780
|
+
option => !option.selected)) ? this.selectAll() : this.deselectAll();
|
|
745
781
|
event.preventDefault();
|
|
746
782
|
}
|
|
747
783
|
break;
|
|
@@ -758,7 +794,10 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
758
794
|
* @return {?}
|
|
759
795
|
*/
|
|
760
796
|
_reportValueChange() {
|
|
761
|
-
|
|
797
|
+
// Stop reporting value changes after the list has been destroyed. This avoids
|
|
798
|
+
// cases where the list might wrongly reset its value once it is removed, but
|
|
799
|
+
// the form control is still live.
|
|
800
|
+
if (this.options && !this._destroyed) {
|
|
762
801
|
this._onChange(this._getSelectedOptionValues());
|
|
763
802
|
}
|
|
764
803
|
}
|
|
@@ -814,21 +853,33 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
814
853
|
* @return {?}
|
|
815
854
|
*/
|
|
816
855
|
_setOptionsFromValues(values) {
|
|
817
|
-
this.options.forEach(
|
|
818
|
-
|
|
856
|
+
this.options.forEach((/**
|
|
857
|
+
* @param {?} option
|
|
858
|
+
* @return {?}
|
|
859
|
+
*/
|
|
860
|
+
option => option._setSelected(false)));
|
|
861
|
+
values.forEach((/**
|
|
862
|
+
* @param {?} value
|
|
863
|
+
* @return {?}
|
|
864
|
+
*/
|
|
865
|
+
value => {
|
|
819
866
|
/** @type {?} */
|
|
820
|
-
const correspondingOption = this.options.find(
|
|
867
|
+
const correspondingOption = this.options.find((/**
|
|
868
|
+
* @param {?} option
|
|
869
|
+
* @return {?}
|
|
870
|
+
*/
|
|
871
|
+
option => {
|
|
821
872
|
// Skip options that are already in the model. This allows us to handle cases
|
|
822
873
|
// where the same primitive value is selected multiple times.
|
|
823
874
|
if (option.selected) {
|
|
824
875
|
return false;
|
|
825
876
|
}
|
|
826
877
|
return this.compareWith ? this.compareWith(option.value, value) : option.value === value;
|
|
827
|
-
});
|
|
878
|
+
}));
|
|
828
879
|
if (correspondingOption) {
|
|
829
880
|
correspondingOption._setSelected(true);
|
|
830
881
|
}
|
|
831
|
-
});
|
|
882
|
+
}));
|
|
832
883
|
}
|
|
833
884
|
/**
|
|
834
885
|
* Returns the values of the selected options.
|
|
@@ -836,7 +887,15 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
836
887
|
* @return {?}
|
|
837
888
|
*/
|
|
838
889
|
_getSelectedOptionValues() {
|
|
839
|
-
return this.options.filter(
|
|
890
|
+
return this.options.filter((/**
|
|
891
|
+
* @param {?} option
|
|
892
|
+
* @return {?}
|
|
893
|
+
*/
|
|
894
|
+
option => option.selected)).map((/**
|
|
895
|
+
* @param {?} option
|
|
896
|
+
* @return {?}
|
|
897
|
+
*/
|
|
898
|
+
option => option.value));
|
|
840
899
|
}
|
|
841
900
|
/**
|
|
842
901
|
* Toggles the state of the currently focused option if enabled.
|
|
@@ -869,11 +928,15 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
869
928
|
// emit the changed event when something actually changed.
|
|
870
929
|
/** @type {?} */
|
|
871
930
|
let hasChanged = false;
|
|
872
|
-
this.options.forEach(
|
|
931
|
+
this.options.forEach((/**
|
|
932
|
+
* @param {?} option
|
|
933
|
+
* @return {?}
|
|
934
|
+
*/
|
|
935
|
+
option => {
|
|
873
936
|
if (option._setSelected(isSelected)) {
|
|
874
937
|
hasChanged = true;
|
|
875
938
|
}
|
|
876
|
-
});
|
|
939
|
+
}));
|
|
877
940
|
if (hasChanged) {
|
|
878
941
|
this._reportValueChange();
|
|
879
942
|
}
|
|
@@ -903,7 +966,11 @@ class MatSelectionList extends _MatSelectionListMixinBase {
|
|
|
903
966
|
*/
|
|
904
967
|
_markOptionsForCheck() {
|
|
905
968
|
if (this.options) {
|
|
906
|
-
this.options.forEach(
|
|
969
|
+
this.options.forEach((/**
|
|
970
|
+
* @param {?} option
|
|
971
|
+
* @return {?}
|
|
972
|
+
*/
|
|
973
|
+
option => option._markForCheck()));
|
|
907
974
|
}
|
|
908
975
|
}
|
|
909
976
|
}
|
|
@@ -943,7 +1010,7 @@ MatSelectionList.propDecorators = {
|
|
|
943
1010
|
|
|
944
1011
|
/**
|
|
945
1012
|
* @fileoverview added by tsickle
|
|
946
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1013
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
947
1014
|
*/
|
|
948
1015
|
class MatListModule {
|
|
949
1016
|
}
|
|
@@ -979,13 +1046,13 @@ MatListModule.decorators = [
|
|
|
979
1046
|
|
|
980
1047
|
/**
|
|
981
1048
|
* @fileoverview added by tsickle
|
|
982
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1049
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
983
1050
|
*/
|
|
984
1051
|
|
|
985
1052
|
/**
|
|
986
1053
|
* @fileoverview added by tsickle
|
|
987
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1054
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
988
1055
|
*/
|
|
989
1056
|
|
|
990
|
-
export { MatListModule,
|
|
1057
|
+
export { MatListModule, MatNavList, MatList, MatListAvatarCssMatStyler, MatListIconCssMatStyler, MatListSubheaderCssMatStyler, MatListItem, MAT_SELECTION_LIST_VALUE_ACCESSOR, MatSelectionListChange, MatListOption, MatSelectionList };
|
|
991
1058
|
//# sourceMappingURL=list.js.map
|