@antv/s2-vue 2.0.0-alpha.1 → 2.0.0-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.
package/esm/index.d.ts CHANGED
@@ -64,6 +64,11 @@ declare enum Aggregation {
64
64
  AVG = "AVG"
65
65
  }
66
66
 
67
+ declare interface AreaRange {
68
+ start: number;
69
+ width: number;
70
+ }
71
+
67
72
  declare interface Background {
68
73
  opacity?: number;
69
74
  color?: string;
@@ -101,12 +106,14 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
101
106
  protected theme: S2Theme;
102
107
  protected backgroundShape: DisplayObject;
103
108
  protected textShape: DisplayObject;
109
+ protected textShapes: DisplayObject[];
104
110
  protected linkFieldShape: DisplayObject;
105
111
  protected actualText: string;
106
112
  protected actualTextWidth: number;
107
113
  protected conditions: Conditions;
108
114
  protected conditionIntervalShape: DisplayObject | undefined;
109
115
  protected conditionIconShape: GuiIcon;
116
+ protected conditionIconShapes: GuiIcon[];
110
117
  protected stateShapes: Map<StateShapeLayer, DisplayObject<any, any>>;
111
118
  constructor(meta: T, spreadsheet: SpreadSheet_2, ...restOptions: unknown[]);
112
119
  getMeta(): T;
@@ -147,7 +154,7 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
147
154
  protected abstract getMaxTextWidth(): number;
148
155
  protected abstract getTextPosition(): PointLike;
149
156
  protected abstract findFieldCondition(conditions: Condition[] | undefined): Condition | undefined;
150
- protected abstract mappingValue(condition: Condition): MappingResult | undefined;
157
+ protected abstract mappingValue(condition: Condition): MappingResult | undefined | null;
151
158
  getStyle<K extends keyof S2Theme = keyof CellThemes>(name?: K): DefaultCellTheme | S2Theme[K];
152
159
  protected getResizeAreaStyle(): ResizeArea;
153
160
  protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell: S2CellType_2): boolean | ((cell: S2CellType_2<ViewMeta_2>) => boolean) | ResizeType | ((resizeInfo: ResizeInfo_2) => boolean) | undefined;
@@ -181,7 +188,13 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
181
188
  };
182
189
  hideInteractionShape(): void;
183
190
  clearUnselectedState(): void;
184
- getTextShape(): DisplayObject<any, any>;
191
+ getTextShape(): DisplayObject;
192
+ getTextShapes(): DisplayObject[];
193
+ addTextShape(textShape: DisplayObject): void;
194
+ getConditionIconShape(): GuiIcon;
195
+ getConditionIconShapes(): GuiIcon[];
196
+ addConditionIconShape(iconShape: GuiIcon): void;
197
+ resetTextAndConditionIconShapes(): void;
185
198
  get cellConditions(): Conditions;
186
199
  drawConditionIconShapes(): void;
187
200
  getTextConditionFill(textStyle: TextTheme): string | undefined;
