Skip to content

Commit 59a7971

Browse files
committed
fixup! ngAcceptType
1 parent 1e0bdb6 commit 59a7971

File tree

129 files changed

+581
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+581
-172
lines changed

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@
4141
"requiredAngularVersion": "^9.0.0-0 || ^10.0.0-0",
4242
"requiredMDCVersion": "^4.0.0-canary.062ade5c0.0",
4343
"dependencies": {
44-
"@angular/animations": "^9.0.0-next.13",
45-
"@angular/common": "^9.0.0-next.13",
46-
"@angular/compiler": "^9.0.0-next.13",
47-
"@angular/core": "^9.0.0-next.13",
48-
"@angular/elements": "^9.0.0-next.13",
49-
"@angular/forms": "^9.0.0-next.13",
50-
"@angular/platform-browser": "^9.0.0-next.13",
44+
"@angular/animations": "^9.0.0-next.14",
45+
"@angular/common": "^9.0.0-next.14",
46+
"@angular/compiler": "^9.0.0-next.14",
47+
"@angular/core": "^9.0.0-next.14",
48+
"@angular/elements": "^9.0.0-next.14",
49+
"@angular/forms": "^9.0.0-next.14",
50+
"@angular/language-service": "^9.0.0-next.14",
51+
"@angular/platform-browser": "^9.0.0-next.14",
5152
"@types/googlemaps": "^3.37.0",
5253
"@types/youtube": "^0.0.38",
5354
"@webcomponents/custom-elements": "^1.1.0",
@@ -60,14 +61,14 @@
6061
"zone.js": "~0.10.2"
6162
},
6263
"devDependencies": {
63-
"@angular-devkit/core": "^9.0.0-next.15",
64-
"@angular-devkit/schematics": "^9.0.0-next.15",
65-
"@angular/bazel": "^9.0.0-next.13",
66-
"@angular/compiler-cli": "^9.0.0-next.13",
67-
"@angular/platform-browser-dynamic": "^9.0.0-next.13",
68-
"@angular/platform-server": "^9.0.0-next.13",
69-
"@angular/router": "^9.0.0-next.13",
70-
"@angular/upgrade": "^9.0.0-next.13",
64+
"@angular-devkit/core": "^9.0.0-next.12",
65+
"@angular-devkit/schematics": "^9.0.0-next.12",
66+
"@angular/bazel": "^9.0.0-next.14",
67+
"@angular/compiler-cli": "^9.0.0-next.14",
68+
"@angular/platform-browser-dynamic": "^9.0.0-next.14",
69+
"@angular/platform-server": "^9.0.0-next.14",
70+
"@angular/router": "^9.0.0-next.14",
71+
"@angular/upgrade": "^9.0.0-next.14",
7172
"@bazel/bazel": "^0.29.0",
7273
"@bazel/buildifier": "^0.29.0",
7374
"@bazel/ibazel": "^0.10.3",

src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,4 +463,7 @@ export class CdkAutoSizeVirtualScroll implements OnChanges {
463463
ngOnChanges() {
464464
this._scrollStrategy.updateBufferSize(this.minBufferPx, this.maxBufferPx);
465465
}
466+
467+
static ngAcceptInputType_minBufferPx: number | string;
468+
static ngAcceptInputType_maxBufferPx: number | string;
466469
}

src/cdk/a11y/focus-trap/focus-trap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ export class CdkTrapFocus implements OnDestroy, AfterContentInit, DoCheck {
418418
this.focusTrap.attachAnchors();
419419
}
420420
}
421-
422-
static ngAcceptInputType_autoCapture: boolean | string;
421+
423422
static ngAcceptInputType_enabled: boolean | string;
423+
static ngAcceptInputType_autoCapture: boolean | string;
424424
}

src/cdk/accordion/accordion-item.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,6 @@ export class CdkAccordionItem implements OnDestroy {
153153
});
154154
}
155155

156-
static ngAcceptInputType_disabled: boolean | string;
157156
static ngAcceptInputType_expanded: boolean | string;
157+
static ngAcceptInputType_disabled: boolean | string;
158158
}

src/cdk/accordion/accordion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ export class CdkAccordion implements OnDestroy, OnChanges {
5959
this._openCloseAllActions.next(expanded);
6060
}
6161
}
62-
62+
6363
static ngAcceptInputType_multi: boolean | string;
6464
}

