From 854c831154412121e1db9c63186bdcefb138a922 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Wed, 15 Jun 2016 21:48:04 +0300 Subject: [PATCH] Fix lint erorrs, fix typescript version --- lib/components/JsonSchema/json-schema-lazy.ts | 4 ++-- lib/components/JsonSchema/json-schema.html | 4 ++-- lib/components/Redoc/redoc.ts | 5 +++-- lib/components/base.ts | 4 ++-- lib/shared/components/DropDown/drop-down.ts | 8 ++++---- .../components/StickySidebar/sticky-sidebar.ts | 7 +++---- lib/shared/components/Tabs/tabs.spec.ts | 2 +- lib/shared/components/Tabs/tabs.ts | 4 ++-- lib/shared/components/Zippy/zippy.ts | 4 ++-- package.json | 17 ++++++++--------- tslint.json | 2 -- 11 files changed, 29 insertions(+), 32 deletions(-) diff --git a/lib/components/JsonSchema/json-schema-lazy.ts b/lib/components/JsonSchema/json-schema-lazy.ts index 07bbef95..af01a9dd 100644 --- a/lib/components/JsonSchema/json-schema-lazy.ts +++ b/lib/components/JsonSchema/json-schema-lazy.ts @@ -1,6 +1,6 @@ 'use strict'; -import { Component, ElementRef, ViewContainerRef } from '@angular/core'; +import { Component, ElementRef, ViewContainerRef, OnDestroy, AfterViewInit } from '@angular/core'; import { CORE_DIRECTIVES } from '@angular/common'; import { DynamicComponentLoader, Input } from '@angular/core'; @@ -17,7 +17,7 @@ var cache = {}; template: '', directives: [CORE_DIRECTIVES] }) -export class JsonSchemaLazy { +export class JsonSchemaLazy implements OnDestroy, AfterViewInit { @Input() pointer: string; @Input() auto: boolean; @Input() isRequestSchema: boolean; diff --git a/lib/components/JsonSchema/json-schema.html b/lib/components/JsonSchema/json-schema.html index 3a0e67cd..4605645c 100644 --- a/lib/components/JsonSchema/json-schema.html +++ b/lib/components/JsonSchema/json-schema.html @@ -43,10 +43,10 @@
This field value determines the exact schema: - + - +
diff --git a/lib/components/Redoc/redoc.ts b/lib/components/Redoc/redoc.ts index 0259eb6d..54f66ba3 100644 --- a/lib/components/Redoc/redoc.ts +++ b/lib/components/Redoc/redoc.ts @@ -1,6 +1,7 @@ 'use strict'; -import { provide, enableProdMode, ElementRef, ComponentRef } from '@angular/core'; +import { provide, enableProdMode, ElementRef, + ComponentRef, AfterViewInit } from '@angular/core'; import { bootstrap } from '@angular/platform-browser-dynamic'; import { BrowserDomAdapter } from '@angular/platform-browser/src/browser/browser_adapter'; import { RedocComponent, BaseComponent } from '../base'; @@ -33,7 +34,7 @@ var _modeLocked = false; detect: true, onPushOnly: false }) -export class Redoc extends BaseComponent { +export class Redoc extends BaseComponent implements AfterViewInit { static appRef: ComponentRef; options: any; diff --git a/lib/components/base.ts b/lib/components/base.ts index ca8065c9..32df583b 100644 --- a/lib/components/base.ts +++ b/lib/components/base.ts @@ -1,5 +1,5 @@ 'use strict'; -import { Component, ChangeDetectionStrategy } from '@angular/core'; +import { Component, ChangeDetectionStrategy, OnInit, OnDestroy } from '@angular/core'; import { CORE_DIRECTIVES, JsonPipe, AsyncPipe } from '@angular/common'; import { SchemaManager } from '../utils/SchemaManager'; import JsonPointer from '../utils/JsonPointer'; @@ -94,7 +94,7 @@ export function RedocComponent(options) { * Generic Component * @class */ -export class BaseComponent { +export class BaseComponent implements OnInit, OnDestroy { componentSchema: any = null; pointer: String; diff --git a/lib/shared/components/DropDown/drop-down.ts b/lib/shared/components/DropDown/drop-down.ts index ecac25b3..17a05eb0 100644 --- a/lib/shared/components/DropDown/drop-down.ts +++ b/lib/shared/components/DropDown/drop-down.ts @@ -1,11 +1,11 @@ 'use strict'; -import {Component, EventEmitter, ElementRef, Output} from '@angular/core'; -import {CORE_DIRECTIVES} from '@angular/common'; +import { Component, EventEmitter, ElementRef, Output, AfterContentInit } from '@angular/core'; +import { CORE_DIRECTIVES } from '@angular/common'; import DropKick from 'dropkickjs'; @Component({ - selector: 'dropdown', + selector: 'drop-down', template: `