@angular/material 10.2.3 → 10.2.7

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 (138) hide show
  1. package/_theming.scss +69 -69
  2. package/autocomplete/index.metadata.json +1 -1
  3. package/bottom-sheet/bottom-sheet.d.ts +12 -0
  4. package/bundles/material-autocomplete.umd.js +4 -3
  5. package/bundles/material-autocomplete.umd.js.map +1 -1
  6. package/bundles/material-autocomplete.umd.min.js +1 -1
  7. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  8. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  9. package/bundles/material-button.umd.js +2 -2
  10. package/bundles/material-button.umd.min.js +1 -1
  11. package/bundles/material-button.umd.min.js.map +1 -1
  12. package/bundles/material-chips-testing.umd.js +22 -4
  13. package/bundles/material-chips-testing.umd.js.map +1 -1
  14. package/bundles/material-chips-testing.umd.min.js.map +1 -1
  15. package/bundles/material-core.umd.js +13 -10
  16. package/bundles/material-core.umd.js.map +1 -1
  17. package/bundles/material-core.umd.min.js +7 -7
  18. package/bundles/material-core.umd.min.js.map +1 -1
  19. package/bundles/material-datepicker.umd.js +36 -0
  20. package/bundles/material-datepicker.umd.js.map +1 -1
  21. package/bundles/material-datepicker.umd.min.js +1 -1
  22. package/bundles/material-datepicker.umd.min.js.map +1 -1
  23. package/bundles/material-dialog.umd.js +1 -8
  24. package/bundles/material-dialog.umd.js.map +1 -1
  25. package/bundles/material-dialog.umd.min.js.map +1 -1
  26. package/bundles/material-form-field.umd.js +2 -2
  27. package/bundles/material-form-field.umd.js.map +1 -1
  28. package/bundles/material-form-field.umd.min.js +2 -2
  29. package/bundles/material-form-field.umd.min.js.map +1 -1
  30. package/bundles/material-icon.umd.js +50 -36
  31. package/bundles/material-icon.umd.js.map +1 -1
  32. package/bundles/material-icon.umd.min.js +2 -2
  33. package/bundles/material-icon.umd.min.js.map +1 -1
  34. package/bundles/material-list-testing.umd.js +5 -3
  35. package/bundles/material-list-testing.umd.js.map +1 -1
  36. package/bundles/material-list-testing.umd.min.js +1 -1
  37. package/bundles/material-list-testing.umd.min.js.map +1 -1
  38. package/bundles/material-list.umd.js +21 -11
  39. package/bundles/material-list.umd.js.map +1 -1
  40. package/bundles/material-list.umd.min.js +1 -1
  41. package/bundles/material-list.umd.min.js.map +1 -1
  42. package/bundles/material-menu.umd.js +14 -16
  43. package/bundles/material-menu.umd.js.map +1 -1
  44. package/bundles/material-menu.umd.min.js +3 -3
  45. package/bundles/material-menu.umd.min.js.map +1 -1
  46. package/bundles/material-tabs.umd.js +7 -3
  47. package/bundles/material-tabs.umd.js.map +1 -1
  48. package/bundles/material-tabs.umd.min.js +3 -3
  49. package/bundles/material-tabs.umd.min.js.map +1 -1
  50. package/bundles/material-tooltip.umd.js +3 -1
  51. package/bundles/material-tooltip.umd.js.map +1 -1
  52. package/bundles/material-tooltip.umd.min.js +1 -1
  53. package/bundles/material-tooltip.umd.min.js.map +1 -1
  54. package/button/_button-theme.scss +1 -1
  55. package/button/index.metadata.json +1 -1
  56. package/checkbox/_checkbox-theme.scss +1 -1
  57. package/chips/_chips-theme.scss +1 -1
  58. package/chips/testing/chip-harness-filters.d.ts +5 -1
  59. package/chips/testing/chip-harness.d.ts +20 -4
  60. package/chips/testing/chip-list-harness.d.ts +2 -0
  61. package/core/density/_index.scss +6 -6
  62. package/core/focus-indicators/_focus-indicators.scss +1 -1
  63. package/core/index.metadata.json +1 -1
  64. package/core/ripple/_ripple.scss +2 -2
  65. package/core/theming/_check-duplicate-styles.scss +6 -6
  66. package/core/theming/_palette.scss +16 -16
  67. package/core/theming/_theming.scss +33 -33
  68. package/datepicker/date-range-input-parts.d.ts +6 -2
  69. package/datepicker/index.metadata.json +1 -1
  70. package/dialog/dialog.d.ts +10 -3
  71. package/dialog/index.metadata.json +1 -1
  72. package/esm2015/autocomplete/autocomplete-trigger.js +6 -5
  73. package/esm2015/bottom-sheet/bottom-sheet.js +1 -1
  74. package/esm2015/button/button.js +2 -2
  75. package/esm2015/chips/testing/chip-harness-filters.js +1 -1
  76. package/esm2015/chips/testing/chip-harness.js +21 -5
  77. package/esm2015/chips/testing/chip-list-harness.js +3 -1
  78. package/esm2015/core/common-behaviors/common-module.js +1 -1
  79. package/esm2015/core/datetime/native-date-adapter.js +12 -9
  80. package/esm2015/core/version.js +1 -1
  81. package/esm2015/datepicker/date-range-input-parts.js +37 -1
  82. package/esm2015/dialog/dialog-animations.js +2 -2
  83. package/esm2015/dialog/dialog.js +1 -8
  84. package/esm2015/form-field/form-field.js +1 -1
  85. package/esm2015/form-field/hint.js +2 -2
  86. package/esm2015/icon/icon.js +46 -36
  87. package/esm2015/list/selection-list.js +22 -12
  88. package/esm2015/list/testing/list-item-harness-base.js +6 -4
  89. package/esm2015/menu/menu-item.js +15 -17
  90. package/esm2015/tabs/tab-content.js +3 -2
  91. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +9 -6
  92. package/esm2015/tooltip/tooltip.js +4 -2
  93. package/fesm2015/autocomplete.js +5 -4
  94. package/fesm2015/autocomplete.js.map +1 -1
  95. package/fesm2015/bottom-sheet.js.map +1 -1
  96. package/fesm2015/button.js +2 -2
  97. package/fesm2015/chips/testing.js +22 -4
  98. package/fesm2015/chips/testing.js.map +1 -1
  99. package/fesm2015/core.js +13 -10
  100. package/fesm2015/core.js.map +1 -1
  101. package/fesm2015/datepicker.js +36 -0
  102. package/fesm2015/datepicker.js.map +1 -1
  103. package/fesm2015/dialog.js +1 -8
  104. package/fesm2015/dialog.js.map +1 -1
  105. package/fesm2015/form-field.js +2 -2
  106. package/fesm2015/form-field.js.map +1 -1
  107. package/fesm2015/icon.js +45 -35
  108. package/fesm2015/icon.js.map +1 -1
  109. package/fesm2015/list/testing.js +5 -3
  110. package/fesm2015/list/testing.js.map +1 -1
  111. package/fesm2015/list.js +21 -11
  112. package/fesm2015/list.js.map +1 -1
  113. package/fesm2015/menu.js +14 -16
  114. package/fesm2015/menu.js.map +1 -1
  115. package/fesm2015/tabs.js +7 -3
  116. package/fesm2015/tabs.js.map +1 -1
  117. package/fesm2015/tooltip.js +3 -1
  118. package/fesm2015/tooltip.js.map +1 -1
  119. package/form-field/index.metadata.json +1 -1
  120. package/icon/icon.d.ts +7 -4
  121. package/icon/index.metadata.json +1 -1
  122. package/list/index.metadata.json +1 -1
  123. package/list/selection-list.d.ts +16 -4
  124. package/menu/index.metadata.json +1 -1
  125. package/menu/menu-item.d.ts +6 -2
  126. package/package.json +2 -2
  127. package/radio/_radio-theme.scss +1 -1
  128. package/schematics/ng-add/index.js +1 -1
  129. package/schematics/ng-update/data/css-selectors.d.ts +6 -3
  130. package/schematics/ng-update/data/css-selectors.js +2 -2
  131. package/schematics/ng-update/data/input-names.js +10 -10
  132. package/schematics/ng-update/data/output-names.js +10 -10
  133. package/schematics/ng-update/data/property-names.js +24 -24
  134. package/slide-toggle/_slide-toggle-theme.scss +1 -1
  135. package/tabs/index.metadata.json +1 -1
  136. package/tabs/tab-content.d.ts +3 -2
  137. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +8 -5
  138. package/tooltip/index.metadata.json +1 -1
