arthub-table 0.2.76 → 0.2.77-next.0

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.
@@ -16,6 +16,28 @@ export interface SearchMatchResult {
16
16
  highlightKeys: string[];
17
17
  currentHighlightKey?: string;
18
18
  }
19
+ /**
20
+ * 待定迁移态(pending relocation)行信息
21
+ * 由业务侧(AssetMatrix)通过 controllerProps.pendingRelocateInfo 传入,
22
+ * preprocessRow 按 rowKey 匹配命中行后打标 result._pendingRelocate。
23
+ * props 驱动的优势:行对象被业务侧重建(单行刷新换新行对象)后标记不丢失。
24
+ *
25
+ * 兼容两种形态:单对象(单行待定)或数组(多行待定,共享标题)。
26
+ */
27
+ export interface PendingRelocateInfo {
28
+ /** 待定行的 id(按 rowKey 匹配,字符串化比较,不假设类型) */
29
+ rowId: string | number;
30
+ /** 提示条文案(如「此记录将按照分组规则调整至其他分组」) */
31
+ bannerText: string;
32
+ /** 匹配用的行 key,默认 'id'(业务侧 grid.rowKey 可配) */
33
+ rowKey?: string;
34
+ /**
35
+ * 多行待定模式下:该行是否为「连续待定块」的首行。
36
+ * 仅块首行绘制共享标题 banner(行高 +24);块内其余行只染黄底(行高不变)。
37
+ * 单对象(单行模式)缺省视为 true。
38
+ */
39
+ isBlockStart?: boolean;
40
+ }
19
41
  /**
20
42
  * Preprocessed row data with computed metadata
21
43
  */
@@ -30,6 +52,11 @@ export interface PreprocessedRow {
30
52
  _cpHighLight?: boolean;
31
53
  /** CP 高亮行中需要使用高亮文字色的列 key */
32
54
  _cpHighLightFields?: string[];
55
+ /** 待定迁移态标记:命中 props.pendingRelocateInfo 的行由 preprocessRow 写入 */
56
+ _pendingRelocate?: {
57
+ bannerText: string;
58
+ isBlockStart?: boolean;
59
+ };
33
60
  _isTopLevelEntity?: boolean;
34
61
  _isEmpty?: boolean;
35
62
  _isGroup?: boolean;
@@ -15,6 +15,14 @@ declare class Row extends Context {
15
15
  cells: Cell[];
16
16
  rowHeader: RowHeader;
17
17
  constructor(grid: DataGrid, rowIndex: number, x: number, y: number, height: number, data: RowData);
18
+ /**
19
+ * 待定迁移态提示贴片高度:本行为待定行且是「连续待定块」的首行时返回
20
+ * PENDING_RELOCATE_BANNER_HEIGHT,否则 0。
21
+ * 贴片悬浮绘制在行顶部(不占行高,cells 几何不受影响)。
22
+ * 多行待定(共享标题)模式下,仅块首行绘制贴片,块内其余行只染黄底;
23
+ * 单行模式(单对象打标,无 isBlockStart)恒为块首,行为与旧版一致。
24
+ */
25
+ get pendingRelocateBannerHeight(): number;
18
26
  isInVerticalAutofill(mouseX: number, mouseY: number): boolean;
19
27
  handleCheck(checked?: boolean, event?: MouseEvent, silent?: boolean): void;
20
28
  mouseDown(x: number, y: number, _clientX?: number, _clientY?: number): void;
@@ -27,5 +35,15 @@ declare class Row extends Context {
27
35
  resizeRow(rowIndex: number, height: number): void;
28
36
  rePaint(): void;
29
37
  draw(): void;
38
+ /**
39
+ * 绘制待迁移态提示贴片(对齐腾讯文档/智能表格交互)。
40
+ * - 悬浮在任务行外的左上方:底边贴行顶边线(bannerY = rowTop - height),
41
+ * 不占行高也不遮挡本行任何 cell 内容;clamp 到表头下缘(表头 z-order 在
42
+ * body 之上,越界部分会被表头盖住);
43
+ * - 横向冻结:锚定可视数据区开头(fixedLeftWidth),不随横向滚动移动;
44
+ * - 宽度自适应:仅包裹 图标+文案(padding + icon + gap + textWidth + padding),
45
+ * 超出可视区宽度时截断到可视宽度(clip 防溢出)。
46
+ */
47
+ private drawPendingRelocateBanner;
30
48
  }
31
49
  export default Row;
@@ -177,6 +177,12 @@ export interface ThemeTokens {
177
177
  bgCpHighlight: string;
178
178
  /** CP 高亮行文字色 */
179
179
  textCpHighlight: string;
180
+ /** 待定迁移态行背景色(编辑分组/筛选/搜索字段后等待迁移的行) */
181
+ bgPendingRelocate: string;
182
+ /** 待定迁移态行顶部提示条背景色(业务色,对齐智能表格 #f1c40f) */
183
+ bgPendingRelocateBanner: string;
184
+ /** 待定迁移态行顶部提示条文字色(业务色,亮黄条上的深色文字) */
185
+ textPendingRelocateBanner: string;
180
186
  /** 需求变更-新增需求背景色 */
181
187
  bgDemandChangeAdd: string;
182
188
  /** 需求变更-新增需求 hover 背景色 */
@@ -6,6 +6,8 @@ export declare const CHECK_BOX_WIDTH = 36;
6
6
  export declare const CELL_HEIGHT = 36;
7
7
  export declare const MIN_CELL_WIDTH = 50;
8
8
  export declare const MIN_CELL_HEIGHT = 36;
9
+ /** 待定迁移态(pending relocation)悬浮提示贴片高度:贴片悬浮盖在行顶部,不占行高 */
10
+ export declare const PENDING_RELOCATE_BANNER_HEIGHT = 24;
9
11
  export declare const SCROLLER_TRACK_SIZE = 16;
10
12
  export declare const SCROLLER_SIZE = 8;
11
13
  /** @deprecated 请使用 styleManager.getToken('scrollerColor') */
@@ -43,7 +43,7 @@ export { getFieldStatisticTypes } from './core/footer/utils';
43
43
  export { convertToDataGridColumns, } from './adapters/columnAdapter';
44
44
  export type { ITableHeader, } from './adapters/columnAdapter';
45
45
  export { convertToDataGridRows, isPerfLogEnabled, rebuildNestedColumnData, invalidatePreprocessRowCache, } from './adapters/rowDataAdapter';
46
- export type { PreprocessedRow, } from './adapters/rowDataAdapter';
46
+ export type { PreprocessedRow, PendingRelocateInfo, } from './adapters/rowDataAdapter';
47
47
  export { preprocessRowStyles, } from './adapters/styleAdapter';
48
48
  export type { RowStyleResult, } from './adapters/styleAdapter';
49
49
  export { DataGridEventAdapter, EventCategory, extractEventContext, mapDomEventToDataGridEvent, } from './adapters/DataGridEventAdapter';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arthub-table",
3
- "version": "0.2.76",
3
+ "version": "0.2.77-next.0",
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",