Add @Directive attributes

This commit is contained in:
Willem Dantuma 2020-04-01 10:05:44 +02:00
parent a5a7e1ece1
commit 511f1f4731
5 changed files with 72 additions and 66 deletions

View File

@ -1,28 +1,29 @@
import { Component, Input, Injectable} from '@angular/core';
import { Feature } from 'ol';
import { Store } from '@ngrx/store';
import * as mapReducers from '../../reducers/map.reducer';
import { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
@Injectable()
export abstract class AbstractFeatureListFeatureComponent {
@Input() feature: Feature
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService,public config:AppConfig) {
}
}
@Injectable()
@Component({
selector: 'fm-map-feature-list-feature',
templateUrl: './feature-list-feature.component.html',
styleUrls: ['./feature-list-feature.component.scss']
})
export class FeatureListFeatureComponent extends AbstractFeatureListFeatureComponent {
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, config:AppConfig) {
super(store, itemTypeService,config);
}
}
import { Component, Input, Injectable,Directive} from '@angular/core';
import { Feature } from 'ol';
import { Store } from '@ngrx/store';
import * as mapReducers from '../../reducers/map.reducer';
import { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
@Injectable()
@Directive()
export abstract class AbstractFeatureListFeatureComponent {
@Input() feature: Feature
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService,public config:AppConfig) {
}
}
@Injectable()
@Component({
selector: 'fm-map-feature-list-feature',
templateUrl: './feature-list-feature.component.html',
styleUrls: ['./feature-list-feature.component.scss']
})
export class FeatureListFeatureComponent extends AbstractFeatureListFeatureComponent {
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, config:AppConfig) {
super(store, itemTypeService,config);
}
}

View File

@ -1,4 +1,4 @@
import { Component, Input, Injectable } from '@angular/core';
import { Component, Input, Injectable,Directive } from '@angular/core';
import { Location } from '@angular/common';
import { Feature } from 'ol';
import { Store } from '@ngrx/store';
@ -12,6 +12,7 @@ import { IQueryState } from '@farmmaps/common';
@Injectable()
@Directive()
export abstract class AbstractFeatureListComponent {
@Input() features: Array<Feature>;
@Input() queryState: IQueryState;

View File

@ -1,35 +1,37 @@
import { Component, Input, Injectable} from '@angular/core';
import { Store } from '@ngrx/store';
import * as mapReducers from '../../reducers/map.reducer';
import { commonReducers,ItemTypeService,IListItem } from '@farmmaps/common';
@Injectable()
export abstract class AbstractItemListItemComponent {
@Input() item: IListItem
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService) {
}
}
@Injectable()
export abstract class AbstractItemWidgetComponent {
@Input() item: IListItem
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService) {
}
}
@Injectable()
@Component({
selector: 'fm-map-item-list-item',
templateUrl: './item-list-item.component.html',
styleUrls: ['./item-list-item.component.scss']
})
export class ItemListItemComponent extends AbstractItemListItemComponent {
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService) {
super(store, itemTypeService);
}
}
import { Component, Input, Injectable,Directive} from '@angular/core';
import { Store } from '@ngrx/store';
import * as mapReducers from '../../reducers/map.reducer';
import { commonReducers,ItemTypeService,IListItem } from '@farmmaps/common';
@Injectable()
@Directive()
export abstract class AbstractItemListItemComponent {
@Input() item: IListItem
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService) {
}
}
@Injectable()
@Directive()
export abstract class AbstractItemWidgetComponent {
@Input() item: IListItem
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService) {
}
}
@Injectable()
@Component({
selector: 'fm-map-item-list-item',
templateUrl: './item-list-item.component.html',
styleUrls: ['./item-list-item.component.scss']
})
export class ItemListItemComponent extends AbstractItemListItemComponent {
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService) {
super(store, itemTypeService);
}
}

View File

@ -1,4 +1,4 @@
import { Component, Input, Injectable } from '@angular/core';
import { Component, Input, Injectable, Directive } from '@angular/core';
import { Location } from '@angular/common';
import { Store } from '@ngrx/store';
import * as mapReducers from '../../reducers/map.reducer';
@ -8,6 +8,7 @@ import { tassign } from 'tassign';
@Injectable()
@Directive()
export abstract class AbstractItemListComponent {
@Input() items: Array<IListItem>
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location) {

View File

@ -1,4 +1,4 @@
import {Component, Injectable, Input} from '@angular/core';
import {Component, Injectable, Input, Directive} from '@angular/core';
import {Location} from '@angular/common';
import {Store} from '@ngrx/store';
import * as mapReducers from '../../reducers/map.reducer';
@ -9,6 +9,7 @@ import { IItemLayer } from '../../models/item.layer';
@Injectable()
@Directive()
export abstract class AbstractSelectedItemComponent {
@Input() item: IItem
@Input() itemLayer: IItemLayer;