UNPKG

ng-pure-datatable

Version:

This is a Angular datatable for tables which is not dependent on jquery. This is fully written with typescript and it uses observables to communicate events across the user defined table. This is inspired by previous libraries I wrote for `Larang-Paginato

60 lines (59 loc) 1.94 kB
import { OnInit } from '@angular/core'; import 'rxjs/add/observable/fromEvent'; import 'rxjs/add/operator/filter'; import 'rxjs/add/operator/debounceTime'; import 'rxjs/add/operator/switch'; import 'rxjs/add/operator/do'; import 'rxjs/add/operator/distinctUntilChanged'; import 'rxjs/add/observable/throw'; import 'rxjs/add/operator/map'; import { NgSearchInterface } from "./ng-search.interface"; import { NgSearchService } from "./ng-search.service"; import { NgPureDataTableEventService } from "../ng-pure-datatable-event.service"; import { Subject } from "rxjs/Subject"; export declare class NgSearchComponent implements OnInit { private ngSearchService; private ngPureDataTableEventService; search$: Subject<string>; private static defaultAllSettings; allSettings: NgSearchInterface<Object>; searching: boolean; private copyData; constructor(ngSearchService: NgSearchService, ngPureDataTableEventService: NgPureDataTableEventService); /** * This is used to set the border color for the div * @returns {{border-bottom: string}} */ setBorderColor(): { 'border-bottom': string; }; /** * This is used to style the button background * @returns {{background: string}} */ setButtonColor(): { 'background': string; }; /** * This is used to initialize searching on a table. * @param query */ doSearch(query: any): any; /** * This is used to search query strings * @param type * @param query */ private processSearching(type, query); /** * This is used to make a request to a backend api for searching. * @param query */ private doSearchBackend(query); /** * This is used to validate object passed down to table searcher. * @constructor */ ValidateSettings(): void; ngOnInit(): void; }