UNPKG

ngx-table-powerfull

Version:

Table with catalog of functionalities for free use based on the ngx-datatable component and other components

237 lines (236 loc) 6 kB
import { EventEmitter } from '@angular/core'; import { Subscription } from 'rxjs'; import { ColumnTableModel } from './models/columnTable.model'; import { NgxTableService } from './services/ngxTable.service'; import { NotificationNgxService } from './services/notificationNgx.service'; import { MatDialog } from '@angular/material'; import { ConfigTableModel } from './models/configTable.model'; import { ExportsType } from './common/exports.type'; export declare class NgxTableComponent { private ngxTableService; private notification; private dialog; search: any; temp: Array<object>; rows: Array<object>; backgroundActiveRow: string; rowsTempTableAdd: string[]; indexColumn: string; subscriptionChanges: Subscription; fullscreen: boolean; lastSortEvent: any; name: string; config: ConfigTableModel; columns: ColumnTableModel[]; data: object[]; viewDialog: boolean; beforeAction: () => Promise<boolean>; actionsTocontrol: string[]; event: EventEmitter<any>; click: EventEmitter<any>; dblclick: EventEmitter<any>; singleSelection: EventEmitter<any>; multipleSelection: EventEmitter<any>; visibleDataTable: EventEmitter<any>; dataTable: EventEmitter<any>; updateRow: EventEmitter<any>; newColumn: EventEmitter<any>; editColumnOuput: EventEmitter<any>; deleteColumnOuput: EventEmitter<any>; editing: {}; alt: boolean; firstIndexAltKey: string; asc: boolean; columnsFilterList: any[]; selectedColumnsFilter: any[]; dropdownSettings: {}; selectColumnsFilter: boolean; primitiveHeight: any; height: any; indexNewColumn: number; sumaryColumns: ColumnTableModel[]; dataSumary: Object[]; getRowClass: (row: any) => { 'row-active-add': boolean; 'row-active': boolean; }; constructor(ngxTableService: NgxTableService, notification: NotificationNgxService, dialog: MatDialog); ngOnInit(): void; ngAfterViewInit(): void; ngAfterViewChecked(): void; /** * onResize * * Calculates the height with the values ​​indicated in the table configuration * */ onResize(event: any): void; /** * setThemeStyles * * Apply the styles indicated in the table config * */ setThemeStyles(): void; /** * setPropertyCss * * Notify css property * */ setPropertyCss(...property: any[]): void; /** * buildIndex * * Look for the index column, in addition to discarding if there are more and if there is not, generate one automatically * */ buildIndex(): void; /** * onChangeSelectFilter * * Update search filter when changing column selection * */ onChangeSelectFilter(): void; /** * openConfigFilter * * Open config and close config filter table * */ openConfigFilter(): void; /** * buildFilterByColumns * * Build the list of items to show in the filter by columns * */ buildFilterByColumns(): void; /** * searchActions * * Find columns with actions and build value and position finish * */ searchActions(): void; /** * onActivate * * Capture and manage the different events on the table for row selection * * @param e $event */ onActivate(e: any): void; /** * updateFilter * * Update the table values ​​when modifying the filter * * @param val input filter value */ updateFilter(val: any): void; /** * onSort * * Recive the event when sorting the table */ onSort(event: any): void; /** * getAll * * Get all the records in the table */ getAll(): void; /** * updateValue * * Update table cell value */ updateValue(event: any, cell: any, rowIndex: any): void; /** * sendEvent * * Sending the name of the event and the row to the parent */ sendEvent(name: string, row: any): void; /** * toggleFullscreen * * Maximize table to full screen */ toggleFullscreen(): void; /** * sortRows * * Sorts the rows as they are visually found in the table */ sortRows(sortEvent: any): void; /** * export * * Build the object for export file and call the service to export it */ export(type: ExportsType): void; /** * openDialog * * Build a dialog with the selected elements */ openDialog(): void; /** * closeDialog * * Close dialog */ closeDialog(): void; /** * resize * * Resize table */ resize(time: number): void; /** * addColumn * * Add a new column to the table */ addColumn(): void; /** * editColumn * * Edit a column from the table */ editColumn(): void; /** * deleteColumn * * Remove a column from the table */ deleteColumn(): void; /** * updateSumaryColumns * * Update the data of the sumary displayed in the footer */ updateSumaryColumns(): void; /** * isNumeric * * Check if a data is numeric */ isNumeric(value: any): boolean; /** * checkPredefinedDataColumn * * Enter default data to columns that have the predefinedData property only if it is not already defined in the row */ checkPredefinedDataColumn(): void; /** * configureColumns * * Open the modal to configure the visibility, order and option to set columns */ configureColumns(): void; ngOnDestroy(): void; }