UNPKG

ngx-mat-cdk

Version:

Extra Components for Angular Material including Filters,Drag Drop File, MatSelect Mobile Version

140 lines (139 loc) 3.96 kB
import { Injector, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; export declare abstract class FiltersBase implements OnInit { protected constructor(injector: Injector); conditionSource: { key: ConditionOperator; label: string; types: FilterTypes[]; }[]; abstract filter: Filter; get filterTypes(): typeof FilterTypes; get conditionOperators(): typeof ConditionOperator; get logicalOperators(): typeof LogicalOperator; ngOnInit(): void; } export declare class PageFilter { pageNumber: number; pageSize: number; sortName: string; searchBy: string; filters: Filter[]; sort: string; isSortAscending: boolean; } export declare class Filter { hidden?: boolean; field: string; label: string; hasFilter?: boolean; value?: any; valueTo?: any; values?: any[]; hiddenCondition?: boolean; type: FilterTypes; logicalOperator: LogicalOperator; conditionOperator: ConditionOperator; conditionName?: string; valueName?: string; valueToName?: string; valuesName?: string; options?: FilterOptions; } export declare class FilterOptions { selectBoxOptions?: FilterSelectBoxOptions; numberBoxOptions?: FilterNumberBoxOptions; trueFalseOptions?: FilterTrueFalseOptions; dateTimeOptions?: FilterDateTimeOptions; conditionOptions?: FilterConditionOptions; } export declare class FilterConditionOptions { conditionLabel: string; betweenLabel: 'Between'; containsLabel: 'Contains'; endWithLabel: 'EndWith'; equalLabel: 'Equal'; exactLabel: 'Exact'; greaterThanLabel: 'GreaterThan'; greaterThanOrEqualLabel: 'GreaterThanOrEqual'; lessThanLabel: 'LessThan'; lessThanOrEqualLabel: 'LessThanOrEqual'; notEqualLabel: 'NotEqual'; startWithLabel: 'StartWith'; inRangeLabel: 'InRange'; lastMonthLabel: 'LastMonth'; lastWeekLabel: 'LastWeek'; currentMonthLabel: 'CurrentMonth'; currentWeekLabel: 'CurrentWeek'; currentYearLabel: 'CurrentYear'; } export declare class FilterDateTimeOptions { dateLabel: string; fromLabel: string; toLabel: string; } export declare class FilterTrueFalseOptions { falseLabel?: string; trueLabel?: string; falseIsNull?: boolean; } export declare class FilterNumberBoxOptions { isMoney?: boolean; prefixTextForHint?: string; minLabel?: string; maxLabel?: string; amountLabel?: string; fromLabel?: string; toLabel?: string; } export declare class FilterSelectBoxOptions { lazyLoad?: boolean; valueMember: string; displayMember: string; source: any[]; searcher?: (search: string) => Observable<any[]>; useMobileSelector?: boolean; hasSearch?: boolean; placeholder?: string; emptyText?: string; } export declare enum LogicalOperator { And = "And", Or = "Or" } export declare enum ConditionOperator { None = "None", Contains = "Contains", StartWith = "StartWith", EndWith = "EndWith", Equal = "Equal", NotEqual = "NotEqual", GreaterThan = "GreaterThan", GreaterThanOrEqual = "GreaterThanOrEqual", LessThan = "LessThan", LessThanOrEqual = "LessThanOrEqual", Between = "Between", Exact = "Exact", LastWeek = "LastWeek", LastMonth = "LastMonth", CurrentWeek = "CurrentWeek", CurrentMonth = "CurrentMonth", CurrentYear = "CurrentYear", InRange = "InRange", NotIn = "NotIn", NotContains = "NotContains" } export declare enum FilterTypes { DateTime = 1, Number = 2, SingleSelect = 3, MultiSelect = 4, TextBox = 5, TrueFalse = 6, ListCheck = 7 } export declare class NgxApplyFilterResult { filters: Filter[]; filtersQueryString: string; filteredFilters: Filter[]; }