@angular/material 12.1.1 → 12.1.2

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.
Files changed (91) hide show
  1. package/autocomplete/autocomplete-trigger.d.ts +0 -2
  2. package/autocomplete/index.metadata.json +1 -1
  3. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  4. package/bundles/material-autocomplete.umd.js +1 -7
  5. package/bundles/material-autocomplete.umd.js.map +1 -1
  6. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  7. package/bundles/material-chips.umd.js +1 -0
  8. package/bundles/material-chips.umd.js.map +1 -1
  9. package/bundles/material-core.umd.js +5 -4
  10. package/bundles/material-core.umd.js.map +1 -1
  11. package/bundles/material-datepicker-testing.umd.js.map +1 -1
  12. package/bundles/material-datepicker.umd.js +2 -2
  13. package/bundles/material-datepicker.umd.js.map +1 -1
  14. package/bundles/material-form-field.umd.js +1 -1
  15. package/bundles/material-input-testing.umd.js.map +1 -1
  16. package/bundles/material-list.umd.js +8 -8
  17. package/bundles/material-list.umd.js.map +1 -1
  18. package/bundles/material-radio-testing.umd.js.map +1 -1
  19. package/bundles/material-radio.umd.js +1 -1
  20. package/bundles/material-select.umd.js +9 -1
  21. package/bundles/material-select.umd.js.map +1 -1
  22. package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
  23. package/bundles/material-stepper.umd.js +4 -1
  24. package/bundles/material-stepper.umd.js.map +1 -1
  25. package/bundles/material-table.umd.js +1 -1
  26. package/core/focus-indicators/_focus-indicators-theme.scss +27 -11
  27. package/core/focus-indicators/_focus-indicators.import.scss +2 -1
  28. package/core/index.metadata.json +1 -1
  29. package/datepicker/_datepicker-theme.scss +1 -1
  30. package/datepicker/index.metadata.json +1 -1
  31. package/esm2015/autocomplete/autocomplete-trigger.js +3 -9
  32. package/esm2015/autocomplete/testing/autocomplete-harness.js +1 -1
  33. package/esm2015/checkbox/testing/checkbox-harness.js +1 -1
  34. package/esm2015/chips/chip-input.js +2 -1
  35. package/esm2015/core/common-behaviors/common-module.js +1 -1
  36. package/esm2015/core/ripple/ripple-renderer.js +4 -3
  37. package/esm2015/core/version.js +1 -1
  38. package/esm2015/datepicker/calendar.js +3 -3
  39. package/esm2015/datepicker/testing/datepicker-input-harness-base.js +1 -1
  40. package/esm2015/form-field/form-field.js +1 -1
  41. package/esm2015/input/testing/input-harness.js +1 -1
  42. package/esm2015/input/testing/native-option-harness.js +1 -1
  43. package/esm2015/input/testing/native-select-harness.js +1 -1
  44. package/esm2015/list/selection-list.js +9 -9
  45. package/esm2015/radio/radio.js +1 -1
  46. package/esm2015/radio/testing/radio-harness.js +1 -1
  47. package/esm2015/select/select.js +10 -2
  48. package/esm2015/slide-toggle/testing/slide-toggle-harness.js +1 -1
  49. package/esm2015/stepper/stepper.js +5 -2
  50. package/esm2015/table/table.js +1 -1
  51. package/fesm2015/autocomplete/testing.js.map +1 -1
  52. package/fesm2015/autocomplete.js +2 -8
  53. package/fesm2015/autocomplete.js.map +1 -1
  54. package/fesm2015/checkbox/testing.js.map +1 -1
  55. package/fesm2015/chips.js +1 -0
  56. package/fesm2015/chips.js.map +1 -1
  57. package/fesm2015/core.js +5 -4
  58. package/fesm2015/core.js.map +1 -1
  59. package/fesm2015/datepicker/testing.js.map +1 -1
  60. package/fesm2015/datepicker.js +2 -2
  61. package/fesm2015/datepicker.js.map +1 -1
  62. package/fesm2015/form-field.js +1 -1
  63. package/fesm2015/input/testing.js.map +1 -1
  64. package/fesm2015/list.js +8 -8
  65. package/fesm2015/list.js.map +1 -1
  66. package/fesm2015/radio/testing.js.map +1 -1
  67. package/fesm2015/radio.js +1 -1
  68. package/fesm2015/select.js +9 -1
  69. package/fesm2015/select.js.map +1 -1
  70. package/fesm2015/slide-toggle/testing.js.map +1 -1
  71. package/fesm2015/stepper.js +4 -1
  72. package/fesm2015/stepper.js.map +1 -1
  73. package/fesm2015/table.js +1 -1
  74. package/form-field/index.metadata.json +1 -1
  75. package/package.json +2 -2
  76. package/prebuilt-themes/deeppurple-amber.css +1 -1
  77. package/prebuilt-themes/indigo-pink.css +1 -1
  78. package/prebuilt-themes/pink-bluegrey.css +1 -1
  79. package/prebuilt-themes/purple-green.css +1 -1
  80. package/radio/index.metadata.json +1 -1
  81. package/schematics/ng-add/index.js +1 -1
  82. package/schematics/ng-add/index.mjs +1 -1
  83. package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -1
  84. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-template-check.js +15 -11
  85. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-template-check.mjs +15 -11
  86. package/schematics/tsconfig.json +1 -0
  87. package/stepper/index.metadata.json +1 -1
  88. package/stepper/stepper.d.ts +1 -0
  89. package/table/_table-flex-styles.scss +34 -30
  90. package/table/_table-theme.scss +2 -2
  91. package/table/index.metadata.json +1 -1
@@ -678,7 +678,7 @@ MatFormField.decorators = [
678
678
  providers: [
679
679
  { provide: MAT_FORM_FIELD, useExisting: MatFormField },
680
680
  ],
681
- styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{opacity:0}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
681
+ styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-form-field-flex{outline:dashed 3px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{opacity:0}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{border:3px dashed}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
682
682
  },] }
683
683
  ];
