upgrade (angular): Upgrade to angular 8 - fix static flags

This commit is contained in:
Shai Rose 2019-06-20 12:10:25 +03:00
Родитель 972f7f1cac
Коммит 2e280c73d2
9 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -18,7 +18,7 @@ export interface TriangleConfig {
styleUrls: ['./triangle.component.scss'],
})
export class TriangleComponent implements OnInit, OnDestroy {
@ContentChild(TemplateRef, /* TODO: add static flag */ {}) readonly dotTemplate: TemplateRef<{
@ContentChild(TemplateRef, { static: true }) readonly dotTemplate: TemplateRef<{
dot: SierpinskiTriangleDot;
text: number;
}>;

Просмотреть файл

@ -94,7 +94,7 @@ export class FabCalendarComponent extends ReactWrapperComponent<ICalendarProps>
@Output() readonly onSelectDate = new EventEmitter<{ date: Date; selectedDateRangeArray?: Date[] }>();
@Output() readonly onDismiss = new EventEmitter<void>();
@ContentChild(CalendarStringsDirective, /* TODO: add static flag */ {}) readonly calendarStringsDirective?: CalendarStringsDirective;
@ContentChild(CalendarStringsDirective, { static: true }) readonly calendarStringsDirective?: CalendarStringsDirective;
constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, renderer: Renderer2) {
super(elementRef, changeDetectorRef, renderer);

Просмотреть файл

@ -64,7 +64,7 @@ export abstract class FabBaseComboBoxComponent extends ReactWrapperComponent<ICo
@Output() readonly onMenuDismissed = new EventEmitter<void>();
@Output() readonly onScrollToItem = new EventEmitter<{ itemIndex: number }>();
@ContentChild(ComboBoxOptionsDirective, /* TODO: add static flag */ {}) readonly comboBoxOptionsDirective?: ComboBoxOptionsDirective;
@ContentChild(ComboBoxOptionsDirective, { static: true }) readonly comboBoxOptionsDirective?: ComboBoxOptionsDirective;
onRenderLowerContent: (props?: IComboBoxProps, defaultRender?: JsxRenderFunc<IComboBoxProps>) => JSX.Element;

Просмотреть файл

@ -62,9 +62,9 @@ import {
})
export class FabCommandBarComponent extends ReactWrapperComponent<ICommandBarProps>
implements OnChanges<FabCommandBarComponent>, AfterContentInit, OnDestroy {
@ContentChild(CommandBarItemsDirective, /* TODO: add static flag */ {}) readonly itemsDirective?: CommandBarItemsDirective;
@ContentChild(CommandBarFarItemsDirective, /* TODO: add static flag */ {}) readonly farItemsDirective?: CommandBarFarItemsDirective;
@ContentChild(CommandBarOverflowItemsDirective, /* TODO: add static flag */ {}) readonly overflowItemsDirective?: CommandBarOverflowItemsDirective;
@ContentChild(CommandBarItemsDirective, { static: true }) readonly itemsDirective?: CommandBarItemsDirective;
@ContentChild(CommandBarFarItemsDirective, { static: true }) readonly farItemsDirective?: CommandBarFarItemsDirective;
@ContentChild(CommandBarOverflowItemsDirective, { static: true }) readonly overflowItemsDirective?: CommandBarOverflowItemsDirective;
@ViewChild('reactNode', { static: true }) protected reactNodeRef: ElementRef;

Просмотреть файл

@ -17,7 +17,7 @@ export type CommandBarItemChangedPayload = ItemChangedPayload<ICommandBarItemOpt
*/
@Directive({ selector: 'fab-command-bar-item > render' })
export class CommandBarItemRenderDirective {
@ContentChild(TemplateRef, /* TODO: add static flag */ {}) readonly templateRef: TemplateRef<ICommandBarItemOptionsRenderContext>;
@ContentChild(TemplateRef, { static: false }) readonly templateRef: TemplateRef<ICommandBarItemOptionsRenderContext>;
}
/**
@ -25,7 +25,7 @@ export class CommandBarItemRenderDirective {
*/
@Directive({ selector: 'fab-command-bar-item > render-icon' })
export class CommandBarItemRenderIconDirective {
@ContentChild(TemplateRef, /* TODO: add static flag */ {}) readonly templateRef: TemplateRef<ICommandBarItemOptionsRenderIconContext>;
@ContentChild(TemplateRef, { static: false }) readonly templateRef: TemplateRef<ICommandBarItemOptionsRenderIconContext>;
}
@Directive({ selector: 'fab-command-bar-item' })

Просмотреть файл

@ -33,7 +33,7 @@ export type ContextualMenuItemChangedPayload = ItemChangedPayload<
*/
@Directive({ selector: 'fab-command-bar-item > render' })
export class ContextualMenuItemRenderDirective {
@ContentChild(TemplateRef, /* TODO: add static flag */ {}) readonly templateRef: TemplateRef<IContextualMenuItemOptionsRenderContext>;
@ContentChild(TemplateRef, { static: false }) readonly templateRef: TemplateRef<IContextualMenuItemOptionsRenderContext>;
}
/**
@ -41,7 +41,7 @@ export class ContextualMenuItemRenderDirective {
*/
@Directive({ selector: 'fab-command-bar-item > render-icon' })
export class ContextualMenuItemRenderIconDirective {
@ContentChild(TemplateRef, /* TODO: add static flag */ {}) readonly templateRef: TemplateRef<IContextualMenuItemOptionsRenderIconContext>;
@ContentChild(TemplateRef, { static: false }) readonly templateRef: TemplateRef<IContextualMenuItemOptionsRenderIconContext>;
}
@Directive({ selector: 'contextual-menu-item' })
@ -53,8 +53,8 @@ export class ContextualMenuItemDirective extends ChangeableItemDirective<IContex
OnChanges<ContextualMenuItemDirective>,
OnDestroy {
@ContentChildren(ContextualMenuItemDirective) readonly menuItemsDirectives: QueryList<ContextualMenuItemDirective>;
@ContentChild(ContextualMenuItemRenderDirective, /* TODO: add static flag */ {}) readonly renderDirective: ContextualMenuItemRenderDirective;
@ContentChild(ContextualMenuItemRenderIconDirective, /* TODO: add static flag */ {})
@ContentChild(ContextualMenuItemRenderDirective, { static: false }) readonly renderDirective: ContextualMenuItemRenderDirective;
@ContentChild(ContextualMenuItemRenderIconDirective, { static: false })
readonly renderIconDirective: ContextualMenuItemRenderIconDirective;
@Input() componentRef?: IContextualMenuItem['componentRef'];

Просмотреть файл

@ -112,8 +112,8 @@ import { DetailsListGroupsDirective } from './directives/details-list-groups.dir
})
export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListProps>
implements AfterContentInit, OnChanges<FabDetailsListComponent>, OnDestroy, OnInit {
@ContentChild(DetailsListColumnsDirective, /* TODO: add static flag */ {}) readonly columnsDirective?: DetailsListColumnsDirective;
@ContentChild(DetailsListGroupsDirective, /* TODO: add static flag */ {}) readonly groupsDirective?: DetailsListGroupsDirective;
@ContentChild(DetailsListColumnsDirective, { static: true }) readonly columnsDirective?: DetailsListColumnsDirective;
@ContentChild(DetailsListGroupsDirective, { static: true }) readonly groupsDirective?: DetailsListGroupsDirective;
@ViewChild('reactNode', { static: true }) protected reactNodeRef: ElementRef;

Просмотреть файл

@ -12,7 +12,7 @@ import { ChangeableItemDirective } from '../../core/shared/changeable-item.direc
*/
@Directive({ selector: 'fab-details-list-column > render' })
export class DetailsListColumnRenderDirective {
@ContentChild(TemplateRef, /* TODO: add static flag */ {}) readonly templateRef: TemplateRef<IDetailsListColumnOptionsRenderContext>;
@ContentChild(TemplateRef, { static: false }) readonly templateRef: TemplateRef<IDetailsListColumnOptionsRenderContext>;
}
/**
@ -21,7 +21,7 @@ export class DetailsListColumnRenderDirective {
@Directive({ selector: 'fab-details-list-column' })
export class DetailsListColumnDirective extends ChangeableItemDirective<IDetailsListColumnOptions>
implements AfterContentInit {
@ContentChild(DetailsListColumnRenderDirective, /* TODO: add static flag */ {}) readonly renderDirective: DetailsListColumnRenderDirective;
@ContentChild(DetailsListColumnRenderDirective, { static: false }) readonly renderDirective: DetailsListColumnRenderDirective;
@Input() name: IColumn['name'];
@Input() fieldName?: IColumn['fieldName'];

Просмотреть файл

@ -66,7 +66,7 @@ import { DropdownOptionsDirective } from './directives/dropdown-options.directiv
})
export class FabDropdownComponent extends ReactWrapperComponent<IDropdownProps> implements OnInit, AfterContentInit {
@ViewChild('reactNode', { static: true }) protected reactNodeRef: ElementRef;
@ContentChild(DropdownOptionsDirective, /* TODO: add static flag */ {}) readonly dropdownOptionsDirective?: DropdownOptionsDirective;
@ContentChild(DropdownOptionsDirective, { static: true }) readonly dropdownOptionsDirective?: DropdownOptionsDirective;
@Input() componentRef?: IDropdownProps['componentRef'];
@Input() label?: IDropdownProps['label'];