File

libs/depiction/src/lib/datasetlist/timeseries/configurable-timeseries-entry/configurable-timeseries-entry.component.ts

Description

Extends the SimpleTimeseriesEntryComponent, with the following functions:

  • dataset options and triggers the editation of the dataset options
  • triggers the show geometry event

Extends

SimpleTimeseriesEntryComponent

Metadata

selector n52-configurable-timeseries-entry
styleUrls ./configurable-timeseries-entry.component.css
templateUrl ./configurable-timeseries-entry.component.html

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor(servicesConnector: HelgolandServicesConnector, internalIdHandler: InternalIdHandler, translateSrvc: TranslateService)
Parameters :
Name Type Optional
servicesConnector HelgolandServicesConnector No
internalIdHandler InternalIdHandler No
translateSrvc TranslateService No

Inputs

datasetOptions
Type : DatasetOptions
highlight
Type : boolean
datasetId
Type : string
Inherited from ListEntryComponent
selected
Type : boolean
Inherited from ListEntryComponent

Outputs

onEditOptions
Type : EventEmitter<DatasetOptions>
onShowGeometry
Type : EventEmitter<GeoJSON.GeoJsonObject>
onUpdateOptions
Type : EventEmitter<DatasetOptions>
onDeleteDataset
Type : EventEmitter<boolean>
Inherited from ListEntryComponent
onSelectDataset
Type : EventEmitter<boolean>
Inherited from ListEntryComponent

Methods

Public editDatasetOptions
editDatasetOptions()
Returns : void
Public showGeometry
showGeometry()
Returns : void
Public toggleVisibility
toggleVisibility()
Returns : void
Protected loadDataset
loadDataset(lang?: string)
Parameters :
Name Type Optional
lang string Yes
Returns : void
Protected setDataset
setDataset(timeseries: HelgolandTimeseries)
Parameters :
Name Type Optional
timeseries HelgolandTimeseries No
Returns : void
Protected setParameters
setParameters()
Returns : void
Protected Abstract loadDataset
loadDataset(lang?: string)
Inherited from ListEntryComponent
Parameters :
Name Type Optional
lang string Yes
Returns : void
Public ngOnDestroy
ngOnDestroy()
Inherited from ListEntryComponent
Returns : void
Public ngOnInit
ngOnInit()
Inherited from ListEntryComponent
Returns : void
Protected onLanguageChanged
onLanguageChanged(langChangeEvent: LangChangeEvent)
Inherited from ListEntryComponent
Parameters :
Name Type Optional
langChangeEvent LangChangeEvent No
Returns : void
Public removeDataset
removeDataset()
Inherited from ListEntryComponent
Returns : void
Public toggleSelection
toggleSelection()
Inherited from ListEntryComponent
Returns : void

Properties

Public categoryLabel
Type : string
Public dataset
Type : HelgolandTimeseries
Public phenomenonLabel
Type : string
Public platformLabel
Type : string
Public procedureLabel
Type : string
Public uom
Type : string
Protected internalId
Type : InternalDatasetId
Inherited from ListEntryComponent
Private langChangeSubscription
Type : Subscription
Inherited from ListEntryComponent
Public loading
Type : boolean
Inherited from ListEntryComponent
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

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""