@@ -56,7 +56,11 @@ class MatChipHarness extends ComponentHarness {
56
56
  });
57
57
  });
58
58
  }
59
- /** Whether the chip is selected. */
59
+ /**
60
+ * Whether the chip is selected.
61
+ * @deprecated Will be moved into separate selection-specific harness.
62
+ * @breaking-change 12.0.0
63
+ */
60
64
  isSelected() {
61
65
  return __awaiter(this, void 0, void 0, function* () {
62
66
  return (yield this.host()).hasClass('mat-chip-selected');
@@ -68,7 +72,11 @@ class MatChipHarness extends ComponentHarness {
68
72
  return (yield this.host()).hasClass('mat-chip-disabled');
69
73
  });
70
74
  }
71
- /** Selects the given chip. Only applies if it's selectable. */
75
+ /**
76
+ * Selects the given chip. Only applies if it's selectable.
77
+ * @deprecated Will be moved into separate selection-specific harness.
78
+ * @breaking-change 12.0.0
79
+ */
72
80
  select() {
73
81
  return __awaiter(this, void 0, void 0, function* () {
74
82
  if (!(yield this.isSelected())) {
@@ -76,7 +84,11 @@ class MatChipHarness extends ComponentHarness {
76
84
  }
77
85
  });
78
86
  }
79
- /** Deselects the given chip. Only applies if it's selectable. */
87
+ /**
88
+ * Deselects the given chip. Only applies if it's selectable.
89
+ * @deprecated Will be moved into separate selection-specific harness.
90
+ * @breaking-change 12.0.0
91
+ */
80
92
  deselect() {
81
93
  return __awaiter(this, void 0, void 0, function* () {
82
94
  if (yield this.isSelected()) {
@@ -84,7 +96,11 @@ class MatChipHarness extends ComponentHarness {
84
96
  }
85
97
  });
86
98
  }
87
- /** Toggles the selected state of the given chip. Only applies if it's selectable. */
99
+ /**
100
+ * Toggles the selected state of the given chip. Only applies if it's selectable.
101
+ * @deprecated Will be moved into separate selection-specific harness.
102
+ * @breaking-change 12.0.0
103
+ */
88
104
  toggle() {
89
105
  return __awaiter(this, void 0, void 0, function* () {
90
106
  return (yield this.host()).sendKeys(' ');
@@ -270,6 +286,8 @@ class MatChipListHarness extends ComponentHarness {
270
286
  * Selects a chip inside the chip list.
271
287
  * @param filter An optional filter to apply to the child chips.
272
288
  * All the chips matching the filter will be selected.
289
+ * @deprecated Will be moved into separate selection-specific harness.
290
+ * @breaking-change 12.0.0
273
291
  */
274
292
  selectChips(filter = {}) {
275
293
  return __awaiter(this, void 0, void 0, function* () {
@@ -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/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 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 /** Whether the chip is selected. */\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 /** Selects the given chip. Only applies if it's selectable. */\n 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 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. Only applies if it's selectable. */\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} 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/** Harness for interacting with a standard chip list in tests. */\nexport class MatChipListHarness extends ComponentHarness {\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 /** 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 * 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 */\n async selectChips(filter: ChipHarnessFilters = {}): Promise<void> {\n const chips = await this.getChips(filter);\n if (!chips.length) {\n throw Error(`Cannot find mat-chip matching filter ${JSON.stringify(filter)}`);\n }\n await Promise.all(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\nexport * from './chip-harness';\nexport * from './chip-harness-filters';\nexport * from './chip-list-harness';\nexport * from './chip-input-harness';\nexport * from './chip-remove-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;AACA,MAAa,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;;AAfM,iCAAY,GAAG,kBAAkB,CAAC;;ACb3C;;;;;;;AAYA;AACA,MAAa,cAAe,SAAQ,gBAAgB;;;;;;;IAUlD,OAAO,IAAI,CAAC,UAA8B,EAAE;QAC1C,OAAO,IAAI,gBAAgB,CAAC,cAAc,EAAE,OAAO,CAAC;aAC/C,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAC3B,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;aAChF,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EACnC,CAAO,OAAO,EAAE,QAAQ,oDAAK,OAAA,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ,CAAA,GAAA,CAAC,CAAC;KACjF;;IAGK,OAAO;;YACX,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC;gBAC9B,OAAO,EAAE,sDAAsD;a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,CAAC,SAA6B,EAAE;;YAC/C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACjB,MAAM,KAAK,CAAC,wCAAwC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aAC/E;YACD,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;SACrD;KAAA;;;;;IAMK,QAAQ,CAAC,SAAkC,EAAE;;;YAEjD,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,qBAAqB,CAAC,CAAC;YAE9E,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAM,KAAK,CAAC,2CAA2C,CAAC,CAAC;aAC1D;YAED,OAAO,IAAI,CAAC,0BAA0B,EAAE,CAAC,UAAU,CACjD,mBAAmB,CAAC,IAAI,iCAAK,MAAM,KAAE,QAAQ,EAAE,IAAI,OAAO,EAAE,IAAE,CAAC,EAAE,CAAC;SACrE;KAAA;;;AAzEM,+BAAY,GAAG,gBAAgB,CAAC;;ACpBzC;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
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/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 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 Will be moved into separate selection-specific harness.\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 Will be moved into separate selection-specific harness.\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 Will be moved into separate selection-specific harness.\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 Will be moved into separate selection-specific harness.\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} 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/** Harness for interacting with a standard chip list in tests. */\nexport class MatChipListHarness extends ComponentHarness {\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 /** 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 * 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 Will be moved into separate selection-specific harness.\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 mat-chip matching filter ${JSON.stringify(filter)}`);\n }\n await Promise.all(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\nexport * from './chip-harness';\nexport * from './chip-harness-filters';\nexport * from './chip-list-harness';\nexport * from './chip-input-harness';\nexport * from './chip-remove-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;AACA,MAAa,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;;AAfM,iCAAY,GAAG,kBAAkB,CAAC;;ACb3C;;;;;;;AAYA;AACA,MAAa,cAAe,SAAQ,gBAAgB;;;;;;;IAUlD,OAAO,IAAI,CAAC,UAA8B,EAAE;QAC1C,OAAO,IAAI,gBAAgB,CAAC,cAAc,EAAE,OAAO,CAAC;aAC/C,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAC3B,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;aAChF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ENSE file at https://angular.io/license
19
19
  */
20
20
  /** Current version of Angular Material. */
21
- const VERSION = new Version('10.2.3');
21
+ const VERSION = new Version('10.2.7');
22
22
 
23
23
  /**
24
24
  * @license
@@ -52,7 +52,7 @@ AnimationDurations.EXITING = '195ms';
52
52
  // i.e. avoid core to depend on the @angular/material primary entry-point
53
53
  // Can be removed once the Material primary entry-point no longer
54
54
  // re-exports all secondary entry-points
55
- const VERSION$1 = new Version('10.2.3');
55
+ const VERSION$1 = new Version('10.2.7');
56
56
  /** @docs-private */
57
57
  function MATERIAL_SANITY_CHECKS_FACTORY() {
58
58
  return true;
@@ -723,13 +723,12 @@ class NativeDateAdapter extends DateAdapter {
723
723
  }
724
724
  /** Creates a date but allows the month and date to overflow. */
725
725
  _createDateWithOverflow(year, month, date) {
726
- const result = new Date(year, month, date);
727
- // We need to correct for the fact that JS native Date treats years in range [0, 99] as
728
- // abbreviations for 19xx.
729
- if (year >= 0 && year < 100) {
730
- result.setFullYear(this.getYear(result) - 1900);
731
- }
732
- return result;
726
+ // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.
727
+ // To work around this we use `setFullYear` and `setHours` instead.
728
+ const d = new Date();
729
+ d.setFullYear(year, month, date);
730
+ d.setHours(0, 0, 0, 0);
731
+ return d;
733
732
  }
734
733
  /**
735
734
  * Pads a number to make it two digits.
@@ -761,7 +760,11 @@ class NativeDateAdapter extends DateAdapter {
761
760
  * @returns A Date object with its UTC representation based on the passed in date info
762
761
  */
763
762
  _format(dtf, date) {
764
- const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
763
+ // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.
764
+ // To work around this we use `setUTCFullYear` and `setUTCHours` instead.
765
+ const d = new Date();
766
+ d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());
767
+ d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
765
768
  return dtf.format(d);
766
769
  }
767
770
  }