UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

64 lines (63 loc) 2.79 kB
import type { Group, PointLike } from '@antv/g'; import { CellType } from '../common/constant'; import type { FormatResult, IconTheme } from '../common/interface'; import { CellBorderPosition, ContentPositionParams } from '../common/interface'; import type { AreaRange } from '../common/interface/scroll'; import { type ColHeaderConfig } from '../facet/header/interface'; import { HeaderCell } from './header-cell'; export declare class ColCell extends HeaderCell<ColHeaderConfig> { get cellType(): CellType; protected getBorderPositions(): CellBorderPosition[]; protected initCell(): void; protected afterDrawText(): void; protected getFormattedFieldValue(): FormatResult; getMaxTextWidth(): number; protected isBolderText(): boolean; /** * 计算文本位置时候需要,留给后代根据情况(固定列)覆盖 * @param viewport * @returns viewport */ protected handleViewport(): AreaRange; getContentPosition({ contentWidth, }?: ContentPositionParams): PointLike; protected getTextPosition(): PointLike; protected getColResizeArea(): Group | undefined; protected getHorizontalResizeAreaName(): string; /** * @description 叶子节点, 但层级不同于其他节点 (如下图 a-1-1), 说明是任意不规则自定义节点, 此时不需要绘制热区 * -------------------------------------------------- * | 自定义节点 a-1 | | * |------------- |-----------| 自定义节点 a-1-1 | * | a-1-1 | a-1-2 | a-1-3 | | * ------------------------------------------------- */ protected isCrossColumnLeafNode(): boolean; protected drawHorizontalResizeArea(): void; private getResizeAreaWidth; protected shouldAddVerticalResizeArea(): boolean; protected getVerticalResizeAreaOffset(): { x: number; y: number; }; protected drawVerticalResizeArea(): void; protected drawResizeArea(): void; protected hasHiddenColumnCell(): boolean; protected getExpandIconTheme(): IconTheme; protected addExpandColumnSplitLine(): void; protected addExpandColumnIconShapes(): void; protected addExpandColumnIcons(): void; private addExpandColumnIcon; protected getExpandColumnIconConfig(isLastColumn: boolean): { x: number; y: number; width: number; height: number; }; protected isLastColumn(): boolean; protected isAllDisplaySiblingNodeHidden(): import("../common/interface").HiddenColumnsInfo | undefined; /** * 以下场景根据当前高度动态计算 maxLines, 保证文本展示合理性 * 1.手动拖拽 2.预设高度 */ protected getResizedTextMaxLines(): number | undefined; }