src/cdk/drag-drop/directives/drag-handle.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ export class CdkDragHandle implements OnDestroy {
4646
ngOnDestroy() {
4747
this._stateChanges.complete();
4848
}
49+
50+
static ngAcceptInputType_disabled: boolean | string;
4951
}

src/cdk/drag-drop/directives/drag.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ export class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {
408408
});
409409
});
410410
}
411+
412+
static ngAcceptInputType_disabled: boolean | string;
411413
}
412414

413415
/** Gets the closest ancestor of an element that matches a selector. */

src/cdk/drag-drop/directives/drop-list-group.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ export class CdkDropListGroup<T> implements OnDestroy {
3434
ngOnDestroy() {
3535
this._items.clear();
3636
}
37+
38+
static ngAcceptInputType_disabled: boolean | string;
3739
}

src/cdk/drag-drop/directives/drop-list.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class CdkDropList<T = any> implements AfterContentInit, OnDestroy {
113113
* is allowed to be moved into a drop container.
114114
*/
115115
@Input('cdkDropListEnterPredicate')
116-
enterPredicate: (drag: CdkDrag, drop: CdkDropList) => boolean = () => true;
116+
enterPredicate: (drag: CdkDrag, drop: CdkDropList) => boolean = () => true
117117

118118
/** Whether to auto-scroll the view when the user moves their pointer close to the edges. */
119119
@Input('cdkDropListAutoScrollDisabled')
@@ -328,7 +328,7 @@ export class CdkDropList<T = any> implements AfterContentInit, OnDestroy {
328328
});
329329
}
330330

331-
static ngAcceptInputType_autoScrollDisabled: boolean | string;
332331
static ngAcceptInputType_disabled: boolean | string;
333332
static ngAcceptInputType_sortingDisabled: boolean | string;
333+
static ngAcceptInputType_autoScrollDisabled: boolean | string;
334334
}

src/cdk/observers/observe-content.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ export class CdkObserveContent implements AfterContentInit, OnDestroy {
193193
this._currentSubscription.unsubscribe();
194194
}
195195
}
196+
197+
static ngAcceptInputType_disabled: boolean | string;
198+
static ngAcceptInputType_debounce: boolean | string;
196199
}
197200

198201

src/cdk/overlay/overlay-directives.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -384,16 +384,11 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges {
384384
this._backdropSubscription.unsubscribe();
385385
}
386386

387-
static ngAcceptInputType_hasBackdrop: boolean | string | undefined;
388-
static ngAcceptInputType_lockPosition: boolean | string | undefined;
389-
static ngAcceptInputType_flexibleDimensions: boolean | string | undefined;
390-
static ngAcceptInputType_growAfterOpen: boolean | string | undefined;
391-
static ngAcceptInputType_push: boolean | string | undefined;
392-
static ngAcceptInputType_width: number | string | undefined;
393-
static ngAcceptInputType_height: number | string | undefined;
394-
static ngAcceptInputType_minWidth: number | string | undefined;
395-
static ngAcceptInputType_minHeight: number | string | undefined;
396-
static ngAcceptInputType_viewportMargin: number | string | undefined;
387+
static ngAcceptInputType_hasBackdrop: boolean | string;
388+
static ngAcceptInputType_lockPosition: boolean | string;
389+
static ngAcceptInputType_flexibleDimensions: boolean | string;
390+
static ngAcceptInputType_growAfterOpen: boolean | string;
391+
static ngAcceptInputType_push: boolean | string;
397392
}
398393

399394

src/cdk/stepper/stepper.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,10 @@ export class CdkStepper implements AfterViewInit, OnDestroy {
525525
return stepperElement === focusedElement || stepperElement.contains(focusedElement);
526526
}
527527

528+
static ngAcceptInputType_editable: boolean | string;
529+
static ngAcceptInputType_optional: boolean | string;
530+
static ngAcceptInputType_completed: boolean | string;
531+
static ngAcceptInputType_hasError: boolean | string;
528532
static ngAcceptInputType_linear: boolean | string;
529533
static ngAcceptInputType_selectedIndex: number | string;
530534
}

src/cdk/table/row.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ export class CdkHeaderRowDef extends _CdkHeaderRowDefBase implements CanStick, O
9999
ngOnChanges(changes: SimpleChanges): void {
100100
super.ngOnChanges(changes);
101101
}
102+
103+
static ngAcceptInputType_sticky: boolean | string;
102104
}
103105

