@angular/material 14.0.0-next.2 → 14.0.0-next.5
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/autocomplete/autocomplete-trigger.d.ts +14 -3
- package/autocomplete/autocomplete.d.ts +7 -1
- package/button-toggle/_button-toggle-theme.scss +14 -2
- package/checkbox/_checkbox-theme.scss +7 -1
- package/chips/chip-list.d.ts +20 -5
- package/chips/chip.d.ts +3 -1
- package/core/common-behaviors/error-state.d.ts +1 -2
- package/core/datetime/index.d.ts +1 -2
- package/core/ripple/index.d.ts +1 -2
- package/core/ripple/ripple-ref.d.ts +2 -1
- package/core/ripple/ripple-renderer.d.ts +9 -2
- package/core/theming/_theming.scss +9 -0
- package/datepicker/calendar-body.d.ts +12 -3
- package/datepicker/date-range-input-parts.d.ts +4 -1
- package/datepicker/month-view.d.ts +18 -0
- package/datepicker/multi-year-view.d.ts +18 -0
- package/datepicker/year-view.d.ts +18 -0
- package/dialog/dialog-content-directives.d.ts +5 -1
- package/esm2020/autocomplete/autocomplete-module.mjs +5 -5
- package/esm2020/autocomplete/autocomplete-origin.mjs +7 -7
- package/esm2020/autocomplete/autocomplete-trigger.mjs +72 -38
- package/esm2020/autocomplete/autocomplete.mjs +18 -8
- package/esm2020/badge/badge-module.mjs +5 -5
- package/esm2020/badge/badge.mjs +4 -4
- package/esm2020/bottom-sheet/bottom-sheet-container.mjs +4 -4
- package/esm2020/bottom-sheet/bottom-sheet-module.mjs +5 -5
- package/esm2020/bottom-sheet/bottom-sheet.mjs +4 -4
- package/esm2020/button/button-module.mjs +5 -5
- package/esm2020/button/button.mjs +7 -7
- package/esm2020/button-toggle/button-toggle-module.mjs +5 -5
- package/esm2020/button-toggle/button-toggle.mjs +8 -8
- package/esm2020/card/card-module.mjs +5 -5
- package/esm2020/card/card.mjs +43 -43
- package/esm2020/checkbox/checkbox-module.mjs +9 -9
- package/esm2020/checkbox/checkbox-required-validator.mjs +4 -4
- package/esm2020/checkbox/checkbox.mjs +6 -4
- package/esm2020/chips/chip-input.mjs +4 -4
- package/esm2020/chips/chip-list.mjs +33 -8
- package/esm2020/chips/chip.mjs +18 -14
- package/esm2020/chips/chips-module.mjs +5 -5
- package/esm2020/core/common-behaviors/common-module.mjs +5 -5
- package/esm2020/core/common-behaviors/error-state.mjs +1 -8
- package/esm2020/core/datetime/index.mjs +9 -11
- package/esm2020/core/datetime/native-date-adapter.mjs +4 -4
- package/esm2020/core/error/error-options.mjs +7 -7
- package/esm2020/core/line/line.mjs +8 -8
- package/esm2020/core/option/index.mjs +5 -5
- package/esm2020/core/option/optgroup.mjs +7 -7
- package/esm2020/core/option/option.mjs +7 -7
- package/esm2020/core/ripple/index.mjs +6 -7
- package/esm2020/core/ripple/ripple-ref.mjs +5 -2
- package/esm2020/core/ripple/ripple-renderer.mjs +88 -47
- package/esm2020/core/ripple/ripple.mjs +4 -4
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
- package/esm2020/core/version.mjs +1 -1
- package/esm2020/datepicker/calendar-body.mjs +27 -5
- package/esm2020/datepicker/calendar.mjs +13 -13
- package/esm2020/datepicker/date-range-input-parts.mjs +10 -10
- package/esm2020/datepicker/date-range-input.mjs +4 -4
- package/esm2020/datepicker/date-range-picker.mjs +4 -4
- package/esm2020/datepicker/date-range-selection-strategy.mjs +4 -4
- package/esm2020/datepicker/date-selection-model.mjs +10 -10
- package/esm2020/datepicker/datepicker-actions.mjs +10 -10
- package/esm2020/datepicker/datepicker-base.mjs +7 -7
- package/esm2020/datepicker/datepicker-input-base.mjs +12 -7
- package/esm2020/datepicker/datepicker-input.mjs +4 -4
- package/esm2020/datepicker/datepicker-intl.mjs +4 -4
- package/esm2020/datepicker/datepicker-module.mjs +5 -5
- package/esm2020/datepicker/datepicker-toggle.mjs +7 -7
- package/esm2020/datepicker/datepicker.mjs +4 -4
- package/esm2020/datepicker/month-view.mjs +36 -9
- package/esm2020/datepicker/multi-year-view.mjs +42 -10
- package/esm2020/datepicker/year-view.mjs +41 -10
- package/esm2020/dialog/dialog-container.mjs +8 -8
- package/esm2020/dialog/dialog-content-directives.mjs +27 -15
- package/esm2020/dialog/dialog-module.mjs +5 -5
- package/esm2020/dialog/dialog.mjs +8 -8
- package/esm2020/divider/divider-module.mjs +5 -5
- package/esm2020/divider/divider.mjs +4 -4
- package/esm2020/expansion/accordion.mjs +4 -4
- package/esm2020/expansion/expansion-module.mjs +5 -5
- package/esm2020/expansion/expansion-panel-base.mjs +14 -0
- package/esm2020/expansion/expansion-panel-content.mjs +14 -7
- package/esm2020/expansion/expansion-panel-header.mjs +10 -10
- package/esm2020/expansion/expansion-panel.mjs +11 -8
- package/esm2020/expansion/public-api.mjs +2 -1
- package/esm2020/form-field/error.mjs +4 -4
- package/esm2020/form-field/form-field-control.mjs +4 -4
- package/esm2020/form-field/form-field-module.mjs +5 -5
- package/esm2020/form-field/form-field.mjs +16 -11
- package/esm2020/form-field/hint.mjs +4 -4
- package/esm2020/form-field/label.mjs +4 -4
- package/esm2020/form-field/placeholder.mjs +4 -4
- package/esm2020/form-field/prefix.mjs +4 -4
- package/esm2020/form-field/suffix.mjs +4 -4
- package/esm2020/grid-list/grid-list-module.mjs +5 -5
- package/esm2020/grid-list/grid-list.mjs +4 -4
- package/esm2020/grid-list/grid-tile.mjs +16 -16
- package/esm2020/icon/icon-module.mjs +5 -5
- package/esm2020/icon/icon-registry.mjs +12 -14
- package/esm2020/icon/icon.mjs +30 -20
- package/esm2020/icon/testing/fake-icon-registry.mjs +9 -9
- package/esm2020/input/input-module.mjs +5 -5
- package/esm2020/input/input.mjs +16 -6
- package/esm2020/list/list-module.mjs +5 -5
- package/esm2020/list/list.mjs +19 -19
- package/esm2020/list/selection-list.mjs +7 -7
- package/esm2020/menu/menu-content.mjs +7 -7
- package/esm2020/menu/menu-errors.mjs +1 -12
- package/esm2020/menu/menu-item.mjs +8 -4
- package/esm2020/menu/menu-module.mjs +5 -5
- package/esm2020/menu/menu-trigger.mjs +73 -66
- package/esm2020/menu/menu.mjs +35 -14
- package/esm2020/paginator/paginator-intl.mjs +4 -4
- package/esm2020/paginator/paginator-module.mjs +5 -5
- package/esm2020/paginator/paginator.mjs +12 -8
- package/esm2020/progress-bar/progress-bar-module.mjs +5 -5
- package/esm2020/progress-bar/progress-bar.mjs +4 -4
- package/esm2020/progress-spinner/progress-spinner-module.mjs +8 -8
- package/esm2020/progress-spinner/progress-spinner.mjs +13 -50
- package/esm2020/progress-spinner/public-api.mjs +10 -2
- package/esm2020/radio/radio-module.mjs +5 -5
- package/esm2020/radio/radio.mjs +14 -14
- package/esm2020/select/select-module.mjs +5 -5
- package/esm2020/select/select.mjs +25 -13
- package/esm2020/sidenav/drawer.mjs +12 -12
- package/esm2020/sidenav/sidenav-module.mjs +7 -8
- package/esm2020/sidenav/sidenav.mjs +12 -12
- package/esm2020/slide-toggle/slide-toggle-module.mjs +9 -9
- package/esm2020/slide-toggle/slide-toggle-required-validator.mjs +4 -4
- package/esm2020/slide-toggle/slide-toggle.mjs +4 -4
- package/esm2020/slider/slider-module.mjs +5 -5
- package/esm2020/slider/slider.mjs +4 -4
- package/esm2020/snack-bar/simple-snack-bar.mjs +4 -4
- package/esm2020/snack-bar/snack-bar-container.mjs +4 -4
- package/esm2020/snack-bar/snack-bar-module.mjs +5 -5
- package/esm2020/snack-bar/snack-bar.mjs +7 -7
- package/esm2020/sort/sort-header-intl.mjs +4 -4
- package/esm2020/sort/sort-header.mjs +16 -8
- package/esm2020/sort/sort-module.mjs +5 -5
- package/esm2020/sort/sort.mjs +4 -4
- package/esm2020/stepper/step-content.mjs +4 -4
- package/esm2020/stepper/step-header.mjs +4 -4
- package/esm2020/stepper/step-label.mjs +4 -4
- package/esm2020/stepper/stepper-button.mjs +7 -7
- package/esm2020/stepper/stepper-icon.mjs +4 -4
- package/esm2020/stepper/stepper-intl.mjs +4 -4
- package/esm2020/stepper/stepper-module.mjs +6 -10
- package/esm2020/stepper/stepper.mjs +12 -62
- package/esm2020/table/cell.mjs +22 -22
- package/esm2020/table/row.mjs +22 -22
- package/esm2020/table/table-module.mjs +5 -5
- package/esm2020/table/table.mjs +7 -7
- package/esm2020/table/text-column.mjs +4 -4
- package/esm2020/tabs/ink-bar.mjs +4 -4
- package/esm2020/tabs/paginated-tab-header.mjs +16 -10
- package/esm2020/tabs/tab-body.mjs +10 -10
- package/esm2020/tabs/tab-content.mjs +4 -4
- package/esm2020/tabs/tab-group.mjs +31 -7
- package/esm2020/tabs/tab-header.mjs +8 -8
- package/esm2020/tabs/tab-label-wrapper.mjs +4 -4
- package/esm2020/tabs/tab-label.mjs +4 -4
- package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +16 -16
- package/esm2020/tabs/tab.mjs +4 -4
- package/esm2020/tabs/tabs-module.mjs +5 -5
- package/esm2020/toolbar/toolbar-module.mjs +5 -5
- package/esm2020/toolbar/toolbar.mjs +7 -7
- package/esm2020/tooltip/tooltip-module.mjs +5 -5
- package/esm2020/tooltip/tooltip.mjs +41 -18
- package/esm2020/tree/node.mjs +10 -10
- package/esm2020/tree/outlet.mjs +4 -4
- package/esm2020/tree/padding.mjs +4 -4
- package/esm2020/tree/toggle.mjs +4 -4
- package/esm2020/tree/tree-module.mjs +5 -5
- package/esm2020/tree/tree.mjs +4 -4
- package/expansion/expansion-panel-base.d.ts +22 -0
- package/expansion/expansion-panel-content.d.ts +4 -2
- package/expansion/public-api.d.ts +1 -0
- package/fesm2015/autocomplete.mjs +100 -55
- package/fesm2015/autocomplete.mjs.map +1 -1
- package/fesm2015/badge.mjs +7 -7
- package/fesm2015/badge.mjs.map +1 -1
- package/fesm2015/bottom-sheet.mjs +10 -10
- package/fesm2015/bottom-sheet.mjs.map +1 -1
- package/fesm2015/button-toggle.mjs +11 -11
- package/fesm2015/button-toggle.mjs.map +1 -1
- package/fesm2015/button.mjs +10 -10
- package/fesm2015/button.mjs.map +1 -1
- package/fesm2015/card.mjs +46 -46
- package/fesm2015/card.mjs.map +1 -1
- package/fesm2015/checkbox.mjs +16 -14
- package/fesm2015/checkbox.mjs.map +1 -1
- package/fesm2015/chips.mjs +56 -27
- package/fesm2015/chips.mjs.map +1 -1
- package/fesm2015/core.mjs +153 -116
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/datepicker.mjs +224 -107
- package/fesm2015/datepicker.mjs.map +1 -1
- package/fesm2015/dialog.mjs +44 -32
- package/fesm2015/dialog.mjs.map +1 -1
- package/fesm2015/divider.mjs +7 -7
- package/fesm2015/divider.mjs.map +1 -1
- package/fesm2015/expansion.mjs +53 -30
- package/fesm2015/expansion.mjs.map +1 -1
- package/fesm2015/form-field.mjs +41 -35
- package/fesm2015/form-field.mjs.map +1 -1
- package/fesm2015/grid-list.mjs +22 -22
- package/fesm2015/grid-list.mjs.map +1 -1
- package/fesm2015/icon/testing.mjs +8 -8
- package/fesm2015/icon/testing.mjs.map +1 -1
- package/fesm2015/icon.mjs +44 -36
- package/fesm2015/icon.mjs.map +1 -1
- package/fesm2015/input.mjs +19 -9
- package/fesm2015/input.mjs.map +1 -1
- package/fesm2015/list.mjs +28 -28
- package/fesm2015/list.mjs.map +1 -1
- package/fesm2015/menu.mjs +124 -99
- package/fesm2015/menu.mjs.map +1 -1
- package/fesm2015/paginator.mjs +18 -14
- package/fesm2015/paginator.mjs.map +1 -1
- package/fesm2015/progress-bar.mjs +7 -7
- package/fesm2015/progress-bar.mjs.map +1 -1
- package/fesm2015/progress-spinner.mjs +30 -62
- package/fesm2015/progress-spinner.mjs.map +1 -1
- package/fesm2015/radio.mjs +17 -17
- package/fesm2015/radio.mjs.map +1 -1
- package/fesm2015/select.mjs +28 -16
- package/fesm2015/select.mjs.map +1 -1
- package/fesm2015/sidenav.mjs +29 -30
- package/fesm2015/sidenav.mjs.map +1 -1
- package/fesm2015/slide-toggle.mjs +14 -14
- package/fesm2015/slide-toggle.mjs.map +1 -1
- package/fesm2015/slider.mjs +7 -7
- package/fesm2015/slider.mjs.map +1 -1
- package/fesm2015/snack-bar.mjs +16 -16
- package/fesm2015/snack-bar.mjs.map +1 -1
- package/fesm2015/sort.mjs +128 -120
- package/fesm2015/sort.mjs.map +1 -1
- package/fesm2015/stepper.mjs +37 -90
- package/fesm2015/stepper.mjs.map +1 -1
- package/fesm2015/table.mjs +55 -55
- package/fesm2015/table.mjs.map +1 -1
- package/fesm2015/tabs.mjs +95 -65
- package/fesm2015/tabs.mjs.map +1 -1
- package/fesm2015/toolbar.mjs +10 -10
- package/fesm2015/toolbar.mjs.map +1 -1
- package/fesm2015/tooltip.mjs +46 -21
- package/fesm2015/tooltip.mjs.map +1 -1
- package/fesm2015/tree.mjs +25 -25
- package/fesm2015/tree.mjs.map +1 -1
- package/fesm2020/autocomplete.mjs +99 -55
- package/fesm2020/autocomplete.mjs.map +1 -1
- package/fesm2020/badge.mjs +7 -7
- package/fesm2020/badge.mjs.map +1 -1
- package/fesm2020/bottom-sheet.mjs +10 -10
- package/fesm2020/bottom-sheet.mjs.map +1 -1
- package/fesm2020/button-toggle.mjs +11 -11
- package/fesm2020/button-toggle.mjs.map +1 -1
- package/fesm2020/button.mjs +10 -10
- package/fesm2020/button.mjs.map +1 -1
- package/fesm2020/card.mjs +46 -46
- package/fesm2020/card.mjs.map +1 -1
- package/fesm2020/checkbox.mjs +16 -14
- package/fesm2020/checkbox.mjs.map +1 -1
- package/fesm2020/chips.mjs +56 -27
- package/fesm2020/chips.mjs.map +1 -1
- package/fesm2020/core.mjs +153 -116
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/datepicker.mjs +224 -107
- package/fesm2020/datepicker.mjs.map +1 -1
- package/fesm2020/dialog.mjs +44 -32
- package/fesm2020/dialog.mjs.map +1 -1
- package/fesm2020/divider.mjs +7 -7
- package/fesm2020/divider.mjs.map +1 -1
- package/fesm2020/expansion.mjs +51 -30
- package/fesm2020/expansion.mjs.map +1 -1
- package/fesm2020/form-field.mjs +40 -35
- package/fesm2020/form-field.mjs.map +1 -1
- package/fesm2020/grid-list.mjs +22 -22
- package/fesm2020/grid-list.mjs.map +1 -1
- package/fesm2020/icon/testing.mjs +8 -8
- package/fesm2020/icon/testing.mjs.map +1 -1
- package/fesm2020/icon.mjs +44 -36
- package/fesm2020/icon.mjs.map +1 -1
- package/fesm2020/input.mjs +19 -9
- package/fesm2020/input.mjs.map +1 -1
- package/fesm2020/list.mjs +28 -28
- package/fesm2020/list.mjs.map +1 -1
- package/fesm2020/menu.mjs +120 -99
- package/fesm2020/menu.mjs.map +1 -1
- package/fesm2020/paginator.mjs +18 -14
- package/fesm2020/paginator.mjs.map +1 -1
- package/fesm2020/progress-bar.mjs +7 -7
- package/fesm2020/progress-bar.mjs.map +1 -1
- package/fesm2020/progress-spinner.mjs +30 -60
- package/fesm2020/progress-spinner.mjs.map +1 -1
- package/fesm2020/radio.mjs +17 -17
- package/fesm2020/radio.mjs.map +1 -1
- package/fesm2020/select.mjs +28 -16
- package/fesm2020/select.mjs.map +1 -1
- package/fesm2020/sidenav.mjs +29 -30
- package/fesm2020/sidenav.mjs.map +1 -1
- package/fesm2020/slide-toggle.mjs +14 -14
- package/fesm2020/slide-toggle.mjs.map +1 -1
- package/fesm2020/slider.mjs +7 -7
- package/fesm2020/slider.mjs.map +1 -1
- package/fesm2020/snack-bar.mjs +16 -16
- package/fesm2020/snack-bar.mjs.map +1 -1
- package/fesm2020/sort.mjs +24 -16
- package/fesm2020/sort.mjs.map +1 -1
- package/fesm2020/stepper.mjs +37 -90
- package/fesm2020/stepper.mjs.map +1 -1
- package/fesm2020/table.mjs +55 -55
- package/fesm2020/table.mjs.map +1 -1
- package/fesm2020/tabs.mjs +95 -65
- package/fesm2020/tabs.mjs.map +1 -1
- package/fesm2020/toolbar.mjs +10 -10
- package/fesm2020/toolbar.mjs.map +1 -1
- package/fesm2020/tooltip.mjs +44 -21
- package/fesm2020/tooltip.mjs.map +1 -1
- package/fesm2020/tree.mjs +25 -25
- package/fesm2020/tree.mjs.map +1 -1
- package/form-field/form-field.d.ts +9 -5
- package/icon/icon-registry.d.ts +7 -9
- package/icon/icon.d.ts +12 -3
- package/icon/testing/fake-icon-registry.d.ts +1 -1
- package/input/input.d.ts +11 -1
- package/menu/menu-errors.d.ts +0 -5
- package/menu/menu-item.d.ts +3 -2
- package/menu/menu-trigger.d.ts +21 -11
- package/menu/menu.d.ts +7 -2
- package/package.json +7 -7
- package/paginator/paginator.d.ts +12 -1
- 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-spinner/progress-spinner-module.d.ts +1 -1
- package/progress-spinner/progress-spinner.d.ts +4 -19
- package/progress-spinner/public-api.d.ts +8 -1
- package/schematics/migration.json +5 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/schematics/ng-add/schema.d.ts +2 -2
- package/schematics/ng-add/schema.js +1 -1
- package/schematics/ng-add/schema.json +12 -4
- package/schematics/ng-add/schema.mjs +1 -1
- package/schematics/ng-add/setup-project.js +7 -5
- package/schematics/ng-add/setup-project.mjs +7 -5
- package/schematics/ng-update/data/constructor-checks.js +5 -1
- package/schematics/ng-update/data/constructor-checks.mjs +5 -1
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +7 -2
- package/schematics/ng-update/index.mjs +7 -2
- package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +4 -4
- package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.mjs +4 -4
- package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.js +13 -13
- package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.mjs +13 -13
- package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +2 -13
- package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.mjs +2 -13
- package/select/select.d.ts +11 -0
- package/sidenav/sidenav-module.d.ts +2 -3
- package/sort/sort-header.d.ts +4 -4
- package/sort/sort.d.ts +4 -0
- package/stepper/stepper-module.d.ts +1 -1
- package/stepper/stepper.d.ts +2 -35
- package/tabs/paginated-tab-header.d.ts +4 -2
- package/tabs/tab-group.d.ts +6 -2
- package/tooltip/tooltip.d.ts +13 -1
|
@@ -13,7 +13,7 @@ import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
|
13
13
|
import * as i3 from '@angular/cdk/scrolling';
|
|
14
14
|
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
15
15
|
import * as i2$1 from '@angular/cdk/bidi';
|
|
16
|
-
import {
|
|
16
|
+
import { hasModifierKey, ESCAPE, ENTER, UP_ARROW, DOWN_ARROW, TAB } from '@angular/cdk/keycodes';
|
|
17
17
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
18
18
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
19
19
|
import * as i4 from '@angular/material/form-field';
|
|
@@ -54,7 +54,7 @@ const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken('mat-autocomplete-de
|
|
|
54
54
|
});
|
|
55
55
|
/** @docs-private */
|
|
56
56
|
function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
|
|
57
|
-
return { autoActiveFirstOption: false };
|
|
57
|
+
return { autoActiveFirstOption: false, autoSelectActiveOption: false };
|
|
58
58
|
}
|
|
59
59
|
/** Base class with all of the `MatAutocomplete` functionality. */
|
|
60
60
|
class _MatAutocompleteBase extends _MatAutocompleteMixinBase {
|
|
@@ -85,6 +85,7 @@ class _MatAutocompleteBase extends _MatAutocompleteMixinBase {
|
|
|
85
85
|
// option altogether.
|
|
86
86
|
this.inertGroups = platform?.SAFARI || false;
|
|
87
87
|
this._autoActiveFirstOption = !!defaults.autoActiveFirstOption;
|
|
88
|
+
this._autoSelectActiveOption = !!defaults.autoSelectActiveOption;
|
|
88
89
|
}
|
|
89
90
|
/** Whether the autocomplete panel is open. */
|
|
90
91
|
get isOpen() {
|
|
@@ -100,6 +101,13 @@ class _MatAutocompleteBase extends _MatAutocompleteMixinBase {
|
|
|
100
101
|
set autoActiveFirstOption(value) {
|
|
101
102
|
this._autoActiveFirstOption = coerceBooleanProperty(value);
|
|
102
103
|
}
|
|
104
|
+
/** Whether the active option should be selected as the user is navigating. */
|
|
105
|
+
get autoSelectActiveOption() {
|
|
106
|
+
return this._autoSelectActiveOption;
|
|
107
|
+
}
|
|
108
|
+
set autoSelectActiveOption(value) {
|
|
109
|
+
this._autoSelectActiveOption = coerceBooleanProperty(value);
|
|
110
|
+
}
|
|
103
111
|
/**
|
|
104
112
|
* Takes classes set on the host mat-autocomplete element and applies them to the panel
|
|
105
113
|
* inside the overlay container to allow for easy styling.
|
|
@@ -168,9 +176,9 @@ class _MatAutocompleteBase extends _MatAutocompleteMixinBase {
|
|
|
168
176
|
classList[this._hiddenClass] = !this.showPanel;
|
|
169
177
|
}
|
|
170
178
|
}
|
|
171
|
-
_MatAutocompleteBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
172
|
-
_MatAutocompleteBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
179
|
+
_MatAutocompleteBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatAutocompleteBase, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Directive });
|
|
180
|
+
_MatAutocompleteBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: _MatAutocompleteBase, inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], displayWith: "displayWith", autoActiveFirstOption: "autoActiveFirstOption", autoSelectActiveOption: "autoSelectActiveOption", panelWidth: "panelWidth", classList: ["class", "classList"] }, outputs: { optionSelected: "optionSelected", opened: "opened", closed: "closed", optionActivated: "optionActivated" }, viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatAutocompleteBase, decorators: [{
|
|
174
182
|
type: Directive
|
|
175
183
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
176
184
|
type: Inject,
|
|
@@ -191,6 +199,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
191
199
|
type: Input
|
|
192
200
|
}], autoActiveFirstOption: [{
|
|
193
201
|
type: Input
|
|
202
|
+
}], autoSelectActiveOption: [{
|
|
203
|
+
type: Input
|
|
194
204
|
}], panelWidth: [{
|
|
195
205
|
type: Input
|
|
196
206
|
}], optionSelected: [{
|
|
@@ -212,9 +222,9 @@ class MatAutocomplete extends _MatAutocompleteBase {
|
|
|
212
222
|
this._hiddenClass = 'mat-autocomplete-hidden';
|
|
213
223
|
}
|
|
214
224
|
}
|
|
215
|
-
MatAutocomplete.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
216
|
-
MatAutocomplete.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
225
|
+
MatAutocomplete.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocomplete, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
226
|
+
MatAutocomplete.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "14.0.0-next.4", type: MatAutocomplete, selector: "mat-autocomplete", inputs: { disableRipple: "disableRipple" }, host: { classAttribute: "mat-autocomplete" }, providers: [{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }], queries: [{ propertyName: "optionGroups", predicate: MAT_OPTGROUP, descendants: true }, { propertyName: "options", predicate: MatOption, descendants: true }], exportAs: ["matAutocomplete"], usesInheritance: true, ngImport: i0, template: "<ng-template let-formFieldId=\"id\">\n <div class=\"mat-autocomplete-panel\"\n role=\"listbox\"\n [id]=\"id\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [ngClass]=\"_classList\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: [".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}mat-autocomplete{display:none}\n"], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocomplete, decorators: [{
|
|
218
228
|
type: Component,
|
|
219
229
|
args: [{ selector: 'mat-autocomplete', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'matAutocomplete', inputs: ['disableRipple'], host: {
|
|
220
230
|
'class': 'mat-autocomplete',
|
|
@@ -242,9 +252,9 @@ class _MatAutocompleteOriginBase {
|
|
|
242
252
|
this.elementRef = elementRef;
|
|
243
253
|
}
|
|
244
254
|
}
|
|
245
|
-
_MatAutocompleteOriginBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
246
|
-
_MatAutocompleteOriginBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
255
|
+
_MatAutocompleteOriginBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatAutocompleteOriginBase, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
256
|
+
_MatAutocompleteOriginBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: _MatAutocompleteOriginBase, ngImport: i0 });
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatAutocompleteOriginBase, decorators: [{
|
|
248
258
|
type: Directive
|
|
249
259
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
250
260
|
/**
|
|
@@ -253,9 +263,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
253
263
|
*/
|
|
254
264
|
class MatAutocompleteOrigin extends _MatAutocompleteOriginBase {
|
|
255
265
|
}
|
|
256
|
-
MatAutocompleteOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
257
|
-
MatAutocompleteOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
258
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
266
|
+
MatAutocompleteOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocompleteOrigin, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
267
|
+
MatAutocompleteOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], usesInheritance: true, ngImport: i0 });
|
|
268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
|
|
259
269
|
type: Directive,
|
|
260
270
|
args: [{
|
|
261
271
|
selector: '[matAutocompleteOrigin]',
|
|
@@ -422,6 +432,7 @@ class _MatAutocompleteTriggerBase {
|
|
|
422
432
|
this.autocomplete.closed.emit();
|
|
423
433
|
}
|
|
424
434
|
this.autocomplete._isOpen = this._overlayAttached = false;
|
|
435
|
+
this._pendingAutoselectedOption = null;
|
|
425
436
|
if (this._overlayRef && this._overlayRef.hasAttached()) {
|
|
426
437
|
this._overlayRef.detach();
|
|
427
438
|
this._closingActionsSubscription.unsubscribe();
|
|
@@ -473,6 +484,11 @@ class _MatAutocompleteTriggerBase {
|
|
|
473
484
|
const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null;
|
|
474
485
|
return (this._overlayAttached &&
|
|
475
486
|
clickTarget !== this._element.nativeElement &&
|
|
487
|
+
// Normally focus moves inside `mousedown` so this condition will almost always be
|
|
488
|
+
// true. Its main purpose is to handle the case where the input is focused from an
|
|
489
|
+
// outside click which propagates up to the `body` listener within the same sequence
|
|
490
|
+
// and causes the panel to close immediately (see #3106).
|
|
491
|
+
this._document.activeElement !== this._element.nativeElement &&
|
|
476
492
|
(!formField || !formField.contains(clickTarget)) &&
|
|
477
493
|
(!customOrigin || !customOrigin.contains(clickTarget)) &&
|
|
478
494
|
!!this._overlayRef &&
|
|
@@ -481,7 +497,7 @@ class _MatAutocompleteTriggerBase {
|
|
|
481
497
|
}
|
|
482
498
|
// Implemented as part of ControlValueAccessor.
|
|
483
499
|
writeValue(value) {
|
|
484
|
-
Promise.resolve().then(() => this.
|
|
500
|
+
Promise.resolve(null).then(() => this._assignOptionValue(value));
|
|
485
501
|
}
|
|
486
502
|
// Implemented as part of ControlValueAccessor.
|
|
487
503
|
registerOnChange(fn) {
|
|
@@ -497,14 +513,15 @@ class _MatAutocompleteTriggerBase {
|
|
|
497
513
|
}
|
|
498
514
|
_handleKeydown(event) {
|
|
499
515
|
const keyCode = event.keyCode;
|
|
516
|
+
const hasModifier = hasModifierKey(event);
|
|
500
517
|
// Prevent the default action on all escape key presses. This is here primarily to bring IE
|
|
501
518
|
// in line with other browsers. By default, pressing escape on IE will cause it to revert
|
|
502
519
|
// the input value to the one that it had on focus, however it won't dispatch any events
|
|
503
520
|
// which means that the model value will be out of sync with the view.
|
|
504
|
-
if (keyCode === ESCAPE && !
|
|
521
|
+
if (keyCode === ESCAPE && !hasModifier) {
|
|
505
522
|
event.preventDefault();
|
|
506
523
|
}
|
|
507
|
-
if (this.activeOption && keyCode === ENTER && this.panelOpen && !
|
|
524
|
+
if (this.activeOption && keyCode === ENTER && this.panelOpen && !hasModifier) {
|
|
508
525
|
this.activeOption._selectViaInteraction();
|
|
509
526
|
this._resetActiveItem();
|
|
510
527
|
event.preventDefault();
|
|
@@ -512,7 +529,7 @@ class _MatAutocompleteTriggerBase {
|
|
|
512
529
|
else if (this.autocomplete) {
|
|
513
530
|
const prevActiveItem = this.autocomplete._keyManager.activeItem;
|
|
514
531
|
const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;
|
|
515
|
-
if (
|
|
532
|
+
if (keyCode === TAB || (isArrowKey && !hasModifier && this.panelOpen)) {
|
|
516
533
|
this.autocomplete._keyManager.onKeydown(event);
|
|
517
534
|
}
|
|
518
535
|
else if (isArrowKey && this._canOpen()) {
|
|
@@ -520,6 +537,13 @@ class _MatAutocompleteTriggerBase {
|
|
|
520
537
|
}
|
|
521
538
|
if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {
|
|
522
539
|
this._scrollToOption(this.autocomplete._keyManager.activeItemIndex || 0);
|
|
540
|
+
if (this.autocomplete.autoSelectActiveOption && this.activeOption) {
|
|
541
|
+
if (!this._pendingAutoselectedOption) {
|
|
542
|
+
this._valueBeforeAutoSelection = this._element.nativeElement.value;
|
|
543
|
+
}
|
|
544
|
+
this._pendingAutoselectedOption = this.activeOption;
|
|
545
|
+
this._assignOptionValue(this.activeOption.value);
|
|
546
|
+
}
|
|
523
547
|
}
|
|
524
548
|
}
|
|
525
549
|
}
|
|
@@ -537,6 +561,7 @@ class _MatAutocompleteTriggerBase {
|
|
|
537
561
|
// See: https://connect.microsoft.com/IE/feedback/details/885747/
|
|
538
562
|
if (this._previousValue !== value) {
|
|
539
563
|
this._previousValue = value;
|
|
564
|
+
this._pendingAutoselectedOption = null;
|
|
540
565
|
this._onChange(value);
|
|
541
566
|
if (this._canOpen() && this._document.activeElement === event.target) {
|
|
542
567
|
this.openPanel();
|
|
@@ -553,6 +578,11 @@ class _MatAutocompleteTriggerBase {
|
|
|
553
578
|
this._floatLabel(true);
|
|
554
579
|
}
|
|
555
580
|
}
|
|
581
|
+
_handleClick() {
|
|
582
|
+
if (this._canOpen() && !this.panelOpen) {
|
|
583
|
+
this.openPanel();
|
|
584
|
+
}
|
|
585
|
+
}
|
|
556
586
|
/**
|
|
557
587
|
* In "auto" mode, the label will animate down as soon as focus is lost.
|
|
558
588
|
* This causes the value to jump when selecting an option with the mouse.
|
|
@@ -596,6 +626,7 @@ class _MatAutocompleteTriggerBase {
|
|
|
596
626
|
const wasOpen = this.panelOpen;
|
|
597
627
|
this._resetActiveItem();
|
|
598
628
|
this.autocomplete._setVisibility();
|
|
629
|
+
this._changeDetectorRef.detectChanges();
|
|
599
630
|
if (this.panelOpen) {
|
|
600
631
|
this._overlayRef.updatePosition();
|
|
601
632
|
// If the `panelOpen` state changed, we need to make sure to emit the `opened`
|
|
@@ -621,22 +652,24 @@ class _MatAutocompleteTriggerBase {
|
|
|
621
652
|
this._overlayRef = null;
|
|
622
653
|
}
|
|
623
654
|
}
|
|
624
|
-
|
|
655
|
+
_assignOptionValue(value) {
|
|
625
656
|
const toDisplay = this.autocomplete && this.autocomplete.displayWith
|
|
626
657
|
? this.autocomplete.displayWith(value)
|
|
627
658
|
: value;
|
|
628
659
|
// Simply falling back to an empty string if the display value is falsy does not work properly.
|
|
629
660
|
// The display value can also be the number zero and shouldn't fall back to an empty string.
|
|
630
|
-
|
|
661
|
+
this._updateNativeInputValue(toDisplay != null ? toDisplay : '');
|
|
662
|
+
}
|
|
663
|
+
_updateNativeInputValue(value) {
|
|
631
664
|
// If it's used within a `MatFormField`, we should set it through the property so it can go
|
|
632
665
|
// through change detection.
|
|
633
666
|
if (this._formField) {
|
|
634
|
-
this._formField._control.value =
|
|
667
|
+
this._formField._control.value = value;
|
|
635
668
|
}
|
|
636
669
|
else {
|
|
637
|
-
this._element.nativeElement.value =
|
|
670
|
+
this._element.nativeElement.value = value;
|
|
638
671
|
}
|
|
639
|
-
this._previousValue =
|
|
672
|
+
this._previousValue = value;
|
|
640
673
|
}
|
|
641
674
|
/**
|
|
642
675
|
* This method closes the panel, and if a value is specified, also sets the associated
|
|
@@ -644,12 +677,12 @@ class _MatAutocompleteTriggerBase {
|
|
|
644
677
|
* stemmed from the user.
|
|
645
678
|
*/
|
|
646
679
|
_setValueAndClose(event) {
|
|
647
|
-
const
|
|
648
|
-
if (
|
|
649
|
-
this._clearPreviousSelectedOption(
|
|
650
|
-
this.
|
|
651
|
-
this._onChange(
|
|
652
|
-
this.autocomplete._emitSelectEvent(
|
|
680
|
+
const toSelect = event ? event.source : this._pendingAutoselectedOption;
|
|
681
|
+
if (toSelect) {
|
|
682
|
+
this._clearPreviousSelectedOption(toSelect);
|
|
683
|
+
this._assignOptionValue(toSelect.value);
|
|
684
|
+
this._onChange(toSelect.value);
|
|
685
|
+
this.autocomplete._emitSelectEvent(toSelect);
|
|
653
686
|
this._element.nativeElement.focus();
|
|
654
687
|
}
|
|
655
688
|
this.closePanel();
|
|
@@ -675,21 +708,7 @@ class _MatAutocompleteTriggerBase {
|
|
|
675
708
|
});
|
|
676
709
|
overlayRef = this._overlay.create(this._getOverlayConfig());
|
|
677
710
|
this._overlayRef = overlayRef;
|
|
678
|
-
|
|
679
|
-
// the overlay event targeting provided by the CDK overlay.
|
|
680
|
-
overlayRef.keydownEvents().subscribe(event => {
|
|
681
|
-
// Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.
|
|
682
|
-
// See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction
|
|
683
|
-
if ((event.keyCode === ESCAPE && !hasModifierKey(event)) ||
|
|
684
|
-
(event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))) {
|
|
685
|
-
this._closeKeyEventStream.next();
|
|
686
|
-
this._resetActiveItem();
|
|
687
|
-
// We need to stop propagation, otherwise the event will eventually
|
|
688
|
-
// reach the input itself and cause the overlay to be reopened.
|
|
689
|
-
event.stopPropagation();
|
|
690
|
-
event.preventDefault();
|
|
691
|
-
}
|
|
692
|
-
});
|
|
711
|
+
this._handleOverlayEvents(overlayRef);
|
|
693
712
|
this._viewportSubscription = this._viewportRuler.change().subscribe(() => {
|
|
694
713
|
if (this.panelOpen && overlayRef) {
|
|
695
714
|
overlayRef.updateSize({ width: this._getPanelWidth() });
|
|
@@ -824,10 +843,34 @@ class _MatAutocompleteTriggerBase {
|
|
|
824
843
|
}
|
|
825
844
|
}
|
|
826
845
|
}
|
|
846
|
+
/** Handles keyboard events coming from the overlay panel. */
|
|
847
|
+
_handleOverlayEvents(overlayRef) {
|
|
848
|
+
// Use the `keydownEvents` in order to take advantage of
|
|
849
|
+
// the overlay event targeting provided by the CDK overlay.
|
|
850
|
+
overlayRef.keydownEvents().subscribe(event => {
|
|
851
|
+
// Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.
|
|
852
|
+
// See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction
|
|
853
|
+
if ((event.keyCode === ESCAPE && !hasModifierKey(event)) ||
|
|
854
|
+
(event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))) {
|
|
855
|
+
// If the user had typed something in before we autoselected an option, and they decided
|
|
856
|
+
// to cancel the selection, restore the input value to the one they had typed in.
|
|
857
|
+
if (this._pendingAutoselectedOption) {
|
|
858
|
+
this._updateNativeInputValue(this._valueBeforeAutoSelection ?? '');
|
|
859
|
+
this._pendingAutoselectedOption = null;
|
|
860
|
+
}
|
|
861
|
+
this._closeKeyEventStream.next();
|
|
862
|
+
this._resetActiveItem();
|
|
863
|
+
// We need to stop propagation, otherwise the event will eventually
|
|
864
|
+
// reach the input itself and cause the overlay to be reopened.
|
|
865
|
+
event.stopPropagation();
|
|
866
|
+
event.preventDefault();
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
}
|
|
827
870
|
}
|
|
828
|
-
_MatAutocompleteTriggerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
829
|
-
_MatAutocompleteTriggerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
830
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
871
|
+
_MatAutocompleteTriggerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatAutocompleteTriggerBase, deps: [{ token: i0.ElementRef }, { token: i1$1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: MAT_AUTOCOMPLETE_SCROLL_STRATEGY }, { token: i2$1.Directionality, optional: true }, { token: MAT_FORM_FIELD, host: true, optional: true }, { token: DOCUMENT, optional: true }, { token: i3.ViewportRuler }, { token: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
872
|
+
_MatAutocompleteTriggerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: _MatAutocompleteTriggerBase, inputs: { autocomplete: ["matAutocomplete", "autocomplete"], position: ["matAutocompletePosition", "position"], connectedTo: ["matAutocompleteConnectedTo", "connectedTo"], autocompleteAttribute: ["autocomplete", "autocompleteAttribute"], autocompleteDisabled: ["matAutocompleteDisabled", "autocompleteDisabled"] }, usesOnChanges: true, ngImport: i0 });
|
|
873
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatAutocompleteTriggerBase, decorators: [{
|
|
831
874
|
type: Directive
|
|
832
875
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
833
876
|
type: Inject,
|
|
@@ -873,9 +916,9 @@ class MatAutocompleteTrigger extends _MatAutocompleteTriggerBase {
|
|
|
873
916
|
this._aboveClass = 'mat-autocomplete-panel-above';
|
|
874
917
|
}
|
|
875
918
|
}
|
|
876
|
-
MatAutocompleteTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
877
|
-
MatAutocompleteTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
878
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
919
|
+
MatAutocompleteTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocompleteTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
920
|
+
MatAutocompleteTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", host: { listeners: { "focusin": "_handleFocus()", "blur": "_onTouched()", "input": "_handleInput($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick()" }, properties: { "attr.autocomplete": "autocompleteAttribute", "attr.role": "autocompleteDisabled ? null : \"combobox\"", "attr.aria-autocomplete": "autocompleteDisabled ? null : \"list\"", "attr.aria-activedescendant": "(panelOpen && activeOption) ? activeOption.id : null", "attr.aria-expanded": "autocompleteDisabled ? null : panelOpen.toString()", "attr.aria-owns": "(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id", "attr.aria-haspopup": "autocompleteDisabled ? null : \"listbox\"" }, classAttribute: "mat-autocomplete-trigger" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["matAutocompleteTrigger"], usesInheritance: true, ngImport: i0 });
|
|
921
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{
|
|
879
922
|
type: Directive,
|
|
880
923
|
args: [{
|
|
881
924
|
selector: `input[matAutocomplete], textarea[matAutocomplete]`,
|
|
@@ -887,13 +930,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
887
930
|
'[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null',
|
|
888
931
|
'[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',
|
|
889
932
|
'[attr.aria-owns]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',
|
|
890
|
-
'[attr.aria-haspopup]': '
|
|
933
|
+
'[attr.aria-haspopup]': 'autocompleteDisabled ? null : "listbox"',
|
|
891
934
|
// Note: we use `focusin`, as opposed to `focus`, in order to open the panel
|
|
892
935
|
// a little earlier. This avoids issues where IE delays the focusing of the input.
|
|
893
936
|
'(focusin)': '_handleFocus()',
|
|
894
937
|
'(blur)': '_onTouched()',
|
|
895
938
|
'(input)': '_handleInput($event)',
|
|
896
939
|
'(keydown)': '_handleKeydown($event)',
|
|
940
|
+
'(click)': '_handleClick()',
|
|
897
941
|
},
|
|
898
942
|
exportAs: 'matAutocompleteTrigger',
|
|
899
943
|
providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR],
|
|
@@ -909,17 +953,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
909
953
|
*/
|
|
910
954
|
class MatAutocompleteModule {
|
|
911
955
|
}
|
|
912
|
-
MatAutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
913
|
-
MatAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
956
|
+
MatAutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
957
|
+
MatAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocompleteModule, declarations: [MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteOrigin], imports: [OverlayModule, MatOptionModule, MatCommonModule, CommonModule], exports: [MatAutocomplete,
|
|
914
958
|
MatAutocompleteTrigger,
|
|
915
959
|
MatAutocompleteOrigin,
|
|
916
960
|
CdkScrollableModule,
|
|
917
961
|
MatOptionModule,
|
|
918
962
|
MatCommonModule] });
|
|
919
|
-
MatAutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
963
|
+
MatAutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocompleteModule, providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [[OverlayModule, MatOptionModule, MatCommonModule, CommonModule], CdkScrollableModule,
|
|
920
964
|
MatOptionModule,
|
|
921
965
|
MatCommonModule] });
|
|
922
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatAutocompleteModule, decorators: [{
|
|
923
967
|
type: NgModule,
|
|
924
968
|
args: [{
|
|
925
969
|
imports: [OverlayModule, MatOptionModule, MatCommonModule, CommonModule],
|