Skip to content
Snippets Groups Projects
datatable-tab.component.ts 1.56 KiB
/**
 * 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 { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';

import { Instance, Attribute, Dataset } from 'src/app/metamodel/models';
import { Pagination, SearchQueryParams, Criterion, ConeSearch } from 'src/app/instance/store/models';

/**
 * @class
 * @classdesc Search result datatable tab component.
 */
@Component({
    selector: 'app-datatable-tab',
    templateUrl: 'datatable-tab.component.html',
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class DatatableTabComponent {
    @Input() datasetSelected: string;
    @Input() instance: Instance;
    @Input() datasetList: Dataset[];
    @Input() attributeList: Attribute[];
    @Input() outputList: number[];
    @Input() criteriaList: Criterion[];
    @Input() coneSearch: ConeSearch;
    @Input() queryParams: SearchQueryParams;
    @Input() dataLength: number;
    @Input() sampRegistered: boolean;
    @Input() data: any[];
    @Input() dataIsLoading: boolean;
    @Input() dataIsLoaded: boolean;
    @Input() selectedData: any[];
    @Output() retrieveData: EventEmitter<Pagination> = new EventEmitter();
    @Output() addSelectedData: EventEmitter<number | string> = new EventEmitter();
    @Output() deleteSelectedData: EventEmitter<number | string> = new EventEmitter();
    @Output() broadcast: EventEmitter<string> = new EventEmitter();
}