104106
// Boilerplate for applying mixins to CdkFooterRowDef.
@@ -125,6 +127,8 @@ export class CdkFooterRowDef extends _CdkFooterRowDefBase implements CanStick, O
125127
ngOnChanges(changes: SimpleChanges): void {
126128
super.ngOnChanges(changes);
127129
}
130+
131+
static ngAcceptInputType_sticky: boolean | string;
128132
}
129133

130134
/**

src/cdk/table/table.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDes
10771077
this.updateStickyColumnStyles();
10781078
});
10791079
}
1080-
1080+
10811081
static ngAcceptInputType_multiTemplateDataRows: boolean | string;
10821082
}
10831083

src/cdk/text-field/autosize.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {coerceBooleanProperty} from '@angular/cdk/coercion';
9+
import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion';
1010
import {
1111
Directive,
1212
ElementRef,
@@ -56,15 +56,15 @@ export class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {
5656
@Input('cdkAutosizeMinRows')
5757
get minRows(): number { return this._minRows; }
5858
set minRows(value: number) {
59-
this._minRows = value;
59+
this._minRows = coerceNumberProperty(value);
6060
this._setMinHeight();
6161
}
6262

6363
/** Maximum amount of rows in the textarea. */
6464
@Input('cdkAutosizeMaxRows')
6565
get maxRows(): number { return this._maxRows; }
6666
set maxRows(value: number) {
67-
this._maxRows = value;
67+
this._maxRows = coerceNumberProperty(value);
6868
this._setMaxHeight();
6969
}
7070

@@ -273,7 +273,7 @@ export class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {
273273
}
274274
}
275275

276-
static ngAcceptInputType_enabled: boolean | string;
277276
static ngAcceptInputType_minRows: number | string;
278277
static ngAcceptInputType_maxRows: number | string;
278+
static ngAcceptInputType_enabled: boolean | string;
279279
}

src/dev-app/badge/badge-demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h3>Buttons</h3>
6565
</button>
6666

6767
<button mat-raised-button>
68-
<mat-icon color="primary" matBadge="22" color="accent">home</mat-icon>
68+
<mat-icon matBadge="22" color="accent">home</mat-icon>
6969
</button>
7070
</div>
7171

src/dev-app/checkbox/checkbox-demo.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1>mat-checkbox: Basic Example</h1>
3030
value="after"
3131
id="align-after"
3232
name="labelPosition"
33-
(click)="labelPosition = after.value"
33+
(click)="labelPosition = 'after'"
3434
checked>
3535
<label for="align-after">After</label>
3636
</div>
@@ -39,7 +39,7 @@ <h1>mat-checkbox: Basic Example</h1>
3939
value="before"
4040
id="align-before"
4141
name="labelPosition"
42-
(click)="labelPosition = before.value">
42+
(click)="labelPosition = 'before'">
4343
<label for="align-before">Before</label>
4444
</div>
4545
</div>

src/dev-app/example/example-list.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,6 @@ export class ExampleList {
6565
_expandAll: boolean;
6666

6767
exampleComponents = EXAMPLE_COMPONENTS;
68+
69+
static ngAcceptInputType_expandAll: boolean | string;
6870
}

src/dev-app/mdc-checkbox/mdc-checkbox-demo.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1>mat-checkbox: Basic Example</h1>
3030
value="after"
3131
id="align-after"
3232
name="labelPosition"
33-
(click)="labelPosition = after.value"
33+
(click)="labelPosition = 'after'"
3434
checked>
3535
<label for="align-after">After</label>
3636
</div>
@@ -39,7 +39,7 @@ <h1>mat-checkbox: Basic Example</h1>
3939
value="before"
4040
id="align-before"
4141
name="labelPosition"
42-
(click)="labelPosition = before.value">
42+
(click)="labelPosition = 'before'">
4343
<label for="align-before">Before</label>
4444
</div>
4545
</div>

src/dev-app/mdc-slider/mdc-slider-demo.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ <h1>Slider with Min and Max</h1>
1515
<input [(ngModel)]="max" type="number">
1616

1717
<h1>Disabled Slider</h1>
18-
<mat-slider disabled [(ngModel)]="disabledValue" [tickInterval]="1" aria-label="Disabled slider">
18+
<mat-slider [disabled]="true" [(ngModel)]="disabledValue" [tickInterval]="1"
19+
aria-label="Disabled slider">
1920
</mat-slider>
2021
<input [(ngModel)]="disabledValue" type="number">
2122

