@taocompany/magic-grid 0.2.0 → 0.3.1

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.
Files changed (174) hide show
  1. package/README.md +586 -19
  2. package/dist/components/ColumnSettings/ColumnFilterPanelEmbed.vue.d.ts +4 -3
  3. package/dist/components/ColumnSettings/ColumnFilterPanelEmbed.vue.d.ts.map +1 -1
  4. package/dist/components/ColumnSettings/ColumnSettingsButton.vue.d.ts +6 -5
  5. package/dist/components/ColumnSettings/ColumnSettingsButton.vue.d.ts.map +1 -1
  6. package/dist/components/ColumnSettings/ColumnSettingsClearFiltersBar.vue.d.ts +4 -3
  7. package/dist/components/ColumnSettings/ColumnSettingsClearFiltersBar.vue.d.ts.map +1 -1
  8. package/dist/components/ColumnSettings/ColumnSettingsGroupedLists.vue.d.ts +4 -3
  9. package/dist/components/ColumnSettings/ColumnSettingsGroupedLists.vue.d.ts.map +1 -1
  10. package/dist/components/ColumnSettings/ColumnSettingsList.vue.d.ts +4 -3
  11. package/dist/components/ColumnSettings/ColumnSettingsList.vue.d.ts.map +1 -1
  12. package/dist/components/ColumnSettings/ColumnSettingsMenu.vue.d.ts +4 -3
  13. package/dist/components/ColumnSettings/ColumnSettingsMenu.vue.d.ts.map +1 -1
  14. package/dist/components/ColumnSettings/ColumnSettingsMenuIcon.vue.d.ts +3 -2
  15. package/dist/components/ColumnSettings/ColumnSettingsMenuIcon.vue.d.ts.map +1 -1
  16. package/dist/components/ColumnSettings/ColumnSettingsMenuItem.vue.d.ts +2 -1
  17. package/dist/components/ColumnSettings/ColumnSettingsMenuItem.vue.d.ts.map +1 -1
  18. package/dist/components/ColumnSettings/ColumnSettingsPanel.vue.d.ts +4 -3
  19. package/dist/components/ColumnSettings/ColumnSettingsPanel.vue.d.ts.map +1 -1
  20. package/dist/components/ColumnSettings/ColumnSettingsRow.vue.d.ts +4 -3
  21. package/dist/components/ColumnSettings/ColumnSettingsRow.vue.d.ts.map +1 -1
  22. package/dist/components/MagicGrid/MagicGrid.vue.d.ts +166 -155
  23. package/dist/components/MagicGrid/MagicGrid.vue.d.ts.map +1 -1
  24. package/dist/components/MagicGrid/useStatusBarContext.d.ts +3 -3
  25. package/dist/components/StatusBar/StatusBarDefaultPanels.vue.d.ts +3 -2
  26. package/dist/components/StatusBar/StatusBarDefaultPanels.vue.d.ts.map +1 -1
  27. package/dist/components/StatusBar/StatusBarRangeAggregationPanels.vue.d.ts +3 -2
  28. package/dist/components/StatusBar/StatusBarRangeAggregationPanels.vue.d.ts.map +1 -1
  29. package/dist/components/StatusBar/resolveStatusBarRangeAggregationPrecision.d.ts +1 -1
  30. package/dist/components/StatusBar/resolveStatusBarRangeAggregationPrecision.d.ts.map +1 -1
  31. package/dist/components/cellEditor/index.d.ts +1 -1
  32. package/dist/components/cellEditor/index.d.ts.map +1 -1
  33. package/dist/components/cellEditor/{useMagicGridCellEditor.d.ts → useCellEditor.d.ts} +4 -4
  34. package/dist/components/cellEditor/useCellEditor.d.ts.map +1 -0
  35. package/dist/core/api/gridApi.d.ts +35 -23
  36. package/dist/core/api/gridApi.d.ts.map +1 -1
  37. package/dist/core/cellComment/cellCommentService.d.ts +2 -2
  38. package/dist/core/column/columnModel.d.ts +1 -1
  39. package/dist/core/column/createExpandColumnDef.d.ts +1 -1
  40. package/dist/core/column/createGroupColumnDef.d.ts +1 -1
  41. package/dist/core/column/createIndexColumnDef.d.ts +1 -1
  42. package/dist/core/column/createSelectionColumnDef.d.ts +1 -1
  43. package/dist/core/column/prepareGridColumnDefs.d.ts +1 -1
  44. package/dist/core/column/resolveColumnAlign.d.ts +3 -3
  45. package/dist/core/column/resolveColumnAlign.d.ts.map +1 -1
  46. package/dist/core/editing/cellDisablePipeline.d.ts +1 -1
  47. package/dist/core/editing/cellEditPipeline.d.ts +5 -5
  48. package/dist/core/editing/cellEditPipeline.d.ts.map +1 -1
  49. package/dist/core/editing/gridValidation.d.ts +2 -2
  50. package/dist/core/grid/cellEditing/types.d.ts +4 -3
  51. package/dist/core/grid/cellEditing/types.d.ts.map +1 -1
  52. package/dist/core/grid/grid.d.ts +14 -12
  53. package/dist/core/grid/grid.d.ts.map +1 -1
  54. package/dist/core/grid/gridColumnLayout.d.ts +8 -5
  55. package/dist/core/grid/gridColumnLayout.d.ts.map +1 -1
  56. package/dist/core/grid/gridInteraction/focusController.d.ts +2 -2
  57. package/dist/core/grid/gridInteraction/focusController.d.ts.map +1 -1
  58. package/dist/core/grid/gridInteraction/indexSelectionDragSession.d.ts +2 -1
  59. package/dist/core/grid/gridInteraction/indexSelectionDragSession.d.ts.map +1 -1
  60. package/dist/core/grid/gridInteraction/rowDragSession.d.ts +3 -2
  61. package/dist/core/grid/gridInteraction/rowDragSession.d.ts.map +1 -1
  62. package/dist/core/grid/gridInteraction/types.d.ts +18 -13
  63. package/dist/core/grid/gridInteraction/types.d.ts.map +1 -1
  64. package/dist/core/grid/gridOptions.d.ts +6 -5
  65. package/dist/core/grid/gridOptions.d.ts.map +1 -1
  66. package/dist/core/grid/gridRowMutation.d.ts +5 -4
  67. package/dist/core/renderer/cellRangeVisualController.d.ts +2 -1
  68. package/dist/core/renderer/cellRangeVisualController.d.ts.map +1 -1
  69. package/dist/core/renderer/rowRenderer.d.ts +19 -12
  70. package/dist/core/renderer/rowRenderer.d.ts.map +1 -1
  71. package/dist/core/row/cellComp.d.ts +2 -1
  72. package/dist/core/row/cellComp.d.ts.map +1 -1
  73. package/dist/core/row/rowComp.d.ts +10 -5
  74. package/dist/core/row/rowComp.d.ts.map +1 -1
  75. package/dist/core/rowModel/clientSideRowModel.d.ts +1 -1
  76. package/dist/core/rowModel/createRowNodes.d.ts +1 -1
  77. package/dist/core/rowModel/rowDataExport.d.ts +1 -1
  78. package/dist/core/selection/cellClipboardService.d.ts +2 -1
  79. package/dist/core/selection/cellClipboardService.d.ts.map +1 -1
  80. package/dist/core/selection/selectable.d.ts +1 -1
  81. package/dist/core/styling/cellStylePipeline.d.ts +1 -1
  82. package/dist/core/theme/gridSize.d.ts +10 -10
  83. package/dist/core/theme/gridSize.d.ts.map +1 -1
  84. package/dist/core/theme/gridTheme.d.ts +8 -8
  85. package/dist/core/theme/gridTheme.d.ts.map +1 -1
  86. package/dist/core/theme/index.d.ts +2 -2
  87. package/dist/core/theme/index.d.ts.map +1 -1
  88. package/dist/core/transaction/applyTransaction.d.ts +1 -1
  89. package/dist/core/treeTable/treeLazyLoadService.d.ts +1 -1
  90. package/dist/core/types/align.d.ts +16 -20
  91. package/dist/core/types/align.d.ts.map +1 -1
  92. package/dist/core/types/businessRowId.d.ts +3 -2
  93. package/dist/core/types/businessRowId.d.ts.map +1 -1
  94. package/dist/core/types/cellClipboard.d.ts +3 -2
  95. package/dist/core/types/cellClipboard.d.ts.map +1 -1
  96. package/dist/core/types/cellColor.d.ts +1 -1
  97. package/dist/core/types/cellComment.d.ts +3 -2
  98. package/dist/core/types/cellComment.d.ts.map +1 -1
  99. package/dist/core/types/cellDisable.d.ts +1 -1
  100. package/dist/core/types/cellEditor.d.ts +4 -3
  101. package/dist/core/types/cellEditor.d.ts.map +1 -1
  102. package/dist/core/types/cellRenderer.d.ts +1 -1
  103. package/dist/core/types/cellSpan.d.ts +1 -1
  104. package/dist/core/types/column.d.ts +47 -32
  105. package/dist/core/types/column.d.ts.map +1 -1
  106. package/dist/core/types/columnAvailability.d.ts +1 -1
  107. package/dist/core/types/columnFilter.d.ts +1 -1
  108. package/dist/core/types/columnMove.d.ts +1 -1
  109. package/dist/core/types/columnResize.d.ts +1 -1
  110. package/dist/core/types/columnSettingsPanel.d.ts +2 -2
  111. package/dist/core/types/columnSettingsPanel.d.ts.map +1 -1
  112. package/dist/core/types/columnSort.d.ts +1 -1
  113. package/dist/core/types/columnVisibility.d.ts +1 -1
  114. package/dist/core/types/events.d.ts +8 -6
  115. package/dist/core/types/events.d.ts.map +1 -1
  116. package/dist/core/types/gridOptions.d.ts +9 -6
  117. package/dist/core/types/gridOptions.d.ts.map +1 -1
  118. package/dist/core/types/index.d.ts +2 -2
  119. package/dist/core/types/index.d.ts.map +1 -1
  120. package/dist/core/types/indexColumn.d.ts +14 -14
  121. package/dist/core/types/indexColumn.d.ts.map +1 -1
  122. package/dist/core/types/overflowTooltip.d.ts +1 -1
  123. package/dist/core/types/pipeline.d.ts +1 -1
  124. package/dist/core/types/rowComp.d.ts +10 -5
  125. package/dist/core/types/rowComp.d.ts.map +1 -1
  126. package/dist/core/types/rowDrag.d.ts +1 -1
  127. package/dist/core/types/rowExpansion.d.ts +1 -1
  128. package/dist/core/types/rowGrouping.d.ts +1 -1
  129. package/dist/core/types/rowHeight.d.ts +1 -1
  130. package/dist/core/types/rowMutation.d.ts +1 -1
  131. package/dist/core/types/rowMutationAsync.d.ts +1 -1
  132. package/dist/core/types/rowNode.d.ts +1 -1
  133. package/dist/core/types/selectionColumn.d.ts +14 -14
  134. package/dist/core/types/selectionColumn.d.ts.map +1 -1
  135. package/dist/core/types/summary.d.ts +1 -1
  136. package/dist/core/types/transaction.d.ts +1 -1
  137. package/dist/core/types/treeTable.d.ts +1 -1
  138. package/dist/core/types/validation.d.ts +1 -1
  139. package/dist/index.cjs.js +2 -2
  140. package/dist/index.cjs.js.map +1 -1
  141. package/dist/index.d.ts +2 -19
  142. package/dist/index.d.ts.map +1 -1
  143. package/dist/index.es.js +220 -224
  144. package/dist/index.es.js.map +1 -1
  145. package/dist/style.css +1 -1
  146. package/dist/types/core.cjs.js +0 -0
  147. package/dist/types/core.d.ts +3038 -0
  148. package/dist/types/core.d.ts.map +1 -0
  149. package/dist/types/core.es.js +0 -0
  150. package/dist/types/magic-grid-expose.d.ts +13 -2
  151. package/dist/types/magic-grid-expose.d.ts.map +1 -1
  152. package/dist/types/magic-grid.d.ts +318 -238
  153. package/dist/types/magic-grid.d.ts.map +1 -1
  154. package/dist/types/{statusBar.d.ts → status-bar.d.ts} +5 -1
  155. package/dist/types/status-bar.d.ts.map +1 -0
  156. package/dist/types/validation.cjs.js +0 -0
  157. package/dist/types/validation.d.ts +9 -0
  158. package/dist/types/validation.d.ts.map +1 -0
  159. package/dist/types/validation.es.js +0 -0
  160. package/dist/validation/asyncValidatorAdapter.d.ts +5 -6
  161. package/dist/validation/asyncValidatorAdapter.d.ts.map +1 -1
  162. package/dist/validation/index.d.ts +0 -1
  163. package/dist/validation/index.d.ts.map +1 -1
  164. package/dist/{validation-DWDC_zL7.js → validation-BHqm5Flb.js} +33 -33
  165. package/dist/validation-BHqm5Flb.js.map +1 -0
  166. package/dist/validation-CD6lt5wS.cjs.map +1 -1
  167. package/dist/validation.cjs.js +1 -1
  168. package/dist/validation.es.js +1 -1
  169. package/package.json +13 -2
  170. package/dist/components/cellEditor/useMagicGridCellEditor.d.ts.map +0 -1
  171. package/dist/types/index.d.ts +0 -5
  172. package/dist/types/index.d.ts.map +0 -1
  173. package/dist/types/statusBar.d.ts.map +0 -1
  174. package/dist/validation-DWDC_zL7.js.map +0 -1
