@angular/material 11.1.0 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/index.metadata.json +1 -1
- package/autocomplete/testing/autocomplete-harness.d.ts +29 -15
- package/bundles/material-autocomplete-testing.umd.js +45 -35
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -2
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +1 -1
- package/bundles/material-autocomplete.umd.min.js +1 -1
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.js +64 -63
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +2 -2
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +2 -2
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +2 -2
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +17 -4
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +8 -8
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +1 -1
- package/bundles/material-form-field.umd.min.js +1 -1
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +85 -66
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -2
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.js +41 -33
- package/bundles/material-paginator-testing.umd.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +2 -2
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +79 -62
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +2 -2
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +62 -51
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -2
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/checkbox/testing/checkbox-harness.d.ts +21 -16
- package/core/index.metadata.json +1 -1
- package/datepicker/date-range-input.d.ts +1 -0
- package/datepicker/datepicker-input.d.ts +4 -2
- package/datepicker/index.metadata.json +1 -1
- package/esm2015/autocomplete/autocomplete.js +1 -1
- package/esm2015/autocomplete/testing/autocomplete-harness.js +27 -19
- package/esm2015/checkbox/testing/checkbox-harness.js +31 -36
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/date-range-input.js +10 -2
- package/esm2015/datepicker/datepicker-input.js +8 -1
- package/esm2015/datepicker/datepicker-toggle.js +2 -5
- package/esm2015/form-field/form-field.js +1 -1
- package/esm2015/menu/testing/menu-harness.js +44 -32
- package/esm2015/paginator/testing/paginator-harness.js +27 -25
- package/esm2015/radio/testing/radio-harness.js +40 -29
- package/esm2015/select/testing/select-harness.js +35 -29
- package/fesm2015/autocomplete/testing.js +26 -18
- package/fesm2015/autocomplete/testing.js.map +1 -1
- package/fesm2015/autocomplete.js +1 -1
- package/fesm2015/checkbox/testing.js +30 -35
- package/fesm2015/checkbox/testing.js.map +1 -1
- package/fesm2015/core.js +2 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker.js +15 -4
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/form-field.js +1 -1
- package/fesm2015/menu/testing.js +45 -33
- package/fesm2015/menu/testing.js.map +1 -1
- package/fesm2015/paginator/testing.js +26 -24
- package/fesm2015/paginator/testing.js.map +1 -1
- package/fesm2015/radio/testing.js +39 -28
- package/fesm2015/radio/testing.js.map +1 -1
- package/fesm2015/select/testing.js +35 -29
- package/fesm2015/select/testing.js.map +1 -1
- package/form-field/index.metadata.json +1 -1
- package/menu/testing/menu-harness.d.ts +39 -26
- package/package.json +2 -2
- package/paginator/testing/paginator-harness.d.ts +32 -19
- package/radio/testing/radio-harness.d.ts +39 -24
- package/schematics/ng-add/index.js +1 -1
- package/select/testing/select-harness.d.ts +28 -16
|
@@ -5,26 +5,20 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
8
|
+
import { AsyncFactoryFn, ComponentHarness, HarnessPredicate, TestElement } from '@angular/cdk/testing';
|
|
9
|
+
import { MatSelectHarness } from '@angular/material/select/testing';
|
|
9
10
|
import { PaginatorHarnessFilters } from './paginator-harness-filters';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Gets a `HarnessPredicate` that can be used to search for a `MatPaginatorHarness` that meets
|
|
23
|
-
* certain criteria.
|
|
24
|
-
* @param options Options for filtering which paginator instances are considered a match.
|
|
25
|
-
* @return a `HarnessPredicate` configured with the given options.
|
|
26
|
-
*/
|
|
27
|
-
static with(options?: PaginatorHarnessFilters): HarnessPredicate<MatPaginatorHarness>;
|
|
11
|
+
export declare abstract class _MatPaginatorHarnessBase extends ComponentHarness {
|
|
12
|
+
protected abstract _nextButton: AsyncFactoryFn<TestElement>;
|
|
13
|
+
protected abstract _previousButton: AsyncFactoryFn<TestElement>;
|
|
14
|
+
protected abstract _firstPageButton: AsyncFactoryFn<TestElement | null>;
|
|
15
|
+
protected abstract _lastPageButton: AsyncFactoryFn<TestElement | null>;
|
|
16
|
+
protected abstract _select: AsyncFactoryFn<(ComponentHarness & {
|
|
17
|
+
getValueText(): Promise<string>;
|
|
18
|
+
clickOptions(...filters: unknown[]): Promise<void>;
|
|
19
|
+
}) | null>;
|
|
20
|
+
protected abstract _pageSizeFallback: AsyncFactoryFn<TestElement>;
|
|
21
|
+
protected abstract _rangeLabel: AsyncFactoryFn<TestElement>;
|
|
28
22
|
/** Goes to the next page in the paginator. */
|
|
29
23
|
goToNextPage(): Promise<void>;
|
|
30
24
|
/** Goes to the previous page in the paginator. */
|
|
@@ -43,3 +37,22 @@ export declare class MatPaginatorHarness extends ComponentHarness {
|
|
|
43
37
|
/** Gets the text of the range labe of the paginator. */
|
|
44
38
|
getRangeLabel(): Promise<string>;
|
|
45
39
|
}
|
|
40
|
+
/** Harness for interacting with a standard mat-paginator in tests. */
|
|
41
|
+
export declare class MatPaginatorHarness extends _MatPaginatorHarnessBase {
|
|
42
|
+
/** Selector used to find paginator instances. */
|
|
43
|
+
static hostSelector: string;
|
|
44
|
+
protected _nextButton: AsyncFactoryFn<TestElement>;
|
|
45
|
+
protected _previousButton: AsyncFactoryFn<TestElement>;
|
|
46
|
+
protected _firstPageButton: AsyncFactoryFn<TestElement | null>;
|
|
47
|
+
protected _lastPageButton: AsyncFactoryFn<TestElement | null>;
|
|
48
|
+
protected _select: AsyncFactoryFn<MatSelectHarness | null>;
|
|
49
|
+
protected _pageSizeFallback: AsyncFactoryFn<TestElement>;
|
|
50
|
+
protected _rangeLabel: AsyncFactoryFn<TestElement>;
|
|
51
|
+
/**
|
|
52
|
+
* Gets a `HarnessPredicate` that can be used to search for a `MatPaginatorHarness` that meets
|
|
53
|
+
* certain criteria.
|
|
54
|
+
* @param options Options for filtering which paginator instances are considered a match.
|
|
55
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
56
|
+
*/
|
|
57
|
+
static with(options?: PaginatorHarnessFilters): HarnessPredicate<MatPaginatorHarness>;
|
|
58
|
+
}
|
|
@@ -5,38 +5,36 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
8
|
+
import { AsyncFactoryFn, BaseHarnessFilters, ComponentHarness, ComponentHarnessConstructor, HarnessPredicate, TestElement } from '@angular/cdk/testing';
|
|
9
9
|
import { RadioButtonHarnessFilters, RadioGroupHarnessFilters } from './radio-harness-filters';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
static with(options?: RadioGroupHarnessFilters): HarnessPredicate<MatRadioGroupHarness>;
|
|
10
|
+
export declare abstract class _MatRadioGroupHarnessBase<ButtonType extends (ComponentHarnessConstructor<Button> & {
|
|
11
|
+
with: (options?: ButtonFilters) => HarnessPredicate<Button>;
|
|
12
|
+
}), Button extends ComponentHarness & {
|
|
13
|
+
isChecked(): Promise<boolean>;
|
|
14
|
+
getValue(): Promise<string | null>;
|
|
15
|
+
getName(): Promise<string | null>;
|
|
16
|
+
check(): Promise<void>;
|
|
17
|
+
}, ButtonFilters extends BaseHarnessFilters> extends ComponentHarness {
|
|
18
|
+
protected abstract _buttonClass: ButtonType;
|
|
21
19
|
/** Gets the name of the radio-group. */
|
|
22
20
|
getName(): Promise<string | null>;
|
|
23
21
|
/** Gets the id of the radio-group. */
|
|
24
22
|
getId(): Promise<string | null>;
|
|
25
23
|
/** Gets the checked radio-button in a radio-group. */
|
|
26
|
-
getCheckedRadioButton(): Promise<
|
|
24
|
+
getCheckedRadioButton(): Promise<Button | null>;
|
|
27
25
|
/** Gets the checked value of the radio-group. */
|
|
28
26
|
getCheckedValue(): Promise<string | null>;
|
|
29
27
|
/**
|
|
30
28
|
* Gets a list of radio buttons which are part of the radio-group.
|
|
31
29
|
* @param filter Optionally filters which radio buttons are included.
|
|
32
30
|
*/
|
|
33
|
-
getRadioButtons(filter?:
|
|
31
|
+
getRadioButtons(filter?: ButtonFilters): Promise<Button[]>;
|
|
34
32
|
/**
|
|
35
33
|
* Checks a radio button in this group.
|
|
36
34
|
* @param filter An optional filter to apply to the child radio buttons. The first tab matching
|
|
37
35
|
* the filter will be selected.
|
|
38
36
|
*/
|
|
39
|
-
checkRadioButton(filter?:
|
|
37
|
+
checkRadioButton(filter?: ButtonFilters): Promise<void>;
|
|
40
38
|
/** Gets the name attribute of the host element. */
|
|
41
39
|
private _getGroupNameFromHost;
|
|
42
40
|
/** Gets a list of the name attributes of all child radio buttons. */
|
|
@@ -47,21 +45,24 @@ export declare class MatRadioGroupHarness extends ComponentHarness {
|
|
|
47
45
|
* Checks if a radio-group harness has the given name. Throws if a radio-group with
|
|
48
46
|
* matching name could be found but has mismatching radio-button names.
|
|
49
47
|
*/
|
|
50
|
-
|
|
48
|
+
protected static _checkRadioGroupName(harness: _MatRadioGroupHarnessBase<any, any, any>, name: string): Promise<boolean>;
|
|
51
49
|
}
|
|
52
|
-
/** Harness for interacting with a standard mat-radio-
|
|
53
|
-
export declare class
|
|
54
|
-
/** The selector for the host element of a `
|
|
50
|
+
/** Harness for interacting with a standard mat-radio-group in tests. */
|
|
51
|
+
export declare class MatRadioGroupHarness extends _MatRadioGroupHarnessBase<typeof MatRadioButtonHarness, MatRadioButtonHarness, RadioButtonHarnessFilters> {
|
|
52
|
+
/** The selector for the host element of a `MatRadioGroup` instance. */
|
|
55
53
|
static hostSelector: string;
|
|
54
|
+
protected _buttonClass: typeof MatRadioButtonHarness;
|
|
56
55
|
/**
|
|
57
|
-
* Gets a `HarnessPredicate` that can be used to search for a `
|
|
56
|
+
* Gets a `HarnessPredicate` that can be used to search for a `MatRadioGroupHarness` that meets
|
|
58
57
|
* certain criteria.
|
|
59
|
-
* @param options Options for filtering which radio
|
|
58
|
+
* @param options Options for filtering which radio group instances are considered a match.
|
|
60
59
|
* @return a `HarnessPredicate` configured with the given options.
|
|
61
60
|
*/
|
|
62
|
-
static with(options?:
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
static with(options?: RadioGroupHarnessFilters): HarnessPredicate<MatRadioGroupHarness>;
|
|
62
|
+
}
|
|
63
|
+
export declare abstract class _MatRadioButtonHarnessBase extends ComponentHarness {
|
|
64
|
+
protected abstract _textLabel: AsyncFactoryFn<TestElement>;
|
|
65
|
+
protected abstract _clickLabel: AsyncFactoryFn<TestElement>;
|
|
65
66
|
private _input;
|
|
66
67
|
/** Whether the radio-button is checked. */
|
|
67
68
|
isChecked(): Promise<boolean>;
|
|
@@ -94,3 +95,17 @@ export declare class MatRadioButtonHarness extends ComponentHarness {
|
|
|
94
95
|
*/
|
|
95
96
|
check(): Promise<void>;
|
|
96
97
|
}
|
|
98
|
+
/** Harness for interacting with a standard mat-radio-button in tests. */
|
|
99
|
+
export declare class MatRadioButtonHarness extends _MatRadioButtonHarnessBase {
|
|
100
|
+
/** The selector for the host element of a `MatRadioButton` instance. */
|
|
101
|
+
static hostSelector: string;
|
|
102
|
+
/**
|
|
103
|
+
* Gets a `HarnessPredicate` that can be used to search for a `MatRadioButtonHarness` that meets
|
|
104
|
+
* certain criteria.
|
|
105
|
+
* @param options Options for filtering which radio button instances are considered a match.
|
|
106
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
107
|
+
*/
|
|
108
|
+
static with(options?: RadioButtonHarnessFilters): HarnessPredicate<MatRadioButtonHarness>;
|
|
109
|
+
protected _textLabel: AsyncFactoryFn<TestElement>;
|
|
110
|
+
protected _clickLabel: AsyncFactoryFn<TestElement>;
|
|
111
|
+
}
|
|
@@ -18,7 +18,7 @@ const package_config_1 = require("./package-config");
|
|
|
18
18
|
* Note that the fallback version range does not use caret, but tilde because that is
|
|
19
19
|
* the default for Angular framework dependencies in CLI projects.
|
|
20
20
|
*/
|
|
21
|
-
const fallbackMaterialVersionRange = `~11.1.0-
|
|
21
|
+
const fallbackMaterialVersionRange = `~11.1.0-sha-7643a3cb1`;
|
|
22
22
|
/**
|
|
23
23
|
* Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
|
|
24
24
|
* automatically executed if developers run `ng add @angular/material`.
|
|
@@ -5,24 +5,22 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { HarnessPredicate } from '@angular/cdk/testing';
|
|
8
|
+
import { HarnessPredicate, ComponentHarness, BaseHarnessFilters, ComponentHarnessConstructor } from '@angular/cdk/testing';
|
|
9
9
|
import { MatFormFieldControlHarness } from '@angular/material/form-field/testing/control';
|
|
10
10
|
import { MatOptionHarness, MatOptgroupHarness, OptionHarnessFilters, OptgroupHarnessFilters } from '@angular/material/core/testing';
|
|
11
11
|
import { SelectHarnessFilters } from './select-harness-filters';
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
export declare abstract class _MatSelectHarnessBase<OptionType extends (ComponentHarnessConstructor<Option> & {
|
|
13
|
+
with: (options?: OptionFilters) => HarnessPredicate<Option>;
|
|
14
|
+
}), Option extends ComponentHarness & {
|
|
15
|
+
click(): Promise<void>;
|
|
16
|
+
}, OptionFilters extends BaseHarnessFilters, OptionGroupType extends (ComponentHarnessConstructor<OptionGroup> & {
|
|
17
|
+
with: (options?: OptionGroupFilters) => HarnessPredicate<OptionGroup>;
|
|
18
|
+
}), OptionGroup extends ComponentHarness, OptionGroupFilters extends BaseHarnessFilters> extends MatFormFieldControlHarness {
|
|
19
|
+
protected abstract _prefix: string;
|
|
20
|
+
protected abstract _optionClass: OptionType;
|
|
21
|
+
protected abstract _optionGroupClass: OptionGroupType;
|
|
14
22
|
private _documentRootLocator;
|
|
15
23
|
private _backdrop;
|
|
16
|
-
private _trigger;
|
|
17
|
-
private _value;
|
|
18
|
-
static hostSelector: string;
|
|
19
|
-
/**
|
|
20
|
-
* Gets a `HarnessPredicate` that can be used to search for a `MatSelectHarness` that meets
|
|
21
|
-
* certain criteria.
|
|
22
|
-
* @param options Options for filtering which select instances are considered a match.
|
|
23
|
-
* @return a `HarnessPredicate` configured with the given options.
|
|
24
|
-
*/
|
|
25
|
-
static with(options?: SelectHarnessFilters): HarnessPredicate<MatSelectHarness>;
|
|
26
24
|
/** Gets a boolean promise indicating if the select is disabled. */
|
|
27
25
|
isDisabled(): Promise<boolean>;
|
|
28
26
|
/** Gets a boolean promise indicating if the select is valid. */
|
|
@@ -42,9 +40,9 @@ export declare class MatSelectHarness extends MatFormFieldControlHarness {
|
|
|
42
40
|
/** Whether the select is focused. */
|
|
43
41
|
isFocused(): Promise<boolean>;
|
|
44
42
|
/** Gets the options inside the select panel. */
|
|
45
|
-
getOptions(filter?: Omit<
|
|
43
|
+
getOptions(filter?: Omit<OptionFilters, 'ancestor'>): Promise<Option[]>;
|
|
46
44
|
/** Gets the groups of options inside the panel. */
|
|
47
|
-
getOptionGroups(filter?: Omit<
|
|
45
|
+
getOptionGroups(filter?: Omit<OptionGroupFilters, 'ancestor'>): Promise<OptionGroup[]>;
|
|
48
46
|
/** Gets whether the select is open. */
|
|
49
47
|
isOpen(): Promise<boolean>;
|
|
50
48
|
/** Opens the select's panel. */
|
|
@@ -53,9 +51,23 @@ export declare class MatSelectHarness extends MatFormFieldControlHarness {
|
|
|
53
51
|
* Clicks the options that match the passed-in filter. If the select is in multi-selection
|
|
54
52
|
* mode all options will be clicked, otherwise the harness will pick the first matching option.
|
|
55
53
|
*/
|
|
56
|
-
clickOptions(filter?:
|
|
54
|
+
clickOptions(filter?: OptionFilters): Promise<void>;
|
|
57
55
|
/** Closes the select's panel. */
|
|
58
56
|
close(): Promise<void>;
|
|
59
57
|
/** Gets the selector that should be used to find this select's panel. */
|
|
60
58
|
private _getPanelSelector;
|
|
61
59
|
}
|
|
60
|
+
/** Harness for interacting with a standard mat-select in tests. */
|
|
61
|
+
export declare class MatSelectHarness extends _MatSelectHarnessBase<typeof MatOptionHarness, MatOptionHarness, OptionHarnessFilters, typeof MatOptgroupHarness, MatOptgroupHarness, OptgroupHarnessFilters> {
|
|
62
|
+
static hostSelector: string;
|
|
63
|
+
protected _prefix: string;
|
|
64
|
+
protected _optionClass: typeof MatOptionHarness;
|
|
65
|
+
protected _optionGroupClass: typeof MatOptgroupHarness;
|
|
66
|
+
/**
|
|
67
|
+
* Gets a `HarnessPredicate` that can be used to search for a `MatSelectHarness` that meets
|
|
68
|
+
* certain criteria.
|
|
69
|
+
* @param options Options for filtering which select instances are considered a match.
|
|
70
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
71
|
+
*/
|
|
72
|
+
static with(options?: SelectHarnessFilters): HarnessPredicate<MatSelectHarness>;
|
|
73
|
+
}
|