684
684
  MatFormField.ctorParameters = () => [
@@ -1 +1 @@
1
- {"version":3,"file":"input__testing.js","sources":["../../../../../../src/material/input/testing/input-harness.ts","../../../../../../src/material/input/testing/input-harness-filters.ts","../../../../../../src/material/input/testing/native-option-harness.ts","../../../../../../src/material/input/testing/native-select-harness.ts","../../../../../../src/material/input/testing/native-select-harness-filters.ts","../../../../../../src/material/input/testing/public-api.ts","../../../../../../src/material/input/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, parallel} from '@angular/cdk/testing';\nimport {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';\nimport {InputHarnessFilters} from './input-harness-filters';\n\n/** Harness for interacting with a standard Material inputs in tests. */\nexport class MatInputHarness extends MatFormFieldControlHarness {\n // TODO: We do not want to handle `select` elements with `matNativeControl` because\n // not all methods of this harness work reasonably for native select elements.\n // For more details. See: https://github.com/angular/components/pull/18221.\n static hostSelector = '[matInput], input[matNativeControl], textarea[matNativeControl]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatInputHarness` that meets\n * certain criteria.\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: InputHarnessFilters = {}): HarnessPredicate<MatInputHarness> {\n return new HarnessPredicate(MatInputHarness, options)\n .addOption('value', options.value, (harness, value) => {\n return HarnessPredicate.stringMatches(harness.getValue(), value);\n })\n .addOption('placeholder', options.placeholder, (harness, placeholder) => {\n return HarnessPredicate.stringMatches(harness.getPlaceholder(), placeholder);\n });\n }\n\n /** Whether the input is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty('disabled')!;\n }\n\n /** Whether the input is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).getProperty('required')!;\n }\n\n /** Whether the input is readonly. */\n async isReadonly(): Promise<boolean> {\n return (await this.host()).getProperty('readOnly')!;\n }\n\n /** Gets the value of the input. */\n async getValue(): Promise<string> {\n // The \"value\" property of the native input is never undefined.\n return (await (await this.host()).getProperty('value'))!;\n }\n\n /** Gets the name of the input. */\n async getName(): Promise<string> {\n // The \"name\" property of the native input is never undefined.\n return (await (await this.host()).getProperty('name'))!;\n }\n\n /**\n * Gets the type of the input. Returns \"textarea\" if the input is\n * a textarea.\n */\n async getType(): Promise<string> {\n // The \"type\" property of the native input is never undefined.\n return (await (await this.host()).getProperty('type'))!;\n }\n\n /** Gets the placeholder of the input. */\n async getPlaceholder(): Promise<string> {\n const host = await this.host();\n const [nativePlaceholder, fallback] = await parallel(() => [\n host.getProperty('placeholder'),\n host.getAttribute('data-placeholder')\n ]);\n return nativePlaceholder || fallback || '';\n }\n\n /** Gets the id of the input. */\n async getId(): Promise<string> {\n // The input directive always assigns a unique id to the input in\n // case no id has been explicitly specified.\n return (await (await this.host()).getProperty('id'))!;\n }\n\n /**\n * Focuses the input and returns a promise that indicates when the\n * action is complete.\n */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /**\n * Blurs the input and returns a promise that indicates when the\n * action is complete.\n */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * Sets the value of the input. The value will be set by simulating\n * keypresses that correspond to the given value.\n */\n async setValue(newValue: string): Promise<void> {\n const inputEl = await this.host();\n await inputEl.clear();\n // We don't want to send keys for the value if the value is an empty\n // string in order to clear the value. Sending keys with an empty string\n // still results in unnecessary focus events.\n if (newValue) {\n await inputEl.sendKeys(newValue);\n }\n\n // Some input types won't respond to key presses (e.g. `color`) so to be sure that the\n // value is set, we also set the property after the keyboard sequence. Note that we don't\n // want to do it before, because it can cause the value to be entered twice.\n await inputEl.setInputValue(newValue);\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 `MatInputHarness` instances. */\nexport interface InputHarnessFilters extends BaseHarnessFilters {\n /** Filters based on the value of the input. */\n value?: string | RegExp;\n /** Filters based on the placeholder text of the input. */\n placeholder?: string | RegExp;\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 {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {NativeOptionHarnessFilters} from './native-select-harness-filters';\n\n/** Harness for interacting with a native `option` in tests. */\nexport class MatNativeOptionHarness extends ComponentHarness {\n /** Selector used to locate option instances. */\n static hostSelector = 'select[matNativeControl] option';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNativeOptionHarness` that meets\n * certain criteria.\n * @param options Options for filtering which option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: NativeOptionHarnessFilters = {}) {\n return new HarnessPredicate(MatNativeOptionHarness, options)\n .addOption('text', options.text,\n async (harness, title) =>\n HarnessPredicate.stringMatches(await harness.getText(), title))\n .addOption('index', options.index,\n async (harness, index) => await harness.getIndex() === index)\n .addOption('isSelected', options.isSelected,\n async (harness, isSelected) => await harness.isSelected() === isSelected);\n\n }\n\n /** Gets the option's label text. */\n async getText(): Promise<string> {\n return (await this.host()).getProperty('label');\n }\n\n /** Index of the option within the native `select` element. */\n async getIndex(): Promise<number> {\n return (await this.host()).getProperty('index');\n }\n\n /** Gets whether the option is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty('disabled');\n }\n\n /** Gets whether the option is selected. */\n async isSelected(): Promise<boolean> {\n return (await this.host()).getProperty('selected');\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 {HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';\nimport {MatNativeOptionHarness} from './native-option-harness';\nimport {\n NativeOptionHarnessFilters,\n NativeSelectHarnessFilters,\n} from './native-select-harness-filters';\n\n\n/** Harness for interacting with a native `select` in tests. */\nexport class MatNativeSelectHarness extends MatFormFieldControlHarness {\n static hostSelector = 'select[matNativeControl]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNativeSelectHarness` 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: NativeSelectHarnessFilters = {}): HarnessPredicate<MatNativeSelectHarness> {\n return new HarnessPredicate(MatNativeSelectHarness, options);\n }\n\n /** Gets a boolean promise indicating if the select is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty('disabled');\n }\n\n /** Gets a boolean promise indicating if the select is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).getProperty('required');\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()).getProperty('multiple');\n }\n\n /** Gets the name of the select. */\n async getName(): Promise<string> {\n // The \"name\" property of the native select is never undefined.\n return (await (await this.host()).getProperty('name'))!;\n }\n\n /** Gets the id of the select. */\n async getId(): Promise<string> {\n // We're guaranteed to have an id, because the `matNativeControl` always assigns one.\n return (await (await this.host()).getProperty('id'))!;\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: NativeOptionHarnessFilters = {}):\n Promise<MatNativeOptionHarness[]> {\n return this.locatorForAll(MatNativeOptionHarness.with(filter))();\n }\n\n /**\n * Selects 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 selectOptions(filter: NativeOptionHarnessFilters = {}): Promise<void> {\n const [isMultiple, options] = await parallel(() => {\n return [this.isMultiple(), this.getOptions(filter)];\n });\n\n if (options.length === 0) {\n throw Error('Select does not have options matching the specified filter');\n }\n\n const [host, optionIndexes] = await parallel(() => [\n this.host(),\n parallel(() => options.slice(0, isMultiple ? undefined : 1).map(option => option.getIndex()))\n ]);\n\n await host.selectOptions(...optionIndexes);\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 `MatNativeSelectHarness` instances. */\nexport interface NativeSelectHarnessFilters extends BaseHarnessFilters {}\n\n/** A set of criteria that can be used to filter a list of `MatNativeOptionHarness` instances. */\nexport interface NativeOptionHarnessFilters extends BaseHarnessFilters {\n text?: string | RegExp;\n index?: number;\n isSelected?: boolean;\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\nexport * from './input-harness';\nexport * from './input-harness-filters';\nexport * from './native-select-harness';\nexport * from './native-select-harness-filters';\nexport * from './native-option-harness';\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":";;;;AAAA;;;;;;;AAYA;MACa,eAAgB,SAAQ,0BAA0B;;;;;;;IAY7D,OAAO,IAAI,CAAC,UAA+B,EAAE;QAC3C,OAAO,IAAI,gBAAgB,CAAC,eAAe,E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Q,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;aAC9F,CAAC,CAAC;YAEH,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,aAAa,CAAC,CAAC;SAC5C;KAAA;;AA/EM,mCAAY,GAAG,0BAA0B;;ACnBlD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;"}
1
+ {"version":3,"file":"input__testing.js","sources":["../../../../../../src/material/input/testing/input-harness.ts","../../../../../../src/material/input/testing/input-harness-filters.ts","../../../../../../src/material/input/testing/native-option-harness.ts","../../../../../../src/material/input/testing/native-select-harness.ts","../../../../../../src/material/input/testing/native-select-harness-filters.ts","../../../../../../src/material/input/testing/public-api.ts","../../../../../../src/material/input/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, parallel} from '@angular/cdk/testing';\nimport {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';\nimport {InputHarnessFilters} from './input-harness-filters';\n\n/** Harness for interacting with a standard Material inputs in tests. */\nexport class MatInputHarness extends MatFormFieldControlHarness {\n // TODO: We do not want to handle `select` elements with `matNativeControl` because\n // not all methods of this harness work reasonably for native select elements.\n // For more details. See: https://github.com/angular/components/pull/18221.\n static hostSelector = '[matInput], input[matNativeControl], textarea[matNativeControl]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatInputHarness` that meets\n * certain criteria.\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: InputHarnessFilters = {}): HarnessPredicate<MatInputHarness> {\n return new HarnessPredicate(MatInputHarness, options)\n .addOption('value', options.value, (harness, value) => {\n return HarnessPredicate.stringMatches(harness.getValue(), value);\n })\n .addOption('placeholder', options.placeholder, (harness, placeholder) => {\n return HarnessPredicate.stringMatches(harness.getPlaceholder(), placeholder);\n });\n }\n\n /** Whether the input is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Whether the input is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('required');\n }\n\n /** Whether the input is readonly. */\n async isReadonly(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('readOnly');\n }\n\n /** Gets the value of the input. */\n async getValue(): Promise<string> {\n // The \"value\" property of the native input is never undefined.\n return (await (await this.host()).getProperty<string>('value'));\n }\n\n /** Gets the name of the input. */\n async getName(): Promise<string> {\n // The \"name\" property of the native input is never undefined.\n return (await (await this.host()).getProperty<string>('name'));\n }\n\n /**\n * Gets the type of the input. Returns \"textarea\" if the input is\n * a textarea.\n */\n async getType(): Promise<string> {\n // The \"type\" property of the native input is never undefined.\n return (await (await this.host()).getProperty<string>('type'));\n }\n\n /** Gets the placeholder of the input. */\n async getPlaceholder(): Promise<string> {\n const host = await this.host();\n const [nativePlaceholder, fallback] = await parallel(() => [\n host.getProperty('placeholder'),\n host.getAttribute('data-placeholder')\n ]);\n return nativePlaceholder || fallback || '';\n }\n\n /** Gets the id of the input. */\n async getId(): Promise<string> {\n // The input directive always assigns a unique id to the input in\n // case no id has been explicitly specified.\n return (await (await this.host()).getProperty<string>('id'));\n }\n\n /**\n * Focuses the input and returns a promise that indicates when the\n * action is complete.\n */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /**\n * Blurs the input and returns a promise that indicates when the\n * action is complete.\n */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * Sets the value of the input. The value will be set by simulating\n * keypresses that correspond to the given value.\n */\n async setValue(newValue: string): Promise<void> {\n const inputEl = await this.host();\n await inputEl.clear();\n // We don't want to send keys for the value if the value is an empty\n // string in order to clear the value. Sending keys with an empty string\n // still results in unnecessary focus events.\n if (newValue) {\n await inputEl.sendKeys(newValue);\n }\n\n // Some input types won't respond to key presses (e.g. `color`) so to be sure that the\n // value is set, we also set the property after the keyboard sequence. Note that we don't\n // want to do it before, because it can cause the value to be entered twice.\n await inputEl.setInputValue(newValue);\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 `MatInputHarness` instances. */\nexport interface InputHarnessFilters extends BaseHarnessFilters {\n /** Filters based on the value of the input. */\n value?: string | RegExp;\n /** Filters based on the placeholder text of the input. */\n placeholder?: string | RegExp;\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 {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {NativeOptionHarnessFilters} from './native-select-harness-filters';\n\n/** Harness for interacting with a native `option` in tests. */\nexport class MatNativeOptionHarness extends ComponentHarness {\n /** Selector used to locate option instances. */\n static hostSelector = 'select[matNativeControl] option';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNativeOptionHarness` that meets\n * certain criteria.\n * @param options Options for filtering which option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: NativeOptionHarnessFilters = {}) {\n return new HarnessPredicate(MatNativeOptionHarness, options)\n .addOption('text', options.text,\n async (harness, title) =>\n HarnessPredicate.stringMatches(await harness.getText(), title))\n .addOption('index', options.index,\n async (harness, index) => await harness.getIndex() === index)\n .addOption('isSelected', options.isSelected,\n async (harness, isSelected) => await harness.isSelected() === isSelected);\n\n }\n\n /** Gets the option's label text. */\n async getText(): Promise<string> {\n return (await this.host()).getProperty<string>('label');\n }\n\n /** Index of the option within the native `select` element. */\n async getIndex(): Promise<number> {\n return (await this.host()).getProperty<number>('index');\n }\n\n /** Gets whether the option is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Gets whether the option is selected. */\n async isSelected(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('selected');\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 {HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';\nimport {MatNativeOptionHarness} from './native-option-harness';\nimport {\n NativeOptionHarnessFilters,\n NativeSelectHarnessFilters,\n} from './native-select-harness-filters';\n\n\n/** Harness for interacting with a native `select` in tests. */\nexport class MatNativeSelectHarness extends MatFormFieldControlHarness {\n static hostSelector = 'select[matNativeControl]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNativeSelectHarness` 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: NativeSelectHarnessFilters = {}): HarnessPredicate<MatNativeSelectHarness> {\n return new HarnessPredicate(MatNativeSelectHarness, options);\n }\n\n /** Gets a boolean promise indicating if the select is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Gets a boolean promise indicating if the select is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('required');\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()).getProperty<boolean>('multiple');\n }\n\n /** Gets the name of the select. */\n async getName(): Promise<string> {\n // The \"name\" property of the native select is never undefined.\n return (await (await this.host()).getProperty<string>('name'));\n }\n\n /** Gets the id of the select. */\n async getId(): Promise<string> {\n // We're guaranteed to have an id, because the `matNativeControl` always assigns one.\n return (await (await this.host()).getProperty<string>('id'));\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: NativeOptionHarnessFilters = {}):\n Promise<MatNativeOptionHarness[]> {\n return this.locatorForAll(MatNativeOptionHarness.with(filter))();\n }\n\n /**\n * Selects 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 selectOptions(filter: NativeOptionHarnessFilters = {}): Promise<void> {\n const [isMultiple, options] = await parallel(() => {\n return [this.isMultiple(), this.getOptions(filter)];\n });\n\n if (options.length === 0) {\n throw Error('Select does not have options matching the specified filter');\n }\n\n const [host, optionIndexes] = await parallel(() => [\n this.host(),\n parallel(() => options.slice(0, isMultiple ? undefined : 1).map(option => option.getIndex()))\n ]);\n\n await host.selectOptions(...optionIndexes);\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 `MatNativeSelectHarness` instances. */\nexport interface NativeSelectHarnessFilters extends BaseHarnessFilters {}\n\n/** A set of criteria that can be used to filter a list of `MatNativeOptionHarness` instances. */\nexport interface NativeOptionHarnessFilters extends BaseHarnessFilters {\n text?: string | RegExp;\n index?: number;\n isSelected?: boolean;\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\nexport * from './input-harness';\nexport * from './input-harness-filters';\nexport * from './native-select-harness';\nexport * from './native-select-harness-filters';\nexport * from './native-option-harness';\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":";;;;AAAA;;;;;;;AAYA;MACa,eAAgB,SAAQ,0BAA0B;;;;;;;IAY7D,OAAO,IAAI,CAAC,UAA+B,EAAE;QAC3C,OAAO,IAAI,gBAAgB,CAAC,eAAe,EAAE,OAAO,CAAC;aAChD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK;YAChD,OAAO,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;SAClE,CAAC;aACD,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW;YAClE,OAAO,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,WAAW,CAAC,CAAC;SAC9E,CAAC,CAAC;KACR;;IAGK,UAAU;;YACd,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAU,UAAU,CAAC,CAAC;SAC7D;KAAA;;IAGK,UAAU;;YACd,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAU,UAAU,CAAC,CAAC;SAC7D;KAAA;;IAGK,UAAU;;YACd,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAU,UAAU,CAAC,CAAC;SAC7D;KAAA;;IAGK,QAAQ;;;YAEZ,QAAQ,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAS,OAAO,CAAC,EAAE;SACjE;KAAA;;IAGK,OAAO;;;YAEX,QAAQ,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAS,MAAM,CAAC,EAAE;SAChE;KA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AAE,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;aACrD,CAAC,CAAC;YAEH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACxB,MAAM,KAAK,CAAC,4DAA4D,CAAC,CAAC;aAC3E;YAED,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,GAAG,MAAM,QAAQ,CAAC,MAAM;gBACjD,IAAI,CAAC,IAAI,EAAE;gBACX,QAAQ,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;aAC9F,CAAC,CAAC;YAEH,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,aAAa,CAAC,CAAC;SAC5C;KAAA;;AA/EM,mCAAY,GAAG,0BAA0B;;ACnBlD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;"}
package/fesm2015/list.js CHANGED
@@ -562,16 +562,16 @@ class MatSelectionList extends _MatSelectionListBase {
562
562
  });
563
563
  // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.
564
564
  (_a = this._focusMonitor) === null || _a === void 0 ? void 0 : _a.monitor(this._element).pipe(takeUntil(this._destroyed)).subscribe(origin => {
565
+ var _a;
565
566
  if (origin === 'keyboard' || origin === 'program') {
566
- const activeIndex = this._keyManager.activeItemIndex;
567
- if (!activeIndex || activeIndex === -1) {
568
- // If there is no active index, set focus to the first option.
569
- this._keyManager.setFirstItemActive();
570
- }
571
- else {
572
- // Otherwise, set focus to the active option.
573
- this._keyManager.setActiveItem(activeIndex);
567
+ let toFocus = 0;
568
+ for (let i = 0; i < this.options.length; i++) {
569
+ if ((_a = this.options.get(i)) === null || _a === void 0 ? void 0 : _a.selected) {
570
+ toFocus = i;
571
+ break;
572
+ }
574
573
  }
574
+ this._keyManager.setActiveItem(toFocus);
575
575
  }
576
576
  });
577
577
  }
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sources":["../../../../../../src/material/list/list.ts","../../../../../../src/material/list/selection-list.ts","../../../../../../src/material/list/list-module.ts","../../../../../../src/material/list/public-api.ts","../../../../../../src/material/list/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 {coerceBooleanProperty, BooleanInput} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n Optional,\n QueryList,\n ViewEncapsulation,\n OnChanges,\n OnDestroy,\n ChangeDetectorRef,\n Input,\n InjectionToken,\n Inject,\n} from '@angular/core';\nimport {\n CanDisable,\n CanDisableRipple,\n MatLine,\n setLines,\n mixinDisableRipple,\n mixinDisabled,\n} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n// Boilerplate for applying mixins to MatList.\n/** @docs-private */\nconst _MatListBase = mixinDisabled(mixinDisableRipple(class {}));\n\n// Boilerplate for applying mixins to MatListItem.\n/** @docs-private */\nconst _MatListItemMixinBase = mixinDisableRipple(class {});\n\n/**\n * Injection token that can be used to inject instances of `MatList`. It serves as\n * alternative token to the actual `MatList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_LIST = new InjectionToken<MatList>('MatList');\n\n/**\n * Injection token that can be used to inject instances of `MatNavList`. It serves as\n * alternative token to the actual `MatNavList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_NAV_LIST = new InjectionToken<MatNavList>('MatNavList');\n\n@Component({\n selector: 'mat-nav-list',\n exportAs: 'matNavList',\n host: {\n 'role': 'navigation',\n 'class': 'mat-nav-list mat-list-base'\n },\n templateUrl: 'list.html',\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_NAV_LIST, useExisting: MatNavList}],\n})\nexport class MatNavList extends _MatListBase implements CanDisable, CanDisableRipple,\n OnChanges, OnDestroy {\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n\n@Component({\n selector: 'mat-list, mat-action-list',\n exportAs: 'matList',\n templateUrl: 'list.html',\n host: {\n 'class': 'mat-list mat-list-base'\n },\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_LIST, useExisting: MatList}],\n})\nexport class MatList extends _MatListBase implements CanDisable, CanDisableRipple, OnChanges,\n OnDestroy {\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>) {\n super();\n\n if (this._getListType() === 'action-list') {\n _elementRef.nativeElement.classList.add('mat-action-list');\n }\n }\n\n _getListType(): 'list' | 'action-list' | null {\n const nodeName = this._elementRef.nativeElement.nodeName.toLowerCase();\n\n if (nodeName === 'mat-list') {\n return 'list';\n }\n\n if (nodeName === 'mat-action-list') {\n return 'action-list';\n }\n\n return null;\n }\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-list-avatar], [matListAvatar]',\n host: {'class': 'mat-list-avatar'}\n})\nexport class MatListAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-list-icon], [matListIcon]',\n host: {'class': 'mat-list-icon'}\n})\nexport class MatListIconCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-subheader], [matSubheader]',\n host: {'class': 'mat-subheader'}\n})\nexport class MatListSubheaderCssMatStyler {}\n\n/** An item within a Material Design list. */\n@Component({\n selector: 'mat-list-item, a[mat-list-item], button[mat-list-item]',\n exportAs: 'matListItem',\n host: {\n 'class': 'mat-list-item mat-focus-indicator',\n '[class.mat-list-item-disabled]': 'disabled',\n // @breaking-change 8.0.0 Remove `mat-list-item-avatar` in favor of `mat-list-item-with-avatar`.\n '[class.mat-list-item-avatar]': '_avatar || _icon',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n },\n inputs: ['disableRipple'],\n templateUrl: 'list-item.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatListItem extends _MatListItemMixinBase implements AfterContentInit,\n CanDisableRipple, OnDestroy {\n private _isInteractiveList: boolean = false;\n private _list?: MatNavList | MatList;\n private readonly _destroyed = new Subject<void>();\n\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n @ContentChild(MatListAvatarCssMatStyler) _avatar: MatListAvatarCssMatStyler;\n @ContentChild(MatListIconCssMatStyler) _icon: MatListIconCssMatStyler;\n\n constructor(private _element: ElementRef<HTMLElement>,\n _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_NAV_LIST) navList?: MatNavList,\n @Optional() @Inject(MAT_LIST) list?: MatList) {\n super();\n this._isInteractiveList = !!(navList || (list && list._getListType() === 'action-list'));\n this._list = navList || list;\n\n // If no type attribute is specified for <button>, set it to \"button\".\n // If a type attribute is already specified, do nothing.\n const element = this._getHostElement();\n\n if (element.nodeName.toLowerCase() === 'button' && !element.hasAttribute('type')) {\n element.setAttribute('type', 'button');\n }\n\n if (this._list) {\n // React to changes in the state of the parent list since\n // some of the item's properties depend on it (e.g. `disableRipple`).\n this._list._stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {\n _changeDetectorRef.markForCheck();\n });\n }\n }\n\n /** Whether the option is disabled. */\n @Input()\n get disabled() { return this._disabled || !!(this._list && this._list.disabled); }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled = false;\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return !this._isInteractiveList || this.disableRipple ||\n !!(this._list && this._list.disableRipple);\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\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 {FocusableOption, FocusKeyManager, FocusMonitor} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {\n A,\n DOWN_ARROW,\n ENTER,\n hasModifierKey,\n SPACE,\n UP_ARROW,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n MatLine,\n mixinDisableRipple,\n setLines,\n ThemePalette,\n} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {MatListAvatarCssMatStyler, MatListIconCssMatStyler} from './list';\n\nconst _MatSelectionListBase = mixinDisableRipple(class {});\nconst _MatListOptionBase = mixinDisableRipple(class {});\n\n/** @docs-private */\nexport const MAT_SELECTION_LIST_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatSelectionList),\n multi: true\n};\n\n/** Change event that is being fired whenever the selected state of an option changes. */\nexport class MatSelectionListChange {\n constructor(\n /** Reference to the selection list that emitted the event. */\n public source: MatSelectionList,\n /**\n * Reference to the option that has been changed.\n * @deprecated Use `options` instead, because some events may change more than one option.\n * @breaking-change 12.0.0\n */\n public option: MatListOption,\n /** Reference to the options that have been changed. */\n public options: MatListOption[]) {}\n}\n\n/**\n * Type describing possible positions of a checkbox in a list option\n * with respect to the list item's text.\n */\nexport type MatListOptionCheckboxPosition = 'before'|'after';\n\n/**\n * Component for list-options of selection-list. Each list-option can automatically\n * generate a checkbox and can put current item into the selectionModel of selection-list\n * if the current item is selected.\n */\n@Component({\n selector: 'mat-list-option',\n exportAs: 'matListOption',\n inputs: ['disableRipple'],\n host: {\n 'role': 'option',\n 'class': 'mat-list-item mat-list-option mat-focus-indicator',\n '(focus)': '_handleFocus()',\n '(blur)': '_handleBlur()',\n '(click)': '_handleClick()',\n '[class.mat-list-item-disabled]': 'disabled',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n // Manually set the \"primary\" or \"warn\" class if the color has been explicitly\n // set to \"primary\" or \"warn\". The pseudo checkbox picks up these classes for\n // its theme.\n '[class.mat-primary]': 'color === \"primary\"',\n // Even though accent is the default, we need to set this class anyway, because the list might\n // be placed inside a parent that has one of the other colors with a higher specificity.\n '[class.mat-accent]': 'color !== \"primary\" && color !== \"warn\"',\n '[class.mat-warn]': 'color === \"warn\"',\n '[class.mat-list-single-selected-option]': 'selected && !selectionList.multiple',\n '[attr.aria-selected]': 'selected',\n '[attr.aria-disabled]': 'disabled',\n '[attr.tabindex]': '-1',\n },\n templateUrl: 'list-option.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatListOption extends _MatListOptionBase implements AfterContentInit, OnDestroy,\n OnInit, FocusableOption,\n CanDisableRipple {\n private _selected = false;\n private _disabled = false;\n private _hasFocus = false;\n\n @ContentChild(MatListAvatarCssMatStyler) _avatar: MatListAvatarCssMatStyler;\n @ContentChild(MatListIconCssMatStyler) _icon: MatListIconCssMatStyler;\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n\n /** DOM element containing the item's text. */\n @ViewChild('text') _text: ElementRef;\n\n /** Whether the label should appear before or after the checkbox. Defaults to 'after' */\n @Input() checkboxPosition: MatListOptionCheckboxPosition = 'after';\n\n /** Theme color of the list option. This sets the color of the checkbox. */\n @Input()\n get color(): ThemePalette { return this._color || this.selectionList.color; }\n set color(newValue: ThemePalette) { this._color = newValue; }\n private _color: ThemePalette;\n\n /**\n * This is set to true after the first OnChanges cycle so we don't clear the value of `selected`\n * in the first cycle.\n */\n private _inputsInitialized = false;\n /** Value of the option */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (\n this.selected &&\n !this.selectionList.compareWith(newValue, this.value) &&\n this._inputsInitialized\n ) {\n this.selected = false;\n }\n\n this._value = newValue;\n }\n private _value: any;\n\n /** Whether the option is disabled. */\n @Input()\n get disabled() { return this._disabled || (this.selectionList && this.selectionList.disabled); }\n set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Whether the option is selected. */\n @Input()\n get selected(): boolean { return this.selectionList.selectedOptions.isSelected(this); }\n set selected(value: boolean) {\n const isSelected = coerceBooleanProperty(value);\n\n if (isSelected !== this._selected) {\n this._setSelected(isSelected);\n\n if (isSelected || this.selectionList.multiple) {\n this.selectionList._reportValueChange();\n }\n }\n }\n\n constructor(private _element: ElementRef<HTMLElement>,\n private _changeDetector: ChangeDetectorRef,\n /** @docs-private */\n @Inject(forwardRef(() => MatSelectionList)) public selectionList: MatSelectionList) {\n super();\n }\n\n ngOnInit() {\n const list = this.selectionList;\n\n if (list._value && list._value.some(value => list.compareWith(value, this._value))) {\n this._setSelected(true);\n }\n\n const wasSelected = this._selected;\n\n // List options that are selected at initialization can't be reported properly to the form\n // control. This is because it takes some time until the selection-list knows about all\n // available options. Also it can happen that the ControlValueAccessor has an initial value\n // that should be used instead. Deferring the value change report to the next tick ensures\n // that the form control value is not being overwritten.\n Promise.resolve().then(() => {\n if (this._selected || wasSelected) {\n this.selected = true;\n this._changeDetector.markForCheck();\n }\n });\n this._inputsInitialized = true;\n }\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy(): void {\n if (this.selected) {\n // We have to delay this until the next tick in order\n // to avoid changed after checked errors.\n Promise.resolve().then(() => {\n this.selected = false;\n });\n }\n\n const hadFocus = this._hasFocus;\n const newActiveItem = this.selectionList._removeOptionFromList(this);\n\n // Only move focus if this option was focused at the time it was destroyed.\n if (hadFocus && newActiveItem) {\n newActiveItem.focus();\n }\n }\n\n /** Toggles the selection state of the option. */\n toggle(): void {\n this.selected = !this.selected;\n }\n\n /** Allows for programmatic focusing of the option. */\n focus(): void {\n this._element.nativeElement.focus();\n }\n\n /**\n * Returns the list item's text label. Implemented as a part of the FocusKeyManager.\n * @docs-private\n */\n getLabel() {\n return this._text ? (this._text.nativeElement.textContent || '') : '';\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return this.disabled || this.disableRipple || this.selectionList.disableRipple;\n }\n\n _handleClick() {\n if (!this.disabled && (this.selectionList.multiple || !this.selected)) {\n this.toggle();\n\n // Emit a change event if the selected state of the option changed through user interaction.\n this.selectionList._emitChangeEvent([this]);\n }\n }\n\n _handleFocus() {\n this.selectionList._setFocusedOption(this);\n this._hasFocus = true;\n }\n\n _handleBlur() {\n this.selectionList._onTouched();\n this._hasFocus = false;\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n /** Sets the selected state of the option. Returns whether the value has changed. */\n _setSelected(selected: boolean): boolean {\n if (selected === this._selected) {\n return false;\n }\n\n this._selected = selected;\n\n if (selected) {\n this.selectionList.selectedOptions.select(this);\n } else {\n this.selectionList.selectedOptions.deselect(this);\n }\n\n this._changeDetector.markForCheck();\n return true;\n }\n\n /**\n * Notifies Angular that the option needs to be checked in the next change detection run. Mainly\n * used to trigger an update of the list option if the disabled state of the selection list\n * changed.\n */\n _markForCheck() {\n this._changeDetector.markForCheck();\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_selected: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n\n\n/**\n * Material Design list component where each item is a selectable option. Behaves as a listbox.\n */\n@Component({\n selector: 'mat-selection-list',\n exportAs: 'matSelectionList',\n inputs: ['disableRipple'],\n host: {\n 'role': 'listbox',\n 'class': 'mat-selection-list mat-list-base',\n '(keydown)': '_keydown($event)',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.tabindex]': '_tabIndex',\n },\n template: '<ng-content></ng-content>',\n styleUrls: ['list.css'],\n encapsulation: ViewEncapsulation.None,\n providers: [MAT_SELECTION_LIST_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatSelectionList extends _MatSelectionListBase implements CanDisableRipple,\n AfterContentInit, ControlValueAccessor, OnDestroy, OnChanges {\n private _multiple = true;\n private _contentInitialized = false;\n\n /** The FocusKeyManager which handles focus. */\n _keyManager: FocusKeyManager<MatListOption>;\n\n /** The option components contained within this selection-list. */\n @ContentChildren(MatListOption, {descendants: true}) options: QueryList<MatListOption>;\n\n /** Emits a change event whenever the selected state of an option changes. */\n @Output() readonly selectionChange: EventEmitter<MatSelectionListChange> =\n new EventEmitter<MatSelectionListChange>();\n\n /**\n * Tabindex of the selection list.\n * @breaking-change 11.0.0 Remove `tabIndex` input.\n */\n @Input() tabIndex: number = 0;\n\n /** Theme color of the selection list. This sets the checkbox color for all list options. */\n @Input() color: ThemePalette = 'accent';\n\n /**\n * Function used for comparing an option against the selected value when determining which\n * options should appear as selected. The first argument is the value of an options. The second\n * one is a value from the selected value. A boolean must be returned.\n */\n @Input() compareWith: (o1: any, o2: any) => boolean = (a1, a2) => a1 === a2;\n\n /** Whether the selection list is disabled. */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // The `MatSelectionList` and `MatListOption` are using the `OnPush` change detection\n // strategy. Therefore the options will not check for any changes if the `MatSelectionList`\n // changed its state. Since we know that a change to `disabled` property of the list affects\n // the state of the options, we manually mark each option for check.\n this._markOptionsForCheck();\n }\n private _disabled: boolean = false;\n\n /** Whether selection is limited to one or multiple items (default multiple). */\n @Input()\n get multiple(): boolean { return this._multiple; }\n set multiple(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._multiple) {\n if (this._contentInitialized && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new Error(\n 'Cannot change `multiple` mode of mat-selection-list after initialization.');\n }\n\n this._multiple = newValue;\n this.selectedOptions = new SelectionModel(this._multiple, this.selectedOptions.selected);\n }\n }\n\n /** The currently selected options. */\n selectedOptions = new SelectionModel<MatListOption>(this._multiple);\n\n /** The tabindex of the selection list. */\n _tabIndex = -1;\n\n /** View to model callback that should be called whenever the selected options change. */\n private _onChange: (value: any) => void = (_: any) => {};\n\n /** Keeps track of the currently-selected value. */\n _value: string[]|null;\n\n /** Emits when the list has been destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n /** View to model callback that should be called if the list or its options lost focus. */\n _onTouched: () => void = () => {};\n\n /** Whether the list has been destroyed. */\n private _isDestroyed: boolean;\n\n constructor(private _element: ElementRef<HTMLElement>,\n // @breaking-change 11.0.0 Remove `tabIndex` parameter.\n @Attribute('tabindex') tabIndex: string,\n private _changeDetector: ChangeDetectorRef,\n // @breaking-change 11.0.0 `_focusMonitor` parameter to become required.\n private _focusMonitor?: FocusMonitor) {\n super();\n }\n\n ngAfterContentInit(): void {\n this._contentInitialized = true;\n\n this._keyManager = new FocusKeyManager<MatListOption>(this.options)\n .withWrap()\n .withTypeAhead()\n .withHomeAndEnd()\n // Allow disabled items to be focusable. For accessibility reasons, there must be a way for\n // screenreader users, that allows reading the different options of the list.\n .skipPredicate(() => false)\n .withAllowedModifierKeys(['shiftKey']);\n\n if (this._value) {\n this._setOptionsFromValues(this._value);\n }\n\n // If the user attempts to tab out of the selection list, allow focus to escape.\n this._keyManager.tabOut.pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._allowFocusEscape();\n });\n\n // When the number of options change, update the tabindex of the selection list.\n this.options.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n this._updateTabIndex();\n });\n\n // Sync external changes to the model back to the options.\n this.selectedOptions.changed.pipe(takeUntil(this._destroyed)).subscribe(event => {\n if (event.added) {\n for (let item of event.added) {\n item.selected = true;\n }\n }\n\n if (event.removed) {\n for (let item of event.removed) {\n item.selected = false;\n }\n }\n });\n\n // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.\n this._focusMonitor?.monitor(this._element)\n .pipe(takeUntil(this._destroyed))\n .subscribe(origin => {\n if (origin === 'keyboard' || origin === 'program') {\n const activeIndex = this._keyManager.activeItemIndex;\n\n if (!activeIndex || activeIndex === -1) {\n // If there is no active index, set focus to the first option.\n this._keyManager.setFirstItemActive();\n } else {\n // Otherwise, set focus to the active option.\n this._keyManager.setActiveItem(activeIndex);\n }\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const disableRippleChanges = changes['disableRipple'];\n const colorChanges = changes['color'];\n\n if ((disableRippleChanges && !disableRippleChanges.firstChange) ||\n (colorChanges && !colorChanges.firstChange)) {\n this._markOptionsForCheck();\n }\n }\n\n ngOnDestroy() {\n // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.\n this._focusMonitor?.stopMonitoring(this._element);\n this._destroyed.next();\n this._destroyed.complete();\n this._isDestroyed = true;\n }\n\n /** Focuses the selection list. */\n focus(options?: FocusOptions) {\n this._element.nativeElement.focus(options);\n }\n\n /** Selects all of the options. Returns the options that changed as a result. */\n selectAll(): MatListOption[] {\n return this._setAllOptionsSelected(true);\n }\n\n /** Deselects all of the options. Returns the options that changed as a result. */\n deselectAll(): MatListOption[] {\n return this._setAllOptionsSelected(false);\n }\n\n /** Sets the focused option of the selection-list. */\n _setFocusedOption(option: MatListOption) {\n this._keyManager.updateActiveItem(option);\n }\n\n /**\n * Removes an option from the selection list and updates the active item.\n * @returns Currently-active item.\n */\n _removeOptionFromList(option: MatListOption): MatListOption | null {\n const optionIndex = this._getOptionIndex(option);\n\n if (optionIndex > -1 && this._keyManager.activeItemIndex === optionIndex) {\n // Check whether the option is the last item\n if (optionIndex > 0) {\n this._keyManager.updateActiveItem(optionIndex - 1);\n } else if (optionIndex === 0 && this.options.length > 1) {\n this._keyManager.updateActiveItem(Math.min(optionIndex + 1, this.options.length - 1));\n }\n }\n\n return this._keyManager.activeItem;\n }\n\n /** Passes relevant key presses to our key manager. */\n _keydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n const previousFocusIndex = manager.activeItemIndex;\n const hasModifier = hasModifierKey(event);\n\n switch (keyCode) {\n case SPACE:\n case ENTER:\n if (!hasModifier && !manager.isTyping()) {\n this._toggleFocusedOption();\n // Always prevent space from scrolling the page since the list has focus\n event.preventDefault();\n }\n break;\n default:\n // The \"A\" key gets special treatment, because it's used for the \"select all\" functionality.\n if (keyCode === A && this.multiple && hasModifierKey(event, 'ctrlKey') &&\n !manager.isTyping()) {\n const shouldSelect = this.options.some(option => !option.disabled && !option.selected);\n this._setAllOptionsSelected(shouldSelect, true, true);\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n }\n\n if (this.multiple && (keyCode === UP_ARROW || keyCode === DOWN_ARROW) && event.shiftKey &&\n manager.activeItemIndex !== previousFocusIndex) {\n this._toggleFocusedOption();\n }\n }\n\n /** Reports a value change to the ControlValueAccessor */\n _reportValueChange() {\n // Stop reporting value changes after the list has been destroyed. This avoids\n // cases where the list might wrongly reset its value once it is removed, but\n // the form control is still live.\n if (this.options && !this._isDestroyed) {\n const value = this._getSelectedOptionValues();\n this._onChange(value);\n this._value = value;\n }\n }\n\n /** Emits a change event if the selected state of an option changed. */\n _emitChangeEvent(options: MatListOption[]) {\n this.selectionChange.emit(new MatSelectionListChange(this, options[0], options));\n }\n\n /** Implemented as part of ControlValueAccessor. */\n writeValue(values: string[]): void {\n this._value = values;\n\n if (this.options) {\n this._setOptionsFromValues(values || []);\n }\n }\n\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn: (value: any) => void): void {\n this._onChange = fn;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n /** Sets the selected options based on the specified values. */\n private _setOptionsFromValues(values: string[]) {\n this.options.forEach(option => option._setSelected(false));\n\n values.forEach(value => {\n const correspondingOption = this.options.find(option => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n return option.selected ? false : this.compareWith(option.value, value);\n });\n\n if (correspondingOption) {\n correspondingOption._setSelected(true);\n }\n });\n }\n\n /** Returns the values of the selected options. */\n private _getSelectedOptionValues(): string[] {\n return this.options.filter(option => option.selected).map(option => option.value);\n }\n\n /** Toggles the state of the currently focused option if enabled. */\n private _toggleFocusedOption(): void {\n let focusedIndex = this._keyManager.activeItemIndex;\n\n if (focusedIndex != null && this._isValidIndex(focusedIndex)) {\n let focusedOption: MatListOption = this.options.toArray()[focusedIndex];\n\n if (focusedOption && !focusedOption.disabled && (this._multiple || !focusedOption.selected)) {\n focusedOption.toggle();\n\n // Emit a change event because the focused option changed its state through user\n // interaction.\n this._emitChangeEvent([focusedOption]);\n }\n }\n }\n\n /**\n * Sets the selected state on all of the options\n * and emits an event if anything changed.\n */\n private _setAllOptionsSelected(\n isSelected: boolean,\n skipDisabled?: boolean,\n isUserInput?: boolean): MatListOption[] {\n // Keep track of whether anything changed, because we only want to\n // emit the changed event when something actually changed.\n const changedOptions: MatListOption[] = [];\n\n this.options.forEach(option => {\n if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {\n changedOptions.push(option);\n }\n });\n\n if (changedOptions.length) {\n this._reportValueChange();\n\n if (isUserInput) {\n this._emitChangeEvent(changedOptions);\n }\n }\n\n return changedOptions;\n }\n\n /**\n * Utility to ensure all indexes are valid.\n * @param index The index to be checked.\n * @returns True if the index is valid for our list of options.\n */\n private _isValidIndex(index: number): boolean {\n return index >= 0 && index < this.options.length;\n }\n\n /** Returns the index of the specified list option. */\n private _getOptionIndex(option: MatListOption): number {\n return this.options.toArray().indexOf(option);\n }\n\n /** Marks all the options to be checked in the next change detection run. */\n private _markOptionsForCheck() {\n if (this.options) {\n this.options.forEach(option => option._markForCheck());\n }\n }\n\n /**\n * Removes the tabindex from the selection list and resets it back afterwards, allowing the user\n * to tab out of it. This prevents the list from capturing focus and redirecting it back within\n * the list, creating a focus trap if it user tries to tab away.\n */\n private _allowFocusEscape() {\n this._tabIndex = -1;\n\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }\n\n /** Updates the tabindex based upon if the selection list is empty. */\n private _updateTabIndex(): void {\n this._tabIndex = (this.options.length === 0) ? -1 : 0;\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_multiple: BooleanInput;\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 {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n MatCommonModule,\n MatLineModule,\n MatPseudoCheckboxModule,\n MatRippleModule,\n} from '@angular/material/core';\nimport {\n MatList,\n MatNavList,\n MatListAvatarCssMatStyler,\n MatListIconCssMatStyler,\n MatListItem,\n MatListSubheaderCssMatStyler,\n} from './list';\nimport {MatListOption, MatSelectionList} from './selection-list';\nimport {MatDividerModule} from '@angular/material/divider';\n\n\n@NgModule({\n imports: [MatLineModule, MatRippleModule, MatCommonModule, MatPseudoCheckboxModule, CommonModule],\n exports: [\n MatList,\n MatNavList,\n MatListItem,\n MatListAvatarCssMatStyler,\n MatLineModule,\n MatCommonModule,\n MatListIconCssMatStyler,\n MatListSubheaderCssMatStyler,\n MatPseudoCheckboxModule,\n MatSelectionList,\n MatListOption,\n MatDividerModule\n ],\n declarations: [\n MatList,\n MatNavList,\n MatListItem,\n MatListAvatarCssMatStyler,\n MatListIconCssMatStyler,\n MatListSubheaderCssMatStyler,\n MatSelectionList,\n MatListOption\n ],\n})\nexport class MatListModule {}\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 './list-module';\nexport * from './list';\nexport * from './selection-list';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAsCA;AACA;AACA,MAAM,YAAY,GAAG,aAAa,CAAC,kBAAkB,CAAC;CAAQ,CAAC,CAAC,CAAC;AAEjE;AACA;AACA,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;CAAQ,CAAC,CAAC;AAE3D;;;;;MAKa,QAAQ,GAAG,IAAI,cAAc,CAAU,SAAS,EAAE;AAE/D;;;;;MAKa,YAAY,GAAG,IAAI,cAAc,CAAa,YAAY,EAAE;MAgB5D,UAAW,S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gBACR,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,uBAAuB,EAAE,YAAY,CAAC;gBACjG,OAAO,EAAE;oBACP,OAAO;oBACP,UAAU;oBACV,WAAW;oBACX,yBAAyB;oBACzB,aAAa;oBACb,eAAe;oBACf,uBAAuB;oBACvB,4BAA4B;oBAC5B,uBAAuB;oBACvB,gBAAgB;oBAChB,aAAa;oBACb,gBAAgB;iBACjB;gBACD,YAAY,EAAE;oBACZ,OAAO;oBACP,UAAU;oBACV,WAAW;oBACX,yBAAyB;oBACzB,uBAAuB;oBACvB,4BAA4B;oBAC5B,gBAAgB;oBAChB,aAAa;iBACd;aACF;;;ACtDD;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"list.js","sources":["../../../../../../src/material/list/list.ts","../../../../../../src/material/list/selection-list.ts","../../../../../../src/material/list/list-module.ts","../../../../../../src/material/list/public-api.ts","../../../../../../src/material/list/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 {coerceBooleanProperty, BooleanInput} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n Optional,\n QueryList,\n ViewEncapsulation,\n OnChanges,\n OnDestroy,\n ChangeDetectorRef,\n Input,\n InjectionToken,\n Inject,\n} from '@angular/core';\nimport {\n CanDisable,\n CanDisableRipple,\n MatLine,\n setLines,\n mixinDisableRipple,\n mixinDisabled,\n} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n// Boilerplate for applying mixins to MatList.\n/** @docs-private */\nconst _MatListBase = mixinDisabled(mixinDisableRipple(class {}));\n\n// Boilerplate for applying mixins to MatListItem.\n/** @docs-private */\nconst _MatListItemMixinBase = mixinDisableRipple(class {});\n\n/**\n * Injection token that can be used to inject instances of `MatList`. It serves as\n * alternative token to the actual `MatList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_LIST = new InjectionToken<MatList>('MatList');\n\n/**\n * Injection token that can be used to inject instances of `MatNavList`. It serves as\n * alternative token to the actual `MatNavList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_NAV_LIST = new InjectionToken<MatNavList>('MatNavList');\n\n@Component({\n selector: 'mat-nav-list',\n exportAs: 'matNavList',\n host: {\n 'role': 'navigation',\n 'class': 'mat-nav-list mat-list-base'\n },\n templateUrl: 'list.html',\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_NAV_LIST, useExisting: MatNavList}],\n})\nexport class MatNavList extends _MatListBase implements CanDisable, CanDisableRipple,\n OnChanges, OnDestroy {\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n\n@Component({\n selector: 'mat-list, mat-action-list',\n exportAs: 'matList',\n templateUrl: 'list.html',\n host: {\n 'class': 'mat-list mat-list-base'\n },\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_LIST, useExisting: MatList}],\n})\nexport class MatList extends _MatListBase implements CanDisable, CanDisableRipple, OnChanges,\n OnDestroy {\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>) {\n super();\n\n if (this._getListType() === 'action-list') {\n _elementRef.nativeElement.classList.add('mat-action-list');\n }\n }\n\n _getListType(): 'list' | 'action-list' | null {\n const nodeName = this._elementRef.nativeElement.nodeName.toLowerCase();\n\n if (nodeName === 'mat-list') {\n return 'list';\n }\n\n if (nodeName === 'mat-action-list') {\n return 'action-list';\n }\n\n return null;\n }\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-list-avatar], [matListAvatar]',\n host: {'class': 'mat-list-avatar'}\n})\nexport class MatListAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-list-icon], [matListIcon]',\n host: {'class': 'mat-list-icon'}\n})\nexport class MatListIconCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-subheader], [matSubheader]',\n host: {'class': 'mat-subheader'}\n})\nexport class MatListSubheaderCssMatStyler {}\n\n/** An item within a Material Design list. */\n@Component({\n selector: 'mat-list-item, a[mat-list-item], button[mat-list-item]',\n exportAs: 'matListItem',\n host: {\n 'class': 'mat-list-item mat-focus-indicator',\n '[class.mat-list-item-disabled]': 'disabled',\n // @breaking-change 8.0.0 Remove `mat-list-item-avatar` in favor of `mat-list-item-with-avatar`.\n '[class.mat-list-item-avatar]': '_avatar || _icon',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n },\n inputs: ['disableRipple'],\n templateUrl: 'list-item.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatListItem extends _MatListItemMixinBase implements AfterContentInit,\n CanDisableRipple, OnDestroy {\n private _isInteractiveList: boolean = false;\n private _list?: MatNavList | MatList;\n private readonly _destroyed = new Subject<void>();\n\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n @ContentChild(MatListAvatarCssMatStyler) _avatar: MatListAvatarCssMatStyler;\n @ContentChild(MatListIconCssMatStyler) _icon: MatListIconCssMatStyler;\n\n constructor(private _element: ElementRef<HTMLElement>,\n _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_NAV_LIST) navList?: MatNavList,\n @Optional() @Inject(MAT_LIST) list?: MatList) {\n super();\n this._isInteractiveList = !!(navList || (list && list._getListType() === 'action-list'));\n this._list = navList || list;\n\n // If no type attribute is specified for <button>, set it to \"button\".\n // If a type attribute is already specified, do nothing.\n const element = this._getHostElement();\n\n if (element.nodeName.toLowerCase() === 'button' && !element.hasAttribute('type')) {\n element.setAttribute('type', 'button');\n }\n\n if (this._list) {\n // React to changes in the state of the parent list since\n // some of the item's properties depend on it (e.g. `disableRipple`).\n this._list._stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {\n _changeDetectorRef.markForCheck();\n });\n }\n }\n\n /** Whether the option is disabled. */\n @Input()\n get disabled() { return this._disabled || !!(this._list && this._list.disabled); }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled = false;\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return !this._isInteractiveList || this.disableRipple ||\n !!(this._list && this._list.disableRipple);\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\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 {FocusableOption, FocusKeyManager, FocusMonitor} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {\n A,\n DOWN_ARROW,\n ENTER,\n hasModifierKey,\n SPACE,\n UP_ARROW,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n MatLine,\n mixinDisableRipple,\n setLines,\n ThemePalette,\n} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {MatListAvatarCssMatStyler, MatListIconCssMatStyler} from './list';\n\nconst _MatSelectionListBase = mixinDisableRipple(class {});\nconst _MatListOptionBase = mixinDisableRipple(class {});\n\n/** @docs-private */\nexport const MAT_SELECTION_LIST_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatSelectionList),\n multi: true\n};\n\n/** Change event that is being fired whenever the selected state of an option changes. */\nexport class MatSelectionListChange {\n constructor(\n /** Reference to the selection list that emitted the event. */\n public source: MatSelectionList,\n /**\n * Reference to the option that has been changed.\n * @deprecated Use `options` instead, because some events may change more than one option.\n * @breaking-change 12.0.0\n */\n public option: MatListOption,\n /** Reference to the options that have been changed. */\n public options: MatListOption[]) {}\n}\n\n/**\n * Type describing possible positions of a checkbox in a list option\n * with respect to the list item's text.\n */\nexport type MatListOptionCheckboxPosition = 'before'|'after';\n\n/**\n * Component for list-options of selection-list. Each list-option can automatically\n * generate a checkbox and can put current item into the selectionModel of selection-list\n * if the current item is selected.\n */\n@Component({\n selector: 'mat-list-option',\n exportAs: 'matListOption',\n inputs: ['disableRipple'],\n host: {\n 'role': 'option',\n 'class': 'mat-list-item mat-list-option mat-focus-indicator',\n '(focus)': '_handleFocus()',\n '(blur)': '_handleBlur()',\n '(click)': '_handleClick()',\n '[class.mat-list-item-disabled]': 'disabled',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n // Manually set the \"primary\" or \"warn\" class if the color has been explicitly\n // set to \"primary\" or \"warn\". The pseudo checkbox picks up these classes for\n // its theme.\n '[class.mat-primary]': 'color === \"primary\"',\n // Even though accent is the default, we need to set this class anyway, because the list might\n // be placed inside a parent that has one of the other colors with a higher specificity.\n '[class.mat-accent]': 'color !== \"primary\" && color !== \"warn\"',\n '[class.mat-warn]': 'color === \"warn\"',\n '[class.mat-list-single-selected-option]': 'selected && !selectionList.multiple',\n '[attr.aria-selected]': 'selected',\n '[attr.aria-disabled]': 'disabled',\n '[attr.tabindex]': '-1',\n },\n templateUrl: 'list-option.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatListOption extends _MatListOptionBase implements AfterContentInit, OnDestroy,\n OnInit, FocusableOption,\n CanDisableRipple {\n private _selected = false;\n private _disabled = false;\n private _hasFocus = false;\n\n @ContentChild(MatListAvatarCssMatStyler) _avatar: MatListAvatarCssMatStyler;\n @ContentChild(MatListIconCssMatStyler) _icon: MatListIconCssMatStyler;\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n\n /** DOM element containing the item's text. */\n @ViewChild('text') _text: ElementRef;\n\n /** Whether the label should appear before or after the checkbox. Defaults to 'after' */\n @Input() checkboxPosition: MatListOptionCheckboxPosition = 'after';\n\n /** Theme color of the list option. This sets the color of the checkbox. */\n @Input()\n get color(): ThemePalette { return this._color || this.selectionList.color; }\n set color(newValue: ThemePalette) { this._color = newValue; }\n private _color: ThemePalette;\n\n /**\n * This is set to true after the first OnChanges cycle so we don't clear the value of `selected`\n * in the first cycle.\n */\n private _inputsInitialized = false;\n /** Value of the option */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (\n this.selected &&\n !this.selectionList.compareWith(newValue, this.value) &&\n this._inputsInitialized\n ) {\n this.selected = false;\n }\n\n this._value = newValue;\n }\n private _value: any;\n\n /** Whether the option is disabled. */\n @Input()\n get disabled() { return this._disabled || (this.selectionList && this.selectionList.disabled); }\n set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Whether the option is selected. */\n @Input()\n get selected(): boolean { return this.selectionList.selectedOptions.isSelected(this); }\n set selected(value: boolean) {\n const isSelected = coerceBooleanProperty(value);\n\n if (isSelected !== this._selected) {\n this._setSelected(isSelected);\n\n if (isSelected || this.selectionList.multiple) {\n this.selectionList._reportValueChange();\n }\n }\n }\n\n constructor(private _element: ElementRef<HTMLElement>,\n private _changeDetector: ChangeDetectorRef,\n /** @docs-private */\n @Inject(forwardRef(() => MatSelectionList)) public selectionList: MatSelectionList) {\n super();\n }\n\n ngOnInit() {\n const list = this.selectionList;\n\n if (list._value && list._value.some(value => list.compareWith(value, this._value))) {\n this._setSelected(true);\n }\n\n const wasSelected = this._selected;\n\n // List options that are selected at initialization can't be reported properly to the form\n // control. This is because it takes some time until the selection-list knows about all\n // available options. Also it can happen that the ControlValueAccessor has an initial value\n // that should be used instead. Deferring the value change report to the next tick ensures\n // that the form control value is not being overwritten.\n Promise.resolve().then(() => {\n if (this._selected || wasSelected) {\n this.selected = true;\n this._changeDetector.markForCheck();\n }\n });\n this._inputsInitialized = true;\n }\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy(): void {\n if (this.selected) {\n // We have to delay this until the next tick in order\n // to avoid changed after checked errors.\n Promise.resolve().then(() => {\n this.selected = false;\n });\n }\n\n const hadFocus = this._hasFocus;\n const newActiveItem = this.selectionList._removeOptionFromList(this);\n\n // Only move focus if this option was focused at the time it was destroyed.\n if (hadFocus && newActiveItem) {\n newActiveItem.focus();\n }\n }\n\n /** Toggles the selection state of the option. */\n toggle(): void {\n this.selected = !this.selected;\n }\n\n /** Allows for programmatic focusing of the option. */\n focus(): void {\n this._element.nativeElement.focus();\n }\n\n /**\n * Returns the list item's text label. Implemented as a part of the FocusKeyManager.\n * @docs-private\n */\n getLabel() {\n return this._text ? (this._text.nativeElement.textContent || '') : '';\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return this.disabled || this.disableRipple || this.selectionList.disableRipple;\n }\n\n _handleClick() {\n if (!this.disabled && (this.selectionList.multiple || !this.selected)) {\n this.toggle();\n\n // Emit a change event if the selected state of the option changed through user interaction.\n this.selectionList._emitChangeEvent([this]);\n }\n }\n\n _handleFocus() {\n this.selectionList._setFocusedOption(this);\n this._hasFocus = true;\n }\n\n _handleBlur() {\n this.selectionList._onTouched();\n this._hasFocus = false;\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n /** Sets the selected state of the option. Returns whether the value has changed. */\n _setSelected(selected: boolean): boolean {\n if (selected === this._selected) {\n return false;\n }\n\n this._selected = selected;\n\n if (selected) {\n this.selectionList.selectedOptions.select(this);\n } else {\n this.selectionList.selectedOptions.deselect(this);\n }\n\n this._changeDetector.markForCheck();\n return true;\n }\n\n /**\n * Notifies Angular that the option needs to be checked in the next change detection run. Mainly\n * used to trigger an update of the list option if the disabled state of the selection list\n * changed.\n */\n _markForCheck() {\n this._changeDetector.markForCheck();\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_selected: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n\n\n/**\n * Material Design list component where each item is a selectable option. Behaves as a listbox.\n */\n@Component({\n selector: 'mat-selection-list',\n exportAs: 'matSelectionList',\n inputs: ['disableRipple'],\n host: {\n 'role': 'listbox',\n 'class': 'mat-selection-list mat-list-base',\n '(keydown)': '_keydown($event)',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.tabindex]': '_tabIndex',\n },\n template: '<ng-content></ng-content>',\n styleUrls: ['list.css'],\n encapsulation: ViewEncapsulation.None,\n providers: [MAT_SELECTION_LIST_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatSelectionList extends _MatSelectionListBase implements CanDisableRipple,\n AfterContentInit, ControlValueAccessor, OnDestroy, OnChanges {\n private _multiple = true;\n private _contentInitialized = false;\n\n /** The FocusKeyManager which handles focus. */\n _keyManager: FocusKeyManager<MatListOption>;\n\n /** The option components contained within this selection-list. */\n @ContentChildren(MatListOption, {descendants: true}) options: QueryList<MatListOption>;\n\n /** Emits a change event whenever the selected state of an option changes. */\n @Output() readonly selectionChange: EventEmitter<MatSelectionListChange> =\n new EventEmitter<MatSelectionListChange>();\n\n /**\n * Tabindex of the selection list.\n * @breaking-change 11.0.0 Remove `tabIndex` input.\n */\n @Input() tabIndex: number = 0;\n\n /** Theme color of the selection list. This sets the checkbox color for all list options. */\n @Input() color: ThemePalette = 'accent';\n\n /**\n * Function used for comparing an option against the selected value when determining which\n * options should appear as selected. The first argument is the value of an options. The second\n * one is a value from the selected value. A boolean must be returned.\n */\n @Input() compareWith: (o1: any, o2: any) => boolean = (a1, a2) => a1 === a2;\n\n /** Whether the selection list is disabled. */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // The `MatSelectionList` and `MatListOption` are using the `OnPush` change detection\n // strategy. Therefore the options will not check for any changes if the `MatSelectionList`\n // changed its state. Since we know that a change to `disabled` property of the list affects\n // the state of the options, we manually mark each option for check.\n this._markOptionsForCheck();\n }\n private _disabled: boolean = false;\n\n /** Whether selection is limited to one or multiple items (default multiple). */\n @Input()\n get multiple(): boolean { return this._multiple; }\n set multiple(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._multiple) {\n if (this._contentInitialized && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new Error(\n 'Cannot change `multiple` mode of mat-selection-list after initialization.');\n }\n\n this._multiple = newValue;\n this.selectedOptions = new SelectionModel(this._multiple, this.selectedOptions.selected);\n }\n }\n\n /** The currently selected options. */\n selectedOptions = new SelectionModel<MatListOption>(this._multiple);\n\n /** The tabindex of the selection list. */\n _tabIndex = -1;\n\n /** View to model callback that should be called whenever the selected options change. */\n private _onChange: (value: any) => void = (_: any) => {};\n\n /** Keeps track of the currently-selected value. */\n _value: string[]|null;\n\n /** Emits when the list has been destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n /** View to model callback that should be called if the list or its options lost focus. */\n _onTouched: () => void = () => {};\n\n /** Whether the list has been destroyed. */\n private _isDestroyed: boolean;\n\n constructor(private _element: ElementRef<HTMLElement>,\n // @breaking-change 11.0.0 Remove `tabIndex` parameter.\n @Attribute('tabindex') tabIndex: string,\n private _changeDetector: ChangeDetectorRef,\n // @breaking-change 11.0.0 `_focusMonitor` parameter to become required.\n private _focusMonitor?: FocusMonitor) {\n super();\n }\n\n ngAfterContentInit(): void {\n this._contentInitialized = true;\n\n this._keyManager = new FocusKeyManager<MatListOption>(this.options)\n .withWrap()\n .withTypeAhead()\n .withHomeAndEnd()\n // Allow disabled items to be focusable. For accessibility reasons, there must be a way for\n // screenreader users, that allows reading the different options of the list.\n .skipPredicate(() => false)\n .withAllowedModifierKeys(['shiftKey']);\n\n if (this._value) {\n this._setOptionsFromValues(this._value);\n }\n\n // If the user attempts to tab out of the selection list, allow focus to escape.\n this._keyManager.tabOut.pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._allowFocusEscape();\n });\n\n // When the number of options change, update the tabindex of the selection list.\n this.options.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n this._updateTabIndex();\n });\n\n // Sync external changes to the model back to the options.\n this.selectedOptions.changed.pipe(takeUntil(this._destroyed)).subscribe(event => {\n if (event.added) {\n for (let item of event.added) {\n item.selected = true;\n }\n }\n\n if (event.removed) {\n for (let item of event.removed) {\n item.selected = false;\n }\n }\n });\n\n // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.\n this._focusMonitor?.monitor(this._element)\n .pipe(takeUntil(this._destroyed))\n .subscribe(origin => {\n if (origin === 'keyboard' || origin === 'program') {\n let toFocus = 0;\n for (let i = 0; i < this.options.length; i++) {\n if (this.options.get(i)?.selected) {\n toFocus = i;\n break;\n }\n }\n this._keyManager.setActiveItem(toFocus);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const disableRippleChanges = changes['disableRipple'];\n const colorChanges = changes['color'];\n\n if ((disableRippleChanges && !disableRippleChanges.firstChange) ||\n (colorChanges && !colorChanges.firstChange)) {\n this._markOptionsForCheck();\n }\n }\n\n ngOnDestroy() {\n // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.\n this._focusMonitor?.stopMonitoring(this._element);\n this._destroyed.next();\n this._destroyed.complete();\n this._isDestroyed = true;\n }\n\n /** Focuses the selection list. */\n focus(options?: FocusOptions) {\n this._element.nativeElement.focus(options);\n }\n\n /** Selects all of the options. Returns the options that changed as a result. */\n selectAll(): MatListOption[] {\n return this._setAllOptionsSelected(true);\n }\n\n /** Deselects all of the options. Returns the options that changed as a result. */\n deselectAll(): MatListOption[] {\n return this._setAllOptionsSelected(false);\n }\n\n /** Sets the focused option of the selection-list. */\n _setFocusedOption(option: MatListOption) {\n this._keyManager.updateActiveItem(option);\n }\n\n /**\n * Removes an option from the selection list and updates the active item.\n * @returns Currently-active item.\n */\n _removeOptionFromList(option: MatListOption): MatListOption | null {\n const optionIndex = this._getOptionIndex(option);\n\n if (optionIndex > -1 && this._keyManager.activeItemIndex === optionIndex) {\n // Check whether the option is the last item\n if (optionIndex > 0) {\n this._keyManager.updateActiveItem(optionIndex - 1);\n } else if (optionIndex === 0 && this.options.length > 1) {\n this._keyManager.updateActiveItem(Math.min(optionIndex + 1, this.options.length - 1));\n }\n }\n\n return this._keyManager.activeItem;\n }\n\n /** Passes relevant key presses to our key manager. */\n _keydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n const previousFocusIndex = manager.activeItemIndex;\n const hasModifier = hasModifierKey(event);\n\n switch (keyCode) {\n case SPACE:\n case ENTER:\n if (!hasModifier && !manager.isTyping()) {\n this._toggleFocusedOption();\n // Always prevent space from scrolling the page since the list has focus\n event.preventDefault();\n }\n break;\n default:\n // The \"A\" key gets special treatment, because it's used for the \"select all\" functionality.\n if (keyCode === A && this.multiple && hasModifierKey(event, 'ctrlKey') &&\n !manager.isTyping()) {\n const shouldSelect = this.options.some(option => !option.disabled && !option.selected);\n this._setAllOptionsSelected(shouldSelect, true, true);\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n }\n\n if (this.multiple && (keyCode === UP_ARROW || keyCode === DOWN_ARROW) && event.shiftKey &&\n manager.activeItemIndex !== previousFocusIndex) {\n this._toggleFocusedOption();\n }\n }\n\n /** Reports a value change to the ControlValueAccessor */\n _reportValueChange() {\n // Stop reporting value changes after the list has been destroyed. This avoids\n // cases where the list might wrongly reset its value once it is removed, but\n // the form control is still live.\n if (this.options && !this._isDestroyed) {\n const value = this._getSelectedOptionValues();\n this._onChange(value);\n this._value = value;\n }\n }\n\n /** Emits a change event if the selected state of an option changed. */\n _emitChangeEvent(options: MatListOption[]) {\n this.selectionChange.emit(new MatSelectionListChange(this, options[0], options));\n }\n\n /** Implemented as part of ControlValueAccessor. */\n writeValue(values: string[]): void {\n this._value = values;\n\n if (this.options) {\n this._setOptionsFromValues(values || []);\n }\n }\n\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn: (value: any) => void): void {\n this._onChange = fn;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n /** Sets the selected options based on the specified values. */\n private _setOptionsFromValues(values: string[]) {\n this.options.forEach(option => option._setSelected(false));\n\n values.forEach(value => {\n const correspondingOption = this.options.find(option => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n return option.selected ? false : this.compareWith(option.value, value);\n });\n\n if (correspondingOption) {\n correspondingOption._setSelected(true);\n }\n });\n }\n\n /** Returns the values of the selected options. */\n private _getSelectedOptionValues(): string[] {\n return this.options.filter(option => option.selected).map(option => option.value);\n }\n\n /** Toggles the state of the currently focused option if enabled. */\n private _toggleFocusedOption(): void {\n let focusedIndex = this._keyManager.activeItemIndex;\n\n if (focusedIndex != null && this._isValidIndex(focusedIndex)) {\n let focusedOption: MatListOption = this.options.toArray()[focusedIndex];\n\n if (focusedOption && !focusedOption.disabled && (this._multiple || !focusedOption.selected)) {\n focusedOption.toggle();\n\n // Emit a change event because the focused option changed its state through user\n // interaction.\n this._emitChangeEvent([focusedOption]);\n }\n }\n }\n\n /**\n * Sets the selected state on all of the options\n * and emits an event if anything changed.\n */\n private _setAllOptionsSelected(\n isSelected: boolean,\n skipDisabled?: boolean,\n isUserInput?: boolean): MatListOption[] {\n // Keep track of whether anything changed, because we only want to\n // emit the changed event when something actually changed.\n const changedOptions: MatListOption[] = [];\n\n this.options.forEach(option => {\n if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {\n changedOptions.push(option);\n }\n });\n\n if (changedOptions.length) {\n this._reportValueChange();\n\n if (isUserInput) {\n this._emitChangeEvent(changedOptions);\n }\n }\n\n return changedOptions;\n }\n\n /**\n * Utility to ensure all indexes are valid.\n * @param index The index to be checked.\n * @returns True if the index is valid for our list of options.\n */\n private _isValidIndex(index: number): boolean {\n return index >= 0 && index < this.options.length;\n }\n\n /** Returns the index of the specified list option. */\n private _getOptionIndex(option: MatListOption): number {\n return this.options.toArray().indexOf(option);\n }\n\n /** Marks all the options to be checked in the next change detection run. */\n private _markOptionsForCheck() {\n if (this.options) {\n this.options.forEach(option => option._markForCheck());\n }\n }\n\n /**\n * Removes the tabindex from the selection list and resets it back afterwards, allowing the user\n * to tab out of it. This prevents the list from capturing focus and redirecting it back within\n * the list, creating a focus trap if it user tries to tab away.\n */\n private _allowFocusEscape() {\n this._tabIndex = -1;\n\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }\n\n /** Updates the tabindex based upon if the selection list is empty. */\n private _updateTabIndex(): void {\n this._tabIndex = (this.options.length === 0) ? -1 : 0;\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_multiple: BooleanInput;\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 {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n MatCommonModule,\n MatLineModule,\n MatPseudoCheckboxModule,\n MatRippleModule,\n} from '@angular/material/core';\nimport {\n MatList,\n MatNavList,\n MatListAvatarCssMatStyler,\n MatListIconCssMatStyler,\n MatListItem,\n MatListSubheaderCssMatStyler,\n} from './list';\nimport {MatListOption, MatSelectionList} from './selection-list';\nimport {MatDividerModule} from '@angular/material/divider';\n\n\n@NgModule({\n imports: [MatLineModule, MatRippleModule, MatCommonModule, MatPseudoCheckboxModule, CommonModule],\n exports: [\n MatList,\n MatNavList,\n MatListItem,\n MatListAvatarCssMatStyler,\n MatLineModule,\n MatCommonModule,\n MatListIconCssMatStyler,\n MatListSubheaderCssMatStyler,\n MatPseudoCheckboxModule,\n MatSelectionList,\n MatListOption,\n MatDividerModule\n ],\n declarations: [\n MatList,\n MatNavList,\n MatListItem,\n MatListAvatarCssMatStyler,\n MatListIconCssMatStyler,\n MatListSubheaderCssMatStyler,\n MatSelectionList,\n MatListOption\n ],\n})\nexport class MatListModule {}\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 './list-module';\nexport * from './list';\nexport * from './selection-list';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B,EAAE,qBAAqB;oBAC7C,iBAAiB,EAAE,WAAW;iBAC/B;gBACD,QAAQ,EAAE,2BAA2B;gBAErC,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,SAAS,EAAE,CAAC,iCAAiC,CAAC;gBAC9C,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAChD;;;YA1TC,UAAU;yCAgZP,SAAS,SAAC,UAAU;YApZvB,iBAAiB;YAfuB,YAAY;;;sBAuVnD,eAAe,SAAC,aAAa,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC;8BAGlD,MAAM;uBAON,KAAK;oBAGL,KAAK;0BAOL,KAAK;uBAGL,KAAK;uBAcL,KAAK;;;ACpYR;;;;;;;MAuDa,aAAa;;;YA3BzB,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,uBAAuB,EAAE,YAAY,CAAC;gBACjG,OAAO,EAAE;oBACP,OAAO;oBACP,UAAU;oBACV,WAAW;oBACX,yBAAyB;oBACzB,aAAa;oBACb,eAAe;oBACf,uBAAuB;oBACvB,4BAA4B;oBAC5B,uBAAuB;oBACvB,gBAAgB;oBAChB,aAAa;oBACb,gBAAgB;iBACjB;gBACD,YAAY,EAAE;oBACZ,OAAO;oBACP,UAAU;oBACV,WAAW;oBACX,yBAAyB;oBACzB,uBAAuB;oBACvB,4BAA4B;oBAC5B,gBAAgB;oBAChB,aAAa;iBACd;aACF;;;ACtDD;;;;;;;;ACAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"radio__testing.js","sources":["../../../../../../src/material/radio/testing/radio-harness.ts","../../../../../../src/material/radio/testing/radio-harness-filters.ts","../../../../../../src/material/radio/testing/public-api.ts","../../../../../../src/material/radio/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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AsyncFactoryFn,\n BaseHarnessFilters,\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\nexport abstract class _MatRadioGroupHarnessBase<\n ButtonType extends (ComponentHarnessConstructor<Button> & {\n with: (options?: ButtonFilters) => HarnessPredicate<Button>}),\n Button extends ComponentHarness & {\n isChecked(): Promise<boolean>, getValue(): Promise<string|null>,\n getName(): Promise<string|null>, check(): Promise<void>\n },\n ButtonFilters extends BaseHarnessFilters\n> extends ComponentHarness {\n protected abstract _buttonClass: ButtonType;\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string|null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string|null> {\n return (await this.host()).getProperty('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<Button|null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string|null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter?: ButtonFilters): Promise<Button[]> {\n return this.locatorForAll(this._buttonClass.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter?: ButtonFilters): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string|null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n protected static async _checkRadioGroupName(\n harness: _MatRadioGroupHarnessBase<any, any, any>, name: string) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if (await harness._getGroupNameFromHost() === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`);\n }\n return true;\n }\n}\n\n/** Harness for interacting with a standard mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends _MatRadioGroupHarnessBase<\n typeof MatRadioButtonHarness,\n MatRadioButtonHarness,\n RadioButtonHarnessFilters\n> {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-radio-group';\n protected _buttonClass = MatRadioButtonHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioGroupHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioGroupHarnessFilters = {}): HarnessPredicate<MatRadioGroupHarness> {\n return new HarnessPredicate(MatRadioGroupHarness, options)\n .addOption('name', options.name, this._checkRadioGroupName);\n }\n}\n\nexport abstract class _MatRadioButtonHarnessBase extends ComponentHarness {\n protected abstract _textLabel: AsyncFactoryFn<TestElement>;\n protected abstract _clickLabel: AsyncFactoryFn<TestElement>;\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this._input()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string|null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string|null> {\n return (await this.host()).getProperty('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string|null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n\n/** Harness for interacting with a standard mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends _MatRadioButtonHarnessBase {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioButtonHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioButtonHarnessFilters = {}): HarnessPredicate<MatRadioButtonHarness> {\n return new HarnessPredicate(MatRadioButtonHarness, options)\n .addOption('label', options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))\n .addOption('name', options.name,\n async (harness, name) => (await harness.getName()) === name);\n }\n\n protected _textLabel = this.locatorFor('.mat-radio-label-content');\n protected _clickLabel = this.locatorFor('.mat-radio-label');\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 `MatRadioGroupHarness` instances. */\nexport interface RadioGroupHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose name attribute is the given value. */\n name?: string;\n}\n\n/** A set of criteria that can be used to filter a list of `MatRadioButtonHarness` instances. */\nexport interface RadioButtonHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose label matches the given value. */\n label?: string | RegExp;\n /** Only find instances whose name attribute is the given value. */\n name?: string;\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\nexport * from './radio-harness';\nexport * from './radio-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":";;;;AAAA;;;;;;;MAmBsB,yBAQpB,SAAQ,gBAAgB;;IAIlB,OAAO;;YACX,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;;;;YAIpD,IAAI,QAAQ,KAAK,IAAI,EAAE;gBACrB,OAAO,QAAQ,CAAC;aACjB;;;;YAID,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAC1D,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,OAAO,IAAI,CAAC;aACb;YACD,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,EAAE;gBAClD,MAAM,KAAK,CAAC,sDAAsD,CAAC,CAAC;aACrE;YACD,OAAO,UAAU,CAAC,CAAC,CAAE,CAAC;SACvB;KAAA;;IAGK,KAAK;;YACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;SAC9C;KAAA;;IAGK,qBAAqB;;YACzB,KAAK,IAAI,WAAW,IAAI,MAAM,IAAI,CAAC,eAAe,EAAE,EAAE;gBACpD,IAAI,MAAM,WAAW,CAAC,SAAS,EAAE,EAAE;oBACjC,OAAO,WAAW,CAAC;iBACpB;aACF;YACD,OAAO,IAAI,CAAC;SACb;KAAA;;IAGK,eAAe;;YACnB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;Y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BY,eAAU,GAAG,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;QACzD,gBAAW,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;KAC7D;;;;;;;IAVC,OAAO,IAAI,CAAC,UAAqC,EAAE;QACjD,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO,CAAC;aACtD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAC/B,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC;aACnF,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAC7B,CAAO,OAAO,EAAE,IAAI,oDAAK,OAAA,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA,GAAA,CAAC,CAAC;KACpE;;AAfD;AACO,kCAAY,GAAG,mBAAmB;;ACjQ3C;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;"}
1
+ {"version":3,"file":"radio__testing.js","sources":["../../../../../../src/material/radio/testing/radio-harness.ts","../../../../../../src/material/radio/testing/radio-harness-filters.ts","../../../../../../src/material/radio/testing/public-api.ts","../../../../../../src/material/radio/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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AsyncFactoryFn,\n BaseHarnessFilters,\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\nexport abstract class _MatRadioGroupHarnessBase<\n ButtonType extends (ComponentHarnessConstructor<Button> & {\n with: (options?: ButtonFilters) => HarnessPredicate<Button>}),\n Button extends ComponentHarness & {\n isChecked(): Promise<boolean>, getValue(): Promise<string|null>,\n getName(): Promise<string|null>, check(): Promise<void>\n },\n ButtonFilters extends BaseHarnessFilters\n> extends ComponentHarness {\n protected abstract _buttonClass: ButtonType;\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string|null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string|null> {\n return (await this.host()).getProperty<string|null>('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<Button|null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string|null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter?: ButtonFilters): Promise<Button[]> {\n return this.locatorForAll(this._buttonClass.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter?: ButtonFilters): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string|null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n protected static async _checkRadioGroupName(\n harness: _MatRadioGroupHarnessBase<any, any, any>, name: string) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if (await harness._getGroupNameFromHost() === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`);\n }\n return true;\n }\n}\n\n/** Harness for interacting with a standard mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends _MatRadioGroupHarnessBase<\n typeof MatRadioButtonHarness,\n MatRadioButtonHarness,\n RadioButtonHarnessFilters\n> {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-radio-group';\n protected _buttonClass = MatRadioButtonHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioGroupHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioGroupHarnessFilters = {}): HarnessPredicate<MatRadioGroupHarness> {\n return new HarnessPredicate(MatRadioGroupHarness, options)\n .addOption('name', options.name, this._checkRadioGroupName);\n }\n}\n\nexport abstract class _MatRadioButtonHarnessBase extends ComponentHarness {\n protected abstract _textLabel: AsyncFactoryFn<TestElement>;\n protected abstract _clickLabel: AsyncFactoryFn<TestElement>;\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty<boolean>('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this._input()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string|null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string|null> {\n return (await this.host()).getProperty<string>('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string|null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n\n/** Harness for interacting with a standard mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends _MatRadioButtonHarnessBase {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioButtonHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioButtonHarnessFilters = {}): HarnessPredicate<MatRadioButtonHarness> {\n return new HarnessPredicate(MatRadioButtonHarness, options)\n .addOption('label', options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))\n .addOption('name', options.name,\n async (harness, name) => (await harness.getName()) === name);\n }\n\n protected _textLabel = this.locatorFor('.mat-radio-label-content');\n protected _clickLabel = this.locatorFor('.mat-radio-label');\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 `MatRadioGroupHarness` instances. */\nexport interface RadioGroupHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose name attribute is the given value. */\n name?: string;\n}\n\n/** A set of criteria that can be used to filter a list of `MatRadioButtonHarness` instances. */\nexport interface RadioButtonHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose label matches the given value. */\n label?: string | RegExp;\n /** Only find instances whose name attribute is the given value. */\n name?: string;\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\nexport * from './radio-harness';\nexport * from './radio-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 L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,EAC/B,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC;aACnF,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAC7B,CAAO,OAAO,EAAE,IAAI,oDAAK,OAAA,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA,GAAA,CAAC,CAAC;KACpE;;AAfD;AACO,kCAAY,GAAG,mBAAmB;;ACjQ3C;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;"}
package/fesm2015/radio.js CHANGED
@@ -531,7 +531,7 @@ MatRadioButton.decorators = [
531
531
  '(focus)': '_inputElement.nativeElement.focus()',
532
532
  },
533
533
  changeDetection: ChangeDetectionStrategy.OnPush,
534
- styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-ripple,.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-ripple{outline:solid 3px}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"]
534
+ styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-ripple,.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-ripple{outline:solid 3px}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"]
535
535
  },] }
