Remove stateserializerservice from common-map
Some checks failed
FarmMaps.Develop/FarmMapsLib/develop There was a failure building this commit
Some checks failed
FarmMaps.Develop/FarmMapsLib/develop There was a failure building this commit
This commit is contained in:
@@ -2,7 +2,7 @@ import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleCh
|
||||
import { Feature } from 'ol';
|
||||
import { FeatureListComponent,AbstractFeatureListComponent } from '../feature-list/feature-list.component';
|
||||
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
||||
import {IQueryState } from '../../models/query.state';
|
||||
import {IQueryState } from '@farmmaps/common';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
import * as mapActions from '../../actions/map.actions';
|
||||
import { Store } from '@ngrx/store';
|
||||
|
@@ -1,52 +1,52 @@
|
||||
import { Component, Input, Injectable } from '@angular/core';
|
||||
import { Location } from '@angular/common';
|
||||
import { Feature } from 'ol';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
import { commonReducers,ItemTypeService, IItem, Item } from '@farmmaps/common';
|
||||
import * as mapActions from '../../actions/map.actions';
|
||||
import { Observable, from } from 'rxjs';
|
||||
import { withLatestFrom } from 'rxjs/operators';
|
||||
import { tassign } from 'tassign';
|
||||
import { IQueryState } from '../../models/query.state';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export abstract class AbstractFeatureListComponent {
|
||||
@Input() features: Array<Feature>;
|
||||
@Input() queryState: IQueryState;
|
||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location) {
|
||||
}
|
||||
|
||||
handleFeatureClick(feature:Feature) {
|
||||
var newQuery: any = tassign(mapReducers.initialState.query);
|
||||
newQuery.itemCode = feature.get('code');
|
||||
this.store.dispatch(new mapActions.DoQuery(newQuery));
|
||||
}
|
||||
|
||||
handleFeatureMouseEnter(feature) {
|
||||
this.store.dispatch(new mapActions.SelectFeature(feature));
|
||||
}
|
||||
|
||||
handleFeatureMouseLeave(feature) {
|
||||
this.store.dispatch(new mapActions.SelectFeature(null));
|
||||
}
|
||||
|
||||
handleBackClick(event: MouseEvent) {
|
||||
event.preventDefault();
|
||||
this.location.back();
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@Component({
|
||||
selector: 'fm-map-feature-list',
|
||||
templateUrl: './feature-list.component.html',
|
||||
styleUrls: ['./feature-list.component.scss']
|
||||
})
|
||||
export class FeatureListComponent extends AbstractFeatureListComponent {
|
||||
|
||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService,location:Location) {
|
||||
super(store, itemTypeService,location);
|
||||
}
|
||||
}
|
||||
import { Component, Input, Injectable } from '@angular/core';
|
||||
import { Location } from '@angular/common';
|
||||
import { Feature } from 'ol';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
import { commonReducers,ItemTypeService, IItem, Item } from '@farmmaps/common';
|
||||
import * as mapActions from '../../actions/map.actions';
|
||||
import { Observable, from } from 'rxjs';
|
||||
import { withLatestFrom } from 'rxjs/operators';
|
||||
import { tassign } from 'tassign';
|
||||
import { IQueryState } from '@farmmaps/common';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export abstract class AbstractFeatureListComponent {
|
||||
@Input() features: Array<Feature>;
|
||||
@Input() queryState: IQueryState;
|
||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location) {
|
||||
}
|
||||
|
||||
handleFeatureClick(feature:Feature) {
|
||||
var newQuery: any = tassign(mapReducers.initialState.query);
|
||||
newQuery.itemCode = feature.get('code');
|
||||
this.store.dispatch(new mapActions.DoQuery(newQuery));
|
||||
}
|
||||
|
||||
handleFeatureMouseEnter(feature) {
|
||||
this.store.dispatch(new mapActions.SelectFeature(feature));
|
||||
}
|
||||
|
||||
handleFeatureMouseLeave(feature) {
|
||||
this.store.dispatch(new mapActions.SelectFeature(null));
|
||||
}
|
||||
|
||||
handleBackClick(event: MouseEvent) {
|
||||
event.preventDefault();
|
||||
this.location.back();
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@Component({
|
||||
selector: 'fm-map-feature-list',
|
||||
templateUrl: './feature-list.component.html',
|
||||
styleUrls: ['./feature-list.component.scss']
|
||||
})
|
||||
export class FeatureListComponent extends AbstractFeatureListComponent {
|
||||
|
||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService,location:Location) {
|
||||
super(store, itemTypeService,location);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@ import { Component, Input, Output, OnInit, EventEmitter, SimpleChanges, OnChange
|
||||
import { Observable , of } from 'rxjs';
|
||||
import { debounceTime,distinctUntilChanged,tap,switchMap,merge,catchError} from 'rxjs/operators';
|
||||
import { TypeaheadService, TimespanService } from '@farmmaps/common';
|
||||
import { IQueryState } from '../../models/query.state';
|
||||
import { IQueryState } from '@farmmaps/common';
|
||||
import { IPeriodState } from '../../models/period.state';
|
||||
import { tassign } from 'tassign';
|
||||
|
||||
|
@@ -12,12 +12,12 @@ import * as mapActions from '../../actions/map.actions';
|
||||
import { IMapState} from '../../models/map.state';
|
||||
import { ISelectedFeatures } from '../../models/selected.features';
|
||||
import { IItemLayer } from '../../models/item.layer';
|
||||
import { IQueryState } from '../../models/query.state';
|
||||
import { IQueryState } from '@farmmaps/common';
|
||||
import { IPeriodState } from '../../models/period.state';
|
||||
import {IStyles} from '../../models/style.cache';
|
||||
import { IDroppedFile } from '../aol/file-drop-target/file-drop-target.component';
|
||||
import { IMetaData } from '../meta-data-modal/meta-data-modal.component';
|
||||
import { StateSerializerService } from '../../services/state-serializer.service';
|
||||
import { StateSerializerService } from '@farmmaps/common';
|
||||
import { GeolocationService} from '../../services/geolocation.service';
|
||||
import {DeviceOrientationService} from '../../services/device-orientation.service';
|
||||
|
||||
|
Reference in New Issue
Block a user