import { ResultMessageBag } from "../resultMessage/resultMessageBag"; export interface ColumnViewModel { rootNode: ColumnViewNode; } export interface ColumnViewColumnModel { rootNode: ColumnViewNode; } export interface ColumnViewRowModel { rootNode: ColumnViewItem; isLeaf?: boolean; isAnySiblingRequired?: boolean; } export interface ColumnViewItem { /** * Item id */ id: string; /** * Name */ name: string; /** * Expected header tooltip name Title (left) to use in multi * level columnView * * Normally used in cases were name is a HTML structure and not a * regular string */ nameTooltip?: string; /** * Name to displayed in Header, if not defined will use Name */ title?: string; /** * Item tag */ tag?: any; /** * Icon class */ iconClass?: string; /** * Action Icon Class */ actionIconClass?: string; /** * Title of the action icon */ actionTitle?: string; /** * Action text to be shown on the side of the action */ actionText?: string; /** * Action Icon Class */ infoIconClass?: string; /** * Action Icon Class */ errorIcon?: boolean; /** * Error messages to show */ errorMessages?: ResultMessageBag[]; /** * Custom css class to add to the element */ cssClass?: string; /** * Defines if children fo the present node can be removed */ canRemove?: boolean; /** * If remove actions is to be presented in a disabled logic and appearance */ canRemoveDisabled?: boolean; /** * Even if we can in fact remove the row, we may not be interested in presenting the remove action on a row basis */ skipRemoveOnRowLevel?: boolean; /** * Defines if the current item is required to fill or not. */ isRequired?: boolean; /** * Defines if the current item is selected on a multi selection context */ isMultiSelected?: boolean; /** * Defines wether a user can change the value of the checkbox that controls this row's selection */ multiSelectionDisabled?: boolean; /** * Defines if children for the present node can be ordered */ isOrderable?: boolean; } export interface ColumnViewNode extends ColumnViewItem { /** * Children * Can be either an array of children or a function that will return a promise to a list of {@see ColumnViewItem}[] */ children: ColumnViewItem[] | ((parent: ColumnViewNode) => Promise); /** * When the node has no children the following message will be displayed */ noChildrenMsg?: string; /** * Children type. It will be used as the description of the elements inside. * * Before the expander, the following text will appear: * "contains X items of [childrenType]" */ childrenType?: string; /** * There are certain configs that would require showing values in node elements. * This property will allow displaying the name even for nodes */ showValue?: boolean; /** * Displays a value for node elements just like in rows. * The value is right-aligned. */ value?: string; /** * Expected header tooltip value (right) * * Normally used in cases were value is a HTML structure and not a * regular string */ valueTooltip?: string; } export interface ColumnViewLeaf extends ColumnViewItem { value: string; } export declare const BLANK_ROW_ID: string; export declare const TEMPLATE_BLANK_ROW: ColumnViewLeaf;