resolved #26: Upgraded to angular 6

This commit is contained in:
İsmail ÇAGDAŞ 2018-05-08 11:46:01 +03:00
Родитель e7f5aa11c8
Коммит 9628c87af1
7 изменённых файлов: 259 добавлений и 625 удалений

835
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,15 +1,16 @@
{
"name": "abp-ng2-module",
"version": "2.1.0",
"version": "3.0.0",
"description": "AspNet Boilerplate Angular Module",
"main": "dist/bundles/abp-ng2-module.umd.js",
"module": "dist/index.js",
"scripts": {
"ngc": "ngc",
"cleanup": "rimraf dist/bundles dist/src dist/index.d.ts dist/index.metadata.json dist/index.js dist/index.js.map dist/LICENSE dist/README.md",
"bundling": "rollup -c",
"minify": "uglifyjs dist/bundles/abp-ng2-module.umd.js --screw-ie8 --compress --mangle --comments --output dist/bundles/abp-ng2-module.umd.min.js",
"copy": "copyfiles LICENSE README.md dist",
"build": "npm run cleanup && ngc && npm run bundling && npm run minify && npm run copy",
"build": "npm run cleanup && npm run ngc && npm run bundling && npm run minify && npm run copy",
"publish-to-npm": "cd dist && npm publish"
},
"keywords": [
@ -30,20 +31,19 @@
"url": "https://github.com/aspnetboilerplate/abp-ng2-module/issues"
},
"dependencies": {
"@angular/core": "^5.0.0",
"@angular/common": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/core": "^6.0.0",
"@angular/common": "^6.0.0",
"abp-web-resources": "^3.1.0"
},
"devDependencies": {
"@angular/compiler": "^5.0.0",
"@angular/compiler-cli": "^5.0.0",
"@angular/compiler": "^6.0.0",
"@angular/compiler-cli": "^6.0.0",
"copyfiles": "^1.0.0",
"rimraf": "^2.5.4",
"rollup": "^0.37.0",
"typescript": "^2.3.4",
"typescript": "2.7.2",
"uglify-js": "^2.7.5",
"rxjs": "^5.5.2",
"rxjs": "^6.1.0",
"zone.js": "^0.8.17"
}
}

Просмотреть файл

@ -2,6 +2,7 @@
import { HttpClient } from '@angular/common/http';
declare var jQuery: any;
declare var abp: any;
@Injectable()
export class AbpUserConfigurationService {

Просмотреть файл

@ -1,5 +1,4 @@
import { NgModule } from '@angular/core';
import { JsonpModule, XHRBackend, RequestOptions } from '@angular/http';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { AbpSessionService } from './session/abp-session.service';
@ -18,8 +17,7 @@ import { UtilsService } from './utils/utils.service';
@NgModule({
imports: [
HttpClientModule,
JsonpModule
HttpClientModule
],
declarations: [

Просмотреть файл

@ -1,6 +1,5 @@
import { Injectable } from '@angular/core';
import { XHRBackend, Headers, Request, Response, RequestMethod, RequestOptionsArgs, ResponseOptions, ResponseOptionsArgs, ConnectionBackend, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { Observable, Subject, of } from 'rxjs';
import { MessageService } from './message/message.service';
import { LogService } from './log/log.service';
import { TokenService } from './auth/token.service';
@ -8,16 +7,6 @@ import { UtilsService } from './utils/utils.service';
import { HttpClient, HttpInterceptor, HttpHandler, HttpRequest, HttpEvent, HttpResponse, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/observable/fromPromise';
import 'rxjs/add/observable/of';
import 'rxjs/add/observable/throw';
import { Subject } from 'rxjs/Subject';
export interface IValidationErrorInfo {
message: string;
@ -238,11 +227,10 @@ export class AbpHttpInterceptor implements HttpInterceptor {
var modifiedRequest = this.normalizeRequestHeaders(request);
next.handle(modifiedRequest)
.catch((error: any, caught: Observable<any>) => {
return this.handleErrorResponse(error, interceptObservable);
})
.subscribe((event: HttpEvent<any>) => {
this.handleSuccessResponse(event, interceptObservable );
}, (error: any) => {
return this.handleErrorResponse(error, interceptObservable);
});
return interceptObservable;
@ -349,7 +337,7 @@ export class AbpHttpInterceptor implements HttpInterceptor {
if(!(error.error instanceof Blob)){
interceptObservable.error(error);
interceptObservable.complete();
return Observable.of({});
return of({});
}
this.configuration.blobToText(error.error).subscribe(json => {

Просмотреть файл

@ -1 +1,2 @@
export { AbpModule } from './abp.module';
export { AbpUserConfigurationService } from './abp-user-configuration.service';

Просмотреть файл

@ -17,12 +17,15 @@
"sourceMap": true,
"inlineSources": true,
"target": "es5",
"skipLibCheck": true,
"skipLibCheck": false,
"lib": [
"es2015",
"dom"
]
},
"include": [
"./index.ts"
],
"files": [
"index.ts",
"./node_modules/abp-web-resources/Abp/Framework/scripts/abp.d.ts"