mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1868] Update to Angular 5 (#2606)
* Angular 5.0.0 update * fix core http import * split language html from ts * http deprecation module change * fix test core * fix analytics api * update dependency * exclude breadcrumb object picker test * fix viewer and common new test * fix test cs * fix tasklist test * fix demo shell angular 5 * fix translate * dix search test * restore files demo shell * update tsconfig * rebuild automatic prebuild theme * Fix breadcrumb tests * Fix tests, the right way
This commit is contained in:
@@ -37,36 +37,37 @@
|
||||
"alfresco"
|
||||
],
|
||||
"dependencies": {
|
||||
"@angular/animations": "4.4.5",
|
||||
"@angular/animations": "5.0.0",
|
||||
"@angular/cdk": "2.0.0-beta.12",
|
||||
"@angular/common": "4.4.5",
|
||||
"@angular/compiler": "4.4.5",
|
||||
"@angular/core": "4.4.5",
|
||||
"@angular/forms": "4.4.5",
|
||||
"@angular/http": "4.4.5",
|
||||
"@angular/common": "5.0.0",
|
||||
"@angular/compiler": "5.0.0",
|
||||
"@angular/core": "5.0.0",
|
||||
"@angular/flex-layout": "2.0.0-beta.10",
|
||||
"@angular/forms": "5.0.0",
|
||||
"@angular/http": "5.0.0",
|
||||
"@angular/material": "2.0.0-beta.12",
|
||||
"@angular/platform-browser": "4.4.5",
|
||||
"@angular/platform-browser-dynamic": "4.4.5",
|
||||
"@angular/router": "4.4.5",
|
||||
"@angular/platform-browser": "5.0.0",
|
||||
"@angular/platform-browser-dynamic": "5.0.0",
|
||||
"@angular/router": "5.0.0",
|
||||
"@ngx-translate/core": "8.0.0",
|
||||
"alfresco-js-api": "1.9.0",
|
||||
"core-js": "2.4.1",
|
||||
"hammerjs": "2.0.8",
|
||||
"ng2-alfresco-core": "1.9.0",
|
||||
"pdfjs-dist": "1.5.404",
|
||||
"reflect-metadata": "0.1.10",
|
||||
"rxjs": "5.1.0",
|
||||
"systemjs": "0.19.27",
|
||||
"zone.js": "0.8.12"
|
||||
"core-js": "2.4.1",
|
||||
"rxjs": "5.5.2",
|
||||
"zone.js": "0.8.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/hammerjs": "2.0.35",
|
||||
"@types/jasmine": "2.5.35",
|
||||
"@types/node": "6.0.45",
|
||||
"@types/node": "6.0.90",
|
||||
"adf-tslint-rules": "0.0.4",
|
||||
"angular2-template-loader": "0.6.2",
|
||||
"autoprefixer": "6.5.4",
|
||||
"codelyzer": "3.1.2",
|
||||
"codelyzer": "4.0.0",
|
||||
"copy-webpack-plugin": "4.0.1",
|
||||
"css-loader": "0.25.0",
|
||||
"css-to-string-loader": "0.1.2",
|
||||
@@ -74,23 +75,23 @@
|
||||
"extract-text-webpack-plugin": "2.0.0-rc.3",
|
||||
"file-loader": "0.11.1",
|
||||
"fork-ts-checker-webpack-plugin": "0.2.3",
|
||||
"happypack": "3.0.0",
|
||||
"happypack": "4.0.0",
|
||||
"html-loader": "0.4.4",
|
||||
"html-webpack-plugin": "2.28.0",
|
||||
"istanbul-instrumenter-loader": "0.2.0",
|
||||
"jasmine-ajax": "3.2.0",
|
||||
"jasmine-core": "2.4.1",
|
||||
"karma": "0.13.22",
|
||||
"karma-chrome-launcher": "~1.0.1",
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma-coverage": "1.1.1",
|
||||
"karma-jasmine": "~1.0.2",
|
||||
"karma-jasmine": "1.1.0",
|
||||
"karma-jasmine-ajax": "0.1.13",
|
||||
"karma-jasmine-html-reporter": "0.2.0",
|
||||
"karma-jasmine-html-reporter": "0.2.2",
|
||||
"karma-mocha-reporter": "2.2.2",
|
||||
"karma-remap-istanbul": "0.6.0",
|
||||
"karma-sourcemap-loader": "0.3.7",
|
||||
"karma-systemjs": "0.16.0",
|
||||
"karma-webpack": "2.0.3",
|
||||
"karma-webpack": "2.0.5",
|
||||
"loader-utils": "1.1.0",
|
||||
"merge-stream": "1.0.1",
|
||||
"node-sass": "4.5.3",
|
||||
@@ -107,13 +108,13 @@
|
||||
"systemjs-builder": "0.15.34",
|
||||
"to-string-loader": "1.1.5",
|
||||
"traceur": "0.0.91",
|
||||
"ts-loader": "2.2.1",
|
||||
"ts-node": "1.7.0",
|
||||
"tslint": "5.5.0",
|
||||
"ts-loader": "3.1.1",
|
||||
"ts-node": "2.0.0",
|
||||
"tslint": "5.7.0",
|
||||
"tslint-loader": "3.5.3",
|
||||
"typescript": "2.5.2",
|
||||
"webpack": "2.2.1",
|
||||
"webpack-dev-server": "2.3.0",
|
||||
"typescript": "2.4.2",
|
||||
"webpack": "3.8.1",
|
||||
"webpack-dev-server": "2.9.4",
|
||||
"webpack-merge": "2.6.1",
|
||||
"wsrv": "0.1.7"
|
||||
},
|
||||
|
@@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Component, Input, OnChanges, ViewEncapsulation } from '@angular/core';
|
||||
import { SimpleChanges } from '@angular/core';
|
||||
import { Http, RequestOptions, Response, ResponseContentType } from '@angular/http';
|
||||
import 'rxjs/add/operator/toPromise';
|
||||
|
||||
@Component({
|
||||
@@ -37,7 +37,7 @@ export class TxtViewerComponent implements OnChanges {
|
||||
|
||||
content: string;
|
||||
|
||||
constructor(private http: Http) {
|
||||
constructor(private http: HttpClient) {
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): Promise<any> {
|
||||
@@ -59,16 +59,12 @@ export class TxtViewerComponent implements OnChanges {
|
||||
|
||||
private getUrlContent(url: string): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
this.http.get(url, new RequestOptions({
|
||||
responseType: ResponseContentType.Text
|
||||
})).toPromise().then(
|
||||
(res: Response) => {
|
||||
this.content = res.text();
|
||||
resolve();
|
||||
}, (event) => {
|
||||
reject(event);
|
||||
});
|
||||
this.http.get(url, { responseType: 'text' }).subscribe(res => {
|
||||
this.content = res;
|
||||
resolve();
|
||||
}, (event) => {
|
||||
reject(event);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -136,7 +136,7 @@
|
||||
<ng-template
|
||||
*ngIf="extensionTemplate.isVisible"
|
||||
[ngTemplateOutlet]="extensionTemplate.template"
|
||||
[ngOutletContext]="{ urlFileContent: urlFileContent, extension:extension }">
|
||||
[ngTemplateOutletContext]="{ urlFileContent: urlFileContent, extension:extension }">
|
||||
</ng-template>
|
||||
</span>
|
||||
</ng-container>
|
||||
|
Reference in New Issue
Block a user