@angular/material 10.1.1 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +46 -20
- package/autocomplete/autocomplete-origin.d.ts +8 -5
- package/autocomplete/autocomplete-trigger.d.ts +23 -17
- package/autocomplete/autocomplete.d.ts +23 -12
- package/autocomplete/index.metadata.json +1 -1
- package/badge/badge.d.ts +3 -1
- package/badge/index.metadata.json +1 -1
- package/bottom-sheet/index.metadata.json +1 -1
- package/bundles/material-autocomplete-testing.umd.js +316 -256
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -16
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +553 -436
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +3 -25
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge-testing.umd.js +301 -243
- package/bundles/material-badge-testing.umd.js.map +1 -1
- package/bundles/material-badge-testing.umd.min.js +2 -16
- package/bundles/material-badge-testing.umd.min.js.map +1 -1
- package/bundles/material-badge.umd.js +356 -282
- package/bundles/material-badge.umd.js.map +1 -1
- package/bundles/material-badge.umd.min.js +2 -2
- package/bundles/material-badge.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.js +302 -244
- package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js +2 -16
- package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +376 -302
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +17 -2
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-testing.umd.js +310 -252
- package/bundles/material-button-testing.umd.js.map +1 -1
- package/bundles/material-button-testing.umd.min.js +2 -16
- package/bundles/material-button-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.js +304 -261
- package/bundles/material-button-toggle-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js +2 -31
- package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +388 -322
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +2 -10
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +375 -309
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +2 -10
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card-testing.umd.js +306 -250
- package/bundles/material-card-testing.umd.js.map +1 -1
- package/bundles/material-card-testing.umd.min.js +2 -16
- package/bundles/material-card-testing.umd.min.js.map +1 -1
- package/bundles/material-card.umd.js +139 -139
- package/bundles/material-card.umd.js.map +1 -1
- package/bundles/material-card.umd.min.js +2 -2
- package/bundles/material-card.umd.min.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.js +302 -244
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +2 -16
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +371 -312
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js +2 -9
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips-testing.umd.js +802 -0
- package/bundles/material-chips-testing.umd.js.map +1 -0
- package/bundles/material-chips-testing.umd.min.js +30 -0
- package/bundles/material-chips-testing.umd.min.js.map +1 -0
- package/bundles/material-chips.umd.js +598 -551
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +18 -3
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core-testing.umd.js +304 -261
- package/bundles/material-core-testing.umd.js.map +1 -1
- package/bundles/material-core-testing.umd.min.js +2 -31
- package/bundles/material-core-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +605 -540
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +37 -12
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker-testing.umd.js +1342 -0
- package/bundles/material-datepicker-testing.umd.js.map +1 -0
- package/bundles/material-datepicker-testing.umd.min.js +30 -0
- package/bundles/material-datepicker-testing.umd.min.js.map +1 -0
- package/bundles/material-datepicker.umd.js +1014 -981
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +43 -9
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog-testing.umd.js +303 -245
- package/bundles/material-dialog-testing.umd.js.map +1 -1
- package/bundles/material-dialog-testing.umd.min.js +2 -16
- package/bundles/material-dialog-testing.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +597 -476
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +10 -8
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider-testing.umd.js +300 -242
- package/bundles/material-divider-testing.umd.js.map +1 -1
- package/bundles/material-divider-testing.umd.min.js +2 -16
- package/bundles/material-divider-testing.umd.min.js.map +1 -1
- package/bundles/material-divider.umd.js +28 -28
- package/bundles/material-divider.umd.js.map +1 -1
- package/bundles/material-divider.umd.min.js +2 -9
- package/bundles/material-divider.umd.min.js.map +1 -1
- package/bundles/material-expansion-testing.umd.js +303 -254
- package/bundles/material-expansion-testing.umd.js.map +1 -1
- package/bundles/material-expansion-testing.umd.min.js +2 -17
- package/bundles/material-expansion-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion.umd.js +471 -433
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +12 -4
- package/bundles/material-expansion.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.js +299 -233
- package/bundles/material-form-field-testing-control.umd.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +301 -243
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.min.js +3 -17
- package/bundles/material-form-field-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +480 -417
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +51 -4
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.js +311 -260
- package/bundles/material-grid-list-testing.umd.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.min.js +2 -24
- package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +414 -340
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +20 -5
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-icon-testing.umd.js +409 -12
- package/bundles/material-icon-testing.umd.js.map +1 -1
- package/bundles/material-icon-testing.umd.min.js +18 -3
- package/bundles/material-icon-testing.umd.min.js.map +1 -1
- package/bundles/material-icon.umd.js +404 -336
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +2 -9
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-input-testing.umd.js +309 -262
- package/bundles/material-input-testing.umd.js.map +1 -1
- package/bundles/material-input-testing.umd.min.js +2 -16
- package/bundles/material-input-testing.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +399 -333
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +5 -18
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list-testing.umd.js +333 -311
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.min.js +1 -9
- package/bundles/material-list-testing.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +527 -466
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +2 -10
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +305 -247
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -17
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +476 -429
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +3 -17
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.js +302 -244
- package/bundles/material-paginator-testing.umd.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +2 -16
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +349 -280
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +2 -9
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.js +301 -243
- package/bundles/material-progress-bar-testing.umd.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js +2 -16
- package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +339 -266
- package/bundles/material-progress-bar.umd.js.map +1 -1
- package/bundles/material-progress-bar.umd.min.js +4 -3
- package/bundles/material-progress-bar.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.js +301 -243
- package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js +2 -16
- package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +420 -365
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js +3 -11
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +304 -246
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +2 -17
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +405 -339
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +2 -10
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +316 -260
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -16
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +469 -389
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +5 -12
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.js +303 -252
- package/bundles/material-sidenav-testing.umd.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.min.js +1 -23
- package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +535 -496
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +3 -3
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +302 -244
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js +2 -16
- package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +373 -314
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.min.js +2 -9
- package/bundles/material-slide-toggle.umd.min.js.map +1 -1
- package/bundles/material-slider-testing.umd.js +302 -236
- package/bundles/material-slider-testing.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.min.js +2 -9
- package/bundles/material-slider-testing.umd.min.js.map +1 -1
- package/bundles/material-slider.umd.js +479 -448
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-slider.umd.min.js +4 -3
- package/bundles/material-slider.umd.min.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.js +304 -246
- package/bundles/material-snack-bar-testing.umd.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js +2 -16
- package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +394 -317
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +26 -2
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort-testing.umd.js +302 -243
- package/bundles/material-sort-testing.umd.js.map +1 -1
- package/bundles/material-sort-testing.umd.min.js +2 -17
- package/bundles/material-sort-testing.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +383 -326
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +3 -33
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper-testing.umd.js +727 -0
- package/bundles/material-stepper-testing.umd.js.map +1 -0
- package/bundles/material-stepper-testing.umd.min.js +30 -0
- package/bundles/material-stepper-testing.umd.min.js.map +1 -0
- package/bundles/material-stepper.umd.js +496 -446
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-stepper.umd.min.js +4 -11
- package/bundles/material-stepper.umd.min.js.map +1 -1
- package/bundles/material-table-testing.umd.js +317 -265
- package/bundles/material-table-testing.umd.js.map +1 -1
- package/bundles/material-table-testing.umd.min.js +2 -24
- package/bundles/material-table-testing.umd.min.js.map +1 -1
- package/bundles/material-table.umd.js +521 -465
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js +4 -11
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs-testing.umd.js +303 -244
- package/bundles/material-tabs-testing.umd.js.map +1 -1
- package/bundles/material-tabs-testing.umd.min.js +1 -16
- package/bundles/material-tabs-testing.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +677 -646
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +29 -4
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.js +301 -243
- package/bundles/material-toolbar-testing.umd.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.min.js +2 -16
- package/bundles/material-toolbar-testing.umd.min.js.map +1 -1
- package/bundles/material-toolbar.umd.js +350 -286
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.min.js +4 -3
- package/bundles/material-toolbar.umd.min.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.js +301 -243
- package/bundles/material-tooltip-testing.umd.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.min.js +2 -16
- package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +424 -324
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +11 -3
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +446 -385
- package/bundles/material-tree.umd.js.map +1 -1
- package/bundles/material-tree.umd.min.js +3 -3
- package/bundles/material-tree.umd.min.js.map +1 -1
- package/button/index.metadata.json +1 -1
- package/chips/chip-default-options.d.ts +1 -1
- package/chips/chip-input.d.ts +1 -1
- package/chips/chip.d.ts +2 -2
- package/chips/index.metadata.json +1 -1
- package/chips/testing/chip-harness-filters.d.ts +28 -0
- package/chips/testing/chip-harness.d.ts +41 -0
- package/chips/testing/chip-input-harness.d.ts +47 -0
- package/chips/testing/chip-list-harness.d.ts +49 -0
- package/chips/testing/chip-remove-harness.d.ts +22 -0
- package/chips/testing/index.d.ts +8 -0
- package/chips/testing/package.json +9 -0
- package/chips/testing/public-api.d.ts +12 -0
- package/core/common-behaviors/color.d.ts +2 -0
- package/core/common-behaviors/constructor.d.ts +7 -0
- package/core/common-behaviors/disable-ripple.d.ts +2 -2
- package/core/common-behaviors/tabindex.d.ts +4 -2
- package/core/datetime/date-adapter.d.ts +9 -2
- package/core/index.metadata.json +1 -1
- package/core/option/optgroup.d.ts +8 -6
- package/core/option/option.d.ts +12 -9
- package/core/style/_vendor-prefixes.scss +5 -0
- package/datepicker/_datepicker-theme.scss +42 -21
- package/datepicker/calendar-body.d.ts +15 -4
- package/datepicker/calendar.d.ts +2 -7
- package/datepicker/date-range-input.d.ts +0 -5
- package/datepicker/date-range-selection-strategy.d.ts +5 -1
- package/datepicker/datepicker-base.d.ts +9 -11
- package/datepicker/datepicker-input-base.d.ts +0 -5
- package/datepicker/index.d.ts +4 -3
- package/datepicker/index.metadata.json +1 -1
- package/datepicker/month-view.d.ts +5 -9
- package/datepicker/multi-year-view.d.ts +3 -6
- package/datepicker/public-api.d.ts +1 -1
- package/datepicker/testing/calendar-cell-harness.d.ts +64 -0
- package/datepicker/testing/calendar-harness.d.ts +53 -0
- package/datepicker/testing/date-range-input-harness.d.ts +59 -0
- package/datepicker/testing/datepicker-harness-filters.d.ts +45 -0
- package/datepicker/testing/datepicker-input-harness-base.d.ts +43 -0
- package/datepicker/testing/datepicker-input-harness.d.ts +36 -0
- package/datepicker/testing/datepicker-toggle-harness.d.ts +28 -0
- package/datepicker/testing/datepicker-trigger-harness-base.d.ts +44 -0
- package/datepicker/testing/index.d.ts +8 -0
- package/datepicker/testing/package.json +9 -0
- package/datepicker/testing/public-api.d.ts +13 -0
- package/datepicker/year-view.d.ts +3 -6
- package/dialog/dialog-config.d.ts +1 -1
- package/dialog/dialog-container.d.ts +39 -22
- package/dialog/dialog-ref.d.ts +3 -3
- package/dialog/dialog.d.ts +25 -14
- package/dialog/index.metadata.json +1 -1
- package/esm2015/autocomplete/autocomplete-module.js +10 -5
- package/esm2015/autocomplete/autocomplete-origin.js +15 -9
- package/esm2015/autocomplete/autocomplete-trigger.js +73 -53
- package/esm2015/autocomplete/autocomplete.js +35 -22
- package/esm2015/autocomplete/testing/autocomplete-harness-filters.js +1 -0
- package/esm2015/badge/badge.js +15 -7
- package/esm2015/badge/testing/badge-harness-filters.js +1 -0
- package/esm2015/bottom-sheet/bottom-sheet-container.js +2 -2
- package/esm2015/bottom-sheet/bottom-sheet-ref.js +3 -3
- package/esm2015/bottom-sheet/bottom-sheet.js +14 -13
- package/esm2015/bottom-sheet/testing/bottom-sheet-harness-filters.js +1 -0
- package/esm2015/button/button.js +3 -3
- package/esm2015/button/testing/button-harness-filters.js +1 -0
- package/esm2015/button-toggle/button-toggle.js +2 -2
- package/esm2015/button-toggle/testing/button-toggle-group-harness-filters.js +1 -0
- package/esm2015/button-toggle/testing/button-toggle-group-harness.js +2 -2
- package/esm2015/button-toggle/testing/button-toggle-harness-filters.js +1 -0
- package/esm2015/button-toggle/testing/button-toggle-harness.js +2 -2
- package/esm2015/card/testing/card-harness-filters.js +1 -0
- package/esm2015/card/testing/card-harness.js +2 -2
- package/esm2015/checkbox/checkbox.js +2 -2
- package/esm2015/checkbox/testing/checkbox-harness-filters.js +1 -0
- package/esm2015/checkbox/testing/checkbox-harness.js +2 -2
- package/esm2015/chips/chip-default-options.js +1 -1
- package/esm2015/chips/chip-input.js +3 -8
- package/esm2015/chips/chip-list.js +7 -13
- package/esm2015/chips/chip-text-control.js +1 -0
- package/esm2015/chips/chip.js +1 -2
- package/esm2015/chips/testing/chip-harness-filters.js +2 -0
- package/esm2015/chips/testing/chip-harness.js +82 -0
- package/esm2015/chips/testing/chip-input-harness.js +101 -0
- package/esm2015/chips/testing/chip-list-harness.js +94 -0
- package/esm2015/chips/testing/chip-remove-harness.js +29 -0
- package/esm2015/chips/testing/index.js +9 -0
- package/esm2015/chips/testing/public-api.js +13 -0
- package/esm2015/chips/testing/testing.externs.js +0 -0
- package/esm2015/core/common-behaviors/color.js +3 -2
- package/esm2015/core/common-behaviors/common-module.js +6 -2
- package/esm2015/core/common-behaviors/constructor.js +2 -1
- package/esm2015/core/common-behaviors/disable-ripple.js +7 -3
- package/esm2015/core/common-behaviors/initialized.js +2 -2
- package/esm2015/core/common-behaviors/tabindex.js +11 -4
- package/esm2015/core/datetime/date-adapter.js +12 -3
- package/esm2015/core/datetime/native-date-adapter.js +11 -9
- package/esm2015/core/option/optgroup.js +16 -11
- package/esm2015/core/option/option.js +29 -16
- package/esm2015/core/testing/optgroup-harness-filters.js +1 -0
- package/esm2015/core/testing/option-harness-filters.js +1 -0
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/calendar-body.js +20 -5
- package/esm2015/datepicker/calendar.js +13 -18
- package/esm2015/datepicker/date-range-input-parts.js +5 -5
- package/esm2015/datepicker/date-range-input.js +15 -16
- package/esm2015/datepicker/date-range-picker.js +6 -2
- package/esm2015/datepicker/date-range-selection-strategy.js +12 -2
- package/esm2015/datepicker/date-selection-model.js +2 -2
- package/esm2015/datepicker/datepicker-base.js +17 -19
- package/esm2015/datepicker/datepicker-input-base.js +13 -18
- package/esm2015/datepicker/datepicker-input.js +7 -3
- package/esm2015/datepicker/datepicker-module.js +2 -7
- package/esm2015/datepicker/datepicker-toggle.js +3 -1
- package/esm2015/datepicker/index.js +5 -4
- package/esm2015/datepicker/month-view.js +19 -18
- package/esm2015/datepicker/multi-year-view.js +12 -16
- package/esm2015/datepicker/public-api.js +2 -2
- package/esm2015/datepicker/testing/calendar-cell-harness.js +181 -0
- package/esm2015/datepicker/testing/calendar-harness.js +91 -0
- package/esm2015/datepicker/testing/date-range-input-harness.js +116 -0
- package/esm2015/datepicker/testing/datepicker-harness-filters.js +9 -0
- package/esm2015/datepicker/testing/datepicker-input-harness-base.js +100 -0
- package/esm2015/datepicker/testing/datepicker-input-harness.js +69 -0
- package/esm2015/datepicker/testing/datepicker-toggle-harness.js +48 -0
- package/esm2015/datepicker/testing/datepicker-trigger-harness-base.js +77 -0
- package/esm2015/datepicker/testing/index.js +9 -0
- package/esm2015/datepicker/testing/public-api.js +14 -0
- package/esm2015/datepicker/testing/testing.externs.js +0 -0
- package/esm2015/datepicker/year-view.js +18 -20
- package/esm2015/dialog/dialog-config.js +1 -1
- package/esm2015/dialog/dialog-container.js +73 -50
- package/esm2015/dialog/dialog-content-directives.js +9 -3
- package/esm2015/dialog/dialog-ref.js +8 -8
- package/esm2015/dialog/dialog.js +58 -29
- package/esm2015/dialog/testing/dialog-harness-filters.js +1 -0
- package/esm2015/divider/testing/divider-harness-filters.js +1 -0
- package/esm2015/divider/testing/divider-harness.js +2 -2
- package/esm2015/expansion/accordion.js +3 -20
- package/esm2015/expansion/expansion-panel-header.js +7 -13
- package/esm2015/expansion/expansion-panel.js +7 -6
- package/esm2015/expansion/testing/expansion-harness-filters.js +1 -0
- package/esm2015/form-field/form-field-control.js +1 -1
- package/esm2015/form-field/form-field.js +26 -17
- package/esm2015/form-field/testing/form-field-harness-filters.js +1 -0
- package/esm2015/grid-list/grid-list.js +2 -2
- package/esm2015/grid-list/testing/grid-list-harness-filters.js +1 -0
- package/esm2015/grid-list/tile-coordinator.js +2 -2
- package/esm2015/grid-list/tile-styler.js +4 -3
- package/esm2015/icon/icon-registry.js +44 -52
- package/esm2015/icon/icon.js +13 -2
- package/esm2015/icon/testing/icon-harness-filters.js +9 -0
- package/esm2015/icon/testing/icon-harness.js +63 -0
- package/esm2015/icon/testing/public-api.js +3 -1
- package/esm2015/input/input.js +17 -10
- package/esm2015/input/testing/input-harness-filters.js +1 -0
- package/esm2015/input/testing/input-harness.js +7 -7
- package/esm2015/list/list.js +2 -2
- package/esm2015/list/selection-list.js +33 -31
- package/esm2015/list/testing/action-list-harness.js +2 -2
- package/esm2015/list/testing/list-harness-filters.js +1 -0
- package/esm2015/list/testing/list-harness.js +2 -2
- package/esm2015/list/testing/list-item-harness-base.js +2 -2
- package/esm2015/list/testing/nav-list-harness.js +2 -2
- package/esm2015/list/testing/selection-list-harness.js +3 -3
- package/esm2015/menu/menu-positions.js +1 -0
- package/esm2015/menu/menu-trigger.js +12 -6
- package/esm2015/menu/menu.js +11 -14
- package/esm2015/menu/testing/menu-harness-filters.js +1 -0
- package/esm2015/paginator/paginator.js +6 -3
- package/esm2015/paginator/testing/paginator-harness-filters.js +1 -0
- package/esm2015/progress-bar/testing/progress-bar-harness-filters.js +1 -0
- package/esm2015/progress-bar/testing/progress-bar-harness.js +2 -2
- package/esm2015/progress-spinner/progress-spinner.js +25 -16
- package/esm2015/progress-spinner/testing/progress-spinner-harness-filters.js +1 -0
- package/esm2015/progress-spinner/testing/progress-spinner-harness.js +2 -2
- package/esm2015/radio/radio.js +1 -1
- package/esm2015/radio/testing/radio-harness-filters.js +1 -0
- package/esm2015/radio/testing/radio-harness.js +3 -3
- package/esm2015/select/select.js +71 -57
- package/esm2015/select/testing/select-harness-filters.js +1 -0
- package/esm2015/select/testing/select-harness.js +2 -3
- package/esm2015/sidenav/drawer.js +23 -28
- package/esm2015/sidenav/testing/drawer-harness-filters.js +1 -0
- package/esm2015/slide-toggle/testing/slide-toggle-harness-filters.js +1 -0
- package/esm2015/slide-toggle/testing/slide-toggle-harness.js +2 -2
- package/esm2015/slider/slider.js +28 -31
- package/esm2015/slider/testing/slider-harness-filters.js +1 -0
- package/esm2015/slider/testing/slider-harness.js +2 -2
- package/esm2015/snack-bar/snack-bar-container.js +3 -3
- package/esm2015/snack-bar/snack-bar-ref.js +3 -3
- package/esm2015/snack-bar/snack-bar.js +13 -9
- package/esm2015/snack-bar/testing/snack-bar-harness-filters.js +1 -0
- package/esm2015/sort/sort-direction.js +1 -0
- package/esm2015/sort/sort-header.js +6 -3
- package/esm2015/sort/sort.js +11 -8
- package/esm2015/sort/testing/sort-harness-filters.js +1 -0
- package/esm2015/stepper/step-header.js +2 -2
- package/esm2015/stepper/stepper-button.js +3 -1
- package/esm2015/stepper/stepper.js +7 -4
- package/esm2015/stepper/testing/index.js +9 -0
- package/esm2015/stepper/testing/public-api.js +12 -0
- package/esm2015/stepper/testing/step-harness-filters.js +2 -0
- package/esm2015/stepper/testing/step-harness.js +132 -0
- package/esm2015/stepper/testing/stepper-button-harnesses.js +55 -0
- package/esm2015/stepper/testing/stepper-harness.js +57 -0
- package/esm2015/stepper/testing/testing.externs.js +0 -0
- package/esm2015/table/cell.js +15 -26
- package/esm2015/table/table-data-source.js +14 -1
- package/esm2015/table/table.js +11 -4
- package/esm2015/table/testing/table-harness-filters.js +1 -0
- package/esm2015/tabs/paginated-tab-header.js +3 -10
- package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +3 -3
- package/esm2015/tabs/tab.js +17 -10
- package/esm2015/tabs/testing/tab-harness-filters.js +1 -0
- package/esm2015/toolbar/testing/toolbar-harness-filters.js +1 -0
- package/esm2015/toolbar/testing/toolbar-harness.js +2 -2
- package/esm2015/toolbar/toolbar.js +15 -17
- package/esm2015/tooltip/testing/tooltip-harness-filters.js +1 -0
- package/esm2015/tooltip/tooltip.js +53 -31
- package/esm2015/tree/node.js +2 -2
- package/esm2015/tree/padding.js +7 -1
- package/esm2015/tree/toggle.js +8 -4
- package/expansion/expansion-panel-header.d.ts +6 -12
- package/expansion/expansion-panel.d.ts +5 -4
- package/expansion/index.metadata.json +1 -1
- package/fesm2015/autocomplete.js +128 -84
- package/fesm2015/autocomplete.js.map +1 -1
- package/fesm2015/badge.js +14 -6
- package/fesm2015/badge.js.map +1 -1
- package/fesm2015/bottom-sheet.js +17 -16
- package/fesm2015/bottom-sheet.js.map +1 -1
- package/fesm2015/button-toggle/testing.js +2 -2
- package/fesm2015/button-toggle/testing.js.map +1 -1
- package/fesm2015/button-toggle.js +1 -1
- package/fesm2015/button-toggle.js.map +1 -1
- package/fesm2015/button.js +2 -2
- package/fesm2015/button.js.map +1 -1
- package/fesm2015/card/testing.js +1 -1
- package/fesm2015/card/testing.js.map +1 -1
- package/fesm2015/checkbox/testing.js +1 -1
- package/fesm2015/checkbox/testing.js.map +1 -1
- package/fesm2015/checkbox.js +1 -1
- package/fesm2015/checkbox.js.map +1 -1
- package/fesm2015/chips/testing.js +316 -0
- package/fesm2015/chips/testing.js.map +1 -0
- package/fesm2015/chips.js +7 -19
- package/fesm2015/chips.js.map +1 -1
- package/fesm2015/core.js +87 -42
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker/testing.js +690 -0
- package/fesm2015/datepicker/testing.js.map +1 -0
- package/fesm2015/datepicker.js +146 -134
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog.js +143 -85
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/divider/testing.js +1 -1
- package/fesm2015/divider/testing.js.map +1 -1
- package/fesm2015/expansion.js +9 -30
- package/fesm2015/expansion.js.map +1 -1
- package/fesm2015/form-field.js +25 -16
- package/fesm2015/form-field.js.map +1 -1
- package/fesm2015/grid-list.js +5 -4
- package/fesm2015/grid-list.js.map +1 -1
- package/fesm2015/icon/testing.js +72 -1
- package/fesm2015/icon/testing.js.map +1 -1
- package/fesm2015/icon.js +56 -53
- package/fesm2015/icon.js.map +1 -1
- package/fesm2015/input/testing.js +6 -6
- package/fesm2015/input/testing.js.map +1 -1
- package/fesm2015/input.js +15 -8
- package/fesm2015/input.js.map +1 -1
- package/fesm2015/list/testing.js +6 -6
- package/fesm2015/list/testing.js.map +1 -1
- package/fesm2015/list.js +33 -31
- package/fesm2015/list.js.map +1 -1
- package/fesm2015/menu.js +20 -17
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/paginator.js +5 -2
- package/fesm2015/paginator.js.map +1 -1
- package/fesm2015/progress-bar/testing.js +1 -1
- package/fesm2015/progress-bar/testing.js.map +1 -1
- package/fesm2015/progress-spinner/testing.js +1 -1
- package/fesm2015/progress-spinner/testing.js.map +1 -1
- package/fesm2015/progress-spinner.js +24 -15
- package/fesm2015/progress-spinner.js.map +1 -1
- package/fesm2015/radio/testing.js +2 -2
- package/fesm2015/radio/testing.js.map +1 -1
- package/fesm2015/radio.js.map +1 -1
- package/fesm2015/select/testing.js +1 -2
- package/fesm2015/select/testing.js.map +1 -1
- package/fesm2015/select.js +70 -56
- package/fesm2015/select.js.map +1 -1
- package/fesm2015/sidenav.js +22 -27
- package/fesm2015/sidenav.js.map +1 -1
- package/fesm2015/slide-toggle/testing.js +1 -1
- package/fesm2015/slide-toggle/testing.js.map +1 -1
- package/fesm2015/slider/testing.js +1 -1
- package/fesm2015/slider/testing.js.map +1 -1
- package/fesm2015/slider.js +27 -30
- package/fesm2015/slider.js.map +1 -1
- package/fesm2015/snack-bar.js +17 -13
- package/fesm2015/snack-bar.js.map +1 -1
- package/fesm2015/sort.js +15 -9
- package/fesm2015/sort.js.map +1 -1
- package/fesm2015/stepper/testing.js +258 -0
- package/fesm2015/stepper/testing.js.map +1 -0
- package/fesm2015/stepper.js +10 -5
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/table.js +37 -28
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tabs.js +20 -20
- package/fesm2015/tabs.js.map +1 -1
- package/fesm2015/toolbar/testing.js +1 -1
- package/fesm2015/toolbar/testing.js.map +1 -1
- package/fesm2015/toolbar.js +14 -16
- package/fesm2015/toolbar.js.map +1 -1
- package/fesm2015/tooltip.js +52 -30
- package/fesm2015/tooltip.js.map +1 -1
- package/fesm2015/tree.js +13 -4
- package/fesm2015/tree.js.map +1 -1
- package/form-field/form-field-control.d.ts +5 -0
- package/form-field/form-field.d.ts +8 -5
- package/form-field/index.metadata.json +1 -1
- package/icon/icon-registry.d.ts +4 -6
- package/icon/icon.d.ts +3 -1
- package/icon/index.metadata.json +1 -1
- package/icon/testing/icon-harness-filters.d.ts +22 -0
- package/icon/testing/icon-harness.d.ts +29 -0
- package/icon/testing/index.metadata.json +1 -1
- package/icon/testing/public-api.d.ts +2 -0
- package/input/index.metadata.json +1 -1
- package/input/input.d.ts +6 -3
- package/list/index.metadata.json +1 -1
- package/list/selection-list.d.ts +3 -7
- package/menu/index.metadata.json +1 -1
- package/package.json +2 -2
- package/paginator/index.metadata.json +1 -1
- package/paginator/paginator.d.ts +5 -0
- 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/index.metadata.json +1 -1
- package/progress-spinner/progress-spinner.d.ts +9 -5
- package/radio/index.metadata.json +1 -1
- package/radio/radio.d.ts +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
- package/schematics/ng-update/data/index.js +1 -1
- package/select/index.metadata.json +1 -1
- package/select/select.d.ts +9 -8
- package/sidenav/drawer.d.ts +5 -5
- package/sidenav/index.metadata.json +1 -1
- package/slider/index.metadata.json +1 -1
- package/slider/slider.d.ts +8 -10
- package/snack-bar/index.metadata.json +1 -1
- package/sort/index.metadata.json +1 -1
- package/stepper/index.metadata.json +1 -1
- package/stepper/stepper.d.ts +3 -1
- package/stepper/testing/index.d.ts +8 -0
- package/stepper/testing/package.json +9 -0
- package/stepper/testing/public-api.d.ts +11 -0
- package/stepper/testing/step-harness-filters.d.ts +37 -0
- package/stepper/testing/step-harness.d.ts +57 -0
- package/stepper/testing/stepper-button-harnesses.d.ts +41 -0
- package/stepper/testing/stepper-harness.d.ts +35 -0
- package/table/cell.d.ts +9 -5
- package/table/index.metadata.json +1 -1
- package/table/table.d.ts +2 -0
- package/tabs/index.metadata.json +1 -1
- package/tabs/tab.d.ts +8 -1
- package/toolbar/index.metadata.json +1 -1
- package/tooltip/index.metadata.json +1 -1
- package/tooltip/tooltip.d.ts +6 -2
- package/tree/index.metadata.json +1 -1
- package/tree/padding.d.ts +4 -2
- package/tree/toggle.d.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select__testing.js","sources":["../../../../../../src/material/select/testing/select-harness.ts","../../../../../../src/material/select/testing/select-harness-filters.ts","../../../../../../src/material/select/testing/public-api.ts","../../../../../../src/material/select/testing/index.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 {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';\nimport {\n MatOptionHarness,\n MatOptgroupHarness,\n OptionHarnessFilters,\n OptgroupHarnessFilters,\n} from '@angular/material/core/testing';\nimport {SelectHarnessFilters} from './select-harness-filters';\n\n\n/** Harness for interacting with a standard mat-select in tests. */\nexport class MatSelectHarness extends MatFormFieldControlHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n private _backdrop = this._documentRootLocator.locatorFor('.cdk-overlay-backdrop');\n private _trigger = this.locatorFor('.mat-select-trigger');\n private _value = this.locatorFor('.mat-select-value');\n\n static hostSelector = '.mat-select';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatSelectHarness` that meets\n * certain criteria.\n * @param options Options for filtering which select instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: SelectHarnessFilters = {}): HarnessPredicate<MatSelectHarness> {\n return new HarnessPredicate(MatSelectHarness, options);\n }\n\n /** Gets a boolean promise indicating if the select is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-disabled');\n }\n\n /** Gets a boolean promise indicating if the select is valid. */\n async isValid(): Promise<boolean> {\n return !(await (await this.host()).hasClass('ng-invalid'));\n }\n\n /** Gets a boolean promise indicating if the select is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-required');\n }\n\n /** Gets a boolean promise indicating if the select is empty (no value is selected). */\n async isEmpty(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-empty');\n }\n\n /** Gets a boolean promise indicating if the select is in multi-selection mode. */\n async isMultiple(): Promise<boolean> {\n
|
|
1
|
+
{"version":3,"file":"select__testing.js","sources":["../../../../../../src/material/select/testing/select-harness.ts","../../../../../../src/material/select/testing/select-harness-filters.ts","../../../../../../src/material/select/testing/public-api.ts","../../../../../../src/material/select/testing/index.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 {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';\nimport {\n MatOptionHarness,\n MatOptgroupHarness,\n OptionHarnessFilters,\n OptgroupHarnessFilters,\n} from '@angular/material/core/testing';\nimport {SelectHarnessFilters} from './select-harness-filters';\n\n\n/** Harness for interacting with a standard mat-select in tests. */\nexport class MatSelectHarness extends MatFormFieldControlHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n private _backdrop = this._documentRootLocator.locatorFor('.cdk-overlay-backdrop');\n private _trigger = this.locatorFor('.mat-select-trigger');\n private _value = this.locatorFor('.mat-select-value');\n\n static hostSelector = '.mat-select';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatSelectHarness` that meets\n * certain criteria.\n * @param options Options for filtering which select instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: SelectHarnessFilters = {}): HarnessPredicate<MatSelectHarness> {\n return new HarnessPredicate(MatSelectHarness, options);\n }\n\n /** Gets a boolean promise indicating if the select is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-disabled');\n }\n\n /** Gets a boolean promise indicating if the select is valid. */\n async isValid(): Promise<boolean> {\n return !(await (await this.host()).hasClass('ng-invalid'));\n }\n\n /** Gets a boolean promise indicating if the select is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-required');\n }\n\n /** Gets a boolean promise indicating if the select is empty (no value is selected). */\n async isEmpty(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-empty');\n }\n\n /** Gets a boolean promise indicating if the select is in multi-selection mode. */\n async isMultiple(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-multiple');\n }\n\n /** Gets a promise for the select's value text. */\n async getValueText(): Promise<string> {\n return (await this._value()).text();\n }\n\n /** Focuses the select and returns a void promise that indicates when the action is complete. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the select and returns a void promise that indicates when the action is complete. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the select is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Gets the options inside the select panel. */\n async getOptions(filter: Omit<OptionHarnessFilters, 'ancestor'> = {}):\n Promise<MatOptionHarness[]> {\n return this._documentRootLocator.locatorForAll(MatOptionHarness.with({\n ...filter,\n ancestor: await this._getPanelSelector()\n }))();\n }\n\n /** Gets the groups of options inside the panel. */\n async getOptionGroups(filter: Omit<OptgroupHarnessFilters, 'ancestor'> = {}):\n Promise<MatOptgroupHarness[]> {\n return this._documentRootLocator.locatorForAll(MatOptgroupHarness.with({\n ...filter,\n ancestor: await this._getPanelSelector()\n }))();\n }\n\n /** Gets whether the select is open. */\n async isOpen(): Promise<boolean> {\n return !!await this._documentRootLocator.locatorForOptional(await this._getPanelSelector())();\n }\n\n /** Opens the select's panel. */\n async open(): Promise<void> {\n if (!await this.isOpen()) {\n return (await this._trigger()).click();\n }\n }\n\n /**\n * Clicks the options that match the passed-in filter. If the select is in multi-selection\n * mode all options will be clicked, otherwise the harness will pick the first matching option.\n */\n async clickOptions(filter: OptionHarnessFilters = {}): Promise<void> {\n await this.open();\n\n const [isMultiple, options] = await Promise.all([this.isMultiple(), this.getOptions(filter)]);\n\n if (options.length === 0) {\n throw Error('Select does not have options matching the specified filter');\n }\n\n if (isMultiple) {\n await Promise.all(options.map(option => option.click()));\n } else {\n await options[0].click();\n }\n }\n\n /** Closes the select's panel. */\n async close(): Promise<void> {\n if (await this.isOpen()) {\n // This is the most consistent way that works both in both single and multi-select modes,\n // but it assumes that only one overlay is open at a time. We should be able to make it\n // a bit more precise after #16645 where we can dispatch an ESCAPE press to the host instead.\n return (await this._backdrop()).click();\n }\n }\n\n /** Gets the selector that should be used to find this select's panel. */\n private async _getPanelSelector(): Promise<string> {\n const id = await (await this.host()).getAttribute('id');\n return `#${id}-panel`;\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 {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatSelectHarness` instances. */\nexport interface SelectHarnessFilters extends BaseHarnessFilters {}\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\nexport * from './select-harness';\nexport * from './select-harness-filters';\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\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
|
package/fesm2015/select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Overlay, CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { InjectionToken, Directive, EventEmitter,
|
|
3
|
+
import { InjectionToken, Directive, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef, NgZone, ElementRef, Optional, Inject, Self, Attribute, ViewChild, ContentChildren, Input, ContentChild, Output, NgModule } from '@angular/core';
|
|
4
4
|
import { mixinDisableRipple, mixinTabIndex, mixinDisabled, mixinErrorState, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MAT_OPTION_PARENT_COMPONENT, ErrorStateMatcher, MatOption, MAT_OPTGROUP, MatOptionModule, MatCommonModule } from '@angular/material/core';
|
|
5
5
|
import { MatFormFieldControl, MatFormField, MAT_FORM_FIELD, MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
import { ViewportRuler, CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
@@ -8,7 +8,7 @@ import { ActiveDescendantKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';
|
|
|
8
8
|
import { Directionality } from '@angular/cdk/bidi';
|
|
9
9
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
10
10
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
11
|
-
import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey,
|
|
11
|
+
import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey, A } from '@angular/cdk/keycodes';
|
|
12
12
|
import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
|
|
13
13
|
import { Subject, defer, merge } from 'rxjs';
|
|
14
14
|
import { startWith, switchMap, take, filter, map, distinctUntilChanged, takeUntil } from 'rxjs/operators';
|
|
@@ -213,6 +213,8 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
213
213
|
this._compareWith = (o1, o2) => o1 === o2;
|
|
214
214
|
/** Unique id for this input. */
|
|
215
215
|
this._uid = `mat-select-${nextUniqueId++}`;
|
|
216
|
+
/** Current `ariar-labelledby` value for the select trigger. */
|
|
217
|
+
this._triggerAriaLabelledBy = null;
|
|
216
218
|
/** Emits whenever the component is destroyed. */
|
|
217
219
|
this._destroy = new Subject();
|
|
218
220
|
/** The cached font-size of the trigger element. */
|
|
@@ -221,8 +223,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
221
223
|
this._onChange = () => { };
|
|
222
224
|
/** `View -> model callback called when select has been touched` */
|
|
223
225
|
this._onTouched = () => { };
|
|
224
|
-
|
|
225
|
-
this._optionIds = '';
|
|
226
|
+
this._valueId = `mat-select-value-${nextUniqueId++}`;
|
|
226
227
|
/** The value of the select panel's transform-origin property. */
|
|
227
228
|
this._transformOrigin = 'top';
|
|
228
229
|
/** Emits when the panel element is finished transforming in. */
|
|
@@ -267,7 +268,6 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
267
268
|
return options.changes.pipe(startWith(options), switchMap(() => merge(...options.map(option => option.onSelectionChange))));
|
|
268
269
|
}
|
|
269
270
|
return this._ngZone.onStable
|
|
270
|
-
.asObservable()
|
|
271
271
|
.pipe(take(1), switchMap(() => this.optionSelectionChanges));
|
|
272
272
|
});
|
|
273
273
|
/** Event emitted when the select panel has been toggled. */
|
|
@@ -322,7 +322,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
322
322
|
/** Whether the user should be allowed to select multiple options. */
|
|
323
323
|
get multiple() { return this._multiple; }
|
|
324
324
|
set multiple(value) {
|
|
325
|
-
if (this._selectionModel) {
|
|
325
|
+
if (this._selectionModel && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
326
326
|
throw getMatSelectDynamicMultipleError();
|
|
327
327
|
}
|
|
328
328
|
this._multiple = coerceBooleanProperty(value);
|
|
@@ -339,7 +339,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
339
339
|
*/
|
|
340
340
|
get compareWith() { return this._compareWith; }
|
|
341
341
|
set compareWith(fn) {
|
|
342
|
-
if (typeof fn !== 'function') {
|
|
342
|
+
if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
343
343
|
throw getMatSelectNonFunctionValueError();
|
|
344
344
|
}
|
|
345
345
|
this._compareWith = fn;
|
|
@@ -352,7 +352,9 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
352
352
|
get value() { return this._value; }
|
|
353
353
|
set value(newValue) {
|
|
354
354
|
if (newValue !== this._value) {
|
|
355
|
-
this.
|
|
355
|
+
if (this.options) {
|
|
356
|
+
this._setSelectionByValue(newValue);
|
|
357
|
+
}
|
|
356
358
|
this._value = newValue;
|
|
357
359
|
}
|
|
358
360
|
}
|
|
@@ -407,6 +409,20 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
407
409
|
});
|
|
408
410
|
}
|
|
409
411
|
ngDoCheck() {
|
|
412
|
+
const newAriaLabelledby = this._getTriggerAriaLabelledby();
|
|
413
|
+
// We have to manage setting the `aria-labelledby` ourselves, because part of its value
|
|
414
|
+
// is computed as a result of a content query which can cause this binding to trigger a
|
|
415
|
+
// "changed after checked" error.
|
|
416
|
+
if (newAriaLabelledby !== this._triggerAriaLabelledBy) {
|
|
417
|
+
const element = this._elementRef.nativeElement;
|
|
418
|
+
this._triggerAriaLabelledBy = newAriaLabelledby;
|
|
419
|
+
if (newAriaLabelledby) {
|
|
420
|
+
element.setAttribute('aria-labelledby', newAriaLabelledby);
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
element.removeAttribute('aria-labelledby');
|
|
424
|
+
}
|
|
425
|
+
}
|
|
410
426
|
if (this.ngControl) {
|
|
411
427
|
this.updateErrorState();
|
|
412
428
|
}
|
|
@@ -445,7 +461,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
445
461
|
this._highlightCorrectOption();
|
|
446
462
|
this._changeDetectorRef.markForCheck();
|
|
447
463
|
// Set the font size on the panel element once it exists.
|
|
448
|
-
this._ngZone.onStable.
|
|
464
|
+
this._ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
449
465
|
if (this._triggerFontSize && this.overlayDir.overlayRef &&
|
|
450
466
|
this.overlayDir.overlayRef.overlayElement) {
|
|
451
467
|
this.overlayDir.overlayRef.overlayElement.style.fontSize = `${this._triggerFontSize}px`;
|
|
@@ -468,9 +484,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
468
484
|
* @param value New value to be written to the model.
|
|
469
485
|
*/
|
|
470
486
|
writeValue(value) {
|
|
471
|
-
|
|
472
|
-
this._setSelectionByValue(value);
|
|
473
|
-
}
|
|
487
|
+
this.value = value;
|
|
474
488
|
}
|
|
475
489
|
/**
|
|
476
490
|
* Saves a callback function to be invoked when the select's value
|
|
@@ -551,13 +565,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
551
565
|
}
|
|
552
566
|
else if (!this.multiple) {
|
|
553
567
|
const previouslySelectedOption = this.selected;
|
|
554
|
-
|
|
555
|
-
keyCode === HOME ? manager.setFirstItemActive() : manager.setLastItemActive();
|
|
556
|
-
event.preventDefault();
|
|
557
|
-
}
|
|
558
|
-
else {
|
|
559
|
-
manager.onKeydown(event);
|
|
560
|
-
}
|
|
568
|
+
manager.onKeydown(event);
|
|
561
569
|
const selectedOption = this.selected;
|
|
562
570
|
// Since the value has changed, we need to announce it ourselves.
|
|
563
571
|
if (selectedOption && previouslySelectedOption !== selectedOption) {
|
|
@@ -573,11 +581,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
573
581
|
const keyCode = event.keyCode;
|
|
574
582
|
const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;
|
|
575
583
|
const isTyping = manager.isTyping();
|
|
576
|
-
if (
|
|
577
|
-
event.preventDefault();
|
|
578
|
-
keyCode === HOME ? manager.setFirstItemActive() : manager.setLastItemActive();
|
|
579
|
-
}
|
|
580
|
-
else if (isArrowKey && event.altKey) {
|
|
584
|
+
if (isArrowKey && event.altKey) {
|
|
581
585
|
// Close the select on ALT + arrow key to match the native <select>
|
|
582
586
|
event.preventDefault();
|
|
583
587
|
this.close();
|
|
@@ -657,7 +661,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
657
661
|
*/
|
|
658
662
|
_setSelectionByValue(value) {
|
|
659
663
|
if (this.multiple && value) {
|
|
660
|
-
if (!Array.isArray(value)) {
|
|
664
|
+
if (!Array.isArray(value) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
661
665
|
throw getMatSelectNonArrayValueError();
|
|
662
666
|
}
|
|
663
667
|
this._selectionModel.clear();
|
|
@@ -691,7 +695,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
691
695
|
return option.value != null && this._compareWith(option.value, value);
|
|
692
696
|
}
|
|
693
697
|
catch (error) {
|
|
694
|
-
if (
|
|
698
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
695
699
|
// Notify developers of errors in their comparator.
|
|
696
700
|
console.warn(error);
|
|
697
701
|
}
|
|
@@ -709,6 +713,7 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
709
713
|
.withTypeAhead(this._typeaheadDebounceInterval)
|
|
710
714
|
.withVerticalOrientation()
|
|
711
715
|
.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')
|
|
716
|
+
.withHomeAndEnd()
|
|
712
717
|
.withAllowedModifierKeys(['shiftKey']);
|
|
713
718
|
this._keyManager.tabOut.pipe(takeUntil(this._destroy)).subscribe(() => {
|
|
714
719
|
if (this.panelOpen) {
|
|
@@ -750,7 +755,6 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
750
755
|
this._changeDetectorRef.markForCheck();
|
|
751
756
|
this.stateChanges.next();
|
|
752
757
|
});
|
|
753
|
-
this._setOptionIds();
|
|
754
758
|
}
|
|
755
759
|
/** Invoked when an option is clicked. */
|
|
756
760
|
_onSelect(option, isUserInput) {
|
|
@@ -758,7 +762,9 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
758
762
|
if (option.value == null && !this._multiple) {
|
|
759
763
|
option.deselect();
|
|
760
764
|
this._selectionModel.clear();
|
|
761
|
-
this.
|
|
765
|
+
if (this.value != null) {
|
|
766
|
+
this._propagateChanges(option.value);
|
|
767
|
+
}
|
|
762
768
|
}
|
|
763
769
|
else {
|
|
764
770
|
if (wasSelected !== option.selected) {
|
|
@@ -810,10 +816,6 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
810
816
|
this.selectionChange.emit(new MatSelectChange(this, valueToEmit));
|
|
811
817
|
this._changeDetectorRef.markForCheck();
|
|
812
818
|
}
|
|
813
|
-
/** Records option IDs to pass to the aria-owns property. */
|
|
814
|
-
_setOptionIds() {
|
|
815
|
-
this._optionIds = this.options.map(option => option.id).join(' ');
|
|
816
|
-
}
|
|
817
819
|
/**
|
|
818
820
|
* Highlights the selected item. If no option is selected, it will highlight
|
|
819
821
|
* the first item instead.
|
|
@@ -832,7 +834,8 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
832
834
|
_scrollActiveOptionIntoView() {
|
|
833
835
|
const activeOptionIndex = this._keyManager.activeItemIndex || 0;
|
|
834
836
|
const labelCount = _countGroupLabelsBeforeOption(activeOptionIndex, this.options, this.optionGroups);
|
|
835
|
-
|
|
837
|
+
const itemHeight = this._getItemHeight();
|
|
838
|
+
this.panel.nativeElement.scrollTop = _getOptionScrollPosition((activeOptionIndex + labelCount) * itemHeight, itemHeight, this.panel.nativeElement.scrollTop, SELECT_PANEL_MAX_HEIGHT);
|
|
836
839
|
}
|
|
837
840
|
/** Focuses the select element. */
|
|
838
841
|
focus(options) {
|
|
@@ -883,24 +886,13 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
883
886
|
const optimalScrollPosition = optionOffsetFromScrollTop - scrollBuffer + halfOptionHeight;
|
|
884
887
|
return Math.min(Math.max(0, optimalScrollPosition), maxScroll);
|
|
885
888
|
}
|
|
886
|
-
/**
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
// `aria-labelledby` value by setting the ariaLabel to the placeholder.
|
|
890
|
-
return this.ariaLabelledby ? null : this.ariaLabel || this.placeholder;
|
|
891
|
-
}
|
|
892
|
-
/** Returns the aria-labelledby of the select component. */
|
|
893
|
-
_getAriaLabelledby() {
|
|
894
|
-
if (this.ariaLabelledby) {
|
|
895
|
-
return this.ariaLabelledby;
|
|
896
|
-
}
|
|
897
|
-
// Note: we use `_getAriaLabel` here, because we want to check whether there's a
|
|
898
|
-
// computed label. `this.ariaLabel` is only the user-specified label.
|
|
899
|
-
if (!this._parentFormField || !this._parentFormField._hasFloatingLabel() ||
|
|
900
|
-
this._getAriaLabel()) {
|
|
889
|
+
/** Gets the aria-labelledby for the select panel. */
|
|
890
|
+
_getPanelAriaLabelledby() {
|
|
891
|
+
if (this.ariaLabel) {
|
|
901
892
|
return null;
|
|
902
893
|
}
|
|
903
|
-
|
|
894
|
+
const labelId = this._getLabelId();
|
|
895
|
+
return this.ariaLabelledby ? labelId + ' ' + this.ariaLabelledby : labelId;
|
|
904
896
|
}
|
|
905
897
|
/** Determines the `aria-activedescendant` to be set on the host. */
|
|
906
898
|
_getAriaActiveDescendant() {
|
|
@@ -909,6 +901,11 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
909
901
|
}
|
|
910
902
|
return null;
|
|
911
903
|
}
|
|
904
|
+
/** Gets the ID of the element that is labelling the select. */
|
|
905
|
+
_getLabelId() {
|
|
906
|
+
var _a;
|
|
907
|
+
return ((_a = this._parentFormField) === null || _a === void 0 ? void 0 : _a.getLabelId()) || '';
|
|
908
|
+
}
|
|
912
909
|
/**
|
|
913
910
|
* Sets the x-offset of the overlay panel in relation to the trigger's top start corner.
|
|
914
911
|
* This must be adjusted to align the selected option text over the trigger text when
|
|
@@ -1068,6 +1065,17 @@ class MatSelect extends _MatSelectMixinBase {
|
|
|
1068
1065
|
_getItemHeight() {
|
|
1069
1066
|
return this._triggerFontSize * SELECT_ITEM_HEIGHT_EM;
|
|
1070
1067
|
}
|
|
1068
|
+
/** Gets the aria-labelledby of the select component trigger. */
|
|
1069
|
+
_getTriggerAriaLabelledby() {
|
|
1070
|
+
if (this.ariaLabel) {
|
|
1071
|
+
return null;
|
|
1072
|
+
}
|
|
1073
|
+
let value = this._getLabelId() + ' ' + this._valueId;
|
|
1074
|
+
if (this.ariaLabelledby) {
|
|
1075
|
+
value += ' ' + this.ariaLabelledby;
|
|
1076
|
+
}
|
|
1077
|
+
return value;
|
|
1078
|
+
}
|
|
1071
1079
|
/**
|
|
1072
1080
|
* Implemented as part of MatFormFieldControl.
|
|
1073
1081
|
* @docs-private
|
|
@@ -1095,28 +1103,34 @@ MatSelect.decorators = [
|
|
|
1095
1103
|
{ type: Component, args: [{
|
|
1096
1104
|
selector: 'mat-select',
|
|
1097
1105
|
exportAs: 'matSelect',
|
|
1098
|
-
template: "<div cdk-overlay-origin\n class=\"mat-select-trigger\"\n
|
|
1106
|
+
template: "<div cdk-overlay-origin\n class=\"mat-select-trigger\"\n (click)=\"toggle()\"\n #origin=\"cdkOverlayOrigin\"\n #trigger>\n <div class=\"mat-select-value\" [ngSwitch]=\"empty\" [attr.id]=\"_valueId\">\n <span class=\"mat-select-placeholder\" *ngSwitchCase=\"true\">{{placeholder || '\\u00A0'}}</span>\n <span class=\"mat-select-value-text\" *ngSwitchCase=\"false\" [ngSwitch]=\"!!customTrigger\">\n <span *ngSwitchDefault>{{triggerValue || '\\u00A0'}}</span>\n <ng-content select=\"mat-select-trigger\" *ngSwitchCase=\"true\"></ng-content>\n </span>\n </div>\n\n <div class=\"mat-select-arrow-wrapper\"><div class=\"mat-select-arrow\"></div></div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayMinWidth]=\"_triggerRect?.width!\"\n [cdkConnectedOverlayOffsetY]=\"_offsetY\"\n (backdropClick)=\"close()\"\n (attach)=\"_onAttached()\"\n (detach)=\"close()\">\n <div class=\"mat-select-panel-wrap\" [@transformPanelWrap]>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"mat-select-panel {{ _getPanelTheme() }}\"\n [attr.id]=\"id + '-panel'\"\n [attr.aria-multiselectable]=\"multiple\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby()\"\n [ngClass]=\"panelClass\"\n [@transformPanel]=\"multiple ? 'showing-multiple' : 'showing'\"\n (@transformPanel.done)=\"_panelDoneAnimatingStream.next($event.toState)\"\n [style.transformOrigin]=\"_transformOrigin\"\n [style.font-size.px]=\"_triggerFontSize\"\n (keydown)=\"_handleKeydown($event)\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n",
|
|
1099
1107
|
inputs: ['disabled', 'disableRipple', 'tabIndex'],
|
|
1100
1108
|
encapsulation: ViewEncapsulation.None,
|
|
1101
1109
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1102
1110
|
host: {
|
|
1103
|
-
'role': '
|
|
1111
|
+
'role': 'combobox',
|
|
1112
|
+
'aria-autocomplete': 'none',
|
|
1113
|
+
// TODO(crisbeto): the value for aria-haspopup should be `listbox`, but currently it's difficult
|
|
1114
|
+
// to sync into g3, because of an outdated automated a11y check which flags it as an invalid
|
|
1115
|
+
// value. At some point we should try to switch it back to being `listbox`. When doing the
|
|
1116
|
+
// MDC-based `mat-select`, we can get away with starting it off as `listbox`.
|
|
1117
|
+
'aria-haspopup': 'true',
|
|
1118
|
+
'class': 'mat-select',
|
|
1104
1119
|
'[attr.id]': 'id',
|
|
1105
1120
|
'[attr.tabindex]': 'tabIndex',
|
|
1106
|
-
'[attr.aria-
|
|
1107
|
-
'[attr.aria-
|
|
1121
|
+
'[attr.aria-controls]': 'panelOpen ? id + "-panel" : null',
|
|
1122
|
+
'[attr.aria-expanded]': 'panelOpen',
|
|
1123
|
+
'[attr.aria-label]': 'ariaLabel || null',
|
|
1108
1124
|
'[attr.aria-required]': 'required.toString()',
|
|
1109
1125
|
'[attr.aria-disabled]': 'disabled.toString()',
|
|
1110
1126
|
'[attr.aria-invalid]': 'errorState',
|
|
1111
|
-
'[attr.aria-owns]': 'panelOpen ? _optionIds : null',
|
|
1112
|
-
'[attr.aria-multiselectable]': 'multiple',
|
|
1113
1127
|
'[attr.aria-describedby]': '_ariaDescribedby || null',
|
|
1114
1128
|
'[attr.aria-activedescendant]': '_getAriaActiveDescendant()',
|
|
1115
1129
|
'[class.mat-select-disabled]': 'disabled',
|
|
1116
1130
|
'[class.mat-select-invalid]': 'errorState',
|
|
1117
1131
|
'[class.mat-select-required]': 'required',
|
|
1118
1132
|
'[class.mat-select-empty]': 'empty',
|
|
1119
|
-
'class': '
|
|
1133
|
+
'[class.mat-select-multiple]': 'multiple',
|
|
1120
1134
|
'(keydown)': '_handleKeydown($event)',
|
|
1121
1135
|
'(focus)': '_onFocus()',
|
|
1122
1136
|
'(blur)': '_onBlur()',
|