Commit 4a785ecc authored by Sebastian's avatar Sebastian

upgrade 8.0

parent cbc9b732
......@@ -16,11 +16,13 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/geoportal-frontend",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"preserveSymlinks": true,
"assets": [
"src/favicon.ico",
"src/assets"
......
This diff is collapsed.
......@@ -11,55 +11,54 @@
},
"private": true,
"dependencies": {
"@angular-devkit/core": "^0.6.8",
"@angular-devkit/schematics": "^0.6.8",
"@angular/animations": "^7.2.15",
"@angular/common": "^7.2.15",
"@angular/compiler": "^7.2.15",
"@angular/core": "^7.2.15",
"@angular/forms": "^7.2.15",
"@angular/http": "^7.2.15",
"@angular/platform-browser": "^7.2.15",
"@angular/platform-browser-dynamic": "^7.2.15",
"@angular/router": "^7.2.15",
"@ng-bootstrap/ng-bootstrap": "^4.2.1",
"@angular-devkit/core": "^8.3.24",
"@angular-devkit/schematics": "^8.3.24",
"@angular/animations": "^8.2.14",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"@angular/core": "^8.2.14",
"@angular/forms": "^8.2.14",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"@ng-bootstrap/ng-bootstrap": "^5.2.1",
"@types/openlayers": "^4.6.17",
"angular-font-awesome": "^3.1.2",
"boostrap": "^2.0.0",
"core-js": "^2.6.9",
"core-js": "^3.6.4",
"font-awesome": "^4.7.0",
"ngx-markdown": "^7.1.5",
"npm": "^6.9.0",
"ol": "^5.3.3",
"rxjs": "^6.5.2",
"tooltip.js": "^1.3.2",
"ngx-markdown": "^8.2.2",
"npm": "^6.13.7",
"ol": "^6.1.1",
"rxjs": "^6.5.4",
"tooltip.js": "^1.3.3",
"tslib": "^1.10.0",
"zone.js": "~0.8.29"
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.12.4",
"@angular/cli": "^7.3.9",
"@angular/compiler-cli": "^7.2.15",
"@angular/language-service": "^7.2.15",
"@types/jasmine": "^2.8.16",
"@types/jasminewd2": "^2.0.6",
"@types/node": "~8.9.4",
"angular-ide": "^0.9.63",
"angular-notifier": "^4.1.1",
"bootstrap": "^4.3.1",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"@angular-devkit/build-angular": "^0.803.24",
"@angular/cli": "^8.3.24",
"@angular/compiler-cli": "^8.2.14",
"@angular/language-service": "^8.2.14",
"@types/jasmine": "^3.5.2",
"@types/jasminewd2": "^2.0.8",
"@types/node": "~13.5.3",
"angular-ide": "^0.9.72",
"angular-notifier": "^6.0.1",
"bootstrap": "^4.4.1",
"codelyzer": "~5.2.1",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"ngx-spinner": "^7.1.4",
"protractor": "^5.4.2",
"sass": "^1.21.0",
"ts-node": "~5.0.1",
"tslint": "~5.12.1",
"typescript": "^3.2.4"
"karma": "~4.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "~3.1.0",
"karma-jasmine-html-reporter": "^1.5.1",
"ngx-spinner": "^8.1.0",
"protractor": "^5.4.3",
"sass": "^1.25.0",
"ts-node": "~8.6.2",
"tslint": "~6.0.0",
"typescript": "^3.5.3"
}
}
import { BrowserModule } from '@angular/platform-browser';
import { BrowserModule,BrowserAnimationsModule } from '@angular/platform-browser';
import { LOCALE_ID, NgModule, enableProdMode } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MarkdownModule } from 'ngx-markdown';
......@@ -137,7 +137,8 @@ enableProdMode();
MenubarItemComponent,
BliIconComponent,
TagComponent,
ElementFilterComponent
ElementFilterComponent,
BrowserAnimationsModule
],
imports: [
BrowserModule,
......@@ -159,6 +160,8 @@ enableProdMode();
TermsofuseComponent,
NetworkpartnersearchComponent,
AddsomethingComponent,
AuthComponent,
LoginComponent,
],
providers: [
LogService,
......
......@@ -22,7 +22,7 @@ export class AuthComponent implements OnInit {
private message: string;
private sending: boolean;
private loginForm: FormGroup;
private oauth = false;
public oauth = false;
constructor(
private logger: LogService,
private authService: AuthService,
......
......@@ -13,7 +13,7 @@ import { GeoportalApiService } from '../services/geoportal-api.service';
})
export class MenubarComponent implements OnInit {
constructor(private authService: AuthService, private apiService: GeoportalApiService, private logger:LogService,private modalService: ModalManagerService, private router:Router) {
constructor(public authService: AuthService, private apiService: GeoportalApiService, private logger:LogService,private modalService: ModalManagerService, private router:Router) {
}
......
<form [formGroup]="composemessageForm" (ngSubmit)="compose()">
<!--<form [formGroup]="composemessageForm" (ngSubmit)="compose()">
<div class="modal">
<div class="modal-header">
<button type="button" ng-click="closePopup()" class="close">×</button>
......@@ -12,7 +12,7 @@
</div>
</div>
<div class="form-group">
<input type="text" placeholder="Betreff" class="form-control" [ngClass]="" style="width:95%;" formControlName="messagesubj"><br />
<input type="text" placeholder="Betreff" class="form-control" style="width:95%;" formControlName="messagesubj"><br />
</div>
<textarea style="width:95%;" rows="10"></textarea>
</div>
......@@ -21,4 +21,7 @@
<a href="#" class="btn btn-primary" ng-click="sendEmail()">Absenden</a>
</div>
</div>
</form>
\ No newline at end of file
</form>-->
<div>
NYI
</div>
\ No newline at end of file
<div class="form-check">
<input *ngFor="let dimension of dimensions" class="form-check-input" type="checkbox" value="" id="{{dimension.name}}">
<label class="form-check-label" title="{{dimension.description}}" for="{{dimension.name}}">
<i [ngClass]="bliService.getIcon(dimension.name)"></i>
{{dimension.name}} <a *ngIf="authService.profileRetrieved && authService.currentUser.isAdmin"> [e]</a>
<div>NYI/TODO</div>
<!--<div class="form-check">
<input *ngFor="let dimension:BliDimension of dimensions" class="form-check-input" type="checkbox" value="" id="{{dimension.name}}">
<label class="form-check-label" title="{{dimension.description}}" for="{{dimension.name}}">
<i [ngClass]="bliService.getIcon(dimension.name)"></i>
{{dimension.name}} <a *ngIf="authService.profileRetrieved && authService.currentUser.isAdmin"> [e]</a>
</label>
</div>
\ No newline at end of file
</div>-->
\ No newline at end of file
......@@ -15,7 +15,7 @@ export class BliCheckComponent implements OnInit {
constructor(
private logger: LogService,
private bliService: BliService,
private authService: AuthService) {
public authService: AuthService) {
this.dimensions = bliService.dimensions;
}
......
......@@ -115,16 +115,16 @@ export class CreateEntryComponent implements OnInit {
constructor(
private formBuilder: FormBuilder,
private router: Router,
private logger: LogService,
private apiService: GeoportalApiService,
private authService: AuthService,
private overpass: OverpassService,
private cache: CacheService,
private bliService: BliService,
private categoryService: CategoryService,
private nodeService: OsmNodeService
public formBuilder: FormBuilder,
public router: Router,
public logger: LogService,
public apiService: GeoportalApiService,
public authService: AuthService,
public overpass: OverpassService,
public cache: CacheService,
public bliService: BliService,
public categoryService: CategoryService,
public nodeService: OsmNodeService
) {
this.logger.debug("createEntryComponent: constructing createEntry");
......
......@@ -21,11 +21,11 @@ export class RegisterComponent implements OnInit {
shoForm = true;
message: string;
constructor(
private formBuilder: FormBuilder,
private router: Router,
private logger: LogService,
private apiService: GeoportalApiService,
private authService: AuthService
public formBuilder: FormBuilder,
public router: Router,
public logger: LogService,
public apiService: GeoportalApiService,
public authService: AuthService
) { }
ngOnInit() {
......
......@@ -55,7 +55,7 @@ export class SearchComponent implements OnInit {
private routeParams:any = null;
constructor(
private nodeService : OsmNodeService,
public nodeService : OsmNodeService,
private formBuilder : FormBuilder,
private logger : LogService,
private apiService : GeoportalApiService,
......
......@@ -153,6 +153,7 @@ private handleTokenLoginResponse(response: any, saveLogin: boolean,token:string)
this.currentUser = new User(response);
this.currentUser.setOAuthToken(token);
this.apiService.setBearer(this.bearer);
this.apiService.saveBearer();
this.apiService.getCurrentUser().subscribe(
res => {
......
......@@ -18,6 +18,7 @@ export class CategoryService {
this.logger.debug("CategoryService: instantiating.");
this.categories = new Array<Category>();
this.readCategories();
this.logger.debug("instantiated.");
}
readCategories(){
......
......@@ -133,7 +133,6 @@ export class GeoportalApiService {
loginWithToken(token: string): Observable<any> {
let tokenWrap = new KeyValuePair({"key":"token","value":token});
this.logger.debug('geoportalApiService.loginWithToken();');
console.log("Sending: "+tokenWrap.key+"/"+tokenWrap.value);
let post = this.http.post<User>(
......
import { Injectable,ComponentFactoryResolver, ViewContainerRef, ComponentFactory } from '@angular/core';
import { Injectable, ComponentFactoryResolver, ViewContainerRef, ComponentFactory } from '@angular/core';
import { NgbModal, NgbModalConfig, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Subject, isObservable } from 'rxjs';
......@@ -81,21 +81,23 @@ export class ModalManagerService {
removeComponent(){
if(this.reference){
if(this.reference != undefined){
this.reference.destroy();
}
this.viewContainerRef.clear();
if(this.viewContainerRef != undefined){
this.viewContainerRef.clear();
}
}
configureComponent(comp: string){
let component = this.resolveComponent(comp);
if(component === null){
console.log("Cannot resolve component: "+comp);
console.warn("Cannot resolve component: "+comp);
return null;
}
if(this.viewContainerRef == null || this.viewContainerRef == undefined){
console.log("ViewContainerRef is undefined/null");
console.warn("ViewContainerRef is undefined/null");
return null;
}
return component;
......@@ -126,7 +128,13 @@ export class ModalManagerService {
this.modalConfig['backdrop']=true;
this.modalConfig['keyboard']=true;
this.modalConfig['beforeDismiss']=()=>this.onDismiss.next(true);
//this.modalConfig['beforeDismiss']=(){this.onDismiss.next(true);});
this.modalConfig['beforeDismiss']=()=>{
this.onDismiss.next(true);
return new Promise<boolean>(
(resolve,reject)=>{return resolve(true);}
)
};
this.modalRef = this.modalService.open(comp,this.modalConfig);
this.modalRef.onDismiss
this.modalRef.componentInstance.asModal = true;
......
......@@ -34,7 +34,7 @@ export class OsmNodeService {
private cache: CacheService,
private bliService: BliService,
private categoryService: CategoryService,
private nodeService: OsmNodeService,
//private nodeService: OsmNodeService,
private geoElementService: GeoElementService) {
this.result = new Array<OsmNode>();
this.dimensions = bliService.dimensions;
......
......@@ -8,7 +8,7 @@ import { AuthService } from '../../services/auth.service';
})
export class UserComponent implements OnInit {
constructor(private authService: AuthService) {
constructor(public authService: AuthService) {
authService.currentUser;
}
......
......@@ -15,9 +15,9 @@ export class UserprofilComponent implements OnInit {
false;
constructor(
private router:Router,
private authService: AuthService,
private logger: LogService
public router:Router,
public authService: AuthService,
public logger: LogService
) {
this.logger.debug("Constructing UserProfilComponent.");
this.currentUser = this.authService.currentUser;
......
......@@ -11,7 +11,7 @@ import { BliDimension } from '../../models/BliDimension';
export class ElementFilterComponent implements OnInit {
dimensions:Array<BliDimension>;
constructor(private bliService : BliService, private mapService: MapService) {
constructor(public bliService : BliService, public mapService: MapService) {
this.dimensions = new Array<BliDimension>();
}
......
......@@ -19,9 +19,14 @@ export class CategoryComponent implements OnInit {
categories : Array<Category>;
sharingCollapsed = true;
sustCollapsed = true;
constructor(private apiService: GeoportalApiService, private logger: LogService, private authService: AuthService, private cache: CacheService) {
public sustCollapsed = true;
public sharingOffersFocus = false;
public sharingOrganisatorFocus = false;
public sharingFreeOffersFocus = false;
public sharingNonFreeOffersFocus = false;
public sustainableNutritionFocus = false;
public sustainableNutritionAssortmentFocus = false;
constructor(public apiService: GeoportalApiService, public logger: LogService, public authService: AuthService, public cache: CacheService) {
this.categories = new Array<Category>();
}
ngOnInit() {
......
......@@ -34,14 +34,14 @@ export class CreateComponent implements OnInit {
id: number;
form: FormGroup;
constructor(
private nodeService: OsmNodeService,
private overpass: OverpassService,
private router: Router,
private route: ActivatedRoute,
private api: GeoportalApiService,
private logger: LogService,
private authService: AuthService,
private formBuilder: FormBuilder
public nodeService: OsmNodeService,
public overpass: OverpassService,
public router: Router,
public route: ActivatedRoute,
public api: GeoportalApiService,
public logger: LogService,
public authService: AuthService,
public formBuilder: FormBuilder
) {
}
......
......@@ -10,6 +10,7 @@ import { FormsModule ,FormBuilder, ReactiveFormsModule, FormGroup, Validators }
export class GoodplaceComponent implements OnInit {
@Input('node') node : OsmNode;
@Input('form') form : FormGroup;
public infoCollapsed:boolean=true;
constructor() { }
ngOnInit() {
......
......@@ -11,9 +11,9 @@ import { FormsModule, FormBuilder, ReactiveFormsModule, FormGroup, Validators }
export class NetworkpartnerComponent implements OnInit {
@Input('node') node: OsmNode;
@Input('form') form: FormGroup;
public descCollapsed:boolean=true;
public aktionsQuelleFocus:boolean=false;
constructor(
private modalService: ModalManagerService
) { }
......
......@@ -10,7 +10,7 @@ export class OsminformationComponent implements OnInit {
@Input('node') node : OsmNode;
@Input('form') form : FormGroup;
public infoCollapsed:boolean=true;
constructor() { }
ngOnInit() {
......
......@@ -5,6 +5,7 @@ import { ModalManagerService } from '../../../services/modal-manager.service';
import { AuthService } from '../../../services/auth.service';
import { GeoportalApiService } from '../../../services/geoportal-api.service';
import { Router } from '@angular/router';
import { LogService } from '../../../services/log.service';
@Component({
selector: 'app-login',
//templateUrl: './login.component.html',
......@@ -19,10 +20,12 @@ export class LoginComponent implements OnInit {
private modalManager: ModalManagerService,
private authService: AuthService,
private router : Router,
private apiService: GeoportalApiService
private apiService: GeoportalApiService,
private logger:LogService
) { }
ngOnInit() {
this.logger.notify("error","Login-Component onInit");
this.modalManager.open('AuthComponent');
}
......
......@@ -17,7 +17,7 @@ import { EditsourceComponent } from '../../../widgets/modals/editsource/editsour
styleUrls: ['./modal.component.css']
})
export class ModalComponent implements OnInit {
@ViewChild('content',{ read: ViewContainerRef} ) viewContainerRef: ViewContainerRef;
@ViewChild('content',{ read: ViewContainerRef,static:false} ) viewContainerRef: ViewContainerRef;
//@ViewChild('templateRef') templateRef: TemplateRef<any>;
modalOpened$:any;
......
......@@ -4,8 +4,15 @@
"outDir": "../out-tsc/app",
"types": []
},
"files": [
"main.ts",
"polyfills.ts"
],
"angularCompilerOptions": {
"enableIvy": true
},
"exclude": [
"test.ts",
"**/*.spec.ts"
"**/*.spec.ts",
]
}
{
"compileOnSave": false,
"compileOnSave": true,
"compilerOptions": {
"baseUrl": "./",
"importHelpers": true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment