Newer
Older
/**
* This file is part of Anis Client.
*
* @copyright Laboratoire d'Astrophysique de Marseille / CNRS
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import { Component, } from '@angular/core';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs';
import { Instance } from 'src/app/metamodel/models';
import * as instanceSelector from 'src/app/metamodel/selectors/instance.selector';
import * as datasetSelector from 'src/app/metamodel/selectors/dataset.selector';
import * as searchSelector from '../store/selectors/search.selector';
/**
* @class
* @classdesc Search container.
*/
@Component({
selector: 'app-search',
templateUrl: 'search.component.html'
})
public instance: Observable<Instance>;
public currentStep: Observable<string>;
public criteriaStepChecked: Observable<boolean>;
public outputStepChecked: Observable<boolean>;
public resultStepChecked: Observable<boolean>;
public queryParams: Observable<SearchQueryParams>;
public outputList: Observable<number[]>;
this.instance = store.select(instanceSelector.selectInstanceByRouteName);
this.datasetSelected = store.select(datasetSelector.selectDatasetNameByRoute);
this.currentStep = store.select(searchSelector.selectCurrentStep);
this.criteriaStepChecked = store.select(searchSelector.selectCriteriaStepChecked);
this.outputStepChecked = store.select(searchSelector.selectOutputStepChecked);
this.resultStepChecked = store.select(searchSelector.selectResultStepChecked);
this.queryParams = this.store.select(searchSelector.selectQueryParams);
this.outputList = this.store.select(searchSelector.selectOutputList);