@angular/material 19.2.1 → 19.2.3
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.d.ts +83 -124
- package/autocomplete/testing/index.d.ts +5 -11
- package/badge/index.d.ts +17 -30
- package/badge/testing/index.d.ts +5 -8
- package/bottom-sheet/index.d.ts +88 -104
- package/bottom-sheet/testing/index.d.ts +4 -6
- package/button/index.d.ts +109 -148
- package/button/testing/index.d.ts +6 -10
- package/button-toggle/index.d.ts +116 -142
- package/button-toggle/testing/index.d.ts +34 -36
- package/card/index.d.ts +79 -117
- package/card/testing/index.d.ts +11 -15
- package/checkbox/index.d.ts +55 -85
- package/checkbox/testing/index.d.ts +6 -10
- package/chips/index.d.ts +592 -690
- package/chips/testing/index.d.ts +78 -93
- package/core/index.d.ts +565 -669
- package/core/testing/index.d.ts +28 -32
- package/datepicker/index.d.ts +1323 -1479
- package/datepicker/testing/index.d.ts +109 -119
- package/dialog/index.d.ts +194 -246
- package/dialog/testing/index.d.ts +17 -26
- package/divider/index.d.ts +4 -10
- package/divider/testing/index.d.ts +4 -6
- package/expansion/index.d.ts +137 -189
- package/expansion/testing/index.d.ts +25 -31
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +39 -30
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +13 -17
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +11 -22
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +15 -14
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +40 -40
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -50
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +19 -19
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +41 -47
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +71 -71
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +124 -100
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +29 -33
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +7 -11
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +27 -31
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs +0 -2
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +34 -38
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -26
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -11
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +25 -17
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -11
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list/testing.mjs +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +51 -55
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +31 -23
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +20 -16
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs +0 -4
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +12 -12
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs +0 -4
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +12 -12
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +15 -14
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +24 -20
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +31 -31
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +14 -18
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -20
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +27 -27
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +24 -20
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +41 -37
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -59
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +51 -58
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +15 -20
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -14
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +25 -17
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -29
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/index.d.ts +251 -318
- package/form-field/testing/control/index.d.ts +2 -2
- package/form-field/testing/index.d.ts +14 -21
- package/grid-list/index.d.ts +124 -150
- package/grid-list/testing/index.d.ts +39 -44
- package/icon/index.d.ts +87 -108
- package/icon/testing/index.d.ts +38 -43
- package/index.d.ts +2 -3
- package/input/index.d.ts +27 -61
- package/input/testing/index.d.ts +16 -19
- package/list/index.d.ts +159 -242
- package/list/testing/index.d.ts +157 -179
- package/menu/index.d.ts +180 -231
- package/menu/testing/index.d.ts +17 -23
- package/package.json +2 -2
- package/paginator/index.d.ts +84 -97
- package/paginator/testing/index.d.ts +10 -14
- package/progress-bar/index.d.ts +38 -58
- package/progress-bar/testing/index.d.ts +7 -10
- package/progress-spinner/index.d.ts +38 -51
- package/progress-spinner/testing/index.d.ts +7 -10
- package/radio/index.d.ts +145 -168
- package/radio/testing/index.d.ts +61 -67
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +6 -9
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +6 -9
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +6 -9
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +6 -9
- package/schematics/ng-generate/theme-color/schema.json +10 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +1 -1
- package/select/index.d.ts +77 -130
- package/select/testing/index.d.ts +10 -15
- package/sidenav/index.d.ts +47 -91
- package/sidenav/testing/index.d.ts +58 -63
- package/slide-toggle/index.d.ts +51 -84
- package/slide-toggle/testing/index.d.ts +17 -21
- package/slider/index.d.ts +277 -327
- package/slider/testing/index.d.ts +42 -47
- package/snack-bar/index.d.ts +147 -185
- package/snack-bar/testing/index.d.ts +7 -9
- package/sort/index.d.ts +94 -124
- package/sort/testing/index.d.ts +21 -24
- package/stepper/index.d.ts +108 -165
- package/stepper/testing/index.d.ts +43 -52
- package/table/index.d.ts +87 -153
- package/table/testing/index.d.ts +64 -78
- package/tabs/index.d.ts +306 -382
- package/tabs/testing/index.d.ts +67 -76
- package/timepicker/index.d.ts +123 -159
- package/timepicker/testing/index.d.ts +20 -26
- package/toolbar/index.d.ts +13 -25
- package/toolbar/testing/index.d.ts +13 -16
- package/tooltip/index.d.ts +88 -117
- package/tooltip/testing/index.d.ts +7 -10
- package/tree/index.d.ts +116 -163
- package/tree/testing/index.d.ts +52 -58
package/radio/index.d.ts
CHANGED
|
@@ -1,170 +1,12 @@
|
|
|
1
|
-
import { AfterContentInit } from '@angular/core';
|
|
2
|
-
import { AfterViewInit } from '@angular/core';
|
|
3
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
-
import { DoCheck } from '@angular/core';
|
|
5
|
-
import { ElementRef } from '@angular/core';
|
|
6
|
-
import { EventEmitter } from '@angular/core';
|
|
7
1
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
8
2
|
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, AfterContentInit, OnDestroy, EventEmitter, QueryList, OnInit, AfterViewInit, DoCheck, ElementRef } from '@angular/core';
|
|
4
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
9
5
|
import * as i1 from '@angular/material/core';
|
|
10
|
-
import { InjectionToken } from '@angular/core';
|
|
11
|
-
import { OnDestroy } from '@angular/core';
|
|
12
|
-
import { OnInit } from '@angular/core';
|
|
13
|
-
import { QueryList } from '@angular/core';
|
|
14
6
|
import { ThemePalette } from '@angular/material/core';
|
|
15
7
|
|
|
16
|
-
declare namespace i2 {
|
|
17
|
-
export {
|
|
18
|
-
MAT_RADIO_DEFAULT_OPTIONS_FACTORY,
|
|
19
|
-
MatRadioChange,
|
|
20
|
-
MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,
|
|
21
|
-
MAT_RADIO_GROUP,
|
|
22
|
-
MatRadioDefaultOptions,
|
|
23
|
-
MAT_RADIO_DEFAULT_OPTIONS,
|
|
24
|
-
MatRadioGroup,
|
|
25
|
-
MatRadioButton
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export declare const MAT_RADIO_DEFAULT_OPTIONS: InjectionToken<MatRadioDefaultOptions>;
|
|
30
|
-
|
|
31
|
-
export declare function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Injection token that can be used to inject instances of `MatRadioGroup`. It serves as
|
|
35
|
-
* alternative token to the actual `MatRadioGroup` class which could cause unnecessary
|
|
36
|
-
* retention of the class and its component metadata.
|
|
37
|
-
*/
|
|
38
|
-
export declare const MAT_RADIO_GROUP: InjectionToken<MatRadioGroup>;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This
|
|
42
|
-
* allows it to support [(ngModel)] and ngControl.
|
|
43
|
-
* @docs-private
|
|
44
|
-
*/
|
|
45
|
-
export declare const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any;
|
|
46
|
-
|
|
47
|
-
export declare class MatRadioButton implements OnInit, AfterViewInit, DoCheck, OnDestroy {
|
|
48
|
-
protected _elementRef: ElementRef<any>;
|
|
49
|
-
private _changeDetector;
|
|
50
|
-
private _focusMonitor;
|
|
51
|
-
private _radioDispatcher;
|
|
52
|
-
private _defaultOptions;
|
|
53
|
-
private _ngZone;
|
|
54
|
-
private _renderer;
|
|
55
|
-
private _uniqueId;
|
|
56
|
-
private _cleanupClick;
|
|
57
|
-
/** The unique ID for the radio button. */
|
|
58
|
-
id: string;
|
|
59
|
-
/** Analog to HTML 'name' attribute used to group radios for unique selection. */
|
|
60
|
-
name: string;
|
|
61
|
-
/** Used to set the 'aria-label' attribute on the underlying input element. */
|
|
62
|
-
ariaLabel: string;
|
|
63
|
-
/** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */
|
|
64
|
-
ariaLabelledby: string;
|
|
65
|
-
/** The 'aria-describedby' attribute is read after the element's label and field type. */
|
|
66
|
-
ariaDescribedby: string;
|
|
67
|
-
/** Whether ripples are disabled inside the radio button */
|
|
68
|
-
disableRipple: boolean;
|
|
69
|
-
/** Tabindex of the radio button. */
|
|
70
|
-
tabIndex: number;
|
|
71
|
-
/** Whether this radio button is checked. */
|
|
72
|
-
get checked(): boolean;
|
|
73
|
-
set checked(value: boolean);
|
|
74
|
-
/** The value of this radio button. */
|
|
75
|
-
get value(): any;
|
|
76
|
-
set value(value: any);
|
|
77
|
-
/** Whether the label should appear after or before the radio button. Defaults to 'after' */
|
|
78
|
-
get labelPosition(): 'before' | 'after';
|
|
79
|
-
set labelPosition(value: "before" | "after");
|
|
80
|
-
private _labelPosition;
|
|
81
|
-
/** Whether the radio button is disabled. */
|
|
82
|
-
get disabled(): boolean;
|
|
83
|
-
set disabled(value: boolean);
|
|
84
|
-
/** Whether the radio button is required. */
|
|
85
|
-
get required(): boolean;
|
|
86
|
-
set required(value: boolean);
|
|
87
|
-
/**
|
|
88
|
-
* Theme color of the radio button. This API is supported in M2 themes only, it
|
|
89
|
-
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/radio/styling.
|
|
90
|
-
*
|
|
91
|
-
* For information on applying color variants in M3, see
|
|
92
|
-
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
|
|
93
|
-
*/
|
|
94
|
-
get color(): ThemePalette;
|
|
95
|
-
set color(newValue: ThemePalette);
|
|
96
|
-
private _color;
|
|
97
|
-
/** Whether the radio button should remain interactive when it is disabled. */
|
|
98
|
-
get disabledInteractive(): boolean;
|
|
99
|
-
set disabledInteractive(value: boolean);
|
|
100
|
-
private _disabledInteractive;
|
|
101
|
-
/**
|
|
102
|
-
* Event emitted when the checked state of this radio button changes.
|
|
103
|
-
* Change events are only emitted when the value changes due to user interaction with
|
|
104
|
-
* the radio button (the same behavior as `<input type-"radio">`).
|
|
105
|
-
*/
|
|
106
|
-
readonly change: EventEmitter<MatRadioChange>;
|
|
107
|
-
/** The parent radio group. May or may not be present. */
|
|
108
|
-
radioGroup: MatRadioGroup;
|
|
109
|
-
/** ID of the native input element inside `<mat-radio-button>` */
|
|
110
|
-
get inputId(): string;
|
|
111
|
-
/** Whether this radio is checked. */
|
|
112
|
-
private _checked;
|
|
113
|
-
/** Whether this radio is disabled. */
|
|
114
|
-
private _disabled;
|
|
115
|
-
/** Whether this radio is required. */
|
|
116
|
-
private _required;
|
|
117
|
-
/** Value assigned to this radio. */
|
|
118
|
-
private _value;
|
|
119
|
-
/** Unregister function for _radioDispatcher */
|
|
120
|
-
private _removeUniqueSelectionListener;
|
|
121
|
-
/** Previous value of the input's tabindex. */
|
|
122
|
-
private _previousTabIndex;
|
|
123
|
-
/** The native `<input type=radio>` element */
|
|
124
|
-
_inputElement: ElementRef<HTMLInputElement>;
|
|
125
|
-
/** Trigger elements for the ripple events. */
|
|
126
|
-
_rippleTrigger: ElementRef<HTMLElement>;
|
|
127
|
-
/** Whether animations are disabled. */
|
|
128
|
-
_noopAnimations: boolean;
|
|
129
|
-
private _injector;
|
|
130
|
-
constructor(...args: unknown[]);
|
|
131
|
-
/** Focuses the radio button. */
|
|
132
|
-
focus(options?: FocusOptions, origin?: FocusOrigin): void;
|
|
133
|
-
/**
|
|
134
|
-
* Marks the radio button as needing checking for change detection.
|
|
135
|
-
* This method is exposed because the parent radio group will directly
|
|
136
|
-
* update bound properties of the radio button.
|
|
137
|
-
*/
|
|
138
|
-
_markForCheck(): void;
|
|
139
|
-
ngOnInit(): void;
|
|
140
|
-
ngDoCheck(): void;
|
|
141
|
-
ngAfterViewInit(): void;
|
|
142
|
-
ngOnDestroy(): void;
|
|
143
|
-
/** Dispatch change event with current value. */
|
|
144
|
-
private _emitChangeEvent;
|
|
145
|
-
_isRippleDisabled(): boolean;
|
|
146
|
-
/** Triggered when the radio button receives an interaction from the user. */
|
|
147
|
-
_onInputInteraction(event: Event): void;
|
|
148
|
-
/** Triggered when the user clicks on the touch target. */
|
|
149
|
-
_onTouchTargetClick(event: Event): void;
|
|
150
|
-
/** Sets the disabled state and marks for check if a change occurred. */
|
|
151
|
-
protected _setDisabled(value: boolean): void;
|
|
152
|
-
/** Called when the input is clicked. */
|
|
153
|
-
private _onInputClick;
|
|
154
|
-
/** Gets the tabindex for the underlying input element. */
|
|
155
|
-
private _updateTabIndex;
|
|
156
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatRadioButton, never>;
|
|
157
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatRadioButton, "mat-radio-button", ["matRadioButton"], { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "value": { "alias": "value"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "color": { "alias": "color"; "required": false; }; "disabledInteractive": { "alias": "disabledInteractive"; "required": false; }; }, { "change": "change"; }, never, ["*"], true, never>;
|
|
158
|
-
static ngAcceptInputType_disableRipple: unknown;
|
|
159
|
-
static ngAcceptInputType_tabIndex: unknown;
|
|
160
|
-
static ngAcceptInputType_checked: unknown;
|
|
161
|
-
static ngAcceptInputType_disabled: unknown;
|
|
162
|
-
static ngAcceptInputType_required: unknown;
|
|
163
|
-
static ngAcceptInputType_disabledInteractive: unknown;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
8
|
/** Change event object emitted by radio button and radio group. */
|
|
167
|
-
|
|
9
|
+
declare class MatRadioChange<T = any> {
|
|
168
10
|
/** The radio button that emits the change event. */
|
|
169
11
|
source: MatRadioButton;
|
|
170
12
|
/** The value of the radio button. */
|
|
@@ -175,8 +17,19 @@ export declare class MatRadioChange<T = any> {
|
|
|
175
17
|
/** The value of the radio button. */
|
|
176
18
|
value: T);
|
|
177
19
|
}
|
|
178
|
-
|
|
179
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This
|
|
22
|
+
* allows it to support [(ngModel)] and ngControl.
|
|
23
|
+
* @docs-private
|
|
24
|
+
*/
|
|
25
|
+
declare const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any;
|
|
26
|
+
/**
|
|
27
|
+
* Injection token that can be used to inject instances of `MatRadioGroup`. It serves as
|
|
28
|
+
* alternative token to the actual `MatRadioGroup` class which could cause unnecessary
|
|
29
|
+
* retention of the class and its component metadata.
|
|
30
|
+
*/
|
|
31
|
+
declare const MAT_RADIO_GROUP: InjectionToken<MatRadioGroup>;
|
|
32
|
+
interface MatRadioDefaultOptions {
|
|
180
33
|
/**
|
|
181
34
|
* Theme color of the radio button. This API is supported in M2 themes only, it
|
|
182
35
|
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/radio/styling.
|
|
@@ -188,11 +41,17 @@ export declare interface MatRadioDefaultOptions {
|
|
|
188
41
|
/** Whether disabled radio buttons should be interactive. */
|
|
189
42
|
disabledInteractive?: boolean;
|
|
190
43
|
}
|
|
191
|
-
|
|
44
|
+
declare const MAT_RADIO_DEFAULT_OPTIONS: InjectionToken<MatRadioDefaultOptions>;
|
|
45
|
+
/**
|
|
46
|
+
* @docs-private
|
|
47
|
+
* @deprecated No longer used, will be removed.
|
|
48
|
+
* @breaking-change 21.0.0
|
|
49
|
+
*/
|
|
50
|
+
declare function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions;
|
|
192
51
|
/**
|
|
193
52
|
* A group of radio buttons. May contain one or more `<mat-radio-button>` elements.
|
|
194
53
|
*/
|
|
195
|
-
|
|
54
|
+
declare class MatRadioGroup implements AfterContentInit, OnDestroy, ControlValueAccessor {
|
|
196
55
|
private _changeDetector;
|
|
197
56
|
/** Selected value for the radio group. */
|
|
198
57
|
private _value;
|
|
@@ -310,11 +169,129 @@ export declare class MatRadioGroup implements AfterContentInit, OnDestroy, Contr
|
|
|
310
169
|
static ngAcceptInputType_required: unknown;
|
|
311
170
|
static ngAcceptInputType_disabledInteractive: unknown;
|
|
312
171
|
}
|
|
172
|
+
declare class MatRadioButton implements OnInit, AfterViewInit, DoCheck, OnDestroy {
|
|
173
|
+
protected _elementRef: ElementRef<any>;
|
|
174
|
+
private _changeDetector;
|
|
175
|
+
private _focusMonitor;
|
|
176
|
+
private _radioDispatcher;
|
|
177
|
+
private _defaultOptions;
|
|
178
|
+
private _ngZone;
|
|
179
|
+
private _renderer;
|
|
180
|
+
private _uniqueId;
|
|
181
|
+
private _cleanupClick;
|
|
182
|
+
/** The unique ID for the radio button. */
|
|
183
|
+
id: string;
|
|
184
|
+
/** Analog to HTML 'name' attribute used to group radios for unique selection. */
|
|
185
|
+
name: string;
|
|
186
|
+
/** Used to set the 'aria-label' attribute on the underlying input element. */
|
|
187
|
+
ariaLabel: string;
|
|
188
|
+
/** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */
|
|
189
|
+
ariaLabelledby: string;
|
|
190
|
+
/** The 'aria-describedby' attribute is read after the element's label and field type. */
|
|
191
|
+
ariaDescribedby: string;
|
|
192
|
+
/** Whether ripples are disabled inside the radio button */
|
|
193
|
+
disableRipple: boolean;
|
|
194
|
+
/** Tabindex of the radio button. */
|
|
195
|
+
tabIndex: number;
|
|
196
|
+
/** Whether this radio button is checked. */
|
|
197
|
+
get checked(): boolean;
|
|
198
|
+
set checked(value: boolean);
|
|
199
|
+
/** The value of this radio button. */
|
|
200
|
+
get value(): any;
|
|
201
|
+
set value(value: any);
|
|
202
|
+
/** Whether the label should appear after or before the radio button. Defaults to 'after' */
|
|
203
|
+
get labelPosition(): 'before' | 'after';
|
|
204
|
+
set labelPosition(value: "before" | "after");
|
|
205
|
+
private _labelPosition;
|
|
206
|
+
/** Whether the radio button is disabled. */
|
|
207
|
+
get disabled(): boolean;
|
|
208
|
+
set disabled(value: boolean);
|
|
209
|
+
/** Whether the radio button is required. */
|
|
210
|
+
get required(): boolean;
|
|
211
|
+
set required(value: boolean);
|
|
212
|
+
/**
|
|
213
|
+
* Theme color of the radio button. This API is supported in M2 themes only, it
|
|
214
|
+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/radio/styling.
|
|
215
|
+
*
|
|
216
|
+
* For information on applying color variants in M3, see
|
|
217
|
+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
|
|
218
|
+
*/
|
|
219
|
+
get color(): ThemePalette;
|
|
220
|
+
set color(newValue: ThemePalette);
|
|
221
|
+
private _color;
|
|
222
|
+
/** Whether the radio button should remain interactive when it is disabled. */
|
|
223
|
+
get disabledInteractive(): boolean;
|
|
224
|
+
set disabledInteractive(value: boolean);
|
|
225
|
+
private _disabledInteractive;
|
|
226
|
+
/**
|
|
227
|
+
* Event emitted when the checked state of this radio button changes.
|
|
228
|
+
* Change events are only emitted when the value changes due to user interaction with
|
|
229
|
+
* the radio button (the same behavior as `<input type-"radio">`).
|
|
230
|
+
*/
|
|
231
|
+
readonly change: EventEmitter<MatRadioChange>;
|
|
232
|
+
/** The parent radio group. May or may not be present. */
|
|
233
|
+
radioGroup: MatRadioGroup;
|
|
234
|
+
/** ID of the native input element inside `<mat-radio-button>` */
|
|
235
|
+
get inputId(): string;
|
|
236
|
+
/** Whether this radio is checked. */
|
|
237
|
+
private _checked;
|
|
238
|
+
/** Whether this radio is disabled. */
|
|
239
|
+
private _disabled;
|
|
240
|
+
/** Whether this radio is required. */
|
|
241
|
+
private _required;
|
|
242
|
+
/** Value assigned to this radio. */
|
|
243
|
+
private _value;
|
|
244
|
+
/** Unregister function for _radioDispatcher */
|
|
245
|
+
private _removeUniqueSelectionListener;
|
|
246
|
+
/** Previous value of the input's tabindex. */
|
|
247
|
+
private _previousTabIndex;
|
|
248
|
+
/** The native `<input type=radio>` element */
|
|
249
|
+
_inputElement: ElementRef<HTMLInputElement>;
|
|
250
|
+
/** Trigger elements for the ripple events. */
|
|
251
|
+
_rippleTrigger: ElementRef<HTMLElement>;
|
|
252
|
+
/** Whether animations are disabled. */
|
|
253
|
+
_noopAnimations: boolean;
|
|
254
|
+
private _injector;
|
|
255
|
+
constructor(...args: unknown[]);
|
|
256
|
+
/** Focuses the radio button. */
|
|
257
|
+
focus(options?: FocusOptions, origin?: FocusOrigin): void;
|
|
258
|
+
/**
|
|
259
|
+
* Marks the radio button as needing checking for change detection.
|
|
260
|
+
* This method is exposed because the parent radio group will directly
|
|
261
|
+
* update bound properties of the radio button.
|
|
262
|
+
*/
|
|
263
|
+
_markForCheck(): void;
|
|
264
|
+
ngOnInit(): void;
|
|
265
|
+
ngDoCheck(): void;
|
|
266
|
+
ngAfterViewInit(): void;
|
|
267
|
+
ngOnDestroy(): void;
|
|
268
|
+
/** Dispatch change event with current value. */
|
|
269
|
+
private _emitChangeEvent;
|
|
270
|
+
_isRippleDisabled(): boolean;
|
|
271
|
+
/** Triggered when the radio button receives an interaction from the user. */
|
|
272
|
+
_onInputInteraction(event: Event): void;
|
|
273
|
+
/** Triggered when the user clicks on the touch target. */
|
|
274
|
+
_onTouchTargetClick(event: Event): void;
|
|
275
|
+
/** Sets the disabled state and marks for check if a change occurred. */
|
|
276
|
+
protected _setDisabled(value: boolean): void;
|
|
277
|
+
/** Called when the input is clicked. */
|
|
278
|
+
private _onInputClick;
|
|
279
|
+
/** Gets the tabindex for the underlying input element. */
|
|
280
|
+
private _updateTabIndex;
|
|
281
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatRadioButton, never>;
|
|
282
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatRadioButton, "mat-radio-button", ["matRadioButton"], { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "value": { "alias": "value"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "color": { "alias": "color"; "required": false; }; "disabledInteractive": { "alias": "disabledInteractive"; "required": false; }; }, { "change": "change"; }, never, ["*"], true, never>;
|
|
283
|
+
static ngAcceptInputType_disableRipple: unknown;
|
|
284
|
+
static ngAcceptInputType_tabIndex: unknown;
|
|
285
|
+
static ngAcceptInputType_checked: unknown;
|
|
286
|
+
static ngAcceptInputType_disabled: unknown;
|
|
287
|
+
static ngAcceptInputType_required: unknown;
|
|
288
|
+
static ngAcceptInputType_disabledInteractive: unknown;
|
|
289
|
+
}
|
|
313
290
|
|
|
314
|
-
|
|
291
|
+
declare class MatRadioModule {
|
|
315
292
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatRadioModule, never>;
|
|
316
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatRadioModule, never, [typeof i1.MatCommonModule, typeof i1.MatRippleModule, typeof
|
|
293
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatRadioModule, never, [typeof i1.MatCommonModule, typeof i1.MatRippleModule, typeof MatRadioGroup, typeof MatRadioButton], [typeof i1.MatCommonModule, typeof MatRadioGroup, typeof MatRadioButton]>;
|
|
317
294
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatRadioModule>;
|
|
318
295
|
}
|
|
319
296
|
|
|
320
|
-
export { }
|
|
297
|
+
export { MAT_RADIO_DEFAULT_OPTIONS, MAT_RADIO_DEFAULT_OPTIONS_FACTORY, MAT_RADIO_GROUP, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioButton, MatRadioChange, type MatRadioDefaultOptions, MatRadioGroup, MatRadioModule };
|
package/radio/testing/index.d.ts
CHANGED
|
@@ -1,58 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BaseHarnessFilters } from '@angular/cdk/testing';
|
|
3
|
-
import { ComponentHarness } from '@angular/cdk/testing';
|
|
4
|
-
import { ComponentHarnessConstructor } from '@angular/cdk/testing';
|
|
5
|
-
import { HarnessPredicate } from '@angular/cdk/testing';
|
|
6
|
-
import { TestElement } from '@angular/cdk/testing';
|
|
1
|
+
import * as _angular_cdk_testing from '@angular/cdk/testing';
|
|
2
|
+
import { BaseHarnessFilters, ComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
|
|
7
3
|
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
private _input;
|
|
22
|
-
/** Whether the radio-button is checked. */
|
|
23
|
-
isChecked(): Promise<boolean>;
|
|
24
|
-
/** Whether the radio-button is disabled. */
|
|
25
|
-
isDisabled(): Promise<boolean>;
|
|
26
|
-
/** Whether the radio-button is required. */
|
|
27
|
-
isRequired(): Promise<boolean>;
|
|
28
|
-
/** Gets the radio-button's name. */
|
|
29
|
-
getName(): Promise<string | null>;
|
|
30
|
-
/** Gets the radio-button's id. */
|
|
31
|
-
getId(): Promise<string | null>;
|
|
32
|
-
/**
|
|
33
|
-
* Gets the value of the radio-button. The radio-button value will be converted to a string.
|
|
34
|
-
*
|
|
35
|
-
* Note: This means that for radio-button's with an object as a value `[object Object]` is
|
|
36
|
-
* intentionally returned.
|
|
37
|
-
*/
|
|
38
|
-
getValue(): Promise<string | null>;
|
|
39
|
-
/** Gets the radio-button's label text. */
|
|
40
|
-
getLabelText(): Promise<string>;
|
|
41
|
-
/** Focuses the radio-button. */
|
|
42
|
-
focus(): Promise<void>;
|
|
43
|
-
/** Blurs the radio-button. */
|
|
44
|
-
blur(): Promise<void>;
|
|
45
|
-
/** Whether the radio-button is focused. */
|
|
46
|
-
isFocused(): Promise<boolean>;
|
|
47
|
-
/**
|
|
48
|
-
* Puts the radio-button in a checked state by clicking it if it is currently unchecked,
|
|
49
|
-
* or doing nothing if it is already checked.
|
|
50
|
-
*/
|
|
51
|
-
check(): Promise<void>;
|
|
4
|
+
/** A set of criteria that can be used to filter a list of `MatRadioGroupHarness` instances. */
|
|
5
|
+
interface RadioGroupHarnessFilters extends BaseHarnessFilters {
|
|
6
|
+
/** Only find instances whose name attribute is the given value. */
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
/** A set of criteria that can be used to filter a list of `MatRadioButtonHarness` instances. */
|
|
10
|
+
interface RadioButtonHarnessFilters extends BaseHarnessFilters {
|
|
11
|
+
/** Only find instances whose label matches the given value. */
|
|
12
|
+
label?: string | RegExp;
|
|
13
|
+
/** Only find instances whose name attribute is the given value. */
|
|
14
|
+
name?: string;
|
|
15
|
+
/** Only find instances with the given checked value. */
|
|
16
|
+
checked?: boolean;
|
|
52
17
|
}
|
|
53
18
|
|
|
54
19
|
/** Harness for interacting with a mat-radio-group in tests. */
|
|
55
|
-
|
|
20
|
+
declare class MatRadioGroupHarness extends ComponentHarness {
|
|
56
21
|
/** The selector for the host element of a `MatRadioGroup` instance. */
|
|
57
22
|
static hostSelector: string;
|
|
58
23
|
private _buttonClass;
|
|
@@ -94,21 +59,50 @@ export declare class MatRadioGroupHarness extends ComponentHarness {
|
|
|
94
59
|
*/
|
|
95
60
|
protected static _checkRadioGroupName(harness: MatRadioGroupHarness, name: string): Promise<boolean>;
|
|
96
61
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
62
|
+
/** Harness for interacting with a mat-radio-button in tests. */
|
|
63
|
+
declare class MatRadioButtonHarness extends ComponentHarness {
|
|
64
|
+
/** The selector for the host element of a `MatRadioButton` instance. */
|
|
65
|
+
static hostSelector: string;
|
|
66
|
+
/**
|
|
67
|
+
* Gets a `HarnessPredicate` that can be used to search for a radio button with specific
|
|
68
|
+
* attributes.
|
|
69
|
+
* @param options Options for filtering which radio button instances are considered a match.
|
|
70
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
71
|
+
*/
|
|
72
|
+
static with<T extends MatRadioButtonHarness>(this: ComponentHarnessConstructor<T>, options?: RadioButtonHarnessFilters): HarnessPredicate<T>;
|
|
73
|
+
protected _textLabel: _angular_cdk_testing.AsyncFactoryFn<_angular_cdk_testing.TestElement>;
|
|
74
|
+
protected _clickLabel: _angular_cdk_testing.AsyncFactoryFn<_angular_cdk_testing.TestElement>;
|
|
75
|
+
private _input;
|
|
76
|
+
/** Whether the radio-button is checked. */
|
|
77
|
+
isChecked(): Promise<boolean>;
|
|
78
|
+
/** Whether the radio-button is disabled. */
|
|
79
|
+
isDisabled(): Promise<boolean>;
|
|
80
|
+
/** Whether the radio-button is required. */
|
|
81
|
+
isRequired(): Promise<boolean>;
|
|
82
|
+
/** Gets the radio-button's name. */
|
|
83
|
+
getName(): Promise<string | null>;
|
|
84
|
+
/** Gets the radio-button's id. */
|
|
85
|
+
getId(): Promise<string | null>;
|
|
86
|
+
/**
|
|
87
|
+
* Gets the value of the radio-button. The radio-button value will be converted to a string.
|
|
88
|
+
*
|
|
89
|
+
* Note: This means that for radio-button's with an object as a value `[object Object]` is
|
|
90
|
+
* intentionally returned.
|
|
91
|
+
*/
|
|
92
|
+
getValue(): Promise<string | null>;
|
|
93
|
+
/** Gets the radio-button's label text. */
|
|
94
|
+
getLabelText(): Promise<string>;
|
|
95
|
+
/** Focuses the radio-button. */
|
|
96
|
+
focus(): Promise<void>;
|
|
97
|
+
/** Blurs the radio-button. */
|
|
98
|
+
blur(): Promise<void>;
|
|
99
|
+
/** Whether the radio-button is focused. */
|
|
100
|
+
isFocused(): Promise<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* Puts the radio-button in a checked state by clicking it if it is currently unchecked,
|
|
103
|
+
* or doing nothing if it is already checked.
|
|
104
|
+
*/
|
|
105
|
+
check(): Promise<void>;
|
|
112
106
|
}
|
|
113
107
|
|
|
114
|
-
export { }
|
|
108
|
+
export { MatRadioButtonHarness, MatRadioGroupHarness, type RadioButtonHarnessFilters, type RadioGroupHarnessFilters };
|
|
@@ -19,7 +19,7 @@ const package_config_1 = require("./package-config");
|
|
|
19
19
|
* Note that the fallback version range does not use caret, but tilde because that is
|
|
20
20
|
* the default for Angular framework dependencies in CLI projects.
|
|
21
21
|
*/
|
|
22
|
-
const fallbackMaterialVersionRange = `~19.2.
|
|
22
|
+
const fallbackMaterialVersionRange = `~19.2.3`;
|
|
23
23
|
/**
|
|
24
24
|
* Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
|
|
25
25
|
* automatically executed if developers run `ng add @angular/material`.
|
|
@@ -19,7 +19,7 @@ const package_config_1 = require("./package-config");
|
|
|
19
19
|
* Note that the fallback version range does not use caret, but tilde because that is
|
|
20
20
|
* the default for Angular framework dependencies in CLI projects.
|
|
21
21
|
*/
|
|
22
|
-
const fallbackMaterialVersionRange = `~19.2.
|
|
22
|
+
const fallbackMaterialVersionRange = `~19.2.3`;
|
|
23
23
|
/**
|
|
24
24
|
* Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
|
|
25
25
|
* automatically executed if developers run `ng add @angular/material`.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'
|
|
2
|
-
import { NoopAnimationsModule } from '@angular/platform-browser/animations';<% if(!standalone) { %>
|
|
1
|
+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';<% if(!standalone) { %>
|
|
3
2
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
4
3
|
import { MatButtonModule } from '@angular/material/button';
|
|
5
4
|
import { MatCardModule } from '@angular/material/card';
|
|
@@ -11,23 +10,21 @@ import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.compone
|
|
|
11
10
|
|
|
12
11
|
describe('<%= classify(name) %>Component', () => {
|
|
13
12
|
let component: <%= classify(name) %>Component;
|
|
14
|
-
let fixture: ComponentFixture<<%= classify(name) %>Component
|
|
13
|
+
let fixture: ComponentFixture<<%= classify(name) %>Component>;<% if(!standalone) { %>
|
|
15
14
|
|
|
16
15
|
beforeEach(waitForAsync(() => {
|
|
17
|
-
TestBed.configureTestingModule({
|
|
18
|
-
imports: [NoopAnimationsModule]<% } else { %>
|
|
16
|
+
TestBed.configureTestingModule({
|
|
19
17
|
declarations: [<%= classify(name) %>Component],
|
|
20
18
|
imports: [
|
|
21
|
-
NoopAnimationsModule,
|
|
22
19
|
ReactiveFormsModule,
|
|
23
20
|
MatButtonModule,
|
|
24
21
|
MatCardModule,
|
|
25
22
|
MatInputModule,
|
|
26
23
|
MatRadioModule,
|
|
27
24
|
MatSelectModule,
|
|
28
|
-
]
|
|
29
|
-
})
|
|
30
|
-
}))
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
}));<% } %>
|
|
31
28
|
|
|
32
29
|
beforeEach(() => {
|
|
33
30
|
fixture = TestBed.createComponent(<%= classify(name) %>Component);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'
|
|
2
|
-
import { NoopAnimationsModule } from '@angular/platform-browser/animations';<% if(!standalone) { %>
|
|
1
|
+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';<% if(!standalone) { %>
|
|
3
2
|
import { MatButtonModule } from '@angular/material/button';
|
|
4
3
|
import { MatCardModule } from '@angular/material/card';
|
|
5
4
|
import { MatGridListModule } from '@angular/material/grid-list';
|
|
@@ -10,22 +9,20 @@ import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.compone
|
|
|
10
9
|
|
|
11
10
|
describe('<%= classify(name) %>Component', () => {
|
|
12
11
|
let component: <%= classify(name) %>Component;
|
|
13
|
-
let fixture: ComponentFixture<<%= classify(name) %>Component
|
|
12
|
+
let fixture: ComponentFixture<<%= classify(name) %>Component>;<% if(!standalone) { %>
|
|
14
13
|
|
|
15
14
|
beforeEach(waitForAsync(() => {
|
|
16
|
-
TestBed.configureTestingModule({
|
|
17
|
-
imports: [NoopAnimationsModule]<% } else { %>
|
|
15
|
+
TestBed.configureTestingModule({
|
|
18
16
|
declarations: [<%= classify(name) %>Component],
|
|
19
17
|
imports: [
|
|
20
|
-
NoopAnimationsModule,
|
|
21
18
|
MatButtonModule,
|
|
22
19
|
MatCardModule,
|
|
23
20
|
MatGridListModule,
|
|
24
21
|
MatIconModule,
|
|
25
22
|
MatMenuModule,
|
|
26
|
-
]
|
|
27
|
-
})
|
|
28
|
-
}))
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
}));<% } %>
|
|
29
26
|
|
|
30
27
|
beforeEach(() => {
|
|
31
28
|
fixture = TestBed.createComponent(<%= classify(name) %>Component);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'
|
|
2
|
-
import { NoopAnimationsModule } from '@angular/platform-browser/animations';<% if(!standalone) { %>
|
|
1
|
+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';<% if(!standalone) { %>
|
|
3
2
|
import { MatButtonModule } from '@angular/material/button';
|
|
4
3
|
import { MatIconModule } from '@angular/material/icon';
|
|
5
4
|
import { MatListModule } from '@angular/material/list';
|
|
@@ -10,22 +9,20 @@ import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.compone
|
|
|
10
9
|
|
|
11
10
|
describe('<%= classify(name) %>Component', () => {
|
|
12
11
|
let component: <%= classify(name) %>Component;
|
|
13
|
-
let fixture: ComponentFixture<<%= classify(name) %>Component
|
|
12
|
+
let fixture: ComponentFixture<<%= classify(name) %>Component>;<% if(standalone) { %>
|
|
14
13
|
|
|
15
14
|
beforeEach(waitForAsync(() => {
|
|
16
|
-
TestBed.configureTestingModule({
|
|
17
|
-
imports: [NoopAnimationsModule]<% } else { %>
|
|
15
|
+
TestBed.configureTestingModule({
|
|
18
16
|
declarations: [<%= classify(name) %>Component],
|
|
19
17
|
imports: [
|
|
20
|
-
NoopAnimationsModule,
|
|
21
18
|
MatButtonModule,
|
|
22
19
|
MatIconModule,
|
|
23
20
|
MatListModule,
|
|
24
21
|
MatSidenavModule,
|
|
25
22
|
MatToolbarModule,
|
|
26
|
-
]
|
|
27
|
-
})
|
|
28
|
-
}))
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
}));<% } %>
|
|
29
26
|
|
|
30
27
|
beforeEach(() => {
|
|
31
28
|
fixture = TestBed.createComponent(<%= classify(name) %>Component);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'
|
|
2
|
-
import { NoopAnimationsModule } from '@angular/platform-browser/animations';<% if(!standalone) { %>
|
|
1
|
+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';<% if(!standalone) { %>
|
|
3
2
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
4
3
|
import { MatSortModule } from '@angular/material/sort';
|
|
5
4
|
import { MatTableModule } from '@angular/material/table';<% } %>
|
|
@@ -8,20 +7,18 @@ import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.compone
|
|
|
8
7
|
|
|
9
8
|
describe('<%= classify(name) %>Component', () => {
|
|
10
9
|
let component: <%= classify(name) %>Component;
|
|
11
|
-
let fixture: ComponentFixture<<%= classify(name) %>Component
|
|
10
|
+
let fixture: ComponentFixture<<%= classify(name) %>Component>;<% if(!standalone) { %>
|
|
12
11
|
|
|
13
12
|
beforeEach(waitForAsync(() => {
|
|
14
|
-
TestBed.configureTestingModule({
|
|
15
|
-
imports: [NoopAnimationsModule]<% } else { %>
|
|
13
|
+
TestBed.configureTestingModule({
|
|
16
14
|
declarations: [<%= classify(name) %>Component],
|
|
17
15
|
imports: [
|
|
18
|
-
NoopAnimationsModule,
|
|
19
16
|
MatPaginatorModule,
|
|
20
17
|
MatSortModule,
|
|
21
18
|
MatTableModule,
|
|
22
|
-
]
|
|
23
|
-
})
|
|
24
|
-
}))
|
|
19
|
+
]
|
|
20
|
+
});
|
|
21
|
+
}));<% } %>
|
|
25
22
|
|
|
26
23
|
beforeEach(() => {
|
|
27
24
|
fixture = TestBed.createComponent(<%= classify(name) %>Component);
|