libs/depiction/src/lib/datasetlist/timeseries/configurable-timeseries-entry/configurable-timeseries-entry.component.ts
Extends the SimpleTimeseriesEntryComponent, with the following functions:
SimpleTimeseriesEntryComponent
selector | n52-configurable-timeseries-entry |
styleUrls | ./configurable-timeseries-entry.component.css |
templateUrl | ./configurable-timeseries-entry.component.html |
Properties |
|
Methods |
|
Inputs |
Outputs |
constructor(servicesConnector: HelgolandServicesConnector, internalIdHandler: InternalIdHandler, translateSrvc: TranslateService)
|
||||||||||||
Parameters :
|
datasetOptions | |
Type : DatasetOptions
|
|
highlight | |
Type : boolean
|
|
datasetId | |
Type : string
|
|
Inherited from
ListEntryComponent
|
|
Defined in
ListEntryComponent:15
|
selected | |
Type : boolean
|
|
Inherited from
ListEntryComponent
|
|
Defined in
ListEntryComponent:18
|
onEditOptions | |
Type : EventEmitter<DatasetOptions>
|
|
onShowGeometry | |
Type : EventEmitter<GeoJSON.GeoJsonObject>
|
|
onUpdateOptions | |
Type : EventEmitter<DatasetOptions>
|
|
onDeleteDataset | |
Type : EventEmitter<boolean>
|
|
Inherited from
ListEntryComponent
|
|
Defined in
ListEntryComponent:21
|
onSelectDataset | |
Type : EventEmitter<boolean>
|
|
Inherited from
ListEntryComponent
|
|
Defined in
ListEntryComponent:24
|
Public editDatasetOptions |
editDatasetOptions()
|
Returns :
void
|
Public showGeometry |
showGeometry()
|
Returns :
void
|
Public toggleVisibility |
toggleVisibility()
|
Returns :
void
|
Protected loadDataset | ||||||
loadDataset(lang?: string)
|
||||||
Inherited from
SimpleTimeseriesEntryComponent
|
||||||
Defined in
SimpleTimeseriesEntryComponent:42
|
||||||
Parameters :
Returns :
void
|
Protected setDataset | ||||||
setDataset(timeseries: HelgolandTimeseries)
|
||||||
Inherited from
SimpleTimeseriesEntryComponent
|
||||||
Defined in
SimpleTimeseriesEntryComponent:50
|
||||||
Parameters :
Returns :
void
|
Protected setParameters |
setParameters()
|
Inherited from
SimpleTimeseriesEntryComponent
|
Defined in
SimpleTimeseriesEntryComponent:56
|
Returns :
void
|
Protected Abstract loadDataset | ||||||
loadDataset(lang?: string)
|
||||||
Inherited from
ListEntryComponent
|
||||||
Defined in
ListEntryComponent:64
|
||||||
Parameters :
Returns :
void
|
Public ngOnDestroy |
ngOnDestroy()
|
Inherited from
ListEntryComponent
|
Defined in
ListEntryComponent:45
|
Returns :
void
|
Public ngOnInit |
ngOnInit()
|
Inherited from
ListEntryComponent
|
Defined in
ListEntryComponent:37
|
Returns :
void
|
Protected onLanguageChanged | ||||||
onLanguageChanged(langChangeEvent: LangChangeEvent)
|
||||||
Inherited from
ListEntryComponent
|
||||||
Defined in
ListEntryComponent:58
|
||||||
Parameters :
Returns :
void
|
Public removeDataset |
removeDataset()
|
Inherited from
ListEntryComponent
|
Defined in
ListEntryComponent:49
|
Returns :
void
|
Public toggleSelection |
toggleSelection()
|
Inherited from
ListEntryComponent
|
Defined in
ListEntryComponent:53
|
Returns :
void
|
Public categoryLabel |
Type : string
|
Inherited from
SimpleTimeseriesEntryComponent
|
Defined in
SimpleTimeseriesEntryComponent:31
|
Public dataset |
Type : HelgolandTimeseries
|
Inherited from
SimpleTimeseriesEntryComponent
|
Defined in
SimpleTimeseriesEntryComponent:26
|
Public phenomenonLabel |
Type : string
|
Inherited from
SimpleTimeseriesEntryComponent
|
Defined in
SimpleTimeseriesEntryComponent:29
|
Public platformLabel |
Type : string
|
Inherited from
SimpleTimeseriesEntryComponent
|
Defined in
SimpleTimeseriesEntryComponent:28
|
Public procedureLabel |
Type : string
|
Inherited from
SimpleTimeseriesEntryComponent
|
Defined in
SimpleTimeseriesEntryComponent:30
|
Public uom |
Type : string
|
Inherited from
SimpleTimeseriesEntryComponent
|
Defined in
SimpleTimeseriesEntryComponent:32
|
Protected internalId |
Type : InternalDatasetId
|
Inherited from
ListEntryComponent
|
Defined in
ListEntryComponent:28
|
Private langChangeSubscription |
Type : Subscription
|
Inherited from
ListEntryComponent
|
Defined in
ListEntryComponent:30
|
Public loading |
Type : boolean
|
Inherited from
ListEntryComponent
|
Defined in
ListEntryComponent:26
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { DatasetOptions, HelgolandServicesConnector, InternalIdHandler } from '@helgoland/core';
import { TranslateService } from '@ngx-translate/core';
import { SimpleTimeseriesEntryComponent } from '../simple-timeseries-entry/simple-timeseries-entry.component';
/**
* Extends the SimpleTimeseriesEntryComponent, with the following functions:
* - dataset options and triggers the editation of the dataset options
* - triggers the show geometry event
*/
@Component({
selector: 'n52-configurable-timeseries-entry',
templateUrl: './configurable-timeseries-entry.component.html',
styleUrls: ['./configurable-timeseries-entry.component.css']
})
export class ConfigurableTimeseriesEntryComponent extends SimpleTimeseriesEntryComponent {
@Input()
public datasetOptions: DatasetOptions;
@Input()
public highlight: boolean;
@Output()
public onUpdateOptions: EventEmitter<DatasetOptions> = new EventEmitter();
@Output()
public onEditOptions: EventEmitter<DatasetOptions> = new EventEmitter();
@Output()
public onShowGeometry: EventEmitter<GeoJSON.GeoJsonObject> = new EventEmitter();
constructor(
protected servicesConnector: HelgolandServicesConnector,
protected internalIdHandler: InternalIdHandler,
protected translateSrvc: TranslateService
) {
super(servicesConnector, internalIdHandler, translateSrvc);
}
public toggleVisibility() {
this.datasetOptions.visible = !this.datasetOptions.visible;
this.onUpdateOptions.emit(this.datasetOptions);
}
public editDatasetOptions() {
this.onEditOptions.emit(this.datasetOptions);
}
public showGeometry() {
this.onShowGeometry.emit(this.dataset.platform.geometry);
}
}
<span>Platform: {{platformLabel}}</span>
<span>Phenomenon: {{phenomenonLabel}}</span>
<span>Procedure: {{procedureLabel}}</span>
<span>Category: {{categoryLabel}}</span>
<span>Uom: {{uom}}</span>
<button (click)="toggleSelection()">toggle selection</button>
<button (click)="removeDataset()">remove</button>
<button (click)="toggleVisibility()">toggle visibility</button>
<button (click)="editDatasetOptions()">edit Options</button>
<button (click)="showGeometry()">show Geometry</button>
./configurable-timeseries-entry.component.css