arthub-table 0.2.72-next.0 → 0.2.72-next.2

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.
@@ -51,6 +51,7 @@ export interface ITableHeader {
51
51
  showFilterIcon?: boolean;
52
52
  /** 筛选命中该列时为 true:筛选图标常驻显示且显示激活色 */
53
53
  filterIconActive?: boolean;
54
+ viewerConfig?: Record<string, any>;
54
55
  }
55
56
  /**
56
57
  * AssetMatrix ViewerNames 到 DataGrid ColumnType 的映射表
@@ -112,7 +112,8 @@ declare class FileViewer implements CellViewer<FileViewerData> {
112
112
  * 绘制交付物角标(右下角圆形图标)
113
113
  * 与 DOM .mark-icon iconfont 图标对齐:
114
114
  * - ah-icon_finish1: 绿色 #00bd77 圆形背景 + 白色勾(已完成)
115
- * - ah-icon_help2: 橙色 #ed954f 圆形背景 + 白色问号(待验收)
115
+ * - ah-icon_help2: 橙色 #FB4B51 圆形背景 + 白色问号(待验收)
116
+ * - ah-icon_help2: 橙色 #FAB300 圆形背景 + 白色L(待优化)
116
117
  */
117
118
  private drawMarkIcon;
118
119
  private drawIconByFileStatus;
