import { OnInit, EventEmitter, ElementRef } from '@angular/core';
import { CfCoreComponent } from '../core/core.component';
import { InputModel } from '../../models/input/input.model';
import { DatatableModel } from '../../models/datatable';
/**
*
Datatable is creating using DatatableModel and DatatableColumnModel Classes and Input, Icon and Button Components.
* Example of using Menu:
*
* <cf-datatable [settings]="myDatatable" (cfDatatableRowEvent)="log($event)"></cf-datatable>
*
*/
export declare class CfDatatableComponent extends CfCoreComponent implements OnInit {
elementRef: ElementRef;
/**
* Component property for registering Datatable and for connection to ngx-datatable functionality.
*/
cfTable: any;
/**
* Component property for rendering template for each Datatable item details row.
*/
cfRowTemplate: any;
/**
* It is Object which will recive data from DatatableModel Class. It is used in cf-datatable template.
* Example of DatatableModel Class:
* {
* rows: [
* { name: 'Austin', city: 'London' },
* { name: 'Molly', city: 'Tokyo' },
* { name: 'Austin', city: 'New York' },
* { name: 'Monica', city: 'Paris' },
* { name: 'Austin', city: 'Dubai' }
* ],
* columns: [
* { name: 'Name', type: 'standard' },
* { name: 'City', type: 'standard' }
* ],
* rowHeight: 50,
* limit: 3,
* filtering: true,
* expandable: {
* value: true,
* detailsHeight: 140
* },
* selected: this.mySelected
* }
* rows: array
* It is an array with data for rows of any type.
* columns: array
* It is an array with columns definition. Each column item must have two required properties: name and type. Name will be used as column header. Type will set layout of each column and can be: standard(default), cf-icon, cf-button.
* rowHeight: number
* It is height of each row. Can be numeric (number will be transformed to pixels) or 'auto'. Optional. Not set by default. Required when rows expanding is set.
* limit: number
* Means rows quontity per page. Optional.
* filtering: boolean
* It means if Filter must be builded to Datatable. Type boolean. Optional. Default false.
* expandable: object
* It is object with properties for rows details. Optional.
* value property of expandable: boolean
* It is boolean value to build or not row details.
* detailsHeight property of expandable: boolean
* It is number value and mean height of row in pixels. Required.
* selected: array
* Array for selected items. Optional.
*/
cfDatatable: DatatableModel;
cfOriginalRows: Array;
cfClonedRows: Array;
/**
* It is array of Datatable filtered items.
*/
filtered: Array;
/**
* It is array of Datatable selected items.
*/
selected: Array;
/**
* Temporary object for expanded row.
*/
expanded: any;
/**
* CfInput component used inside filtering section.
*/
input: InputModel;
/**
* It is [settings] attribute of cf-datatable component with json object generated by DatatableModel.
*/
settings: DatatableModel;
/**
* It is (cfDatatableRowEvent) attribute of cf-datatable component. Means what event to call when row Button of Datatable was clicked.
*/
cfDatatableRowEvent: EventEmitter;
/**
* It is (cfDatatableRowDetailsEvent) attribute of cf-datatable component. Means what event to call when Datatable details row was clicked.
*/
cfDatatableRowDetailsEvent: EventEmitter;
constructor(elementRef: ElementRef);
/**
* It is method which will emit corresponding event when Datatable button row or Datatable details row where clicked. Event contains index and value of clicked row.
* @param type It is type of template. Can be item(for row Button) or details(for item details row template).
* @param i index of row
* @param it object of row
*/
cfDatatableRowEvents(type: string, i: number, it: Object): void;
/**
* Function for filtering Datatable. Goes to first page of Datatable after filtering.
*/
updateFilter(event: any): void;
/**
* Function for selection rows with rows checkboxes.
*/
onSelect({selected}: {
selected: any;
}): void;
onSort(event: any): void;
/**
* Function for toggle each row details section.
*/
toggleExpandRow(row: any): void;
onDetailToggle(event: any): void;
/**
* Function for updating Datatable when rows length was changed by user custom functions.
*/
checkFiltered(type: string, i: number, it: Object): void;
/**
* It will be generated cfDatatable object and rendered inside component template. Also arrays for filtering/selection will be initialized.
*/
ngOnInit(): void;
}