536
536
  ];
537
537
  MatRadioButton.ctorParameters = () => [
@@ -956,7 +956,15 @@ class MatSelect extends _MatSelectBase {
956
956
  _scrollOptionIntoView(index) {
957
957
  const labelCount = _countGroupLabelsBeforeOption(index, this.options, this.optionGroups);
958
958
  const itemHeight = this._getItemHeight();
959
- this.panel.nativeElement.scrollTop = _getOptionScrollPosition((index + labelCount) * itemHeight, itemHeight, this.panel.nativeElement.scrollTop, SELECT_PANEL_MAX_HEIGHT);
959
+ if (index === 0 && labelCount === 1) {
960
+ // If we've got one group label before the option and we're at the top option,
961
+ // scroll the list to the top. This is better UX than scrolling the list to the
962
+ // top of the option, because it allows the user to read the top group's label.
963
+ this.panel.nativeElement.scrollTop = 0;
964
+ }
965
+ else {
966
+ this.panel.nativeElement.scrollTop = _getOptionScrollPosition((index + labelCount) * itemHeight, itemHeight, this.panel.nativeElement.scrollTop, SELECT_PANEL_MAX_HEIGHT);
967
+ }
960
968
  }
961
969
  _positioningSettled() {
962
970
  this._calculateOverlayOffsetX();