@eclipse-scout/core
Version:
Eclipse Scout runtime
79 lines • 3.74 kB
TypeScript
/// <reference types="jquery" />
import { Column, ObjectWithType, Table } from '../../index';
/**
* If present on a table, allows adding, removing or modifying columns. If the table is customizable,
* those functions are delegated to the table customizer. Otherwise, adding or removing a column
* changes its `visible` flag, while modifying is currently not supported.
*
* Use {@link install} to attach the table organizer to a table. This happens automatically when
* the table organizer is defined on the {@link Table}.
*
* @see Table.organizer
* @see TableHeaderMenu._renderColumnActionsGroup
* @see ShowInvisibleColumnsForm
*/
export declare class TableOrganizer implements ObjectWithType {
objectType: string;
table: Table;
constructor();
/**
* Passes the given table to the organizer.
* If the organizer is already installed, an error is thrown.
* In most cases, it is not necessary to call this method manually. Consider using {@link Table.setOrganizer} instead.
*/
install(table: Table): void;
/**
* Removes the table from the organizer.
* If the organizer is not installed, nothing happens.
* In most cases, it is not necessary to call this method manually. Consider using {@link Table.setOrganizer} instead.
*/
uninstall(): void;
/**
* Returns a list of all currently invisible but displayable columns that can be added to the list of
* visible columns by the table organizer.
*/
getInvisibleColumns(): Column<any>[];
/**
* Adds the given columns to the list of visible columns. If `insertAfterColumn` is set, the columns are
* also moved after the specified column. Otherwise, they remain at their current position.
*/
showColumns<T>(columns: Column<any>[], insertAfterColumn?: Column<any>): void;
protected _moveColumns(columns: Column<any>[], insertAfterColumn: Column<any>): void;
/**
* Hides the given columns. If it was grouped, the grouping is removed. If it was part of a filter, the filter is removed.
*/
hideColumns(columns: Column<any>[]): void;
/**
* Moves the columns to their new position according to the indices in the given `visibleColumns` array.
*/
moveColumns(visibleColumns: Column<any>[]): void;
/**
* Returns true if there are addable columns according to {@link getInvisibleColumns}.
*/
isColumnAddable(): boolean;
addColumn(column?: Column<any>): JQuery.Promise<void>;
/**
* Returns true if the given column can be removed form the table.
*
* @param allowRemovalOfLastColumn true, to allow the removal of the last visible column. Default is false.
*/
isColumnRemovable(column: Column<any>, allowRemovalOfLastColumn?: boolean): boolean;
removeColumns(columns: Column<any>[]): void;
/**
* Returns true if the given column can be modified.
*/
isColumnModifiable(column: Column<any>): boolean;
modifyColumn(column: Column<any>): JQuery.Promise<void>;
/**
* @returns true if the column can be moved to the left.
* It cannot be moved if the column is invisible, the column is already at the beginning or if left of the column is a fixed position column.
*/
isColumnMovableToLeft(column: Column<any>): boolean;
/**
* @returns true if the column can be moved to the right.
* It cannot be moved if the column is invisible, the column is already at the end or if right of the column is a fixed position column.
*/
isColumnMovableToRight(column: Column<any>): boolean;
protected _showInvisibleColumnsForm(insertAfterColumn?: Column<any>): JQuery.Promise<void>;
}
//# sourceMappingURL=TableOrganizer.d.ts.map