import { ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core'; import { Observable } from 'rxjs'; import { ISortingChangeEvent, KeyValue } from '../../interfaces'; import { FsFilterAction } from '../../interfaces/action.interface'; import { FilterConfig, IFilterConfigItem } from '../../interfaces/config.interface'; import { FsFilterConfig } from '../../models/filter-config'; import { BaseItem } from '../../models/items/base-item'; import { SortController } from '../../services'; import { SavedFilterController } from '../../services/saved-filter-controller.service'; import { FilterKeywordComponent } from '../filter-keyword/filter-keyword.component'; import { FilterStatusBarDirective } from './../../directives/status-bar.directive'; import * as i0 from "@angular/core"; export declare class FilterComponent implements OnInit, OnDestroy { keywordInput: FilterKeywordComponent; set setFilterConfig(value: FilterConfig); closed: EventEmitter; opened: EventEmitter; ready: EventEmitter; statusBar: FilterStatusBarDirective; headingTemplate: TemplateRef; reloadEl: ElementRef; showFilterMenu: boolean; windowDesktop: boolean; fsFilterClass: boolean; private _config; private _filterConfig; private _destroy$; private _defaultConfig; private _zone; private _actionsController; private _filterController; private _sortController; private _savedFilterController; private _keywordController; private _inputsState$; constructor(); get queryParams(): KeyValue; get query(): KeyValue; get values(): KeyValue; /** * * Do update value of some field * * @param values - values for update * * To update text value just pass new text value * * public updateSelectValue(val) { * this.filterEl.updateValues({ keyword: val }); * } * * To update select or observable select you could pass suitable value * * public updateSelectValue(val: number) { * this.filterEl.updateValues({ simple_select: val }, { observable_select: val }); * } * * To update checkbox value just pass true/false as value * * public updateCheckox(val: boolean) { * this.filterEl.updateValues({ checkbox: val }); * } * * To update range value just pass object with min&max object or just with one of targets * * Ex.: { min: 10, max 15 }, { min: 5 }, { max 5 } * * public updateRange(val) { * this.filterEl.updateValues({ range: val }); * } * * To update autocomplete just pass object with name/value fields * * Ex.: { name: 'John Doe', value: 1 } * * public updateAutocomplete(val) { * this.filterEl.updateValues({ autocomplete_user_id: val }); * } * * To update autocompletechips just pass: * * 1) object with name/value fields - will be appended to existing set of values * * { name: 'John Doe', value: 1 } * * 2) array of objects - will be appended to existing set of values * * [{ name: 'John Doe', value: 1 }, { name: 'Darya Filipova', value: 2 }] * * 3) null - clear existing set of values * * public updateAutocomplete(val) { * this.filterEl.updateValues({ autocompletechips_user_id: val }); * } * */ set values(values: KeyValue); get config(): FsFilterConfig; get items(): BaseItem[]; get primaryItems(): BaseItem[]; change(): void; get hasHeading(): boolean; get keywordVisible$(): Observable; get keywordFullWidth$(): Observable; get headingVisible$(): Observable; get primaryFiltersVisible$(): Observable; get chipVisible$(): Observable; get inputsState$(): Observable<{ keywordVisible: boolean; primaryFiltersVisible: boolean; }>; /** * Layout mode the filter renders in: * inputs — keyword and/or primary filters present (full toolbar row) * heading — no inputs, but a heading is configured (heading aligned with actions) * chips — no inputs, no heading (chips aligned with actions) */ get layout$(): Observable<'inputs' | 'heading' | 'chips'>; /** * In `inputs` layout, chips render inline (right of the keyword) only when there's * a keyword and no primary filters. With any primary filter present, chips drop below. */ get chipsInline$(): Observable; get actionsVisible$(): Observable; get actions$(): Observable; get menuActions$(): Observable; get savedFilterController(): SavedFilterController; get sortController(): SortController; ngOnInit(): void; ngOnDestroy(): void; focus(): void; updateSort(sort: ISortingChangeEvent, emitChange?: boolean): void; disableFilters(): void; enableFilters(): void; get itemValues(): any[]; get nonEmptyItemValues(): any[]; get hasItemValues(): boolean; getItemValue(name: string): any; showItem(name: string): void; hideItem(name: string): void; clearItem(name: string): void; clear(event?: any): void; reload(event?: any): void; getItem(name: any): BaseItem; /** * @deprecated Use item(name).value$ instead */ getItemValueChange$(name: string): Observable; /** * Update filter actions config * * @param actions */ updateActions(actions: FsFilterAction[]): void; /** * Show "Keyword" field if it present */ showKeywordField(): void; /** * Hide "Keyword" field if it present */ hideKeywordField(): void; /** * Go through actions and check show() callback and update visible actions */ updateActionsVisibility(): void; /** * Go through actions and check disabled() callback and update disabled state */ updateDisabledState(): void; private _updateWindowWidth; private _listenWindowResize; private _initItems; private _initAutoReload; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }