Skip to content

refactor: allow coercion inputs to work with async pipe #17640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,6 @@ export class CdkAutoSizeVirtualScroll implements OnChanges {
this._scrollStrategy.updateBufferSize(this.minBufferPx, this.maxBufferPx);
}

static ngAcceptInputType_minBufferPx: number | string;
static ngAcceptInputType_maxBufferPx: number | string;
static ngAcceptInputType_minBufferPx: number | string | null | undefined;
static ngAcceptInputType_maxBufferPx: number | string | null | undefined;
}
4 changes: 2 additions & 2 deletions src/cdk/a11y/focus-trap/focus-trap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,6 @@ export class CdkTrapFocus implements OnDestroy, AfterContentInit, DoCheck {
}
}

static ngAcceptInputType_enabled: boolean | string;
static ngAcceptInputType_autoCapture: boolean | string;
static ngAcceptInputType_enabled: boolean | string | null | undefined;
static ngAcceptInputType_autoCapture: boolean | string | null | undefined;
}
4 changes: 2 additions & 2 deletions src/cdk/accordion/accordion-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,6 @@ export class CdkAccordionItem implements OnDestroy {
});
}

static ngAcceptInputType_expanded: boolean | string;
static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_expanded: boolean | string | null | undefined;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
}
2 changes: 1 addition & 1 deletion src/cdk/accordion/accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ export class CdkAccordion implements OnDestroy, OnChanges {
}
}

static ngAcceptInputType_multi: boolean | string;
static ngAcceptInputType_multi: boolean | string | null | undefined;
}
2 changes: 1 addition & 1 deletion src/cdk/drag-drop/directives/drag-handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ export class CdkDragHandle implements OnDestroy {
this._stateChanges.complete();
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
}
2 changes: 1 addition & 1 deletion src/cdk/drag-drop/directives/drag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {
});
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
}

/** Gets the closest ancestor of an element that matches a selector. */
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/drag-drop/directives/drop-list-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ export class CdkDropListGroup<T> implements OnDestroy {
this._items.clear();
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
}
6 changes: 3 additions & 3 deletions src/cdk/drag-drop/directives/drop-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export class CdkDropList<T = any> implements AfterContentInit, OnDestroy {
});
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_sortingDisabled: boolean | string;
static ngAcceptInputType_autoScrollDisabled: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_sortingDisabled: boolean | string | null | undefined;
static ngAcceptInputType_autoScrollDisabled: boolean | string | null | undefined;
}
4 changes: 2 additions & 2 deletions src/cdk/observers/observe-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ export class CdkObserveContent implements AfterContentInit, OnDestroy {
}
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_debounce: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_debounce: boolean | string | null | undefined;
}


Expand Down
10 changes: 5 additions & 5 deletions src/cdk/overlay/overlay-directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,11 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges {
this._backdropSubscription.unsubscribe();
}

static ngAcceptInputType_hasBackdrop: boolean | string;
static ngAcceptInputType_lockPosition: boolean | string;
static ngAcceptInputType_flexibleDimensions: boolean | string;
static ngAcceptInputType_growAfterOpen: boolean | string;
static ngAcceptInputType_push: boolean | string;
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;
}


Expand Down
6 changes: 3 additions & 3 deletions src/cdk/scrolling/fixed-size-virtual-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export class CdkFixedSizeVirtualScroll implements OnChanges {
this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);
}

static ngAcceptInputType_itemSize: string | number;
static ngAcceptInputType_minBufferPx: string | number;
static ngAcceptInputType_maxBufferPx: string | number;
static ngAcceptInputType_itemSize: string | number | null | undefined;
static ngAcceptInputType_minBufferPx: string | number | null | undefined;
static ngAcceptInputType_maxBufferPx: string | number | null | undefined;
}
20 changes: 10 additions & 10 deletions src/cdk/stepper/stepper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ export class CdkStep implements OnChanges {
this._stepper._stateChanged();
}

static ngAcceptInputType_editable: boolean | string;
static ngAcceptInputType_hasError: boolean | string;
static ngAcceptInputType_optional: boolean | string;
static ngAcceptInputType_completed: boolean | string;
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;
}