@@ -1,49 +1,89 @@
1
+ import { SummaryAgg, SummaryMethod, SummaryScope } from '../core/types/summary';
2
+ import { GridHorizontalAlign, GridVerticalAlign } from '../core/types/align';
3
+ import { IndexColumnOptions } from '../core/types/indexColumn';
4
+ import { SelectionColumnOptions } from '../core/types/selectionColumn';
5
+ import { SelectableFn } from '../core/selection/selectable';
6
+ import { ColumnComparatorFn } from '../core/types/columnSort';
7
+ import { SortModelItem } from '../core/types';
8
+ import { ColumnDataFilterType } from '../core/types/columnFilter';
9
+ import { FilterParams } from '../core/types/pipeline';
10
+ import { ColSpanFn, RowSpanFn, SpanRowsFunc } from '../core/types/cellSpan';
11
+ import { CellRendererFn } from '../core/types/cellRenderer';
12
+ import { CellEditorDef, CellEditorParams, CellEditType, CellEditorFn, CellEditBehavior } from '../core/types/cellEditor';
13
+ import { CellEditorMode } from '../core/types/cellEditorMode';
14
+ import { CellValidator, ValidationRules, InvalidEditValueMode, RowValidator } from '../core/types/validation';
15
+ import { SuppressCellCommentFn, CellCommentsDataSource, CellCommentTrigger } from '../core/types/cellComment';
16
+ import { CellDisabledFn, IsRowDisabledFn } from '../core/types/cellDisable';
17
+ import { CellStyle, CellStyleFn, RowStyle } from '../core/types/cellColor';
18
+ import { TooltipValueGetter, HeaderTooltipValueGetter, TooltipComponentType, TooltipShowMode } from '../core/types/overflowTooltip';
19
+ import { RowSelectionInput } from '../core/types/rowSelectionOptions';
20
+ import { FilterSetValueMode, FilterSetDateLayoutMode } from '../core/types/filterGridOptions';
21
+ import { AsyncRowMutationHandlers } from '../core/types/rowMutationAsync';
22
+ import { AutoSizeStrategy } from '../core/types/columnAutosize';
23
+ import { StatusBarHeightInput } from '../core/theme/gridSize';
24
+ import { RowDragCommitMode, RowDragCommitHandler } from '../core/types/rowDrag';
25
+ import { GetRowHeightFn } from '../core/types/rowHeight';
26
+ import { IsRowMasterFn, DetailRowHeightFn, GetDetailRowDataFn, DetailCellRendererFn } from '../core/types/rowExpansion';
27
+ import { GroupDisplayType, GroupKeyCreatorFn, GroupComparatorFn, GroupCellRendererFn } from '../core/types/rowGrouping';
28
+ import { TreeDragScope, SetDataPathFn, GetDataPathFn, TreeValueGetterFn, TreeDisplayType, HasTreeChildrenFn, LoadTreeChildrenFn } from '../core/types/treeTable';
29
+ import { ProcessCellForClipboardFn, ProcessCellFromClipboardFn, ProcessDataFromClipboardFn } from '../core/types/cellClipboard';
30
+ import { CellSelectionOptions } from '../core/types/cellRangeSelection';
31
+ import { OverlayType, OverlayComponentType } from '../core/types/emptyState';
32
+ import { StatusBarRangeAggregationPosition, StatusBarRangeAggregationPrecisionInput } from './status-bar';
33
+ import { GridApi } from '../core/api/gridApi';
1
34
  /** 用户行数据:保持普通对象,禁止 reactive 深代理 */
2
35
  export type RowData = Record<string, unknown>;
3
- export type TreeDragScope = import('../core/types/treeTable').TreeDragScope;
4
- export type SetDataPathParams = import('../core/types/treeTable').SetDataPathParams;
5
- export type SetDataPathFn = import('../core/types/treeTable').SetDataPathFn;
6
- export type MagicGridBorder = 'border' | 'none' | 'linear';
7
- export type MagicGridTheme = 'light' | 'dark';
8
- export type MagicGridSize = 'mini' | 'small' | 'default' | 'large';
36
+ /**
37
+ * 边框样式(默认 `border`)
38
+ * - `border`:表头 / 表体单元格全网格线
39
+ * - `none`:无单元格线;表头与表体保留底部分隔线
40
+ * - `linear`:表头 / 表体单元格仅底部分隔线
41
+ */
42
+ export type GridBorder = 'border' | 'none' | 'linear';
43
+ /** 主题 preset:`light` 亮色(默认);`dark` 暗色语义 token */
44
+ export type GridTheme = 'light' | 'dark';
45
+ /** 尺寸 preset;rowHeight / headerHeight 未显式传入时由 size 推导 */
46
+ export type GridSize = 'mini' | 'small' | 'default' | 'large';
9
47
  /** 圆角:false/0 无圆角;true 跟随 size;number 自定义 px。默认 false */
