import { utils } from "pixi.js"; import { DAlignHorizontal } from "./d-align-horizontal"; import { DTableBodyCellLinkLinkOptions } from "./d-table-body-cell-link"; import { DTableBodyCellOptions } from "./d-table-body-cell-options"; import { DTableColumnEditing, DTableColumnEditingOptions, DTableColumnEditable } from "./d-table-column-editing"; import { DTableColumnFormatter } from "./d-table-column-formatter"; import { DTableColumnGetter } from "./d-table-column-getter"; import { DTableColumnRenderable } from "./d-table-column-renderable"; import { DTableColumnSelecting, DTableColumnSelectingDialog, DTableColumnSelectingOptions } from "./d-table-column-selecting"; import { DTableColumnSetter } from "./d-table-column-setter"; import { DTableColumnSorting, DTableColumnSortingOptions } from "./d-table-column-sorting"; import { DTableColumnState, DTableColumnStateModifier } from "./d-table-column-state"; import { DTableColumnType } from "./d-table-column-type"; import { DTableColumnUpdate } from "./d-table-column-update"; import { DTableHeaderCellOptions } from "./d-table-header-cell"; export interface DTableColumnOptions = any> { weight?: number; width?: number; resizable?: boolean; type?: keyof typeof DTableColumnType | DTableColumnType; label?: string; getter?: DTableColumnGetter; setter?: DTableColumnSetter; path?: string; default?: CELL_VALUE; /** * A shortcut of body#text#formatter. */ formatter?: DTableColumnFormatter; /** * A shortcut of body#text#align#horizontal. */ align?: keyof typeof DAlignHorizontal | DAlignHorizontal; /** * A state option. */ state?: string | string[] | DTableColumnStateModifier; /** * If the renderable is * * * true, cells get rendered. * * false, cells do not get rendered. * * a function, cells get rendered only when that function returns true. * * "AUTO", cells get rendered only when the cell data exit. */ renderable?: boolean | DTableColumnRenderable | "auto" | "AUTO"; /** * If the editable is * * * true, cells get editable. * * false, cells do not get editable. * * a function, cells are editable only when that function returns true. * * "AUTO", cells are editable only when the cell data exist. */ editable?: boolean | DTableColumnEditable | "auto" | "AUTO"; editing?: DTableColumnEditingOptions; sortable?: boolean; sorting?: DTableColumnSortingOptions; header?: DTableHeaderCellOptions; body?: DTableBodyCellOptions; selecting?: DTableColumnSelectingOptions; category?: string | string[]; frozen?: boolean; link?: DTableBodyCellLinkLinkOptions; /** * An update region when cells get edited. * * * CELL: Edited cells (Default). * * ROW: Rows that edited cells belongs to. * * ALL: All the rows. */ update?: keyof typeof DTableColumnUpdate | DTableColumnUpdate; } export interface DTableColumn = DTableColumnSelectingDialog> extends utils.EventEmitter { weight?: number; minWeight: number; width?: number; minWidth: number; readonly resizable: boolean; readonly type: DTableColumnType; label: string; readonly getter: DTableColumnGetter; readonly setter: DTableColumnSetter; readonly formatter?: DTableColumnFormatter; readonly align: DAlignHorizontal; readonly state: DTableColumnState; readonly renderable: boolean | DTableColumnRenderable; readonly editing: DTableColumnEditing; readonly sorting: DTableColumnSorting; readonly header?: DTableHeaderCellOptions; readonly body?: DTableBodyCellOptions; readonly selecting: DTableColumnSelecting; readonly category?: string | string[]; readonly frozen?: boolean; offset: number; readonly link?: DTableBodyCellLinkLinkOptions; readonly update: DTableColumnUpdate; }