Skip to content

Commit 35430ff

Browse files
committed
refactor: add workaround for strict metadata emit of coercion static members
See: angular/angular#33451
1 parent fc51dcc commit 35430ff

File tree

91 files changed

+112
-23
lines changed

Some content is hidden

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

91 files changed

+112
-23
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ export function _autoSizeVirtualScrollStrategyFactory(autoSizeDir: CdkAutoSizeVi
427427
}
428428

429429

430+
/** @dynamic Needed for "ngAcceptInputType" members. */
430431
/** A virtual scroll strategy that supports unknown or dynamic size items. */
431432
@Directive({
432433
selector: 'cdk-virtual-scroll-viewport[autosize]',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ export class FocusTrapFactory {
356356
}
357357
}
358358

359+
/** @dynamic Needed for "ngAcceptInputType" members. */
359360
/** Directive for trapping focus within a region. */
360361
@Directive({
361362
selector: '[cdkTrapFocus]',

src/cdk/accordion/accordion-item.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {Subscription} from 'rxjs';
2424
/** Used to generate unique ID for each accordion item. */
2525
let nextId = 0;
2626

27+
/** @dynamic Needed for "ngAcceptInputType" members. */
2728
/**
2829
* An basic directive expected to be extended and decorated as a component. Sets up all
2930
* events and attributes needed to be managed by a CdkAccordion parent.

src/cdk/accordion/accordion.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {Subject} from 'rxjs';
1313
/** Used to generate unique ID for each accordion. */
1414
let nextId = 0;
1515

16+
/** @dynamic Needed for "ngAcceptInputType" members. */
1617
/**
1718
* Directive whose purpose is to manage the expanded state of CdkAccordionItem children.
1819
*/

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {Subject} from 'rxjs';
1212
import {CDK_DRAG_PARENT} from '../drag-parent';
1313
import {toggleNativeDragInteractions} from '../drag-styling';
1414

15+
/** @dynamic Needed for "ngAcceptInputType" members. */
1516
/** Handle that can be used to drag and CdkDrag instance. */
1617
@Directive({
1718
selector: '[cdkDragHandle]',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export function CDK_DRAG_CONFIG_FACTORY(): DragRefConfig {
6767
return {dragStartThreshold: 5, pointerDirectionChangeThreshold: 5};
6868
}
6969

70+
/** @dynamic Needed for "ngAcceptInputType" members. */
7071
/** Element that can be moved inside a CdkDropList container. */
7172
@Directive({
7273
selector: '[cdkDrag]',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import {Directive, OnDestroy, Input} from '@angular/core';
1010
import {coerceBooleanProperty} from '@angular/cdk/coercion';
1111

12+
/** @dynamic Needed for "ngAcceptInputType" members. */
1213
/**
1314
* Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`
1415
* elements that are placed inside a `cdkDropListGroup` will be connected to each other

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ let _uniqueIdCounter = 0;
4141
*/
4242
export interface CdkDropListInternal extends CdkDropList {}
4343

44+
/** @dynamic Needed for "ngAcceptInputType" members. */
4445
/** Container that wraps a set of draggable items. */
4546
@Directive({
4647
selector: '[cdkDropList], cdk-drop-list',

src/cdk/observers/observe-content.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class ContentObserver implements OnDestroy {
124124
}
125125
}
126126

127-
127+
/** @dynamic Needed for "ngAcceptInputType" members. */
128128
/**
129129
* Directive that triggers a callback whenever the content of
130130
* its associated element has changed.

src/cdk/overlay/overlay-directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class CdkOverlayOrigin {
9393
public elementRef: ElementRef) { }
9494
}
9595

96-
96+
/** @dynamic Needed for "ngAcceptInputType" members. */
9797
/**
9898
* Directive to facilitate declarative creation of an
9999
* Overlay using a FlexibleConnectedPositionStrategy.

src/cdk/portal/portal-directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class TemplatePortalDirective extends CdkPortal {}
5555
*/
5656
export type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;
5757

58-
58+
/** @dynamic Needed for "ngAcceptInputType" members. */
5959
/**
6060
* Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be
6161
* directly attached to it, enabling declarative use.

src/cdk/scrolling/fixed-size-virtual-scroll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export function _fixedSizeVirtualScrollStrategyFactory(fixedSizeDir: CdkFixedSiz
162162
return fixedSizeDir._scrollStrategy;
163163
}
164164

165-
165+
/** @dynamic Needed for "ngAcceptInputType" members. */
166166
/** A virtual scroll strategy that supports fixed-size items. */
167167
@Directive({
168168
selector: 'cdk-virtual-scroll-viewport[itemSize]',

src/cdk/stepper/stepper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export interface StepperOptions {
104104
displayDefaultIndicatorType?: boolean;
105105
}
106106

107+
/** @dynamic Needed for "ngAcceptInputType" members. */
107108
@Component({
108109
moduleId: module.id,
109110
selector: 'cdk-step',
@@ -238,6 +239,7 @@ export class CdkStep implements OnChanges {
238239
static ngAcceptInputType_completed: boolean | string;
239240
}
240241

242+
/** @dynamic Needed for "ngAcceptInputType" members. */
241243
@Directive({
242244
selector: '[cdkStepper]',
243245
exportAs: 'cdkStepper',

src/cdk/table/cell.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class CdkColumnDefBase {}
4949
const _CdkColumnDefBase: CanStickCtor&typeof CdkColumnDefBase =
5050
mixinHasStickyInput(CdkColumnDefBase);
5151

52+
/** @dynamic Needed for "ngAcceptInputType" members. */
5253
/**
5354
* Column definition for the CDK table.
5455
* Defines a set of cells available for a table column.

src/cdk/table/row.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class CdkHeaderRowDefBase extends BaseRowDef {}
8181
const _CdkHeaderRowDefBase: CanStickCtor&typeof CdkHeaderRowDefBase =
8282
mixinHasStickyInput(CdkHeaderRowDefBase);
8383

84+
/** @dynamic Needed for "ngAcceptInputType" members. */
8485
/**
8586
* Header row definition for the CDK table.
8687
* Captures the header row's template and other header properties such as the columns to display.
@@ -109,6 +110,7 @@ class CdkFooterRowDefBase extends BaseRowDef {}
109110
const _CdkFooterRowDefBase: CanStickCtor&typeof CdkFooterRowDefBase =
110111
mixinHasStickyInput(CdkFooterRowDefBase);
111112

113+
/** @dynamic Needed for "ngAcceptInputType" members. */
112114
/**
113115
* Footer row definition for the CDK table.
114116
* Captures the footer row's template and other footer properties such as the columns to display.

src/cdk/table/table.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ export interface RenderRow<T> {
145145
rowDef: CdkRowDef<T>;
146146
}
147147

148+
/** @dynamic Needed for "ngAcceptInputType" members. */
148149
/**
149150
* A data table that can render a header row, data rows, and a footer row.
150151
* Uses the dataSource input to determine the data to be rendered. The data can be provided either

src/cdk/text-field/autosize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {Platform} from '@angular/cdk/platform';
2020
import {auditTime, takeUntil} from 'rxjs/operators';
2121
import {fromEvent, Subject} from 'rxjs';
2222

23-
23+
/** @dynamic Needed for "ngAcceptInputType" members. */
2424
/** Directive to automatically resize a textarea to fit its content. */
2525
@Directive({
2626
selector: 'textarea[cdkTextareaAutosize]',

src/cdk/tree/padding.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {CdkTree, CdkTreeNode} from './tree';
1616
/** Regex used to split a string on its CSS units. */
1717
const cssUnitPattern = /([A-Za-z%]+)$/;
1818

19+
/** @dynamic Needed for "ngAcceptInputType" members. */
1920
/**
2021
* Indent for the children tree dataNodes.
2122
* This directive will add left-padding to the node to show hierarchy.

src/cdk/tree/toggle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {Directive, HostListener, Input} from '@angular/core';
1111

1212
import {CdkTree, CdkTreeNode} from './tree';
1313

14+
/** @dynamic Needed for "ngAcceptInputType" members. */
1415
/**
1516
* Node toggle to expand/collapse the node.
1617
*/

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
MatButtonBase
2828
} from './button-base';
2929

30+
/** @dynamic Needed for "ngAcceptInputType" members. */
3031
/**
3132
* Material Design button component. Users interact with a button to perform an action.
3233
* See https://material.io/components/buttons
@@ -61,6 +62,7 @@ export class MatButton extends MatButtonBase {
6162
static ngAcceptInputType_disableRipple: boolean | string;
6263
}
6364

65+
/** @dynamic Needed for "ngAcceptInputType" members. */
6466
/**
6567
* Material Design button component for anchor elements. Anchor elements are used to provide
6668
* links for the user to navigate across different routes or pages.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
} from './button-base';
2929
import {ThemePalette} from '@angular/material/core';
3030

31+
/** @dynamic Needed for "ngAcceptInputType" members. */
3132
/**
3233
* Material Design floating action button (FAB) component. These buttons represent the primary
3334
* or most common action for users to interact with.
@@ -60,7 +61,7 @@ export class MatFabButton extends MatButtonBase {
6061
static ngAcceptInputType_disableRipple: boolean | string;
6162
}
6263

63-
64+
/** @dynamic Needed for "ngAcceptInputType" members. */
6465
/**
6566
* Material Design floating action button (FAB) component for anchor elements. Anchor elements
6667
* are used to provide links for the user to navigate across different routes or pages.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
MatButtonBase
2828
} from './button-base';
2929

30+
/** @dynamic Needed for "ngAcceptInputType" members. */
3031
/**
3132
* Material Design icon button component. This type of button displays a single interactive icon for
3233
* users to perform an action.
@@ -57,6 +58,7 @@ export class MatIconButton extends MatButtonBase {
5758
static ngAcceptInputType_disableRipple: boolean | string;
5859
}
5960

61+
/** @dynamic Needed for "ngAcceptInputType" members. */
6062
/**
6163
* Material Design icon button component for anchor elements. This button displays a single
6264
* interaction icon that allows users to navigate across different routes or pages.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export class MatCheckboxChange {
4848
checked: boolean;
4949
}
5050

51+
/** @dynamic Needed for "ngAcceptInputType" members. */
5152
@Component({
5253
moduleId: module.id,
5354
selector: 'mat-checkbox',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class MatChipGridBase extends MatChipSet {
7272
const _MatChipGridMixinBase: CanUpdateErrorStateCtor & typeof MatChipGridBase =
7373
mixinErrorState(MatChipGridBase);
7474

75+
/** @dynamic Needed for "ngAcceptInputType" members. */
7576
/**
7677
* An extension of the MatChipSet component used with MatChipRow chips and
7778
* the matChipInputFor directive.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const _MatChipRemoveMixinBase:
8585
typeof MatChipRemoveBase =
8686
mixinTabIndex(mixinDisabled(MatChipRemoveBase));
8787

88+
/** @dynamic Needed for "ngAcceptInputType" members. */
8889
/**
8990
* Directive to remove the parent chip when the trailing icon is clicked or
9091
* when the ENTER key is pressed on it.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface MatChipInputEvent {
2626
// Increasing integer for generating unique ids.
2727
let nextUniqueId = 0;
2828

29+
/** @dynamic Needed for "ngAcceptInputType" members. */
2930
/**
3031
* Directive that adds chip-specific behaviors to an input element inside `<mat-form-field>`.
3132
* May be placed inside or outside of a `<mat-chip-grid>`.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any = {
5454
multi: true
5555
};
5656

57+
/** @dynamic Needed for "ngAcceptInputType" members. */
5758
/**
5859
* An extension of the MatChipSet component that supports chip selection.
5960
* Used with MatChipOption chips.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export class MatChipSelectionChange {
3131
public isUserInput = false) { }
3232
}
3333

34+
/** @dynamic Needed for "ngAcceptInputType" members. */
3435
/**
3536
* An extension of the MatChip component that supports chip selection.
3637
* Used with MatChipListbox.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
import {MatChip} from './chip';
2020
import {GridKeyManagerRow, NAVIGATION_KEYS} from './grid-key-manager';
2121

22-
22+
/** @dynamic Needed for "ngAcceptInputType" members. */
2323
/**
2424
* An extension of the MatChip component used with MatChipGrid and
2525
* the matChipInputFor directive.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class MatChipSetBase {
4343
const _MatChipSetMixinBase: HasTabIndexCtor & typeof MatChipSetBase =
4444
mixinTabIndex(MatChipSetBase);
4545

46+
/** @dynamic Needed for "ngAcceptInputType" members. */
4647
/**
4748
* Basic container component for the MatChip component.
4849
*

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const _MatChipMixinBase:
8686
typeof MatChipBase =
8787
mixinTabIndex(mixinColor(mixinDisableRipple(MatChipBase), 'primary'), -1);
8888

89+
/** @dynamic Needed for "ngAcceptInputType" members. */
8990
/**
9091
* Material design styled Chip base component. Used inside the MatChipSet component.
9192
*

src/material-experimental/mdc-menu/menu-item.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import {Component, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
1010
import {MatMenuItem as BaseMatMenuItem} from '@angular/material/menu';
1111

12+
/** @dynamic Needed for "ngAcceptInputType" members. */
1213
/**
1314
* This directive is intended to be used inside an mat-menu tag.
1415
* It exists mostly to set the role attribute.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export const MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER: Provider = {
3737
useFactory: MAT_MENU_SCROLL_STRATEGY_FACTORY,
3838
};
3939

40+
/** @dynamic Needed for "ngAcceptInputType" members. */
4041
@Component({
4142
moduleId: module.id,
4243
selector: 'mat-menu',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {MDCRadioAdapter, MDCRadioFoundation} from '@material/radio';
2121
// Increasing integer for generating unique ids for radio components.
2222
let nextUniqueId = 0;
2323

24+
/** @dynamic Needed for "ngAcceptInputType" members. */
2425
@Component({
2526
moduleId: module.id,
2627
selector: 'mat-radio-button',

src/material-experimental/mdc-slide-toggle/slide-toggle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export class MatSlideToggleChange {
5353
public checked: boolean) { }
5454
}
5555

56+
/** @dynamic Needed for "ngAcceptInputType" members. */
5657
@Component({
5758
moduleId: module.id,
5859
selector: 'mat-slide-toggle',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export class MatSliderChange {
7171
value: number;
7272
}
7373

74+
/** @dynamic Needed for "ngAcceptInputType" members. */
7475
@Component({
7576
moduleId: module.id,
7677
selector: 'mat-slider',

src/material-experimental/mdc-tabs/tab-group.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {MatTab} from './tab';
3030
import {MatTabHeader} from './tab-header';
3131
import {coerceBooleanProperty} from '@angular/cdk/coercion';
3232

33+
/** @dynamic Needed for "ngAcceptInputType" members. */
3334
/**
3435
* Material design tab-group component. Supports basic tab pairs (label + content) and includes
3536
* animated ink-bar, keyboard navigation, and screen reader.

src/material-experimental/mdc-tabs/tab-header.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';
2828
import {MatTabLabelWrapper} from './tab-label-wrapper';
2929
import {MatInkBar} from './ink-bar';
3030

31+
/** @dynamic Needed for "ngAcceptInputType" members. */
3132
/**
3233
* The header of the tab group which displays a list of all the tabs in the tab group. Includes
3334
* an ink bar that follows the currently selected tab. When the tabs list's width exceeds the

src/material-experimental/mdc-tabs/tab-label-wrapper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {MatTabLabelWrapper as BaseMatTabLabelWrapper} from '@angular/material/ta
1212
import {MatInkBarFoundation, MatInkBarItem} from './ink-bar';
1313
import {coerceBooleanProperty} from '@angular/cdk/coercion';
1414

15+
/** @dynamic Needed for "ngAcceptInputType" members. */
1516
/**
1617
* Used in the `mat-tab-group` view to display tab labels.
1718
* @docs-private

src/material-experimental/mdc-tabs/tab-nav-bar/tab-nav-bar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import {coerceBooleanProperty} from '@angular/cdk/coercion';
3535
import {BehaviorSubject, Subject} from 'rxjs';
3636
import {takeUntil} from 'rxjs/operators';
3737

38-
38+
/** @dynamic Needed for "ngAcceptInputType" members. */
3939
/**
4040
* Navigation component matching the styles of the tab group header.
4141
* Provides anchored navigation with animated ink bar.
@@ -95,6 +95,7 @@ export class MatTabNav extends _MatTabNavBase implements AfterContentInit {
9595
static ngAcceptInputType_selectedIndex: number | string;
9696
}
9797

98+
/** @dynamic Needed for "ngAcceptInputType" members. */
9899
/**
99100
* Link inside of a `mat-tab-nav-bar`.
100101
*/

src/material-experimental/mdc-tabs/tab.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {MatTab as BaseMatTab} from '@angular/material/tabs';
1717
import {MatTabContent} from './tab-content';
1818
import {MatTabLabel} from './tab-label';
1919

20+
/** @dynamic Needed for "ngAcceptInputType" members. */
2021
@Component({
2122
moduleId: module.id,
2223
selector: 'mat-tab',

src/material/autocomplete/autocomplete-trigger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function getMatAutocompleteMissingPanelError(): Error {
101101
'you\'re attempting to open it after the ngAfterContentInit hook.');
102102
}
103103

104-
104+
/** @dynamic Needed for "ngAcceptInputType" members. */
105105
@Directive({
106106
selector: `input[matAutocomplete], textarea[matAutocomplete]`,
107107
host: {

0 commit comments

Comments
 (0)