@Directive({
Expand Down Expand Up @@ -524,12 +524,12 @@ export class CdkStepper implements AfterViewInit, OnDestroy {
return stepperElement === focusedElement || stepperElement.contains(focusedElement);
}

static ngAcceptInputType_editable: boolean | string;
static ngAcceptInputType_optional: boolean | string;
static ngAcceptInputType_completed: boolean | string;
static ngAcceptInputType_hasError: boolean | string;
static ngAcceptInputType_linear: boolean | string;
static ngAcceptInputType_selectedIndex: number | string;
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;
}


Expand Down
4 changes: 2 additions & 2 deletions src/cdk/table/cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ export class CdkColumnDef extends _CdkColumnDefBase implements CanStick {
*/
cssClassFriendlyName: string;

static ngAcceptInputType_sticky: boolean | string;
static ngAcceptInputType_stickyEnd: boolean | string;
static ngAcceptInputType_sticky: boolean | string | null | undefined;
static ngAcceptInputType_stickyEnd: boolean | string | null | undefined;
}

/** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */
Expand Down
4 changes: 2 additions & 2 deletions src/cdk/table/row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class CdkHeaderRowDef extends _CdkHeaderRowDefBase implements CanStick, O
super.ngOnChanges(changes);
}

static ngAcceptInputType_sticky: boolean | string;
static ngAcceptInputType_sticky: boolean | string | null | undefined;
}

// Boilerplate for applying mixins to CdkFooterRowDef.
Expand Down Expand Up @@ -128,7 +128,7 @@ export class CdkFooterRowDef extends _CdkFooterRowDefBase implements CanStick, O
super.ngOnChanges(changes);
}

static ngAcceptInputType_sticky: boolean | string;
static ngAcceptInputType_sticky: boolean | string | null | undefined;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDes
});
}

static ngAcceptInputType_multiTemplateDataRows: boolean | string;
static ngAcceptInputType_multiTemplateDataRows: boolean | string | null | undefined;
}

/** Utility function that gets a merged list of the entries in a QueryList and values of a Set. */
Expand Down
6 changes: 3 additions & 3 deletions src/cdk/text-field/autosize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {
}
}

static ngAcceptInputType_minRows: number | string;
static ngAcceptInputType_maxRows: number | string;
static ngAcceptInputType_enabled: boolean | string;
static ngAcceptInputType_minRows: number | string | null | undefined;
static ngAcceptInputType_maxRows: number | string | null | undefined;
static ngAcceptInputType_enabled: boolean | string | null | undefined;
}
2 changes: 1 addition & 1 deletion src/cdk/tree/padding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,5 @@ export class CdkTreeNodePadding<T> implements OnDestroy {
}
}

static ngAcceptInputType_level: number | string;
static ngAcceptInputType_level: number | string | null | undefined;
}
2 changes: 1 addition & 1 deletion src/cdk/tree/toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ export class CdkTreeNodeToggle<T> {
event.stopPropagation();
}

static ngAcceptInputType_recursive: boolean | string;
static ngAcceptInputType_recursive: boolean | string | null | undefined;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ export class CustomStepper extends CdkStepper {
// These properties are required so that the Ivy template type checker in strict mode knows
// what kind of values are accepted by the `linear` and `selectedIndex` inputs which
// are inherited from `CdkStepper`.
static ngAcceptInputType_linear: boolean | string;
static ngAcceptInputType_selectedIndex: number | string;
static ngAcceptInputType_linear: boolean | string | null | undefined;
static ngAcceptInputType_selectedIndex: number | string | null | undefined;
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,6 @@ export class MyTelInput implements ControlValueAccessor, MatFormFieldControl<MyT
this.onChange(this.parts.value);
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_required: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_required: boolean | string | null | undefined;
}
2 changes: 1 addition & 1 deletion src/dev-app/example/example-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ export class ExampleList {

exampleComponents = EXAMPLE_COMPONENTS;

static ngAcceptInputType_expandAll: boolean | string;
static ngAcceptInputType_expandAll: boolean | string | null | undefined;
}
2 changes: 1 addition & 1 deletion src/dev-app/example/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
static ngAcceptInputType_showLabel: boolean | string | null | undefined;
}
8 changes: 4 additions & 4 deletions src/material-experimental/mdc-button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export class MatButton extends MatButtonBase {
super(elementRef, platform, ngZone, animationMode);
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disableRipple: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_disableRipple: boolean | string | null | undefined;
}

