cheetah-grid
Version:
Cheetah Grid is a high performance grid engine that works on canvas
1,568 lines (1,567 loc) • 131 kB
text/typescript
//#region src/js/ts-types/base.d.ts
type MaybeUndef<T> = T | undefined;
type PromiseOrUndef<T> = undefined | Promise<T | undefined>;
type PromiseMaybeUndef<T> = Promise<T | undefined>;
type MaybePromise<T> = T | Promise<T>;
type MaybeCall<T, A extends any[]> = T | ((...args: A) => T);
type MaybePromiseOrCall<T, A extends any[]> = T | Promise<T> | ((...args: A) => T);
type MaybePromiseOrUndef<T> = T | undefined | Promise<T | undefined>;
type MaybeCallOrUndef<T, A extends any[]> = undefined | T | ((...args: A) => T);
type MaybePromiseOrCallOrUndef<T, A extends any[]> = T | undefined | Promise<T | undefined> | ((...args: A) => T);
type PromiseMaybeUndefOrCall<T, A extends any[]> = Promise<T | undefined> | ((...args: A) => T);
type PromiseMaybeCallOrUndef<T, A extends any[]> = Promise<MaybeCallOrUndef<T, A>>;
type AnyFunction = (...args: any[]) => any;
interface RectProps {
left: number;
right: number;
top: number;
bottom: number;
width: number;
height: number;
}
type ColorDef = CanvasRenderingContext2D["fillStyle"];
//#endregion
//#region src/js/ts-types/grid.d.ts
interface CellAddress {
col: number;
row: number;
}
interface CellRange {
start: CellAddress;
end: CellAddress;
}
type FieldGetter<T> = (record: T) => any;
type FieldSetter<T> = (record: T, value: any) => boolean;
interface FieldAssessor<T> {
get: FieldGetter<T>;
set: FieldSetter<T>;
}
type FieldDef<T> = keyof T | FieldGetter<T> | FieldAssessor<T>;
type FieldData = MaybePromiseOrUndef<any>;
//#endregion
//#region src/js/core/EventTarget.d.ts
/** @private */
declare const _$2: unique symbol;
/**
* event target.
*/
declare class EventTarget$1 {
private [_$2];
/**
* Adds an event listener.
* @param {string} type The event type id.
* @param {function} listener Callback method.
* @return {number} unique id for the listener.
*/
listen(type: string, listener: AnyListener): EventListenerId;
/**
* Removes an event listener which was added with listen() by the id returned by listen().
* @param {number} id the id returned by listen().
* @return {void}
*/
unlisten(id: EventListenerId | `${EventListenerId}`): void;
addEventListener(type: string, listener: AnyListener): void;
removeEventListener(type: string, listener: AnyListener): void;
hasListeners(type: string): boolean;
/**
* Fires all registered listeners
* @param {string} type The type of the listeners to fire.
* @param {...*} args fire arguments
* @return {*} the result of the last listener
*/
fireListeners(type: string, ...args: any[]): any;
dispose(): void;
}
//#endregion
//#region src/js/data/internal/types.d.ts
type PromiseCacheValue<V> = MaybePromiseOrUndef<V>;
//#endregion
//#region src/js/data/DataSource.d.ts
/** @private */
declare const EVENT_TYPE$1: {
readonly UPDATE_LENGTH: "update_length";
readonly UPDATED_LENGTH: "updated_length";
readonly UPDATED_ORDER: "updated_order";
};
interface DataSourceParam<T> {
get: (index: number) => T;
length: number;
source?: any;
}
/**
* grid data source
*
* @classdesc cheetahGrid.data.DataSource
* @memberof cheetahGrid.data
*/
declare class DataSource<T> extends EventTarget$1 implements DataSourceAPI<T> {
private _get;
private _length;
private readonly _source;
protected _sortedIndexMap: null | number[];
static get EVENT_TYPE(): typeof EVENT_TYPE$1;
static ofArray<T>(array: T[]): DataSource<T>;
constructor(obj?: DataSourceParam<T> | DataSource<T>);
get source(): any;
get(index: number): MaybePromiseOrUndef<T>;
getField<F extends FieldDef<T>>(index: number, field: F): FieldData;
hasField(index: number, field: FieldDef<T>): boolean;
setField<F extends FieldDef<T>>(index: number, field: F, value: any): MaybePromise<boolean>;
sort(field: FieldDef<T>, order: "desc" | "asc"): MaybePromise<void>;
get length(): number;
set length(length: number);
get dataSource(): DataSource<T>;
dispose(): void;
protected getOriginal(index: number): MaybePromiseOrUndef<T>;
protected getOriginalField<F extends FieldDef<T>>(index: number, field: F): FieldData;
protected hasOriginalField(index: number, field: FieldDef<T>): boolean;
protected setOriginalField<F extends FieldDef<T>>(index: number, field: F, value: any): MaybePromise<boolean>;
protected fieldPromiseCallBackInternal<F extends FieldDef<T>>(_index: number, _field: F, _value: PromiseCacheValue<any>): void;
protected recordPromiseCallBackInternal(_index: number, _record: PromiseCacheValue<T>): void;
static EMPTY: DataSource<any>;
}
//#endregion
//#region src/js/data/CachedDataSource.d.ts
/**
* grid data source for caching Promise data
*
* @classdesc cheetahGrid.data.CachedDataSource
* @memberof cheetahGrid.data
*/
declare class CachedDataSource<T> extends DataSource<T> {
private _rCache;
private _fCache;
static get EVENT_TYPE(): typeof DataSource.EVENT_TYPE;
static ofArray<T>(array: T[]): CachedDataSource<T>;
constructor(opt?: DataSourceParam<T>);
protected getOriginal(index: number): MaybePromiseOrUndef<T>;
protected getOriginalField<F extends FieldDef<T>>(index: number, field: F): FieldData;
protected setOriginalField<F extends FieldDef<T>>(index: number, field: F, value: any): MaybePromise<boolean>;
clearCache(): void;
protected fieldPromiseCallBackInternal<F extends FieldDef<T>>(index: number, field: F, value: PromiseCacheValue<any>): void;
protected recordPromiseCallBackInternal(index: number, record: PromiseCacheValue<T>): void;
dispose(): void;
}
//#endregion
//#region src/js/data/FilterDataSource.d.ts
/** @private */
type Filter<T> = (record: T | undefined) => boolean;
/**
* grid data source for filter
*
* @classdesc cheetahGrid.data.FilterDataSource
* @memberof cheetahGrid.data
*/
declare class FilterDataSource<T> extends DataSource<T> {
private _dataSource;
private _handler;
private _filterData;
static get EVENT_TYPE(): typeof DataSource.EVENT_TYPE;
constructor(dataSource: DataSource<T>, filter: Filter<T>);
get filter(): Filter<T> | null;
set filter(filter: Filter<T> | null);
protected getOriginal(index: number): MaybePromiseOrUndef<T>;
sort(field: FieldDef<T>, order: "desc" | "asc"): MaybePromise<void>;
get source(): any;
get dataSource(): DataSource<T>;
dispose(): void;
}
declare namespace data_d_exports {
export { CachedDataSource, DataSource, DataSourceParam, FilterDataSource };
}
//#endregion
//#region src/js/core/DG_EVENT_TYPE.d.ts
interface DrawGridEvents {
/**
* Indicates when the cell was clicked.
*/
CLICK_CELL: "click_cell";
/**
* Indicates when the cell was double-clicked.
*/
DBLCLICK_CELL: "dblclick_cell";
/**
* Indicates when the cell was double-taped.
*/
DBLTAP_CELL: "dbltap_cell";
/**
* Indicates when pointing device button is pressed in a cell.
*/
MOUSEDOWN_CELL: "mousedown_cell";
/**
* Indicates when pointing device button is released in a cell.
*/
MOUSEUP_CELL: "mouseup_cell";
/**
* Indicates the cell selection state has changed.
*/
SELECTED_CELL: "selected_cell";
/**
* Indicates key-downed.
*/
KEYDOWN: "keydown";
MOUSEMOVE_CELL: "mousemove_cell";
MOUSEENTER_CELL: "mouseenter_cell";
MOUSELEAVE_CELL: "mouseleave_cell";
MOUSEOVER_CELL: "mouseover_cell";
MOUSEOUT_CELL: "mouseout_cell";
TOUCHSTART_CELL: "touchstart_cell";
/**
* Indicates when the user attempts to open a context menu in the cell.
*/
CONTEXTMENU_CELL: "contextmenu_cell";
INPUT_CELL: "input_cell";
PASTE_CELL: "paste_cell";
DELETE_CELL: "delete_cell";
EDITABLEINPUT_CELL: "editableinput_cell";
MODIFY_STATUS_EDITABLEINPUT_CELL: "modify_status_editableinput_cell";
/**
* Indicates when the column width has changed.
*/
RESIZE_COLUMN: "resize_column";
/**
* Indicates when scrolled.
*/
SCROLL: "scroll";
FOCUS_GRID: "focus_grid";
BLUR_GRID: "blur_grid";
}
/**
* DrawGrid event types
* @classdesc cheetahGrid.core.EVENT_TYPE
* @memberof cheetahGrid.core
*/
declare const DG_EVENT_TYPE: DrawGridEvents;
//#endregion
//#region src/js/internal/EventHandler.d.ts
/** @private */
type EventHandlerTarget = EventTarget | EventTarget$1;
/** @private */
type Listener = AnyFunction;
declare class EventHandler {
private _listeners;
on<TYPE extends keyof GlobalEventHandlersEventMap>(target: EventHandlerTarget, type: TYPE, listener: (event: GlobalEventHandlersEventMap[TYPE]) => any, ...options: any[]): EventListenerId;
on(target: EventHandlerTarget, type: string, listener: Listener, ...options: any[]): EventListenerId;
once<TYPE extends keyof GlobalEventHandlersEventMap>(target: EventHandlerTarget, type: TYPE, listener: (event: GlobalEventHandlersEventMap[TYPE]) => any, ...options: any[]): EventListenerId;
once(target: EventHandlerTarget, type: string, listener: Listener, ...options: (boolean | AddEventListenerOptions)[]): EventListenerId;
tryWithOffEvents(target: EventHandlerTarget, type: string, call: () => void): void;
off(id: EventListenerId | null | undefined): void;
fire(target: EventTarget, type: string, ...args: any[]): void;
hasListener(target: EventTarget, type: string): boolean;
clear(): void;
dispose(): void;
}
//#endregion
//#region src/js/internal/NumberMap.d.ts
declare class NumberMap<T> {
private _keys;
private _vals;
private _sorted;
put(key: number, value: T): void;
remove(key: number): void;
get(key: number): T | undefined;
has(key: number): boolean;
each(keyFrom: number, keyTo: number, fn: (t: T, k: number) => void): void;
}
//#endregion
//#region src/js/internal/Rect.d.ts
declare class Rect implements RectProps {
private _left;
private _top;
private _width;
private _height;
private _right;
private _bottom;
constructor(left: number, top: number, width: number, height: number);
static bounds(left: number, top: number, right: number, bottom: number): Rect;
static max(rect1: Rect, rect2: Rect): Rect;
get left(): number;
set left(left: number);
get top(): number;
set top(top: number);
get width(): number;
set width(width: number);
get height(): number;
set height(height: number);
get right(): number;
set right(right: number);
get bottom(): number;
set bottom(bottom: number);
offsetLeft(offset: number): void;
offsetTop(offset: number): void;
copy(): Rect;
intersection(rect: Rect): Rect | null;
contains(another: Rect): boolean;
inPoint(x: number, y: number): boolean;
}
//#endregion
//#region src/js/internal/Scrollable.d.ts
declare class Scrollable {
private _handler;
private _scrollable;
private _height;
private _width;
private _endPointElement;
private _p;
constructor();
calcTop(top: number): number;
getElement(): HTMLDivElement;
setScrollSize(width: number, height: number): void;
get scrollWidth(): number;
set scrollWidth(width: number);
get scrollHeight(): number;
set scrollHeight(height: number);
get scrollLeft(): number;
set scrollLeft(scrollLeft: number);
get scrollTop(): number;
set scrollTop(scrollTop: number);
onScroll(fn: (evt: Event) => void): void;
dispose(): void;
private _update;
}
//#endregion
//#region src/js/internal/symbolManager.d.ts
declare const PROTECTED_SYMBOL: unique symbol;
declare const CHECK_COLUMN_STATE_ID: unique symbol;
declare const RADIO_COLUMN_STATE_ID: unique symbol;
declare const BUTTON_COLUMN_STATE_ID: unique symbol;
declare const COLUMN_FADEIN_STATE_ID: unique symbol;
declare const BRANCH_GRAPH_COLUMN_STATE_ID: unique symbol;
declare const TREE_COLUMN_STATE_ID: unique symbol;
declare const SMALL_DIALOG_INPUT_EDITOR_STATE_ID: unique symbol;
declare const INLINE_INPUT_EDITOR_STATE_ID: unique symbol;
declare const INLINE_MENU_EDITOR_STATE_ID: unique symbol;
declare const CHECK_HEADER_STATE_ID: unique symbol;
//#endregion
//#region src/js/core/DrawGrid.d.ts
/**
* managing mouse down moving
* @private
*/
declare class BaseMouseDownMover {
protected _grid: DrawGrid;
private _handler;
private _events;
private _started;
private _moved;
private _mouseEndPoint?;
constructor(grid: DrawGrid);
moving(_e: MouseEvent | TouchEvent): boolean;
lastMoving(e: MouseEvent | TouchEvent): boolean;
protected _bindMoveAndUp(e: MouseEvent | TouchEvent): void;
private _mouseMove;
protected _moveInternal(_e: MouseEvent | TouchEvent): boolean;
private _mouseUp;
protected _upInternal(_e: MouseEvent | TouchEvent): void;
dispose(): void;
}
/**
* managing cell selection operation with mouse
* @private
*/
declare class CellSelector extends BaseMouseDownMover {
private _cell?;
start(e: MouseEvent | TouchEvent): void;
select(e: MouseEvent | TouchEvent): void;
protected _moveInternal(e: MouseEvent | TouchEvent): boolean;
private _getTargetCell;
}
/**
* managing row width changing operation with mouse
* @private
*/
declare class ColumnResizer extends BaseMouseDownMover {
private _targetCol;
private _x;
private _preX;
private _invalidateAbsoluteLeft;
constructor(grid: DrawGrid);
start(col: number, e: MouseEvent | TouchEvent): void;
protected _moveInternal(e: MouseEvent | TouchEvent): boolean;
protected _upInternal(_e: MouseEvent | TouchEvent): void;
}
/**
* Manage focus
* @private
*/
declare class FocusControl extends EventTarget$1 {
private _grid;
private _scrollable;
private _handler;
private _input;
private _isComposition?;
private _compositionEnd?;
private _inputStatus?;
private _keyDownMoveCallback?;
constructor(grid: DrawGrid, parentElement: HTMLElement, scrollable: Scrollable, selection: Selection$1);
fireKeyDownMove(keyCode: number, e: KeyboardEvent): void;
onKeyDownMove(fn: KeyboardEventListener): void;
onKeyDown(fn: (e: KeydownEvent) => void): EventListenerId;
onInput(fn: (value: string) => void): EventListenerId;
onDelete(fn: (e: KeyboardEvent) => void): EventListenerId;
onCopy(fn: (e: ClipboardEvent) => void): EventListenerId;
onPaste(fn: (e: {
value: string;
event: ClipboardEvent;
}) => void): EventListenerId;
onFocus(fn: (e: FocusEvent) => void): EventListenerId;
onBlur(fn: (e: FocusEvent) => void): EventListenerId;
focus(): void;
setFocusRect(rect: Rect): void;
get editMode(): boolean;
set editMode(editMode: boolean);
resetInputStatus(): void;
storeInputStatus(): void;
setDefaultInputStatus(): void;
get input(): HTMLInputElement;
dispose(): void;
}
/**
* Selected area management
*/
declare class Selection$1 extends EventTarget$1 {
private _grid;
private _sel;
private _focus;
private _start;
private _end;
private _isWrapped?;
constructor(grid: DrawGrid);
get range(): CellRange;
set range(range: CellRange);
get focus(): CellAddress;
get select(): CellAddress;
set select(cell: CellAddress);
private _setSelectCell;
_setFocusCell(col: number, row: number, keepSelect: boolean, ignoreBeforeHook?: boolean): void;
private _wrapFireSelectedEvent;
_updateGridRange(): boolean;
private _callBeforeHooks;
}
/** @private */
type DrawLayerFunction = (ctx: CanvasRenderingContext2D) => void;
/**
* This class manages the drawing process for each layer
*/
/** @private */
declare class DrawLayers {
private _layers;
constructor();
addDraw(level: number, fn: DrawLayerFunction): void;
draw(ctx: CanvasRenderingContext2D): void;
}
/**
* Context of cell drawing
* @private
*/
declare class DrawCellContext implements CellContext {
private _col;
private _row;
private _mode;
private _ctx;
private _rect;
private _drawRect;
private _drawing;
private _selection;
private _drawLayers;
private _childContexts;
private _cancel?;
private _grid?;
private _onTerminate?;
private _rectFilter;
/**
* constructor
* @param {number} col index of column
* @param {number} row index of row
* @param {CanvasRenderingContext2D} ctx context
* @param {Rect} rect rect of cell area
* @param {Rect} drawRect rect of drawing area
* @param {boolean} drawing `true` if drawing is in progress
* @param {object} selection the selection
* @param {Array} drawLayers array of draw layers
* @private
*/
constructor(col: number, row: number, ctx: CanvasRenderingContext2D, rect: Rect | null, drawRect: Rect | null, drawing: boolean, selection: Selection$1, drawLayers: DrawLayers);
get drawing(): boolean;
get row(): number;
get col(): number;
cancel(): void;
/**
* select status.
* @return {object} select status
*/
getSelection(): {
select: CellAddress;
range: CellRange;
};
/**
* Canvas context.
* @return {CanvasRenderingContext2D} Canvas context.
*/
getContext(): CanvasRenderingContext2D;
/**
* Rectangle of cell.
* @return {Rect} rect Rectangle of cell.
*/
getRect(): Rect;
setRectFilter(rectFilter: (base: Rect) => Rect): void;
/**
* Rectangle of Drawing range.
* @return {Rect} Rectangle of Drawing range.
*/
getDrawRect(): Rect | null;
private _isOutOfRange;
/**
* get Context of current state
* @return {DrawCellContext} current DrawCellContext.
*/
toCurrentContext(): DrawCellContext;
addLayerDraw(level: number, fn: DrawLayerFunction): void;
private _toRelativeDrawRect;
_delayMode(grid: DrawGrid, onTerminate: () => void): void;
/**
* terminate
* @return {void}
*/
terminate(): void;
private _getRectInternal;
}
/** @protected */
interface DrawGridProtected {
element: HTMLElement;
scrollable: Scrollable;
handler: EventHandler;
selection: Selection$1;
focusControl: FocusControl;
canvas: HTMLCanvasElement;
context: CanvasRenderingContext2D;
rowCount: number;
colCount: number;
frozenColCount: number;
frozenRowCount: number;
defaultRowHeight: number;
defaultColWidth: string | number;
font?: string;
underlayBackgroundColor?: string;
keyboardOptions?: DrawGridKeyboardOptions;
disableColumnResize?: boolean;
trimOnPaste: boolean;
rowHeightsMap: NumberMap<number>;
colWidthsMap: NumberMap<string | number>;
colWidthsLimit: {
[col: number]: {
max?: string | number;
min?: string | number;
};
};
calcWidthContext: {
full: number;
em: number;
};
columnResizer: ColumnResizer;
cellSelector: CellSelector;
drawCells: {
[row: number]: {
[col: number]: DrawCellContext;
};
};
cellTextOverflows: {
[at: string]: string;
};
focusedGrid: boolean;
config: {
[name: string]: any;
} | undefined;
scroll: {
left: number;
top: number;
};
disposables?: {
dispose(): void;
}[] | null;
}
interface DrawGridConstructorOptions {
rowCount?: number;
colCount?: number;
frozenColCount?: number;
frozenRowCount?: number;
/**
* Default grid row height. default 40
*/
defaultRowHeight?: number;
/**
* Default grid col width. default 80
*/
defaultColWidth?: string | number;
font?: string;
underlayBackgroundColor?: string;
keyboardOptions?: DrawGridKeyboardOptions;
/**
* Canvas parent element
*/
parentElement?: HTMLElement | null;
/**
* Disable column resizing
*/
disableColumnResize?: boolean;
/**
* If set to true, trim the pasted text on pasting.
*/
trimOnPaste?: boolean;
}
/**
* DrawGrid
* @classdesc cheetahGrid.core.DrawGrid
* @memberof cheetahGrid.core
*/
declare abstract class DrawGrid extends EventTarget$1 implements DrawGridAPI {
protected [PROTECTED_SYMBOL]: DrawGridProtected;
static get EVENT_TYPE(): typeof DG_EVENT_TYPE;
constructor(options?: DrawGridConstructorOptions);
/**
* Get root element.
* @returns {HTMLElement} root element
*/
getElement(): HTMLElement;
/**
* Get canvas element.
*/
get canvas(): HTMLCanvasElement;
/**
* Focus the grid.
* @return {void}
*/
focus(): void;
hasFocusGrid(): boolean;
/**
* Get the selection instance.
*/
get selection(): Selection$1;
/**
* Get the number of rows.
*/
get rowCount(): number;
/**
* Set the number of rows.
*/
set rowCount(rowCount: number);
/**
* Get the number of columns.
*/
get colCount(): number;
/**
* Set the number of columns.
*/
set colCount(colCount: number);
/**
* Get the number of frozen columns.
*/
get frozenColCount(): number;
/**
* Set the number of frozen columns.
*/
set frozenColCount(frozenColCount: number);
/**
* Get the number of frozen rows.
*/
get frozenRowCount(): number;
/**
* Set the number of frozen rows.
*/
set frozenRowCount(frozenRowCount: number);
/**
* Get the default row height.
*
*/
get defaultRowHeight(): number;
/**
* Set the default row height.
*/
set defaultRowHeight(defaultRowHeight: number);
/**
* Get the default column width.
*/
get defaultColWidth(): string | number;
/**
* Set the default column width.
*/
set defaultColWidth(defaultColWidth: string | number);
/**
* Get the font definition as a string.
*/
get font(): string | undefined;
/**
* Set the font definition with the given string.
*/
set font(font: string | undefined);
/**
* Get the background color of the underlay.
*/
get underlayBackgroundColor(): string | undefined;
/**
* Set the background color of the underlay.
*/
set underlayBackgroundColor(underlayBackgroundColor: string | undefined);
/**
* If set to true, trim the pasted text on pasting.
*/
get trimOnPaste(): boolean;
set trimOnPaste(trimOnPaste: boolean);
get keyboardOptions(): DrawGridKeyboardOptions | null;
set keyboardOptions(keyboardOptions: DrawGridKeyboardOptions | null);
configure(name: "fadeinWhenCallbackInPromise", value?: boolean): boolean;
/**
* Apply the changed size.
* @return {void}
*/
updateSize(): void;
/**
* Apply the changed scroll size.
* @return {boolean} `true` if there was a change in the scroll size
*/
updateScroll(): boolean;
/**
* Get the row height of the given the row index.
* @param {number} row The row index
* @return {number} The row height
*/
getRowHeight(row: number): number;
/**
* Set the row height of the given the row index.
* @param {number} row The row index
* @param {number} height The row height
* @return {void}
*/
setRowHeight(row: number, height: number | null): void;
/**
* Get the column width of the given the column index.
* @param {number} col The column index
* @return {number} The column width
*/
getColWidth(col: number): number;
/**
* Set the column width of the given the column index.
* @param {number} col The column index
* @param {number} width The column width
* @return {void}
*/
setColWidth(col: number, width: string | number | null): void;
/**
* Get the column max width of the given the column index.
* @param {number} col The column index
* @return {number} The column max width
*/
getMaxColWidth(col: number): string | number | undefined;
/**
* Set the column max width of the given the column index.
* @param {number} col The column index
* @param {number} maxwidth The column max width
* @return {void}
*/
setMaxColWidth(col: number, maxwidth: string | number | null): void;
/**
* Get the column min width of the given the column index.
* @param {number} col The column index
* @return {number} The column min width
*/
getMinColWidth(col: number): string | number | undefined;
/**
* Set the column min width of the given the column index.
* @param {number} col The column index
* @param {number} minwidth The column min width
* @return {void}
*/
setMinColWidth(col: number, minwidth: string | number | null): void;
/**
* Get the rect of the cell.
* @param {number} col index of column, of the cell
* @param {number} row index of row, of the cell
* @returns {Rect} the rect of the cell.
*/
getCellRect(col: number, row: number): Rect;
/**
* Get the relative rectangle of the cell.
* @param {number} col index of column, of the cell
* @param {number} row index of row, of the cell
* @returns {Rect} the rect of the cell.
*/
getCellRelativeRect(col: number, row: number): Rect;
/**
* Get the rectangle of the cells area.
* @param {number} startCol index of the starting column, of the cell
* @param {number} startRow index of the starting row, of the cell
* @param {number} endCol index of the ending column, of the cell
* @param {number} endRow index of the ending row, of the cell
* @returns {Rect} the rect of the cells.
*/
getCellsRect(startCol: number, startRow: number, endCol: number, endRow: number): Rect;
getCellRangeRect(range: CellRange): Rect;
isFrozenCell(col: number, row: number): {
row: boolean;
col: boolean;
} | null;
getRowAt(absoluteY: number): number;
getColAt(absoluteX: number): number;
getCellAt(absoluteX: number, absoluteY: number): CellAddress;
/**
* Scroll to where cell is visible.
* @param {number} col The column index.
* @param {number} row The row index
* @return {void}
*/
makeVisibleCell(col: number, row: number): void;
/**
* Moves the focus cursor to the given cell.
* @param {number} col The column index.
* @param {number} row The row index
* @return {void}
*/
setFocusCursor(col: number, row: number): void;
/**
* Focus the cell.
* @param {number} col The column index.
* @param {number} row The row index
* @return {void}
*/
focusCell(col: number, row: number): void;
/**
* Redraws the range of the given cell.
* @param {number} col The column index of cell.
* @param {number} row The row index of cell.
* @return {void}
*/
invalidateCell(col: number, row: number): void;
/**
* Redraws the range of the given cells.
* @param {number} startCol index of the starting column, of the cell
* @param {number} startRow index of the starting row, of the cell
* @param {number} endCol index of the ending column, of the cell
* @param {number} endRow index of the ending row, of the cell
* @return {void}
*/
invalidateGridRect(startCol: number, startRow: number, endCol?: number, endRow?: number): void;
invalidateCellRange(range: CellRange): void;
/**
* Redraws the whole grid.
* @return {void}
*/
invalidate(): void;
/**
* Get the number of scrollable rows fully visible in the grid. visibleRowCount does not include the frozen rows counted by the frozenRowCount property. It does not include any partially visible rows on the bottom of the grid.
* @returns {number}
*/
get visibleRowCount(): number;
/**
* Get the number of scrollable columns fully visible in the grid. visibleColCount does not include the frozen columns counted by the frozenColCount property. It does not include any partially visible columns on the right of the grid.
* @returns {number}
*/
get visibleColCount(): number;
/**
* Get the index of the first row in the scrollable region that is visible.
* @returns {number}
*/
get topRow(): number;
/**
* Get the index of the first column in the scrollable region that is visible.
* @returns {number}
*/
get leftCol(): number;
/**
* gets or sets the number of pixels that an element's content is scrolled vertically
*/
get scrollTop(): number;
set scrollTop(scrollTop: number);
/**
* gets or sets the number of pixels that an element's content is scrolled from its left edge
*/
get scrollLeft(): number;
set scrollLeft(scrollLeft: number);
/**
* Get the value of cell with the copy action.
* <p>
* Please implement
* </p>
*
* @protected
* @param col Column index of cell.
* @param row Row index of cell.
* @param range Copy range.
* @return {string} the value of cell
*/
protected getCopyCellValue(_col: number, _row: number, _range: CellRange): unknown;
/**
* Draw a cell
* <p>
* Please implement cell drawing.
* </p>
*
* @protected
* @param {number} col Column index of cell.
* @param {number} row Row index of cell.
* @param {DrawCellContext} context context of cell drawing.
* @return {void}
*/
protected abstract onDrawCell(col: number, row: number, context: CellContext): Promise<void> | void;
/**
* Get the overflowed text in the cell rectangle, from the given cell.
* @param {number} col The column index.
* @param {number} row The row index
* @return {string | null} The text overflowing the cell rect.
*/
getCellOverflowText(col: number, row: number): string | null;
/**
* Set the overflowed text in the cell rectangle, to the given cell.
* @param {number} col The column index.
* @param {number} row The row index
* @param {string} overflowText The overflowed text in the cell rectangle.
* @return {void}
*/
setCellOverflowText(col: number, row: number, overflowText: string | false): void;
addDisposable(disposable: {
dispose(): void;
}): void;
/**
* Dispose the grid instance.
* @returns {void}
*/
dispose(): void;
getAttachCellsArea(range: CellRange): {
element: HTMLElement;
rect: Rect;
};
onKeyDownMove(evt: KeyboardEvent): void;
protected bindEventsInternal(): void;
protected getTargetRowAtInternal(_absoluteY: number): {
row: number;
top: number;
} | void;
protected getRowsHeightInternal(_startRow: number, _endRow: number): number | void;
protected getRowHeightInternal(_row: number): number | void;
protected getScrollHeightInternal(_row?: number): number | void;
protected getMoveLeftColByKeyDownInternal({
col
}: CellAddress): number;
protected getMoveRightColByKeyDownInternal({
col
}: CellAddress): number;
protected getMoveUpRowByKeyDownInternal({
row
}: CellAddress): number;
protected getMoveDownRowByKeyDownInternal({
row
}: CellAddress): number;
protected getOffsetInvalidateCells(): number;
protected getCopyRangeInternal(range: CellRange): CellRange;
protected _getInitContext(): CanvasRenderingContext2D;
fireListeners<TYPE extends keyof DrawGridEventHandlersEventMap>(type: TYPE, ...event: DrawGridEventHandlersEventMap[TYPE]): DrawGridEventHandlersReturnMap[TYPE][];
}
//#endregion
//#region src/js/header/action/BaseAction.d.ts
declare class BaseAction$1<T> {
protected _disabled: boolean;
constructor(option?: BaseActionOption);
get disabled(): boolean;
set disabled(disabled: boolean);
clone(): BaseAction$1<T>;
bindGridEvent(_grid: ListGridAPI<T>, _cellId: LayoutObjectId): EventListenerId[];
onChangeDisabledInternal(): void;
}
//#endregion
//#region src/js/ts-types-internal/grid-engine.d.ts
type ColumnFadeinState = {
activeFadeins?: ((point: number) => void)[];
cells: {
[key: string]: {
opacity: number;
};
};
};
type ButtonColumnState = {
mouseActiveCell?: CellAddress;
};
type CheckColumnState = {
elapsed: {
[key: string]: number;
};
block: {
[key: string]: boolean;
};
mouseActiveCell?: CellAddress;
};
type RadioColumnState = {
elapsed: {
[key: string]: number;
};
block: {
[key: string]: boolean;
};
mouseActiveCell?: CellAddress;
};
interface BranchLine {
readonly fromIndex?: number;
toIndex?: number;
readonly colorIndex: number;
readonly point?: BranchPoint;
}
interface BranchPoint {
readonly index: number;
readonly commit: boolean;
lines: BranchLine[];
readonly tag?: string;
}
type BranchGraphColumnState<T> = Map<FieldDef<T>, {
timeline: BranchPoint[][];
branches: string[];
}>;
type InputEditorState = {
element?: any;
};
type CheckHeaderState = {
elapsed: {
[key: string]: number;
};
block: {
[key: string]: boolean;
};
mouseActiveCell?: CellAddress;
};
type TreeColumnState<T> = {
drawnIcons?: unknown;
cache?: Map<FieldDef<T>, unknown>;
};
interface GridInternal<T> extends ListGridAPI<T> {
[COLUMN_FADEIN_STATE_ID]?: ColumnFadeinState;
[BUTTON_COLUMN_STATE_ID]?: ButtonColumnState;
[CHECK_COLUMN_STATE_ID]?: CheckColumnState;
[RADIO_COLUMN_STATE_ID]?: RadioColumnState;
[BRANCH_GRAPH_COLUMN_STATE_ID]?: BranchGraphColumnState<T>;
[TREE_COLUMN_STATE_ID]?: TreeColumnState<T>;
[INLINE_MENU_EDITOR_STATE_ID]?: InputEditorState;
[INLINE_INPUT_EDITOR_STATE_ID]?: InputEditorState;
[SMALL_DIALOG_INPUT_EDITOR_STATE_ID]?: InputEditorState;
[CHECK_HEADER_STATE_ID]?: CheckHeaderState;
}
//#endregion
//#region src/js/ts-types-internal/data.d.ts
type SimpleColumnIconOption = {
content?: string;
font?: string;
color?: ColorDef;
className?: string;
tagName?: string;
isLiga?: boolean;
width?: number;
src?: MaybePromise<string>;
svg?: string;
name?: string;
path?: string;
offsetTop?: number;
offsetLeft?: number;
};
//#endregion
//#region src/js/header/action/CheckHeaderAction.d.ts
declare class CheckHeaderAction<T> extends BaseAction$1<T> {
clone(): CheckHeaderAction<T>;
bindGridEvent(grid: GridInternal<T>, cellId: LayoutObjectId): EventListenerId[];
}
//#endregion
//#region src/js/header/action/SortHeaderAction.d.ts
declare class SortHeaderAction<T> extends BaseAction$1<T> {
private _sort;
constructor(option?: SortHeaderActionOption<T>);
get sort(): SortOption<T>;
set sort(sort: SortOption<T>);
clone(): SortHeaderAction<T>;
_executeSort(newState: SortState, grid: ListGridAPI<T>): void;
bindGridEvent(grid: ListGridAPI<T>, cellId: LayoutObjectId): EventListenerId[];
}
declare namespace action_d_exports {
export { ACTIONS$1 as ACTIONS, BaseAction$1 as BaseAction, BaseActionOption, CheckHeaderAction, SortHeaderAction, SortHeaderActionOption, of$6 as of, ofCell$1 as ofCell };
}
declare class ImmutableSortHeaderAction<T> extends SortHeaderAction<T> {
get disabled(): boolean;
}
declare class ImmutableCheckHeaderAction<T> extends CheckHeaderAction<T> {
get disabled(): boolean;
}
declare const ACTIONS$1: {
SORT: ImmutableSortHeaderAction<any>;
CHECK: ImmutableCheckHeaderAction<any>;
};
/**
* column actions
* @namespace cheetahGrid.columns.action
* @memberof cheetahGrid.columns
*/
declare function of$6<T>(headerAction: HeaderActionOption | BaseAction$1<T> | null | undefined): BaseAction$1<T> | undefined;
declare function ofCell$1<T>(headerCell: BaseHeaderDefine<T>): BaseAction$1<T> | undefined;
//#endregion
//#region src/js/header/style/BaseStyle.d.ts
declare class BaseStyle$1 extends EventTarget$1 implements ColumnStyle {
private _bgColor?;
static get EVENT_TYPE(): {
CHANGE_STYLE: string;
};
static get DEFAULT(): BaseStyle$1;
constructor({
bgColor
}?: BaseStyleOption);
get bgColor(): ColorDef | undefined;
set bgColor(bgColor: ColorDef | undefined);
doChangeStyle(): void;
clone(): BaseStyle$1;
}
//#endregion
//#region src/js/internal/canvases.d.ts
type PaddingOption = {
left?: number;
right?: number;
top?: number;
bottom?: number;
};
declare namespace canvashelper_d_exports {
export { Canvashelper, DrawButtonOption, DrawCheckboxOption, DrawInlineImageRectOption, DrawRadioButtonOption, FillTextRectOption, drawButton, drawCheckbox, drawInlineImageRect, drawRadioButton, fillCircle, fillRoundRect, fillTextRect, measureCheckbox, measureRadioButton, roundRect, strokeCircle, strokeColorsRect, strokeRoundRect };
}
declare function strokeColorsRect(ctx: CanvasRenderingContext2D, borderColors: [ColorDef | null, ColorDef | null, ColorDef | null, ColorDef | null], left: number, top: number, width: number, height: number): void;
declare function roundRect(ctx: CanvasRenderingContext2D, left: number, top: number, width: number, height: number, radius: number): void;
declare function fillRoundRect(ctx: CanvasRenderingContext2D, left: number, top: number, width: number, height: number, radius: number): void;
declare function strokeRoundRect(ctx: CanvasRenderingContext2D, left: number, top: number, width: number, height: number, radius: number): void;
declare function fillCircle(ctx: CanvasRenderingContext2D, left: number, top: number, width: number, height: number): void;
declare function strokeCircle(ctx: CanvasRenderingContext2D, left: number, top: number, width: number, height: number): void;
type FillTextRectOption = {
offset?: number;
padding?: PaddingOption;
};
declare function fillTextRect(ctx: CanvasRenderingContext2D, text: string, left: number, top: number, width: number, height: number, {
offset,
padding
}?: FillTextRectOption): void;
type DrawInlineImageRectOption = {
offset?: number;
padding?: PaddingOption;
};
declare function drawInlineImageRect(ctx: CanvasRenderingContext2D, image: CanvasImageSource, srcLeft: number, srcTop: number, srcWidth: number, srcHeight: number, destWidth: number, destHeight: number, left: number, top: number, width: number, height: number, {
offset,
padding
}?: DrawInlineImageRectOption): void;
/**
* Returns an object containing the width of the checkbox.
* @param {CanvasRenderingContext2D} ctx canvas context
* @return {Object} Object containing the width of the checkbox
* @memberof cheetahGrid.tools.canvashelper
*/
declare function measureCheckbox(ctx: CanvasRenderingContext2D): {
width: number;
};
/**
* Returns an object containing the width of the radio button.
* @param {CanvasRenderingContext2D} ctx canvas context
* @return {Object} Object containing the width of the radio button
* @memberof cheetahGrid.tools.canvashelper
*/
declare function measureRadioButton(ctx: CanvasRenderingContext2D): {
width: number;
};
type DrawCheckboxOption = {
uncheckBgColor?: ColorDef;
checkBgColor?: ColorDef;
borderColor?: ColorDef;
boxSize?: number;
};
/**
* draw Checkbox
* @param {CanvasRenderingContext2D} ctx canvas context
* @param {number} x The x coordinate where to start drawing the checkbox (relative to the canvas)
* @param {number} y The y coordinate where to start drawing the checkbox (relative to the canvas)
* @param {boolean|number} check checkbox check status
* @param {object} option option
* @return {void}
* @memberof cheetahGrid.tools.canvashelper
*/
declare function drawCheckbox(ctx: CanvasRenderingContext2D, x: number, y: number, check: number | boolean, {
uncheckBgColor,
checkBgColor,
borderColor,
boxSize
}?: DrawCheckboxOption): void;
type DrawRadioButtonOption = {
checkColor?: ColorDef;
borderColor?: ColorDef;
bgColor?: ColorDef;
boxSize?: number;
};
/**
* draw Radio button
* @param {CanvasRenderingContext2D} ctx canvas context
* @param {number} x The x coordinate where to start drawing the radio button (relative to the canvas)
* @param {number} y The y coordinate where to start drawing the radio button (relative to the canvas)
* @param {boolean|number} check radio button check status
* @param {object} option option
* @return {void}
* @memberof cheetahGrid.tools.canvashelper
*/
declare function drawRadioButton(ctx: CanvasRenderingContext2D, x: number, y: number, check: number | boolean, {
checkColor,
borderColor,
bgColor,
boxSize
}?: DrawRadioButtonOption): void;
type DrawButtonOption = {
backgroundColor?: ColorDef;
bgColor?: ColorDef;
radius?: number;
shadow?: {
color?: string;
blur?: number;
offsetX?: number;
offsetY?: number;
offset?: {
x?: number;
y?: number;
};
};
};
/**
* draw Button
*/
declare function drawButton(ctx: CanvasRenderingContext2D, left: number, top: number, width: number, height: number, option?: DrawButtonOption): void;
type Canvashelper = {
roundRect: typeof roundRect;
fillRoundRect: typeof fillRoundRect;
strokeRoundRect: typeof strokeRoundRect;
drawCheckbox: typeof drawCheckbox;
measureCheckbox: typeof measureCheckbox;
fillTextRect: typeof fillTextRect;
drawButton: typeof drawButton;
drawInlineImageRect: typeof drawInlineImageRect;
strokeColorsRect: typeof strokeColorsRect;
};
//#endregion
//#region src/js/element/Inline.d.ts
type InlineDrawOption = {
ctx: CanvasRenderingContext2D;
canvashelper: Canvashelper;
rect: RectProps;
offset: number;
offsetLeft: number;
offsetRight: number;
offsetTop: number;
offsetBottom: number;
};
declare class Inline implements InlineAPI {
private _content;
constructor(content?: string);
width({
ctx
}: {
ctx: CanvasRenderingContext2D;
}): number;
font(): string | null;
color(): ColorDef | null;
canDraw(): boolean;
onReady(_callback: AnyFunction): void;
draw({
ctx,
canvashelper,
rect,
offset,
offsetLeft,
offsetRight,
offsetTop,
offsetBottom
}: InlineDrawOption): void;
canBreak(): boolean;
splitIndex(index: number): {
before: Inline | null;
after: Inline | null;
};
breakWord(ctx: CanvasRenderingContext2D, width: number): {
before: Inline | null;
after: Inline | null;
};
breakAll(ctx: CanvasRenderingContext2D, width: number): {
before: Inline | null;
after: Inline | null;
};
toString(): string;
}
//#endregion
//#region src/js/element/InlineDrawer.d.ts
type InlineDrawerFunction = (options: InlineDrawOption) => void;
declare class InlineDrawer extends Inline {
private _draw;
private _width;
private _color?;
constructor({
draw,
width,
color
}: {
draw: InlineDrawerFunction;
width: number;
height: number;
color?: ColorDef;
});
width(_arg: {
ctx: CanvasRenderingContext2D;
}): number;
font(): string | null;
color(): ColorDef | null;
canDraw(): boolean;
onReady(_callback: AnyFunction): void;
draw({
ctx,
canvashelper,
rect,
offset,
offsetLeft,
offsetRight,
offsetTop,
offsetBottom
}: InlineDrawOption): void;
canBreak(): boolean;
toString(): string;
}
//#endregion
//#region src/js/GridCanvasHelper.d.ts
type ColorsDef$1 = ColorDef | (ColorDef | null)[];
declare class GridCanvasHelper<T> implements GridCanvasHelperAPI {
private _grid;
private _theme;
constructor(grid: ListGridAPI<T>);
createCalculator(context: CellContext, font: string | undefined): {
calcWidth(width: number | string): number;
calcHeight(height: number | string): number;
};
getColor(color: ColorPropertyDefine, col: number, row: number, ctx: CanvasRenderingContext2D): ColorDef;
getColor(color: ColorsPropertyDefine, col: number, row: number, ctx: CanvasRenderingContext2D): ColorsDef$1;
getStyleProperty<T>(style: T | ((args: StylePropertyFunctionArg) => T), col: number, row: number, ctx: CanvasRenderingContext2D): T;
toBoxArray(obj: ColorsDef$1): [ColorDef | null, ColorDef | null, ColorDef | null, ColorDef | null];
toBoxPixelArray(value: number | string | (number | string)[], context: CellContext, font: string | undefined): [number, number, number, number];
get theme(): RequiredThemeDefine;
drawWithClip(context: CellContext, draw: (ctx: CanvasRenderingContext2D) => void): void;
drawBorderWithClip(context: CellContext, draw: (ctx: CanvasRenderingContext2D) => void): void;
text(text: string | (Inline | string)[], context: CellContext, {
padding,
offset,
color,
textAlign,
textBaseline,
font,
textOverflow,
icons,
trailingIcon
}?: {
padding?: number | string | (number | string)[];
offset?: number;
color?: ColorPropertyDefine;
textAlign?: CanvasTextAlign;
textBaseline?: CanvasTextBaseline;
font?: FontPropertyDefine;
textOverflow?: TextOverflow;
icons?: SimpleColumnIconOption[];
trailingIcon?: SimpleColumnIconOption;
}): void;
multilineText(lines: string[], context: CellContext, {
padding,
offset,
color,
textAlign,
textBaseline,
font,
lineHeight,
autoWrapText,
lineClamp,
textOverflow,
icons,
trailingIcon
}?: {
padding?: number | string | (number | string)[];
offset?: number;
color?: ColorPropertyDefine;
textAlign?: CanvasTextAlign;
textBaseline?: CanvasTextBaseline;
font?: FontPropertyDefine;
lineHeight?: string | number;
autoWrapText?: boolean;
lineClamp?: LineClamp;
textOverflow?: TextOverflow;
icons?: SimpleColumnIconOption[];
trailingIcon?: SimpleColumnIconOption;
}): void;
fillText(text: string, x: number, y: number, context: CellContext, {
color,
textAlign,
textBaseline,
font
}?: {
color?: ColorPropertyDefine;
textAlign?: CanvasTextAlign;
textBaseline?: CanvasTextBaseline;
font?: FontPropertyDefine;
}): void;
fillCell(context: CellContext, {
fillColor
}?: {
fillColor?: ColorPropertyDefine;
}): void;
fillCellWithState(context: CellContext, option?: {
fillColor?: ColorPropertyDefine;
}): void;
fillRect(rect: RectProps, context: CellContext, {
fillColor
}?: {
fillColor?: ColorPropertyDefine;
}): void;
fillRectWithState(rect: RectProps, context: CellContext, option?: {
fillColor?: ColorPropertyDefine;
}): void;
getFillColorState(context: CellContext, option?: {
fillColor?: ColorPropertyDefine;
}): ColorPropertyDefine;
border(context: CellContext, {
borderColor,
lineWidth
}?: {
borderColor?: ColorsPropertyDefine;
lineWidth?: number;
}): void;
borderWithState(context: CellContext, option?: {
borderColor?: ColorsPropertyDefine;
lineWidth?: number;
}): void;
buildCheckBoxInline(check: boolean, context: CellContext, option?: Parameters<GridCanvasHelperAPI["buildCheckBoxInline"]>[2]): InlineDrawer;
checkbox(check: boolean, context: CellContext, {
padding,
animElapsedTime,
offset,
uncheckBgColor,
checkBgColor,
borderColor,
textAlign,
textBaseline
}?: Parameters<GridCanvasHelperAPI["checkbox"]>[2]): void;
radioButton(check: boolean, context: CellContext, {
padding,
animElapsedTime,
offset,
checkColor,
uncheckBorderColor,
checkBorderColor,
uncheckBgColor,
checkBgColor,
textAlign,
textBaseline
}?: Parameters<GridCanvasHelperAPI["radioButton"]>[2]): void;
button(caption: string, context: CellContext, {
bgColor,
padding,
offset,
color,
textAlign,
textBaseline,
shadow,
font,
textOverflow,
icons
}?: Parameters<GridCanvasHelperAPI["button"]>[2]): void;
testFontLoad(font: string | undefined, value: string, context: CellContext): boolean;
}
//#endregion
//#region src/js/header/type/BaseHeader.d.ts
declare abstract class BaseHeader<T> {
constructor(_options?: {});
get StyleClass(): typeof BaseStyle$1;
onDrawCell(cellValue: unknown, info: DrawCellInfo<T>, context: CellContext, grid: ListGridAPI<T>): void;
convertInternal(value: unknown): unknown;
abstract drawInternal(value: unknown, context: CellContext, style: BaseStyle$1, helper: GridCanvasHelper<T>, grid: ListGridAPI<T>, info: DrawCellInfo<T>): void;
bindGridEvent(_grid: ListGridAPI<T>, _cellId: LayoutObjectId): EventListenerId[];
getCopyCellValue(value: unknown, _grid: ListGridAPI<T>, _cell: CellAddress): unknown;
}
//#endregion
//#region src/js/header/style/StdBaseStyle.d.ts
declare class StdBaseStyle$1 extends BaseStyle$1 {
private _textAlign;
private _textBaseline;
static get DEFAULT(): StdBaseStyle$1;
constructor(style?: StdBaseStyleOption);
get textAlign(): CanvasTextAlign;
set textAlign(textAlign: CanvasTextAlign);
get textBaseline(): CanvasTextBaseline;
set textBaseline(textBaseline: CanvasTextBaseline);
clone(): StdBaseStyle$1;
}
//#endregion
//#region src/js/header/style/StdTextBaseStyle.d.ts
declare class StdTextBaseStyle extends StdBaseStyle$1 {
private _color?;
private _font?;
private _padding;
private _textOverflow;
static get DEFAULT(): StdTextBaseStyle;
constructor(style?: StdTextBaseStyleOption);
get color(): ColorDef | undefined;
set color(color: ColorDef | undefined);
get font(): string | undefined;
set font(font: string | undefined);
get padding(): number | string | (number | string)[] | undefined;
set padding(padding: number | string | (number | string)[] | undefined);
get textOverflow(): TextOverflow;
set textOverflow(textOverflow: TextOverflow);
clone(): StdTextBaseStyle;
}
//#endregion
//#region src/js/header/style/CheckHeaderStyle.d.ts
declare class CheckHeaderStyle extends StdTextBaseStyle {
private _uncheckBgColor?;
private _checkBgColor?;
private _borderColor?;
static get DEFAULT(): CheckHeaderStyle;
constructor(style?: CheckHeaderStyleOption);
get uncheckBgColor(): ColorDef | undefined;
set uncheckBgColor(uncheckBgColor: ColorDef | undefined);
get checkBgColor(): ColorDef | undefined;
set checkBgColor(checkBgColor: ColorDef | undefined);
get borderColor(): ColorDef | undefined;
set borderColor(borderColor: ColorDef | undefined);
clone(): CheckHeaderStyle;
}
//#endregion
//#region src/js/header/type/CheckHeader.d.ts
declare class CheckHeader<T> extends BaseHeader<T> {
get StyleClass(): typeof CheckHeaderStyle;
clone(): CheckHeader<T>;
drawInternal(value: unknown, context: CellContext, style: CheckHeaderStyle, helper: GridCanvasHelper<T>, grid: GridInternal<T>, {
drawCellBase,
getIcon
}: DrawCellInfo<T>): void;
}
//#endregion
//#region src/js/header/style/StdMultilineTextBaseStyle.d.ts
declare class StdMultilineTextBaseStyle extends StdTextBaseStyle {
private _lineHeight;
private _autoWrapText;
private _lineClamp?;
static get DEFAULT(): StdMultilineTextBaseStyle;
constructor(style?: StdMultilineTextBaseStyleOption);
clone(): StdMultilineTextBaseStyle;
get lineHeight(): string | number;
set lineHeight(lineHeight: string | number);
get lineClamp(): LineClamp | undefined;
set lineClamp(lineClamp: LineClamp | undefined);
get autoWrapText(): boolean;
set autoWrapText(autoWrapText: boolean);
}
//#endregion
//#region src/js/header/style/Style.d.ts
declare class Style$1 extends StdMultilineTextBaseStyle {
private _multiline?;
static get DEFAULT(): Style$1;
constructor(style?: HeaderStdStyleOption);
get multiline(): boolean;
set multiline(multiline: boolean);
clone(): Style$1;
}
//#endregion
//#region src/js/header/type/Header.d.ts
d