Commit 30f9bfaa authored by Mark Harding's avatar Mark Harding

Merge branch 'sprint/HipsterHedgehog.feat.update-to-angular-8' into 'master'

Sprint/hipster hedgehog.feat.update to angular 8

See merge request !402
parents 025d2eb9 c87e223e
Pipeline #69050487 passed with stages
in 42 minutes and 6 seconds
......@@ -21,7 +21,7 @@ import { BoostButton } from '../../../modules/legacy/components/buttons/boost';
`
})
export class MindsButton implements AfterViewInit {
@ViewChild(DynamicHostDirective) cardHost: DynamicHostDirective;
@ViewChild(DynamicHostDirective, { static: true }) cardHost: DynamicHostDirective;
object: any = {};
@Input() type: string;
......
......@@ -27,7 +27,7 @@ import { BlogCard } from '../../../modules/blogs/card/card';
`
})
export class MindsCard implements AfterViewInit {
@ViewChild(DynamicHostDirective) cardHost: DynamicHostDirective;
@ViewChild(DynamicHostDirective, { static: true }) cardHost: DynamicHostDirective;
object: any = {};
type: string;
......
......@@ -15,8 +15,8 @@ export class CategoriesSelectorComponent {
categories: Array<Category> = [];
menuOpened: boolean = false;
q: string = '';
@ViewChild('input', { read: ElementRef }) input: ElementRef;
@ViewChild('list', { read: ElementRef }) list: ElementRef;
@ViewChild('input', { read: ElementRef, static: true }) input: ElementRef;
@ViewChild('list', { read: ElementRef, static: true }) list: ElementRef;
@Output('selected') onSelected: EventEmitter<Array<Category>> = new EventEmitter<Array<Category>>();
......
......@@ -26,7 +26,7 @@ export class ChartComponent implements AfterViewInit, OnDestroy, OnChanges {
@Input() columns: ChartColumn[];
@Input() rows: any[][];
@ViewChild('container') containerElement: ElementRef;
@ViewChild('container', { static: true }) containerElement: ElementRef;
private _chartInstance: any;
private _chartOptions: any = {};
......
......@@ -38,7 +38,7 @@ export class InlineEditorComponent implements ControlValueAccessor, OnInit, OnDe
@Input() placeholder: string;
el: ElementRef;
editor: MediumEditor;
@ViewChild('host') host: any;
@ViewChild('host', { static: true }) host: any;
@Input() reset() {
this.editor.setContent('');
......
......@@ -32,7 +32,7 @@ declare var tinymce;
})
export class Textarea implements OnChanges {
@ViewChild('editor') editorControl: ElementRef;
@ViewChild('editor', { static: true }) editorControl: ElementRef;
@Input('mModel') model: string = '';
@Output('mModelChange') update: EventEmitter<any> = new EventEmitter();
......
......@@ -27,7 +27,7 @@ export class FeaturedContentComponent implements OnInit {
@Input() slot: number = -1;
@ViewChild(DynamicHostDirective) dynamicHost: DynamicHostDirective;
@ViewChild(DynamicHostDirective, { static: false }) dynamicHost: DynamicHostDirective;
constructor(
protected featuredContentService: FeaturedContentService,
......
......@@ -19,7 +19,7 @@ export class OverlayModalComponent implements AfterViewInit {
hidden: boolean = true;
class: string = '';
@ViewChild(DynamicHostDirective)
@ViewChild(DynamicHostDirective, { static: true })
private host: DynamicHostDirective;
private componentRef: ComponentRef<{}>;
......
......@@ -18,8 +18,8 @@ export class PhoneInputCountryComponent {
phoneNumber: string;
countryCodeData = new CountryCode();
@ViewChild('input') input: ElementRef;
@ViewChild('dropdownMenu') dropdownMenu: ElementRef;
@ViewChild('input', { static: false }) input: ElementRef;
@ViewChild('dropdownMenu', { static: true }) dropdownMenu: ElementRef;
showDropdownMenu: boolean = false;
allowedKeyCodes: Array<number> = [8, 33, 34, 35, 36, 37, 39, 46];
......
......@@ -21,7 +21,7 @@ export class PhoneInputComponent implements ControlValueAccessor, OnInit, OnChan
phoneNumber: string = '';
@ViewChild('input') input: ElementRef;
@ViewChild('input', { static: true }) input: ElementRef;
selectedCountry;
allowedKeyCodes: Array<number> = [8, 33, 34, 35, 36, 37, 39, 46];
......
......@@ -111,11 +111,11 @@ export class SortSelectorComponent implements OnInit, OnDestroy, AfterViewInit {
@Output() onChange: EventEmitter<{ algorithm, period, customType }> = new EventEmitter<{ algorithm, period, customType }>();
@ViewChild('algorithmDropdown') algorithmDropdown: DropdownComponent;
@ViewChild('algorithmDropdown', { static: false }) algorithmDropdown: DropdownComponent;
@ViewChild('periodDropdown') periodDropdown: DropdownComponent;
@ViewChild('periodDropdown', { static: false }) periodDropdown: DropdownComponent;
@ViewChild('customTypeDropdown') customTypeDropdown: DropdownComponent;
@ViewChild('customTypeDropdown', { static: false }) customTypeDropdown: DropdownComponent;
expandedAlgorithmDropdown: boolean = true;
......
......@@ -12,7 +12,7 @@ import { GroupsSidebarMarkersComponent } from '../../../modules/groups/sidebar-m
})
export class SidebarMarkersComponent {
@ViewChild(DynamicHostDirective) host: DynamicHostDirective;
@ViewChild(DynamicHostDirective, { static: true }) host: DynamicHostDirective;
minds = window.Minds;
showMarkerSidebar = false;
......
......@@ -14,7 +14,7 @@ import { NotificationsToasterComponent } from '../../../modules/notifications/to
export class TopbarComponent {
@ViewChild(DynamicHostDirective) host: DynamicHostDirective;
@ViewChild(DynamicHostDirective, { static: true }) host: DynamicHostDirective;
minds = window.Minds;
......
......@@ -20,7 +20,7 @@ export class V2TopbarComponent implements OnInit {
minds = window.Minds;
timeout;
@ViewChild(DynamicHostDirective) notificationsToasterHost: DynamicHostDirective;
@ViewChild(DynamicHostDirective, { static: true }) notificationsToasterHost: DynamicHostDirective;
componentRef;
componentInstance: NotificationsToasterComponent;
......
......@@ -10,7 +10,7 @@ export class ReadMoreDirective {
realHeight: any;
maxHeightAllowed: number = 320;
expandable: boolean = false;
@ContentChild(ReadMoreButtonComponent) button;
@ContentChild(ReadMoreButtonComponent, { 'static': false}) button;
constructor(private element: ElementRef, private cd: ChangeDetectorRef) {
this._element = element.nativeElement;
......
......@@ -34,7 +34,7 @@ export class AdminBoosts {
paramsSubscription: Subscription;
@ViewChild('reasonModal') modal: RejectionReasonModalComponent;
@ViewChild('reasonModal', { static: false }) modal: RejectionReasonModalComponent;
constructor(public client: Client, private route: ActivatedRoute) {
}
......
......@@ -29,7 +29,7 @@ export class AdminPages {
status: string = 'saved';
headerFile: File;
paramsSubscription: Subscription;
@ViewChild('inlineEditor') private editor: InlineEditorComponent;
@ViewChild('inlineEditor', { static: true }) private editor: InlineEditorComponent;
constructor(public client: Client, public upload: Upload, private route: ActivatedRoute) {
}
......
......@@ -22,7 +22,7 @@ export class Pages {
pages: Array<any> = [];
page: string = '';
@ViewChild('body', {read: ElementRef}) bodyElement:ElementRef;
@ViewChild('body', { read: ElementRef, static: true }) bodyElement:ElementRef;
paramsSubscription: Subscription;
......
......@@ -8,7 +8,7 @@ import { AnalyticsCardComponent } from "../card/card.component";
})
export class OffChainPlusCardComponent {
@ViewChild('card') card: AnalyticsCardComponent;
@ViewChild('card', { static: true }) card: AnalyticsCardComponent;
reclaimedTokens: number = 0;
users: number = 0;
......
......@@ -9,7 +9,7 @@ import { Subscription } from "rxjs";
})
export class OffchainWireCardComponent implements OnInit {
@ViewChild('card') card: AnalyticsCardComponent;
@ViewChild('card', { static: true }) card: AnalyticsCardComponent;
subscription: Subscription;
......
......@@ -10,7 +10,7 @@ import { timespanOption } from "../../charts/timespanOption";
})
export class OnChainBoostsCardComponent {
@ViewChild('card') card: AnalyticsCardComponent;
@ViewChild('card', { static: true }) card: AnalyticsCardComponent;
subscription: Subscription;
......
......@@ -8,7 +8,7 @@ import { AnalyticsCardComponent } from "../card/card.component";
})
export class OnChainPlusCardComponent {
@ViewChild('card') card: AnalyticsCardComponent;
@ViewChild('card', { static: true }) card: AnalyticsCardComponent;
reclaimedTokens: number = 0;
users: number = 0;
......
......@@ -9,7 +9,7 @@ import { Subscription } from "rxjs";
})
export class OnchainWireCardComponent implements OnInit {
@ViewChild('card') card: AnalyticsCardComponent;
@ViewChild('card', { static: true }) card: AnalyticsCardComponent;
subscription: Subscription;
......
......@@ -9,7 +9,7 @@ import { Subscription } from "rxjs";
})
export class TokenSalesCardComponent implements OnInit {
@ViewChild('card') card: AnalyticsCardComponent;
@ViewChild('card', { static: true }) card: AnalyticsCardComponent;
subscription: Subscription;
......
......@@ -9,7 +9,7 @@ import { Subscription } from "rxjs";
})
export class UserSegmentsCardComponent implements OnInit {
@ViewChild('card') card: AnalyticsCardComponent;
@ViewChild('card', { static: true }) card: AnalyticsCardComponent;
subscription: Subscription;
......
......@@ -9,7 +9,7 @@ import { Subscription } from "rxjs";
})
export class WithdrawCardComponent implements OnInit {
@ViewChild('card') card: AnalyticsCardComponent;
@ViewChild('card', { static: true }) card: AnalyticsCardComponent;
subscription: Subscription;
......
......@@ -22,7 +22,7 @@ export class ActiveUsersChartComponent implements OnInit {
timespan: timespanOption;
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
@Input('timespan') set _timespan(value: timespanOption) {
this.timespan = value;
......
......@@ -19,7 +19,7 @@ import { Client } from "../../../../../services/api/client";
export class ChannelBoostsComponent implements OnInit {
@Input() analytics: 'totals' | 'monthly';
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
inProgress: boolean = false;
data: any;
......
......@@ -20,7 +20,7 @@ export class OffChainBoostsChartComponent implements OnInit {
@Input() analytics: 'completed' | 'not_completed' | 'revoked' | 'rejected' | 'users_who_completed' | 'users_waiting_for_completion' | 'reclaimed_tokens' | 'impressions_served';
timespan: timespanOption;
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
init: boolean = false;
inProgress: boolean = false;
......
......@@ -19,7 +19,7 @@ import { timespanOption } from "../timespanOption";
export class OnChainBoostsChartComponent implements OnInit {
timespan: timespanOption;
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
init: boolean = false;
inProgress: boolean = false;
......
......@@ -19,7 +19,7 @@ import { timespanOption } from "../timespanOption";
})
export class CommentsChartComponent implements OnInit {
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
@Input() user: MindsUser;
......
......@@ -19,7 +19,7 @@ import { Client } from "../../../../../services/api/client";
export class ChannelInteractionsComponent implements OnInit {
@Input() analytics: 'totals' | 'monthly';
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
inProgress: boolean = false;
data: any;
......
......@@ -18,7 +18,7 @@ import { timespanOption } from "../timespanOption";
})
export class OffchainPlusChartComponent implements OnInit {
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
init: boolean = false;
......
......@@ -18,7 +18,7 @@ import { timespanOption } from "../timespanOption";
})
export class OnchainPlusChartComponent implements OnInit {
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
init: boolean = false;
......
......@@ -21,7 +21,7 @@ import { timespanOption } from "../timespanOption";
export class PostsChartComponent implements OnInit {
@Input() user: MindsUser;
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
init: boolean = false;
......
......@@ -21,7 +21,7 @@ import { timespanOption } from "../timespanOption";
export class RemindsChartComponent implements OnInit {
@Input() user: MindsUser;
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
init: boolean = false;
......
......@@ -18,7 +18,7 @@ import { timespanOption } from "../timespanOption";
})
export class RewardsChartComponent implements OnInit {
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
init: boolean = false;
......
......@@ -19,7 +19,7 @@ import { timespanOption } from "../timespanOption";
export class TokenSalesChartComponent implements OnInit {
@Input() analytics: 'rates' | 'sales';
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
init: boolean = false;
......
......@@ -18,7 +18,7 @@ import { timespanOption } from "../timespanOption";
})
export class UserSegmentsChartComponent implements OnInit {
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
inProgress: boolean = false;
......
......@@ -19,7 +19,7 @@ import { MindsUser } from "../../../../../interfaces/entities";
})
export class VotesChartComponent implements OnInit {
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
@Input() user: MindsUser;
......
......@@ -18,7 +18,7 @@ import { timespanOption } from "../timespanOption";
})
export class OffchainWireChartComponent implements OnInit {
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
init: boolean = false;
......
......@@ -18,7 +18,7 @@ import { timespanOption } from "../timespanOption";
})
export class OnchainWireChartComponent implements OnInit {
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
init: boolean = false;
......
......@@ -18,7 +18,7 @@ import { timespanOption } from "../timespanOption";
})
export class WithdrawChartComponent implements OnInit {
@ViewChild('chartContainer') chartContainer: ElementRef;
@ViewChild('chartContainer', { static: true }) chartContainer: ElementRef;
timespan: timespanOption;
init: boolean = false;
......
......@@ -10,7 +10,7 @@ import { TokenRewardsOnboardingComponent } from '../../wallet/tokens/onboarding/
})
export class BlockchainMarketingOnboardComponent implements OnInit {
@ViewChild(DynamicHostDirective) host: DynamicHostDirective;
@ViewChild(DynamicHostDirective, { static: true }) host: DynamicHostDirective;
componentRef;
componentInstance: TokenRewardsOnboardingComponent;
......
......@@ -161,7 +161,7 @@ export const MEDIUM_EDITOR_VALUE_ACCESSOR: any = {
class InlineEditorComponentMock {
@Input() options: any;
@Input() placeholder: string;
@ViewChild('host') host: HTMLDivElement;
@ViewChild('host', { static: false }) host: HTMLDivElement;
@Input()
reset() {
......
......@@ -63,9 +63,9 @@ export class BlogEdit {
existingBanner: boolean;
paramsSubscription: Subscription;
@ViewChild('inlineEditor') inlineEditor: InlineEditorComponent;
@ViewChild('thresholdInput') thresholdInput: WireThresholdInputComponent;
@ViewChild('hashtagsSelector') hashtagsSelector: HashtagsSelectorComponent;
@ViewChild('inlineEditor', { static: false }) inlineEditor: InlineEditorComponent;
@ViewChild('thresholdInput', { static: false }) thresholdInput: WireThresholdInputComponent;
@ViewChild('hashtagsSelector', { static: false }) hashtagsSelector: HashtagsSelectorComponent;
constructor(
public session: Session,
......
......@@ -42,7 +42,7 @@ export class BlogView {
menuOptions: Array<string> = ['edit', 'follow', 'feature', 'delete', 'report', 'subscribe', 'set-explicit', 'remove-explicit', 'rating'];
@ViewChild('lockScreen', { read: ElementRef }) lockScreen;
@ViewChild('lockScreen', { read: ElementRef, static: false }) lockScreen;
constructor(
......
......@@ -24,7 +24,7 @@ export class BoostConsoleBooster {
componentRef;
componentInstance: PosterComponent;
@ViewChild('poster', { read: ViewContainerRef }) poster: ViewContainerRef;
@ViewChild('poster', { read: ViewContainerRef, static: false }) poster: ViewContainerRef;
constructor(public client: Client,
public session: Session,
......
......@@ -102,7 +102,7 @@ export class BoostCreatorComponent implements AfterViewInit {
this.object = object;
}
@ViewChild('amountEditor') private _amountEditor: ElementRef;
@ViewChild('amountEditor', { static: false }) private _amountEditor: ElementRef;
constructor(
public session: Session,
......
......@@ -32,7 +32,7 @@ export class BoostCreatorP2PSearchComponent {
searching: boolean = false;
private throttle;
@ViewChild('input') private input: ElementRef;
@ViewChild('input', { static: true }) private input: ElementRef;
constructor(
private client: Client,
......
......@@ -27,7 +27,7 @@ export class ReCaptchaComponent implements OnInit, ControlValueAccessor {
@Output() captchaResponse = new EventEmitter<string>();
@Output() captchaExpired = new EventEmitter();
@ViewChild('target') targetRef: ElementRef;
@ViewChild('target', { static: true }) targetRef: ElementRef;
widgetId: any = null;
onChange: Function = () => {
......
......@@ -41,7 +41,7 @@ export class ChannelComponent {