/**
Expand Down Expand Up @@ -87,6 +87,6 @@ export class MatAnchor extends MatAnchorBase {
super(elementRef, platform, ngZone, animationMode);
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disableRipple: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_disableRipple: boolean | string | null | undefined;
}
8 changes: 4 additions & 4 deletions src/material-experimental/mdc-button/fab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export class MatFabButton extends MatButtonBase {
super(elementRef, platform, ngZone, animationMode);
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disableRipple: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_disableRipple: boolean | string | null | undefined;
}


Expand Down Expand Up @@ -87,6 +87,6 @@ export class MatFabAnchor extends MatAnchor {
super(elementRef, platform, ngZone, animationMode);
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disableRipple: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_disableRipple: boolean | string | null | undefined;
}
8 changes: 4 additions & 4 deletions src/material-experimental/mdc-button/icon-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export class MatIconButton extends MatButtonBase {
super(elementRef, platform, ngZone, animationMode);
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disableRipple: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_disableRipple: boolean | string | null | undefined;
}

/**
Expand Down Expand Up @@ -81,6 +81,6 @@ export class MatIconAnchor extends MatAnchorBase {
super(elementRef, platform, ngZone, animationMode);
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disableRipple: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_disableRipple: boolean | string | null | undefined;
}
10 changes: 5 additions & 5 deletions src/material-experimental/mdc-checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ export class MatCheckbox implements AfterViewInit, OnDestroy, ControlValueAccess
this._changeDetectorRef.markForCheck();
}

static ngAcceptInputType_checked: boolean | string;
static ngAcceptInputType_indeterminate: boolean | string;
static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_required: boolean | string;
static ngAcceptInputType_disableRipple: boolean | string;
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;
}
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-chips/chip-grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,6 @@ export class MatChipGrid extends _MatChipGridMixinBase implements AfterContentIn
return false;
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_required: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
static ngAcceptInputType_required: boolean | string | null | undefined;
}
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-chips/chip-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,5 @@ export class MatChipRemove extends _MatChipRemoveMixinBase implements CanDisable
super(_elementRef);
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
}
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-chips/chip-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_addOnBlur: boolean | string | null | undefined;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
}
8 changes: 4 additions & 4 deletions src/material-experimental/mdc-chips/chip-listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,9 @@ export class MatChipListbox extends MatChipSet implements AfterContentInit, Cont
this._lastDestroyedChipIndex = null;
}

static ngAcceptInputType_multiple: boolean | string;
static ngAcceptInputType_selectable: boolean | string;
static ngAcceptInputType_required: boolean | string;
static ngAcceptInputType_disabled: boolean | string;
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;
}

12 changes: 6 additions & 6 deletions src/material-experimental/mdc-chips/chip-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ export class MatChipOption extends MatChip {
}
}

static ngAcceptInputType_selectable: boolean | string;
static ngAcceptInputType_selected: boolean | string;
static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_removable: boolean | string;
static ngAcceptInputType_highlighted: boolean | string;
static ngAcceptInputType_disableRipple: boolean | string;
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;
}
8 changes: 4 additions & 4 deletions src/material-experimental/mdc-chips/chip-row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ export class MatChipRow extends MatChip implements AfterContentInit, AfterViewIn
}
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_removable: boolean | string;
static ngAcceptInputType_highlighted: boolean | string;
static ngAcceptInputType_disableRipple: boolean | string;
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;
}
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-chips/chip-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,6 @@ export class MatChipSet extends _MatChipSetMixinBase implements AfterContentInit
return false;
}

static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_disabled: boolean | string | null | undefined;
}

Loading