/** LBOs */ import Cmf from "cmf.lbos"; /** Core */ import { CoreComponent } from "cmf.core/src/core"; import { MetadataTableType } from "cmf.core/src/domain/metadata/table"; /** cmf.core.business.controls modules*/ import { DataGridBusinessColumn, PrepareInput, HandleOutput } from "../dataGrid/dataGrid"; import { CustomFilter } from "../filterBar/filterBar"; import { SmartTable, GenericTable } from "../../stores/tableService"; /** Angular */ import * as ng from "@angular/core"; import * as ngRouter from "@angular/router"; export { MetadataTableType }; /** * @whatItDoes * The TableViewer component is used to view the a Generic or Smart Table columns and values. * The columns can be customized on the metadata. * * @howToUse * This component is used with the inputs mentioned below. * * ### Inputs * `Cmf.Foundation.BusinessObjects.Entity` : **instance** - The Entity instance. Not mandatory. It's used to filter the table's values * `string` : **id** - The Table Id. * `string` : **name** - The Table name. * `MetadataTableType | string` : **tableType** - The Table type. * `string` : **mainTitle** - The BusinessDataGrid component main title. * * ### Outputs * `any[]` : **selectedValuesChange** - A collection of the data rows selected on the data grid. * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * ``` * * ### _NOTES_ * The instance input is Optional. If it isn't provided, the component calculates it on the OnInit Angular hook. * * @description * * ### Dependencies * * #### Components * * DataGridBusinessModule : `cmf.core.business.controls` * * FilterBarModule : `cmf.core.business.controls` * * #### Stores * * TableService : `cmf.core.business.controls` * */ export declare class TableViewer extends CoreComponent implements ng.OnInit { private _elementRef; private _router; /** * Nested business data grid component. */ private _dataGridBusinessComponent; /** * Table's Type passed as input. */ private _tableType; /** * Table Properties. */ private tableProperties; /** * Table object. */ table: GenericTable | SmartTable; /** * Main Title to be displayed on the BaseWidget. */ mainTitle: string; /** * Entity Instance passed as input. */ instance: Cmf.Foundation.BusinessObjects.Entity; /** * Table's name passed as input. */ name: string; /** * Table's Id. */ id: string; /** * Table's columns. */ columns: DataGridBusinessColumn[]; /** * Data grid selected items. */ selectedItems: any[]; /** * Data grid prepare input object. */ buildInput: PrepareInput; /** * Data grid handle output object. */ handleOutput: HandleOutput; /** * Determines if the DataGrid has data or not. * Useful to set the 'add' placeholder on the GUI. */ hasData: boolean; /** * Table Type property getter/setter */ tableType: MetadataTableType | string; /** * The selection change event, so the component can inform the upper components that the selected values have changed. */ selectedValuesChange: ng.EventEmitter; /** * Custom Filters to feed the FilterBar component. */ customFilters: CustomFilter[]; /** * Filter Collection to use in the data input. */ filterCollection: Cmf.Foundation.BusinessObjects.QueryObject.FilterCollection; /** * Constructor. * @param viewContainerRef the reference to the component view container. * @param _elementRef the element reference. * @param _router the angular router. */ constructor(viewContainerRef: ng.ViewContainerRef, _elementRef: ng.ElementRef, _router: ngRouter.Router); /** * Helper to build the Context object to be passed to the Add/Edit/Remove wizards. * @param framework framework object. * @param context context object. * @param items items selected on the grid. */ private onBuildContextHandlerForWizard; /** * Loads the Table and sets the values. */ private load; /** * Angular OnInit life cycle hook. */ ngOnInit(): Promise; /** * Refresh the grid. */ refresh(): Promise; /** * On DataGrid selection change callback used to trigger the re-evaluation of the action bar buttons. * @param selected list of selected entities */ onSelectionChange(selected: any[]): void; /** * No data placeholder 'Add' click action. */ onAdd(): void; /** * FilterBar's FilterCollectionChange callback. * @param filterCollection FilterCollection changed and emitted by the FilterBar component. */ filterCollectionChange(filterCollection: Cmf.Foundation.BusinessObjects.QueryObject.FilterCollection): void; } export declare class TableViewerModule { }