src/dev-app/toolbar/toolbar-demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
<button mat-button>Text</button>
4848
<button mat-flat-button>Flat</button>
49-
<button mat-mini-fab color="">
49+
<button mat-mini-fab>
5050
<mat-icon>done</mat-icon>
5151
</button>
5252
<button mat-mini-fab color="primary">

src/material-examples/material/form-field/form-field-custom-control/form-field-custom-control-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export class MyTelInput implements ControlValueAccessor, MatFormFieldControl<MyT
149149
_handleInput(): void {
150150
this.onChange(this.parts.value);
151151
}
152-
152+
153153
static ngAcceptInputType_disabled: boolean | string;
154154
static ngAcceptInputType_required: boolean | string;
155155
}

src/material-experimental/mdc-button/button.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ export class MatButton extends MatButtonBase {
5656
@Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {
5757
super(elementRef, platform, ngZone, animationMode);
5858
}
59+
60+
static ngAcceptInputType_disabled: boolean | string;
61+
static ngAcceptInputType_disableRipple: boolean | string;
5962
}
6063

6164
/**
@@ -85,4 +88,7 @@ export class MatAnchor extends MatAnchorBase {
8588
@Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {
8689
super(elementRef, platform, ngZone, animationMode);
8790
}
91+
92+
static ngAcceptInputType_disabled: boolean | string;
93+
static ngAcceptInputType_disableRipple: boolean | string;
8894
}

src/material-experimental/mdc-button/fab.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export class MatFabButton extends MatButtonBase {
5555
@Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {
5656
super(elementRef, platform, ngZone, animationMode);
5757
}
58+
59+
static ngAcceptInputType_disabled: boolean | string;
60+
static ngAcceptInputType_disableRipple: boolean | string;
5861
}
5962

6063

@@ -85,4 +88,7 @@ export class MatFabAnchor extends MatAnchor {
8588
@Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {
8689
super(elementRef, platform, ngZone, animationMode);
8790
}
91+
92+
static ngAcceptInputType_disabled: boolean | string;
93+
static ngAcceptInputType_disableRipple: boolean | string;
8894
}

src/material-experimental/mdc-button/icon-button.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export class MatIconButton extends MatButtonBase {
5252
@Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {
5353
super(elementRef, platform, ngZone, animationMode);
5454
}
55+
56+
static ngAcceptInputType_disabled: boolean | string;
57+
static ngAcceptInputType_disableRipple: boolean | string;
5558
}
5659

5760
/**
@@ -79,4 +82,7 @@ export class MatIconAnchor extends MatAnchorBase {
7982
@Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {
8083
super(elementRef, platform, ngZone, animationMode);
8184
}
85+
86+
static ngAcceptInputType_disabled: boolean | string;
87+
static ngAcceptInputType_disableRipple: boolean | string;
8288
}

src/material-experimental/mdc-checkbox/checkbox.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,4 +349,10 @@ export class MatCheckbox implements AfterViewInit, OnDestroy, ControlValueAccess
349349
this._classes[cssClass] = active;
350350
this._changeDetectorRef.markForCheck();
351351
}
352+
353+
static ngAcceptInputType_checked: boolean | string;
354+
static ngAcceptInputType_indeterminate: boolean | string;
355+
static ngAcceptInputType_disabled: boolean | string;
356+
static ngAcceptInputType_required: boolean | string;
357+
static ngAcceptInputType_disableRipple: boolean | string;
352358
}

src/material-experimental/mdc-chips/chip-grid.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,4 +520,7 @@ export class MatChipGrid extends _MatChipGridMixinBase implements AfterContentIn
520520

521521
return false;
522522
}
523+
524+
static ngAcceptInputType_disabled: boolean | string;
525+
static ngAcceptInputType_required: boolean | string;
523526
}

src/material-experimental/mdc-chips/chip-icons.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,6 @@ export class MatChipRemove extends _MatChipRemoveMixinBase implements CanDisable
120120
constructor(_elementRef: ElementRef) {
121121
super(_elementRef);
122122
}
123+
124+
static ngAcceptInputType_disabled: boolean | string;
123125
}

src/material-experimental/mdc-chips/chip-input.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,7 @@ export class MatChipInput implements MatChipTextControl, OnChanges {
170170
const keyCode = event.keyCode;
171171
return Array.isArray(separators) ? separators.indexOf(keyCode) > -1 : separators.has(keyCode);
172172
}
173+
174+
static ngAcceptInputType_addOnBlur: boolean | string;
175+
static ngAcceptInputType_disabled: boolean | string;
173176
}

0 commit comments

Comments
 (0)