arthub-table 0.2.67 → 0.2.68

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.
@@ -110,6 +110,10 @@ declare class Paint {
110
110
  borderRadius?: number;
111
111
  /** 半选状态(indeterminate),蓝色背景 + 白色横线 */
112
112
  indeterminate?: boolean;
113
+ /** 禁用态:不画对勾(优先于 checked),背景用 disabledBgColor */
114
+ disabled?: boolean;
115
+ /** 禁用态背景色,默认 #f5f5f5(明显灰),用于和未选中(白底)区分 */
116
+ disabledBgColor?: string;
113
117
  }): void;
114
118
  clearCanvas(x?: number, y?: number, width?: number, height?: number): void;
115
119
  /**
@@ -6,6 +6,8 @@ interface RowHeaderOptions {
6
6
  borderWidth?: number;
7
7
  color?: string;
8
8
  checked?: boolean;
9
+ /** 该行 checkbox 是否置灰禁用 */
10
+ disabled?: boolean;
9
11
  /** 数据驱动模式下的序号值(undefined 表示不显示序号) */
10
12
  dataIndex?: number | string;
11
13
  /** 父级分组层级(0/1/2),用于序号列分层背景色 */
@@ -15,6 +17,7 @@ declare class RowHeader extends Context {
15
17
  rowIndex: number;
16
18
  text: string | number;
17
19
  checked: boolean;
20
+ disabled: boolean;
18
21
  borderColor?: string;
19
22
  fillColor?: string;
20
23
  borderWidth?: number;
@@ -342,6 +342,8 @@ export interface NormalRowData extends BaseGroupedRowData {
342
342
  };
343
343
  /** Filter match status */
344
344
  filterMatched?: boolean;
345
+ /** 该行是否禁止勾选(选中):为 true 时不可被任何方式选中,checkbox 显示为置灰禁用态 */
346
+ disableSelect?: boolean;
345
347
  [key: string]: any;
346
348
  }
347
349
  /**
@@ -360,6 +362,12 @@ export declare function isSeparateRow(row: unknown): row is SeparateRowData;
360
362
  * Type guard to check if a row is a normal data row
361
363
  */
362
364
  export declare function isNormalRow(row: unknown): row is NormalRowData;
365
+ /**
366
+ * 是否为「可勾选(可选中)」的数据行。
367
+ * 组头行 / 分隔行 / 新建任务行 / 被业务标记 disableSelect 的行 均不可选。
368
+ * 所有写 selectedRowIds 的路径统一调用本谓词判断,未来扩展只改此处。
369
+ */
370
+ export declare function isRowSelectable(rowData: unknown): boolean;
363
371
  /**
364
372
  * Constants for grouped table rendering
365
373
  */
@@ -9,7 +9,7 @@ declare const install: (app: App) => void;
9
9
  export { install };
10
10
  export default DataGrid;
11
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
- export { isGroupRow, isSeparateRow, isNormalRow, GROUP_TABLE_CONSTANTS, DEFAULT_GROUP_STYLES, DEFAULT_SEPARATOR_STYLES, } from './core/types';
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, BooleanViewerData, StatusViewerData, StatusOption, GroupHeaderViewerData, GroupNameViewerData, GroupNameTagItem, GroupNamePersonItem, SeparatorRowViewerData, PunchViewerData, PunchValue, ModuleInfo, ModuleViewerData, 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';
15
15
  export { default as ViewerRegistry, getViewerRegistry, } from './core/viewers/ViewerRegistry';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arthub-table",
3
- "version": "0.2.67",
3
+ "version": "0.2.68",
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",