@@ -77,7 +77,8 @@ declare class ImageViewer implements CellViewer<ImageViewerData> {
77
77
  * 绘制交付物角标(右下角圆形图标)
78
78
  * 与 DOM .mark-icon iconfont 图标对齐:
79
79
  * - ah-icon_finish1: 绿色 #00bd77 圆形背景 + 白色勾(已完成)
80
- * - ah-icon_help2: 橙色 #ed954f 圆形背景 + 白色问号(待验收)
80
+ * - ah-icon_help2: 橙色 #FB4B51 圆形背景 + 白色问号(待验收)
81
+ * - ah-icon_help2: 橙色 #FAB300 圆形背景 + 白色L(待优化)
81
82
  */
82
83
  private drawMarkIcon;
83
84
  /**
@@ -88,7 +88,8 @@ declare class RelatedTaskViewer implements CellViewer<RelatedTaskViewerData> {
88
88
  * Draw the deliverable acceptance mark badge (bottom-right circle) on a thumbnail.
89
89
  * Aligned with FileViewer.drawMarkIcon / ImageViewer.drawMarkIcon:
90
90
  * - ah-icon_finish1: green circle + white check (已验收)
91
- * - ah-icon_help2: orange circle + white question mark (待验收)
91
+ * - ah-icon_help2: redhon circle + white question mark (待验收)
92
+ * - ah-icon_wait1: yellow circle + white L mark ()
92
93
  *
93
94
  * Only invoked when the related-task display field's fileData item carries a `mark`
94
95
  * (the business layer gates it by 被引用字段.showAcceptanceRemind && 节点关联任务列.isAcceptanceRemind).
@@ -3,7 +3,7 @@
3
3
  * Displays task names with tree hierarchy, expand/collapse buttons,
4
4
  * task icons, child count badges, and error/warning indicators
5
5
  */
6
- import type { CellViewer, ViewerRenderContext, TextViewerWithSwitcherData } from './types';
6
+ import type { CellViewer, TextViewerWithSwitcherData, ViewerRenderContext } from './types';
7
7
  /**
8
8
  * TextViewerWithSwitcher renders task names with tree hierarchy
9
9
  * Supports expand/collapse, task icons, child count, error indicators
@@ -23,6 +23,7 @@ declare class TextViewerWithSwitcher implements CellViewer<TextViewerWithSwitche
23
23
  private _sm;
24
24
  private arrowColoredCanvas;
25
25
  private arrowColoredColor;
26
+ private childCountIconColoredCanvases;
26
27
  constructor();
27
28
  /**
28
29
  * Preload SVG icons
@@ -108,6 +109,10 @@ declare class TextViewerWithSwitcher implements CellViewer<TextViewerWithSwitche
108
109
  * Calculate right reserved width for totalNum, downstream, and error icons
109
110
  */
110
111
  private calcRightReservedWidth;
112
+ private normalizeOpacity;
113
+ private normalizeChildCountTextPart;
114
+ private resolveChildCountRender;
115
+ private calcChildCountRenderWidth;
111
116
  /**
112
117
  * Draw right area: totalNum icon, downstream indicator, error/warning icon
113
118
  */
@@ -122,6 +127,9 @@ declare class TextViewerWithSwitcher implements CellViewer<TextViewerWithSwitche
122
127
  * @returns New right X position (moving leftward)
123
128
  */
124
129
  private drawTotalNum;
130
+ private drawCustomTotalNum;
131
+ private drawChildCountTextPart;
132
+ private drawChildCountIcon;
125
133
  /**
126
134
  * Draw downstream node indicator (icon_history1.svg, colored #ffb74d, 16x16)
127
135
  * @returns New right X position (moving leftward)
@@ -315,7 +315,7 @@ export interface ImageViewerData extends CellViewerData {
315
315
  statuses?: Record<string | number, number | string | undefined>;
316
316
  /** 每个 assetId 对应的文件格式,用于加载失败时显示文件类型图标 */
317
317
  fileFormats?: Record<string | number, string | undefined>;
318
- /** 每个 assetId 对应的交付物角标标记(如 'ah-icon_finish1' / 'ah-icon_help2') */
318
+ /** 每个 assetId 对应的交付物角标标记(如 'ah-icon_finish1' / 'ah-icon_help2' / 'ah-icon_wait1') */
319
319
  marks?: Record<string | number, string | undefined>;
320
320
  /** Alternative text */
321
321
  alt?: string;
@@ -660,6 +660,26 @@ export interface ModuleViewerData extends CellViewerData {
660
660
  /**
661
661
  * Text viewer with switcher data (tree expand/collapse + task name)
662
662
  */
663
+ export interface TextViewerChildCountTextPart {
664
+ text: string | number;
665
+ color?: string;
666
+ opacity?: number;
667
+ }
668
+ export interface TextViewerChildCountIconPart {
669
+ color?: string;
670
+ opacity?: number;
671
+ }
672
+ export interface TextViewerChildCountRenderResult {
673
+ text?: string | number | TextViewerChildCountTextPart;
674
+ prefix?: string | number | TextViewerChildCountTextPart;
675
+ icon?: TextViewerChildCountIconPart;
676
+ }
677
+ export type TextViewerChildCountRenderer = (params: {
678
+ data: CellViewerData & Record<string, any>;
679
+ rowData?: Record<string, any>;
680
+ count: number;
681
+ defaultText: string;
682
+ }) => TextViewerChildCountRenderResult | string | number | null | undefined;
663
683
  export interface TextViewerWithSwitcherData extends CellViewerData {
664
684
  value: string | number | null;
665
685
  /** Display label (overrides value when present) */
@@ -682,6 +702,8 @@ export interface TextViewerWithSwitcherData extends CellViewerData {
682
702
  iconFile?: string;
683
703
  /** Child node count */
684
704
  count?: number;
705
+ /** Optional column-level child-count render resolver. Defaults to the existing icon + count. */
706
+ renderChildCount?: TextViewerChildCountRenderer;
685
707
  /** Whether the node has downstream nodes */
686
708
  hasDownstreamNode?: boolean;
687
709
  /** Rich text HTML content */
@@ -732,7 +754,7 @@ export interface FileItem {
732
754
  assetId?: number;
733
755
  /** 文件状态 */
734
756
  status?: number;
735
- /** 交付物角标标记(如 'ah-icon_finish1' / 'ah-icon_help2') */
757
+ /** 交付物角标标记(如 'ah-icon_finish1' / 'ah-icon_help2' / 'ah-icon_wait1') */
736
758
  mark?: string;
737
759
  /**
738
760
  * 是否是外部 OS 文件 drop 触发的上传中占位项。
@@ -10,7 +10,7 @@ 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
12
  export { isGroupRow, isSeparateRow, isNormalRow, isRowSelectable, GROUP_TABLE_CONSTANTS, DEFAULT_GROUP_STYLES, DEFAULT_SEPARATOR_STYLES, } from './core/types';
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';
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, 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';
15
15
  export { default as ViewerRegistry, getViewerRegistry, } from './core/viewers/ViewerRegistry';
16
16
  export { registerDefaultViewers, defaultViewers } from './core/viewers/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arthub-table",
3
- "version": "0.2.72-next.0",
3
+ "version": "0.2.72-next.2",
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",