diff --git a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts index bba42deb3f7b..ac45aac9b9ff 100644 --- a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts +++ b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceNumberProperty} from '@angular/cdk/coercion'; +import {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion'; import {ListRange} from '@angular/cdk/collections'; import { CdkVirtualScrollViewport, @@ -464,6 +464,6 @@ export class CdkAutoSizeVirtualScroll implements OnChanges { this._scrollStrategy.updateBufferSize(this.minBufferPx, this.maxBufferPx); } - static ngAcceptInputType_minBufferPx: number | string | null | undefined; - static ngAcceptInputType_maxBufferPx: number | string | null | undefined; + static ngAcceptInputType_minBufferPx: NumberInput; + static ngAcceptInputType_maxBufferPx: NumberInput; } diff --git a/src/cdk/a11y/focus-trap/focus-trap.ts b/src/cdk/a11y/focus-trap/focus-trap.ts index f950652a9530..3ff81bad43fe 100644 --- a/src/cdk/a11y/focus-trap/focus-trap.ts +++ b/src/cdk/a11y/focus-trap/focus-trap.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {DOCUMENT} from '@angular/common'; import { AfterContentInit, @@ -419,6 +419,6 @@ export class CdkTrapFocus implements OnDestroy, AfterContentInit, DoCheck { } } - static ngAcceptInputType_enabled: boolean | string | null | undefined; - static ngAcceptInputType_autoCapture: boolean | string | null | undefined; + static ngAcceptInputType_enabled: BooleanInput; + static ngAcceptInputType_autoCapture: BooleanInput; } diff --git a/src/cdk/accordion/accordion-item.ts b/src/cdk/accordion/accordion-item.ts index 1a53a0f6d9a4..51a9fae8196b 100644 --- a/src/cdk/accordion/accordion-item.ts +++ b/src/cdk/accordion/accordion-item.ts @@ -18,7 +18,7 @@ import { } from '@angular/core'; import {UniqueSelectionDispatcher} from '@angular/cdk/collections'; import {CdkAccordion} from './accordion'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {Subscription} from 'rxjs'; /** Used to generate unique ID for each accordion item. */ @@ -153,6 +153,6 @@ export class CdkAccordionItem implements OnDestroy { }); } - static ngAcceptInputType_expanded: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_expanded: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/cdk/accordion/accordion.ts b/src/cdk/accordion/accordion.ts index fa9bf15673f0..3ee844c65c66 100644 --- a/src/cdk/accordion/accordion.ts +++ b/src/cdk/accordion/accordion.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {Directive, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core'; import {Subject} from 'rxjs'; @@ -60,5 +60,5 @@ export class CdkAccordion implements OnDestroy, OnChanges { } } - static ngAcceptInputType_multi: boolean | string | null | undefined; + static ngAcceptInputType_multi: BooleanInput; } diff --git a/src/cdk/coercion/boolean-property.ts b/src/cdk/coercion/boolean-property.ts index ca95f2a81f8a..35ee0a7e4791 100644 --- a/src/cdk/coercion/boolean-property.ts +++ b/src/cdk/coercion/boolean-property.ts @@ -6,6 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ +/** + * Type describing the allowed values for a boolean input. + * @docs-private + */ +export type BooleanInput = string | boolean | null | undefined; + /** Coerces a data-bound value (typically a string) to a boolean. */ export function coerceBooleanProperty(value: any): boolean { return value != null && `${value}` !== 'false'; diff --git a/src/cdk/coercion/number-property.ts b/src/cdk/coercion/number-property.ts index ecfc17d781fd..2452ab2f15a8 100644 --- a/src/cdk/coercion/number-property.ts +++ b/src/cdk/coercion/number-property.ts @@ -6,6 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ +/** + * Type describing the allowed values for a number input + * @docs-private + */ +export type NumberInput = string | number | null | undefined; + /** Coerces a data-bound value (typically a string) to a number. */ export function coerceNumberProperty(value: any): number; export function coerceNumberProperty(value: any, fallback: D): number | D; diff --git a/src/cdk/drag-drop/directives/drag-handle.ts b/src/cdk/drag-drop/directives/drag-handle.ts index 89ec70ec13d3..fcc644f5dee7 100644 --- a/src/cdk/drag-drop/directives/drag-handle.ts +++ b/src/cdk/drag-drop/directives/drag-handle.ts @@ -7,7 +7,7 @@ */ import {Directive, ElementRef, Inject, Optional, Input, OnDestroy} from '@angular/core'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {Subject} from 'rxjs'; import {CDK_DRAG_PARENT} from '../drag-parent'; import {toggleNativeDragInteractions} from '../drag-styling'; @@ -47,5 +47,5 @@ export class CdkDragHandle implements OnDestroy { this._stateChanges.complete(); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/cdk/drag-drop/directives/drag.ts b/src/cdk/drag-drop/directives/drag.ts index b5e9adf6ee29..05ed967b8682 100644 --- a/src/cdk/drag-drop/directives/drag.ts +++ b/src/cdk/drag-drop/directives/drag.ts @@ -30,7 +30,12 @@ import { ChangeDetectorRef, isDevMode, } from '@angular/core'; -import {coerceBooleanProperty, coerceNumberProperty, coerceElement} from '@angular/cdk/coercion'; +import { + coerceBooleanProperty, + coerceNumberProperty, + coerceElement, + BooleanInput +} from '@angular/cdk/coercion'; import {Observable, Observer, Subject, merge} from 'rxjs'; import {startWith, take, map, takeUntil, switchMap, tap} from 'rxjs/operators'; import { @@ -409,7 +414,7 @@ export class CdkDrag implements AfterViewInit, OnChanges, OnDestroy { }); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } /** Gets the closest ancestor of an element that matches a selector. */ diff --git a/src/cdk/drag-drop/directives/drop-list-group.ts b/src/cdk/drag-drop/directives/drop-list-group.ts index 8043fe7adc70..3915ff2710a4 100644 --- a/src/cdk/drag-drop/directives/drop-list-group.ts +++ b/src/cdk/drag-drop/directives/drop-list-group.ts @@ -7,7 +7,7 @@ */ import {Directive, OnDestroy, Input} from '@angular/core'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; /** * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList` @@ -35,5 +35,5 @@ export class CdkDropListGroup implements OnDestroy { this._items.clear(); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/cdk/drag-drop/directives/drop-list.ts b/src/cdk/drag-drop/directives/drop-list.ts index 6f72f1871441..ecde4757033c 100644 --- a/src/cdk/drag-drop/directives/drop-list.ts +++ b/src/cdk/drag-drop/directives/drop-list.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceArray, coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceArray, coerceBooleanProperty} from '@angular/cdk/coercion'; import { ContentChildren, ElementRef, @@ -332,7 +332,7 @@ export class CdkDropList implements AfterContentInit, OnDestroy { }); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_sortingDisabled: boolean | string | null | undefined; - static ngAcceptInputType_autoScrollDisabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_sortingDisabled: BooleanInput; + static ngAcceptInputType_autoScrollDisabled: BooleanInput; } diff --git a/src/cdk/observers/observe-content.ts b/src/cdk/observers/observe-content.ts index f2ce1b1418f3..4912c799963f 100644 --- a/src/cdk/observers/observe-content.ts +++ b/src/cdk/observers/observe-content.ts @@ -6,7 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty, coerceNumberProperty, coerceElement} from '@angular/cdk/coercion'; +import { + coerceBooleanProperty, + coerceNumberProperty, + coerceElement, + BooleanInput +} from '@angular/cdk/coercion'; import { AfterContentInit, Directive, @@ -194,8 +199,8 @@ export class CdkObserveContent implements AfterContentInit, OnDestroy { } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_debounce: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_debounce: BooleanInput; } diff --git a/src/cdk/overlay/overlay-directives.ts b/src/cdk/overlay/overlay-directives.ts index c4d4b35ef3ee..ca5262aa7ed9 100644 --- a/src/cdk/overlay/overlay-directives.ts +++ b/src/cdk/overlay/overlay-directives.ts @@ -7,7 +7,7 @@ */ import {Direction, Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes'; import {TemplatePortal} from '@angular/cdk/portal'; import { @@ -395,11 +395,11 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges { this._backdropSubscription.unsubscribe(); } - static ngAcceptInputType_hasBackdrop: boolean | string | null | undefined; - static ngAcceptInputType_lockPosition: boolean | string | null | undefined; - static ngAcceptInputType_flexibleDimensions: boolean | string | null | undefined; - static ngAcceptInputType_growAfterOpen: boolean | string | null | undefined; - static ngAcceptInputType_push: boolean | string | null | undefined; + static ngAcceptInputType_hasBackdrop: BooleanInput; + static ngAcceptInputType_lockPosition: BooleanInput; + static ngAcceptInputType_flexibleDimensions: BooleanInput; + static ngAcceptInputType_growAfterOpen: BooleanInput; + static ngAcceptInputType_push: BooleanInput; } diff --git a/src/cdk/scrolling/fixed-size-virtual-scroll.ts b/src/cdk/scrolling/fixed-size-virtual-scroll.ts index 89db9fcb050a..4e7e8811a4be 100644 --- a/src/cdk/scrolling/fixed-size-virtual-scroll.ts +++ b/src/cdk/scrolling/fixed-size-virtual-scroll.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceNumberProperty} from '@angular/cdk/coercion'; +import {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion'; import {Directive, forwardRef, Input, OnChanges} from '@angular/core'; import {Observable, Subject} from 'rxjs'; import {distinctUntilChanged} from 'rxjs/operators'; @@ -204,7 +204,7 @@ export class CdkFixedSizeVirtualScroll implements OnChanges { this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx); } - static ngAcceptInputType_itemSize: string | number | null | undefined; - static ngAcceptInputType_minBufferPx: string | number | null | undefined; - static ngAcceptInputType_maxBufferPx: string | number | null | undefined; + static ngAcceptInputType_itemSize: NumberInput; + static ngAcceptInputType_minBufferPx: NumberInput; + static ngAcceptInputType_maxBufferPx: NumberInput; } diff --git a/src/cdk/stepper/stepper.ts b/src/cdk/stepper/stepper.ts index b70601596131..75fd517881b8 100644 --- a/src/cdk/stepper/stepper.ts +++ b/src/cdk/stepper/stepper.ts @@ -8,7 +8,12 @@ import {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y'; import {Direction, Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; +import { + BooleanInput, + coerceBooleanProperty, + coerceNumberProperty, + NumberInput +} from '@angular/cdk/coercion'; import {END, ENTER, hasModifierKey, HOME, SPACE} from '@angular/cdk/keycodes'; import {DOCUMENT} from '@angular/common'; import { @@ -231,10 +236,10 @@ export class CdkStep implements OnChanges { this._stepper._stateChanged(); } - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_completed: boolean | string | null | undefined; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_completed: BooleanInput; } @Directive({ @@ -518,12 +523,12 @@ export class CdkStepper implements AfterViewInit, OnDestroy { return stepperElement === focusedElement || stepperElement.contains(focusedElement); } - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_linear: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_linear: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; } diff --git a/src/cdk/table/cell.ts b/src/cdk/table/cell.ts index aa884a792775..55bd798cccfc 100644 --- a/src/cdk/table/cell.ts +++ b/src/cdk/table/cell.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {ContentChild, Directive, ElementRef, Input, TemplateRef} from '@angular/core'; import {CanStick, CanStickCtor, mixinHasStickyInput} from './can-stick'; @@ -108,8 +108,8 @@ export class CdkColumnDef extends _CdkColumnDefBase implements CanStick { */ cssClassFriendlyName: string; - static ngAcceptInputType_sticky: boolean | string | null | undefined; - static ngAcceptInputType_stickyEnd: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; + static ngAcceptInputType_stickyEnd: BooleanInput; } /** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */ diff --git a/src/cdk/table/row.ts b/src/cdk/table/row.ts index 5b419eeb2925..aaab0b864dde 100644 --- a/src/cdk/table/row.ts +++ b/src/cdk/table/row.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import { ChangeDetectionStrategy, Component, @@ -100,7 +101,7 @@ export class CdkHeaderRowDef extends _CdkHeaderRowDefBase implements CanStick, O super.ngOnChanges(changes); } - static ngAcceptInputType_sticky: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; } // Boilerplate for applying mixins to CdkFooterRowDef. @@ -128,7 +129,7 @@ export class CdkFooterRowDef extends _CdkFooterRowDefBase implements CanStick, O super.ngOnChanges(changes); } - static ngAcceptInputType_sticky: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; } /** diff --git a/src/cdk/table/table.ts b/src/cdk/table/table.ts index f07be96c1464..0be54297e67f 100644 --- a/src/cdk/table/table.ts +++ b/src/cdk/table/table.ts @@ -7,7 +7,7 @@ */ import {Direction, Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {CollectionViewer, DataSource, isDataSource} from '@angular/cdk/collections'; import {Platform} from '@angular/cdk/platform'; import {DOCUMENT} from '@angular/common'; @@ -1077,7 +1077,7 @@ export class CdkTable implements AfterContentChecked, CollectionViewer, OnDes }); } - static ngAcceptInputType_multiTemplateDataRows: boolean | string | null | undefined; + static ngAcceptInputType_multiTemplateDataRows: BooleanInput; } /** Utility function that gets a merged list of the entries in a QueryList and values of a Set. */ diff --git a/src/cdk/text-field/autosize.ts b/src/cdk/text-field/autosize.ts index 9a89d7d98d92..3d8851b103ca 100644 --- a/src/cdk/text-field/autosize.ts +++ b/src/cdk/text-field/autosize.ts @@ -6,7 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; +import { + BooleanInput, + coerceBooleanProperty, + coerceNumberProperty, + NumberInput +} from '@angular/cdk/coercion'; import { Directive, ElementRef, @@ -281,7 +286,7 @@ export class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy { } } - static ngAcceptInputType_minRows: number | string | null | undefined; - static ngAcceptInputType_maxRows: number | string | null | undefined; - static ngAcceptInputType_enabled: boolean | string | null | undefined; + static ngAcceptInputType_minRows: NumberInput; + static ngAcceptInputType_maxRows: NumberInput; + static ngAcceptInputType_enabled: BooleanInput; } diff --git a/src/cdk/tree/padding.ts b/src/cdk/tree/padding.ts index 59c3236f987f..c54f7db2dc80 100644 --- a/src/cdk/tree/padding.ts +++ b/src/cdk/tree/padding.ts @@ -7,7 +7,7 @@ */ import {Directionality} from '@angular/cdk/bidi'; -import {coerceNumberProperty} from '@angular/cdk/coercion'; +import {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion'; import {Directive, ElementRef, Input, OnDestroy, Optional, Renderer2} from '@angular/core'; import {takeUntil} from 'rxjs/operators'; import {Subject} from 'rxjs'; @@ -110,5 +110,5 @@ export class CdkTreeNodePadding implements OnDestroy { } } - static ngAcceptInputType_level: number | string | null | undefined; + static ngAcceptInputType_level: NumberInput; } diff --git a/src/cdk/tree/toggle.ts b/src/cdk/tree/toggle.ts index eae713f280f7..625b9258439d 100644 --- a/src/cdk/tree/toggle.ts +++ b/src/cdk/tree/toggle.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {Directive, HostListener, Input} from '@angular/core'; import {CdkTree, CdkTreeNode} from './tree'; @@ -39,5 +39,5 @@ export class CdkTreeNodeToggle { event.stopPropagation(); } - static ngAcceptInputType_recursive: boolean | string | null | undefined; + static ngAcceptInputType_recursive: BooleanInput; } diff --git a/src/dev-app/example/example-list.ts b/src/dev-app/example/example-list.ts index 85843c632490..c6c4e0e0a8fb 100644 --- a/src/dev-app/example/example-list.ts +++ b/src/dev-app/example/example-list.ts @@ -8,7 +8,7 @@ import {Component, Input} from '@angular/core'; import {EXAMPLE_COMPONENTS} from '@angular/components-examples'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; /** Displays a set of components-examples in a mat-accordion. */ @Component({ @@ -66,5 +66,5 @@ export class ExampleList { exampleComponents = EXAMPLE_COMPONENTS; - static ngAcceptInputType_expandAll: boolean | string | null | undefined; + static ngAcceptInputType_expandAll: BooleanInput; } diff --git a/src/dev-app/example/example.ts b/src/dev-app/example/example.ts index 869d09c6c314..dd4b5916bed6 100644 --- a/src/dev-app/example/example.ts +++ b/src/dev-app/example/example.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {Component, ElementRef, Injector, Input, OnInit} from '@angular/core'; import {EXAMPLE_COMPONENTS} from '@angular/components-examples'; import {createCustomElement} from '@angular/elements'; @@ -72,5 +72,5 @@ export class Example implements OnInit { this.title = EXAMPLE_COMPONENTS[this.id] ? EXAMPLE_COMPONENTS[this.id].title : ''; } - static ngAcceptInputType_showLabel: boolean | string | null | undefined; + static ngAcceptInputType_showLabel: BooleanInput; } diff --git a/src/material-experimental/mdc-button/button.ts b/src/material-experimental/mdc-button/button.ts index 3a6c34a10269..6dfabc6a3581 100644 --- a/src/material-experimental/mdc-button/button.ts +++ b/src/material-experimental/mdc-button/button.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {Platform} from '@angular/cdk/platform'; import { ChangeDetectionStrategy, @@ -56,8 +57,8 @@ export class MatButton extends MatButtonBase { super(elementRef, platform, ngZone, animationMode); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } /** @@ -87,6 +88,6 @@ export class MatAnchor extends MatAnchorBase { super(elementRef, platform, ngZone, animationMode); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-button/fab.ts b/src/material-experimental/mdc-button/fab.ts index 8d721c991245..c4be202b301b 100644 --- a/src/material-experimental/mdc-button/fab.ts +++ b/src/material-experimental/mdc-button/fab.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {Platform} from '@angular/cdk/platform'; import { ChangeDetectionStrategy, @@ -55,8 +56,8 @@ export class MatFabButton extends MatButtonBase { super(elementRef, platform, ngZone, animationMode); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } @@ -87,6 +88,6 @@ export class MatFabAnchor extends MatAnchor { super(elementRef, platform, ngZone, animationMode); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-button/icon-button.ts b/src/material-experimental/mdc-button/icon-button.ts index eacf8cf1efea..07784d922825 100644 --- a/src/material-experimental/mdc-button/icon-button.ts +++ b/src/material-experimental/mdc-button/icon-button.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {Platform} from '@angular/cdk/platform'; import { ChangeDetectionStrategy, @@ -52,8 +53,8 @@ export class MatIconButton extends MatButtonBase { super(elementRef, platform, ngZone, animationMode); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } /** @@ -81,6 +82,6 @@ export class MatIconAnchor extends MatAnchorBase { super(elementRef, platform, ngZone, animationMode); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-checkbox/checkbox.ts b/src/material-experimental/mdc-checkbox/checkbox.ts index bb54f7fe3349..05543852b90d 100644 --- a/src/material-experimental/mdc-checkbox/checkbox.ts +++ b/src/material-experimental/mdc-checkbox/checkbox.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {Platform} from '@angular/cdk/platform'; import { AfterViewInit, @@ -387,9 +387,9 @@ export class MatCheckbox implements AfterViewInit, OnDestroy, ControlValueAccess } } - static ngAcceptInputType_checked: boolean | string | null | undefined; - static ngAcceptInputType_indeterminate: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_checked: BooleanInput; + static ngAcceptInputType_indeterminate: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-chips/chip-grid.ts b/src/material-experimental/mdc-chips/chip-grid.ts index 28685d077bf9..d7e90efa33d8 100644 --- a/src/material-experimental/mdc-chips/chip-grid.ts +++ b/src/material-experimental/mdc-chips/chip-grid.ts @@ -7,7 +7,7 @@ */ import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {BACKSPACE, TAB} from '@angular/cdk/keycodes'; import { AfterContentInit, @@ -520,6 +520,6 @@ export class MatChipGrid extends _MatChipGridMixinBase implements AfterContentIn return false; } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_required: BooleanInput; } diff --git a/src/material-experimental/mdc-chips/chip-icons.ts b/src/material-experimental/mdc-chips/chip-icons.ts index 737649fac4b9..01c2b3bb20ab 100644 --- a/src/material-experimental/mdc-chips/chip-icons.ts +++ b/src/material-experimental/mdc-chips/chip-icons.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import { ChangeDetectorRef, Directive, @@ -121,5 +122,5 @@ export class MatChipRemove extends _MatChipRemoveMixinBase implements CanDisable super(_elementRef); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material-experimental/mdc-chips/chip-input.ts b/src/material-experimental/mdc-chips/chip-input.ts index 8e42a932c5c7..53a3f6e161f2 100644 --- a/src/material-experimental/mdc-chips/chip-input.ts +++ b/src/material-experimental/mdc-chips/chip-input.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {Directive, ElementRef, EventEmitter, Inject, Input, OnChanges, Output} from '@angular/core'; import {hasModifierKey, TAB} from '@angular/cdk/keycodes'; import {MAT_CHIPS_DEFAULT_OPTIONS, MatChipsDefaultOptions} from './chip-default-options'; @@ -171,6 +171,6 @@ export class MatChipInput implements MatChipTextControl, OnChanges { return Array.isArray(separators) ? separators.indexOf(keyCode) > -1 : separators.has(keyCode); } - static ngAcceptInputType_addOnBlur: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_addOnBlur: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material-experimental/mdc-chips/chip-listbox.ts b/src/material-experimental/mdc-chips/chip-listbox.ts index 9af61653b6e2..c73f940df335 100644 --- a/src/material-experimental/mdc-chips/chip-listbox.ts +++ b/src/material-experimental/mdc-chips/chip-listbox.ts @@ -8,7 +8,7 @@ import {FocusKeyManager} from '@angular/cdk/a11y'; import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {END, HOME} from '@angular/cdk/keycodes'; import { AfterContentInit, @@ -554,9 +554,9 @@ export class MatChipListbox extends MatChipSet implements AfterContentInit, Cont this._lastDestroyedChipIndex = null; } - static ngAcceptInputType_multiple: boolean | string | null | undefined; - static ngAcceptInputType_selectable: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_multiple: BooleanInput; + static ngAcceptInputType_selectable: BooleanInput; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material-experimental/mdc-chips/chip-option.ts b/src/material-experimental/mdc-chips/chip-option.ts index 126766510954..8dc011468e8d 100644 --- a/src/material-experimental/mdc-chips/chip-option.ts +++ b/src/material-experimental/mdc-chips/chip-option.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {SPACE} from '@angular/cdk/keycodes'; import { ChangeDetectionStrategy, @@ -225,10 +225,10 @@ export class MatChipOption extends MatChip { } } - static ngAcceptInputType_selectable: boolean | string | null | undefined; - static ngAcceptInputType_selected: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_removable: boolean | string | null | undefined; - static ngAcceptInputType_highlighted: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_selectable: BooleanInput; + static ngAcceptInputType_selected: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_removable: BooleanInput; + static ngAcceptInputType_highlighted: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-chips/chip-row.ts b/src/material-experimental/mdc-chips/chip-row.ts index 83f5e94109fb..5ae2818247a6 100644 --- a/src/material-experimental/mdc-chips/chip-row.ts +++ b/src/material-experimental/mdc-chips/chip-row.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {BACKSPACE, DELETE} from '@angular/cdk/keycodes'; import { AfterContentInit, @@ -149,8 +150,8 @@ export class MatChipRow extends MatChip implements AfterContentInit, AfterViewIn } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_removable: boolean | string | null | undefined; - static ngAcceptInputType_highlighted: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_removable: BooleanInput; + static ngAcceptInputType_highlighted: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-chips/chip-set.ts b/src/material-experimental/mdc-chips/chip-set.ts index 32f3fdfb83e8..c25152c27d9d 100644 --- a/src/material-experimental/mdc-chips/chip-set.ts +++ b/src/material-experimental/mdc-chips/chip-set.ts @@ -7,7 +7,7 @@ */ import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { AfterContentInit, AfterViewInit, @@ -304,6 +304,6 @@ export class MatChipSet extends _MatChipSetMixinBase implements AfterContentInit return false; } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material-experimental/mdc-chips/chip.ts b/src/material-experimental/mdc-chips/chip.ts index 54a309041389..07fb72b6db80 100644 --- a/src/material-experimental/mdc-chips/chip.ts +++ b/src/material-experimental/mdc-chips/chip.ts @@ -7,7 +7,7 @@ */ import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {Platform} from '@angular/cdk/platform'; import {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations'; import { @@ -398,8 +398,8 @@ export class MatChip extends _MatChipMixinBase implements AfterContentInit, Afte } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_removable: boolean | string | null | undefined; - static ngAcceptInputType_highlighted: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_removable: BooleanInput; + static ngAcceptInputType_highlighted: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-menu/menu-item.ts b/src/material-experimental/mdc-menu/menu-item.ts index 2e000262a459..a1be38303e13 100644 --- a/src/material-experimental/mdc-menu/menu-item.ts +++ b/src/material-experimental/mdc-menu/menu-item.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {Component, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core'; import {MatMenuItem as BaseMatMenuItem} from '@angular/material/menu'; @@ -37,6 +38,6 @@ import {MatMenuItem as BaseMatMenuItem} from '@angular/material/menu'; ] }) export class MatMenuItem extends BaseMatMenuItem { - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-menu/menu.ts b/src/material-experimental/mdc-menu/menu.ts index 06ae0db485d9..79922c3b0e30 100644 --- a/src/material-experimental/mdc-menu/menu.ts +++ b/src/material-experimental/mdc-menu/menu.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {Overlay, ScrollStrategy} from '@angular/cdk/overlay'; import { ChangeDetectionStrategy, @@ -71,6 +72,6 @@ export class MatMenu extends BaseMatMenu { // - should not increase the elevation if the user specified a custom one } - static ngAcceptInputType_overlapTrigger: boolean | string | null | undefined; - static ngAcceptInputType_hasBackdrop: boolean | string | null | undefined; + static ngAcceptInputType_overlapTrigger: BooleanInput; + static ngAcceptInputType_hasBackdrop: BooleanInput; } diff --git a/src/material-experimental/mdc-radio/radio.ts b/src/material-experimental/mdc-radio/radio.ts index dff845e2ef16..3595772ca856 100644 --- a/src/material-experimental/mdc-radio/radio.ts +++ b/src/material-experimental/mdc-radio/radio.ts @@ -15,7 +15,7 @@ import { AfterViewInit, ChangeDetectorRef, } from '@angular/core'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {MDCRadioAdapter, MDCRadioFoundation} from '@material/radio'; // Increasing integer for generating unique ids for radio components. @@ -80,5 +80,5 @@ export class MatRadioButton implements AfterViewInit, OnDestroy { this._changeDetectorRef.markForCheck(); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material-experimental/mdc-slide-toggle/slide-toggle.ts b/src/material-experimental/mdc-slide-toggle/slide-toggle.ts index 3014351cec6b..553615eb759d 100644 --- a/src/material-experimental/mdc-slide-toggle/slide-toggle.ts +++ b/src/material-experimental/mdc-slide-toggle/slide-toggle.ts @@ -25,7 +25,12 @@ import { } from '@angular/core'; import {MDCSwitchAdapter, MDCSwitchFoundation} from '@material/switch'; import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms'; -import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; +import { + BooleanInput, + coerceBooleanProperty, + coerceNumberProperty, + NumberInput +} from '@angular/cdk/coercion'; import {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations'; import {ThemePalette, RippleAnimationConfig} from '@angular/material/core'; import {numbers} from '@material/ripple'; @@ -312,9 +317,9 @@ export class MatSlideToggle implements ControlValueAccessor, AfterViewInit, OnDe this._changeDetectorRef.markForCheck(); } - static ngAcceptInputType_tabIndex: number | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_checked: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_tabIndex: NumberInput; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_checked: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material-experimental/mdc-slider/slider.ts b/src/material-experimental/mdc-slider/slider.ts index 9391a72a7bd8..a5b5f2126dcf 100644 --- a/src/material-experimental/mdc-slider/slider.ts +++ b/src/material-experimental/mdc-slider/slider.ts @@ -7,7 +7,12 @@ */ import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; +import { + BooleanInput, + coerceBooleanProperty, + coerceNumberProperty, + NumberInput +} from '@angular/cdk/coercion'; import {normalizePassiveListenerOptions, Platform} from '@angular/cdk/platform'; import { AfterViewInit, @@ -542,11 +547,11 @@ export class MatSlider implements AfterViewInit, OnChanges, OnDestroy, ControlVa this._syncValue(); } - static ngAcceptInputType_min: number | string | null | undefined; - static ngAcceptInputType_max: number | string | null | undefined; - static ngAcceptInputType_value: number | string | null | undefined; - static ngAcceptInputType_step: number | string | null | undefined; - static ngAcceptInputType_tickInterval: number | string | null | undefined; - static ngAcceptInputType_thumbLabel: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_min: NumberInput; + static ngAcceptInputType_max: NumberInput; + static ngAcceptInputType_value: NumberInput; + static ngAcceptInputType_step: NumberInput; + static ngAcceptInputType_tickInterval: NumberInput; + static ngAcceptInputType_thumbLabel: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material-experimental/mdc-tabs/tab-group.ts b/src/material-experimental/mdc-tabs/tab-group.ts index 3a61ac5877da..c4130f04e7b5 100644 --- a/src/material-experimental/mdc-tabs/tab-group.ts +++ b/src/material-experimental/mdc-tabs/tab-group.ts @@ -28,7 +28,7 @@ import { import {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations'; import {MatTab} from './tab'; import {MatTabHeader} from './tab-header'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion'; /** * Material design tab-group component. Supports basic tab pairs (label + content) and includes @@ -76,9 +76,9 @@ export class MatTabGroup extends _MatTabGroupBase { defaultConfig.fitInkBarToContent : false; } - static ngAcceptInputType_fitInkBarToContent: boolean | string | null | undefined; - static ngAcceptInputType_dynamicHeight: boolean | string | null | undefined; - static ngAcceptInputType_animationDuration: number | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_fitInkBarToContent: BooleanInput; + static ngAcceptInputType_dynamicHeight: BooleanInput; + static ngAcceptInputType_animationDuration: NumberInput; + static ngAcceptInputType_selectedIndex: NumberInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-tabs/tab-header.ts b/src/material-experimental/mdc-tabs/tab-header.ts index b84d68d614e4..063386b66db7 100644 --- a/src/material-experimental/mdc-tabs/tab-header.ts +++ b/src/material-experimental/mdc-tabs/tab-header.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput, NumberInput} from '@angular/cdk/coercion'; import { ChangeDetectionStrategy, Component, @@ -73,6 +74,6 @@ export class MatTabHeader extends _MatTabHeaderBase implements AfterContentInit super.ngAfterContentInit(); } - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; } diff --git a/src/material-experimental/mdc-tabs/tab-label-wrapper.ts b/src/material-experimental/mdc-tabs/tab-label-wrapper.ts index b637fe4680a4..a63944b5a820 100644 --- a/src/material-experimental/mdc-tabs/tab-label-wrapper.ts +++ b/src/material-experimental/mdc-tabs/tab-label-wrapper.ts @@ -10,7 +10,7 @@ import {Directive, ElementRef, Inject, Input, OnDestroy, OnInit} from '@angular/ import {DOCUMENT} from '@angular/common'; import {MatTabLabelWrapper as BaseMatTabLabelWrapper} from '@angular/material/tabs'; import {MatInkBarFoundation, MatInkBarItem} from './ink-bar'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; /** * Used in the `mat-tab-group` view to display tab labels. @@ -54,6 +54,6 @@ export class MatTabLabelWrapper extends BaseMatTabLabelWrapper this.elementRef.nativeElement.focus(); } - static ngAcceptInputType_fitInkBarToContent: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_fitInkBarToContent: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material-experimental/mdc-tabs/tab-nav-bar/tab-nav-bar.ts b/src/material-experimental/mdc-tabs/tab-nav-bar/tab-nav-bar.ts index 6ae519a70722..2b253c4a179b 100644 --- a/src/material-experimental/mdc-tabs/tab-nav-bar/tab-nav-bar.ts +++ b/src/material-experimental/mdc-tabs/tab-nav-bar/tab-nav-bar.ts @@ -36,7 +36,7 @@ import {Directionality} from '@angular/cdk/bidi'; import {ViewportRuler} from '@angular/cdk/scrolling'; import {Platform} from '@angular/cdk/platform'; import {MatInkBar, MatInkBarItem, MatInkBarFoundation} from '../ink-bar'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion'; import {BehaviorSubject, Subject} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; @@ -102,9 +102,9 @@ export class MatTabNav extends _MatTabNavBase implements AfterContentInit { super.ngAfterContentInit(); } - static ngAcceptInputType_fitInkBarToContent: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_fitInkBarToContent: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; } /** @@ -157,6 +157,6 @@ export class MatTabLink extends _MatTabLinkBase implements MatInkBarItem, OnInit this._foundation.destroy(); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material-experimental/mdc-tabs/tab.ts b/src/material-experimental/mdc-tabs/tab.ts index 756e8166d2fe..be20bfa5dcd9 100644 --- a/src/material-experimental/mdc-tabs/tab.ts +++ b/src/material-experimental/mdc-tabs/tab.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import { ChangeDetectionStrategy, Component, @@ -39,5 +40,5 @@ export class MatTab extends BaseMatTab { /** Content for the tab label given by ``. */ @ContentChild(MatTabLabel) templateLabel: MatTabLabel; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/autocomplete/autocomplete-trigger.ts b/src/material/autocomplete/autocomplete-trigger.ts index 0b9d667f00c4..5818092a79ed 100644 --- a/src/material/autocomplete/autocomplete-trigger.ts +++ b/src/material/autocomplete/autocomplete-trigger.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {DOWN_ARROW, ENTER, ESCAPE, TAB, UP_ARROW} from '@angular/cdk/keycodes'; import { FlexibleConnectedPositionStrategy, @@ -759,5 +759,5 @@ export class MatAutocompleteTrigger implements ControlValueAccessor, AfterViewIn return !element.readOnly && !element.disabled && !this._autocompleteDisabled; } - static ngAcceptInputType_autocompleteDisabled: boolean | string | null | undefined; + static ngAcceptInputType_autocompleteDisabled: BooleanInput; } diff --git a/src/material/autocomplete/autocomplete.ts b/src/material/autocomplete/autocomplete.ts index 4c37c62c8e39..4e96f737c907 100644 --- a/src/material/autocomplete/autocomplete.ts +++ b/src/material/autocomplete/autocomplete.ts @@ -7,7 +7,7 @@ */ import {ActiveDescendantKeyManager} from '@angular/cdk/a11y'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { AfterContentInit, ChangeDetectionStrategy, @@ -221,7 +221,7 @@ export class MatAutocomplete extends _MatAutocompleteMixinBase implements AfterC classList['mat-autocomplete-hidden'] = !this.showPanel; } - static ngAcceptInputType_autoActiveFirstOption: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_autoActiveFirstOption: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/badge/badge.ts b/src/material/badge/badge.ts index d96b9a0f7f5d..82a1ea7d55ed 100644 --- a/src/material/badge/badge.ts +++ b/src/material/badge/badge.ts @@ -7,7 +7,7 @@ */ import {AriaDescriber} from '@angular/cdk/a11y'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { Directive, ElementRef, @@ -270,7 +270,7 @@ export class MatBadge extends _MatBadgeMixinBase implements OnDestroy, OnChanges } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_hidden: boolean | string | null | undefined; - static ngAcceptInputType_overlap: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_hidden: BooleanInput; + static ngAcceptInputType_overlap: BooleanInput; } diff --git a/src/material/button-toggle/button-toggle.ts b/src/material/button-toggle/button-toggle.ts index 16e2adc4530d..bd33f75d4580 100644 --- a/src/material/button-toggle/button-toggle.ts +++ b/src/material/button-toggle/button-toggle.ts @@ -7,7 +7,7 @@ */ import {FocusMonitor} from '@angular/cdk/a11y'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {SelectionModel} from '@angular/cdk/collections'; import { AfterContentInit, @@ -369,9 +369,9 @@ export class MatButtonToggleGroup implements ControlValueAccessor, OnInit, After this.valueChange.emit(this.value); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_multiple: boolean | string | null | undefined; - static ngAcceptInputType_vertical: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_multiple: BooleanInput; + static ngAcceptInputType_vertical: BooleanInput; } // Boilerplate for applying mixins to the MatButtonToggle class. @@ -560,9 +560,9 @@ export class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit this._changeDetectorRef.markForCheck(); } - static ngAcceptInputType_checked: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_vertical: boolean | string | null | undefined; - static ngAcceptInputType_multiple: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_checked: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_vertical: BooleanInput; + static ngAcceptInputType_multiple: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/button/button.ts b/src/material/button/button.ts index dbbe975716af..abb597ad7bfa 100644 --- a/src/material/button/button.ts +++ b/src/material/button/button.ts @@ -7,6 +7,7 @@ */ import {FocusMonitor, FocusableOption, FocusOrigin} from '@angular/cdk/a11y'; +import {BooleanInput} from '@angular/cdk/coercion'; import { ChangeDetectionStrategy, Component, @@ -135,8 +136,8 @@ export class MatButton extends _MatButtonMixinBase return attributes.some(attribute => this._getHostElement().hasAttribute(attribute)); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } /** @@ -181,6 +182,6 @@ export class MatAnchor extends MatButton { } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/checkbox/checkbox.ts b/src/material/checkbox/checkbox.ts index c499d9c46565..4a7095dc93fd 100644 --- a/src/material/checkbox/checkbox.ts +++ b/src/material/checkbox/checkbox.ts @@ -7,7 +7,7 @@ */ import {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { AfterViewChecked, Attribute, @@ -493,8 +493,8 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAc } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_indeterminate: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_indeterminate: BooleanInput; } diff --git a/src/material/chips/chip-input.ts b/src/material/chips/chip-input.ts index c0a55f743932..f57c957994f1 100644 --- a/src/material/chips/chip-input.ts +++ b/src/material/chips/chip-input.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {Directive, ElementRef, EventEmitter, Inject, Input, OnChanges, Output} from '@angular/core'; import {hasModifierKey, TAB} from '@angular/cdk/keycodes'; import {MAT_CHIPS_DEFAULT_OPTIONS, MatChipsDefaultOptions} from './chip-default-options'; @@ -171,6 +171,6 @@ export class MatChipInput implements MatChipTextControl, OnChanges { return Array.isArray(separators) ? separators.indexOf(keyCode) > -1 : separators.has(keyCode); } - static ngAcceptInputType_addOnBlur: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_addOnBlur: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/chips/chip-list.ts b/src/material/chips/chip-list.ts index 414ce059f9b7..1401774a9176 100644 --- a/src/material/chips/chip-list.ts +++ b/src/material/chips/chip-list.ts @@ -8,7 +8,7 @@ import {FocusKeyManager} from '@angular/cdk/a11y'; import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {SelectionModel} from '@angular/cdk/collections'; import {BACKSPACE, END, HOME} from '@angular/cdk/keycodes'; import { @@ -810,8 +810,8 @@ export class MatChipList extends _MatChipListMixinBase implements MatFormFieldCo } } - static ngAcceptInputType_multiple: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_selectable: boolean | string | null | undefined; + static ngAcceptInputType_multiple: BooleanInput; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_selectable: BooleanInput; } diff --git a/src/material/chips/chip.ts b/src/material/chips/chip.ts index 4c8dc8bdaf75..28fb69121a0c 100644 --- a/src/material/chips/chip.ts +++ b/src/material/chips/chip.ts @@ -7,7 +7,7 @@ */ import {FocusableOption} from '@angular/cdk/a11y'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {BACKSPACE, DELETE, SPACE} from '@angular/cdk/keycodes'; import {Platform} from '@angular/cdk/platform'; import { @@ -389,11 +389,11 @@ export class MatChip extends _MatChipMixinBase implements FocusableOption, OnDes } } - static ngAcceptInputType_selected: boolean | string | null | undefined; - static ngAcceptInputType_selectable: boolean | string | null | undefined; - static ngAcceptInputType_removable: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_selected: BooleanInput; + static ngAcceptInputType_selectable: BooleanInput; + static ngAcceptInputType_removable: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/core/option/optgroup.ts b/src/material/core/option/optgroup.ts index 97d08cf98f63..2fb2e4a12565 100644 --- a/src/material/core/option/optgroup.ts +++ b/src/material/core/option/optgroup.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core'; import {CanDisable, CanDisableCtor, mixinDisabled} from '../common-behaviors/disabled'; @@ -45,5 +46,5 @@ export class MatOptgroup extends _MatOptgroupMixinBase implements CanDisable { /** Unique id for the underlying label. */ _labelId: string = `mat-optgroup-label-${_uniqueOptgroupIdCounter++}`; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/core/option/option.ts b/src/material/core/option/option.ts index 7e51d22f25ad..e87501b75b85 100644 --- a/src/material/core/option/option.ts +++ b/src/material/core/option/option.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {ENTER, SPACE, hasModifierKey} from '@angular/cdk/keycodes'; import { AfterViewChecked, @@ -267,7 +267,7 @@ export class MatOption implements FocusableOption, AfterViewChecked, OnDestroy { this.onSelectionChange.emit(new MatOptionSelectionChange(this, isUserInput)); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } /** diff --git a/src/material/datepicker/datepicker-input.ts b/src/material/datepicker/datepicker-input.ts index 1393fa526caa..bb74cceab489 100644 --- a/src/material/datepicker/datepicker-input.ts +++ b/src/material/datepicker/datepicker-input.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {DOWN_ARROW} from '@angular/cdk/keycodes'; import { Directive, @@ -367,9 +367,8 @@ export class MatDatepickerInput implements ControlValueAccessor, OnDestroy, V return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null; } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - // Accept `any` to avoid conflicts with other directives on `` that // may accept different types. static ngAcceptInputType_value: any; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/datepicker/datepicker-toggle.ts b/src/material/datepicker/datepicker-toggle.ts index 04735eb107e8..71e35d0a0664 100644 --- a/src/material/datepicker/datepicker-toggle.ts +++ b/src/material/datepicker/datepicker-toggle.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { AfterContentInit, Attribute, @@ -132,5 +132,5 @@ export class MatDatepickerToggle implements AfterContentInit, OnChanges, OnDe ).subscribe(() => this._changeDetectorRef.markForCheck()); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/datepicker/datepicker.ts b/src/material/datepicker/datepicker.ts index ab05cc7c51c5..3574a78ff034 100644 --- a/src/material/datepicker/datepicker.ts +++ b/src/material/datepicker/datepicker.ts @@ -7,7 +7,7 @@ */ import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {ESCAPE, UP_ARROW} from '@angular/cdk/keycodes'; import { Overlay, @@ -521,6 +521,6 @@ export class MatDatepicker implements OnDestroy, CanColor { } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_touchUi: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_touchUi: BooleanInput; } diff --git a/src/material/divider/divider.ts b/src/material/divider/divider.ts index 09ae6bbe8857..7f168ea6c4e1 100644 --- a/src/material/divider/divider.ts +++ b/src/material/divider/divider.ts @@ -7,7 +7,7 @@ */ import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; @Component({ selector: 'mat-divider', @@ -37,6 +37,6 @@ export class MatDivider { set inset(value: boolean) { this._inset = coerceBooleanProperty(value); } private _inset: boolean = false; - static ngAcceptInputType_vertical: boolean | string | null | undefined; - static ngAcceptInputType_inset: boolean | string | null | undefined; + static ngAcceptInputType_vertical: BooleanInput; + static ngAcceptInputType_inset: BooleanInput; } diff --git a/src/material/expansion/accordion.ts b/src/material/expansion/accordion.ts index ebadf9ed9cf6..6be761be97cd 100644 --- a/src/material/expansion/accordion.ts +++ b/src/material/expansion/accordion.ts @@ -7,7 +7,7 @@ */ import {Directive, Input, ContentChildren, QueryList, AfterContentInit} from '@angular/core'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {CdkAccordion} from '@angular/cdk/accordion'; import {FocusKeyManager} from '@angular/cdk/a11y'; import {HOME, END, hasModifierKey} from '@angular/cdk/keycodes'; @@ -102,6 +102,6 @@ export class MatAccordion extends CdkAccordion implements MatAccordionBase, Afte this._keyManager.updateActiveItem(header); } - static ngAcceptInputType_hideToggle: boolean | string | null | undefined; - static ngAcceptInputType_multi: boolean | string | null | undefined; + static ngAcceptInputType_hideToggle: BooleanInput; + static ngAcceptInputType_multi: BooleanInput; } diff --git a/src/material/expansion/expansion-panel.ts b/src/material/expansion/expansion-panel.ts index 67d8db432bb2..7312e34d8a38 100644 --- a/src/material/expansion/expansion-panel.ts +++ b/src/material/expansion/expansion-panel.ts @@ -8,7 +8,7 @@ import {AnimationEvent} from '@angular/animations'; import {CdkAccordionItem} from '@angular/cdk/accordion'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {UniqueSelectionDispatcher} from '@angular/cdk/collections'; import {TemplatePortal} from '@angular/cdk/portal'; import { @@ -226,9 +226,9 @@ export class MatExpansionPanel extends CdkAccordionItem implements AfterContentI return false; } - static ngAcceptInputType_hideToggle: boolean | string | null | undefined; - static ngAcceptInputType_expanded: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_hideToggle: BooleanInput; + static ngAcceptInputType_expanded: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } @Directive({ diff --git a/src/material/form-field/form-field.ts b/src/material/form-field/form-field.ts index 0b6368b276e8..da35fb9713ae 100644 --- a/src/material/form-field/form-field.ts +++ b/src/material/form-field/form-field.ts @@ -7,7 +7,7 @@ */ import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { AfterContentChecked, AfterContentInit, @@ -594,5 +594,5 @@ export class MatFormField extends _MatFormFieldMixinBase return document.documentElement!.contains(element); } - static ngAcceptInputType_hideRequiredMarker: boolean | string | null | undefined; + static ngAcceptInputType_hideRequiredMarker: BooleanInput; } diff --git a/src/material/grid-list/grid-list.ts b/src/material/grid-list/grid-list.ts index 336672b7c7ef..5afdced74b6d 100644 --- a/src/material/grid-list/grid-list.ts +++ b/src/material/grid-list/grid-list.ts @@ -22,7 +22,7 @@ import {MatGridTile} from './grid-tile'; import {TileCoordinator} from './tile-coordinator'; import {TileStyler, FitTileStyler, RatioTileStyler, FixedTileStyler} from './tile-styler'; import {Directionality} from '@angular/cdk/bidi'; -import {coerceNumberProperty} from '@angular/cdk/coercion'; +import {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion'; import {MAT_GRID_LIST, MatGridListBase} from './grid-list-base'; @@ -170,5 +170,5 @@ export class MatGridList implements MatGridListBase, OnInit, AfterContentChecked } } - static ngAcceptInputType_cols: number | string | null | undefined; + static ngAcceptInputType_cols: NumberInput; } diff --git a/src/material/grid-list/grid-tile.ts b/src/material/grid-list/grid-tile.ts index c732536a3cb8..f3072aec0435 100644 --- a/src/material/grid-list/grid-tile.ts +++ b/src/material/grid-list/grid-tile.ts @@ -20,7 +20,7 @@ import { Inject, } from '@angular/core'; import {MatLine, setLines} from '@angular/material/core'; -import {coerceNumberProperty} from '@angular/cdk/coercion'; +import {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion'; import {MAT_GRID_LIST, MatGridListBase} from './grid-list-base'; @Component({ @@ -60,8 +60,8 @@ export class MatGridTile { (this._element.nativeElement.style as any)[property] = value; } - static ngAcceptInputType_rowspan: number | string | null | undefined; - static ngAcceptInputType_colspan: number | string | null | undefined; + static ngAcceptInputType_rowspan: NumberInput; + static ngAcceptInputType_colspan: NumberInput; } @Component({ diff --git a/src/material/icon/icon.ts b/src/material/icon/icon.ts index b38aa0d54456..0155abc74daa 100644 --- a/src/material/icon/icon.ts +++ b/src/material/icon/icon.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {DOCUMENT} from '@angular/common'; import { AfterViewChecked, @@ -419,5 +419,5 @@ export class MatIcon extends _MatIconMixinBase implements OnChanges, OnInit, Aft } } - static ngAcceptInputType_inline: boolean | string | null | undefined; + static ngAcceptInputType_inline: BooleanInput; } diff --git a/src/material/input/autosize.ts b/src/material/input/autosize.ts index 2a8def11d7ec..438f2d804577 100644 --- a/src/material/input/autosize.ts +++ b/src/material/input/autosize.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput, NumberInput} from '@angular/cdk/coercion'; import {CdkTextareaAutosize} from '@angular/cdk/text-field'; import {Directive, Input} from '@angular/core'; @@ -42,7 +43,7 @@ export class MatTextareaAutosize extends CdkTextareaAutosize { get matTextareaAutosize(): boolean { return this.enabled; } set matTextareaAutosize(value: boolean) { this.enabled = value; } - static ngAcceptInputType_minRows: number | string | null | undefined; - static ngAcceptInputType_maxRows: number | string | null | undefined; - static ngAcceptInputType_enabled: boolean | string | null | undefined; + static ngAcceptInputType_minRows: NumberInput; + static ngAcceptInputType_maxRows: NumberInput; + static ngAcceptInputType_enabled: BooleanInput; } diff --git a/src/material/input/input.ts b/src/material/input/input.ts index d3f4fa69479c..ed1d2ca176e0 100644 --- a/src/material/input/input.ts +++ b/src/material/input/input.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {getSupportedInputTypes, Platform} from '@angular/cdk/platform'; import {AutofillMonitor} from '@angular/cdk/text-field'; import { @@ -417,9 +417,9 @@ export class MatInput extends _MatInputMixinBase implements MatFormFieldControl< } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_readonly: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_readonly: BooleanInput; + static ngAcceptInputType_required: BooleanInput; // Accept `any` to avoid conflicts with other directives on `` that may // accept different types. diff --git a/src/material/list/list.ts b/src/material/list/list.ts index e39a0901e72d..2be160ab501c 100644 --- a/src/material/list/list.ts +++ b/src/material/list/list.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import { AfterContentInit, ChangeDetectionStrategy, @@ -69,7 +70,7 @@ export class MatNavList extends _MatListMixinBase implements CanDisableRipple, O this._stateChanges.complete(); } - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; } @Component({ @@ -118,7 +119,7 @@ export class MatList extends _MatListMixinBase implements CanDisableRipple, OnCh this._stateChanges.complete(); } - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; } /** @@ -221,5 +222,5 @@ export class MatListItem extends _MatListItemMixinBase implements AfterContentIn return this._element.nativeElement; } - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/list/selection-list.ts b/src/material/list/selection-list.ts index df806fd89f2a..559ec05863a1 100644 --- a/src/material/list/selection-list.ts +++ b/src/material/list/selection-list.ts @@ -7,7 +7,7 @@ */ import {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {SelectionModel} from '@angular/cdk/collections'; import { A, @@ -305,9 +305,9 @@ export class MatListOption extends _MatListOptionMixinBase implements AfterConte this._changeDetector.markForCheck(); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_selected: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_selected: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } @@ -640,6 +640,6 @@ export class MatSelectionList extends _MatSelectionListMixinBase implements CanD } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/menu/menu-item.ts b/src/material/menu/menu-item.ts index 239b00c0902e..8056fca55aa8 100644 --- a/src/material/menu/menu-item.ts +++ b/src/material/menu/menu-item.ts @@ -7,6 +7,7 @@ */ import {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y'; +import {BooleanInput} from '@angular/cdk/coercion'; import { ChangeDetectionStrategy, Component, @@ -179,6 +180,6 @@ export class MatMenuItem extends _MatMenuItemMixinBase return output.trim(); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/menu/menu.ts b/src/material/menu/menu.ts index ec48f2a2d2e1..9e2374eba925 100644 --- a/src/material/menu/menu.ts +++ b/src/material/menu/menu.ts @@ -8,7 +8,7 @@ import {FocusKeyManager, FocusOrigin} from '@angular/cdk/a11y'; import {Direction} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { ESCAPE, LEFT_ARROW, @@ -508,6 +508,6 @@ export class _MatMenu extends MatMenu { super(elementRef, ngZone, defaultOptions); } - static ngAcceptInputType_overlapTrigger: boolean | string | null | undefined; - static ngAcceptInputType_hasBackdrop: boolean | string | null | undefined; + static ngAcceptInputType_overlapTrigger: BooleanInput; + static ngAcceptInputType_hasBackdrop: BooleanInput; } diff --git a/src/material/paginator/paginator.ts b/src/material/paginator/paginator.ts index 89a0d813d81e..3e1c34c9d82e 100644 --- a/src/material/paginator/paginator.ts +++ b/src/material/paginator/paginator.ts @@ -6,7 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceNumberProperty, coerceBooleanProperty} from '@angular/cdk/coercion'; +import { + coerceNumberProperty, + coerceBooleanProperty, + BooleanInput, + NumberInput +} from '@angular/cdk/coercion'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -283,10 +288,10 @@ export class MatPaginator extends _MatPaginatorBase implements OnInit, OnDestroy }); } - static ngAcceptInputType_pageIndex: number | string | null | undefined; - static ngAcceptInputType_length: number | string | null | undefined; - static ngAcceptInputType_pageSize: number | string | null | undefined; - static ngAcceptInputType_hidePageSize: boolean | string | null | undefined; - static ngAcceptInputType_showFirstLastButtons: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_pageIndex: NumberInput; + static ngAcceptInputType_length: NumberInput; + static ngAcceptInputType_pageSize: NumberInput; + static ngAcceptInputType_hidePageSize: BooleanInput; + static ngAcceptInputType_showFirstLastButtons: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/progress-bar/progress-bar.ts b/src/material/progress-bar/progress-bar.ts index e3f84ed6cc5d..ecb3780510e8 100644 --- a/src/material/progress-bar/progress-bar.ts +++ b/src/material/progress-bar/progress-bar.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {coerceNumberProperty} from '@angular/cdk/coercion'; +import {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion'; import {DOCUMENT} from '@angular/common'; import { AfterViewInit, @@ -219,7 +219,7 @@ export class MatProgressBar extends _MatProgressBarMixinBase implements CanColor } } - static ngAcceptInputType_value: number | string | null | undefined; + static ngAcceptInputType_value: NumberInput; } /** Clamps a value to be between two numbers, by default 0 and 100. */ diff --git a/src/material/progress-spinner/progress-spinner.ts b/src/material/progress-spinner/progress-spinner.ts index a3b4c2bfc0b6..0bcf5dce5551 100644 --- a/src/material/progress-spinner/progress-spinner.ts +++ b/src/material/progress-spinner/progress-spinner.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceNumberProperty} from '@angular/cdk/coercion'; +import {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion'; import {Platform} from '@angular/cdk/platform'; import {DOCUMENT} from '@angular/common'; import { @@ -295,9 +295,9 @@ export class MatProgressSpinner extends _MatProgressSpinnerMixinBase implements .replace(/DIAMETER/g, `${this.diameter}`); } - static ngAcceptInputType_diameter: number | string | null | undefined; - static ngAcceptInputType_strokeWidth: number | string | null | undefined; - static ngAcceptInputType_value: number | string | null | undefined; + static ngAcceptInputType_diameter: NumberInput; + static ngAcceptInputType_strokeWidth: NumberInput; + static ngAcceptInputType_value: NumberInput; } @@ -333,9 +333,9 @@ export class MatSpinner extends MatProgressSpinner { this.mode = 'indeterminate'; } - static ngAcceptInputType_diameter: number | string | null | undefined; - static ngAcceptInputType_strokeWidth: number | string | null | undefined; - static ngAcceptInputType_value: number | string | null | undefined; + static ngAcceptInputType_diameter: NumberInput; + static ngAcceptInputType_strokeWidth: NumberInput; + static ngAcceptInputType_value: NumberInput; } diff --git a/src/material/radio/radio.ts b/src/material/radio/radio.ts index be923dab703c..b71cb25bb043 100644 --- a/src/material/radio/radio.ts +++ b/src/material/radio/radio.ts @@ -7,7 +7,7 @@ */ import {FocusMonitor} from '@angular/cdk/a11y'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {UniqueSelectionDispatcher} from '@angular/cdk/collections'; import { AfterContentInit, @@ -307,8 +307,8 @@ export class MatRadioGroup implements AfterContentInit, ControlValueAccessor { this._changeDetector.markForCheck(); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_required: BooleanInput; } // Boilerplate for applying mixins to MatRadioButton. @@ -597,8 +597,8 @@ export class MatRadioButton extends _MatRadioButtonMixinBase } } - static ngAcceptInputType_checked: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_checked: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/select/select.ts b/src/material/select/select.ts index 7f9cc660b03b..183d6542cb0d 100644 --- a/src/material/select/select.ts +++ b/src/material/select/select.ts @@ -8,7 +8,12 @@ import {ActiveDescendantKeyManager, LiveAnnouncer} from '@angular/cdk/a11y'; import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; +import { + BooleanInput, + coerceBooleanProperty, + coerceNumberProperty, + NumberInput +} from '@angular/cdk/coercion'; import {SelectionModel} from '@angular/cdk/collections'; import { A, @@ -1354,10 +1359,10 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit, return this._panelOpen || !this.empty; } - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_multiple: boolean | string | null | undefined; - static ngAcceptInputType_disableOptionCentering: boolean | string | null | undefined; - static ngAcceptInputType_typeaheadDebounceInterval: number | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_multiple: BooleanInput; + static ngAcceptInputType_disableOptionCentering: BooleanInput; + static ngAcceptInputType_typeaheadDebounceInterval: NumberInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/sidenav/drawer.ts b/src/material/sidenav/drawer.ts index 290fbfbd54a7..b5f113d893c9 100644 --- a/src/material/sidenav/drawer.ts +++ b/src/material/sidenav/drawer.ts @@ -8,7 +8,7 @@ import {AnimationEvent} from '@angular/animations'; import {FocusMonitor, FocusOrigin, FocusTrap, FocusTrapFactory} from '@angular/cdk/a11y'; import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes'; import {Platform} from '@angular/cdk/platform'; import {CdkScrollable, ScrollDispatcher, ViewportRuler} from '@angular/cdk/scrolling'; @@ -452,9 +452,9 @@ export class MatDrawer implements AfterContentInit, AfterContentChecked, OnDestr this._animationEnd.next(event); } - static ngAcceptInputType_disableClose: boolean | string | null | undefined; - static ngAcceptInputType_autoFocus: boolean | string | null | undefined; - static ngAcceptInputType_opened: boolean | string | null | undefined; + static ngAcceptInputType_disableClose: BooleanInput; + static ngAcceptInputType_autoFocus: BooleanInput; + static ngAcceptInputType_opened: BooleanInput; } @@ -832,6 +832,6 @@ export class MatDrawerContainer implements AfterContentInit, DoCheck, OnDestroy return drawer != null && drawer.opened; } - static ngAcceptInputType_autosize: boolean | string | null | undefined; - static ngAcceptInputType_hasBackdrop: boolean | string | null | undefined; + static ngAcceptInputType_autosize: BooleanInput; + static ngAcceptInputType_hasBackdrop: BooleanInput; } diff --git a/src/material/sidenav/sidenav.ts b/src/material/sidenav/sidenav.ts index 2abfb9eddc1e..9432102162a0 100644 --- a/src/material/sidenav/sidenav.ts +++ b/src/material/sidenav/sidenav.ts @@ -22,7 +22,12 @@ import { } from '@angular/core'; import {MatDrawer, MatDrawerContainer, MatDrawerContent, MAT_DRAWER_CONTAINER} from './drawer'; import {matDrawerAnimations} from './drawer-animations'; -import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; +import { + BooleanInput, + coerceBooleanProperty, + coerceNumberProperty, + NumberInput +} from '@angular/cdk/coercion'; import {ScrollDispatcher} from '@angular/cdk/scrolling'; @@ -96,12 +101,12 @@ export class MatSidenav extends MatDrawer { set fixedBottomGap(value) { this._fixedBottomGap = coerceNumberProperty(value); } private _fixedBottomGap = 0; - static ngAcceptInputType_fixedInViewport: boolean | string | null | undefined; - static ngAcceptInputType_fixedTopGap: number | string | null | undefined; - static ngAcceptInputType_fixedBottomGap: number | string | null | undefined; - static ngAcceptInputType_disableClose: boolean | string | null | undefined; - static ngAcceptInputType_autoFocus: boolean | string | null | undefined; - static ngAcceptInputType_opened: boolean | string | null | undefined; + static ngAcceptInputType_fixedInViewport: BooleanInput; + static ngAcceptInputType_fixedTopGap: NumberInput; + static ngAcceptInputType_fixedBottomGap: NumberInput; + static ngAcceptInputType_disableClose: BooleanInput; + static ngAcceptInputType_autoFocus: BooleanInput; + static ngAcceptInputType_opened: BooleanInput; } @@ -132,6 +137,6 @@ export class MatSidenavContainer extends MatDrawerContainer { @ContentChild(MatSidenavContent) _content: MatSidenavContent; - static ngAcceptInputType_autosize: boolean | string | null | undefined; - static ngAcceptInputType_hasBackdrop: boolean | string | null | undefined; + static ngAcceptInputType_autosize: BooleanInput; + static ngAcceptInputType_hasBackdrop: BooleanInput; } diff --git a/src/material/slide-toggle/slide-toggle.ts b/src/material/slide-toggle/slide-toggle.ts index 9dd5a2f9e971..bdd9a923ce70 100644 --- a/src/material/slide-toggle/slide-toggle.ts +++ b/src/material/slide-toggle/slide-toggle.ts @@ -8,7 +8,7 @@ import {FocusMonitor} from '@angular/cdk/a11y'; import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { AfterContentInit, Attribute, @@ -294,8 +294,8 @@ export class MatSlideToggle extends _MatSlideToggleMixinBase implements OnDestro this._changeDetectorRef.detectChanges(); } - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_checked: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_checked: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/slider/slider.ts b/src/material/slider/slider.ts index 1fddc2c5a29c..248984edb2c6 100644 --- a/src/material/slider/slider.ts +++ b/src/material/slider/slider.ts @@ -8,7 +8,12 @@ import {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y'; import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; +import { + BooleanInput, + coerceBooleanProperty, + coerceNumberProperty, + NumberInput +} from '@angular/cdk/coercion'; import { DOWN_ARROW, END, @@ -883,15 +888,15 @@ export class MatSlider extends _MatSliderMixinBase this.disabled = isDisabled; } - static ngAcceptInputType_invert: boolean | string | null | undefined; - static ngAcceptInputType_max: number | string | null | undefined; - static ngAcceptInputType_min: number | string | null | undefined; - static ngAcceptInputType_step: number | string | null | undefined; - static ngAcceptInputType_thumbLabel: boolean | string | null | undefined; - static ngAcceptInputType_tickInterval: number | string | null | undefined; - static ngAcceptInputType_value: number | string | null | undefined; - static ngAcceptInputType_vertical: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_invert: BooleanInput; + static ngAcceptInputType_max: NumberInput; + static ngAcceptInputType_min: NumberInput; + static ngAcceptInputType_step: NumberInput; + static ngAcceptInputType_thumbLabel: BooleanInput; + static ngAcceptInputType_tickInterval: NumberInput; + static ngAcceptInputType_value: NumberInput; + static ngAcceptInputType_vertical: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } /** Returns whether an event is a touch event. */ diff --git a/src/material/sort/sort-header.ts b/src/material/sort/sort-header.ts index ecfb016c2da1..bfdea322859e 100644 --- a/src/material/sort/sort-header.ts +++ b/src/material/sort/sort-header.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -314,6 +314,6 @@ export class MatSortHeader extends _MatSortHeaderMixinBase return !this._isDisabled() || this._isSorted(); } - static ngAcceptInputType_disableClear: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disableClear: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/sort/sort.ts b/src/material/sort/sort.ts index 4e3a1bbcb481..3352beb4a17d 100644 --- a/src/material/sort/sort.ts +++ b/src/material/sort/sort.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import { Directive, EventEmitter, @@ -168,8 +168,8 @@ export class MatSort extends _MatSortMixinBase this._stateChanges.complete(); } - static ngAcceptInputType_disableClear: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disableClear: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; } /** Returns the sort direction cycle to use given the provided parameters of order and clear. */ diff --git a/src/material/stepper/stepper.ts b/src/material/stepper/stepper.ts index ee8056cb2749..747879b632bb 100644 --- a/src/material/stepper/stepper.ts +++ b/src/material/stepper/stepper.ts @@ -7,6 +7,7 @@ */ import {Directionality} from '@angular/cdk/bidi'; +import {BooleanInput, NumberInput} from '@angular/cdk/coercion'; import { CdkStep, CdkStepper, @@ -81,10 +82,10 @@ export class MatStep extends CdkStep implements ErrorStateMatcher { return originalErrorState || customErrorState; } - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_completed: boolean | string | null | undefined; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_completed: BooleanInput; } @@ -132,12 +133,12 @@ export class MatStepper extends CdkStepper implements AfterContentInit { }); } - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_linear: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_linear: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; } @Component({ @@ -166,12 +167,12 @@ export class MatHorizontalStepper extends MatStepper { @Input() labelPosition: 'bottom' | 'end' = 'end'; - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_linear: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_linear: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; } @Component({ @@ -204,10 +205,10 @@ export class MatVerticalStepper extends MatStepper { this._orientation = 'vertical'; } - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_linear: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_linear: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; } diff --git a/src/material/table/cell.ts b/src/material/table/cell.ts index 65d567578e17..627160eaf859 100644 --- a/src/material/table/cell.ts +++ b/src/material/table/cell.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {Directive, ElementRef, Input} from '@angular/core'; import { CdkCell, @@ -61,8 +62,8 @@ export class MatColumnDef extends CdkColumnDef { /** Unique name for this column. */ @Input('matColumnDef') name: string; - static ngAcceptInputType_sticky: boolean | string | null | undefined; - static ngAcceptInputType_stickyEnd: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; + static ngAcceptInputType_stickyEnd: BooleanInput; } /** Header cell template container that adds the right classes and role. */ diff --git a/src/material/table/row.ts b/src/material/table/row.ts index 015848808d8b..68a08e523930 100644 --- a/src/material/table/row.ts +++ b/src/material/table/row.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import { CDK_ROW_TEMPLATE, CdkFooterRow, @@ -27,7 +28,7 @@ import {ChangeDetectionStrategy, Component, Directive, ViewEncapsulation} from ' inputs: ['columns: matHeaderRowDef', 'sticky: matHeaderRowDefSticky'], }) export class MatHeaderRowDef extends CdkHeaderRowDef { - static ngAcceptInputType_sticky: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; } /** @@ -40,7 +41,7 @@ export class MatHeaderRowDef extends CdkHeaderRowDef { inputs: ['columns: matFooterRowDef', 'sticky: matFooterRowDefSticky'], }) export class MatFooterRowDef extends CdkFooterRowDef { - static ngAcceptInputType_sticky: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; } /** diff --git a/src/material/table/table.ts b/src/material/table/table.ts index 2ab806e6b3b6..1febf4be832e 100644 --- a/src/material/table/table.ts +++ b/src/material/table/table.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {CDK_TABLE_TEMPLATE, CdkTable} from '@angular/cdk/table'; import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; @@ -30,5 +31,5 @@ export class MatTable extends CdkTable { /** Overrides the sticky CSS class set by the `CdkTable`. */ protected stickyCssClass = 'mat-table-sticky'; - static ngAcceptInputType_multiTemplateDataRows: boolean | string | null | undefined; + static ngAcceptInputType_multiTemplateDataRows: BooleanInput; } diff --git a/src/material/tabs/tab-group.ts b/src/material/tabs/tab-group.ts index b0aa3dfe67bc..0e929e3c9e67 100644 --- a/src/material/tabs/tab-group.ts +++ b/src/material/tabs/tab-group.ts @@ -6,7 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; +import { + BooleanInput, + coerceBooleanProperty, + coerceNumberProperty, + NumberInput +} from '@angular/cdk/coercion'; import { AfterContentChecked, AfterContentInit, @@ -408,8 +413,8 @@ export class MatTabGroup extends _MatTabGroupBase { super(elementRef, changeDetectorRef, defaultConfig, animationMode); } - static ngAcceptInputType_dynamicHeight: boolean | string | null | undefined; - static ngAcceptInputType_animationDuration: number | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_dynamicHeight: BooleanInput; + static ngAcceptInputType_animationDuration: NumberInput; + static ngAcceptInputType_selectedIndex: NumberInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/tabs/tab-header.ts b/src/material/tabs/tab-header.ts index 08c1b7549232..883c31da84c7 100644 --- a/src/material/tabs/tab-header.ts +++ b/src/material/tabs/tab-header.ts @@ -28,7 +28,7 @@ import { Directive, } from '@angular/core'; import {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion'; import {MatInkBar} from './ink-bar'; import {MatTabLabelWrapper} from './tab-label-wrapper'; import {Platform} from '@angular/cdk/platform'; @@ -106,6 +106,6 @@ export class MatTabHeader extends _MatTabHeaderBase { super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode); } - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; } diff --git a/src/material/tabs/tab-label-wrapper.ts b/src/material/tabs/tab-label-wrapper.ts index 8235a4729bc0..a77f03b2b982 100644 --- a/src/material/tabs/tab-label-wrapper.ts +++ b/src/material/tabs/tab-label-wrapper.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {Directive, ElementRef} from '@angular/core'; import {CanDisable, CanDisableCtor, mixinDisabled} from '@angular/material/core'; @@ -46,5 +47,5 @@ export class MatTabLabelWrapper extends _MatTabLabelWrapperMixinBase implements return this.elementRef.nativeElement.offsetWidth; } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/tabs/tab-nav-bar/tab-nav-bar.ts b/src/material/tabs/tab-nav-bar/tab-nav-bar.ts index b26886db732e..16db69df9834 100644 --- a/src/material/tabs/tab-nav-bar/tab-nav-bar.ts +++ b/src/material/tabs/tab-nav-bar/tab-nav-bar.ts @@ -41,7 +41,7 @@ import { RippleTarget, ThemePalette, } from '@angular/material/core'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion'; import {FocusMonitor, FocusableOption} from '@angular/cdk/a11y'; import {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations'; import {MatInkBar} from '../ink-bar'; @@ -180,8 +180,8 @@ export class MatTabNav extends _MatTabNavBase { super(elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform, animationMode); } - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; } // Boilerplate for applying mixins to MatTabLink. @@ -289,6 +289,6 @@ export class MatTabLink extends _MatTabLinkBase implements OnDestroy { this._tabLinkRipple._removeTriggerEvents(); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; } diff --git a/src/material/tabs/tab.ts b/src/material/tabs/tab.ts index a1fc1eef3f37..908bc4f8dc0b 100644 --- a/src/material/tabs/tab.ts +++ b/src/material/tabs/tab.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {TemplatePortal} from '@angular/cdk/portal'; import { ChangeDetectionStrategy, @@ -140,5 +141,5 @@ export class MatTab extends _MatTabMixinBase implements OnInit, CanDisable, OnCh this._explicitContent || this._implicitContent, this._viewContainerRef); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/tooltip/tooltip.ts b/src/material/tooltip/tooltip.ts index 4fd3dbb92c72..9c3ba364958b 100644 --- a/src/material/tooltip/tooltip.ts +++ b/src/material/tooltip/tooltip.ts @@ -8,7 +8,7 @@ import {AnimationEvent} from '@angular/animations'; import {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y'; import {Directionality} from '@angular/cdk/bidi'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion'; import {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes'; import {BreakpointObserver, Breakpoints, BreakpointState} from '@angular/cdk/layout'; import { @@ -604,9 +604,9 @@ export class MatTooltip implements OnDestroy, OnInit { } } - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_hideDelay: number | string | null | undefined; - static ngAcceptInputType_showDelay: number | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_hideDelay: NumberInput; + static ngAcceptInputType_showDelay: NumberInput; } /** diff --git a/src/material/tree/node.ts b/src/material/tree/node.ts index 27b7cc9d980f..4e99138411d5 100644 --- a/src/material/tree/node.ts +++ b/src/material/tree/node.ts @@ -30,7 +30,7 @@ import { mixinDisabled, mixinTabIndex, } from '@angular/material/core'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; const _MatTreeNodeMixinBase: HasTabIndexCtor & CanDisableCtor & typeof CdkTreeNode = mixinTabIndex(mixinDisabled(CdkTreeNode)); @@ -62,7 +62,7 @@ export class MatTreeNode extends _MatTreeNodeMixinBase this.tabIndex = Number(tabIndex) || 0; } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } /** @@ -134,5 +134,5 @@ export class MatNestedTreeNode extends CdkNestedTreeNode implements AfterC super.ngOnDestroy(); } - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; } diff --git a/src/material/tree/padding.ts b/src/material/tree/padding.ts index 6b42de51bfbc..7a96c68b0d66 100644 --- a/src/material/tree/padding.ts +++ b/src/material/tree/padding.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import {NumberInput} from '@angular/cdk/coercion'; import {CdkTreeNodePadding} from '@angular/cdk/tree'; import {Directive, Input} from '@angular/core'; @@ -23,5 +24,5 @@ export class MatTreeNodePadding extends CdkTreeNodePadding { /** The indent for each level. Default number 40px from material design menu sub-menu spec. */ @Input('matTreeNodePaddingIndent') indent: number; - static ngAcceptInputType_level: number | string | null | undefined; + static ngAcceptInputType_level: NumberInput; } diff --git a/src/material/tree/toggle.ts b/src/material/tree/toggle.ts index b7f20fffe973..2da5f3509685 100644 --- a/src/material/tree/toggle.ts +++ b/src/material/tree/toggle.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {BooleanInput} from '@angular/cdk/coercion'; import {CdkTreeNodeToggle} from '@angular/cdk/tree'; import {Directive, Input} from '@angular/core'; @@ -19,5 +20,5 @@ import {Directive, Input} from '@angular/core'; export class MatTreeNodeToggle extends CdkTreeNodeToggle { @Input('matTreeNodeToggleRecursive') recursive: boolean = false; - static ngAcceptInputType_recursive: boolean | string | null | undefined; + static ngAcceptInputType_recursive: BooleanInput; } diff --git a/tools/public_api_guard/cdk/a11y.d.ts b/tools/public_api_guard/cdk/a11y.d.ts index effd635d5608..90e6a05057f7 100644 --- a/tools/public_api_guard/cdk/a11y.d.ts +++ b/tools/public_api_guard/cdk/a11y.d.ts @@ -48,8 +48,8 @@ export declare class CdkTrapFocus implements OnDestroy, AfterContentInit, DoChec ngAfterContentInit(): void; ngDoCheck(): void; ngOnDestroy(): void; - static ngAcceptInputType_autoCapture: boolean | string | null | undefined; - static ngAcceptInputType_enabled: boolean | string | null | undefined; + static ngAcceptInputType_autoCapture: BooleanInput; + static ngAcceptInputType_enabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/cdk/accordion.d.ts b/tools/public_api_guard/cdk/accordion.d.ts index 630dcf56a483..fda468456b13 100644 --- a/tools/public_api_guard/cdk/accordion.d.ts +++ b/tools/public_api_guard/cdk/accordion.d.ts @@ -7,7 +7,7 @@ export declare class CdkAccordion implements OnDestroy, OnChanges { ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; openAll(): void; - static ngAcceptInputType_multi: boolean | string | null | undefined; + static ngAcceptInputType_multi: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -27,8 +27,8 @@ export declare class CdkAccordionItem implements OnDestroy { ngOnDestroy(): void; open(): void; toggle(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_expanded: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_expanded: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/cdk/coercion.d.ts b/tools/public_api_guard/cdk/coercion.d.ts index 31ce7b44c2b4..1cf0d8e786ec 100644 --- a/tools/public_api_guard/cdk/coercion.d.ts +++ b/tools/public_api_guard/cdk/coercion.d.ts @@ -1,5 +1,7 @@ export declare function _isNumberValue(value: any): boolean; +export declare type BooleanInput = string | boolean | null | undefined; + export declare function coerceArray(value: T | T[]): T[]; export declare function coerceBooleanProperty(value: any): boolean; @@ -10,3 +12,5 @@ export declare function coerceElement(elementOrRef: ElementRef | T): T; export declare function coerceNumberProperty(value: any): number; export declare function coerceNumberProperty(value: any, fallback: D): number | D; + +export declare type NumberInput = string | number | null | undefined; diff --git a/tools/public_api_guard/cdk/drag-drop.d.ts b/tools/public_api_guard/cdk/drag-drop.d.ts index 9ae18b43bac6..6e4a7d7a6db3 100644 --- a/tools/public_api_guard/cdk/drag-drop.d.ts +++ b/tools/public_api_guard/cdk/drag-drop.d.ts @@ -46,7 +46,7 @@ export declare class CdkDrag implements AfterViewInit, OnChanges, OnDes ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; reset(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "[cdkDrag]", ["cdkDrag"], { 'data': "cdkDragData", 'lockAxis': "cdkDragLockAxis", 'rootElementSelector': "cdkDragRootElement", 'boundaryElement': "cdkDragBoundary", 'dragStartDelay': "cdkDragStartDelay", 'freeDragPosition': "cdkDragFreeDragPosition", 'disabled': "cdkDragDisabled", 'constrainPosition': "cdkDragConstrainPosition", 'previewClass': "cdkDragPreviewClass" }, { 'started': "cdkDragStarted", 'released': "cdkDragReleased", 'ended': "cdkDragEnded", 'entered': "cdkDragEntered", 'exited': "cdkDragExited", 'dropped': "cdkDragDropped", 'moved': "cdkDragMoved" }, ["_previewTemplate", "_placeholderTemplate", "_handles"]>; static ɵfac: i0.ɵɵFactoryDef>; } @@ -90,7 +90,7 @@ export declare class CdkDragHandle implements OnDestroy { element: ElementRef; constructor(element: ElementRef, parentDrag?: any); ngOnDestroy(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -169,9 +169,9 @@ export declare class CdkDropList implements AfterContentInit, OnDestroy ngAfterContentInit(): void; ngOnDestroy(): void; start(): void; - static ngAcceptInputType_autoScrollDisabled: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_sortingDisabled: boolean | string | null | undefined; + static ngAcceptInputType_autoScrollDisabled: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_sortingDisabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "[cdkDropList], cdk-drop-list", ["cdkDropList"], { 'connectedTo': "cdkDropListConnectedTo", 'data': "cdkDropListData", 'orientation': "cdkDropListOrientation", 'id': "id", 'lockAxis': "cdkDropListLockAxis", 'disabled': "cdkDropListDisabled", 'sortingDisabled': "cdkDropListSortingDisabled", 'enterPredicate': "cdkDropListEnterPredicate", 'autoScrollDisabled': "cdkDropListAutoScrollDisabled" }, { 'dropped': "cdkDropListDropped", 'entered': "cdkDropListEntered", 'exited': "cdkDropListExited", 'sorted': "cdkDropListSorted" }, ["_draggables"]>; static ɵfac: i0.ɵɵFactoryDef>; } @@ -180,7 +180,7 @@ export declare class CdkDropListGroup implements OnDestroy { readonly _items: Set; disabled: boolean; ngOnDestroy(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "[cdkDropListGroup]", ["cdkDropListGroup"], { 'disabled': "cdkDropListGroupDisabled" }, {}, never>; static ɵfac: i0.ɵɵFactoryDef>; } diff --git a/tools/public_api_guard/cdk/observers.d.ts b/tools/public_api_guard/cdk/observers.d.ts index 22c582320316..d32b4513f916 100644 --- a/tools/public_api_guard/cdk/observers.d.ts +++ b/tools/public_api_guard/cdk/observers.d.ts @@ -5,8 +5,8 @@ export declare class CdkObserveContent implements AfterContentInit, OnDestroy { constructor(_contentObserver: ContentObserver, _elementRef: ElementRef, _ngZone: NgZone); ngAfterContentInit(): void; ngOnDestroy(): void; - static ngAcceptInputType_debounce: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_debounce: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/cdk/overlay.d.ts b/tools/public_api_guard/cdk/overlay.d.ts index 852f256a8b14..355cc296e122 100644 --- a/tools/public_api_guard/cdk/overlay.d.ts +++ b/tools/public_api_guard/cdk/overlay.d.ts @@ -36,11 +36,11 @@ export declare class CdkConnectedOverlay implements OnDestroy, OnChanges { constructor(_overlay: Overlay, templateRef: TemplateRef, viewContainerRef: ViewContainerRef, scrollStrategyFactory: any, _dir: Directionality); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; - static ngAcceptInputType_flexibleDimensions: boolean | string | null | undefined; - static ngAcceptInputType_growAfterOpen: boolean | string | null | undefined; - static ngAcceptInputType_hasBackdrop: boolean | string | null | undefined; - static ngAcceptInputType_lockPosition: boolean | string | null | undefined; - static ngAcceptInputType_push: boolean | string | null | undefined; + static ngAcceptInputType_flexibleDimensions: BooleanInput; + static ngAcceptInputType_growAfterOpen: BooleanInput; + static ngAcceptInputType_hasBackdrop: BooleanInput; + static ngAcceptInputType_lockPosition: BooleanInput; + static ngAcceptInputType_push: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/cdk/scrolling.d.ts b/tools/public_api_guard/cdk/scrolling.d.ts index 8eee21b34a58..aeae3e41e7dc 100644 --- a/tools/public_api_guard/cdk/scrolling.d.ts +++ b/tools/public_api_guard/cdk/scrolling.d.ts @@ -43,9 +43,9 @@ export declare class CdkFixedSizeVirtualScroll implements OnChanges { maxBufferPx: number; minBufferPx: number; ngOnChanges(): void; - static ngAcceptInputType_itemSize: string | number | null | undefined; - static ngAcceptInputType_maxBufferPx: string | number | null | undefined; - static ngAcceptInputType_minBufferPx: string | number | null | undefined; + static ngAcceptInputType_itemSize: NumberInput; + static ngAcceptInputType_maxBufferPx: NumberInput; + static ngAcceptInputType_minBufferPx: NumberInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/cdk/stepper.d.ts b/tools/public_api_guard/cdk/stepper.d.ts index 71b9a4945c1a..8f3fc76ee38d 100644 --- a/tools/public_api_guard/cdk/stepper.d.ts +++ b/tools/public_api_guard/cdk/stepper.d.ts @@ -19,10 +19,10 @@ export declare class CdkStep implements OnChanges { ngOnChanges(): void; reset(): void; select(): void; - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -66,12 +66,12 @@ export declare class CdkStepper implements AfterViewInit, OnDestroy { ngOnDestroy(): void; previous(): void; reset(): void; - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_linear: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_linear: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/cdk/table.d.ts b/tools/public_api_guard/cdk/table.d.ts index 6f4bad60cffb..d6ba8c0ad4c9 100644 --- a/tools/public_api_guard/cdk/table.d.ts +++ b/tools/public_api_guard/cdk/table.d.ts @@ -81,8 +81,8 @@ export declare class CdkColumnDef extends _CdkColumnDefBase implements CanStick headerCell: CdkHeaderCellDef; name: string; stickyEnd: boolean; - static ngAcceptInputType_sticky: boolean | string | null | undefined; - static ngAcceptInputType_stickyEnd: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; + static ngAcceptInputType_stickyEnd: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -108,7 +108,7 @@ export declare class CdkFooterRow { export declare class CdkFooterRowDef extends _CdkFooterRowDefBase implements CanStick, OnChanges { constructor(template: TemplateRef, _differs: IterableDiffers); ngOnChanges(changes: SimpleChanges): void; - static ngAcceptInputType_sticky: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -134,7 +134,7 @@ export declare class CdkHeaderRow { export declare class CdkHeaderRowDef extends _CdkHeaderRowDefBase implements CanStick, OnChanges { constructor(template: TemplateRef, _differs: IterableDiffers); ngOnChanges(changes: SimpleChanges): void; - static ngAcceptInputType_sticky: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -193,7 +193,7 @@ export declare class CdkTable implements AfterContentChecked, CollectionViewe updateStickyColumnStyles(): void; updateStickyFooterRowStyles(): void; updateStickyHeaderRowStyles(): void; - static ngAcceptInputType_multiTemplateDataRows: boolean | string | null | undefined; + static ngAcceptInputType_multiTemplateDataRows: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta, "cdk-table, table[cdk-table]", ["cdkTable"], { 'trackBy': "trackBy", 'dataSource': "dataSource", 'multiTemplateDataRows': "multiTemplateDataRows" }, {}, ["_contentColumnDefs", "_contentRowDefs", "_contentHeaderRowDefs", "_contentFooterRowDefs"]>; static ɵfac: i0.ɵɵFactoryDef>; } diff --git a/tools/public_api_guard/cdk/text-field.d.ts b/tools/public_api_guard/cdk/text-field.d.ts index a7111af720c1..e7b8253eaac7 100644 --- a/tools/public_api_guard/cdk/text-field.d.ts +++ b/tools/public_api_guard/cdk/text-field.d.ts @@ -36,9 +36,9 @@ export declare class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDe ngOnDestroy(): void; reset(): void; resizeToFitContent(force?: boolean): void; - static ngAcceptInputType_enabled: boolean | string | null | undefined; - static ngAcceptInputType_maxRows: number | string | null | undefined; - static ngAcceptInputType_minRows: number | string | null | undefined; + static ngAcceptInputType_enabled: BooleanInput; + static ngAcceptInputType_maxRows: NumberInput; + static ngAcceptInputType_minRows: NumberInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/cdk/tree.d.ts b/tools/public_api_guard/cdk/tree.d.ts index 650fc1354880..4eaf846d99e5 100644 --- a/tools/public_api_guard/cdk/tree.d.ts +++ b/tools/public_api_guard/cdk/tree.d.ts @@ -113,7 +113,7 @@ export declare class CdkTreeNodePadding implements OnDestroy { _paddingIndent(): string | null; _setPadding(forceChange?: boolean): void; ngOnDestroy(): void; - static ngAcceptInputType_level: number | string | null | undefined; + static ngAcceptInputType_level: NumberInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "[cdkTreeNodePadding]", never, { 'level': "cdkTreeNodePadding", 'indent': "cdkTreeNodePaddingIndent" }, {}, never>; static ɵfac: i0.ɵɵFactoryDef>; } @@ -125,7 +125,7 @@ export declare class CdkTreeNodeToggle { recursive: boolean; constructor(_tree: CdkTree, _treeNode: CdkTreeNode); _toggle(event: Event): void; - static ngAcceptInputType_recursive: boolean | string | null | undefined; + static ngAcceptInputType_recursive: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "[cdkTreeNodeToggle]", never, { 'recursive': "cdkTreeNodeToggleRecursive" }, {}, never>; static ɵfac: i0.ɵɵFactoryDef>; } diff --git a/tools/public_api_guard/material/autocomplete.d.ts b/tools/public_api_guard/material/autocomplete.d.ts index 022cb71ce9d1..b5584e8d70d3 100644 --- a/tools/public_api_guard/material/autocomplete.d.ts +++ b/tools/public_api_guard/material/autocomplete.d.ts @@ -46,8 +46,8 @@ export declare class MatAutocomplete extends _MatAutocompleteMixinBase implement _setScrollTop(scrollTop: number): void; _setVisibility(): void; ngAfterContentInit(): void; - static ngAcceptInputType_autoActiveFirstOption: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_autoActiveFirstOption: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -103,7 +103,7 @@ export declare class MatAutocompleteTrigger implements ControlValueAccessor, Aft setDisabledState(isDisabled: boolean): void; updatePosition(): void; writeValue(value: any): void; - static ngAcceptInputType_autocompleteDisabled: boolean | string | null | undefined; + static ngAcceptInputType_autocompleteDisabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/badge.d.ts b/tools/public_api_guard/material/badge.d.ts index 43a66eda9a32..d93670ada662 100644 --- a/tools/public_api_guard/material/badge.d.ts +++ b/tools/public_api_guard/material/badge.d.ts @@ -14,9 +14,9 @@ export declare class MatBadge extends _MatBadgeMixinBase implements OnDestroy, O isAfter(): boolean; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_hidden: boolean | string | null | undefined; - static ngAcceptInputType_overlap: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_hidden: BooleanInput; + static ngAcceptInputType_overlap: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/button-toggle.d.ts b/tools/public_api_guard/material/button-toggle.d.ts index eaf46caf19e8..13dd7b88c479 100644 --- a/tools/public_api_guard/material/button-toggle.d.ts +++ b/tools/public_api_guard/material/button-toggle.d.ts @@ -23,11 +23,11 @@ export declare class MatButtonToggle extends _MatButtonToggleMixinBase implement focus(options?: FocusOptions): void; ngOnDestroy(): void; ngOnInit(): void; - static ngAcceptInputType_checked: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_multiple: boolean | string | null | undefined; - static ngAcceptInputType_vertical: boolean | string | null | undefined; + static ngAcceptInputType_checked: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_multiple: BooleanInput; + static ngAcceptInputType_vertical: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -70,9 +70,9 @@ export declare class MatButtonToggleGroup implements ControlValueAccessor, OnIni registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; writeValue(value: any): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_multiple: boolean | string | null | undefined; - static ngAcceptInputType_vertical: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_multiple: BooleanInput; + static ngAcceptInputType_vertical: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/button.d.ts b/tools/public_api_guard/material/button.d.ts index 428a7f841ad4..9667e2d906a8 100644 --- a/tools/public_api_guard/material/button.d.ts +++ b/tools/public_api_guard/material/button.d.ts @@ -2,8 +2,8 @@ export declare class MatAnchor extends MatButton { tabIndex: number; constructor(focusMonitor: FocusMonitor, elementRef: ElementRef, animationMode: string); _haltDisabledEvents(event: Event): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -19,8 +19,8 @@ export declare class MatButton extends _MatButtonMixinBase implements OnDestroy, _isRippleDisabled(): boolean; focus(origin?: FocusOrigin, options?: FocusOptions): void; ngOnDestroy(): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/checkbox.d.ts b/tools/public_api_guard/material/checkbox.d.ts index 29028ea699ff..19907f69a774 100644 --- a/tools/public_api_guard/material/checkbox.d.ts +++ b/tools/public_api_guard/material/checkbox.d.ts @@ -47,10 +47,10 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements Contro setDisabledState(isDisabled: boolean): void; toggle(): void; writeValue(value: any): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_indeterminate: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_indeterminate: BooleanInput; + static ngAcceptInputType_required: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/chips.d.ts b/tools/public_api_guard/material/chips.d.ts index 8fa649ef8fb5..ee64561a08e7 100644 --- a/tools/public_api_guard/material/chips.d.ts +++ b/tools/public_api_guard/material/chips.d.ts @@ -37,11 +37,11 @@ export declare class MatChip extends _MatChipMixinBase implements FocusableOptio select(): void; selectViaInteraction(): void; toggleSelected(isUserInput?: boolean): boolean; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_removable: boolean | string | null | undefined; - static ngAcceptInputType_selectable: boolean | string | null | undefined; - static ngAcceptInputType_selected: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_removable: BooleanInput; + static ngAcceptInputType_selectable: BooleanInput; + static ngAcceptInputType_selected: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -77,8 +77,8 @@ export declare class MatChipInput implements MatChipTextControl, OnChanges { _onInput(): void; focus(options?: FocusOptions): void; ngOnChanges(): void; - static ngAcceptInputType_addOnBlur: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_addOnBlur: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -151,10 +151,10 @@ export declare class MatChipList extends _MatChipListMixinBase implements MatFor setDescribedByIds(ids: string[]): void; setDisabledState(isDisabled: boolean): void; writeValue(value: any): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_multiple: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_selectable: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_multiple: BooleanInput; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_selectable: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/core.d.ts b/tools/public_api_guard/material/core.d.ts index 701e749db6f7..4e39f0d4e2ee 100644 --- a/tools/public_api_guard/material/core.d.ts +++ b/tools/public_api_guard/material/core.d.ts @@ -242,7 +242,7 @@ export declare class MatNativeDateModule { export declare class MatOptgroup extends _MatOptgroupMixinBase implements CanDisable { _labelId: string; label: string; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -273,7 +273,7 @@ export declare class MatOption implements FocusableOption, AfterViewChecked, OnD select(): void; setActiveStyles(): void; setInactiveStyles(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/datepicker.d.ts b/tools/public_api_guard/material/datepicker.d.ts index cf805dc46806..ab9d4defe69e 100644 --- a/tools/public_api_guard/material/datepicker.d.ts +++ b/tools/public_api_guard/material/datepicker.d.ts @@ -133,8 +133,8 @@ export declare class MatDatepicker implements OnDestroy, CanColor { ngOnDestroy(): void; open(): void; select(date: D): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_touchUi: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_touchUi: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta, "mat-datepicker", ["matDatepicker"], { 'calendarHeaderComponent': "calendarHeaderComponent", 'startAt': "startAt", 'startView': "startView", 'color': "color", 'touchUi': "touchUi", 'disabled': "disabled", 'panelClass': "panelClass", 'dateClass': "dateClass", 'opened': "opened" }, { 'yearSelected': "yearSelected", 'monthSelected': "monthSelected", 'openedStream': "opened", 'closedStream': "closed" }, never>; static ɵfac: i0.ɵɵFactoryDef>; } @@ -184,7 +184,7 @@ export declare class MatDatepickerInput implements ControlValueAccessor, OnDe setDisabledState(isDisabled: boolean): void; validate(c: AbstractControl): ValidationErrors | null; writeValue(value: D): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ngAcceptInputType_value: any; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "input[matDatepicker]", ["matDatepickerInput"], { 'matDatepicker': "matDatepicker", 'matDatepickerFilter': "matDatepickerFilter", 'value': "value", 'min': "min", 'max': "max", 'disabled': "disabled" }, { 'dateChange': "dateChange", 'dateInput': "dateInput" }, never>; static ɵfac: i0.ɵɵFactoryDef>; @@ -234,7 +234,7 @@ export declare class MatDatepickerToggle implements AfterContentInit, OnChang ngAfterContentInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta, "mat-datepicker-toggle", ["matDatepickerToggle"], { 'datepicker': "for", 'tabIndex': "tabIndex", 'disabled': "disabled", 'disableRipple': "disableRipple" }, {}, ["_customIcon"]>; static ɵfac: i0.ɵɵFactoryDef>; } diff --git a/tools/public_api_guard/material/divider.d.ts b/tools/public_api_guard/material/divider.d.ts index c27b72c3d6a4..f0c3ef1e5d1d 100644 --- a/tools/public_api_guard/material/divider.d.ts +++ b/tools/public_api_guard/material/divider.d.ts @@ -1,8 +1,8 @@ export declare class MatDivider { inset: boolean; vertical: boolean; - static ngAcceptInputType_inset: boolean | string | null | undefined; - static ngAcceptInputType_vertical: boolean | string | null | undefined; + static ngAcceptInputType_inset: BooleanInput; + static ngAcceptInputType_vertical: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/expansion.d.ts b/tools/public_api_guard/material/expansion.d.ts index c821eeb58267..92d902169a53 100644 --- a/tools/public_api_guard/material/expansion.d.ts +++ b/tools/public_api_guard/material/expansion.d.ts @@ -12,8 +12,8 @@ export declare class MatAccordion extends CdkAccordion implements MatAccordionBa _handleHeaderFocus(header: MatExpansionPanelHeader): void; _handleHeaderKeydown(event: KeyboardEvent): void; ngAfterContentInit(): void; - static ngAcceptInputType_hideToggle: boolean | string | null | undefined; - static ngAcceptInputType_multi: boolean | string | null | undefined; + static ngAcceptInputType_hideToggle: BooleanInput; + static ngAcceptInputType_multi: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -61,9 +61,9 @@ export declare class MatExpansionPanel extends CdkAccordionItem implements After ngAfterContentInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_expanded: boolean | string | null | undefined; - static ngAcceptInputType_hideToggle: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_expanded: BooleanInput; + static ngAcceptInputType_hideToggle: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/form-field.d.ts b/tools/public_api_guard/material/form-field.d.ts index 0cc63d6a5b43..9652c8c341e8 100644 --- a/tools/public_api_guard/material/form-field.d.ts +++ b/tools/public_api_guard/material/form-field.d.ts @@ -55,7 +55,7 @@ export declare class MatFormField extends _MatFormFieldMixinBase implements Afte ngAfterViewInit(): void; ngOnDestroy(): void; updateOutlineGap(): void; - static ngAcceptInputType_hideRequiredMarker: boolean | string | null | undefined; + static ngAcceptInputType_hideRequiredMarker: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/grid-list.d.ts b/tools/public_api_guard/material/grid-list.d.ts index 97fd4078effa..e96ff3bddee6 100644 --- a/tools/public_api_guard/material/grid-list.d.ts +++ b/tools/public_api_guard/material/grid-list.d.ts @@ -12,7 +12,7 @@ export declare class MatGridList implements MatGridListBase, OnInit, AfterConten _setListStyle(style: [string, string | null] | null): void; ngAfterContentChecked(): void; ngOnInit(): void; - static ngAcceptInputType_cols: number | string | null | undefined; + static ngAcceptInputType_cols: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -30,8 +30,8 @@ export declare class MatGridTile { rowspan: number; constructor(_element: ElementRef, _gridList?: MatGridListBase | undefined); _setStyle(property: string, value: any): void; - static ngAcceptInputType_colspan: number | string | null | undefined; - static ngAcceptInputType_rowspan: number | string | null | undefined; + static ngAcceptInputType_colspan: NumberInput; + static ngAcceptInputType_rowspan: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/icon.d.ts b/tools/public_api_guard/material/icon.d.ts index df0d9bf9e18a..dbb8ac171cab 100644 --- a/tools/public_api_guard/material/icon.d.ts +++ b/tools/public_api_guard/material/icon.d.ts @@ -33,7 +33,7 @@ export declare class MatIcon extends _MatIconMixinBase implements OnChanges, OnI ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; ngOnInit(): void; - static ngAcceptInputType_inline: boolean | string | null | undefined; + static ngAcceptInputType_inline: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/input.d.ts b/tools/public_api_guard/material/input.d.ts index cbb663e885ae..13f907211b98 100644 --- a/tools/public_api_guard/material/input.d.ts +++ b/tools/public_api_guard/material/input.d.ts @@ -48,9 +48,9 @@ export declare class MatInput extends _MatInputMixinBase implements MatFormField ngOnInit(): void; onContainerClick(): void; setDescribedByIds(ids: string[]): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_readonly: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_readonly: BooleanInput; + static ngAcceptInputType_required: BooleanInput; static ngAcceptInputType_value: any; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; @@ -66,9 +66,9 @@ export declare class MatTextareaAutosize extends CdkTextareaAutosize { matAutosizeMaxRows: number; matAutosizeMinRows: number; matTextareaAutosize: boolean; - static ngAcceptInputType_enabled: boolean | string | null | undefined; - static ngAcceptInputType_maxRows: number | string | null | undefined; - static ngAcceptInputType_minRows: number | string | null | undefined; + static ngAcceptInputType_enabled: BooleanInput; + static ngAcceptInputType_maxRows: NumberInput; + static ngAcceptInputType_minRows: NumberInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/list.d.ts b/tools/public_api_guard/material/list.d.ts index dc6fa792dbda..74d94a9c026e 100644 --- a/tools/public_api_guard/material/list.d.ts +++ b/tools/public_api_guard/material/list.d.ts @@ -6,7 +6,7 @@ export declare class MatList extends _MatListMixinBase implements CanDisableRipp _getListType(): 'list' | 'action-list' | null; ngOnChanges(): void; ngOnDestroy(): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -30,7 +30,7 @@ export declare class MatListItem extends _MatListItemMixinBase implements AfterC _isRippleDisabled(): boolean; ngAfterContentInit(): void; ngOnDestroy(): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -66,9 +66,9 @@ export declare class MatListOption extends _MatListOptionMixinBase implements Af ngOnDestroy(): void; ngOnInit(): void; toggle(): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_selected: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_selected: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -82,7 +82,7 @@ export declare class MatNavList extends _MatListMixinBase implements CanDisableR _stateChanges: Subject; ngOnChanges(): void; ngOnDestroy(): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -114,8 +114,8 @@ export declare class MatSelectionList extends _MatSelectionListMixinBase impleme selectAll(): void; setDisabledState(isDisabled: boolean): void; writeValue(values: string[]): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/menu.d.ts b/tools/public_api_guard/material/menu.d.ts index b3e4a75fb345..05ffd29a9d7a 100644 --- a/tools/public_api_guard/material/menu.d.ts +++ b/tools/public_api_guard/material/menu.d.ts @@ -1,7 +1,7 @@ export declare class _MatMenu extends MatMenu { constructor(elementRef: ElementRef, ngZone: NgZone, defaultOptions: MatMenuDefaultOptions); - static ngAcceptInputType_hasBackdrop: boolean | string | null | undefined; - static ngAcceptInputType_overlapTrigger: boolean | string | null | undefined; + static ngAcceptInputType_hasBackdrop: BooleanInput; + static ngAcceptInputType_overlapTrigger: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta<_MatMenu, "mat-menu", ["matMenu"], {}, {}, never>; static ɵfac: i0.ɵɵFactoryDef<_MatMenu>; } @@ -105,8 +105,8 @@ export declare class MatMenuItem extends _MatMenuItemMixinBase implements Focusa focus(origin?: FocusOrigin, options?: FocusOptions): void; getLabel(): string; ngOnDestroy(): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/paginator.d.ts b/tools/public_api_guard/material/paginator.d.ts index 8a017e3fa28d..c7d8cba6f1d8 100644 --- a/tools/public_api_guard/material/paginator.d.ts +++ b/tools/public_api_guard/material/paginator.d.ts @@ -30,12 +30,12 @@ export declare class MatPaginator extends _MatPaginatorBase implements OnInit, O ngOnDestroy(): void; ngOnInit(): void; previousPage(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_hidePageSize: boolean | string | null | undefined; - static ngAcceptInputType_length: number | string | null | undefined; - static ngAcceptInputType_pageIndex: number | string | null | undefined; - static ngAcceptInputType_pageSize: number | string | null | undefined; - static ngAcceptInputType_showFirstLastButtons: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_hidePageSize: BooleanInput; + static ngAcceptInputType_length: NumberInput; + static ngAcceptInputType_pageIndex: NumberInput; + static ngAcceptInputType_pageSize: NumberInput; + static ngAcceptInputType_showFirstLastButtons: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/progress-bar.d.ts b/tools/public_api_guard/material/progress-bar.d.ts index 70e0b62526af..143e1193a615 100644 --- a/tools/public_api_guard/material/progress-bar.d.ts +++ b/tools/public_api_guard/material/progress-bar.d.ts @@ -23,7 +23,7 @@ export declare class MatProgressBar extends _MatProgressBarMixinBase implements }; ngAfterViewInit(): void; ngOnDestroy(): void; - static ngAcceptInputType_value: number | string | null | undefined; + static ngAcceptInputType_value: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/progress-spinner.d.ts b/tools/public_api_guard/material/progress-spinner.d.ts index 13461866d609..011bfe018866 100644 --- a/tools/public_api_guard/material/progress-spinner.d.ts +++ b/tools/public_api_guard/material/progress-spinner.d.ts @@ -16,9 +16,9 @@ export declare class MatProgressSpinner extends _MatProgressSpinnerMixinBase imp value: number; constructor(_elementRef: ElementRef, platform: Platform, _document: any, animationMode: string, defaults?: MatProgressSpinnerDefaultOptions); ngOnInit(): void; - static ngAcceptInputType_diameter: number | string | null | undefined; - static ngAcceptInputType_strokeWidth: number | string | null | undefined; - static ngAcceptInputType_value: number | string | null | undefined; + static ngAcceptInputType_diameter: NumberInput; + static ngAcceptInputType_strokeWidth: NumberInput; + static ngAcceptInputType_value: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -36,9 +36,9 @@ export declare class MatProgressSpinnerModule { export declare class MatSpinner extends MatProgressSpinner { constructor(elementRef: ElementRef, platform: Platform, document: any, animationMode: string, defaults?: MatProgressSpinnerDefaultOptions); - static ngAcceptInputType_diameter: number | string | null | undefined; - static ngAcceptInputType_strokeWidth: number | string | null | undefined; - static ngAcceptInputType_value: number | string | null | undefined; + static ngAcceptInputType_diameter: NumberInput; + static ngAcceptInputType_strokeWidth: NumberInput; + static ngAcceptInputType_value: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/radio.d.ts b/tools/public_api_guard/material/radio.d.ts index 0578c1cc0a6f..397d759728e2 100644 --- a/tools/public_api_guard/material/radio.d.ts +++ b/tools/public_api_guard/material/radio.d.ts @@ -30,10 +30,10 @@ export declare class MatRadioButton extends _MatRadioButtonMixinBase implements ngAfterViewInit(): void; ngOnDestroy(): void; ngOnInit(): void; - static ngAcceptInputType_checked: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; + static ngAcceptInputType_checked: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_required: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -72,8 +72,8 @@ export declare class MatRadioGroup implements AfterContentInit, ControlValueAcce registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; writeValue(value: any): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_required: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/select.d.ts b/tools/public_api_guard/material/select.d.ts index 0acca81e9d6e..233045f2d59c 100644 --- a/tools/public_api_guard/material/select.d.ts +++ b/tools/public_api_guard/material/select.d.ts @@ -83,12 +83,12 @@ export declare class MatSelect extends _MatSelectMixinBase implements AfterConte setDisabledState(isDisabled: boolean): void; toggle(): void; writeValue(value: any): void; - static ngAcceptInputType_disableOptionCentering: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_multiple: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; - static ngAcceptInputType_typeaheadDebounceInterval: number | string | null | undefined; + static ngAcceptInputType_disableOptionCentering: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_multiple: BooleanInput; + static ngAcceptInputType_required: BooleanInput; + static ngAcceptInputType_typeaheadDebounceInterval: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/sidenav.d.ts b/tools/public_api_guard/material/sidenav.d.ts index 8301df013301..bb81a8907070 100644 --- a/tools/public_api_guard/material/sidenav.d.ts +++ b/tools/public_api_guard/material/sidenav.d.ts @@ -31,9 +31,9 @@ export declare class MatDrawer implements AfterContentInit, AfterContentChecked, ngOnDestroy(): void; open(openedVia?: FocusOrigin): Promise; toggle(isOpen?: boolean, openedVia?: FocusOrigin): Promise; - static ngAcceptInputType_autoFocus: boolean | string | null | undefined; - static ngAcceptInputType_disableClose: boolean | string | null | undefined; - static ngAcceptInputType_opened: boolean | string | null | undefined; + static ngAcceptInputType_autoFocus: BooleanInput; + static ngAcceptInputType_disableClose: BooleanInput; + static ngAcceptInputType_opened: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -72,8 +72,8 @@ export declare class MatDrawerContainer implements AfterContentInit, DoCheck, On ngOnDestroy(): void; open(): void; updateContentMargins(): void; - static ngAcceptInputType_autosize: boolean | string | null | undefined; - static ngAcceptInputType_hasBackdrop: boolean | string | null | undefined; + static ngAcceptInputType_autosize: BooleanInput; + static ngAcceptInputType_hasBackdrop: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -94,12 +94,12 @@ export declare class MatSidenav extends MatDrawer { fixedBottomGap: number; fixedInViewport: boolean; fixedTopGap: number; - static ngAcceptInputType_autoFocus: boolean | string | null | undefined; - static ngAcceptInputType_disableClose: boolean | string | null | undefined; - static ngAcceptInputType_fixedBottomGap: number | string | null | undefined; - static ngAcceptInputType_fixedInViewport: boolean | string | null | undefined; - static ngAcceptInputType_fixedTopGap: number | string | null | undefined; - static ngAcceptInputType_opened: boolean | string | null | undefined; + static ngAcceptInputType_autoFocus: BooleanInput; + static ngAcceptInputType_disableClose: BooleanInput; + static ngAcceptInputType_fixedBottomGap: NumberInput; + static ngAcceptInputType_fixedInViewport: BooleanInput; + static ngAcceptInputType_fixedTopGap: NumberInput; + static ngAcceptInputType_opened: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -107,8 +107,8 @@ export declare class MatSidenav extends MatDrawer { export declare class MatSidenavContainer extends MatDrawerContainer { _allDrawers: QueryList; _content: MatSidenavContent; - static ngAcceptInputType_autosize: boolean | string | null | undefined; - static ngAcceptInputType_hasBackdrop: boolean | string | null | undefined; + static ngAcceptInputType_autosize: BooleanInput; + static ngAcceptInputType_hasBackdrop: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/slide-toggle.d.ts b/tools/public_api_guard/material/slide-toggle.d.ts index 6d8c950d610d..d2371a34e8b3 100644 --- a/tools/public_api_guard/material/slide-toggle.d.ts +++ b/tools/public_api_guard/material/slide-toggle.d.ts @@ -39,10 +39,10 @@ export declare class MatSlideToggle extends _MatSlideToggleMixinBase implements setDisabledState(isDisabled: boolean): void; toggle(): void; writeValue(value: any): void; - static ngAcceptInputType_checked: boolean | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_required: boolean | string | null | undefined; + static ngAcceptInputType_checked: BooleanInput; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_required: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/slider.d.ts b/tools/public_api_guard/material/slider.d.ts index 1b9a5db8afa5..5a6e6bb56300 100644 --- a/tools/public_api_guard/material/slider.d.ts +++ b/tools/public_api_guard/material/slider.d.ts @@ -52,15 +52,15 @@ export declare class MatSlider extends _MatSliderMixinBase implements ControlVal registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; writeValue(value: any): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_invert: boolean | string | null | undefined; - static ngAcceptInputType_max: number | string | null | undefined; - static ngAcceptInputType_min: number | string | null | undefined; - static ngAcceptInputType_step: number | string | null | undefined; - static ngAcceptInputType_thumbLabel: boolean | string | null | undefined; - static ngAcceptInputType_tickInterval: number | string | null | undefined; - static ngAcceptInputType_value: number | string | null | undefined; - static ngAcceptInputType_vertical: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_invert: BooleanInput; + static ngAcceptInputType_max: NumberInput; + static ngAcceptInputType_min: NumberInput; + static ngAcceptInputType_step: NumberInput; + static ngAcceptInputType_thumbLabel: BooleanInput; + static ngAcceptInputType_tickInterval: NumberInput; + static ngAcceptInputType_value: NumberInput; + static ngAcceptInputType_vertical: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/sort.d.ts b/tools/public_api_guard/material/sort.d.ts index 24b5dfde271d..362c04885c7e 100644 --- a/tools/public_api_guard/material/sort.d.ts +++ b/tools/public_api_guard/material/sort.d.ts @@ -28,8 +28,8 @@ export declare class MatSort extends _MatSortMixinBase implements CanDisable, Ha ngOnInit(): void; register(sortable: MatSortable): void; sort(sortable: MatSortable): void; - static ngAcceptInputType_disableClear: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disableClear: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -75,8 +75,8 @@ export declare class MatSortHeader extends _MatSortHeaderMixinBase implements Ca _updateArrowDirection(): void; ngOnDestroy(): void; ngOnInit(): void; - static ngAcceptInputType_disableClear: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disableClear: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/stepper.d.ts b/tools/public_api_guard/material/stepper.d.ts index b8c150ffd0bc..ef515b442d22 100644 --- a/tools/public_api_guard/material/stepper.d.ts +++ b/tools/public_api_guard/material/stepper.d.ts @@ -8,12 +8,12 @@ export declare function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl: MatStepper export declare class MatHorizontalStepper extends MatStepper { labelPosition: 'bottom' | 'end'; - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_linear: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_linear: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -22,10 +22,10 @@ export declare class MatStep extends CdkStep implements ErrorStateMatcher { stepLabel: MatStepLabel; constructor(stepper: MatStepper, _errorStateMatcher: ErrorStateMatcher, stepperOptions?: StepperOptions); isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean; - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -71,12 +71,12 @@ export declare class MatStepper extends CdkStepper implements AfterContentInit { readonly animationDone: EventEmitter; disableRipple: boolean; ngAfterContentInit(): void; - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_linear: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_linear: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -124,12 +124,12 @@ export declare class MatStepperPrevious extends CdkStepperPrevious { export declare class MatVerticalStepper extends MatStepper { constructor(dir: Directionality, changeDetectorRef: ChangeDetectorRef, elementRef?: ElementRef, _document?: any); - static ngAcceptInputType_completed: boolean | string | null | undefined; - static ngAcceptInputType_editable: boolean | string | null | undefined; - static ngAcceptInputType_hasError: boolean | string | null | undefined; - static ngAcceptInputType_linear: boolean | string | null | undefined; - static ngAcceptInputType_optional: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_completed: BooleanInput; + static ngAcceptInputType_editable: BooleanInput; + static ngAcceptInputType_hasError: BooleanInput; + static ngAcceptInputType_linear: BooleanInput; + static ngAcceptInputType_optional: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/table.d.ts b/tools/public_api_guard/material/table.d.ts index 9db8052bfd77..2719bdfe909f 100644 --- a/tools/public_api_guard/material/table.d.ts +++ b/tools/public_api_guard/material/table.d.ts @@ -11,8 +11,8 @@ export declare class MatCellDef extends CdkCellDef { export declare class MatColumnDef extends CdkColumnDef { name: string; - static ngAcceptInputType_sticky: boolean | string | null | undefined; - static ngAcceptInputType_stickyEnd: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; + static ngAcceptInputType_stickyEnd: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -34,7 +34,7 @@ export declare class MatFooterRow extends CdkFooterRow { } export declare class MatFooterRowDef extends CdkFooterRowDef { - static ngAcceptInputType_sticky: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -56,7 +56,7 @@ export declare class MatHeaderRow extends CdkHeaderRow { } export declare class MatHeaderRowDef extends CdkHeaderRowDef { - static ngAcceptInputType_sticky: boolean | string | null | undefined; + static ngAcceptInputType_sticky: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -73,7 +73,7 @@ export declare class MatRowDef extends CdkRowDef { export declare class MatTable extends CdkTable { protected stickyCssClass: string; - static ngAcceptInputType_multiTemplateDataRows: boolean | string | null | undefined; + static ngAcceptInputType_multiTemplateDataRows: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta, "mat-table, table[mat-table]", ["matTable"], {}, {}, never>; static ɵfac: i0.ɵɵFactoryDef>; } diff --git a/tools/public_api_guard/material/tabs.d.ts b/tools/public_api_guard/material/tabs.d.ts index cf996e5a8aca..be4f181317be 100644 --- a/tools/public_api_guard/material/tabs.d.ts +++ b/tools/public_api_guard/material/tabs.d.ts @@ -131,7 +131,7 @@ export declare class MatTab extends _MatTabMixinBase implements OnInit, CanDisab ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; ngOnInit(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -173,10 +173,10 @@ export declare class MatTabGroup extends _MatTabGroupBase { _tabBodyWrapper: ElementRef; _tabHeader: MatTabGroupBaseHeader; constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, defaultConfig?: MatTabsConfig, animationMode?: string); - static ngAcceptInputType_animationDuration: number | string | null | undefined; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_dynamicHeight: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_animationDuration: NumberInput; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_dynamicHeight: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -189,8 +189,8 @@ export declare class MatTabHeader extends _MatTabHeaderBase { _tabList: ElementRef; _tabListContainer: ElementRef; constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, viewportRuler: ViewportRuler, dir: Directionality, ngZone: NgZone, platform: Platform, animationMode?: string); - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -208,7 +208,7 @@ export declare class MatTabLabelWrapper extends _MatTabLabelWrapperMixinBase imp focus(): void; getOffsetLeft(): number; getOffsetWidth(): number; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -216,8 +216,8 @@ export declare class MatTabLabelWrapper extends _MatTabLabelWrapperMixinBase imp export declare class MatTabLink extends _MatTabLinkBase implements OnDestroy { constructor(tabNavBar: MatTabNav, elementRef: ElementRef, ngZone: NgZone, platform: Platform, globalRippleOptions: RippleGlobalOptions | null, tabIndex: string, focusMonitor: FocusMonitor, animationMode?: string); ngOnDestroy(): void; - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } @@ -231,8 +231,8 @@ export declare class MatTabNav extends _MatTabNavBase { _tabListContainer: ElementRef; constructor(elementRef: ElementRef, dir: Directionality, ngZone: NgZone, changeDetectorRef: ChangeDetectorRef, viewportRuler: ViewportRuler, platform?: Platform, animationMode?: string); - static ngAcceptInputType_disableRipple: boolean | string | null | undefined; - static ngAcceptInputType_selectedIndex: number | string | null | undefined; + static ngAcceptInputType_disableRipple: BooleanInput; + static ngAcceptInputType_selectedIndex: NumberInput; static ɵcmp: i0.ɵɵComponentDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/tooltip.d.ts b/tools/public_api_guard/material/tooltip.d.ts index a5b6cf555da8..22014a729205 100644 --- a/tools/public_api_guard/material/tooltip.d.ts +++ b/tools/public_api_guard/material/tooltip.d.ts @@ -42,9 +42,9 @@ export declare class MatTooltip implements OnDestroy, OnInit { ngOnInit(): void; show(delay?: number): void; toggle(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; - static ngAcceptInputType_hideDelay: number | string | null | undefined; - static ngAcceptInputType_showDelay: number | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; + static ngAcceptInputType_hideDelay: NumberInput; + static ngAcceptInputType_showDelay: NumberInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta; static ɵfac: i0.ɵɵFactoryDef; } diff --git a/tools/public_api_guard/material/tree.d.ts b/tools/public_api_guard/material/tree.d.ts index 75674f88c2bd..e3959752094f 100644 --- a/tools/public_api_guard/material/tree.d.ts +++ b/tools/public_api_guard/material/tree.d.ts @@ -8,7 +8,7 @@ export declare class MatNestedTreeNode extends CdkNestedTreeNode implement constructor(_elementRef: ElementRef, _tree: CdkTree, _differs: IterableDiffers, tabIndex: string); ngAfterContentInit(): void; ngOnDestroy(): void; - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "mat-nested-tree-node", ["matNestedTreeNode"], { 'node': "matNestedTreeNode", 'disabled': "disabled", 'tabIndex': "tabIndex" }, {}, never>; static ɵfac: i0.ɵɵFactoryDef>; } @@ -58,7 +58,7 @@ export declare class MatTreeNode extends _MatTreeNodeMixinBase implements protected _tree: CdkTree; role: 'treeitem' | 'group'; constructor(_elementRef: ElementRef, _tree: CdkTree, tabIndex: string); - static ngAcceptInputType_disabled: boolean | string | null | undefined; + static ngAcceptInputType_disabled: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "mat-tree-node", ["matTreeNode"], { 'disabled': "disabled", 'tabIndex': "tabIndex", 'role': "role" }, {}, never>; static ɵfac: i0.ɵɵFactoryDef>; } @@ -80,14 +80,14 @@ export declare class MatTreeNodeOutlet implements CdkTreeNodeOutlet { export declare class MatTreeNodePadding extends CdkTreeNodePadding { indent: number; level: number; - static ngAcceptInputType_level: number | string | null | undefined; + static ngAcceptInputType_level: NumberInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "[matTreeNodePadding]", never, { 'level': "matTreeNodePadding", 'indent': "matTreeNodePaddingIndent" }, {}, never>; static ɵfac: i0.ɵɵFactoryDef>; } export declare class MatTreeNodeToggle extends CdkTreeNodeToggle { recursive: boolean; - static ngAcceptInputType_recursive: boolean | string | null | undefined; + static ngAcceptInputType_recursive: BooleanInput; static ɵdir: i0.ɵɵDirectiveDefWithMeta, "[matTreeNodeToggle]", never, { 'recursive': "matTreeNodeToggleRecursive" }, {}, never>; static ɵfac: i0.ɵɵFactoryDef>; } diff --git a/tools/tslint-rules/coercionTypesRule.ts b/tools/tslint-rules/coercionTypesRule.ts index 30a26c833f7a..e2dbae1811cc 100644 --- a/tools/tslint-rules/coercionTypesRule.ts +++ b/tools/tslint-rules/coercionTypesRule.ts @@ -61,9 +61,19 @@ class Walker extends Lint.RuleWalker { if (node.type.kind === ts.SyntaxKind.AnyKeyword) { // if the type is "any", then it can be "null" and "undefined" too. return; + } else if ( + ts.isTypeReferenceNode(node.type) && ts.isIdentifier(node.type.typeName) && + (node.type.typeName.text === 'BooleanInput' || node.type.typeName.text === 'NumberInput')) { + // if the type is "BooleanInput" or "NumberInput", we don't need to check more. Ideally, + // we'd not have any of these hardcoded checks at all, and just rely on type assignability + // checks, but this is only programmatically possible with TypeScript 3.7. See: + // https://github.com/microsoft/TypeScript/issues/9879 + return; } else if (!ts.isUnionTypeNode(node.type)) { - this.addFailureAtNode(node, 'Acceptance member does not have an union type. The member ' + - 'should use an union type to also accept "null" and "undefined".'); + this.addFailureAtNode( + node, + 'Acceptance member does not have an union type. The member ' + + 'should use an union type to also accept "null" and "undefined".'); return; } @@ -78,14 +88,17 @@ class Walker extends Lint.RuleWalker { } if (!hasNull && !hasUndefined) { - this.addFailureAtNode(node, 'Acceptance member has to accept "null" and "undefined".', + this.addFailureAtNode( + node, 'Acceptance member has to accept "null" and "undefined".', this.appendText(node.type.getEnd(), ' | null | undefined')); } else if (!hasNull) { - this.addFailureAtNode(node, 'Acceptance member has to accept "null".', - this.appendText(node.type.getEnd(), ' | null')); + this.addFailureAtNode( + node, 'Acceptance member has to accept "null".', + this.appendText(node.type.getEnd(), ' | null')); } else if (!hasUndefined) { - this.addFailureAtNode(node, 'Acceptance member has to accept "undefined".', - this.appendText(node.type.getEnd(), ' | undefined')); + this.addFailureAtNode( + node, 'Acceptance member has to accept "undefined".', + this.appendText(node.type.getEnd(), ' | undefined')); } }