arthub-table 0.1.0-beta.21 → 0.1.0-beta.23
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.
- package/dist/arthub-table.common.js +1 -1
- package/dist/arthub-table.common.js.map +1 -1
- package/dist/arthub-table.umd.js +1 -1
- package/dist/arthub-table.umd.js.map +1 -1
- package/dist/arthub-table.umd.min.js +1 -1
- package/dist/arthub-table.umd.min.js.map +1 -1
- package/dist/types/adapters/DataGridIntegration.d.ts +16 -0
- package/dist/types/adapters/index.d.ts +1 -1
- package/dist/types/adapters/rowDataAdapter.d.ts +19 -0
- package/dist/types/core/DataGrid.d.ts +1 -1
- package/dist/types/core/Footer.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -613,6 +613,22 @@ export declare function refreshDataGridColumns(tableHeadListFixLeft: ITableHeade
|
|
|
613
613
|
* @param controllerProps - 业务 props(包含 resolver 函数等)
|
|
614
614
|
*/
|
|
615
615
|
export declare function refreshDataGridColumnByKeys(dataGrid: any, preprocessedData: PreprocessedRow[], rawDataList: Record<string, any>[], colKeys: string[], allHeaders: ITableHeader[], controllerProps: Record<string, any>): void;
|
|
616
|
+
/**
|
|
617
|
+
* Fast-path column refresh: skips adapter-layer full-row processing entirely.
|
|
618
|
+
*
|
|
619
|
+
* Only syncs raw values from rawDataList → preprocessedData for the specified
|
|
620
|
+
* columns, then tells DataGrid to refresh cached Cells. No permission
|
|
621
|
+
* recalculation, no transformCellValues.
|
|
622
|
+
*
|
|
623
|
+
* Prerequisites:
|
|
624
|
+
* - Target columns must be "simple" (cellValueTransformer handles display conversion
|
|
625
|
+
* at render time; transformCellValues would `continue` / skip them).
|
|
626
|
+
* - Business layer has already mutated rawDataList[i][key] with the new values.
|
|
627
|
+
*
|
|
628
|
+
* Performance: O(totalRows × colKeys) simple assignments + O(cachedRows × colKeys)
|
|
629
|
+
* Cell sync ≈ <5ms for 10000 rows (vs ~500ms+ for the full path).
|
|
630
|
+
*/
|
|
631
|
+
export declare function refreshDataGridColumnByKeysFast(dataGrid: any, preprocessedData: PreprocessedRow[], rawDataList: Record<string, any>[], colKeys: string[]): void;
|
|
616
632
|
/**
|
|
617
633
|
* [Optimization B] Async time-sliced version of refreshDataGridColumnByKeys.
|
|
618
634
|
* Processes rows in batches via refreshColumnCellValuesAsync, yielding to the
|
|
@@ -6,4 +6,4 @@ export { ITableHeader, VIEWER_TYPE_MAP, mapHeaderToColumn, convertToDataGridColu
|
|
|
6
6
|
export { PreprocessedRow, SearchMatchResult, expandProxyRow, calculatePermissions, collectErrors, calculateSearchMatch, calculateRowBgColor, preprocessRow, preprocessSingleRow, convertToDataGridRows, refreshColumnCellValues, refreshColumnCellValuesAsync, computeStageFlags, isPerfLogEnabled, } from './rowDataAdapter';
|
|
7
7
|
export { RowStyleResult, preprocessRowStyles, getRowClassName, getCellClassName, calculateFirstLeftColor, } from './styleAdapter';
|
|
8
8
|
export { DataGridEventAdapter, EventCategory, EventContext, extractEventContext, mapDomEventToDataGridEvent, } from './DataGridEventAdapter';
|
|
9
|
-
export { DataGridInitOptions, DataGridCallbacks, DataGridInitResult, buildDataGridInitParams, refreshDataGridRows, refreshDataGridColumns, refreshDataGridColumnByKeys, refreshDataGridColumnByKeysAsync, refreshDataGridRowByIndex, } from './DataGridIntegration';
|
|
9
|
+
export { DataGridInitOptions, DataGridCallbacks, DataGridInitResult, buildDataGridInitParams, refreshDataGridRows, refreshDataGridColumns, refreshDataGridColumnByKeys, refreshDataGridColumnByKeysAsync, refreshDataGridColumnByKeysFast, refreshDataGridRowByIndex, } from './DataGridIntegration';
|
|
@@ -120,6 +120,25 @@ export declare function convertToDataGridRows(tableDataList: Record<string, any>
|
|
|
120
120
|
* @param props - 业务 props
|
|
121
121
|
*/
|
|
122
122
|
export declare function refreshColumnCellValues(preprocessedData: PreprocessedRow[], rawDataList: Record<string, any>[], colKeys: string[], allHeaders: ITableHeader[], props: Record<string, any>): void;
|
|
123
|
+
/**
|
|
124
|
+
* Fast-path column value sync: only copies raw values from rawDataList to
|
|
125
|
+
* preprocessedData for the specified columns. Skips permission recalculation
|
|
126
|
+
* and transformCellValues entirely.
|
|
127
|
+
*
|
|
128
|
+
* Prerequisites:
|
|
129
|
+
* - The target columns must be "simple" columns whose values are used as-is
|
|
130
|
+
* by the viewer (i.e., transformCellValues would `continue` / skip them).
|
|
131
|
+
* - Value-to-display conversion is handled at render time by cellValueTransformer.
|
|
132
|
+
*
|
|
133
|
+
* Performance: O(totalRows) but only does a single property assignment per row
|
|
134
|
+
* per column key (~0.001ms/row), compared to the full refreshSingleRowColumns
|
|
135
|
+
* path which does sync + permissions + transform (~0.08ms/row).
|
|
136
|
+
*
|
|
137
|
+
* @param preprocessedData - The preprocessed row array (DataGrid's data source)
|
|
138
|
+
* @param rawDataList - The raw row array (business layer's tableTaskList)
|
|
139
|
+
* @param colKeys - Column keys to sync
|
|
140
|
+
*/
|
|
141
|
+
export declare function fastSyncColumnValues(preprocessedData: PreprocessedRow[], rawDataList: Record<string, any>[], colKeys: string[]): void;
|
|
123
142
|
/**
|
|
124
143
|
* [Optimization B] Async time-sliced version of refreshColumnCellValues.
|
|
125
144
|
* Processes rows in batches, yielding to the main thread between batches
|
|
@@ -1770,7 +1770,7 @@ declare class DataGrid {
|
|
|
1770
1770
|
setFooterCellData(columnKey: string, data: FooterCellData): void;
|
|
1771
1771
|
/** 一次性设置指定分组组头各列的统计数据 */
|
|
1772
1772
|
setGroupHeaderStatData(groupId: string | number, data: FooterData): void;
|
|
1773
|
-
/**
|
|
1773
|
+
/** 设置指定分组指定列的组头统计数据(不立即重绘,使用 markDirty 批量合并) */
|
|
1774
1774
|
setGroupHeaderStatCellData(groupId: string | number, columnKey: string, cellData: FooterCellData): void;
|
|
1775
1775
|
/**
|
|
1776
1776
|
* 设置所有组头行中指定列的 loading 状态
|
|
@@ -13,7 +13,7 @@ declare class Footer {
|
|
|
13
13
|
get y(): number;
|
|
14
14
|
/** 一次性设置所有列的统计数据 */
|
|
15
15
|
setFooterData(data: FooterData): void;
|
|
16
|
-
/**
|
|
16
|
+
/** 设置单列的统计数据(不立即重绘,使用 markDirty 批量合并) */
|
|
17
17
|
setFooterCellData(columnKey: string, data: FooterCellData): void;
|
|
18
18
|
/** 当列结构变化时,清理已不存在列的 footer 数据 */
|
|
19
19
|
cleanupFooterData(existingKeys: Set<string>): void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -47,5 +47,5 @@ export { preprocessRowStyles, } from './adapters/styleAdapter';
|
|
|
47
47
|
export type { RowStyleResult, } from './adapters/styleAdapter';
|
|
48
48
|
export { DataGridEventAdapter, EventCategory, extractEventContext, mapDomEventToDataGridEvent, } from './adapters/DataGridEventAdapter';
|
|
49
49
|
export type { EventContext, } from './adapters/DataGridEventAdapter';
|
|
50
|
-
export { buildDataGridInitParams, refreshDataGridRows, refreshDataGridColumns, refreshDataGridColumnByKeys, refreshDataGridColumnByKeysAsync, refreshDataGridRowByIndex, } from './adapters/DataGridIntegration';
|
|
50
|
+
export { buildDataGridInitParams, refreshDataGridRows, refreshDataGridColumns, refreshDataGridColumnByKeys, refreshDataGridColumnByKeysAsync, refreshDataGridColumnByKeysFast, refreshDataGridRowByIndex, } from './adapters/DataGridIntegration';
|
|
51
51
|
export type { DataGridInitOptions, DataGridCallbacks, DataGridInitResult, } from './adapters/DataGridIntegration';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arthub-table",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.23",
|
|
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",
|