UNPKG

@netgrif/components-core

Version:

Netgrif Application engine frontend core Angular library

52 lines (51 loc) 2.58 kB
import { OnDestroy, OnInit, Type } from '@angular/core'; import { AbstractHeaderService } from '../../abstract-header-service'; import { FormControl } from '@angular/forms'; import { Subscription } from 'rxjs'; import { AbstractHeaderModeComponent } from '../abstract-header-mode.component'; import { MatDialog } from '@angular/material/dialog'; import * as i0 from "@angular/core"; export declare abstract class AbstractSearchModeComponent extends AbstractHeaderModeComponent implements OnInit, OnDestroy { protected _dialog: MatDialog; /** * The time that must elapse since last keypress in search input before a search request is sent */ protected SEARCH_DEBOUNCE_TIME: number; protected subHeaderColumn: Subscription; protected subClearHeader: Subscription; formControls: Array<FormControl>; headerService: AbstractHeaderService; constructor(_dialog: MatDialog); ngOnInit(): void; ngOnDestroy(): void; /** * Updates the underlying objects to match the new desired number of columns. * * If the new number of columns is greater than the current one, the columns will be filled with default/blank values. * * If the new number of columns is smaller than the current one, the superfluous columns will be removed. * * @param newCount the new number of columns */ protected updateHeaderCount(newCount: number): void; /** * Adds a new column to the headers search and binds it's FormControl to the service */ protected addNewColumn(): void; /** * Opens a user assign side menu component and sets the selected user as value of the form control object * that corresponds to the given column. * * If no user is selected the value of the corresponding form control si cleared. * @param column the index of the columns that should have it's form control value set to the selected user * @param component is the component that we want to open */ selectAbstractUser(column: number, component: Type<any>): void; /** * Clears the value of the form control object in the given column * @param column the index of the column that should have it's value cleared */ protected clearInput(column: number): void; static ɵfac: i0.ɵɵFactoryDeclaration<AbstractSearchModeComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AbstractSearchModeComponent, "ncc-abstract-seatch-mode", never, { "headerService": { "alias": "headerService"; "required": false; }; }, {}, never, never, false, never>; }