@angular/material 12.1.4 → 12.2.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 (195) hide show
  1. package/bundles/material-autocomplete-testing.umd.js +10 -4
  2. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  3. package/bundles/material-autocomplete.umd.js +10 -4
  4. package/bundles/material-autocomplete.umd.js.map +1 -1
  5. package/bundles/material-badge-testing.umd.js +10 -4
  6. package/bundles/material-badge-testing.umd.js.map +1 -1
  7. package/bundles/material-badge.umd.js +10 -4
  8. package/bundles/material-badge.umd.js.map +1 -1
  9. package/bundles/material-bottom-sheet-testing.umd.js +10 -4
  10. package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
  11. package/bundles/material-bottom-sheet.umd.js +10 -4
  12. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  13. package/bundles/material-button-testing.umd.js +10 -4
  14. package/bundles/material-button-testing.umd.js.map +1 -1
  15. package/bundles/material-button-toggle-testing.umd.js +10 -4
  16. package/bundles/material-button-toggle-testing.umd.js.map +1 -1
  17. package/bundles/material-button-toggle.umd.js +10 -4
  18. package/bundles/material-button-toggle.umd.js.map +1 -1
  19. package/bundles/material-button.umd.js +10 -4
  20. package/bundles/material-button.umd.js.map +1 -1
  21. package/bundles/material-card-testing.umd.js +10 -4
  22. package/bundles/material-card-testing.umd.js.map +1 -1
  23. package/bundles/material-checkbox-testing.umd.js +10 -4
  24. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  25. package/bundles/material-checkbox.umd.js +11 -5
  26. package/bundles/material-checkbox.umd.js.map +1 -1
  27. package/bundles/material-chips-testing.umd.js +44 -6
  28. package/bundles/material-chips-testing.umd.js.map +1 -1
  29. package/bundles/material-chips.umd.js +10 -4
  30. package/bundles/material-chips.umd.js.map +1 -1
  31. package/bundles/material-core-testing.umd.js +10 -4
  32. package/bundles/material-core-testing.umd.js.map +1 -1
  33. package/bundles/material-core.umd.js +25 -18
  34. package/bundles/material-core.umd.js.map +1 -1
  35. package/bundles/material-datepicker-testing.umd.js +10 -4
  36. package/bundles/material-datepicker-testing.umd.js.map +1 -1
  37. package/bundles/material-datepicker.umd.js +11 -5
  38. package/bundles/material-datepicker.umd.js.map +1 -1
  39. package/bundles/material-dialog-testing.umd.js +10 -4
  40. package/bundles/material-dialog-testing.umd.js.map +1 -1
  41. package/bundles/material-dialog.umd.js +10 -4
  42. package/bundles/material-dialog.umd.js.map +1 -1
  43. package/bundles/material-divider-testing.umd.js +10 -4
  44. package/bundles/material-divider-testing.umd.js.map +1 -1
  45. package/bundles/material-expansion-testing.umd.js +10 -4
  46. package/bundles/material-expansion-testing.umd.js.map +1 -1
  47. package/bundles/material-expansion.umd.js +11 -5
  48. package/bundles/material-expansion.umd.js.map +1 -1
  49. package/bundles/material-form-field-testing-control.umd.js +10 -4
  50. package/bundles/material-form-field-testing-control.umd.js.map +1 -1
  51. package/bundles/material-form-field-testing.umd.js +10 -4
  52. package/bundles/material-form-field-testing.umd.js.map +1 -1
  53. package/bundles/material-form-field.umd.js +10 -4
  54. package/bundles/material-form-field.umd.js.map +1 -1
  55. package/bundles/material-grid-list-testing.umd.js +10 -4
  56. package/bundles/material-grid-list-testing.umd.js.map +1 -1
  57. package/bundles/material-grid-list.umd.js +10 -4
  58. package/bundles/material-grid-list.umd.js.map +1 -1
  59. package/bundles/material-icon-testing.umd.js +10 -4
  60. package/bundles/material-icon-testing.umd.js.map +1 -1
  61. package/bundles/material-icon.umd.js +10 -4
  62. package/bundles/material-icon.umd.js.map +1 -1
  63. package/bundles/material-input-testing.umd.js +10 -4
  64. package/bundles/material-input-testing.umd.js.map +1 -1
  65. package/bundles/material-input.umd.js +10 -4
  66. package/bundles/material-input.umd.js.map +1 -1
  67. package/bundles/material-list-testing.umd.js +10 -4
  68. package/bundles/material-list-testing.umd.js.map +1 -1
  69. package/bundles/material-list.umd.js +18 -4
  70. package/bundles/material-list.umd.js.map +1 -1
  71. package/bundles/material-menu-testing.umd.js +10 -4
  72. package/bundles/material-menu-testing.umd.js.map +1 -1
  73. package/bundles/material-menu.umd.js +12 -6
  74. package/bundles/material-menu.umd.js.map +1 -1
  75. package/bundles/material-paginator-testing.umd.js +10 -4
  76. package/bundles/material-paginator-testing.umd.js.map +1 -1
  77. package/bundles/material-paginator.umd.js +10 -4
  78. package/bundles/material-paginator.umd.js.map +1 -1
  79. package/bundles/material-progress-bar-testing.umd.js +10 -4
  80. package/bundles/material-progress-bar-testing.umd.js.map +1 -1
  81. package/bundles/material-progress-bar.umd.js +10 -4
  82. package/bundles/material-progress-bar.umd.js.map +1 -1
  83. package/bundles/material-progress-spinner-testing.umd.js +10 -4
  84. package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
  85. package/bundles/material-progress-spinner.umd.js +10 -4
  86. package/bundles/material-progress-spinner.umd.js.map +1 -1
  87. package/bundles/material-radio-testing.umd.js +10 -4
  88. package/bundles/material-radio-testing.umd.js.map +1 -1
  89. package/bundles/material-radio.umd.js +10 -4
  90. package/bundles/material-radio.umd.js.map +1 -1
  91. package/bundles/material-select-testing.umd.js +10 -4
  92. package/bundles/material-select-testing.umd.js.map +1 -1
  93. package/bundles/material-select.umd.js +10 -4
  94. package/bundles/material-select.umd.js.map +1 -1
  95. package/bundles/material-sidenav-testing.umd.js +10 -4
  96. package/bundles/material-sidenav-testing.umd.js.map +1 -1
  97. package/bundles/material-sidenav.umd.js +10 -4
  98. package/bundles/material-sidenav.umd.js.map +1 -1
  99. package/bundles/material-slide-toggle-testing.umd.js +10 -4
  100. package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
  101. package/bundles/material-slide-toggle.umd.js +12 -5
  102. package/bundles/material-slide-toggle.umd.js.map +1 -1
  103. package/bundles/material-slider-testing.umd.js +10 -4
  104. package/bundles/material-slider-testing.umd.js.map +1 -1
  105. package/bundles/material-slider.umd.js +10 -4
  106. package/bundles/material-slider.umd.js.map +1 -1
  107. package/bundles/material-snack-bar-testing.umd.js +10 -4
  108. package/bundles/material-snack-bar-testing.umd.js.map +1 -1
  109. package/bundles/material-snack-bar.umd.js +10 -4
  110. package/bundles/material-snack-bar.umd.js.map +1 -1
  111. package/bundles/material-sort-testing.umd.js +10 -4
  112. package/bundles/material-sort-testing.umd.js.map +1 -1
  113. package/bundles/material-sort.umd.js +10 -4
  114. package/bundles/material-sort.umd.js.map +1 -1
  115. package/bundles/material-stepper-testing.umd.js +10 -4
  116. package/bundles/material-stepper-testing.umd.js.map +1 -1
  117. package/bundles/material-stepper.umd.js +10 -4
  118. package/bundles/material-stepper.umd.js.map +1 -1
  119. package/bundles/material-table-testing.umd.js +10 -4
  120. package/bundles/material-table-testing.umd.js.map +1 -1
  121. package/bundles/material-table.umd.js +10 -4
  122. package/bundles/material-table.umd.js.map +1 -1
  123. package/bundles/material-tabs-testing.umd.js +10 -4
  124. package/bundles/material-tabs-testing.umd.js.map +1 -1
  125. package/bundles/material-tabs.umd.js +11 -5
  126. package/bundles/material-tabs.umd.js.map +1 -1
  127. package/bundles/material-toolbar-testing.umd.js +10 -4
  128. package/bundles/material-toolbar-testing.umd.js.map +1 -1
  129. package/bundles/material-toolbar.umd.js +10 -4
  130. package/bundles/material-toolbar.umd.js.map +1 -1
  131. package/bundles/material-tooltip-testing.umd.js +10 -4
  132. package/bundles/material-tooltip-testing.umd.js.map +1 -1
  133. package/bundles/material-tooltip.umd.js +10 -4
  134. package/bundles/material-tooltip.umd.js.map +1 -1
  135. package/bundles/material-tree-testing.umd.js +10 -4
  136. package/bundles/material-tree-testing.umd.js.map +1 -1
  137. package/bundles/material-tree.umd.js +10 -4
  138. package/bundles/material-tree.umd.js.map +1 -1
  139. package/checkbox/index.metadata.json +1 -1
  140. package/chips/testing/chip-avatar-harness.d.ts +20 -0
  141. package/chips/testing/chip-harness-filters.d.ts +3 -0
  142. package/chips/testing/chip-harness.d.ts +10 -4
  143. package/core/common-behaviors/common-module.d.ts +2 -2
  144. package/core/index.metadata.json +1 -1
  145. package/core/style/_menu-common.scss +22 -24
  146. package/core/theming/_theming.scss +3 -1
  147. package/datepicker/index.metadata.json +1 -1
  148. package/esm2015/checkbox/checkbox.js +2 -2
  149. package/esm2015/chips/testing/chip-avatar-harness.js +22 -0
  150. package/esm2015/chips/testing/chip-harness-filters.js +1 -1
  151. package/esm2015/chips/testing/chip-harness.js +14 -4
  152. package/esm2015/core/common-behaviors/common-module.js +15 -14
  153. package/esm2015/core/version.js +1 -1
  154. package/esm2015/datepicker/calendar-body.js +2 -2
  155. package/esm2015/expansion/expansion-panel.js +2 -2
  156. package/esm2015/list/selection-list.js +9 -1
  157. package/esm2015/menu/menu-item.js +2 -2
  158. package/esm2015/menu/menu.js +1 -1
  159. package/esm2015/slide-toggle/slide-toggle.js +3 -2
  160. package/esm2015/tabs/tab-group.js +1 -1
  161. package/expansion/expansion-panel.d.ts +1 -1
  162. package/fesm2015/checkbox.js +1 -1
  163. package/fesm2015/checkbox.js.map +1 -1
  164. package/fesm2015/chips/testing.js +33 -3
  165. package/fesm2015/chips/testing.js.map +1 -1
  166. package/fesm2015/core.js +15 -14
  167. package/fesm2015/core.js.map +1 -1
  168. package/fesm2015/datepicker.js +1 -1
  169. package/fesm2015/datepicker.js.map +1 -1
  170. package/fesm2015/expansion.js +1 -1
  171. package/fesm2015/expansion.js.map +1 -1
  172. package/fesm2015/list.js +9 -1
  173. package/fesm2015/list.js.map +1 -1
  174. package/fesm2015/menu.js +2 -2
  175. package/fesm2015/menu.js.map +1 -1
  176. package/fesm2015/slide-toggle.js +2 -1
  177. package/fesm2015/slide-toggle.js.map +1 -1
  178. package/fesm2015/tabs.js +1 -1
  179. package/list/index.metadata.json +1 -1
  180. package/list/selection-list.d.ts +6 -0
  181. package/menu/_menu-theme.scss +2 -2
  182. package/menu/index.metadata.json +1 -1
  183. package/package.json +5 -7
  184. package/prebuilt-themes/deeppurple-amber.css +1 -1
  185. package/prebuilt-themes/indigo-pink.css +1 -1
  186. package/prebuilt-themes/pink-bluegrey.css +1 -1
  187. package/prebuilt-themes/purple-green.css +1 -1
  188. package/schematics/ng-add/index.js +1 -1
  189. package/schematics/ng-add/index.mjs +1 -1
  190. package/schematics/ng-update/migrations/theming-api-v12/migration.d.ts +2 -2
  191. package/schematics/ng-update/migrations/theming-api-v12/migration.js +63 -14
  192. package/schematics/ng-update/migrations/theming-api-v12/migration.mjs +63 -14
  193. package/slide-toggle/index.metadata.json +1 -1
  194. package/slide-toggle/slide-toggle.d.ts +2 -0
  195. package/tabs/index.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"chips__testing.js","sources":["../../../../../../src/material/chips/testing/chip-remove-harness.ts","../../../../../../src/material/chips/testing/chip-harness.ts","../../../../../../src/material/chips/testing/chip-input-harness.ts","../../../../../../src/material/chips/testing/chip-list-harness.ts","../../../../../../src/material/chips/testing/chip-option-harness.ts","../../../../../../src/material/chips/testing/chip-listbox-harness.ts","../../../../../../src/material/chips/testing/public-api.ts","../../../../../../src/material/chips/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, ComponentHarness} from '@angular/cdk/testing';\nimport {ChipRemoveHarnessFilters} from './chip-harness-filters';\n\n/** Harness for interacting with a standard Material chip remove button in tests. */\nexport class MatChipRemoveHarness extends ComponentHarness {\n static hostSelector = '.mat-chip-remove';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipRemoveHarness` 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: ChipRemoveHarnessFilters = {}): HarnessPredicate<MatChipRemoveHarness> {\n return new HarnessPredicate(MatChipRemoveHarness, options);\n }\n\n /** Clicks the remove button. */\n async click(): Promise<void> {\n return (await this.host()).click();\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 {ComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing';\nimport {ChipHarnessFilters, ChipRemoveHarnessFilters} from './chip-harness-filters';\nimport {MatChipRemoveHarness} from './chip-remove-harness';\n\n/** Harness for interacting with a standard selectable Angular Material chip in tests. */\nexport class MatChipHarness extends ComponentHarness {\n /** The selector for the host element of a `MatChip` instance. */\n static hostSelector = '.mat-chip';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipHarnessFilters = {}): HarnessPredicate<MatChipHarness> {\n return new HarnessPredicate(MatChipHarness, options)\n .addOption('text', options.text,\n (harness, label) => HarnessPredicate.stringMatches(harness.getText(), label))\n .addOption('selected', options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected);\n }\n\n /** Gets the text of the chip. */\n async getText(): Promise<string> {\n return (await this.host()).text({\n exclude: '.mat-chip-avatar, .mat-chip-trailing-icon, .mat-icon'\n });\n }\n\n /**\n * Whether the chip is selected.\n * @deprecated Use `MatChipOptionHarness.isSelected` instead.\n * @breaking-change 12.0.0\n */\n async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-selected');\n }\n\n /** Whether the chip is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-disabled');\n }\n\n /**\n * Selects the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.select` instead.\n * @breaking-change 12.0.0\n */\n async select(): Promise<void> {\n if (!(await this.isSelected())) {\n await this.toggle();\n }\n }\n\n /**\n * Deselects the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.deselect` instead.\n * @breaking-change 12.0.0\n */\n async deselect(): Promise<void> {\n if (await this.isSelected()) {\n await this.toggle();\n }\n }\n\n /**\n * Toggles the selected state of the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.toggle` instead.\n * @breaking-change 12.0.0\n */\n async toggle(): Promise<void> {\n return (await this.host()).sendKeys(' ');\n }\n\n /** Removes the given chip. Only applies if it's removable. */\n async remove(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.DELETE);\n }\n\n /**\n * Gets the remove button inside of a chip.\n * @param filter Optionally filters which chips are included.\n */\n async getRemoveButton(filter: ChipRemoveHarnessFilters = {}): Promise<MatChipRemoveHarness> {\n return this.locatorFor(MatChipRemoveHarness.with(filter))();\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, ComponentHarness, TestKey} from '@angular/cdk/testing';\nimport {ChipInputHarnessFilters} from './chip-harness-filters';\n\n/** Harness for interacting with a standard Material chip inputs in tests. */\nexport class MatChipInputHarness extends ComponentHarness {\n static hostSelector = '.mat-chip-input';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipInputHarness` 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: ChipInputHarnessFilters = {}): HarnessPredicate<MatChipInputHarness> {\n return new HarnessPredicate(MatChipInputHarness, options)\n .addOption('value', options.value, async (harness, value) => {\n return (await harness.getValue()) === value;\n })\n .addOption('placeholder', options.placeholder, async (harness, placeholder) => {\n return (await 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 /** 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 placeholder of the input. */\n async getPlaceholder(): Promise<string> {\n return (await (await this.host()).getProperty('placeholder'));\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\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\n /** Sends a chip separator key to the input element. */\n async sendSeparatorKey(key: TestKey | string): Promise<void> {\n const inputEl = await this.host();\n return inputEl.sendKeys(key);\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 {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatChipHarness} from './chip-harness';\nimport {MatChipInputHarness} from './chip-input-harness';\nimport {\n ChipListHarnessFilters,\n ChipHarnessFilters,\n ChipInputHarnessFilters,\n} from './chip-harness-filters';\n\n/** Base class for chip list harnesses. */\nexport abstract class _MatChipListHarnessBase extends ComponentHarness {\n /** Gets whether the chip list is disabled. */\n async isDisabled(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-disabled') === 'true';\n }\n\n /** Gets whether the chip list is required. */\n async isRequired(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-required') === 'true';\n }\n\n /** Gets whether the chip list is invalid. */\n async isInvalid(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-invalid') === 'true';\n }\n\n /** Gets whether the chip list is in multi selection mode. */\n async isMultiple(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-multiselectable') === 'true';\n }\n\n /** Gets whether the orientation of the chip list. */\n async getOrientation(): Promise<'horizontal' | 'vertical'> {\n const orientation = await (await this.host()).getAttribute('aria-orientation');\n return orientation === 'vertical' ? 'vertical' : 'horizontal';\n }\n}\n\n/** Harness for interacting with a standard chip list in tests. */\nexport class MatChipListHarness extends _MatChipListHarnessBase {\n /** The selector for the host element of a `MatChipList` instance. */\n static hostSelector = '.mat-chip-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipListHarnessFilters = {}): HarnessPredicate<MatChipListHarness> {\n return new HarnessPredicate(MatChipListHarness, options);\n }\n\n /**\n * Gets the list of chips inside the chip list.\n * @param filter Optionally filters which chips are included.\n */\n async getChips(filter: ChipHarnessFilters = {}): Promise<MatChipHarness[]> {\n return this.locatorForAll(MatChipHarness.with(filter))();\n }\n\n /**\n * Selects a chip inside the chip list.\n * @param filter An optional filter to apply to the child chips.\n * All the chips matching the filter will be selected.\n * @deprecated Use `MatChipListboxHarness.selectChips` instead.\n * @breaking-change 12.0.0\n */\n async selectChips(filter: ChipHarnessFilters = {}): Promise<void> {\n const chips = await this.getChips(filter);\n if (!chips.length) {\n throw Error(`Cannot find chip matching filter ${JSON.stringify(filter)}`);\n }\n await parallel(() => chips.map(chip => chip.select()));\n }\n\n /**\n * Gets the `MatChipInput` inside the chip list.\n * @param filter Optionally filters which chip input is included.\n */\n async getInput(filter: ChipInputHarnessFilters = {}): Promise<MatChipInputHarness> {\n // The input isn't required to be a descendant of the chip list so we have to look it up by id.\n const inputId = await (await this.host()).getAttribute('data-mat-chip-input');\n\n if (!inputId) {\n throw Error(`Chip list is not associated with an input`);\n }\n\n return this.documentRootLocatorFactory().locatorFor(\n MatChipInputHarness.with({...filter, selector: `#${inputId}`}))();\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} from '@angular/cdk/testing';\nimport {MatChipHarness} from './chip-harness';\nimport {ChipOptionHarnessFilters} from './chip-harness-filters';\n\nexport class MatChipOptionHarness extends MatChipHarness {\n /** The selector for the host element of a selectable chip instance. */\n static override hostSelector = '.mat-chip';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipOptionHarness`\n * that meets certain criteria.\n * @param options Options for filtering which chip instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static override with(options: ChipOptionHarnessFilters = {}):\n HarnessPredicate<MatChipOptionHarness> {\n return new HarnessPredicate(MatChipOptionHarness, options)\n .addOption('text', options.text,\n (harness, label) => HarnessPredicate.stringMatches(harness.getText(), label))\n .addOption('selected', options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected);\n }\n\n /** Whether the chip is selected. */\n override async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-selected');\n }\n\n /** Selects the given chip. Only applies if it's selectable. */\n override async select(): Promise<void> {\n if (!(await this.isSelected())) {\n await this.toggle();\n }\n }\n\n /** Deselects the given chip. Only applies if it's selectable. */\n override async deselect(): Promise<void> {\n if (await this.isSelected()) {\n await this.toggle();\n }\n }\n\n /** Toggles the selected state of the given chip. */\n override async toggle(): Promise<void> {\n return (await this.host()).sendKeys(' ');\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 {MatChipOptionHarness} from './chip-option-harness';\nimport {\n ChipListboxHarnessFilters,\n ChipOptionHarnessFilters,\n} from './chip-harness-filters';\nimport {_MatChipListHarnessBase} from './chip-list-harness';\n\n/** Harness for interacting with a standard selectable chip list in tests. */\nexport class MatChipListboxHarness extends _MatChipListHarnessBase {\n /** The selector for the host element of a `MatChipList` instance. */\n static hostSelector = '.mat-chip-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipListboxHarnessFilters = {}):\n HarnessPredicate<MatChipListboxHarness> {\n return new HarnessPredicate(MatChipListboxHarness, options);\n }\n\n /**\n * Gets the list of chips inside the chip list.\n * @param filter Optionally filters which chips are included.\n */\n async getChips(filter: ChipOptionHarnessFilters = {}): Promise<MatChipOptionHarness[]> {\n return this.locatorForAll(MatChipOptionHarness.with(filter))();\n }\n\n /**\n * Selects a chip inside the chip list.\n * @param filter An optional filter to apply to the child chips.\n * All the chips matching the filter will be selected.\n */\n async selectChips(filter: ChipOptionHarnessFilters = {}): Promise<void> {\n const chips = await this.getChips(filter);\n if (!chips.length) {\n throw Error(`Cannot find chip matching filter ${JSON.stringify(filter)}`);\n }\n await parallel(() => chips.map(chip => chip.select()));\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\nexport * from './chip-harness';\nexport * from './chip-harness-filters';\nexport {MatChipListHarness} from './chip-list-harness';\nexport * from './chip-input-harness';\nexport * from './chip-remove-harness';\nexport * from './chip-option-harness';\nexport * from './chip-listbox-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;;;;;;;AAWA;MACa,oBAAqB,SAAQ,gBAAgB;;;;;;;IASxD,OAAO,IAAI,CAAC,UAAoC,EAAE;QAChD,OAAO,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;KAC5D;;IAGK,KAAK;;YACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;SACpC;KAAA;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;;;;;;AAgBA;MACa,qBAAsB,SAAQ,uBAAuB;;;;;;;IAUhE,OAAO,IAAI,CAAC,UAAqC,EAAE;QAEjD,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;KAC7D;;;;;IAMK,QAAQ,CAAC,SAAmC,EAAE;;YAClD,OAAO,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;SAChE;KAAA;;;;;;IAOK,WAAW,CAAC,SAAmC,EAAE;;YACrD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACjB,MAAM,KAAK,CAAC,oCAAoC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aAC3E;YACD,MAAM,QAAQ,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;SACxD;KAAA;;AAjCD;AACO,kCAAY,GAAG,gBAAgB;;ACnBxC;;;;;;;;ACAA;;;;;;;;;;"}
