arthub-table 0.2.87-next.1 → 0.2.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ import Histories from "./History";
12
12
  import { StyleManager, type TableTheme } from "./StyleManager";
13
13
  import EdgeScroller from "./EdgeScroller";
14
14
  import { type HeaderConfig } from "./util";
15
- import { type FooterCellClickInfo, type FooterData, type FooterCellData, type GroupHeaderCellClickInfo, type GroupHeaderCellHoverInfo, type FooterStatRefreshInfo, type GroupHeaderStatRefreshInfo, type ConditionalStyle, type ConditionalStylePatch, type ActiveCellInfo } from "./types";
15
+ import { type FooterCellClickInfo, type FooterData, type FooterCellData, type GroupHeaderCellClickInfo, type GroupHeaderCellHoverInfo, type FooterStatRefreshInfo, type GroupHeaderStatRefreshInfo } from "./types";
16
16
  import { type PerformanceMonitor } from "./PerformanceMonitor";
17
17
  interface Column extends HeaderConfig {
18
18
  children?: Column[];
@@ -137,8 +137,6 @@ interface RowContextMenuInfo {
137
137
  clientX: number;
138
138
  /** 鼠标屏幕 Y 坐标 */
139
139
  clientY: number;
140
- /** 右键发生时的不可变源单元格快照,供“快速生成规则”使用。 */
141
- sourceCell?: ActiveCellInfo;
142
140
  /** Canvas 行索引(供外部通过 isRowCheckedByIndex 查询选中状态) */
143
141
  _canvasRowIndex?: number;
144
142
  /** 右键行是否处于选中(checked)状态 */
@@ -148,20 +146,6 @@ interface RowContextMenuInfo {
148
146
  /** Row 对象内部的 _rowId,和 selectedRowIds 中的 key 格式一致 */
149
147
  _internalRowId?: string;
150
148
  }
151
- /** Row hover action context. sourceCell is limited to the hovered row. */
152
- export interface RowHoverActionInfo {
153
- rowData: RowData;
154
- rowIndex: number;
155
- sourceCell?: ActiveCellInfo;
156
- position: {
157
- x: number;
158
- y: number;
159
- width: number;
160
- height: number;
161
- };
162
- clientX?: number;
163
- clientY?: number;
164
- }
165
149
  export interface DataGridOptions {
166
150
  width?: number | string;
167
151
  height?: number | string;
@@ -445,10 +429,6 @@ export interface DataGridOptions {
445
429
  }) => void;
446
430
  /** 行右键菜单回调:行区域右键时触发 */
447
431
  onRowContextMenu?: (info: RowContextMenuInfo) => void;
448
- /** 行 hover 时是否展示通用“更多”操作。 */
449
- rowHoverAction?: boolean;
450
- /** 行 hover 操作点击回调。 */
451
- onRowHoverActionClick?: (info: RowHoverActionInfo) => void;
452
432
  onModuleOverflowClick?: (modules: any[], rowData: any, rowIndex: number, colIndex: number) => void;
453
433
  onAddRow?: (groupInfo?: any) => void;
454
434
  /** 表头排序图标点击回调 */
@@ -882,8 +862,6 @@ declare class DataGrid {
882
862
  private _customTokens;
883
863
  edgeScroller: EdgeScroller;
884
864
  rowIdMap: Map<string, number>;
885
- private conditionalRowStyles;
886
- private conditionalCellStyles;
887
865
  selectedRowIds: Set<string>;
888
866
  selectedGroupIds: Set<string>;
889
867
  lastSelectedRowIndex: number;
@@ -1002,11 +980,6 @@ declare class DataGrid {
1002
980
  }) => void;
1003
981
  /** 行右键菜单回调 */
1004
982
  onRowContextMenu?: (info: RowContextMenuInfo) => void;
1005
- rowHoverAction?: DataGridOptions['rowHoverAction'];
1006
- onRowHoverActionClick?: (info: RowHoverActionInfo) => void;
1007
- private _rowHoverActionInfo;
1008
- private _rowHoverActionIcon;
1009
- private _rowHoverActionIconTheme;
1010
983
  onModuleOverflowClick?: (modules: any[], rowData: any, rowIndex: number, colIndex: number) => void;
1011
984
  onAddRow?: (groupInfo?: any) => void;
1012
985
  onScroll?: (scrollX: number, scrollY: number) => void;
@@ -1602,12 +1575,6 @@ declare class DataGrid {
1602
1575
  * Called when data changes, interaction state changes, etc.
1603
1576
  */
1604
1577
  markDirty(): void;
1605
- private mergeConditionalStyle;
1606
- /** Apply a Worker result in one batch and trigger at most one canvas repaint. */
1607
- applyConditionalStylePatches(patches: ConditionalStylePatch[]): void;
1608
- clearConditionalStyles(rowIds?: Array<string | number>): void;
1609
- /** Resolve row style first, then cell style. Callers must treat the returned cache entry as read-only. */
1610
- getConditionalStyle(rowId: string | number | null | undefined, columnKey?: string): ConditionalStyle | undefined;
1611
1578
  /**
1612
1579
  * [PERF] 反注册本实例向 ImageManager 单例注册过的回调。
1613
1580
  * Vue 组件 onUnmounted 时调用,避免每次组件卸载/重建累计泄漏 callback
@@ -1958,12 +1925,6 @@ declare class DataGrid {
1958
1925
  y: number;
1959
1926
  height: number;
1960
1927
  } | null;
1961
- private getSelectedCellInfoForRow;
1962
- private updateRowHoverAction;
1963
- isRowHoverActionAt(x: number, y: number): boolean;
1964
- private drawRowHoverAction;
1965
- triggerRowHoverAction(clientX: number, clientY: number): void;
1966
- setRowHoverAction(action: DataGridOptions['rowHoverAction']): void;
1967
1928
  /**
1968
1929
  * 根据列 key 获取列的布局信息(精确的 x 偏移、宽度、冻结状态)
1969
1930
  * @param key - 列配置中的 key 属性
@@ -2021,8 +1982,6 @@ declare class DataGrid {
2021
1982
  width: number;
2022
1983
  height: number;
2023
1984
  } | null;
2024
- /** 将 Canvas viewer 的显示对象转换为可读文本,供右键等外部 UI 使用。 */
2025
- getCellDisplayText(cell: any): string;
2026
1985
  /**
2027
1986
  * 根据 canvas 局部坐标命中可见 cell(外部文件拖拽 hit-test 入口)。
2028
1987
  *
@@ -1,26 +1,4 @@
1
1
  import type { ViewerOption } from './viewers/types';
2
- /** Runtime style produced by conditional-format rules. `null` clears an existing value. */
3
- export interface ConditionalStyle {
4
- backgroundColor?: string | null;
5
- color?: string | null;
6
- fontWeight?: 'normal' | 'bold' | null;
7
- }
8
- /** A batched conditional-format update addressed by the stable DataGrid row id. */
9
- export interface ConditionalStylePatch {
10
- rowId: string | number;
11
- rowStyle?: ConditionalStyle | null;
12
- cellStyles?: Record<string, ConditionalStyle | null>;
13
- }
14
- /** Immutable snapshot used by context-menu based rule creation. */
15
- export interface ActiveCellInfo {
16
- rowId: string;
17
- rowIndex: number;
18
- colIndex: number;
19
- columnKey: string;
20
- rawValue: unknown;
21
- displayValue: string;
22
- rowData: Record<string, any>;
23
- }
24
2
  export interface CellData {
25
3
  value?: any;
26
4
  text?: string;
@@ -11,8 +11,6 @@ declare class PersonViewer implements CellViewer<PersonViewerData> {
11
11
  readonly type = "person";
12
12
  private imageManager;
13
13
  private _sm;
14
- /** The active cell style is shared by the small person-card drawing helpers in one synchronous draw pass. */
15
- private _cellStyle;
16
14
  /**
17
15
  * 每个 cell 内"被截断的 person 名称"几何缓存。
18
16
  * 二级结构 WeakMap<scope, Map<`${rowIndex}-${colIndex}`, PersonOverflowInfo[]>>:
@@ -23,8 +23,6 @@ declare class TaskNodeViewer implements CellViewer<TaskNodeViewerData> {
23
23
  /** 记录加载失败的图标 URL,避免反复重试 */
24
24
  private failedIcons;
25
25
  private _sm;
26
- /** Conditional formatting is injected per draw and must never be cached in node data. */
27
- private _cellStyle;
28
26
  private get NODE_ITEM_BG_COLOR();
29
27
  private get TEXT_COLOR();
30
28
  private get EMPTY_TEXT_COLOR();
@@ -8,7 +8,7 @@ import DataGrid from './components/index.vue';
8
8
  declare const install: (app: App) => void;
9
9
  export { install };
10
10
  export default DataGrid;
11
- export type { CellData, CellStyle, RowData, ColData, DataGridOptions, Position, Size, Rect, Range, CellRange, HistoryItem, ValidatorRule, ColumnType, ColumnConfig, SelectorState, EditorState, AutofillState, RangeState, DrawOptions, TextOptions, ClipboardState, EventHandlers, ConditionalStyle, ConditionalStylePatch, ActiveCellInfo, Direction, ScrollDirection, GroupLevel, SeparateLevel, BaseGroupedRowData, GroupRowData, SeparateRowData, NormalRowData, GroupedTableRowData, GroupRowStyle, SeparatorRowStyle, StatisticOption, FooterCellData, FooterData, FooterCellClickInfo, } from './core/types';
11
+ export type { CellData, CellStyle, RowData, ColData, DataGridOptions, Position, Size, Rect, Range, CellRange, HistoryItem, ValidatorRule, ColumnType, ColumnConfig, SelectorState, EditorState, AutofillState, RangeState, DrawOptions, TextOptions, ClipboardState, EventHandlers, Direction, ScrollDirection, GroupLevel, SeparateLevel, BaseGroupedRowData, GroupRowData, SeparateRowData, NormalRowData, GroupedTableRowData, GroupRowStyle, SeparatorRowStyle, StatisticOption, FooterCellData, FooterData, FooterCellClickInfo, } from './core/types';
12
12
  export { isGroupRow, isSeparateRow, isNormalRow, isRowSelectable, GROUP_TABLE_CONSTANTS, DEFAULT_GROUP_STYLES, DEFAULT_SEPARATOR_STYLES, } from './core/types';
13
13
  export type { CellBounds, ViewerRenderContext, ViewerDragState, CellViewer, CellViewerData, ViewerOption, ViewerStyle, TextViewerData, DropdownViewerData, ImageViewerData, PreImageViewerData, PersonViewerData, PersonInfo, ProgressViewerData, DatetimeViewerData, CaseTimeViewerData, BooleanViewerData, StatusViewerData, StatusOption, GroupHeaderViewerData, GroupNameViewerData, GroupNameTagItem, GroupNamePersonItem, SeparatorRowViewerData, PunchViewerData, PunchValue, ModuleInfo, ModuleViewerData, TextViewerChildCountTextPart, TextViewerChildCountIconPart, TextViewerChildCountRenderResult, TextViewerChildCountRenderer, TextViewerWithSwitcherData, FileItem, FileViewerData, HyperlinkTextViewerData, IUpstreamModule, IUpstreamReminderProperties, IUpstreamSyncProperty, IUpstreamFieldViewItem, UpstreamViewerData, TaskNodeItem, TaskNodeViewerData, NestedGridViewerData, NestedColumnConfig, ViewerConstructor, ViewerFactory, ViewerTypeMap, ViewerType, TypedCellData, TableActionButtonOption, TableActionButtonViewerData, } from './core/viewers/types';
14
14
  export { isTextViewerData, isDropdownViewerData, isPersonViewerData, isProgressViewerData, isNestedGridViewerData, } from './core/viewers/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arthub-table",
3
- "version": "0.2.87-next.1",
3
+ "version": "0.2.88",
4
4
  "description": "High-performance canvas-based table/grid component for Vue 3 with TypeScript support, featuring virtual scrolling, cell viewers, grouped rows, and nested grids.",
5
5
  "main": "dist/arthub-table.common.js",
6
6
  "module": "dist/arthub-table.umd.min.js",
@@ -1,4 +0,0 @@
1
- /** Resolve the stable render row id used by both cell and row-header conditional styles. */
2
- export declare function getConditionalStyleRowId(rowData: Record<string, unknown> | undefined, rowKey: string, rowId?: unknown): string | number | undefined;
3
- /** Blend a translucent conditional background once before canvas text and icons are drawn. */
4
- export declare function compositeConditionalBackground(foreground: string, background: string): string;