Add test component
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2020-10-06 09:07:40 +02:00
parent da2492e017
commit 640c99cde2
8 changed files with 78 additions and 14 deletions

18
package-lock.json generated
View File

@ -1707,25 +1707,25 @@
} }
}, },
"@farmmaps/common": { "@farmmaps/common": {
"version": "0.0.1-prerelease.430", "version": "0.0.1-prerelease.434",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common/-/common-0.0.1-prerelease.430.tgz", "resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common/-/common-0.0.1-prerelease.434.tgz",
"integrity": "sha512-UMllsjUL+ky/jIde0CxHov9xB6bpdtb0ZF2aoRltbJWBR6Eaoa7O5i3c6BrQn7BxTNcPWcFyPgHLr3/r8BgtVg==", "integrity": "sha512-4xDbu8GV7iP05ZfHx2IoA0imvbdmCM+bUnNQ8kUAGvvudgg4pzDsItFG5PkQBnYd7IfpLiwOLXHCFAa6SvijCg==",
"requires": { "requires": {
"tslib": "^2.0.0" "tslib": "^2.0.0"
} }
}, },
"@farmmaps/common-map": { "@farmmaps/common-map": {
"version": "0.0.1-prerelease.430", "version": "0.0.1-prerelease.434",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map/-/common-map-0.0.1-prerelease.430.tgz", "resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map/-/common-map-0.0.1-prerelease.434.tgz",
"integrity": "sha512-9g0GDpYHKiP04KOjj1bxMSgrK2hs3dKp4TXFWE1PNczKjuBXNSceviAFSo1dyghP5oYZBQJquHxI0nF1Ks8eRg==", "integrity": "sha512-DGp6cRGSpyJ/TxnQ3XH1enXJO1vQgULixU9i2HGgs5/2Gc65Cps3oPRObYrzjwPEOATfDGGthzdveeL5+cpGMg==",
"requires": { "requires": {
"tslib": "^2.0.0" "tslib": "^2.0.0"
} }
}, },
"@farmmaps/common-map3d": { "@farmmaps/common-map3d": {
"version": "0.0.1-prerelease.430", "version": "0.0.1-prerelease.434",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map3d/-/common-map3d-0.0.1-prerelease.430.tgz", "resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map3d/-/common-map3d-0.0.1-prerelease.434.tgz",
"integrity": "sha512-a1tBLu57+tQaInKs6DJQrrKIJ/YkV+asPNPAd0P9wHVpai4wLe0EPZeD5p1MPvKhyU5a9udq26tx0I53VwPlLQ==", "integrity": "sha512-EbtdamVsJlop2EHJRYUzrXsz2356CCjyRYbrPKNCrhMtXhKLk2hRW2of5C4+LVdcutCudJbAa6zll9k6Nb905w==",
"requires": { "requires": {
"tslib": "^2.0.0" "tslib": "^2.0.0"
} }

View File

@ -19,9 +19,9 @@
"@angular/platform-browser": "~10.1.3", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~10.1.3", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/router": "~10.1.3", "@angular/router": "~10.1.3",
"@farmmaps/common": ">=0.0.1-prerelease.430 <0.0.1", "@farmmaps/common": ">=0.0.1-prerelease.434 <0.0.1",
"@farmmaps/common-map": ">=0.0.1-prerelease.430 <0.0.1", "@farmmaps/common-map": ">=0.0.1-prerelease.434 <0.0.1",
"@farmmaps/common-map3d": ">=0.0.1-prerelease.430 <0.0.1", "@farmmaps/common-map3d": ">=0.0.1-prerelease.434 <0.0.1",
"@microsoft/signalr": "^3.1.3", "@microsoft/signalr": "^3.1.3",
"@ng-bootstrap/ng-bootstrap": "^7.0", "@ng-bootstrap/ng-bootstrap": "^7.0",
"@ngrx/effects": "^10.0", "@ngrx/effects": "^10.0",

View File

@ -9,6 +9,7 @@ import { MenuComponent } from './menu/menu.component';
import {RegisterDeviceComponent} from './registerdevice/registerdevice.component'; import {RegisterDeviceComponent} from './registerdevice/registerdevice.component';
import {NotImplementedComponent} from '@farmmaps/common'; import {NotImplementedComponent} from '@farmmaps/common';
import { NavBarGuard } from 'projects/common/src/public-api'; import { NavBarGuard } from 'projects/common/src/public-api';
import {TestComponent} from './test/test.component';
export function urlMatcher(url: UrlSegment[]) { export function urlMatcher(url: UrlSegment[]) {
return {consumed:url}; return {consumed:url};
@ -65,6 +66,10 @@ const routes = [
path:'registerdevice/:deviceToken', path:'registerdevice/:deviceToken',
canActivate:[FullScreenGuard], canActivate:[FullScreenGuard],
component:RegisterDeviceComponent component:RegisterDeviceComponent
},
{
path:'test',
component: TestComponent
} }
]; ];

View File

@ -22,6 +22,7 @@ import {RegisterDeviceComponent} from './registerdevice/registerdevice.component
import { SecureOAuthStorage} from '@farmmaps/common'; import { SecureOAuthStorage} from '@farmmaps/common';
import { OAuthStorage } from 'angular-oauth2-oidc'; import { OAuthStorage } from 'angular-oauth2-oidc';
import {Id4AuthconfigFactory} from './id4AuthconfigFactory'; import {Id4AuthconfigFactory} from './id4AuthconfigFactory';
import { TestComponent } from './test/test.component';
export const BOOTSTRAP_EFFECTS = new InjectionToken('Bootstrap Effects'); export const BOOTSTRAP_EFFECTS = new InjectionToken('Bootstrap Effects');
@ -65,7 +66,8 @@ export const metaReducers: MetaReducer<any>[] = [debug];
AppRootComponent, AppRootComponent,
LogoComponent, LogoComponent,
MenuComponent, MenuComponent,
RegisterDeviceComponent RegisterDeviceComponent,
TestComponent
], ],
imports: [ imports: [
AppRoutingModule, AppRoutingModule,

View File

@ -0,0 +1,12 @@
<div class="container">
<div class="row">
<fm-gradient-select [gradientItems]="gradientItems|async" [showLabel]="false" [showAdd]="true"></fm-gradient-select>
</div>
<div class="row mt-3">
<button class="btn btn-primary">Test</button>
</div>
</div>

View File

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TestComponent } from './test.component';
describe('TestComponent', () => {
let component: TestComponent;
let fixture: ComponentFixture<TestComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ TestComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(TestComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
import { ItemService} from '@farmmaps/common';
import { Observable} from 'rxjs';
@Component({
selector: 'app-test',
templateUrl: './test.component.html',
styleUrls: ['./test.component.scss']
})
export class TestComponent implements OnInit {
public gradientItems:Observable<any[]>
constructor(private itemService$:ItemService) {
this.gradientItems = this.itemService$.getItemList("vnd.farmmaps.itemtype.gradient");
}
ngOnInit(): void {
}
}