1
+ {"version":3,"file":"chips__testing.js","sources":["../../../../../../src/material/chips/testing/chip-avatar-harness.ts","../../../../../../src/material/chips/testing/chip-remove-harness.ts","../../../../../../src/material/chips/testing/chip-harness.ts","../../../../../../src/material/chips/testing/chip-input-harness.ts","../../../../../../src/material/chips/testing/chip-list-harness.ts","../../../../../../src/material/chips/testing/chip-option-harness.ts","../../../../../../src/material/chips/testing/chip-listbox-harness.ts","../../../../../../src/material/chips/testing/public-api.ts","../../../../../../src/material/chips/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, ComponentHarness} from '@angular/cdk/testing';\nimport {ChipAvatarHarnessFilters} from './chip-harness-filters';\n\n/** Harness for interacting with a standard Material chip avatar in tests. */\nexport class MatChipAvatarHarness extends ComponentHarness {\n static hostSelector = '.mat-chip-avatar';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipAvatarHarness` 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: ChipAvatarHarnessFilters = {}): HarnessPredicate<MatChipAvatarHarness> {\n return new HarnessPredicate(MatChipAvatarHarness, options);\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, ComponentHarness} from '@angular/cdk/testing';\nimport {ChipRemoveHarnessFilters} from './chip-harness-filters';\n\n/** Harness for interacting with a standard Material chip remove button in tests. */\nexport class MatChipRemoveHarness extends ComponentHarness {\n static hostSelector = '.mat-chip-remove';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipRemoveHarness` 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: ChipRemoveHarnessFilters = {}): HarnessPredicate<MatChipRemoveHarness> {\n return new HarnessPredicate(MatChipRemoveHarness, options);\n }\n\n /** Clicks the remove button. */\n async click(): Promise<void> {\n return (await this.host()).click();\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 {ContentContainerComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing';\nimport {MatChipAvatarHarness} from './chip-avatar-harness';\nimport {\n ChipAvatarHarnessFilters,\n ChipHarnessFilters,\n ChipRemoveHarnessFilters\n} from './chip-harness-filters';\nimport {MatChipRemoveHarness} from './chip-remove-harness';\n\n/** Harness for interacting with a standard selectable Angular Material chip in tests. */\nexport class MatChipHarness extends ContentContainerComponentHarness {\n /** The selector for the host element of a `MatChip` instance. */\n static hostSelector = '.mat-chip';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipHarnessFilters = {}): HarnessPredicate<MatChipHarness> {\n return new HarnessPredicate(MatChipHarness, options)\n .addOption('text', options.text,\n (harness, label) => HarnessPredicate.stringMatches(harness.getText(), label))\n .addOption('selected', options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected);\n }\n\n /** Gets the text of the chip. */\n async getText(): Promise<string> {\n return (await this.host()).text({\n exclude: '.mat-chip-avatar, .mat-chip-trailing-icon, .mat-icon'\n });\n }\n\n /**\n * Whether the chip is selected.\n * @deprecated Use `MatChipOptionHarness.isSelected` instead.\n * @breaking-change 12.0.0\n */\n async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-selected');\n }\n\n /** Whether the chip is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-disabled');\n }\n\n /**\n * Selects the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.select` instead.\n * @breaking-change 12.0.0\n */\n async select(): Promise<void> {\n if (!(await this.isSelected())) {\n await this.toggle();\n }\n }\n\n /**\n * Deselects the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.deselect` instead.\n * @breaking-change 12.0.0\n */\n async deselect(): Promise<void> {\n if (await this.isSelected()) {\n await this.toggle();\n }\n }\n\n /**\n * Toggles the selected state of the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.toggle` instead.\n * @breaking-change 12.0.0\n */\n async toggle(): Promise<void> {\n return (await this.host()).sendKeys(' ');\n }\n\n /** Removes the given chip. Only applies if it's removable. */\n async remove(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.DELETE);\n }\n\n /**\n * Gets the remove button inside of a chip.\n * @param filter Optionally filters which remove buttons are included.\n */\n async getRemoveButton(filter: ChipRemoveHarnessFilters = {}): Promise<MatChipRemoveHarness> {\n return this.locatorFor(MatChipRemoveHarness.with(filter))();\n }\n\n /**\n * Gets the avatar inside a chip.\n * @param filter Optionally filters which avatars are included.\n */\n async getAvatar(filter: ChipAvatarHarnessFilters = {}): Promise<MatChipAvatarHarness | null> {\n return this.locatorForOptional(MatChipAvatarHarness.with(filter))();\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, ComponentHarness, TestKey} from '@angular/cdk/testing';\nimport {ChipInputHarnessFilters} from './chip-harness-filters';\n\n/** Harness for interacting with a standard Material chip inputs in tests. */\nexport class MatChipInputHarness extends ComponentHarness {\n static hostSelector = '.mat-chip-input';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipInputHarness` 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: ChipInputHarnessFilters = {}): HarnessPredicate<MatChipInputHarness> {\n return new HarnessPredicate(MatChipInputHarness, options)\n .addOption('value', options.value, async (harness, value) => {\n return (await harness.getValue()) === value;\n })\n .addOption('placeholder', options.placeholder, async (harness, placeholder) => {\n return (await 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 /** 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 placeholder of the input. */\n async getPlaceholder(): Promise<string> {\n return (await (await this.host()).getProperty('placeholder'));\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\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\n /** Sends a chip separator key to the input element. */\n async sendSeparatorKey(key: TestKey | string): Promise<void> {\n const inputEl = await this.host();\n return inputEl.sendKeys(key);\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 {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatChipHarness} from './chip-harness';\nimport {MatChipInputHarness} from './chip-input-harness';\nimport {\n ChipListHarnessFilters,\n ChipHarnessFilters,\n ChipInputHarnessFilters,\n} from './chip-harness-filters';\n\n/** Base class for chip list harnesses. */\nexport abstract class _MatChipListHarnessBase extends ComponentHarness {\n /** Gets whether the chip list is disabled. */\n async isDisabled(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-disabled') === 'true';\n }\n\n /** Gets whether the chip list is required. */\n async isRequired(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-required') === 'true';\n }\n\n /** Gets whether the chip list is invalid. */\n async isInvalid(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-invalid') === 'true';\n }\n\n /** Gets whether the chip list is in multi selection mode. */\n async isMultiple(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-multiselectable') === 'true';\n }\n\n /** Gets whether the orientation of the chip list. */\n async getOrientation(): Promise<'horizontal' | 'vertical'> {\n const orientation = await (await this.host()).getAttribute('aria-orientation');\n return orientation === 'vertical' ? 'vertical' : 'horizontal';\n }\n}\n\n/** Harness for interacting with a standard chip list in tests. */\nexport class MatChipListHarness extends _MatChipListHarnessBase {\n /** The selector for the host element of a `MatChipList` instance. */\n static hostSelector = '.mat-chip-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipListHarnessFilters = {}): HarnessPredicate<MatChipListHarness> {\n return new HarnessPredicate(MatChipListHarness, options);\n }\n\n /**\n * Gets the list of chips inside the chip list.\n * @param filter Optionally filters which chips are included.\n */\n async getChips(filter: ChipHarnessFilters = {}): Promise<MatChipHarness[]> {\n return this.locatorForAll(MatChipHarness.with(filter))();\n }\n\n /**\n * Selects a chip inside the chip list.\n * @param filter An optional filter to apply to the child chips.\n * All the chips matching the filter will be selected.\n * @deprecated Use `MatChipListboxHarness.selectChips` instead.\n * @breaking-change 12.0.0\n */\n async selectChips(filter: ChipHarnessFilters = {}): Promise<void> {\n const chips = await this.getChips(filter);\n if (!chips.length) {\n throw Error(`Cannot find chip matching filter ${JSON.stringify(filter)}`);\n }\n await parallel(() => chips.map(chip => chip.select()));\n }\n\n /**\n * Gets the `MatChipInput` inside the chip list.\n * @param filter Optionally filters which chip input is included.\n */\n async getInput(filter: ChipInputHarnessFilters = {}): Promise<MatChipInputHarness> {\n // The input isn't required to be a descendant of the chip list so we have to look it up by id.\n const inputId = await (await this.host()).getAttribute('data-mat-chip-input');\n\n if (!inputId) {\n throw Error(`Chip list is not associated with an input`);\n }\n\n return this.documentRootLocatorFactory().locatorFor(\n MatChipInputHarness.with({...filter, selector: `#${inputId}`}))();\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} from '@angular/cdk/testing';\nimport {MatChipHarness} from './chip-harness';\nimport {ChipOptionHarnessFilters} from './chip-harness-filters';\n\nexport class MatChipOptionHarness extends MatChipHarness {\n /** The selector for the host element of a selectable chip instance. */\n static override hostSelector = '.mat-chip';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipOptionHarness`\n * that meets certain criteria.\n * @param options Options for filtering which chip instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static override with(options: ChipOptionHarnessFilters = {}):\n HarnessPredicate<MatChipOptionHarness> {\n return new HarnessPredicate(MatChipOptionHarness, options)\n .addOption('text', options.text,\n (harness, label) => HarnessPredicate.stringMatches(harness.getText(), label))\n .addOption('selected', options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected);\n }\n\n /** Whether the chip is selected. */\n override async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-selected');\n }\n\n /** Selects the given chip. Only applies if it's selectable. */\n override async select(): Promise<void> {\n if (!(await this.isSelected())) {\n await this.toggle();\n }\n }\n\n /** Deselects the given chip. Only applies if it's selectable. */\n override async deselect(): Promise<void> {\n if (await this.isSelected()) {\n await this.toggle();\n }\n }\n\n /** Toggles the selected state of the given chip. */\n override async toggle(): Promise<void> {\n return (await this.host()).sendKeys(' ');\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 {MatChipOptionHarness} from './chip-option-harness';\nimport {\n ChipListboxHarnessFilters,\n ChipOptionHarnessFilters,\n} from './chip-harness-filters';\nimport {_MatChipListHarnessBase} from './chip-list-harness';\n\n/** Harness for interacting with a standard selectable chip list in tests. */\nexport class MatChipListboxHarness extends _MatChipListHarnessBase {\n /** The selector for the host element of a `MatChipList` instance. */\n static hostSelector = '.mat-chip-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipListboxHarnessFilters = {}):\n HarnessPredicate<MatChipListboxHarness> {\n return new HarnessPredicate(MatChipListboxHarness, options);\n }\n\n /**\n * Gets the list of chips inside the chip list.\n * @param filter Optionally filters which chips are included.\n */\n async getChips(filter: ChipOptionHarnessFilters = {}): Promise<MatChipOptionHarness[]> {\n return this.locatorForAll(MatChipOptionHarness.with(filter))();\n }\n\n /**\n * Selects a chip inside the chip list.\n * @param filter An optional filter to apply to the child chips.\n * All the chips matching the filter will be selected.\n */\n async selectChips(filter: ChipOptionHarnessFilters = {}): Promise<void> {\n const chips = await this.getChips(filter);\n if (!chips.length) {\n throw Error(`Cannot find chip matching filter ${JSON.stringify(filter)}`);\n }\n await parallel(() => chips.map(chip => chip.select()));\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\nexport * from './chip-harness';\nexport * from './chip-harness-filters';\nexport {MatChipListHarness} from './chip-list-harness';\nexport * from './chip-input-harness';\nexport * from './chip-remove-harness';\nexport * from './chip-option-harness';\nexport * from './chip-listbox-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;;;;;;;AAWA;MACa,oBAAqB,SAAQ,gBAAgB;;;;;;;IASxD,OAAO,IAAI,CAAC,UAAoC,EAAE;QAChD,OAAO,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;KAC5D;;AAVM,iCAAY,GAAG,kBAAkB;;ACb1C;;;;;;;AAWA;MACa,oBAAqB,SAAQ,gBAAgB;;;;;;;IASxD,OAAO,IAAI,CAAC,UAAoC,EAAE;QAChD,OAAO,IA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AAC;aACrB;SACF;KAAA;;IAGc,QAAQ;;YACrB,IAAI,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE;gBAC3B,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;aACrB;SACF;KAAA;;IAGc,MAAM;;YACnB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;SAC1C;KAAA;;AAxCD;AACgB,iCAAY,GAAG,WAAW;;ACd5C;;;;;;;AAgBA;MACa,qBAAsB,SAAQ,uBAAuB;;;;;;;IAUhE,OAAO,IAAI,CAAC,UAAqC,EAAE;QAEjD,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;KAC7D;;;;;IAMK,QAAQ,CAAC,SAAmC,EAAE;;YAClD,OAAO,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;SAChE;KAAA;;;;;;IAOK,WAAW,CAAC,SAAmC,EAAE;;YACrD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACjB,MAAM,KAAK,CAAC,oCAAoC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aAC3E;YACD,MAAM,QAAQ,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;SACxD;KAAA;;AAjCD;AACO,kCAAY,GAAG,gBAAgB;;ACnBxC;;;;;;;;ACAA;;;;;;;;;;"}
package/fesm2015/core.js CHANGED
@@ -19,7 +19,7 @@ import { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';
19
19
  * found in the LICENSE file at https://angular.io/license
20
20
  */
21
21
  /** Current version of Angular Material. */
22
- const VERSION$1 = new Version('12.1.4');
22
+ const VERSION$1 = new Version('12.2.2');
23
23
 
24
24
  /**
25
25
  * @license
@@ -53,7 +53,7 @@ AnimationDurations.EXITING = '195ms';
53
53
  // i.e. avoid core to depend on the @angular/material primary entry-point
54
54
  // Can be removed once the Material primary entry-point no longer
55
55
  // re-exports all secondary entry-points
56
- const VERSION = new Version('12.1.4');
56
+ const VERSION = new Version('12.2.2');
57
57
  /** @docs-private */
58
58
  function MATERIAL_SANITY_CHECKS_FACTORY() {
59
59
  return true;
@@ -92,13 +92,19 @@ class MatCommonModule {
92
92
  const win = this._document.defaultView || window;
93
93
  return typeof win === 'object' && win ? win : null;
94
94
  }
95
- /** Whether any sanity checks are enabled. */
96
- _checksAreEnabled() {
95
+ /** Gets whether a specific sanity check is enabled. */
96
+ _checkIsEnabled(name) {
97
97
  // TODO(crisbeto): we can't use `ngDevMode` here yet, because ViewEngine apps might not support
98
98
  // it. Since these checks can have performance implications and they aren't tree shakeable
99
99
  // in their current form, we can leave the `isDevMode` check in for now.
100
100
  // tslint:disable-next-line:ban
101
- return isDevMode() && !this._isTestEnv();
101
+ if (!isDevMode() || this._isTestEnv()) {
102
+ return false;
103
+ }
104
+ if (typeof this._sanityChecks === 'boolean') {
105
+ return this._sanityChecks;
106
+ }
107
+ return !!this._sanityChecks[name];
102
108
  }
103
109
  /** Whether the code is running in tests. */
104
110
  _isTestEnv() {
@@ -106,9 +112,7 @@ class MatCommonModule {
106
112
  return window && (window.__karma__ || window.jasmine);
107
113
  }
108
114
  _checkDoctypeIsDefined() {
109
- const isEnabled = this._checksAreEnabled() &&
110
- (this._sanityChecks === true || this._sanityChecks.doctype);
111
- if (isEnabled && !this._document.doctype) {
115
+ if (this._checkIsEnabled('doctype') && !this._document.doctype) {
112
116
  console.warn('Current document does not have a doctype. This may cause ' +
113
117
  'some Angular Material components not to behave as expected.');
114
118
  }
@@ -116,9 +120,8 @@ class MatCommonModule {
116
120
  _checkThemeIsPresent() {
117
121
  // We need to assert that the `body` is defined, because these checks run very early
118
122
  // and the `body` won't be defined if the consumer put their scripts in the `head`.
119
- const isDisabled = !this._checksAreEnabled() ||
120
- (this._sanityChecks === false || !this._sanityChecks.theme);
121
- if (isDisabled || !this._document.body || typeof getComputedStyle !== 'function') {
123
+ if (!this._checkIsEnabled('theme') || !this._document.body ||
124
+ typeof getComputedStyle !== 'function') {
122
125
  return;
123
126
  }
124
127
  const testElement = this._document.createElement('div');
@@ -137,9 +140,7 @@ class MatCommonModule {
137
140
  }
138
141
  /** Checks whether the material version matches the cdk version */
139
142
  _checkCdkVersionMatch() {
140
- const isEnabled = this._checksAreEnabled() &&
141
- (this._sanityChecks === true || this._sanityChecks.version);
142
- if (isEnabled && VERSION.full !== VERSION$2.full) {
143
+ if (this._checkIsEnabled('version') && VERSION.full !== VERSION$2.full) {
143
144
  console.warn('The Angular Material version (' + VERSION.full + ') does not match ' +
144
145
  'the Angular CDK version (' + VERSION$2.full + ').\n' +
145
146
  'Please ensure the versions of these two packages exactly match.');