@@ -334,7 +347,7 @@ declare abstract class BaseFacet {
334
347
  layoutResult: LayoutResult_2;
335
348
  viewCellWidths: number[];
336
349
  viewCellHeights: ViewCellHeights;
337
- protected mobileWheel: Wheel;
350
+ protected mobileWheel: WheelEvent_2;
338
351
  protected timer: Timer;
339
352
  hScrollBar: ScrollBar;
340
353
  hRowScrollBar: ScrollBar;
@@ -342,7 +355,7 @@ declare abstract class BaseFacet {
342
355
  rowHeader: RowHeader | null;
343
356
  columnHeader: ColHeader;
344
357
  cornerHeader: CornerHeader;
345
- rowIndexHeader: SeriesNumberHeader | null;
358
+ seriesNumberHeader: SeriesNumberHeader | null;
346
359
  centerFrame: Frame;
347
360
  gridInfo: GridInfo;
348
361
  protected abstract doLayout(): LayoutResult_2;
@@ -506,6 +519,7 @@ declare abstract class BaseFacet {
506
519
  private emitScrollEvent;
507
520
  protected onAfterScroll: DebouncedFunc<() => void>;
508
521
  protected saveInitColumnLeafNodes(columnNodes?: Node_2_2[]): void;
522
+ getHiddenColumnsInfo(columnNode: Node_2_2): HiddenColumnsInfo_2 | undefined;
509
523
  }
510
524
 
511
525
  declare interface BaseFields {
@@ -626,14 +640,14 @@ loading: BooleanConstructor;
626
640
  partDrillDown: ObjectConstructor;
627
641
  header: ObjectConstructor;
628
642
  options: {
629
- type: PropType<S2Options<TooltipContentType, Pagination>>;
630
- default: S2Options<TooltipContentType, Pagination>;
643
+ type: PropType<S2Options<TooltipContentType, Pagination, string | Element, string>>;
644
+ default: S2Options<TooltipContentType, Pagination, string | Element, string>;
631
645
  };
632
646
  adaptive: {
633
647
  type: PropType<Adaptive>;
634
648
  default: Adaptive;
635
649
  };
636
- onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => SpreadSheet>;
650
+ onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => SpreadSheet>;
637
651
  onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
638
652
  onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
639
653
  }, {
@@ -653,7 +667,7 @@ showSizeChange: (nextPageSize: number) => void;
653
667
  handlePageChange: (nextCurrent: number) => void;
654
668
  handlePageSizeChange: (nextSize: number) => void;
655
669
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
656
- spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => SpreadSheet;
670
+ spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => SpreadSheet;
657
671
  getSpreadSheet: (spreadsheet: SpreadSheet) => void;
658
672
  sheetUpdate: SheetUpdateCallback;
659
673
  rowCellHover: (data: TargetCellInfo) => void;
@@ -783,14 +797,14 @@ loading: BooleanConstructor;
783
797
  partDrillDown: ObjectConstructor;
784
798
  header: ObjectConstructor;
785
799
  options: {
786
- type: PropType<S2Options<TooltipContentType, Pagination>>;
787
- default: S2Options<TooltipContentType, Pagination>;
800
+ type: PropType<S2Options<TooltipContentType, Pagination, string | Element, string>>;
801
+ default: S2Options<TooltipContentType, Pagination, string | Element, string>;
788
802
  };
789
803
  adaptive: {
790
804
  type: PropType<Adaptive>;
791
805
  default: Adaptive;
792
806
  };
793
- onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => SpreadSheet>;
807
+ onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => SpreadSheet>;
794
808
  onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
795
809
  onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
796
810
  }>> & {
@@ -904,10 +918,10 @@ record: RawData;
904
918
  onScroll?: (position: CellScrollPosition) => any;
905
919
  onRowCellBrushSelection?: (event: GEvent) => any;
906
920
  onColCellBrushSelection?: (event: GEvent) => any;
907
- onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => any;
921
+ onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => any;
908
922
  onGetSpreadSheet?: (spreadsheet: SpreadSheet) => any;
909
923
  }, {
910
- options: S2Options<TooltipContentType, Pagination>;
924
+ options: S2Options<TooltipContentType, Pagination, string | Element, string>;
911
925
  loading: boolean;
912
926
  adaptive: boolean | {
913
927
  width?: boolean;
@@ -1071,10 +1085,10 @@ declare class BaseTooltip_2 {
1071
1085
  private getContainer;
1072
1086
  }
1073
1087
 
1074
- declare interface BaseTooltipConfig<T = TooltipContentType_2> {
1088
+ declare interface BaseTooltipConfig<T = TooltipContentType_2, Icon = Element | string, Text = string> {
1075
1089
  showTooltip?: boolean;
1076
1090
  content?: TooltipShowOptions<T>['content'];
1077
- operation?: TooltipOperation;
1091
+ operation?: TooltipOperation<Icon, Text>;
1078
1092
  autoAdjustBoundary?: TooltipAutoAdjustBoundary;
1079
1093
  renderTooltip?: (spreadsheet: SpreadSheet_2) => BaseTooltip_2;
1080
1094
  adjustPosition?: (positionInfo: TooltipPositionInfo) => TooltipPosition;
@@ -1285,6 +1299,12 @@ declare class ColCell extends HeaderCell {
1285
1299
  height: number;
1286
1300
  };
1287
1301
  protected isLastColumn(): boolean;
1302
+ /**
1303
+ * 计算文本位置时候需要,留给后代根据情况(固定列)覆盖
1304
+ * @param viewport
1305
+ * @returns viewport
1306
+ */
1307
+ protected handleViewport(viewport: AreaRange): AreaRange;
1288
1308
  }
1289
1309
 
1290
1310
  declare interface ColCfg {
@@ -1355,7 +1375,6 @@ declare class CornerBBox extends BaseBBox {
1355
1375
  declare class CornerCell extends HeaderCell {
1356
1376
  cornerType: CornerNodeType;
1357
1377
  protected headerConfig: CornerHeaderConfig;
1358
- protected textShapes: DisplayObject[];
1359
1378
  protected isBolderText(): boolean;
1360
1379
  get cellType(): CellTypes;
1361
1380
  protected getBorderPositions(): CellBorderPosition[];
@@ -1429,7 +1448,7 @@ declare enum CornerNodeType {
1429
1448
  Series = "series"
1430
1449
  }
1431
1450
 
1432
- declare type CustomHeaderField = string | CustomTreeNode;
1451
+ declare type CustomHeaderField = CustomTreeNode | string;
1433
1452
 
1434
1453
  declare type CustomHeaderFields = CustomHeaderField[];
1435
1454
 
@@ -1460,13 +1479,13 @@ export declare class CustomTooltip extends BaseTooltip {
1460
1479
 
1461
1480
  declare interface CustomTreeNode {
1462
1481
  key: string;
1463
- title: string;
1482
+ title?: string;
1464
1483
  collapsed?: boolean;
1465
1484
  description?: string;
1466
1485
  children?: CustomTreeNode[];
1467
1486
  }
1468
1487
 
1469
- declare type Data = (RawData_2 & ExtraData) | undefined;
1488
+ declare type Data = (RawData_2 & ExtraData) | undefined | null;
1470
1489
 
1471
1490
  /**
1472
1491
  * DataCell for panelGroup area
@@ -1527,9 +1546,10 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
1527
1546
  * Mapping value to get condition related attrs
1528
1547
  * @param condition
1529
1548
  */
1530
- mappingValue(condition: Condition): MappingResult;
1549
+ mappingValue(condition: Condition): MappingResult | undefined | null;
1531
1550
  updateByState(stateName: InteractionStateName): void;
1532
1551
  clearUnselectedState(): void;
1552
+ private toggleConditionIntervalShapeOpacity;
1533
1553
  }
1534
1554
 
1535
1555
  declare type DataCellCallback = (viewMeta: ViewMeta_2) => S2CellType_2;
@@ -1733,8 +1753,6 @@ declare interface Fields extends BaseFields {
1733
1753
  customValueOrder?: number;
1734
1754
  }
1735
1755
 
1736
- declare type FilterDataItemCallback = (valueField: string, data: DataItem) => DataItem;
1737
-
1738
1756
  declare interface FilterParam {
1739
1757
  filterKey: string;
1740
1758
  filteredValues?: unknown[];
@@ -2127,6 +2145,11 @@ declare interface LayoutResult_2 {
2127
2145
  spreadsheet: SpreadSheet_2;
2128
2146
  }
2129
2147
 
2148
+ /**
2149
+ * determine the series number cell coordinates
2150
+ */
2151
+ declare type LayoutSeriesNumberNodes = (rowsHierarchy: Hierarchy, seriesNumberWidth: number, spreadsheet: SpreadSheet_2) => Node_2_2[];
2152
+
2130
2153
  /**
2131
2154
  * 布局类型:
2132
2155
  * adaptive: 行列等宽,均分整个 canvas 画布宽度
@@ -2148,9 +2171,7 @@ declare interface LineTheme {
2148
2171
  };
2149
2172
  }
2150
2173
 
2151
- declare type MappingDataItemCallback = (valueField: string, data: DataItem) => Record<string, string | number> | DataItem;
2152
-
2153
- declare type MappingFunction = (fieldValue: number | string, data: Record<string, any>) => MappingResult | undefined;
2174
+ declare type MappingFunction = (fieldValue: number | string, data: RawData_2) => MappingResult | undefined | null;
2154
2175
 
2155
2176
  declare interface MappingResult extends ValueRange {
2156
2177
  icon?: string;
@@ -2323,6 +2344,10 @@ declare class Node_2_2 {
2323
2344
  static rootNode(): Node_2_2;
2324
2345
  toJSON(): Omit_2<this, "config" | "parent" | "hierarchy" | "spreadsheet">;
2325
2346
  getHeadLeafChild(): Node_2_2 | undefined;
2347
+ /**
2348
+ * 获取树状模式下,当前节点以及其所有子节点的高度总和
2349
+ * */
2350
+ getTotalHeightForTreeHierarchy(): number;
2326
2351
  }
2327
2352
 
2328
2353
  declare interface OffsetConfig {
@@ -2436,21 +2461,21 @@ loading: BooleanConstructor;
2436
2461
  partDrillDown: ObjectConstructor;
2437
2462
  header: ObjectConstructor;
2438
2463
  options: {
2439
- type: PropType<S2Options<TooltipContentType, Pagination>>;
2440
- default: S2Options<TooltipContentType, Pagination>;
2464
+ type: PropType<S2Options<TooltipContentType, Pagination, string | Element, string>>;
2465
+ default: S2Options<TooltipContentType, Pagination, string | Element, string>;
2441
2466
  };
2442
2467
  adaptive: {
2443
2468
  type: PropType<Adaptive>;
2444
2469
  default: Adaptive;
2445
2470
  };
2446
- onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => SpreadSheet>;
2471
+ onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => SpreadSheet>;
2447
2472
  onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
2448
2473
  onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
2449
2474
  }, {
2450
2475
  s2Ref: ShallowRef<SheetExpose>;
2451
- options: S2Options<TooltipContentType, Pagination>;
2476
+ options: S2Options<TooltipContentType, Pagination, string | Element, string>;
2452
2477
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2453
- spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => SpreadSheet;
2478
+ spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => SpreadSheet;
2454
2479
  getSpreadSheet: (spreadsheet: SpreadSheet) => void;
2455
2480
  sheetUpdate: SheetUpdateCallback;
2456
2481
  rowCellHover: (data: TargetCellInfo) => void;
@@ -2580,14 +2605,14 @@ loading: BooleanConstructor;
2580
2605
  partDrillDown: ObjectConstructor;
2581
2606
  header: ObjectConstructor;
2582
2607
  options: {
2583
- type: PropType<S2Options<TooltipContentType, Pagination>>;
2584
- default: S2Options<TooltipContentType, Pagination>;
2608
+ type: PropType<S2Options<TooltipContentType, Pagination, string | Element, string>>;
2609
+ default: S2Options<TooltipContentType, Pagination, string | Element, string>;
2585
2610
  };
2586
2611
  adaptive: {
2587
2612
  type: PropType<Adaptive>;
2588
2613
  default: Adaptive;
2589
2614
  };
2590
- onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => SpreadSheet>;
2615
+ onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => SpreadSheet>;
2591
2616
  onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
2592
2617
  onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
2593
2618
  }>> & {
@@ -2701,10 +2726,10 @@ record: RawData;
2701
2726
  onScroll?: (position: CellScrollPosition) => any;
2702
2727
  onRowCellBrushSelection?: (event: GEvent) => any;
2703
2728
  onColCellBrushSelection?: (event: GEvent) => any;
2704
- onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => any;
2729
+ onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => any;
2705
2730
  onGetSpreadSheet?: (spreadsheet: SpreadSheet) => any;
2706
2731
  }, {
2707
- options: S2Options<TooltipContentType, Pagination>;
2732
+ options: S2Options<TooltipContentType, Pagination, string | Element, string>;
2708
2733
  loading: boolean;
2709
2734
  adaptive: boolean | {
2710
2735
  width?: boolean;
@@ -2717,6 +2742,11 @@ onChange?: (current: number) => void;
2717
2742
  };
2718
2743
  }>;
2719
2744
 
2745
+ declare interface Point {
2746
+ x: number;
2747
+ y: number;
2748
+ }
2749
+
2720
2750
  declare interface PointObject {
2721
2751
  x: number;
2722
2752
  y: number;
@@ -2931,17 +2961,16 @@ declare class RowHeader extends BaseHeader<RowHeaderConfig> {
2931
2961
  declare interface RowHeaderConfig extends BaseHeaderConfig {
2932
2962
  hierarchyType: S2Options_2['hierarchyType'];
2933
2963
  linkFields: string[];
2934
- seriesNumberWidth: number;
2935
2964
  }
2936
2965
 
2937
- declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2> {
2966
+ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Icon = Element | string, Text = string> {
2938
2967
  width?: number;
2939
2968
  height?: number;
2940
2969
  debug?: boolean;
2941
2970
  hierarchyType?: 'grid' | 'tree';
2942
2971
  conditions?: Conditions;
2943
2972
  totals?: Totals | null;
2944
- tooltip?: Tooltip<T>;
2973
+ tooltip?: Tooltip<T, Icon, Text>;
2945
2974
  interaction?: InteractionOptions;
2946
2975
  pagination?: P;
2947
2976
  frozenRowHeader?: boolean;
@@ -2963,6 +2992,7 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2> {
2963
2992
  /** ***********CUSTOM CELL/HEADER HOOKS**************** */
2964
2993
  dataCell?: DataCellCallback;
2965
2994
  cornerCell?: CellCallback<CornerHeaderConfig>;
2995
+ seriesNumberCell?: CellCallback<BaseHeaderConfig>;
2966
2996
  rowCell?: CellCallback<RowHeaderConfig>;
2967
2997
  colCell?: CellCallback<ColHeaderConfig>;
2968
2998
  frame?: FrameCallback;
@@ -2972,12 +3002,10 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2> {
2972
3002
  layoutArrange?: LayoutArrange;
2973
3003
  layoutCoordinate?: LayoutCoordinate;
2974
3004
  layoutDataPosition?: LayoutDataPosition;
2975
- /** ***********CUSTOM DATA CELL RENDER HOOKS**************** */
2976
- filterDisplayDataItem?: FilterDataItemCallback;
2977
- mappingDisplayDataItem?: MappingDataItemCallback;
3005
+ layoutSeriesNumberNodes?: LayoutSeriesNumberNodes;
2978
3006
  }
2979
3007
 
2980
- declare type S2CellType_2<T extends SimpleBBox = ViewMeta_2> = DataCell_2 | HeaderCell | ColCell | CornerCell | RowCell | MergedCell | TableCornerCell | TableSeriesCell | BaseCell<T>;
3008
+ declare type S2CellType_2<T extends SimpleBBox = ViewMeta_2> = DataCell_2 | HeaderCell | ColCell | CornerCell | RowCell | SeriesNumberCell | MergedCell | TableCornerCell | TableSeriesCell | BaseCell<T>;
2981
3009
 
2982
3010
  declare interface S2DataConfig_2 {
2983
3011
  data: RawData_2[];
@@ -3093,7 +3121,7 @@ declare interface S2EventHandler {
3093
3121
 
3094
3122
  declare type S2MountContainer_2 = string | Element;
3095
3123
 
3096
- declare interface S2Options_2<T = TooltipContentType_2, P = Pagination_2> extends S2BasicOptions<T, P>, S2TableSheetOptions, S2PivotSheetOptions {
3124
+ declare interface S2Options_2<T = TooltipContentType_2, P = Pagination_2, Icon = Element | string, Text = string> extends S2BasicOptions<T, P, Icon, Text>, S2TableSheetOptions, S2PivotSheetOptions {
3097
3125
  dataSet?: (spreadsheet: SpreadSheet_2) => BaseDataSet_2;
3098
3126
  }
3099
3127
 
@@ -3114,9 +3142,9 @@ declare interface S2Style {
3114
3142
  rowExpandDepth?: number | null;
3115
3143
  collapsedRows?: Record<string, boolean> | null;
3116
3144
  collapsedCols?: Record<string, boolean>;
3117
- cellCfg?: CellCfg;
3118
- colCfg?: ColCfg;
3119
- rowCfg?: RowCfg;
3145
+ cellCfg?: CellCfg | null | undefined;
3146
+ colCfg?: ColCfg | null | undefined;
3147
+ rowCfg?: RowCfg | null | undefined;
3120
3148
  /**
3121
3149
  * @deprecated use options.deviceType instead
3122
3150
  */
@@ -3143,7 +3171,6 @@ declare class ScrollBar extends Group {
3143
3171
  trackLen: number;
3144
3172
  thumbLen: number;
3145
3173
  position: PointObject;
3146
- minThumbLen: number;
3147
3174
  thumbOffset: number;
3148
3175
  scrollTargetMaxOffset: number;
3149
3176
  theme: ScrollBarTheme;
@@ -3158,8 +3185,10 @@ declare class ScrollBar extends Group {
3158
3185
  constructor(scrollBarCfg: ScrollBarCfg);
3159
3186
  private getCoordinatesName;
3160
3187
  /**
3161
- * Antv/g 4.x 版本计算 bbox 有bug, 实际渲染的宽度会比给定的宽度大, 需要对其做修正
3162
- * 详情: https://github.com/antvis/S2/pull/1566/files#diff-3f08348041906ddf1e4f094bfe2ac32b35ff668918d3fbb952e9227ae462cc08R52
3188
+ * Antv/g 5.0 环境下坐标修正
3189
+ *
3190
+ * 当 lineCap 设置为非 'butt' 后,实际绘制左右两端会多两个头,且不计入 getBBox 的计算
3191
+ * 如长100,strokeWidth=10,实际渲染110长度的线,getBBox 仍返回100
3163
3192
  */
3164
3193
  private getCoordinatesWithBBoxExtraPadding;
3165
3194
  /**
@@ -3204,10 +3233,9 @@ declare interface ScrollBarCfg {
3204
3233
  readonly trackLen: number;
3205
3234
  readonly thumbLen: number;
3206
3235
  readonly position: PointObject;
3207
- readonly minThumbLen?: number;
3208
3236
  readonly thumbOffset?: number;
3209
3237
  readonly scrollTargetMaxOffset: number;
3210
- readonly theme?: ScrollBarTheme;
3238
+ readonly theme?: ScrollBarTheme | undefined;
3211
3239
  }
3212
3240
 
3213
3241
  declare enum ScrollbarPositionType {
@@ -3219,6 +3247,8 @@ declare interface ScrollBarTheme {
3219
3247
  trackColor?: string;
3220
3248
  thumbHoverColor?: string;
3221
3249
  thumbColor?: string;
3250
+ thumbHorizontalMinSize?: number;
3251
+ thumbVerticalMinSize?: number;
3222
3252
  size?: number;
3223
3253
  hoverSize?: number;
3224
3254
  /** 指定如何绘制每一条线段末端,lineCap?: 'butt' | 'round' | 'square'; */
@@ -3243,16 +3273,33 @@ declare interface SelectHeaderCellInfo {
3243
3273
  isMultiSelection?: boolean;
3244
3274
  }
3245
3275
 
3276
+ declare class SeriesNumberCell extends BaseCell<Node_2_2> {
3277
+ protected headerConfig: BaseHeaderConfig;
3278
+ protected handleRestOptions(...[headerConfig]: [BaseHeaderConfig]): void;
3279
+ get cellType(): CellTypes;
3280
+ protected getBorderPositions(): CellBorderPosition[];
3281
+ protected initCell(): void;
3282
+ protected getBackgroundColor(): {
3283
+ backgroundColor: string | undefined;
3284
+ backgroundColorOpacity: number | undefined;
3285
+ };
3286
+ update(): void;
3287
+ protected getTextStyle(): TextTheme;
3288
+ protected getFormattedFieldValue(): FormatResult;
3289
+ protected getMaxTextWidth(): number;
3290
+ protected getTextPosition(): PointLike;
3291
+ protected findFieldCondition(): Condition | undefined;
3292
+ protected mappingValue(): MappingResult | undefined;
3293
+ }
3294
+
3246
3295
  declare class SeriesNumberHeader extends BaseHeader<BaseHeaderConfig> {
3247
- private backgroundShape;
3248
- private leftBorderShape;
3249
3296
  /**
3250
3297
  * Get seriesNumber header by config
3251
3298
  */
3252
3299
  static getSeriesNumberHeader(options: {
3253
3300
  panelBBox: PanelBBox;
3254
3301
  seriesNumberWidth: number;
3255
- leafNodes: Node_2_2[];
3302
+ rowsHierarchy: Hierarchy;
3256
3303
  spreadsheet: SpreadSheet_2;
3257
3304
  cornerWidth: number;
3258
3305
  }): SeriesNumberHeader;
@@ -3260,11 +3307,6 @@ declare class SeriesNumberHeader extends BaseHeader<BaseHeaderConfig> {
3260
3307
  clip(): void;
3261
3308
  layout(): void;
3262
3309
  protected offset(): void;
3263
- private addBackGround;
3264
- private addBorder;
3265
- private getStyle;
3266
- private addText;
3267
- private getTextPadding;
3268
3310
  }
3269
3311
 
3270
3312
  export declare const SheetComponent: DefineComponent<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "renderConfig" | "adaptive" | "showPagination" | "themeCfg" | "header" | "getSpreadSheet" | "onSheetUpdate" | "onRowCellHover" | "onRowCellClick" | "onRowCellDoubleClick" | "onRowCellContextMenu" | "onRowCellMouseDown" | "onRowCellMouseUp" | "onRowCellMouseMove" | "onRowCellCollapseTreeRows" | "onRowCellScroll" | "onColCellHover" | "onColCellClick" | "onColCellDoubleClick" | "onColCellContextMenu" | "onColCellMouseDown" | "onColCellMouseUp" | "onColCellMouseMove" | "onDataCellHover" | "onDataCellClick" | "onDataCellDoubleClick" | "onDataCellContextMenu" | "onDataCellMouseDown" | "onDataCellMouseUp" | "onDataCellMouseMove" | "onDataCellTrendIconClick" | "onDataCellBrushSelection" | "onDataCellSelectMove" | "onCornerCellHover" | "onCornerCellClick" | "onCornerCellDoubleClick" | "onCornerCellContextMenu" | "onCornerCellMouseDown" | "onCornerCellMouseUp" | "onCornerCellMouseMove" | "onMergedCellsHover" | "onMergedCellsClick" | "onMergedCellsDoubleClick" | "onMergedCellsContextMenu" | "onMergedCellsMouseDown" | "onMergedCellsMouseUp" | "onMergedCellsMouseMove" | "onRangeSort" | "onRangeSorted" | "onRangeFilter" | "onRangeFiltered" | "onLayoutAfterHeaderLayout" | "onLayoutPagination" | "onLayoutCellScroll" | "onLayoutCellMounted" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "onMounted" | "onDestroy" | "onLayoutResize" | "onLayoutResizeSeriesWidth" | "onLayoutResizeRowWidth" | "onLayoutResizeRowHeight" | "onLayoutResizeColWidth" | "onLayoutResizeColHeight" | "onLayoutResizeTreeWidth" | "onLayoutResizeMouseDown" | "onLayoutResizeMouseUp" | "onLayoutResizeMouseMove" | "onKeyBoardDown" | "onKeyBoardUp" | "onCopied" | "onActionIconHover" | "onActionIconHoverOff" | "onActionIconClick" | "onContextMenu" | "onClick" | "onHover" | "onDoubleClick" | "onMouseHover" | "onMouseUp" | "onMouseDown" | "onMouseMove" | "onSelected" | "onReset" | "onLinkFieldJump" | "onScroll" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
@@ -3287,21 +3329,21 @@ loading: BooleanConstructor;
3287
3329
  partDrillDown: ObjectConstructor;
3288
3330
  header: ObjectConstructor;
3289
3331
  options: {
3290
- type: PropType<S2Options_2<TooltipContentType_2, Pagination_2>>;
3291
- default: S2Options_2<TooltipContentType_2, Pagination_2>;
3332
+ type: PropType<S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>>;
3333
+ default: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>;
3292
3334
  };
3293
3335
  adaptive: {
3294
3336
  type: PropType<Adaptive>;
3295
3337
  default: Adaptive;
3296
3338
  };
3297
- onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2>;
3339
+ onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2>;
3298
3340
  onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet_2) => void>;
3299
3341
  onMounted: PropType<(spreadsheet: SpreadSheet_2) => void>;
3300
3342
  }, {
3301
3343
  s2Ref: ShallowRef<SheetExpose>;
3302
- options: S2Options_2<TooltipContentType_2, Pagination_2>;
3344
+ options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>;
3303
3345
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
3304
- spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
3346
+ spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2;
3305
3347
  getSpreadSheet: (spreadsheet: SpreadSheet_2) => void;
3306
3348
  sheetUpdate: SheetUpdateCallback;
3307
3349
  rowCellHover: (data: TargetCellInfo_2) => void;
@@ -3431,14 +3473,14 @@ loading: BooleanConstructor;
3431
3473
  partDrillDown: ObjectConstructor;
3432
3474
  header: ObjectConstructor;
3433
3475
  options: {
3434
- type: PropType<S2Options_2<TooltipContentType_2, Pagination_2>>;
3435
- default: S2Options_2<TooltipContentType_2, Pagination_2>;
3476
+ type: PropType<S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>>;
3477
+ default: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>;
3436
3478
  };
3437
3479
  adaptive: {
3438
3480
  type: PropType<Adaptive>;
3439
3481
  default: Adaptive;
3440
3482
  };
3441
- onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2>;
3483
+ onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2>;
3442
3484
  onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet_2) => void>;
3443
3485
  onMounted: PropType<(spreadsheet: SpreadSheet_2) => void>;
3444
3486
  }>> & {
@@ -3552,10 +3594,10 @@ record: RawData_2;
3552
3594
  onScroll?: (position: CellScrollPosition_2) => any;
3553
3595
  onRowCellBrushSelection?: (event: FederatedPointerEvent_2) => any;
3554
3596
  onColCellBrushSelection?: (event: FederatedPointerEvent_2) => any;
3555
- onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => any;
3597
+ onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => any;
3556
3598
  onGetSpreadSheet?: (spreadsheet: SpreadSheet_2) => any;
3557
3599
  }, {
3558
- options: S2Options_2<TooltipContentType_2, Pagination_2>;
3600
+ options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>;
3559
3601
  loading: boolean;
3560
3602
  adaptive: boolean | {
3561
3603
  width?: boolean;
@@ -3569,7 +3611,7 @@ onChange?: (current: number) => void;
3569
3611
  }> | DefineComponent<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "renderConfig" | "adaptive" | "showPagination" | "themeCfg" | "header" | "getSpreadSheet" | "onSheetUpdate" | "onRowCellHover" | "onRowCellClick" | "onRowCellDoubleClick" | "onRowCellContextMenu" | "onRowCellMouseDown" | "onRowCellMouseUp" | "onRowCellMouseMove" | "onRowCellCollapseTreeRows" | "onRowCellScroll" | "onColCellHover" | "onColCellClick" | "onColCellDoubleClick" | "onColCellContextMenu" | "onColCellMouseDown" | "onColCellMouseUp" | "onColCellMouseMove" | "onDataCellHover" | "onDataCellClick" | "onDataCellDoubleClick" | "onDataCellContextMenu" | "onDataCellMouseDown" | "onDataCellMouseUp" | "onDataCellMouseMove" | "onDataCellTrendIconClick" | "onDataCellBrushSelection" | "onDataCellSelectMove" | "onCornerCellHover" | "onCornerCellClick" | "onCornerCellDoubleClick" | "onCornerCellContextMenu" | "onCornerCellMouseDown" | "onCornerCellMouseUp" | "onCornerCellMouseMove" | "onMergedCellsHover" | "onMergedCellsClick" | "onMergedCellsDoubleClick" | "onMergedCellsContextMenu" | "onMergedCellsMouseDown" | "onMergedCellsMouseUp" | "onMergedCellsMouseMove" | "onRangeSort" | "onRangeSorted" | "onRangeFilter" | "onRangeFiltered" | "onLayoutAfterHeaderLayout" | "onLayoutPagination" | "onLayoutCellScroll" | "onLayoutCellMounted" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "onMounted" | "onDestroy" | "onLayoutResize" | "onLayoutResizeSeriesWidth" | "onLayoutResizeRowWidth" | "onLayoutResizeRowHeight" | "onLayoutResizeColWidth" | "onLayoutResizeColHeight" | "onLayoutResizeTreeWidth" | "onLayoutResizeMouseDown" | "onLayoutResizeMouseUp" | "onLayoutResizeMouseMove" | "onKeyBoardDown" | "onKeyBoardUp" | "onCopied" | "onActionIconHover" | "onActionIconHoverOff" | "onActionIconClick" | "onContextMenu" | "onClick" | "onHover" | "onDoubleClick" | "onMouseHover" | "onMouseUp" | "onMouseDown" | "onMouseMove" | "onSelected" | "onReset" | "onLinkFieldJump" | "onScroll" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
3570
3612
  s2Ref: ShallowRef<SheetExpose>;
3571
3613
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
3572
- spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
3614
+ spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2;
3573
3615
  getSpreadSheet: (spreadsheet: SpreadSheet_2) => void;
3574
3616
  sheetUpdate: SheetUpdateCallback;
3575
3617
  rowCellHover: (data: TargetCellInfo_2) => void;
@@ -3792,11 +3834,11 @@ record: RawData_2;
3792
3834
  onScroll?: (position: CellScrollPosition_2) => any;
3793
3835
  onRowCellBrushSelection?: (event: FederatedPointerEvent_2) => any;
3794
3836
  onColCellBrushSelection?: (event: FederatedPointerEvent_2) => any;
3795
- onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => any;
3837
+ onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => any;
3796
3838
  onGetSpreadSheet?: (spreadsheet: SpreadSheet_2) => any;
3797
3839
  }, {}>>;
3798
3840
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
3799
- spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
3841
+ spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2;
3800
3842
  getSpreadSheet: (spreadsheet: SpreadSheet_2) => void;
3801
3843
  sheetUpdate: SheetUpdateCallback;
3802
3844
  rowCellHover: (data: TargetCellInfo_2) => void;
@@ -4019,7 +4061,7 @@ record: RawData_2;
4019
4061
  onScroll?: (position: CellScrollPosition_2) => any;
4020
4062
  onRowCellBrushSelection?: (event: FederatedPointerEvent_2) => any;
4021
4063
  onColCellBrushSelection?: (event: FederatedPointerEvent_2) => any;
4022
- onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => any;
4064
+ onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => any;
4023
4065
  onGetSpreadSheet?: (spreadsheet: SpreadSheet_2) => any;
4024
4066
  }, {}>;
4025
4067
 
@@ -4219,7 +4261,6 @@ declare abstract class SpreadSheet_2 extends EE {
4219
4261
  * but offsetY(vertical scroll don't need animation)
4220
4262
  */
4221
4263
  updateScrollOffset(offsetConfig: OffsetConfig): void;
4222
- getTooltipDataItemMappingCallback(): MappingDataItemCallback | undefined;
4223
4264
  getCell<T extends S2CellType_2 = S2CellType_2>(target: CellEventTarget): T | null;
4224
4265
  getCellType(target: CellEventTarget): CellTypes | undefined;
4225
4266
  /**
@@ -4341,6 +4382,7 @@ declare class TableColCell extends ColCell {
4341
4382
  protected getTextStyle(): TextTheme;
4342
4383
  protected getHorizontalResizeAreaName(): string;
4343
4384
  protected drawBackgroundShape(): void;
4385
+ protected handleViewport(viewport: AreaRange): AreaRange;
4344
4386
  }
4345
4387
 
4346
4388
  declare class TableCornerCell extends TableColCell {
@@ -4364,7 +4406,7 @@ declare class TableSeriesCell extends TableDataCell {
4364
4406
  export declare const TableSheet: DefineComponent<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "renderConfig" | "adaptive" | "showPagination" | "themeCfg" | "header" | "getSpreadSheet" | "onSheetUpdate" | "onRowCellHover" | "onRowCellClick" | "onRowCellDoubleClick" | "onRowCellContextMenu" | "onRowCellMouseDown" | "onRowCellMouseUp" | "onRowCellMouseMove" | "onRowCellCollapseTreeRows" | "onRowCellScroll" | "onColCellHover" | "onColCellClick" | "onColCellDoubleClick" | "onColCellContextMenu" | "onColCellMouseDown" | "onColCellMouseUp" | "onColCellMouseMove" | "onDataCellHover" | "onDataCellClick" | "onDataCellDoubleClick" | "onDataCellContextMenu" | "onDataCellMouseDown" | "onDataCellMouseUp" | "onDataCellMouseMove" | "onDataCellTrendIconClick" | "onDataCellBrushSelection" | "onDataCellSelectMove" | "onCornerCellHover" | "onCornerCellClick" | "onCornerCellDoubleClick" | "onCornerCellContextMenu" | "onCornerCellMouseDown" | "onCornerCellMouseUp" | "onCornerCellMouseMove" | "onMergedCellsHover" | "onMergedCellsClick" | "onMergedCellsDoubleClick" | "onMergedCellsContextMenu" | "onMergedCellsMouseDown" | "onMergedCellsMouseUp" | "onMergedCellsMouseMove" | "onRangeSort" | "onRangeSorted" | "onRangeFilter" | "onRangeFiltered" | "onLayoutAfterHeaderLayout" | "onLayoutPagination" | "onLayoutCellScroll" | "onLayoutCellMounted" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "onMounted" | "onDestroy" | "onLayoutResize" | "onLayoutResizeSeriesWidth" | "onLayoutResizeRowWidth" | "onLayoutResizeRowHeight" | "onLayoutResizeColWidth" | "onLayoutResizeColHeight" | "onLayoutResizeTreeWidth" | "onLayoutResizeMouseDown" | "onLayoutResizeMouseUp" | "onLayoutResizeMouseMove" | "onKeyBoardDown" | "onKeyBoardUp" | "onCopied" | "onActionIconHover" | "onActionIconHoverOff" | "onActionIconClick" | "onContextMenu" | "onClick" | "onHover" | "onDoubleClick" | "onMouseHover" | "onMouseUp" | "onMouseDown" | "onMouseMove" | "onSelected" | "onReset" | "onLinkFieldJump" | "onScroll" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
4365
4407
  s2Ref: ShallowRef<SheetExpose>;
4366
4408
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
4367
- spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
4409
+ spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2;
4368
4410
  getSpreadSheet: (spreadsheet: SpreadSheet_2) => void;
4369
4411
  sheetUpdate: SheetUpdateCallback;
4370
4412
  rowCellHover: (data: TargetCellInfo_2) => void;
@@ -4587,7 +4629,7 @@ record: RawData_2;
4587
4629
  onScroll?: (position: CellScrollPosition_2) => any;
4588
4630
  onRowCellBrushSelection?: (event: FederatedPointerEvent_2) => any;
4589
4631
  onColCellBrushSelection?: (event: FederatedPointerEvent_2) => any;
4590
- onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => any;
4632
+ onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => any;
4591
4633
  onGetSpreadSheet?: (spreadsheet: SpreadSheet_2) => any;
4592
4634
  }, {}>;
4593
4635
 
@@ -4623,11 +4665,11 @@ declare interface ThemeCfg_2 {
4623
4665
 
4624
4666
  declare type ThemeName = 'default' | 'colorful' | 'gray';
4625
4667
 
4626
- declare interface Tooltip<T = TooltipContentType_2> extends BaseTooltipConfig<T> {
4627
- row?: BaseTooltipConfig<T>;
4628
- col?: BaseTooltipConfig<T>;
4629
- corner?: BaseTooltipConfig<T>;
4630
- data?: BaseTooltipConfig<T>;
4668
+ declare interface Tooltip<T = TooltipContentType_2, Icon = Element | string, Text = string> extends BaseTooltipConfig<T, Icon, Text> {
4669
+ row?: BaseTooltipConfig<T, Icon, Text>;
4670
+ col?: BaseTooltipConfig<T, Icon, Text>;
4671
+ corner?: BaseTooltipConfig<T, Icon, Text>;
4672
+ data?: BaseTooltipConfig<T, Icon, Text>;
4631
4673
  }
4632
4674
 
4633
4675
  declare type TooltipAutoAdjustBoundary = 'body' | 'container' | null | undefined;
@@ -4667,7 +4709,7 @@ declare type TooltipInterpretationOptions = {
4667
4709
  render?: Element | string;
4668
4710
  };
4669
4711
 
4670
- declare interface TooltipOperation extends TooltipOperatorOptions {
4712
+ declare interface TooltipOperation<Icon = Element | string, Text = string> extends TooltipOperatorOptions<Icon, Text> {
4671
4713
  hiddenColumns?: boolean;
4672
4714
  trend?: boolean;
4673
4715
  sort?: boolean;
@@ -4679,24 +4721,24 @@ declare type TooltipOperatorClickHandler = (params: {
4679
4721
  [key: string]: unknown;
4680
4722
  }) => void;
4681
4723
 
4682
- declare interface TooltipOperatorMenu {
4724
+ declare interface TooltipOperatorMenu<Icon = Element | string, Text = string> {
4683
4725
  key: string;
4684
- icon?: Element | string;
4685
- text?: string;
4726
+ icon?: Icon;
4727
+ text?: Text;
4686
4728
  onClick?: (cell: S2CellType_2) => void;
4687
4729
  visible?: boolean | ((cell: S2CellType_2) => boolean);
4688
- children?: TooltipOperatorMenu[];
4730
+ children?: TooltipOperatorMenu<Icon, Text>[];
4689
4731
  }
4690
4732
 
4691
- declare interface TooltipOperatorOptions {
4733
+ declare interface TooltipOperatorOptions<Icon = Element | string, Text = string> {
4692
4734
  onClick?: TooltipOperatorClickHandler;
4693
- menus?: TooltipOperatorMenu[];
4735
+ menus?: TooltipOperatorMenu<Icon, Text>[];
4694
4736
  defaultSelectedKeys?: string[];
4695
4737
  }
4696
4738
 
4697
- declare interface TooltipOptions {
4739
+ declare interface TooltipOptions<Icon = Element | string, Text = string> {
4698
4740
  hideSummary?: boolean;
4699
- operator?: TooltipOperatorOptions;
4741
+ operator?: TooltipOperatorOptions<Icon, Text>;
4700
4742
  enterable?: boolean;
4701
4743
  isTotals?: boolean;
4702
4744
  showSingleTips?: boolean;
@@ -4705,22 +4747,19 @@ declare interface TooltipOptions {
4705
4747
  forceRender?: boolean;
4706
4748
  }
4707
4749
 
4708
- declare interface TooltipPosition {
4709
- x: number;
4710
- y: number;
4711
- }
4750
+ declare type TooltipPosition = Point;
4712
4751
 
4713
4752
  declare interface TooltipPositionInfo {
4714
4753
  position: TooltipPosition;
4715
4754
  event: FederatedPointerEvent | MouseEvent;
4716
4755
  }
4717
4756
 
4718
- declare type TooltipShowOptions<T = TooltipContentType_2> = {
4757
+ declare type TooltipShowOptions<T = TooltipContentType_2, Icon = Element | string, Text = string> = {
4719
4758
  position: TooltipPosition;
4720
4759
  data?: TooltipData;
4721
4760
  cellInfos?: TooltipDataItem[];
4722
- options?: TooltipOptions;
4723
- content?: ((cell: S2CellType_2, defaultTooltipShowOptions: TooltipShowOptions<T>) => T) | T;
4761
+ options?: TooltipOptions<Icon, Text>;
4762
+ content?: ((cell: S2CellType_2, defaultTooltipShowOptions: TooltipShowOptions<T, Icon, Text>) => T) | T;
4724
4763
  event?: FederatedPointerEvent | MouseEvent;
4725
4764
  };
4726
4765
 
@@ -4825,7 +4864,7 @@ declare type ViewMetaIndexType = keyof Pick<ViewMeta_2, 'colIndex' | 'rowIndex'>
4825
4864
  * 移动端滚动事件
4826
4865
  * @see https://github.com/antvis/g-gesture/blob/master/src/event/wheel.ts
4827
4866
  */
4828
- declare class Wheel extends EE {
4867
+ declare class WheelEvent_2 extends EE {
4829
4868
  private canvas;
4830
4869
  private panning;
4831
4870
  private preX;