10
- export type MagicGridRounded = number | boolean;
11
- export type SummaryScope = import('../core/types/summary').SummaryScope;
12
- export type SummaryAgg = import('../core/types/summary').SummaryAgg;
13
- export type SummaryAggBuiltin = import('../core/types/summary').SummaryAggBuiltin;
14
- export type SummaryAggFn = import('../core/types/summary').SummaryAggFn;
15
- export type SummaryMethod = import('../core/types/summary').SummaryMethod;
16
- export type SummaryMethodParams = import('../core/types/summary').SummaryMethodParams;
17
- export type MagicGridHorizontalAlign = import('../core/types/align').MagicGridHorizontalAlign;
18
- export type MagicGridVerticalAlign = import('../core/types/align').MagicGridVerticalAlign;
19
- export type IndexColumnOptions = import('../core/types/indexColumn').IndexColumnOptions;
20
- export type SelectionColumnOptions = import('../core/types/selectionColumn').SelectionColumnOptions;
21
- export type SelectableParams = import('../core/selection/selectable').SelectableParams;
22
- export type SelectableFn = import('../core/selection/selectable').SelectableFn;
23
- export type IsRowDisabledParams = import('../core/types/cellDisable').IsRowDisabledParams;
24
- export type IsRowDisabledFn = import('../core/types/cellDisable').IsRowDisabledFn;
25
- export type CellDisabledParams = import('../core/types/cellDisable').CellDisabledParams;
26
- export type CellDisabledFn = import('../core/types/cellDisable').CellDisabledFn;
27
- export type CellStyle = import('../core/types/cellColor').CellStyle;
28
- export type CellStyleFn = import('../core/types/cellColor').CellStyleFn;
29
- export type CellStyleParams = import('../core/types/cellColor').CellStyleParams;
30
- export type RowStyle = import('../core/types/cellColor').RowStyle;
31
- export type RowStyleFn = import('../core/types/cellColor').RowStyleFn;
32
- export type RowStyleParams = import('../core/types/cellColor').RowStyleParams;
33
- export type ColumnHiddenChangedEvent = import('../core/types/columnVisibility').ColumnHiddenChangedEvent;
34
- export type ColumnHiddenChangedSource = import('../core/types/columnVisibility').ColumnHiddenChangedSource;
35
- export type TooltipShowMode = import('../core/types/overflowTooltip').TooltipShowMode;
36
- export type TooltipValueGetter = import('../core/types/overflowTooltip').TooltipValueGetter;
37
- export type TooltipValueGetterParams = import('../core/types/overflowTooltip').TooltipValueGetterParams;
38
- export type HeaderTooltipValueGetter = import('../core/types/overflowTooltip').HeaderTooltipValueGetter;
39
- export type HeaderTooltipValueGetterParams = import('../core/types/overflowTooltip').HeaderTooltipValueGetterParams;
40
- export type ColumnComparatorFn = import('../core/types/columnSort').ColumnComparatorFn;
41
- export type SortModelItem = import('../core/types').SortModelItem;
42
- export interface ColumnDef {
48
+ export type GridRounded = number | boolean;
49
+ export type { TreeDragScope, SetDataPathParams, SetDataPathFn, GetDataPathFn, TreeValueGetterFn, TreeDisplayType, HasTreeChildrenFn, LoadTreeChildrenFn, } from '../core/types/treeTable';
50
+ export type { SummaryScope, SummaryAgg, SummaryAggBuiltin, SummaryAggFn, SummaryMethod, SummaryMethodParams, } from '../core/types/summary';
51
+ export type { GridHorizontalAlign, GridVerticalAlign } from '../core/types/align';
52
+ export type { IndexColumnOptions } from '../core/types/indexColumn';
53
+ export type { SelectionColumnOptions } from '../core/types/selectionColumn';
54
+ export type { SelectableParams, SelectableFn } from '../core/selection/selectable';
55
+ export type { IsRowDisabledParams, IsRowDisabledFn, CellDisabledParams, CellDisabledFn, } from '../core/types/cellDisable';
56
+ export type { CellStyle, CellStyleFn, CellStyleParams, RowStyle, RowStyleFn, RowStyleParams, } from '../core/types/cellColor';
57
+ export type { ColumnHiddenChangedEvent, ColumnHiddenChangedSource, } from '../core/types/columnVisibility';
58
+ export type { TooltipShowMode, TooltipValueGetter, TooltipValueGetterParams, HeaderTooltipValueGetter, HeaderTooltipValueGetterParams, TooltipComponentType, } from '../core/types/overflowTooltip';
59
+ export type { ColumnComparatorFn } from '../core/types/columnSort';
60
+ export type { SortModelItem } from '../core/types';
61
+ export type { ColumnDataFilterType } from '../core/types/columnFilter';
62
+ export type { FilterParams, ColumnFilter } from '../core/types/pipeline';
63
+ export type { ColSpanFn, RowSpanFn, SpanRowsFunc } from '../core/types/cellSpan';
64
+ export type { CellEditorDef, CellEditorParams, CellEditType, CellEditorFn, CellEditBehavior, } from '../core/types/cellEditor';
65
+ export type { CellEditorMode } from '../core/types/cellEditorMode';
66
+ export type { CellValidator, ValidationRules, InvalidEditValueMode, RowValidator, } from '../core/types/validation';
67
+ export type { SuppressCellCommentFn, CellCommentsDataSource, CellCommentTrigger, } from '../core/types/cellComment';
68
+ export type { RowSelectionInput } from '../core/types/rowSelectionOptions';
69
+ export type { FilterSetValueMode, FilterSetDateLayoutMode } from '../core/types/filterGridOptions';
70
+ export type { AsyncRowMutationHandlers } from '../core/types/rowMutationAsync';
71
+ export type { AutoSizeStrategy } from '../core/types/columnAutosize';
72
+ export type { StatusBarHeightInput } from '../core/theme/gridSize';
73
+ export type { RowDragCommitMode, RowDragCommitHandler } from '../core/types/rowDrag';
74
+ export type { GetRowHeightFn } from '../core/types/rowHeight';
75
+ export type { IsRowMasterFn, DetailRowHeightFn, GetDetailRowDataFn, DetailCellRendererFn, } from '../core/types/rowExpansion';
76
+ export type { GroupDisplayType, GroupKeyCreatorFn, GroupComparatorFn, GroupCellRendererFn, } from '../core/types/rowGrouping';
77
+ export type { ProcessCellForClipboardFn, ProcessCellFromClipboardFn, ProcessDataFromClipboardFn, } from '../core/types/cellClipboard';
78
+ export type { CellSelectionOptions } from '../core/types/cellRangeSelection';
79
+ export type { OverlayType, OverlayComponentType } from '../core/types/emptyState';
80
+ export type { StatusBarRangeAggregationPosition, StatusBarRangeAggregationPrecisionInput, } from './status-bar';
81
+ /** 列定义;`TData` 为行数据类型,用于 prop / 回调参数类型推导 */
82
+ export interface ColumnDef<TData extends RowData = RowData> {
43
83
  /** 列唯一标识,缺省等于 prop */
44
84
  key?: string;
45
85
  /** 数据字段 */
46
- prop?: string;
86
+ prop?: Extract<keyof TData, string>;
47
87
  /** 表头文案 */
48
88
  label?: string;
49
89
  /**
@@ -53,113 +93,120 @@ export interface ColumnDef {
53
93
  */
54
94
  available?: boolean;
55
95
  /**
56
- * Phase 22 · 是否隐藏该列(不渲染 header/body/footer · 不参与布局)。
96
+ * 是否隐藏该列(不渲染 header/body/footer · 不参与布局)。
57
97
  * 默认 false(可见)。系统列忽略此配置。
58
98
  */
59
99
  hidden?: boolean;
60
100
  /** 尺寸 */
61
101
  width?: number;
102
+ /** 列最小宽度(px) */
62
103
  minWidth?: number;
104
+ /** 列最大宽度(px) */
63
105
  maxWidth?: number;
106
+ /** flex 布局权重;与 width 互斥时 flex 参与剩余空间分配 */
64
107
  flex?: number;
65
- /** 行为(后续里程碑逐步实现) */
66
108
  /** 是否允许表头排序;缺省继承 Grid `sortable`(默认 false) */
67
109
  sortable?: boolean;
68
110
  /**
69
111
  * 自定义排序比较器;入参为两行的单元格原始值(经 valueGetter)。
70
- * 须返回 asc 语义比较结果;desc 由 SortStage 统一取反。
112
+ * 须返回 asc 语义比较结果;desc 由 Grid 统一取反。
71
113
  */
72
- comparator?: import('../core/types/columnSort').ColumnComparatorFn;
114
+ comparator?: ColumnComparatorFn;
73
115
  /** 是否允许列筛选;缺省继承 Grid `filterable`(默认 false) */
74
116
  filterable?: boolean;
75
117
  /** 列筛选数据类型;默认 text */
76
- filterType?: import('../core/types/columnFilter').ColumnDataFilterType;
118
+ filterType?: ColumnDataFilterType;
77
119
  /** 列级 filter 参数(如 caseSensitive) */
78
- filterParams?: import('../core/types/pipeline').FilterParams;
120
+ filterParams?: FilterParams;
79
121
  /** 筛选用取值;缺省 formatter → valueGetter → prop */
80
- filterFormatter?: (row: RowData) => unknown;
81
- editable?: boolean | ((row: RowData) => boolean);
122
+ /** 筛选用取值;缺省 formatter valueGetter → prop */
123
+ filterFormatter?: (row: TData) => unknown;
124
+ /** 是否可编辑;可函数按行判断 */
125
+ editable?: boolean | ((row: TData) => boolean);
82
126
  /** 是否允许拖拽调整列宽;缺省继承 Grid `resizable`(默认 true) */
83
127
  resizable?: boolean;
84
128
  /** 禁止 resize 把柄 dblclick / API auto-size;对标 AG Grid suppressAutoSize */
85
129
  suppressAutoSize?: boolean;
86
130
  /** 禁止参与 sizeColumnsToFit;对标 AG Grid suppressSizeToFit */
87
131
  suppressSizeToFit?: boolean;
132
+ /** 列固定:left / right;null 或不传为不固定 */
88
133
  fixed?: 'left' | 'right' | null;
89
134
  /** 是否允许表头拖拽重排;默认继承 grid.columnMovable */
90
135
  movable?: boolean;
91
- /** 该列单元格作为行拖拽起点;默认 false(Phase 15) */
136
+ /** 该列单元格作为行拖拽起点;默认 false */
92
137
  rowDrag?: boolean;
93
138
  /**
94
- * Phase 17 · 在该列渲染 expand/collapse 控件;需 Grid `masterDetail: true`。
139
+ * 在该列渲染 expand/collapse 控件;需 Grid `masterDetail: true`。
95
140
  * 与 `showExpandColumn` 可并存(列级优先展示位置由列序决定)。
96
141
  */
97
142
  rowExpand?: boolean;
98
143
  /**
99
- * Phase 18 · 该列参与行分组;需 Grid `rowGrouping: true`。
144
+ * 该列参与行分组;需 Grid `rowGrouping: true`。
100
145
  * 与 `rowGroupIndex` 控制多级顺序。
101
146
  */
102
147
  rowGroup?: boolean;
103
- /** Phase 18 · 多级分组顺序(小者优先);缺省按列定义顺序 */
148
+ /** 多级分组顺序(小者优先);缺省按列定义顺序 */
104
149
  rowGroupIndex?: number;
105
- /** Phase 18 · 分组 footer 行的聚合;缺省不在该列展示 group 汇总 */
150
+ /** 分组 footer 行的聚合;缺省不在该列展示 group 汇总 */
106
151
  groupAgg?: SummaryAgg;
107
152
  /**
108
- * Phase 18 · 在该用户列渲染 groupHeader 单元格(chevron / 缩进 / 键值)。
153
+ * 在该用户列渲染 groupHeader 单元格(chevron / 缩进 / 键值)。
109
154
  * 与系统 auto group 列二选一;不可用于系统列。
110
155
  */
111
156
  showGroupHeaderCell?: boolean;
112
157
  /**
113
- * Phase 18 · 在该用户列渲染 groupFooter 标签(如「小计」)。
158
+ * 在该用户列渲染 groupFooter 标签(如「小计」)。
114
159
  * 聚合数值仍由 `groupAgg` 列展示。
115
160
  */
116
161
  showGroupFooterCell?: boolean;
117
- /** Phase 18 · 覆盖 Grid `groupFooterLabel` 的本列小计文案 */
162
+ /** 覆盖 Grid `groupFooterLabel` 的本列小计文案 */
118
163
  groupFooterLabel?: string;
119
- /** 该列内容撑开行高(与其他 autoHeight 列取 max);默认 false(Phase 15) */
164
+ /** 该列内容撑开行高(与其他 autoHeight 列取 max);默认 false */
120
165
  autoHeight?: boolean;
121
166
  /**
122
- * Phase 16 · 横向合并列数(≥1);表体与表尾共用,用 `params.isSummaryRow` 分支。
167
+ * 横向合并列数(≥1);表体与表尾共用,用 `params.isSummaryRow` 分支。
123
168
  * 需 Grid `enableCellSpan: true`。系统列忽略。
124
169
  */
125
- colSpan?: import('../core/types/cellSpan').ColSpanFn;
170
+ colSpan?: ColSpanFn;
126
171
  /**
127
- * Phase 16 · 纵向合并行数(≥1);仅表体。与 `spanRows` 互斥(本字段优先)。
172
+ * 纵向合并行数(≥1);仅表体。与 `spanRows` 互斥(本字段优先)。
128
173
  * 需 Grid `enableCellSpan: true`。系统列忽略。
129
174
  */
130
- rowSpan?: import('../core/types/cellSpan').RowSpanFn;
175
+ rowSpan?: RowSpanFn;
131
176
  /**
132
- * Phase 16 · 相邻等值自动纵向合并;`true` 或自定义比较函数。
177
+ * 相邻等值自动纵向合并;`true` 或自定义比较函数。
133
178
  * 需 Grid `enableCellSpan: true`。同列若同时配 `rowSpan` 则本字段不生效。
134
179
  */
135
- spanRows?: boolean | import('../core/types/cellSpan').SpanRowsFunc;
136
- valueGetter?: (row: RowData, value: unknown) => unknown;
137
- formatter?: (row: RowData, value: unknown) => string;
180
+ spanRows?: boolean | SpanRowsFunc;
181
+ /** 读取单元格展示值(优先于 prop 直读) */
182
+ valueGetter?: (row: TData, value: unknown) => unknown;
183
+ /** 格式化展示文案(不影响原始值) */
184
+ formatter?: (row: TData, value: unknown) => string;
138
185
  /** 自定义单元格渲染器(函数;Vue 组件通过 MagicGrid 槽位注册) */
139
- cellRenderer?: import('../core/types/cellRenderer').CellRendererFn;
186
+ cellRenderer?: CellRendererFn;
140
187
  /** 自定义单元格编辑器(函数、内置 text / number / checkbox、或命名引用) */
141
- cellEditor?: import('../core/types/cellEditor').CellEditorDef;
188
+ cellEditor?: CellEditorDef;
142
189
  /** 编辑器呈现:overlay 进编辑态;inline 常驻格内。默认 overlay */
143
- cellEditorMode?: import('../core/types/cellEditorMode').CellEditorMode;
190
+ cellEditorMode?: CellEditorMode;
144
191
  /** 提交前解析编辑值 */
145
- valueParser?: (value: unknown, params: import('../core/types/cellEditor').CellEditorParams) => unknown;
146
- /** 自定义写回逻辑,返回 false 拒绝提交;可 async(块 5) */
147
- valueSetter?: (params: import('../core/types/cellEditor').CellEditorParams & {
192
+ valueParser?: (value: unknown, params: CellEditorParams) => unknown;
193
+ /** 自定义写回逻辑,返回 false 拒绝提交;可 async */
194
+ valueSetter?: (params: CellEditorParams & {
148
195
  newValue: unknown;
149
196
  signal: AbortSignal;
150
197
  }) => boolean | Promise<boolean>;
151
198
  /** 编辑触发策略,缺省继承 grid 级配置 */
152
- editType?: import('../core/types/cellEditor').CellEditType;
199
+ editType?: CellEditType;
153
200
  /** 手写校验(优先级高于 validationRules) */
154
- cellValidator?: import('../core/types/validation').CellValidator;
155
- /** Phase 24 块 12 · 禁止粘贴;可函数按行判断 */
156
- suppressPaste?: boolean | import('../core/types/cellClipboard').SuppressPasteFn;
157
- /** Phase 24 块 12 · 粘贴是否走 valueParser;默认 true */
201
+ cellValidator?: CellValidator;
202
+ /** 禁止粘贴;可函数按行判断 */
203
+ suppressPaste?: boolean | ((row: TData) => boolean);
204
+ /** 粘贴是否走 valueParser;默认 true */
158
205
  useParserForClipboard?: boolean;
159
- /** Phase 24 块 13 · 复制是否走 formatter;默认 true */
206
+ /** 复制是否走 formatter;默认 true */
160
207
  useFormatterForClipboard?: boolean;
161
208
  /** async-validator 规则;通过 magic-grid/validation enrichColumnsWithValidation 编译 */
162
- validationRules?: import('../core/types/validation').ValidationRules;
209
+ validationRules?: ValidationRules;
163
210
  /** 必填列标记(缺省由 validationRules.required 推导) */
164
211
  validationRequired?: boolean;
165
212
  /** 是否参与表尾汇总;缺省时:有 summaryAgg 则为 true,否则 false */
@@ -169,50 +216,54 @@ export interface ColumnDef {
169
216
  /** 汇总格专用 formatter;缺省复用 formatter */
170
217
  summaryFormatter?: (value: unknown) => string;
171
218
  /** 表头水平对齐;默认 center */
172
- headerAlign?: MagicGridHorizontalAlign;
219
+ headerAlign?: GridHorizontalAlign;
173
220
  /** 表头垂直对齐;默认 center */
174
- headerValign?: MagicGridVerticalAlign;
221
+ headerValign?: GridVerticalAlign;
175
222
  /** 表体水平对齐;默认 center */
176
- align?: MagicGridHorizontalAlign;
223
+ align?: GridHorizontalAlign;
177
224
  /** 表体垂直对齐;默认 center */
178
- valign?: MagicGridVerticalAlign;
225
+ valign?: GridVerticalAlign;
179
226
  /** 表尾汇总水平对齐;默认 center */
180
- footerAlign?: MagicGridHorizontalAlign;
227
+ footerAlign?: GridHorizontalAlign;
181
228
  /** 表尾汇总垂直对齐;默认 center */
182
- footerValign?: MagicGridVerticalAlign;
229
+ footerValign?: GridVerticalAlign;
183
230
  /**
184
- * Phase 20 · 抑制该列(或特定行)的批注新建/编辑/删除。
231
+ * 抑制该列(或特定行)的批注新建/编辑/删除。
185
232
  * 已有批注仍可查看。
186
233
  */
187
- suppressCellComments?: boolean | import('../core/types/cellComment').SuppressCellCommentFn;
188
- /** Phase 21 · 列级禁用:true 时该列全部数据行 disabled */
234
+ suppressCellComments?: boolean | SuppressCellCommentFn<TData>;
235
+ /** 列级禁用:true 时该列全部数据行 disabled */
189
236
  disabled?: boolean;
190
- /** Phase 21 · 格级禁用:按行判定;与 disabled / isRowDisabled 叠加 */
191
- cellDisabled?: boolean | import('../core/types/cellDisable').CellDisabledFn;
237
+ /** 格级禁用:按行判定;与 disabled / isRowDisabled 叠加 */
238
+ cellDisabled?: boolean | CellDisabledFn<TData>;
192
239
  /**
193
- * Phase 26 · 列级静态背景 或 格级 cellStyle 回调(二选一 · 同 AG Grid cellStyle)。
240
+ * 列级静态背景 或 格级 cellStyle 回调(二选一 · 同 AG Grid cellStyle)。
194
241
  * 仅作用于表体用户数据列;表头/表尾/索引列/系统列不参与。
195
242
  */
196
- cellStyle?: import('../core/types/cellColor').CellStyle | import('../core/types/cellColor').CellStyleFn;
197
- /** Phase 23 · 读 row.data[field] 作为 tooltip */
198
- tooltipField?: string;
199
- /** Phase 23 · 自定义 tooltip 文案 */
200
- tooltipValueGetter?: import('../core/types/overflowTooltip').TooltipValueGetter;
201
- /** Phase 23 · 表头静态 tooltip */
243
+ cellStyle?: CellStyle | CellStyleFn<TData>;
244
+ /** 读 row.data[field] 作为 tooltip */
245
+ tooltipField?: Extract<keyof TData, string>;
246
+ /** 自定义 tooltip 文案 */
247
+ tooltipValueGetter?: TooltipValueGetter<TData>;
248
+ /** 表头静态 tooltip */
202
249
  headerTooltip?: string;
203
- headerTooltipValueGetter?: import('../core/types/overflowTooltip').HeaderTooltipValueGetter;
204
- /** Phase 23 · 抑制该列溢出 tooltip */
250
+ /** 表头动态 tooltip 文案 */
251
+ headerTooltipValueGetter?: HeaderTooltipValueGetter;
252
+ /** 抑制该列溢出 tooltip */
205
253
  suppressTooltip?: boolean;
206
- tooltipComponent?: import('../core/types/overflowTooltip').TooltipComponentType;
254
+ /** 自定义 tooltip 组件 */
255
+ tooltipComponent?: TooltipComponentType;
256
+ /** 自定义 tooltip 组件额外参数 */
207
257
  tooltipComponentParams?: Record<string, unknown>;
208
258
  }
209
- export interface MagicGridProps {
259
+ /** MagicGrid 组件 props;`TData` 为行数据类型,用于列定义与回调参数推导 */
260
+ export interface MagicGridProps<TData extends RowData = RowData> {
210
261
  /** 列定义 */
211
- columns: ColumnDef[];
262
+ columns: ColumnDef<TData>[];
212
263
  /** 行数据 */
213
- data: RowData[];
264
+ data: TData[];
214
265
  /** Grid 实例级命名编辑器(colId 引用 cellEditor: 'name' 时解析;优先于全局注册表) */
215
- cellEditorRegistry?: Record<string, import('../core/types/cellEditor').CellEditorFn>;
266
+ cellEditorRegistry?: Record<string, CellEditorFn>;
216
267
  /** 行数据主键字段名(PK),用于行池复用与增量更新 */
217
268
  rowKey?: string;
218
269
  /** 斑马纹 */
@@ -223,24 +274,24 @@ export interface MagicGridProps {
223
274
  * - none:无单元格线;表头与表体保留底部分隔线
224
275
  * - linear:表头 / 表体单元格仅底部分隔线
225
276
  */
226
- border?: MagicGridBorder;
277
+ border?: GridBorder;
227
278
  /**
228
279
  * 主题 preset;默认 `light`(亮色)。
229
280
  * `dark` 切换暗色语义 token(`--mg-color-*`)。
230
281
  */
231
- theme?: MagicGridTheme;
282
+ theme?: GridTheme;
232
283
  /**
233
284
  * 尺寸 preset;默认 `default`。
234
285
  * rowHeight / headerHeight 未显式传入时,由 size 推导。
235
286
  */
236
- size?: MagicGridSize;
287
+ size?: GridSize;
237
288
  /**
238
289
  * 容器圆角(px);默认 `false`(无圆角)
239
290
  * - `false` / `0`:圆角为 0
240
291
  * - `true`:使用当前 size preset 的圆角
241
292
  * - `number`:自定义圆角像素值
242
293
  */
243
- rounded?: MagicGridRounded;
294
+ rounded?: GridRounded;
244
295
  /** 固定行高(px);显式传入时覆盖 size preset */
245
296
  rowHeight?: number;
246
297
  /** 表头高度(px);显式传入时覆盖 size preset */
@@ -265,25 +316,25 @@ export interface MagicGridProps {
265
316
  */
266
317
  summaryMethod?: SummaryMethod;
267
318
  /** 表头水平对齐(全局默认);默认 center */
268
- headerAlign?: MagicGridHorizontalAlign;
319
+ headerAlign?: GridHorizontalAlign;
269
320
  /** 表头垂直对齐(全局默认);默认 center */
270
- headerValign?: MagicGridVerticalAlign;
321
+ headerValign?: GridVerticalAlign;
271
322
  /** 表体水平对齐(全局默认);默认 center */
272
- align?: MagicGridHorizontalAlign;
323
+ align?: GridHorizontalAlign;
273
324
  /** 表体垂直对齐(全局默认);默认 center */
274
- valign?: MagicGridVerticalAlign;
325
+ valign?: GridVerticalAlign;
275
326
  /** 表尾汇总水平对齐(全局默认);默认 center */
276
- footerAlign?: MagicGridHorizontalAlign;
327
+ footerAlign?: GridHorizontalAlign;
277
328
  /** 表尾汇总垂直对齐(全局默认);默认 center */
278
- footerValign?: MagicGridVerticalAlign;
329
+ footerValign?: GridVerticalAlign;
279
330
  /** 是否允许键盘/鼠标将焦点导航到表头;默认 false */
280
331
  navigateHeader?: boolean;
281
332
  /** 是否允许键盘/鼠标将焦点导航到表尾汇总行;默认 false(需 showSummary: true) */
282
333
  navigateFooter?: boolean;
283
334
  /** 行虚拟化缓冲行数 */
284
335
  rowBuffer?: number;
285
- /** 行选择模式,false 禁用;对象形式支持 groupSelectsChildren(Phase 19) */
286
- rowSelection?: import('../core/types/rowSelectionOptions').RowSelectionInput;
336
+ /** 行选择模式,false 禁用;对象形式支持 groupSelectsChildren */
337
+ rowSelection?: RowSelectionInput;
287
338
  /** 行选择列配置;rowSelection !== false 时生效 */
288
339
  selectionColumn?: SelectionColumnOptions;
289
340
  /**
@@ -293,35 +344,35 @@ export interface MagicGridProps {
293
344
  selectable?: SelectableFn;
294
345
  /** 行选择列:数据刷新后是否保留选中行;默认 false */
295
346
  reserveSelection?: boolean;
296
- /** Phase 12 · Grid 级 quick filter 文本 */
347
+ /** Grid 级 quick filter 文本 */
297
348
  quickFilterText?: string;
298
349
  /**
299
350
  * 是否允许列筛选;默认 `false`。
300
351
  * 列级 `columns[].filterable` **优先于**本配置;系统列(索引 / 行选择等)恒为 false。
301
352
  */
302
353
  filterable?: boolean;
303
- /** Phase 12 · 表头下方 Floating Filter 行;默认 `false` */
354
+ /** 表头下方 Floating Filter 行;默认 `false` */
304
355
  floatingFilter?: boolean;
305
- /** Phase 12 · 值选择搜索时的勾选投影模式;默认 `current` */
306
- filterSetValueMode?: import('../core/types/filterGridOptions').FilterSetValueMode;
307
- /** Phase 12 · 日期列值选择展示方式;默认 `tree` */
308
- filterSetDateLayoutMode?: import('../core/types/filterGridOptions').FilterSetDateLayoutMode;
356
+ /** 值选择搜索时的勾选投影模式;默认 `current` */
357
+ filterSetValueMode?: FilterSetValueMode;
358
+ /** 日期列值选择展示方式;默认 `tree` */
359
+ filterSetDateLayoutMode?: FilterSetDateLayoutMode;
309
360
  /** 编辑范围:cell 单格 / row 整行 */
310
- editMode?: import('../core/types/cellEditor').EditMode;
361
+ editBehavior?: CellEditBehavior;
311
362
  /** 进入编辑态的触发方式,默认 singleClick */
312
- editType?: import('../core/types/cellEditor').CellEditType;
363
+ editType?: CellEditType;
313
364
  /** 校验失败后:block 保持编辑 / revert 退出并恢复旧值 */
314
- invalidEditValueMode?: import('../core/types/validation').InvalidEditValueMode;
365
+ invalidEditValueMode?: InvalidEditValueMode;
315
366
  /** 行编辑跨字段校验 */
316
- rowValidator?: import('../core/types/validation').RowValidator;
317
- /** Phase 6 · 异步行 CRUD 持久化钩子 */
318
- asyncRowMutation?: import('../core/types/rowMutationAsync').AsyncRowMutationHandlers;
367
+ rowValidator?: RowValidator;
368
+ /** 异步行 CRUD 持久化钩子 */
369
+ asyncRowMutation?: AsyncRowMutationHandlers;
319
370
  /** 容器高度 */
320
371
  height?: string | number;
321
372
  /** 容器宽度 */
322
373
  width?: string | number;
323
374
  /**
324
- * 初始排序(Grid 挂载 / initGrid 时应用一次);v1 仅使用首项
375
+ * 初始排序(Grid 挂载 / initGrid 时应用一次);当前仅使用首项
325
376
  */
326
377
  defaultSort?: SortModelItem[];
327
378
  /**
@@ -337,7 +388,7 @@ export interface MagicGridProps {
337
388
  */
338
389
  resizable?: boolean;
339
390
  /**
340
- * Phase 14 块 8 · 默认 Shift 模式:拖拽列宽时相邻列反向补偿,总宽不变。
391
+ * 默认 Shift 模式:拖拽列宽时相邻列反向补偿,总宽不变。
341
392
  * 对标 AG Grid `colResizeDefault: 'shift'`。
342
393
  */
343
394
  colResizeDefault?: 'shift';
@@ -346,228 +397,257 @@ export interface MagicGridProps {
346
397
  /** auto-size 内容测量额外 padding(px);对标 AG Grid autoSizePadding */
347
398
  autoSizePadding?: number;
348
399
  /** 挂载 / 首屏 auto-size 策略;对标 AG Grid autoSizeStrategy */
349
- autoSizeStrategy?: import('../core/types/columnAutosize').AutoSizeStrategy;
350
- /** Phase 11.1 · 默认 false(drag 过程中 live move,对齐 AG Grid)。
351
- * true → 仅 mouseup 提交列序(Phase 11 v1 行为)。
400
+ autoSizeStrategy?: AutoSizeStrategy;
401
+ /** 默认 false(drag 过程中 live move,对齐 AG Grid)。
402
+ * true → 仅 mouseup 提交列序。
352
403
  */
353
404
  suppressMoveWhenColumnDragging?: boolean;
354
- /** Phase 11.1 · 默认 false;true 关闭列移动 transition */
405
+ /** 默认 false;true 关闭列移动 transition */
355
406
  suppressColumnMoveAnimation?: boolean;
356
407
  /**
357
- * Phase 11.1 · 默认 false。
408
+ * 默认 false。
358
409
  * true → 允许 drag / API 跨 fixed lane 并更新列 `fixed`。
359
410
  */
360
411
  allowCrossLaneColumnMove?: boolean;
361
- /** Phase 11.2 · 默认 false;true → 未排序 sortable 列 hover 显示 faint 双三角 */
412
+ /** 默认 false;true → 未排序 sortable 列 hover 显示 faint 双三角 */
362
413
  showUnsortedSortHintOnHover?: boolean;
363
414
  /** 是否显示底部状态栏;默认 true */
364
415
  showStatusBar?: boolean;
365
416
  /**
366
417
  * 状态栏高度:`'auto'` 跟随 size preset(默认);number 为自定义 px。
367
418
  */
368
- statusBarHeight?: import('../core/theme/gridSize').StatusBarHeightInput;
369
- /** Phase 24.1 · 框选时在状态栏展示平均值/计数/求和;cellSelection 开时默认 true */
419
+ statusBarHeight?: StatusBarHeightInput;
420
+ /** 框选时在状态栏展示平均值/计数/求和;cellSelection 开时默认 true */
370
421
  showStatusBarRangeAggregation?: boolean;
371
- /** Phase 24.1 · 框选聚合 panel 位置;默认 `right`(右栏内侧) */
372
- statusBarRangeAggregationPosition?: import('./statusBar').StatusBarRangeAggregationPosition;
422
+ /** 框选聚合 panel 位置;默认 `right`(右栏内侧) */
423
+ statusBarRangeAggregationPosition?: StatusBarRangeAggregationPosition;
373
424
  /**
374
- * Phase 24.1 · 平均值 / 求和展示小数位数。
425
+ * 平均值 / 求和展示小数位数。
375
426
  * 传 number 时同时作用于两者;默认 2。
376
427
  */
377
- statusBarRangeAggregationPrecision?: import('./statusBar').StatusBarRangeAggregationPrecisionInput;
428
+ statusBarRangeAggregationPrecision?: StatusBarRangeAggregationPrecisionInput;
378
429
  /**
379
- * Phase 15 · 启用 managed 行拖拽:拖拽过程中实时改 source 顺序;默认 true。
430
+ * 启用 managed 行拖拽:拖拽过程中实时改 source 顺序;默认 true。
380
431
  * 设为 false 时仅 emit `rowDragEnd`,由业务自行改序。
381
432
  * 对标 AG Grid `rowDragManaged`。
382
433
  */
383
434
  rowDragManaged?: boolean;
384
435
  /**
385
- * Phase 15+ · managed 模式 commit 策略:`sync`(默认 live move)| `deferred`(mouseup 后 await onRowDragCommit)。
436
+ * managed 模式 commit 策略:`sync`(默认 live move)| `deferred`(mouseup 后 await onRowDragCommit)。
386
437
  */
387
- rowDragCommitMode?: import('../core/types/rowDrag').RowDragCommitMode;
438
+ rowDragCommitMode?: RowDragCommitMode;
388
439
  /**
389
440
  * deferred 模式:mouseup 后、apply 前调用;返回 false 则不写 source。
390
441
  * MagicGrid 亦支持 `:on-row-drag-commit` prop(与 Grid option 等价)。
391
442
  */
392
- onRowDragCommit?: import('../core/types/rowDrag').RowDragCommitHandler;
443
+ onRowDragCommit?: RowDragCommitHandler;
393
444
  /**
394
- * Phase 15 · 行级动态高度(无 DOM);优先于默认 rowHeight,低于手动 setRowHeight。
445
+ * 行级动态高度(无 DOM);优先于默认 rowHeight,低于手动 setRowHeight。
395
446
  * 对标 AG Grid `getRowHeight`。
396
447
  */
397
- getRowHeight?: import('../core/types/rowHeight').GetRowHeightFn;
398
- /** Phase 15 · 行高下限(px);未传时跟随 size preset / rowHeight */
448
+ getRowHeight?: GetRowHeightFn;
449
+ /** 行高下限(px);未传时跟随 size preset / rowHeight */
399
450
  rowHeightMin?: number;
400
- /** Phase 15 · 行高上限(px);未传时无上限 */
451
+ /** 行高上限(px);未传时无上限 */
401
452
  rowHeightMax?: number;
402
453
  /**
403
- * Phase 16 · 启用单元格合并。默认 `false`。
454
+ * 启用单元格合并。默认 `false`。
404
455
  * `true` 时解析列级 `colSpan` / `rowSpan` / `spanRows`,且行定位改用 `style.top`。
405
456
  * 对标 AG Grid `enableCellSpan`。
406
457
  */
407
458
  enableCellSpan?: boolean;
408
459
  /**
409
- * Phase 17 · 启用主从展开行。默认 `false`。
460
+ * 启用主从展开行。默认 `false`。
410
461
  * 对标 AG Grid `masterDetail`。
411
462
  */
412
463
  masterDetail?: boolean;
413
- /** Phase 17 · 是否为主行(可展示 expand 控件);缺省全部 data 行可展开 */
414
- isRowMaster?: import('../core/types/rowExpansion').IsRowMasterFn;
415
- /** Phase 17 · 默认展开层级:0 = 无;1 = 第一层;-1 = 全部 */
464
+ /** 是否为主行(可展示 expand 控件);缺省全部 data 行可展开 */
465
+ isRowMaster?: IsRowMasterFn;
466
+ /** 默认展开层级:0 = 无;1 = 第一层;-1 = 全部 */
416
467
  masterDefaultExpanded?: number;
417
- /** Phase 17 · 详情行固定高度(px);与 detailRowAutoHeight 并存时本字段优先 */
418
- detailRowHeight?: number | import('../core/types/rowExpansion').DetailRowHeightFn;
419
- /** Phase 17 · 详情行按内容自动撑高 */
468
+ /** 详情行固定高度(px);与 detailRowAutoHeight 并存时本字段优先 */
469
+ detailRowHeight?: number | DetailRowHeightFn;
470
+ /** 详情行按内容自动撑高 */
420
471
  detailRowAutoHeight?: boolean;
421
472
  /**
422
- * Phase 17 · false(默认):详情 overlay 不随 center 横滚。
473
+ * false(默认):详情 overlay 不随 center 横滚。
423
474
  * true:详情嵌入 center lane。
424
475
  */
425
476
  embedFullWidthRows?: boolean;
426
- /** Phase 17 · 最左展示专用展开列(fixed=left) */
477
+ /** 最左展示专用展开列(fixed=left) */
427
478
  showExpandColumn?: boolean;
428
- /** Phase 17 · 异步提供详情区数据 */
429
- getDetailRowData?: import('../core/types/rowExpansion').GetDetailRowDataFn;
430
- /** Phase 17 · 自定义详情行渲染器(与 `#detail-row` 插槽二选一) */
431
- detailCellRenderer?: import('../core/types/rowExpansion').DetailCellRendererFn;
479
+ /** 异步提供详情区数据 */
480
+ getDetailRowData?: GetDetailRowDataFn;
481
+ /** 自定义详情行渲染器(与 `#detail-row` 插槽二选一) */
482
+ detailCellRenderer?: DetailCellRendererFn;
432
483
  /**
433
- * Phase 18 · 启用行分组。默认 `false`。
484
+ * 启用行分组。默认 `false`。
434
485
  * `true` 且存在 ≥1 个分组字段时生效。
435
486
  */
436
487
  rowGrouping?: boolean;
437
- /** Phase 18 · 默认展开分组层级:0 = 全折叠;1 = 第一层;-1 = 全部展开。默认 `-1` */
488
+ /** 默认展开分组层级:0 = 全折叠;1 = 第一层;-1 = 全部展开。默认 `-1` */
438
489
  groupDefaultExpanded?: number;
439
- /** Phase 18 · 是否展示 groupHeader 分组标题行。默认 `false` */
490
+ /** 是否展示 groupHeader 分组标题行。默认 `false` */
440
491
  showGroupHeader?: boolean;
441
- /** Phase 18 · 是否为每个已展开的分组展示 footer 汇总行。默认 `false` */
492
+ /** 是否为每个已展开的分组展示 footer 汇总行。默认 `false` */
442
493
  showGroupFooter?: boolean;
443
494
  /**
444
- * Phase 18 · 分组展示模式。v1 仅实现 `singleColumn`。
495
+ * 分组展示模式。当前仅支持 `singleColumn`。
445
496
  * 默认 `singleColumn`。
446
497
  */
447
- groupDisplayType?: import('../core/types/rowGrouping').GroupDisplayType;
448
- /** Phase 18 · 是否展示 auto group 系统列;默认 false */
498
+ groupDisplayType?: GroupDisplayType;
499
+ /** 是否展示 auto group 系统列;默认 false */
449
500
  showGroupColumn?: boolean;
450
- /** Phase 18 · 覆盖 auto group 列的 colDef */
451
- autoGroupColumnDef?: Partial<ColumnDef>;
452
- /** Phase 18 · 分组键归一化(可选) */
453
- groupKeyCreator?: import('../core/types/rowGrouping').GroupKeyCreatorFn;
501
+ /** 覆盖 auto group 列的 colDef */
502
+ autoGroupColumnDef?: Partial<ColumnDef<TData>>;
503
+ /** 分组键归一化(可选) */
504
+ groupKeyCreator?: GroupKeyCreatorFn;
454
505
  /**
455
- * Phase 18 · 同级 group 节点排序。缺省按 groupKey 升序(blank 置末)。
506
+ * 同级 group 节点排序。缺省按 groupKey 升序(blank 置末)。
456
507
  * 自定义时全权负责(含 blank);不改变展示键。
457
508
  */
458
- groupComparator?: import('../core/types/rowGrouping').GroupComparatorFn;
459
- /** Phase 18 · groupFooter 首列展示标签 */
509
+ groupComparator?: GroupComparatorFn;
510
+ /** groupFooter 首列展示标签 */
460
511
  groupFooterLabel?: string;
461
- /** Phase 18 · 自定义分组单元格渲染器 */
462
- groupCellRenderer?: import('../core/types/rowGrouping').GroupCellRendererFn;
512
+ /** 自定义分组单元格渲染器 */
513
+ groupCellRenderer?: GroupCellRendererFn;
463
514
  /**
464
- * Phase 19 · 启用树形表格。默认 `false`。
515
+ * 启用树形表格。默认 `false`。
465
516
  * 与 `rowGrouping` 互斥。
466
517
  */
467
518
  tree?: boolean;
468
- /** Phase 19 · 树形路径回调;`tree: true` 时必填 */
469
- getDataPath?: import('../core/types/treeTable').GetDataPathFn;
519
+ /** 树形路径回调;`tree: true` 时必填 */
520
+ getDataPath?: GetDataPathFn;
470
521
  /**
471
- * Phase 19 · 树形 managed 行拖拽范围。默认 `siblings`(仅同 parent 兄弟换序);
522
+ * 树形 managed 行拖拽范围。默认 `siblings`(仅同 parent 兄弟换序);
472
523
  * `hierarchy` 允许跨层级改父节点(需 `setDataPath` 写回路径)。
473
524
  */
474
- treeDragScope?: import('../core/types/treeTable').TreeDragScope;
475
- /** Phase 19 · hierarchy 模式下写回 dataPath;缺省时若 data.pathSegments 为数组则自动更新 */
476
- setDataPath?: import('../core/types/treeTable').SetDataPathFn;
477
- /** Phase 19 · 是否展示 tree 系统列。默认 `true` */
525
+ treeDragScope?: TreeDragScope;
526
+ /** hierarchy 模式下写回 dataPath;缺省时若 data.pathSegments 为数组则自动更新 */
527
+ setDataPath?: SetDataPathFn;
528
+ /** 是否展示 tree 系统列。默认 `true` */
478
529
  showTreeColumn?: boolean;
479
- /** Phase 19 · 覆盖 tree 系统列 colDef */
480
- autoTreeColumnDef?: Partial<ColumnDef>;
481
- /** Phase 19 · 自定义 tree 列展示值 */
482
- treeValueGetter?: import('../core/types/treeTable').TreeValueGetterFn;
483
- /** Phase 19 · 树节点展示列模式。v1 仅 `singleColumn` */
484
- treeDisplayType?: import('../core/types/treeTable').TreeDisplayType;
485
- /** Phase 19 M25 · 启用树形懒加载(CSRM) */
530
+ /** 覆盖 tree 系统列 colDef */
531
+ autoTreeColumnDef?: Partial<ColumnDef<TData>>;
532
+ /** 自定义 tree 列展示值 */
533
+ treeValueGetter?: TreeValueGetterFn;
534
+ /** 树节点展示列模式。当前仅支持 `singleColumn` */
535
+ treeDisplayType?: TreeDisplayType;
536
+ /** 启用树形懒加载 */
486
537
  treeLazyLoad?: boolean;
487
- /** Phase 19 M25 · lazy 模式:节点是否可能有未加载子行 */
488
- hasTreeChildren?: import('../core/types/treeTable').HasTreeChildrenFn;
489
- /** Phase 19 M25 · lazy 模式:首次展开时拉取子数据 */
490
- loadTreeChildren?: import('../core/types/treeTable').LoadTreeChildrenFn;
491
- /** Phase 20 · 单元格批注数据源;提供即启用 */
492
- cellCommentsDataSource?: import('../core/types/cellComment').CellCommentsDataSource;
493
- /** Phase 20 · 全局抑制批注交互;API 仍可 bypass */
538
+ /** lazy 模式:节点是否可能有未加载子行 */
539
+ hasTreeChildren?: HasTreeChildrenFn;
540
+ /** lazy 模式:首次展开时拉取子数据 */
541
+ loadTreeChildren?: LoadTreeChildrenFn;
542
+ /** 单元格批注数据源;提供即启用 */
543
+ cellCommentsDataSource?: CellCommentsDataSource;
544
+ /** 全局抑制批注交互;API 仍可 bypass */
494
545
  suppressCellComments?: boolean;
495
- /** Phase 20 · 查看已有批注的触发方式;默认 click(点角标 toggle) */
496
- cellCommentTrigger?: import('../core/types/cellComment').CellCommentTrigger;
497
- /** Phase 20 · hover 模式展示延迟 ms;默认 180 */
546
+ /** 查看已有批注的触发方式;默认 click(点角标 toggle) */
547
+ cellCommentTrigger?: CellCommentTrigger;
548
+ /** hover 模式展示延迟 ms;默认 180 */
498
549
  cellCommentShowDelay?: number;
499
- /** Phase 20 · 离开 cell/popup 后隐藏延迟 ms;默认 220 */
550
+ /** 离开 cell/popup 后隐藏延迟 ms;默认 220 */
500
551
  cellCommentHideDelay?: number;
501
- /** Phase 24 · 复制单格时自定义导出值(最高优先级) */
502
- processCellForClipboard?: import('../core/types/cellClipboard').ProcessCellForClipboardFn;
503
- /** Phase 24 · 粘贴单格时预处理 clipboard 字符串 */
504
- processCellFromClipboard?: import('../core/types/cellClipboard').ProcessCellFromClipboardFn;
505
- /** Phase 24 · 整表粘贴前处理 TSV 矩阵;return null 取消粘贴 */
506
- processDataFromClipboard?: import('../core/types/cellClipboard').ProcessDataFromClipboardFn;
507
- /** Phase 24 · 单元格框选;MagicGrid 默认 true(含 enableColumnSelection,handleMode 默认 off),Grid API 未传时为 false */
508
- cellSelection?: boolean | import('../core/types/cellRangeSelection').CellSelectionOptions;
509
- /** Phase 24 · 框选复制;cellSelection 开启时默认 true */
552
+ /** 复制单格时自定义导出值(最高优先级) */
553
+ processCellForClipboard?: ProcessCellForClipboardFn;
554
+ /** 粘贴单格时预处理 clipboard 字符串 */
555
+ processCellFromClipboard?: ProcessCellFromClipboardFn;
556
+ /** 整表粘贴前处理 TSV 矩阵;return null 取消粘贴 */
557
+ processDataFromClipboard?: ProcessDataFromClipboardFn;
558
+ /** 单元格框选;MagicGrid 默认 true(含 enableColumnSelection,handleMode 默认 off),Grid API 未传时为 false */
559
+ cellSelection?: boolean | CellSelectionOptions;
560
+ /** 框选复制;cellSelection 开启时默认 true */
510
561
  enableCellCopy?: boolean;
511
- /** Phase 24 · 框选粘贴;cellSelection 开启时默认 false */
562
+ /** 框选粘贴;cellSelection 开启时默认 false */
512
563
  enableCellPaste?: boolean;
513
- /** Phase 24 · 选区涉及列的表头底色;默认 true */
564
+ /** 选区涉及列的表头底色;默认 true */
514
565
  enableHeaderHighlight?: boolean;
515
- /** Phase 24 · 选区行跨度内索引列高亮;默认 true */
566
+ /** 选区行跨度内索引列高亮;默认 true */
516
567
  enableIndexColumnHighlight?: boolean;
517
- /** Phase 23 · 是否启用溢出 tooltip;默认 true */
568
+ /** 是否启用溢出 tooltip;默认 true */
518
569
  enableTooltips?: boolean;
519
- /** Phase 23 · 溢出 tooltip 显示策略;默认 whenTruncated */
520
- tooltipShowMode?: import('../core/types/overflowTooltip').TooltipShowMode;
570
+ /** 溢出 tooltip 显示策略;默认 whenTruncated */
571
+ tooltipShowMode?: TooltipShowMode;
572
+ /** 首次 hover 展示延迟 ms;默认 500 */
521
573
  tooltipShowDelay?: number;
574
+ /** 格间切换展示延迟 ms;默认 200 */
522
575
  tooltipSwitchShowDelay?: number;
576
+ /** 离开后隐藏延迟 ms;默认 3000 */
523
577
  tooltipHideDelay?: number;
578
+ /** tooltip 内容是否可交互;默认 false */
524
579
  tooltipInteraction?: boolean;
580
+ /** tooltip 是否跟随鼠标;默认 false */
525
581
  tooltipMouseTrack?: boolean;
526
- /** Phase 25 · 是否显示 loading overlay;undefined 为挂载后首次 setData 前自动 loading */
582
+ /** 是否显示 loading overlay;undefined 为挂载后首次 setData 前自动 loading */
527
583
  loading?: boolean;
528
- /** Phase 25 · 逐项抑制内置 overlay */
529
- suppressOverlays?: import('../core/types/emptyState').OverlayType[];
584
+ /** 逐项抑制内置 overlay */
585
+ suppressOverlays?: OverlayType[];
586
+ /** 抑制 loading overlay */
530
587
  suppressLoadingOverlay?: boolean;
588
+ /** 抑制无数据 overlay */
531
589
  suppressNoRowsOverlay?: boolean;
590
+ /** 抑制无匹配行 overlay(filter 后为空) */
532
591
  suppressNoMatchingRowsOverlay?: boolean;
592
+ /** loading overlay 内置 HTML 模板 */
533
593
  overlayLoadingTemplate?: string;
594
+ /** 无数据 overlay 内置 HTML 模板 */
534
595
  overlayNoRowsTemplate?: string;
596
+ /** 无匹配行 overlay 内置 HTML 模板 */
535
597
  overlayNoMatchingRowsTemplate?: string;
536
- loadingOverlayComponent?: import('../core/types/emptyState').OverlayComponentType;
598
+ /** 自定义 loading overlay 组件 */
599
+ loadingOverlayComponent?: OverlayComponentType;
600
+ /** loading overlay 组件额外参数 */
537
601
  loadingOverlayComponentParams?: Record<string, unknown>;
538
- noRowsOverlayComponent?: import('../core/types/emptyState').OverlayComponentType;
602
+ /** 自定义无数据 overlay 组件 */
603
+ noRowsOverlayComponent?: OverlayComponentType;
604
+ /** 无数据 overlay 组件额外参数 */
539
605
  noRowsOverlayComponentParams?: Record<string, unknown>;
540
- noMatchingRowsOverlayComponent?: import('../core/types/emptyState').OverlayComponentType;
606
+ /** 自定义无匹配行 overlay 组件 */
607
+ noMatchingRowsOverlayComponent?: OverlayComponentType;
608
+ /** 无匹配行 overlay 组件额外参数 */
541
609
  noMatchingRowsOverlayComponentParams?: Record<string, unknown>;
542
- overlayComponent?: import('../core/types/emptyState').OverlayComponentType;
610
+ /** 通用 overlay 组件(按类型分发) */
611
+ overlayComponent?: OverlayComponentType;
612
+ /** 通用 overlay 组件额外参数 */
543
613
  overlayComponentParams?: Record<string, unknown>;
544
- /** Phase 25 · overlay 内容是否可交互(默认可穿透) */
614
+ /** overlay 内容是否可交互(默认可穿透) */
545
615
  overlayInteraction?: boolean;
546
616
  /**
547
- * Phase 21 · 行级禁用:true 时该行全部数据列 disabled。
617
+ * 行级禁用:true 时该行全部数据列 disabled。
548
618
  * 不影响 index / selection / expand / tree / group 系统列。
549
619
  */
550
- isRowDisabled?: boolean | import('../core/types/cellDisable').IsRowDisabledFn;
620
+ isRowDisabled?: boolean | IsRowDisabledFn<TData>;
551
621
  /**
552
- * Phase 26 · 行级样式:对象 = 全表同色;函数 = 按行。
622
+ * 行级样式:对象 = 全表同色;函数 = 按行。
553
623
  * 作用于表体用户数据列与行选择列;表头/表尾/索引列不参与。
554
624
  */
555
- rowStyle?: import('../core/types/cellColor').RowStyle;
625
+ rowStyle?: RowStyle<TData>;
556
626
  }
557
- /** `#loading` / `#no-rows` / `#no-matching-rows` 插槽 props(Phase 25) */
627
+ /** `#loading` / `#no-rows` / `#no-matching-rows` 插槽 props */
558
628
  export interface OverlaySlotParams {
559
- overlayType: import('../core/types/emptyState').OverlayType;
560
- api: import('../core/api/gridApi').GridApi;
629
+ /** 当前 overlay 类型 */
630
+ overlayType: OverlayType;
631
+ /** GridApi 实例 */
632
+ api: GridApi;
633
+ /** 内置 overlay 默认文案(自定义组件可忽略) */
561
634
  overlayText?: string;
562
635
  }
563
- /** `#detail-row` 插槽 props(Phase 17) */
564
- export interface DetailRowSlotParams {
565
- row: RowData;
636
+ /** `#detail-row` 插槽 props */
637
+ export interface DetailRowSlotParams<TData extends RowData = RowData> {
638
+ /** 主行数据 */
639
+ row: TData;
640
+ /** 主行 rowId */
566
641
  rowId: string;
642
+ /** 与 rowId 相同(兼容别名) */
567
643
  masterRowId: string;
644
+ /** 详情区数据(`getDetailRowData` 返回值) */
568
645
  detailRowData: unknown;
646
+ /** 详情数据是否加载中 */
569
647
  loading: boolean;
648
+ /** 详情数据是否加载失败 */
570
649
  loadFailed: boolean;
650
+ /** 加载失败时的错误对象 */
571
651
  loadError?: unknown;
572
652
  }
573
653
  //# sourceMappingURL=magic-grid.d.ts.map