From 66aa19404a2b4c61106c89da134a757ea5d34adc Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Mon, 14 Dec 2015 17:20:40 +0200 Subject: [PATCH] Update angular2 to the latest alpha + migrate --- lib/common/components/Tabs/tabs.js | 7 ++- lib/common/components/Zippy/zippy.html | 6 +- lib/common/components/Zippy/zippy.js | 3 +- lib/components/ApiInfo/api-info.html | 14 ++--- lib/components/JsonSchema/json-schema.html | 16 +++--- lib/components/JsonSchema/json-schema.js | 2 +- .../JsonSchemaView/json-schema-view.js | 2 +- lib/components/Method/method.html | 12 ++-- lib/components/MethodsList/methods-list.html | 8 +-- lib/components/ParamsList/params-list.html | 16 +++--- lib/components/Redoc/redoc.js | 2 +- .../ResponsesList/responses-list.html | 12 ++-- .../ResponsesSamples/responses-samples.html | 10 ++-- .../SchemaSample/schema-sample.html | 2 +- lib/components/SideMenu/side-menu.html | 10 ++-- lib/components/SideMenu/side-menu.js | 9 ++- lib/components/base.js | 5 +- lib/components/base.spec.js | 20 +++---- lib/events.js | 2 +- lib/index.js | 2 +- lib/utils/pipes.js | 2 +- package.json | 2 +- system.config.js | 55 +++++++++++-------- 23 files changed, 117 insertions(+), 102 deletions(-) diff --git a/lib/common/components/Tabs/tabs.js b/lib/common/components/Tabs/tabs.js index 297028cb..e9cd76db 100644 --- a/lib/common/components/Tabs/tabs.js +++ b/lib/common/components/Tabs/tabs.js @@ -1,6 +1,7 @@ 'use strict'; -import {Component, View, CORE_DIRECTIVES} from 'angular2/angular2'; +import {Component, View} from 'angular2/core'; +import {CORE_DIRECTIVES} from 'angular2/common'; @Component({ selector: 'tabs' @@ -8,7 +9,7 @@ import {Component, View, CORE_DIRECTIVES} from 'angular2/angular2'; @View({ template: ` @@ -39,7 +40,7 @@ export class Tabs { @Component({ selector: 'tab', - inputs: ['tabTitle: tab-title', 'tabStatus: tab-status'] + inputs: ['tabTitle', 'tabStatus'] }) @View({ template: ` diff --git a/lib/common/components/Zippy/zippy.html b/lib/common/components/Zippy/zippy.html index 4f89c200..127ccac4 100644 --- a/lib/common/components/Zippy/zippy.html +++ b/lib/common/components/Zippy/zippy.html @@ -1,9 +1,9 @@ -
+
- {{ visible ? '▾' : '▸' }} + {{ visible ? '▾' : '▸' }} {{title}}
-
+
diff --git a/lib/common/components/Zippy/zippy.js b/lib/common/components/Zippy/zippy.js index c542d11f..90ab8501 100644 --- a/lib/common/components/Zippy/zippy.js +++ b/lib/common/components/Zippy/zippy.js @@ -1,6 +1,7 @@ 'use strict'; -import {Component, View, EventEmitter, CORE_DIRECTIVES} from 'angular2/angular2'; +import {Component, View, EventEmitter} from 'angular2/core'; +import {CORE_DIRECTIVES} from 'angular2/common'; @Component({ selector: 'zippy', diff --git a/lib/components/ApiInfo/api-info.html b/lib/components/ApiInfo/api-info.html index 0139f6d1..a2d3033d 100644 --- a/lib/components/ApiInfo/api-info.html +++ b/lib/components/ApiInfo/api-info.html @@ -1,15 +1,15 @@

{{data.title}} ({{data.version}})

-

+

- Contact: - + Contact: + {{data.contact.name || data.contact.url}} - + {{data.contact.email}} - License: - {{data.license.name}} - {{data.license.name}} + License: + {{data.license.name}} + {{data.license.name}}

diff --git a/lib/components/JsonSchema/json-schema.html b/lib/components/JsonSchema/json-schema.html index bb415c02..49c3a05c 100644 --- a/lib/components/JsonSchema/json-schema.html +++ b/lib/components/JsonSchema/json-schema.html @@ -1,20 +1,20 @@ -{{errorMessage}} -{{_displayType}} -
-
+{{errorMessage}} +{{_displayType}} +
+
{{prop._name}}
- {{prop._displayType}} {{prop._displayFormat}} - Required + {{prop._displayType}} {{prop._displayFormat}} + Required
-
+
-
+
diff --git a/lib/components/JsonSchema/json-schema.js b/lib/components/JsonSchema/json-schema.js index 318f69e3..68e0f253 100644 --- a/lib/components/JsonSchema/json-schema.js +++ b/lib/components/JsonSchema/json-schema.js @@ -1,7 +1,7 @@ 'use strict'; import {RedocComponent, BaseComponent} from '../base'; -import {ElementRef} from 'angular2/angular2'; +import {ElementRef} from 'angular2/core'; import JsonPointer from '../../utils/JsonPointer'; @RedocComponent({ diff --git a/lib/components/JsonSchemaView/json-schema-view.js b/lib/components/JsonSchemaView/json-schema-view.js index 3341c8cb..722124ac 100644 --- a/lib/components/JsonSchemaView/json-schema-view.js +++ b/lib/components/JsonSchemaView/json-schema-view.js @@ -8,7 +8,7 @@ import 'json-formatter-js/dist/style.css!'; import JSONSchemaView from 'json-schema-view-js/src/index'; import 'json-schema-view-js/dist/style.css!'; -import {ElementRef} from 'angular2/angular2'; +import {ElementRef} from 'angular2/core'; @RedocComponent({ selector: 'schema', diff --git a/lib/components/Method/method.html b/lib/components/Method/method.html index 3dc6351a..48c3acc2 100644 --- a/lib/components/Method/method.html +++ b/lib/components/Method/method.html @@ -4,20 +4,20 @@ {{data.methodInfo.summary}}

- {{data.method}} + {{data.method}} {{data.apiUrl}} {{data.path}}

-
-
+
Body sample
diff --git a/lib/components/MethodsList/methods-list.html b/lib/components/MethodsList/methods-list.html index 5d855f97..4532d941 100644 --- a/lib/components/MethodsList/methods-list.html +++ b/lib/components/MethodsList/methods-list.html @@ -1,10 +1,10 @@
-
+

{{tag.name}}

-

+

- - +
diff --git a/lib/components/ParamsList/params-list.html b/lib/components/ParamsList/params-list.html index 5d72fa55..fbbdb382 100644 --- a/lib/components/ParamsList/params-list.html +++ b/lib/components/ParamsList/params-list.html @@ -1,23 +1,23 @@ -

Parameters

+

Parameters

-
+
{{param.name}}
- {{param.type}} - Required + {{param.type}} + Required
-
+
-
-

Request Body

+
+

Request Body

-
+
diff --git a/lib/components/Redoc/redoc.js b/lib/components/Redoc/redoc.js index dab5b6ae..3e83ef4c 100644 --- a/lib/components/Redoc/redoc.js +++ b/lib/components/Redoc/redoc.js @@ -5,7 +5,7 @@ import SchemaManager from '../../utils/SchemaManager'; import ApiInfo from '../ApiInfo/api-info'; import MethodsList from '../MethodsList/methods-list'; import SideMenu from '../SideMenu/side-menu'; -import {ChangeDetectionStrategy} from 'angular2/angular2'; +import {ChangeDetectionStrategy} from 'angular2/core'; @RedocComponent({ selector: 'redoc', diff --git a/lib/components/ResponsesList/responses-list.html b/lib/components/ResponsesList/responses-list.html index 3c7b07c3..aa9df574 100644 --- a/lib/components/ResponsesList/responses-list.html +++ b/lib/components/ResponsesList/responses-list.html @@ -1,19 +1,19 @@ -

Responses

- Responses + -
+
Headers
-
+
{{header.name}}
{{header.type}}
-
+
Response schema
- + diff --git a/lib/components/ResponsesSamples/responses-samples.html b/lib/components/ResponsesSamples/responses-samples.html index 01c6be39..31de7dac 100644 --- a/lib/components/ResponsesSamples/responses-samples.html +++ b/lib/components/ResponsesSamples/responses-samples.html @@ -1,7 +1,7 @@ -
Responses samples
- - - +
Responses samples
+ + + diff --git a/lib/components/SchemaSample/schema-sample.html b/lib/components/SchemaSample/schema-sample.html index fd02ae08..f01cfb59 100644 --- a/lib/components/SchemaSample/schema-sample.html +++ b/lib/components/SchemaSample/schema-sample.html @@ -1,5 +1,5 @@
-
 Sample unavailable 
+
 Sample unavailable 
{{data.sample | json}}
diff --git a/lib/components/SideMenu/side-menu.html b/lib/components/SideMenu/side-menu.html index 4cd9980e..53d125c1 100644 --- a/lib/components/SideMenu/side-menu.html +++ b/lib/components/SideMenu/side-menu.html @@ -1,10 +1,10 @@ -