mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 16:46:34 +03:00
Fix lint erorrs, fix typescript version
This commit is contained in:
parent
1fafa5e334
commit
854c831154
|
@ -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;
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
<div class="param-description" innerHtml="{{prop.description | marked}}"></div>
|
||||
<div class="discriminator-info" *ngIf="prop.isDiscriminator">
|
||||
<span>This field value determines the exact schema:</span>
|
||||
<dropdown (change)="selectDerived($event)">
|
||||
<drop-down (change)="selectDerived($event)">
|
||||
<option *ngFor="let derived of schema.derived; let i=index"
|
||||
[value]="i">{{derived.name}}</option>
|
||||
</dropdown>
|
||||
</drop-down>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -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<any>;
|
||||
|
||||
options: any;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
import {Component, EventEmitter, ElementRef, Output} from '@angular/core';
|
||||
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: `
|
||||
<select (change)=onChange($event.target.value)>
|
||||
<ng-content></ng-content>
|
||||
|
@ -14,7 +14,7 @@ import DropKick from 'dropkickjs';
|
|||
directives: [CORE_DIRECTIVES],
|
||||
styleUrls: ['./drop-down.css']
|
||||
})
|
||||
export class DropDown {
|
||||
export class DropDown implements AfterContentInit {
|
||||
@Output() change = new EventEmitter();
|
||||
elem: any;
|
||||
inst: any;
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
import {Directive, ElementRef, Input} from '@angular/core';
|
||||
import { Directive, ElementRef, Input, OnInit, OnDestroy } from '@angular/core';
|
||||
import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter';
|
||||
|
||||
@Directive({
|
||||
selector: '[sticky-sidebar]',
|
||||
inputs: ['scrollParent', 'scrollYOffset']
|
||||
selector: '[sticky-sidebar]'
|
||||
})
|
||||
export class StickySidebar {
|
||||
export class StickySidebar implements OnInit, OnDestroy {
|
||||
$element: any;
|
||||
cancelScrollBinding: any;
|
||||
$redocEl: any;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, Output, OnInit } from '@angular/core';
|
||||
import { CORE_DIRECTIVES } from '@angular/common';
|
||||
import { ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';
|
||||
|
||||
|
@ -17,7 +17,7 @@ import { ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';
|
|||
styleUrls: ['tabs.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class Tabs {
|
||||
export class Tabs implements OnInit {
|
||||
@Input() selected: any;
|
||||
@Output() change = new EventEmitter();
|
||||
tabs: Tab[] = [];
|
||||
|
|
17
package.json
17
package.json
|
@ -93,7 +93,6 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^2.0.0-rc.1",
|
||||
"@angular/compiler-cli": "^0.2.0",
|
||||
"@angular/compiler": "^2.0.0-rc.1",
|
||||
"@angular/core": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser": "^2.0.0-rc.1",
|
||||
|
@ -121,7 +120,9 @@
|
|||
"istanbul": "github:gotwarlost/istanbul#source-map",
|
||||
"jasmine-core": "^2.4.1",
|
||||
"jasmine-spec-reporter": "^2.4.0",
|
||||
"json-pointer": "^0.5.0",
|
||||
"json-schema-instantiator": "^0.3.0",
|
||||
"json-schema-ref-parser": "^3.1.2",
|
||||
"jspm": "^0.16.36",
|
||||
"karma": "^0.13.15",
|
||||
"karma-babel-preprocessor": "^5.2.2",
|
||||
|
@ -136,29 +137,27 @@
|
|||
"karma-regex-preprocessor": "github:makern/karma-regex-preprocessor",
|
||||
"karma-should": "^1.0.0",
|
||||
"karma-sinon": "^1.0.4",
|
||||
"marked": "^0.3.5",
|
||||
"node-sass": "^3.7.0",
|
||||
"openapi-sampler": "^0.1.2",
|
||||
"phantomjs-prebuilt": "^2.1.7",
|
||||
"protractor": "^3.0.0",
|
||||
"reflect-metadata": "^0.1.2",
|
||||
"require-dir": "^0.3.0",
|
||||
"rollup-plugin-commonjs": "^2.2.1",
|
||||
"run-sequence": "^1.1.5",
|
||||
"rxjs": "^5.0.0-beta.6",
|
||||
"rxjs-es": "^5.0.0-beta.7",
|
||||
"scrollparent": "^1.0.0",
|
||||
"shelljs": "^0.7.0",
|
||||
"should": "^8.0.2",
|
||||
"sinon": "^1.17.2",
|
||||
"systemjs-builder": "^0.15.16",
|
||||
"tslint": "^3.11.0",
|
||||
"tslint-stylish": "^2.1.0-beta",
|
||||
"typescript": "^1.9.0-dev.20160612-1.0",
|
||||
"typescript": "^1.8.10",
|
||||
"vinyl-paths": "^2.0.0",
|
||||
"yargs": "^4.7.1",
|
||||
"zone.js": "^0.6.12",
|
||||
"scrollparent": "^1.0.0",
|
||||
"json-pointer": "^0.5.0",
|
||||
"json-schema-ref-parser": "^3.1.2",
|
||||
"marked": "^0.3.5",
|
||||
"rollup-plugin-commonjs": "^2.2.1",
|
||||
"rxjs": "^5.0.0-beta.6"
|
||||
"zone.js": "^0.6.12"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
],
|
||||
"variable-name": false,
|
||||
|
||||
"directive-selector-name": [true, "camelCase"],
|
||||
"component-selector-name": [true, "kebab-case"],
|
||||
"directive-selector-type": [true, "attribute"],
|
||||
"component-selector-type": [true, "element"],
|
||||
"use-input-property-decorator": true,
|
||||
|
|
Loading…
Reference in New Issue
Block a user