@antv/s2-vue 1.4.0-alpha.1 → 1.5.0
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/README.md +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/style.min.css +1 -1
- package/esm/index.d.ts +302 -126
- package/esm/index.js +8 -2
- package/esm/index.js.map +1 -1
- package/esm/style.css +19 -2
- package/lib/index.js +8 -2
- package/lib/index.js.map +1 -1
- package/lib/style.css +19 -2
- package/package.json +3 -3
package/esm/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ import { PropType } from 'vue';
|
|
|
36
36
|
import { Ref } from 'vue';
|
|
37
37
|
import { ResizeInfo } from '@antv/s2';
|
|
38
38
|
import { ResizeParams } from '@antv/s2';
|
|
39
|
+
import { S2CellType } from '@antv/s2';
|
|
39
40
|
import { S2DataConfig } from '@antv/s2';
|
|
40
41
|
import { S2MountContainer } from '@antv/s2';
|
|
41
42
|
import { S2Options } from '@antv/s2';
|
|
@@ -67,6 +68,11 @@ declare enum Aggregation {
|
|
|
67
68
|
AVG = "AVG"
|
|
68
69
|
}
|
|
69
70
|
|
|
71
|
+
declare interface AreaRange {
|
|
72
|
+
start: number;
|
|
73
|
+
width: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
70
76
|
declare interface Background {
|
|
71
77
|
opacity?: number;
|
|
72
78
|
color?: string;
|
|
@@ -104,9 +110,14 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
104
110
|
protected theme: S2Theme;
|
|
105
111
|
protected backgroundShape: IShape;
|
|
106
112
|
protected textShape: IShape;
|
|
113
|
+
protected textShapes: IShape[];
|
|
107
114
|
protected linkFieldShape: IShape;
|
|
108
115
|
protected actualText: string;
|
|
109
116
|
protected actualTextWidth: number;
|
|
117
|
+
protected conditions: Conditions;
|
|
118
|
+
protected conditionIntervalShape: IShape;
|
|
119
|
+
protected conditionIconShape: GuiIcon;
|
|
120
|
+
protected conditionIconShapes: GuiIcon[];
|
|
110
121
|
protected stateShapes: Map<StateShapeLayer, IShape>;
|
|
111
122
|
constructor(meta: T, spreadsheet: SpreadSheet_2, ...restOptions: unknown[]);
|
|
112
123
|
getMeta(): T;
|
|
@@ -145,10 +156,12 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
145
156
|
protected abstract getFormattedFieldValue(): FormatResult;
|
|
146
157
|
protected abstract getMaxTextWidth(): number;
|
|
147
158
|
protected abstract getTextPosition(): Point;
|
|
159
|
+
protected abstract findFieldCondition(conditions: Condition[]): Condition;
|
|
160
|
+
protected abstract mappingValue(condition: Condition): MappingResult;
|
|
148
161
|
getStyle<K extends keyof S2Theme = keyof CellThemes>(name?: K): DefaultCellTheme | S2Theme[K];
|
|
149
162
|
protected getResizeAreaStyle(): ResizeArea;
|
|
150
|
-
protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell:
|
|
151
|
-
|
|
163
|
+
protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell: S2CellType_2): boolean | ((cell: S2CellType_2<ViewMeta_2>) => boolean) | ResizeType | ((resizeInfo: ResizeInfo_2) => boolean);
|
|
164
|
+
getCellArea(): {
|
|
152
165
|
x: number;
|
|
153
166
|
y: number;
|
|
154
167
|
height: number;
|
|
@@ -166,7 +179,7 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
166
179
|
};
|
|
167
180
|
protected drawTextShape(): void;
|
|
168
181
|
protected drawLinkFieldShape(showLinkFieldShape: boolean, linkFillColor: string): void;
|
|
169
|
-
updateByState(stateName: InteractionStateName, cell:
|
|
182
|
+
updateByState(stateName: InteractionStateName, cell: S2CellType_2): void;
|
|
170
183
|
protected getInteractiveBorderShapeStyle<T>(style: T & number): {
|
|
171
184
|
x: number;
|
|
172
185
|
y: number;
|
|
@@ -176,6 +189,15 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
176
189
|
hideInteractionShape(): void;
|
|
177
190
|
clearUnselectedState(): void;
|
|
178
191
|
getTextShape(): IShape;
|
|
192
|
+
getTextShapes(): IShape[];
|
|
193
|
+
addTextShape(textShape: IShape): void;
|
|
194
|
+
getConditionIconShape(): GuiIcon;
|
|
195
|
+
getConditionIconShapes(): GuiIcon[];
|
|
196
|
+
addConditionIconShape(iconShape: GuiIcon): void;
|
|
197
|
+
resetTextAndConditionIconShapes(): void;
|
|
198
|
+
get cellConditions(): Conditions;
|
|
199
|
+
drawConditionIconShapes(): void;
|
|
200
|
+
getTextConditionFill(textStyle: TextTheme): string;
|
|
179
201
|
}
|
|
180
202
|
|
|
181
203
|
declare interface BaseChartData {
|
|
@@ -380,9 +402,9 @@ declare abstract class BaseFacet {
|
|
|
380
402
|
scrollImmediately: (offsetConfig?: OffsetConfig) => void;
|
|
381
403
|
/**
|
|
382
404
|
*
|
|
383
|
-
* @param
|
|
405
|
+
* @param skipScrollEvent 如为true则不触发S2Event.GLOBAL_SCROLL
|
|
384
406
|
*/
|
|
385
|
-
startScroll: (
|
|
407
|
+
startScroll: (skipScrollEvent?: boolean) => void;
|
|
386
408
|
getRendererHeight: () => number;
|
|
387
409
|
private getAdjustedScrollOffset;
|
|
388
410
|
renderRowScrollBar: (rowScrollX: number) => void;
|
|
@@ -432,7 +454,7 @@ declare abstract class BaseFacet {
|
|
|
432
454
|
* @protected
|
|
433
455
|
*/
|
|
434
456
|
protected translateRelatedGroups(scrollX: number, scrollY: number, hRowScroll: number): void;
|
|
435
|
-
addCell: (cell:
|
|
457
|
+
addCell: (cell: S2CellType_2<ViewMeta_2>) => void;
|
|
436
458
|
realCellRender: (scrollX: number, scrollY: number) => void;
|
|
437
459
|
protected init(): void;
|
|
438
460
|
protected renderBackground(): void;
|
|
@@ -465,14 +487,15 @@ declare abstract class BaseFacet {
|
|
|
465
487
|
updatePanelScrollGroup(): void;
|
|
466
488
|
/**
|
|
467
489
|
*
|
|
468
|
-
* @param
|
|
490
|
+
* @param skipScrollEvent: 如true则不触发GLOBAL_SCROLL事件
|
|
469
491
|
* During scroll behavior, first call to this method fires immediately and then on interval.
|
|
470
492
|
* @protected
|
|
471
493
|
*/
|
|
472
|
-
protected dynamicRenderCell(
|
|
494
|
+
protected dynamicRenderCell(skipScrollEvent?: boolean): void;
|
|
473
495
|
private emitScrollEvent;
|
|
474
496
|
protected onAfterScroll: DebouncedFunc<() => void>;
|
|
475
497
|
protected saveInitColumnLeafNodes(columnNodes?: Node_2_2[]): void;
|
|
498
|
+
getHiddenColumnsInfo(columnNode: Node_2_2): HiddenColumnsInfo_2 | null;
|
|
476
499
|
}
|
|
477
500
|
|
|
478
501
|
/**
|
|
@@ -553,7 +576,7 @@ declare interface BaseNodeConfig {
|
|
|
553
576
|
field?: string;
|
|
554
577
|
spreadsheet?: SpreadSheet_2;
|
|
555
578
|
query?: Record<string, any>;
|
|
556
|
-
belongsCell?:
|
|
579
|
+
belongsCell?: S2CellType_2;
|
|
557
580
|
isTotalMeasure?: boolean;
|
|
558
581
|
inCollapseNode?: boolean;
|
|
559
582
|
isLeaf?: boolean;
|
|
@@ -593,6 +616,7 @@ default: Adaptive;
|
|
|
593
616
|
};
|
|
594
617
|
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: SheetComponentOptions) => SpreadSheet>;
|
|
595
618
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
619
|
+
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
596
620
|
}, {
|
|
597
621
|
S2_PREFIX_CLS: string;
|
|
598
622
|
wrapperRef: Ref<HTMLDivElement>;
|
|
@@ -610,7 +634,7 @@ showSizeChange: (nextPageSize: number) => void;
|
|
|
610
634
|
handlePageChange: (nextCurrent: number) => void;
|
|
611
635
|
handlePageSizeChange: (nextSize: number) => void;
|
|
612
636
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
613
|
-
spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => SpreadSheet;
|
|
637
|
+
spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => SpreadSheet;
|
|
614
638
|
getSpreadSheet: (spreadsheet: SpreadSheet) => void;
|
|
615
639
|
sheetUpdate: SheetUpdateCallback;
|
|
616
640
|
rowCellHover: (data: TargetCellInfo) => void;
|
|
@@ -682,6 +706,7 @@ hiddenColumnsDetail: HiddenColumnsInfo[];
|
|
|
682
706
|
}) => void;
|
|
683
707
|
beforeRender: () => void;
|
|
684
708
|
afterRender: () => void;
|
|
709
|
+
mounted: (spreadsheet: SpreadSheet) => void;
|
|
685
710
|
destroy: () => void;
|
|
686
711
|
layoutResize: (params: ResizeParams) => void;
|
|
687
712
|
layoutResizeSeriesWidth: (params: ResizeParams) => void;
|
|
@@ -716,13 +741,18 @@ mouseHover: (event: default_2) => void;
|
|
|
716
741
|
mouseUp: (event: MouseEvent) => void;
|
|
717
742
|
mouseDown: (event: MouseEvent) => void;
|
|
718
743
|
mouseMove: (event: MouseEvent) => void;
|
|
719
|
-
selected: (cells:
|
|
744
|
+
selected: (cells: S2CellType<ViewMeta>[]) => void;
|
|
720
745
|
reset: (event: KeyboardEvent) => void;
|
|
721
746
|
linkFieldJump: (data: {
|
|
722
747
|
key: string;
|
|
723
748
|
record: Data;
|
|
724
749
|
}) => void;
|
|
725
750
|
scroll: (position: CellScrollPosition) => void;
|
|
751
|
+
layoutAfterRealDataCellRender: (options: {
|
|
752
|
+
add: [number, number][];
|
|
753
|
+
remove: [number, number][];
|
|
754
|
+
spreadsheet: SpreadSheet;
|
|
755
|
+
}) => void;
|
|
726
756
|
rowCellBrushSelection: (event: default_2) => void;
|
|
727
757
|
colCellBrushSelection: (event: default_2) => void;
|
|
728
758
|
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
|
|
@@ -752,7 +782,9 @@ default: Adaptive;
|
|
|
752
782
|
};
|
|
753
783
|
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: SheetComponentOptions) => SpreadSheet>;
|
|
754
784
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
785
|
+
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
755
786
|
}>> & {
|
|
787
|
+
onMounted?: (spreadsheet: SpreadSheet) => any;
|
|
756
788
|
onSheetUpdate?: (params: S2RenderOptions) => any;
|
|
757
789
|
onRowCellHover?: (data: TargetCellInfo) => any;
|
|
758
790
|
onRowCellClick?: (data: TargetCellInfo) => any;
|
|
@@ -857,16 +889,21 @@ onMouseHover?: (event: default_2) => any;
|
|
|
857
889
|
onMouseUp?: (event: MouseEvent) => any;
|
|
858
890
|
onMouseDown?: (event: MouseEvent) => any;
|
|
859
891
|
onMouseMove?: (event: MouseEvent) => any;
|
|
860
|
-
onSelected?: (cells:
|
|
892
|
+
onSelected?: (cells: S2CellType<ViewMeta>[]) => any;
|
|
861
893
|
onReset?: (event: KeyboardEvent) => any;
|
|
862
894
|
onLinkFieldJump?: (data: {
|
|
863
895
|
key: string;
|
|
864
896
|
record: Data;
|
|
865
897
|
}) => any;
|
|
866
898
|
onScroll?: (position: CellScrollPosition) => any;
|
|
899
|
+
onLayoutAfterRealDataCellRender?: (options: {
|
|
900
|
+
add: [number, number][];
|
|
901
|
+
remove: [number, number][];
|
|
902
|
+
spreadsheet: SpreadSheet;
|
|
903
|
+
}) => any;
|
|
867
904
|
onRowCellBrushSelection?: (event: default_2) => any;
|
|
868
905
|
onColCellBrushSelection?: (event: default_2) => any;
|
|
869
|
-
onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => any;
|
|
906
|
+
onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => any;
|
|
870
907
|
onGetSpreadSheet?: (spreadsheet: SpreadSheet) => any;
|
|
871
908
|
}, {
|
|
872
909
|
options: SheetComponentOptions;
|
|
@@ -896,6 +933,7 @@ declare interface BaseSheetComponentProps<PartialDrillDown = unknown, Header = u
|
|
|
896
933
|
};
|
|
897
934
|
themeCfg?: ThemeCfg;
|
|
898
935
|
header?: Header;
|
|
936
|
+
/** @deprecated 1.29.0 已废弃, 请使用 onMounted 代替 */
|
|
899
937
|
getSpreadSheet?: (spreadsheet: SpreadSheet) => void;
|
|
900
938
|
/** 底表 render callback */
|
|
901
939
|
onSheetUpdate?: SheetUpdateCallback;
|
|
@@ -969,6 +1007,7 @@ declare interface BaseSheetComponentProps<PartialDrillDown = unknown, Header = u
|
|
|
969
1007
|
}) => void;
|
|
970
1008
|
onBeforeRender?: () => void;
|
|
971
1009
|
onAfterRender?: () => void;
|
|
1010
|
+
onMounted?: (spreadsheet: SpreadSheet) => void;
|
|
972
1011
|
onDestroy?: () => void;
|
|
973
1012
|
onLayoutResize?: (params: ResizeParams) => void;
|
|
974
1013
|
onLayoutResizeSeriesWidth?: (params: ResizeParams) => void;
|
|
@@ -1003,13 +1042,18 @@ declare interface BaseSheetComponentProps<PartialDrillDown = unknown, Header = u
|
|
|
1003
1042
|
onMouseUp?: (event: MouseEvent) => void;
|
|
1004
1043
|
onMouseDown?: (event: MouseEvent) => void;
|
|
1005
1044
|
onMouseMove?: (event: MouseEvent) => void;
|
|
1006
|
-
onSelected?: (cells:
|
|
1045
|
+
onSelected?: (cells: S2CellType[]) => void;
|
|
1007
1046
|
onReset?: (event: KeyboardEvent) => void;
|
|
1008
1047
|
onLinkFieldJump?: (data: {
|
|
1009
1048
|
key: string;
|
|
1010
1049
|
record: Data;
|
|
1011
1050
|
}) => void;
|
|
1012
1051
|
onScroll?: (position: CellScrollPosition) => void;
|
|
1052
|
+
onLayoutAfterRealDataCellRender?: (options: {
|
|
1053
|
+
add: [number, number][];
|
|
1054
|
+
remove: [number, number][];
|
|
1055
|
+
spreadsheet: SpreadSheet;
|
|
1056
|
+
}) => void;
|
|
1013
1057
|
onRowCellBrushSelection?: (event: GEvent) => void;
|
|
1014
1058
|
onColCellBrushSelection?: (event: GEvent) => void;
|
|
1015
1059
|
}
|
|
@@ -1034,10 +1078,10 @@ declare class BaseTooltip_2 {
|
|
|
1034
1078
|
private getContainer;
|
|
1035
1079
|
}
|
|
1036
1080
|
|
|
1037
|
-
declare interface BaseTooltipConfig<T = TooltipContentType_2> {
|
|
1081
|
+
declare interface BaseTooltipConfig<T = TooltipContentType_2, Icon = Element | string, Text = string> {
|
|
1038
1082
|
showTooltip?: boolean;
|
|
1039
1083
|
content?: TooltipShowOptions<T>['content'];
|
|
1040
|
-
operation?: TooltipOperation
|
|
1084
|
+
operation?: TooltipOperation<Icon, Text>;
|
|
1041
1085
|
autoAdjustBoundary?: TooltipAutoAdjustBoundary;
|
|
1042
1086
|
renderTooltip?: (spreadsheet: SpreadSheet_2) => BaseTooltip_2;
|
|
1043
1087
|
adjustPosition?: (positionInfo: TooltipPositionInfo) => TooltipPosition;
|
|
@@ -1061,6 +1105,7 @@ declare interface BulletTheme {
|
|
|
1061
1105
|
comparativeMeasure: {
|
|
1062
1106
|
width: number;
|
|
1063
1107
|
height: number;
|
|
1108
|
+
fill?: string;
|
|
1064
1109
|
color?: string;
|
|
1065
1110
|
opacity?: number;
|
|
1066
1111
|
};
|
|
@@ -1094,7 +1139,7 @@ declare enum CellBorderPosition {
|
|
|
1094
1139
|
RIGHT = "RIGHT"
|
|
1095
1140
|
}
|
|
1096
1141
|
|
|
1097
|
-
declare type CellCallback<T extends BaseHeaderConfig> = (node: Node_2_2, spreadsheet: SpreadSheet_2, headerConfig: T) =>
|
|
1142
|
+
declare type CellCallback<T extends BaseHeaderConfig> = (node: Node_2_2, spreadsheet: SpreadSheet_2, headerConfig: T) => S2CellType_2;
|
|
1098
1143
|
|
|
1099
1144
|
declare interface CellCfg {
|
|
1100
1145
|
width?: number;
|
|
@@ -1171,15 +1216,14 @@ declare class ColCell extends HeaderCell {
|
|
|
1171
1216
|
protected textPosition: Point;
|
|
1172
1217
|
get cellType(): CellTypes;
|
|
1173
1218
|
protected initCell(): void;
|
|
1174
|
-
protected drawBackgroundShape(): void;
|
|
1175
1219
|
protected drawInteractiveBgShape(): void;
|
|
1176
1220
|
/**
|
|
1177
1221
|
* 绘制hover悬停,刷选的外框
|
|
1178
1222
|
*/
|
|
1179
1223
|
protected drawInteractiveBorderShape(): void;
|
|
1180
|
-
protected getTextStyle(): TextTheme;
|
|
1181
1224
|
protected getMaxTextWidth(): number;
|
|
1182
1225
|
protected getIconPosition(): Point;
|
|
1226
|
+
protected isBolderText(): boolean;
|
|
1183
1227
|
protected getTextPosition(): Point;
|
|
1184
1228
|
protected getActionIconsWidth(): number;
|
|
1185
1229
|
protected getColResizeAreaKey(): string;
|
|
@@ -1208,6 +1252,12 @@ declare class ColCell extends HeaderCell {
|
|
|
1208
1252
|
height: number;
|
|
1209
1253
|
};
|
|
1210
1254
|
protected isLastColumn(): boolean;
|
|
1255
|
+
/**
|
|
1256
|
+
* 计算文本位置时候需要,留给后代根据情况(固定列)覆盖
|
|
1257
|
+
* @param viewport
|
|
1258
|
+
* @returns viewport
|
|
1259
|
+
*/
|
|
1260
|
+
protected handleViewport(viewport: AreaRange): AreaRange;
|
|
1211
1261
|
}
|
|
1212
1262
|
|
|
1213
1263
|
declare interface ColCfg {
|
|
@@ -1253,6 +1303,13 @@ declare type CollapsedRowsType_2 = {
|
|
|
1253
1303
|
meta?: Node_2_2;
|
|
1254
1304
|
};
|
|
1255
1305
|
|
|
1306
|
+
declare interface ColumnNode {
|
|
1307
|
+
key: string;
|
|
1308
|
+
children?: Columns;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
declare type Columns = Array<ColumnNode | string>;
|
|
1312
|
+
|
|
1256
1313
|
/**
|
|
1257
1314
|
* One field can hold a condition
|
|
1258
1315
|
*/
|
|
@@ -1277,17 +1334,20 @@ declare class CornerBBox extends BaseBBox {
|
|
|
1277
1334
|
|
|
1278
1335
|
declare class CornerCell extends HeaderCell {
|
|
1279
1336
|
protected headerConfig: CornerHeaderConfig;
|
|
1280
|
-
protected
|
|
1337
|
+
protected isBolderText(): boolean;
|
|
1281
1338
|
cornerType: CornerNodeType;
|
|
1282
1339
|
get cellType(): CellTypes;
|
|
1283
1340
|
update(): void;
|
|
1284
1341
|
protected initCell(): void;
|
|
1342
|
+
/**
|
|
1343
|
+
* @deprecated 已废弃, 请使用 drawTextShape
|
|
1344
|
+
*/
|
|
1285
1345
|
protected drawCellText(): void;
|
|
1346
|
+
protected drawTextShape(): void;
|
|
1286
1347
|
/**
|
|
1287
1348
|
* 绘制折叠展开的icon
|
|
1288
1349
|
*/
|
|
1289
1350
|
protected drawTreeIcon(): void;
|
|
1290
|
-
protected drawBackgroundShape(): void;
|
|
1291
1351
|
/**
|
|
1292
1352
|
* Render cell horizontalBorder border
|
|
1293
1353
|
* @protected
|
|
@@ -1334,7 +1394,7 @@ declare class CornerHeader extends BaseHeader<CornerHeaderConfig> {
|
|
|
1334
1394
|
protected clip(): void;
|
|
1335
1395
|
}
|
|
1336
1396
|
|
|
1337
|
-
declare type CornerHeaderCallback = (parent:
|
|
1397
|
+
declare type CornerHeaderCallback = (parent: S2CellType_2, spreadsheet: SpreadSheet_2, ...restOptions: unknown[]) => void;
|
|
1338
1398
|
|
|
1339
1399
|
declare interface CornerHeaderConfig extends BaseHeaderConfig {
|
|
1340
1400
|
hierarchyType: S2Options_2['hierarchyType'];
|
|
@@ -1383,16 +1443,14 @@ declare type Data_2 = Record<string, DataItem>;
|
|
|
1383
1443
|
* |interval text| icon |
|
|
1384
1444
|
* | | |
|
|
1385
1445
|
* ----------------------------
|
|
1386
|
-
* There are four conditions(
|
|
1446
|
+
* There are four conditions({@see BaseCell.conditions}) to determine how to render
|
|
1387
1447
|
* 1、background color
|
|
1388
1448
|
* 2、icon align in right with size {@link ICON_SIZE}
|
|
1389
1449
|
* 3、left rect area is interval(in left) and text(in right)
|
|
1390
1450
|
*/
|
|
1391
1451
|
declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
1392
|
-
protected conditions: Conditions;
|
|
1393
|
-
protected conditionIntervalShape: IShape;
|
|
1394
|
-
protected conditionIconShape: GuiIcon;
|
|
1395
1452
|
get cellType(): CellTypes;
|
|
1453
|
+
get valueRangeByField(): ValueRange;
|
|
1396
1454
|
protected handleByStateName(cells: CellMeta_2[], stateName: InteractionStateName): void;
|
|
1397
1455
|
protected handleSearchResult(cells: CellMeta_2[]): void;
|
|
1398
1456
|
protected handleSelect(cells: CellMeta_2[]): void;
|
|
@@ -1400,20 +1458,27 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
|
1400
1458
|
update(): void;
|
|
1401
1459
|
setMeta(viewMeta: ViewMeta_2): void;
|
|
1402
1460
|
protected initCell(): void;
|
|
1461
|
+
/**
|
|
1462
|
+
* 获取默认字体颜色:根据字段标记背景颜色,设置字体颜色
|
|
1463
|
+
* @param textStyle
|
|
1464
|
+
* @private
|
|
1465
|
+
*/
|
|
1466
|
+
private getDefaultTextFill;
|
|
1403
1467
|
protected getTextStyle(): TextTheme;
|
|
1404
1468
|
getIconStyle(): IconCfg | undefined;
|
|
1469
|
+
protected drawConditionIntervalShape(): void;
|
|
1470
|
+
protected shouldHideRowSubtotalData(): boolean;
|
|
1405
1471
|
protected getFormattedFieldValue(): FormatResult;
|
|
1406
1472
|
protected getMaxTextWidth(): number;
|
|
1407
1473
|
protected getTextPosition(): Point;
|
|
1408
|
-
protected drawConditionIconShapes(): void;
|
|
1409
|
-
/**
|
|
1410
|
-
* Draw interval condition shape
|
|
1411
|
-
* @protected
|
|
1412
|
-
*/
|
|
1413
|
-
protected drawConditionIntervalShape(): void;
|
|
1414
1474
|
getBackgroundColor(): {
|
|
1415
1475
|
backgroundColor: string;
|
|
1416
1476
|
backgroundColorOpacity: number;
|
|
1477
|
+
intelligentReverseTextColor?: undefined;
|
|
1478
|
+
} | {
|
|
1479
|
+
backgroundColor: string;
|
|
1480
|
+
backgroundColorOpacity: number;
|
|
1481
|
+
intelligentReverseTextColor: boolean;
|
|
1417
1482
|
};
|
|
1418
1483
|
/**
|
|
1419
1484
|
* Draw cell background
|
|
@@ -1437,18 +1502,19 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
|
1437
1502
|
* Find current field related condition
|
|
1438
1503
|
* @param conditions
|
|
1439
1504
|
*/
|
|
1440
|
-
|
|
1505
|
+
findFieldCondition(conditions: Condition[]): Condition;
|
|
1441
1506
|
/**
|
|
1442
1507
|
* Mapping value to get condition related attrs
|
|
1443
1508
|
* @param condition
|
|
1444
1509
|
*/
|
|
1445
|
-
|
|
1510
|
+
mappingValue(condition: Condition): MappingResult;
|
|
1446
1511
|
updateByState(stateName: InteractionStateName): void;
|
|
1447
1512
|
clearUnselectedState(): void;
|
|
1513
|
+
private toggleConditionIntervalShapeOpacity;
|
|
1448
1514
|
protected drawLeftBorder(): void;
|
|
1449
1515
|
}
|
|
1450
1516
|
|
|
1451
|
-
declare type DataCellCallback = (viewMeta: ViewMeta_2) =>
|
|
1517
|
+
declare type DataCellCallback = (viewMeta: ViewMeta_2) => S2CellType_2;
|
|
1452
1518
|
|
|
1453
1519
|
declare type DataItem = SimpleDataItem | MultiData;
|
|
1454
1520
|
|
|
@@ -1494,6 +1560,7 @@ declare interface EmitterType {
|
|
|
1494
1560
|
/** ================ Cell ================ */
|
|
1495
1561
|
[S2Event.GLOBAL_LINK_FIELD_JUMP]: (data: {
|
|
1496
1562
|
key: string;
|
|
1563
|
+
cellData: Node_2_2;
|
|
1497
1564
|
record: Data_2;
|
|
1498
1565
|
}) => void;
|
|
1499
1566
|
/** ================ Date Cell ================ */
|
|
@@ -1505,7 +1572,7 @@ declare interface EmitterType {
|
|
|
1505
1572
|
[S2Event.DATA_CELL_DOUBLE_CLICK]: CanvasEventHandler;
|
|
1506
1573
|
[S2Event.DATA_CELL_CONTEXT_MENU]: CanvasEventHandler;
|
|
1507
1574
|
[S2Event.DATA_CELL_TREND_ICON_CLICK]: (data: ViewMeta_2) => void;
|
|
1508
|
-
[S2Event.DATA_CELL_BRUSH_SELECTION]: (cells: DataCell_2[]) => void;
|
|
1575
|
+
[S2Event.DATA_CELL_BRUSH_SELECTION]: (cells: (DataCell_2 | CellMeta_2)[]) => void;
|
|
1509
1576
|
[S2Event.DATA_CELL_SELECT_MOVE]: (metas: CellMeta_2[]) => void;
|
|
1510
1577
|
/** ================ Row Cell ================ */
|
|
1511
1578
|
[S2Event.ROW_CELL_MOUSE_DOWN]: CanvasEventHandler;
|
|
@@ -1554,6 +1621,11 @@ declare interface EmitterType {
|
|
|
1554
1621
|
current: number;
|
|
1555
1622
|
}) => void;
|
|
1556
1623
|
[S2Event.LAYOUT_AFTER_HEADER_LAYOUT]: (data: LayoutResult_2) => void;
|
|
1624
|
+
[S2Event.LAYOUT_AFTER_REAL_DATA_CELL_RENDER]: (options: {
|
|
1625
|
+
add: [number, number][];
|
|
1626
|
+
remove: [number, number][];
|
|
1627
|
+
spreadsheet: SpreadSheet_2;
|
|
1628
|
+
}) => void;
|
|
1557
1629
|
/** @deprecated 请使用 S2Event.GLOBAL_SCROLL 代替 */
|
|
1558
1630
|
[S2Event.LAYOUT_CELL_SCROLL]: (position: CellScrollPosition_2) => void;
|
|
1559
1631
|
[S2Event.LAYOUT_COLS_EXPANDED]: (expandedNode: Node_2_2) => void;
|
|
@@ -1635,7 +1707,7 @@ declare interface EventListenerReturn {
|
|
|
1635
1707
|
declare interface Fields {
|
|
1636
1708
|
rows?: string[];
|
|
1637
1709
|
customTreeItems?: CustomTreeItem[];
|
|
1638
|
-
columns?:
|
|
1710
|
+
columns?: Columns;
|
|
1639
1711
|
values?: string[];
|
|
1640
1712
|
valueInCols?: boolean;
|
|
1641
1713
|
customValueOrder?: number;
|
|
@@ -1791,6 +1863,7 @@ declare abstract class HeaderCell extends BaseCell<Node_2_2> {
|
|
|
1791
1863
|
protected treeLeafNodeAlignDot: IShape | undefined;
|
|
1792
1864
|
protected actionIcons: GuiIcon[];
|
|
1793
1865
|
protected hasDefaultHiddenIcon: boolean;
|
|
1866
|
+
protected abstract isBolderText(): boolean;
|
|
1794
1867
|
protected handleRestOptions(...[headerConfig]: [BaseHeaderConfig]): void;
|
|
1795
1868
|
protected initCell(): void;
|
|
1796
1869
|
protected getInteractiveBorderShapeStyle(border: number): {
|
|
@@ -1811,16 +1884,24 @@ declare abstract class HeaderCell extends BaseCell<Node_2_2> {
|
|
|
1811
1884
|
protected hasDefaultHideActionIcon(): boolean;
|
|
1812
1885
|
protected addActionIcon(options: HeaderActionIconOptions): void;
|
|
1813
1886
|
protected drawActionIcons(): void;
|
|
1887
|
+
protected drawBackgroundShape(): void;
|
|
1814
1888
|
protected isSortCell(): boolean;
|
|
1815
1889
|
protected handleByStateName(cells: CellMeta_2[], stateName: InteractionStateName): void;
|
|
1816
1890
|
protected handleSearchResult(cells: CellMeta_2[]): void;
|
|
1817
1891
|
protected handleHover(cells: CellMeta_2[]): void;
|
|
1818
1892
|
protected handleSelect(cells: CellMeta_2[], nodes: Node_2_2[]): void;
|
|
1893
|
+
protected getTextStyle(): TextTheme;
|
|
1894
|
+
getBackgroundColor(): {
|
|
1895
|
+
backgroundColor: string;
|
|
1896
|
+
backgroundColorOpacity: number;
|
|
1897
|
+
};
|
|
1819
1898
|
toggleActionIcon(id: string): void;
|
|
1820
1899
|
update(): void;
|
|
1821
1900
|
updateByState(stateName: InteractionStateName): void;
|
|
1822
1901
|
hideInteractionShape(): void;
|
|
1823
1902
|
isMeasureField(): boolean;
|
|
1903
|
+
mappingValue(condition: Condition): MappingResult;
|
|
1904
|
+
findFieldCondition(conditions: Condition[]): Condition;
|
|
1824
1905
|
}
|
|
1825
1906
|
|
|
1826
1907
|
declare interface HeaderIconClickParams {
|
|
@@ -1929,7 +2010,7 @@ declare type InteractionState = {
|
|
|
1929
2010
|
declare interface InteractionStateInfo {
|
|
1930
2011
|
stateName?: InteractionStateName;
|
|
1931
2012
|
cells?: CellMeta_2[];
|
|
1932
|
-
interactedCells?:
|
|
2013
|
+
interactedCells?: S2CellType_2[];
|
|
1933
2014
|
nodes?: Node_2_2[];
|
|
1934
2015
|
force?: boolean;
|
|
1935
2016
|
/** 交互行为改变后,会被更新和重绘的单元格回调 */
|
|
@@ -1969,6 +2050,11 @@ declare enum InterceptType {
|
|
|
1969
2050
|
RESIZE = "resize"
|
|
1970
2051
|
}
|
|
1971
2052
|
|
|
2053
|
+
declare interface IntervalTheme {
|
|
2054
|
+
height: number;
|
|
2055
|
+
fill: string;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
1972
2058
|
declare type IsEmitKey<Type> = Exclude<Type, undefined> extends (...args: any) => any ? true : false;
|
|
1973
2059
|
|
|
1974
2060
|
declare type KeyboardEventHandler = (event: KeyboardEvent) => void;
|
|
@@ -2032,12 +2118,6 @@ declare interface LineTheme {
|
|
|
2032
2118
|
};
|
|
2033
2119
|
}
|
|
2034
2120
|
|
|
2035
|
-
declare type ListItem = {
|
|
2036
|
-
name: string;
|
|
2037
|
-
value: string | number;
|
|
2038
|
-
icon?: Element | string;
|
|
2039
|
-
};
|
|
2040
|
-
|
|
2041
2121
|
declare type MappingDataItemCallback = (valueField: string, data: DataItem) => Record<string, string | number> | DataItem;
|
|
2042
2122
|
|
|
2043
2123
|
declare type MappingFunction = (fieldValue: number | string, data: Record<string, any>) => MappingResult;
|
|
@@ -2046,6 +2126,11 @@ declare interface MappingResult extends ValueRange {
|
|
|
2046
2126
|
icon?: string;
|
|
2047
2127
|
fill: string;
|
|
2048
2128
|
isCompare?: boolean;
|
|
2129
|
+
/**
|
|
2130
|
+
* @description only used in background condition, when the background color is too light, the font color will be white
|
|
2131
|
+
* @version 1.34.0
|
|
2132
|
+
*/
|
|
2133
|
+
intelligentReverseTextColor?: boolean;
|
|
2049
2134
|
}
|
|
2050
2135
|
|
|
2051
2136
|
declare type Margin = Padding;
|
|
@@ -2054,9 +2139,9 @@ declare type Margin = Padding;
|
|
|
2054
2139
|
* Cell for panelGroup area
|
|
2055
2140
|
*/
|
|
2056
2141
|
declare class MergedCell extends DataCell_2 {
|
|
2057
|
-
cells:
|
|
2058
|
-
constructor(spreadsheet: SpreadSheet_2, cells:
|
|
2059
|
-
handleRestOptions(...[cells]: [
|
|
2142
|
+
cells: S2CellType_2[];
|
|
2143
|
+
constructor(spreadsheet: SpreadSheet_2, cells: S2CellType_2[], meta?: ViewMeta_2);
|
|
2144
|
+
handleRestOptions(...[cells]: [S2CellType_2[]]): void;
|
|
2060
2145
|
get cellType(): CellTypes;
|
|
2061
2146
|
update(): void;
|
|
2062
2147
|
protected initCell(): void;
|
|
@@ -2092,6 +2177,7 @@ declare interface MiniChartTheme {
|
|
|
2092
2177
|
line?: LineTheme;
|
|
2093
2178
|
bar?: BarTheme;
|
|
2094
2179
|
bullet?: BulletTheme;
|
|
2180
|
+
interval?: IntervalTheme;
|
|
2095
2181
|
}
|
|
2096
2182
|
|
|
2097
2183
|
/** mini 图类型 */
|
|
@@ -2198,7 +2284,7 @@ declare class Node_2_2 {
|
|
|
2198
2284
|
field: string;
|
|
2199
2285
|
spreadsheet: SpreadSheet_2;
|
|
2200
2286
|
query?: Record<string, any>;
|
|
2201
|
-
belongsCell?:
|
|
2287
|
+
belongsCell?: S2CellType_2;
|
|
2202
2288
|
inCollapseNode?: boolean;
|
|
2203
2289
|
cornerType?: CornerNodeType;
|
|
2204
2290
|
isGrandTotals?: boolean;
|
|
@@ -2206,6 +2292,7 @@ declare class Node_2_2 {
|
|
|
2206
2292
|
[key: string]: any;
|
|
2207
2293
|
static rootNode(): Node_2_2;
|
|
2208
2294
|
toJSON(): Omit_2<this, "spreadsheet" | "config" | "parent" | "hierarchy">;
|
|
2295
|
+
getHeadLeafChild(): Node_2_2;
|
|
2209
2296
|
}
|
|
2210
2297
|
|
|
2211
2298
|
declare interface OffsetConfig {
|
|
@@ -2328,11 +2415,12 @@ default: Adaptive;
|
|
|
2328
2415
|
};
|
|
2329
2416
|
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: SheetComponentOptions) => SpreadSheet>;
|
|
2330
2417
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
2418
|
+
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
2331
2419
|
}, {
|
|
2332
2420
|
s2Ref: ShallowRef<SheetExpose>;
|
|
2333
|
-
options: S2Options<TooltipContentType, Pagination>;
|
|
2421
|
+
options: S2Options<TooltipContentType, Pagination, string | Element, string>;
|
|
2334
2422
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2335
|
-
spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => SpreadSheet;
|
|
2423
|
+
spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => SpreadSheet;
|
|
2336
2424
|
getSpreadSheet: (spreadsheet: SpreadSheet) => void;
|
|
2337
2425
|
sheetUpdate: SheetUpdateCallback;
|
|
2338
2426
|
rowCellHover: (data: TargetCellInfo) => void;
|
|
@@ -2404,6 +2492,7 @@ hiddenColumnsDetail: HiddenColumnsInfo[];
|
|
|
2404
2492
|
}) => void;
|
|
2405
2493
|
beforeRender: () => void;
|
|
2406
2494
|
afterRender: () => void;
|
|
2495
|
+
mounted: (spreadsheet: SpreadSheet) => void;
|
|
2407
2496
|
destroy: () => void;
|
|
2408
2497
|
layoutResize: (params: ResizeParams) => void;
|
|
2409
2498
|
layoutResizeSeriesWidth: (params: ResizeParams) => void;
|
|
@@ -2438,13 +2527,18 @@ mouseHover: (event: default_2) => void;
|
|
|
2438
2527
|
mouseUp: (event: MouseEvent) => void;
|
|
2439
2528
|
mouseDown: (event: MouseEvent) => void;
|
|
2440
2529
|
mouseMove: (event: MouseEvent) => void;
|
|
2441
|
-
selected: (cells:
|
|
2530
|
+
selected: (cells: S2CellType<ViewMeta>[]) => void;
|
|
2442
2531
|
reset: (event: KeyboardEvent) => void;
|
|
2443
2532
|
linkFieldJump: (data: {
|
|
2444
2533
|
key: string;
|
|
2445
2534
|
record: Data;
|
|
2446
2535
|
}) => void;
|
|
2447
2536
|
scroll: (position: CellScrollPosition) => void;
|
|
2537
|
+
layoutAfterRealDataCellRender: (options: {
|
|
2538
|
+
add: [number, number][];
|
|
2539
|
+
remove: [number, number][];
|
|
2540
|
+
spreadsheet: SpreadSheet;
|
|
2541
|
+
}) => void;
|
|
2448
2542
|
rowCellBrushSelection: (event: default_2) => void;
|
|
2449
2543
|
colCellBrushSelection: (event: default_2) => void;
|
|
2450
2544
|
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
|
|
@@ -2474,7 +2568,9 @@ default: Adaptive;
|
|
|
2474
2568
|
};
|
|
2475
2569
|
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: SheetComponentOptions) => SpreadSheet>;
|
|
2476
2570
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
2571
|
+
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
2477
2572
|
}>> & {
|
|
2573
|
+
onMounted?: (spreadsheet: SpreadSheet) => any;
|
|
2478
2574
|
onSheetUpdate?: (params: S2RenderOptions) => any;
|
|
2479
2575
|
onRowCellHover?: (data: TargetCellInfo) => any;
|
|
2480
2576
|
onRowCellClick?: (data: TargetCellInfo) => any;
|
|
@@ -2579,16 +2675,21 @@ onMouseHover?: (event: default_2) => any;
|
|
|
2579
2675
|
onMouseUp?: (event: MouseEvent) => any;
|
|
2580
2676
|
onMouseDown?: (event: MouseEvent) => any;
|
|
2581
2677
|
onMouseMove?: (event: MouseEvent) => any;
|
|
2582
|
-
onSelected?: (cells:
|
|
2678
|
+
onSelected?: (cells: S2CellType<ViewMeta>[]) => any;
|
|
2583
2679
|
onReset?: (event: KeyboardEvent) => any;
|
|
2584
2680
|
onLinkFieldJump?: (data: {
|
|
2585
2681
|
key: string;
|
|
2586
2682
|
record: Data;
|
|
2587
2683
|
}) => any;
|
|
2588
2684
|
onScroll?: (position: CellScrollPosition) => any;
|
|
2685
|
+
onLayoutAfterRealDataCellRender?: (options: {
|
|
2686
|
+
add: [number, number][];
|
|
2687
|
+
remove: [number, number][];
|
|
2688
|
+
spreadsheet: SpreadSheet;
|
|
2689
|
+
}) => any;
|
|
2589
2690
|
onRowCellBrushSelection?: (event: default_2) => any;
|
|
2590
2691
|
onColCellBrushSelection?: (event: default_2) => any;
|
|
2591
|
-
onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination>) => any;
|
|
2692
|
+
onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, string | Element, string>) => any;
|
|
2592
2693
|
onGetSpreadSheet?: (spreadsheet: SpreadSheet) => any;
|
|
2593
2694
|
}, {
|
|
2594
2695
|
options: SheetComponentOptions;
|
|
@@ -2681,7 +2782,7 @@ declare interface ResizeInteractionOptions {
|
|
|
2681
2782
|
colCellVertical?: boolean;
|
|
2682
2783
|
rowResizeType?: ResizeType;
|
|
2683
2784
|
disable?: (resizeInfo: ResizeInfo_2) => boolean;
|
|
2684
|
-
visible?: (cell:
|
|
2785
|
+
visible?: (cell: S2CellType_2) => boolean;
|
|
2685
2786
|
}
|
|
2686
2787
|
|
|
2687
2788
|
declare interface ResizeParams_2 {
|
|
@@ -2707,8 +2808,8 @@ declare class RootInteraction {
|
|
|
2707
2808
|
private onTriggerInteractionsResetEffect;
|
|
2708
2809
|
setState(interactionStateInfo: InteractionStateInfo): void;
|
|
2709
2810
|
getState(): InteractionStateInfo;
|
|
2710
|
-
setInteractedCells(cell:
|
|
2711
|
-
getInteractedCells():
|
|
2811
|
+
setInteractedCells(cell: S2CellType_2): void;
|
|
2812
|
+
getInteractedCells(): S2CellType_2<ViewMeta_2>[];
|
|
2712
2813
|
resetState(): void;
|
|
2713
2814
|
getCurrentStateName(): InteractionStateName;
|
|
2714
2815
|
isEqualStateName(stateName: InteractionStateName): boolean;
|
|
@@ -2717,19 +2818,19 @@ declare class RootInteraction {
|
|
|
2717
2818
|
isAllSelectedState(): boolean;
|
|
2718
2819
|
isHoverFocusState(): boolean;
|
|
2719
2820
|
isHoverState(): boolean;
|
|
2720
|
-
isActiveCell(cell:
|
|
2721
|
-
isSelectedCell(cell:
|
|
2821
|
+
isActiveCell(cell: S2CellType_2): boolean;
|
|
2822
|
+
isSelectedCell(cell: S2CellType_2): boolean;
|
|
2722
2823
|
getCells(): CellMeta_2[];
|
|
2723
|
-
getActiveCells():
|
|
2824
|
+
getActiveCells(): S2CellType_2[];
|
|
2724
2825
|
clearStyleIndependent(): void;
|
|
2725
2826
|
getPanelGroupAllUnSelectedDataCells(): DataCell_2[];
|
|
2726
2827
|
getPanelGroupAllDataCells(): DataCell_2[];
|
|
2727
2828
|
getAllRowHeaderCells(): RowCell[];
|
|
2728
2829
|
getAllColHeaderCells(): ColCell[];
|
|
2729
|
-
getRowColActiveCells(ids: string[]):
|
|
2730
|
-
getAllCells():
|
|
2830
|
+
getRowColActiveCells(ids: string[]): S2CellType_2<ViewMeta_2>[];
|
|
2831
|
+
getAllCells(): S2CellType_2<ViewMeta_2>[];
|
|
2731
2832
|
selectAll: () => void;
|
|
2732
|
-
getCellChildrenNodes: (cell:
|
|
2833
|
+
getCellChildrenNodes: (cell: S2CellType_2) => Node_2_2[];
|
|
2733
2834
|
selectHeaderCell: (selectHeaderCellInfo?: SelectHeaderCellInfo) => boolean;
|
|
2734
2835
|
highlightNodes: (nodes?: Node_2_2[]) => void;
|
|
2735
2836
|
mergeCells: (cellsInfo?: MergedCellInfo[], hideData?: boolean) => void;
|
|
@@ -2743,7 +2844,7 @@ declare class RootInteraction {
|
|
|
2743
2844
|
clearState(): void;
|
|
2744
2845
|
changeState(interactionStateInfo: InteractionStateInfo): void;
|
|
2745
2846
|
updatePanelGroupAllDataCells(): void;
|
|
2746
|
-
updateCells(cells?:
|
|
2847
|
+
updateCells(cells?: S2CellType_2[]): void;
|
|
2747
2848
|
addIntercepts(interceptTypes?: InterceptType[]): void;
|
|
2748
2849
|
hasIntercepts(interceptTypes?: InterceptType[]): boolean;
|
|
2749
2850
|
removeIntercepts(interceptTypes?: InterceptType[]): void;
|
|
@@ -2758,7 +2859,6 @@ declare class RowCell extends HeaderCell {
|
|
|
2758
2859
|
get cellType(): CellTypes;
|
|
2759
2860
|
destroy(): void;
|
|
2760
2861
|
protected initCell(): void;
|
|
2761
|
-
protected drawBackgroundShape(): void;
|
|
2762
2862
|
/**
|
|
2763
2863
|
* 绘制hover悬停,刷选的外框
|
|
2764
2864
|
*/
|
|
@@ -2769,6 +2869,7 @@ declare class RowCell extends HeaderCell {
|
|
|
2769
2869
|
protected getParentTreeIconCfg(): any;
|
|
2770
2870
|
protected drawTreeIcon(): void;
|
|
2771
2871
|
protected drawTreeLeafNodeAlignDot(): void;
|
|
2872
|
+
protected isBolderText(): boolean;
|
|
2772
2873
|
protected drawTextShape(): void;
|
|
2773
2874
|
protected drawLinkFieldShape(): void;
|
|
2774
2875
|
protected drawRectBorder(): void;
|
|
@@ -2776,8 +2877,6 @@ declare class RowCell extends HeaderCell {
|
|
|
2776
2877
|
protected getContentIndent(): number;
|
|
2777
2878
|
protected getTextIndent(): number;
|
|
2778
2879
|
protected isTreeLevel(): any;
|
|
2779
|
-
protected isBolderText(): boolean;
|
|
2780
|
-
protected getTextStyle(): TextTheme;
|
|
2781
2880
|
protected getIconPosition(): {
|
|
2782
2881
|
x: any;
|
|
2783
2882
|
y: any;
|
|
@@ -2827,14 +2926,14 @@ declare interface RowHeaderConfig extends BaseHeaderConfig {
|
|
|
2827
2926
|
seriesNumberWidth: number;
|
|
2828
2927
|
}
|
|
2829
2928
|
|
|
2830
|
-
declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2> {
|
|
2929
|
+
declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Icon = Element | string, Text = string> {
|
|
2831
2930
|
width?: number;
|
|
2832
2931
|
height?: number;
|
|
2833
2932
|
debug?: boolean;
|
|
2834
2933
|
hierarchyType?: 'grid' | 'tree' | 'customTree';
|
|
2835
2934
|
conditions?: Conditions;
|
|
2836
2935
|
totals?: Totals;
|
|
2837
|
-
tooltip?: Tooltip<T>;
|
|
2936
|
+
tooltip?: Tooltip<T, Icon, Text>;
|
|
2838
2937
|
interaction?: InteractionOptions;
|
|
2839
2938
|
pagination?: P;
|
|
2840
2939
|
frozenRowHeader?: boolean;
|
|
@@ -2867,7 +2966,7 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2> {
|
|
|
2867
2966
|
mappingDisplayDataItem?: MappingDataItemCallback;
|
|
2868
2967
|
}
|
|
2869
2968
|
|
|
2870
|
-
declare type
|
|
2969
|
+
declare type S2CellType_2<T extends SimpleBBox = ViewMeta_2> = DataCell_2 | HeaderCell | ColCell | CornerCell | RowCell | MergedCell | BaseCell<T>;
|
|
2871
2970
|
|
|
2872
2971
|
declare interface S2DataConfig_2 {
|
|
2873
2972
|
data: Data_2[];
|
|
@@ -2940,6 +3039,7 @@ declare enum S2Event {
|
|
|
2940
3039
|
LAYOUT_PAGINATION = "layout:pagination",
|
|
2941
3040
|
LAYOUT_COLLAPSE_ROWS = "layout:collapsed-rows",
|
|
2942
3041
|
LAYOUT_AFTER_COLLAPSE_ROWS = "layout:after-collapsed-rows",
|
|
3042
|
+
LAYOUT_AFTER_REAL_DATA_CELL_RENDER = "layout:after-real-data-cell-render",
|
|
2943
3043
|
LAYOUT_TREE_ROWS_COLLAPSE_ALL = "layout:toggle-collapse-all",
|
|
2944
3044
|
LAYOUT_COLS_EXPANDED = "layout:table-col-expanded",
|
|
2945
3045
|
LAYOUT_COLS_HIDDEN = "layout:table-col-hidden",
|
|
@@ -2983,7 +3083,7 @@ declare interface S2EventHandler {
|
|
|
2983
3083
|
|
|
2984
3084
|
declare type S2MountContainer_2 = string | Element;
|
|
2985
3085
|
|
|
2986
|
-
declare interface S2Options_2<T = TooltipContentType_2, P = Pagination_2> extends S2BasicOptions<T, P>, S2TableSheetOptions, S2PivotSheetOptions {
|
|
3086
|
+
declare interface S2Options_2<T = TooltipContentType_2, P = Pagination_2, Icon = Element | string, Text = string> extends S2BasicOptions<T, P, Icon, Text>, S2TableSheetOptions, S2PivotSheetOptions {
|
|
2987
3087
|
dataSet?: (spreadsheet: SpreadSheet_2) => BaseDataSet_2;
|
|
2988
3088
|
}
|
|
2989
3089
|
|
|
@@ -3016,7 +3116,6 @@ declare class ScrollBar extends Group {
|
|
|
3016
3116
|
trackLen: number;
|
|
3017
3117
|
thumbLen: number;
|
|
3018
3118
|
position: PointObject;
|
|
3019
|
-
minThumbLen: number;
|
|
3020
3119
|
thumbOffset: number;
|
|
3021
3120
|
scrollTargetMaxOffset: number;
|
|
3022
3121
|
theme: ScrollBarTheme;
|
|
@@ -3077,7 +3176,6 @@ declare interface ScrollBarCfg {
|
|
|
3077
3176
|
readonly trackLen: number;
|
|
3078
3177
|
readonly thumbLen: number;
|
|
3079
3178
|
readonly position: PointObject;
|
|
3080
|
-
readonly minThumbLen?: number;
|
|
3081
3179
|
readonly thumbOffset?: number;
|
|
3082
3180
|
readonly scrollTargetMaxOffset: number;
|
|
3083
3181
|
readonly theme?: ScrollBarTheme;
|
|
@@ -3092,6 +3190,8 @@ declare interface ScrollBarTheme {
|
|
|
3092
3190
|
trackColor?: string;
|
|
3093
3191
|
thumbHoverColor?: string;
|
|
3094
3192
|
thumbColor?: string;
|
|
3193
|
+
thumbHorizontalMinSize?: number;
|
|
3194
|
+
thumbVerticalMinSize?: number;
|
|
3095
3195
|
size?: number;
|
|
3096
3196
|
hoverSize?: number;
|
|
3097
3197
|
/** 指定如何绘制每一条线段末端,lineCap?: 'butt' | 'round' | 'square'; */
|
|
@@ -3109,10 +3209,10 @@ declare interface ScrollSpeedRatio {
|
|
|
3109
3209
|
vertical?: number;
|
|
3110
3210
|
}
|
|
3111
3211
|
|
|
3112
|
-
declare type SelectedHandler = (cells:
|
|
3212
|
+
declare type SelectedHandler = (cells: S2CellType_2[]) => void;
|
|
3113
3213
|
|
|
3114
3214
|
declare interface SelectHeaderCellInfo {
|
|
3115
|
-
cell:
|
|
3215
|
+
cell: S2CellType_2<ViewMeta_2>;
|
|
3116
3216
|
isMultiSelection?: boolean;
|
|
3117
3217
|
}
|
|
3118
3218
|
|
|
@@ -3139,7 +3239,7 @@ declare class SeriesNumberHeader extends BaseHeader<BaseHeaderConfig> {
|
|
|
3139
3239
|
private getTextPadding;
|
|
3140
3240
|
}
|
|
3141
3241
|
|
|
3142
|
-
export declare const SheetComponent: DefineComponent<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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">, {
|
|
3242
|
+
export declare const SheetComponent: DefineComponent<GetInitProps<SheetComponentProps, "onMounted" | "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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" | "onLayoutAfterRealDataCellRender" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
|
|
3143
3243
|
s2Ref: ShallowRef<SheetExpose>;
|
|
3144
3244
|
sheetType: ComputedRef<DefineComponent< {
|
|
3145
3245
|
sheetType: PropType<SheetType>;
|
|
@@ -3168,11 +3268,12 @@ default: Adaptive;
|
|
|
3168
3268
|
};
|
|
3169
3269
|
onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: SheetComponentOptions) => SpreadSheet_2>;
|
|
3170
3270
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
3271
|
+
onMounted: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
3171
3272
|
}, {
|
|
3172
3273
|
s2Ref: ShallowRef<SheetExpose>;
|
|
3173
|
-
options: S2Options_2<TooltipContentType_2, Pagination_2>;
|
|
3274
|
+
options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>;
|
|
3174
3275
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
3175
|
-
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
|
|
3276
|
+
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2;
|
|
3176
3277
|
getSpreadSheet: (spreadsheet: SpreadSheet_2) => void;
|
|
3177
3278
|
sheetUpdate: SheetUpdateCallback;
|
|
3178
3279
|
rowCellHover: (data: TargetCellInfo_2) => void;
|
|
@@ -3244,6 +3345,7 @@ hiddenColumnsDetail: HiddenColumnsInfo_2[];
|
|
|
3244
3345
|
}) => void;
|
|
3245
3346
|
beforeRender: () => void;
|
|
3246
3347
|
afterRender: () => void;
|
|
3348
|
+
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
3247
3349
|
destroy: () => void;
|
|
3248
3350
|
layoutResize: (params: ResizeParams_2) => void;
|
|
3249
3351
|
layoutResizeSeriesWidth: (params: ResizeParams_2) => void;
|
|
@@ -3278,13 +3380,18 @@ mouseHover: (event: default_2) => void;
|
|
|
3278
3380
|
mouseUp: (event: MouseEvent) => void;
|
|
3279
3381
|
mouseDown: (event: MouseEvent) => void;
|
|
3280
3382
|
mouseMove: (event: MouseEvent) => void;
|
|
3281
|
-
selected: (cells:
|
|
3383
|
+
selected: (cells: S2CellType_2<ViewMeta_2>[]) => void;
|
|
3282
3384
|
reset: (event: KeyboardEvent) => void;
|
|
3283
3385
|
linkFieldJump: (data: {
|
|
3284
3386
|
key: string;
|
|
3285
3387
|
record: Data_2;
|
|
3286
3388
|
}) => void;
|
|
3287
3389
|
scroll: (position: CellScrollPosition_2) => void;
|
|
3390
|
+
layoutAfterRealDataCellRender: (options: {
|
|
3391
|
+
add: [number, number][];
|
|
3392
|
+
remove: [number, number][];
|
|
3393
|
+
spreadsheet: SpreadSheet_2;
|
|
3394
|
+
}) => void;
|
|
3288
3395
|
rowCellBrushSelection: (event: default_2) => void;
|
|
3289
3396
|
colCellBrushSelection: (event: default_2) => void;
|
|
3290
3397
|
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
|
|
@@ -3314,7 +3421,9 @@ default: Adaptive;
|
|
|
3314
3421
|
};
|
|
3315
3422
|
onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: SheetComponentOptions) => SpreadSheet_2>;
|
|
3316
3423
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
3424
|
+
onMounted: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
3317
3425
|
}>> & {
|
|
3426
|
+
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
3318
3427
|
onSheetUpdate?: (params: S2RenderOptions_2) => any;
|
|
3319
3428
|
onRowCellHover?: (data: TargetCellInfo_2) => any;
|
|
3320
3429
|
onRowCellClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -3419,16 +3528,21 @@ onMouseHover?: (event: default_2) => any;
|
|
|
3419
3528
|
onMouseUp?: (event: MouseEvent) => any;
|
|
3420
3529
|
onMouseDown?: (event: MouseEvent) => any;
|
|
3421
3530
|
onMouseMove?: (event: MouseEvent) => any;
|
|
3422
|
-
onSelected?: (cells:
|
|
3531
|
+
onSelected?: (cells: S2CellType_2<ViewMeta_2>[]) => any;
|
|
3423
3532
|
onReset?: (event: KeyboardEvent) => any;
|
|
3424
3533
|
onLinkFieldJump?: (data: {
|
|
3425
3534
|
key: string;
|
|
3426
3535
|
record: Data_2;
|
|
3427
3536
|
}) => any;
|
|
3428
3537
|
onScroll?: (position: CellScrollPosition_2) => any;
|
|
3538
|
+
onLayoutAfterRealDataCellRender?: (options: {
|
|
3539
|
+
add: [number, number][];
|
|
3540
|
+
remove: [number, number][];
|
|
3541
|
+
spreadsheet: SpreadSheet_2;
|
|
3542
|
+
}) => any;
|
|
3429
3543
|
onRowCellBrushSelection?: (event: default_2) => any;
|
|
3430
3544
|
onColCellBrushSelection?: (event: default_2) => any;
|
|
3431
|
-
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => any;
|
|
3545
|
+
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => any;
|
|
3432
3546
|
onGetSpreadSheet?: (spreadsheet: SpreadSheet_2) => any;
|
|
3433
3547
|
}, {
|
|
3434
3548
|
options: SheetComponentOptions;
|
|
@@ -3442,10 +3556,10 @@ showPagination: boolean | {
|
|
|
3442
3556
|
onShowSizeChange?: (pageSize: number) => void;
|
|
3443
3557
|
onChange?: (current: number) => void;
|
|
3444
3558
|
};
|
|
3445
|
-
}> | DefineComponent<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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">, {
|
|
3559
|
+
}> | DefineComponent<GetInitProps<SheetComponentProps, "onMounted" | "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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" | "onLayoutAfterRealDataCellRender" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
|
|
3446
3560
|
s2Ref: ShallowRef<SheetExpose>;
|
|
3447
3561
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
3448
|
-
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
|
|
3562
|
+
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2;
|
|
3449
3563
|
getSpreadSheet: (spreadsheet: SpreadSheet_2) => void;
|
|
3450
3564
|
sheetUpdate: SheetUpdateCallback;
|
|
3451
3565
|
rowCellHover: (data: TargetCellInfo_2) => void;
|
|
@@ -3517,6 +3631,7 @@ hiddenColumnsDetail: HiddenColumnsInfo_2[];
|
|
|
3517
3631
|
}) => void;
|
|
3518
3632
|
beforeRender: () => void;
|
|
3519
3633
|
afterRender: () => void;
|
|
3634
|
+
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
3520
3635
|
destroy: () => void;
|
|
3521
3636
|
layoutResize: (params: ResizeParams_2) => void;
|
|
3522
3637
|
layoutResizeSeriesWidth: (params: ResizeParams_2) => void;
|
|
@@ -3551,16 +3666,22 @@ mouseHover: (event: default_2) => void;
|
|
|
3551
3666
|
mouseUp: (event: MouseEvent) => void;
|
|
3552
3667
|
mouseDown: (event: MouseEvent) => void;
|
|
3553
3668
|
mouseMove: (event: MouseEvent) => void;
|
|
3554
|
-
selected: (cells:
|
|
3669
|
+
selected: (cells: S2CellType_2<ViewMeta_2>[]) => void;
|
|
3555
3670
|
reset: (event: KeyboardEvent) => void;
|
|
3556
3671
|
linkFieldJump: (data: {
|
|
3557
3672
|
key: string;
|
|
3558
3673
|
record: Data_2;
|
|
3559
3674
|
}) => void;
|
|
3560
3675
|
scroll: (position: CellScrollPosition_2) => void;
|
|
3676
|
+
layoutAfterRealDataCellRender: (options: {
|
|
3677
|
+
add: [number, number][];
|
|
3678
|
+
remove: [number, number][];
|
|
3679
|
+
spreadsheet: SpreadSheet_2;
|
|
3680
|
+
}) => void;
|
|
3561
3681
|
rowCellBrushSelection: (event: default_2) => void;
|
|
3562
3682
|
colCellBrushSelection: (event: default_2) => void;
|
|
3563
|
-
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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">>> & {
|
|
3683
|
+
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<GetInitProps<SheetComponentProps, "onMounted" | "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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" | "onLayoutAfterRealDataCellRender" | "onRowCellBrushSelection" | "onColCellBrushSelection">>> & {
|
|
3684
|
+
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
3564
3685
|
onSheetUpdate?: (params: S2RenderOptions_2) => any;
|
|
3565
3686
|
onRowCellHover?: (data: TargetCellInfo_2) => any;
|
|
3566
3687
|
onRowCellClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -3665,20 +3786,25 @@ onMouseHover?: (event: default_2) => any;
|
|
|
3665
3786
|
onMouseUp?: (event: MouseEvent) => any;
|
|
3666
3787
|
onMouseDown?: (event: MouseEvent) => any;
|
|
3667
3788
|
onMouseMove?: (event: MouseEvent) => any;
|
|
3668
|
-
onSelected?: (cells:
|
|
3789
|
+
onSelected?: (cells: S2CellType_2<ViewMeta_2>[]) => any;
|
|
3669
3790
|
onReset?: (event: KeyboardEvent) => any;
|
|
3670
3791
|
onLinkFieldJump?: (data: {
|
|
3671
3792
|
key: string;
|
|
3672
3793
|
record: Data_2;
|
|
3673
3794
|
}) => any;
|
|
3674
3795
|
onScroll?: (position: CellScrollPosition_2) => any;
|
|
3796
|
+
onLayoutAfterRealDataCellRender?: (options: {
|
|
3797
|
+
add: [number, number][];
|
|
3798
|
+
remove: [number, number][];
|
|
3799
|
+
spreadsheet: SpreadSheet_2;
|
|
3800
|
+
}) => any;
|
|
3675
3801
|
onRowCellBrushSelection?: (event: default_2) => any;
|
|
3676
3802
|
onColCellBrushSelection?: (event: default_2) => any;
|
|
3677
|
-
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => any;
|
|
3803
|
+
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => any;
|
|
3678
3804
|
onGetSpreadSheet?: (spreadsheet: SpreadSheet_2) => any;
|
|
3679
3805
|
}, {}>>;
|
|
3680
3806
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
3681
|
-
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
|
|
3807
|
+
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2;
|
|
3682
3808
|
getSpreadSheet: (spreadsheet: SpreadSheet_2) => void;
|
|
3683
3809
|
sheetUpdate: SheetUpdateCallback;
|
|
3684
3810
|
rowCellHover: (data: TargetCellInfo_2) => void;
|
|
@@ -3750,6 +3876,7 @@ hiddenColumnsDetail: HiddenColumnsInfo_2[];
|
|
|
3750
3876
|
}) => void;
|
|
3751
3877
|
beforeRender: () => void;
|
|
3752
3878
|
afterRender: () => void;
|
|
3879
|
+
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
3753
3880
|
destroy: () => void;
|
|
3754
3881
|
layoutResize: (params: ResizeParams_2) => void;
|
|
3755
3882
|
layoutResizeSeriesWidth: (params: ResizeParams_2) => void;
|
|
@@ -3784,16 +3911,22 @@ mouseHover: (event: default_2) => void;
|
|
|
3784
3911
|
mouseUp: (event: MouseEvent) => void;
|
|
3785
3912
|
mouseDown: (event: MouseEvent) => void;
|
|
3786
3913
|
mouseMove: (event: MouseEvent) => void;
|
|
3787
|
-
selected: (cells:
|
|
3914
|
+
selected: (cells: S2CellType_2<ViewMeta_2>[]) => void;
|
|
3788
3915
|
reset: (event: KeyboardEvent) => void;
|
|
3789
3916
|
linkFieldJump: (data: {
|
|
3790
3917
|
key: string;
|
|
3791
3918
|
record: Data_2;
|
|
3792
3919
|
}) => void;
|
|
3793
3920
|
scroll: (position: CellScrollPosition_2) => void;
|
|
3921
|
+
layoutAfterRealDataCellRender: (options: {
|
|
3922
|
+
add: [number, number][];
|
|
3923
|
+
remove: [number, number][];
|
|
3924
|
+
spreadsheet: SpreadSheet_2;
|
|
3925
|
+
}) => void;
|
|
3794
3926
|
rowCellBrushSelection: (event: default_2) => void;
|
|
3795
3927
|
colCellBrushSelection: (event: default_2) => void;
|
|
3796
|
-
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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">>> & {
|
|
3928
|
+
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<GetInitProps<SheetComponentProps, "onMounted" | "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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" | "onLayoutAfterRealDataCellRender" | "onRowCellBrushSelection" | "onColCellBrushSelection">>> & {
|
|
3929
|
+
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
3797
3930
|
onSheetUpdate?: (params: S2RenderOptions_2) => any;
|
|
3798
3931
|
onRowCellHover?: (data: TargetCellInfo_2) => any;
|
|
3799
3932
|
onRowCellClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -3898,16 +4031,21 @@ onMouseHover?: (event: default_2) => any;
|
|
|
3898
4031
|
onMouseUp?: (event: MouseEvent) => any;
|
|
3899
4032
|
onMouseDown?: (event: MouseEvent) => any;
|
|
3900
4033
|
onMouseMove?: (event: MouseEvent) => any;
|
|
3901
|
-
onSelected?: (cells:
|
|
4034
|
+
onSelected?: (cells: S2CellType_2<ViewMeta_2>[]) => any;
|
|
3902
4035
|
onReset?: (event: KeyboardEvent) => any;
|
|
3903
4036
|
onLinkFieldJump?: (data: {
|
|
3904
4037
|
key: string;
|
|
3905
4038
|
record: Data_2;
|
|
3906
4039
|
}) => any;
|
|
3907
4040
|
onScroll?: (position: CellScrollPosition_2) => any;
|
|
4041
|
+
onLayoutAfterRealDataCellRender?: (options: {
|
|
4042
|
+
add: [number, number][];
|
|
4043
|
+
remove: [number, number][];
|
|
4044
|
+
spreadsheet: SpreadSheet_2;
|
|
4045
|
+
}) => any;
|
|
3908
4046
|
onRowCellBrushSelection?: (event: default_2) => any;
|
|
3909
4047
|
onColCellBrushSelection?: (event: default_2) => any;
|
|
3910
|
-
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => any;
|
|
4048
|
+
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => any;
|
|
3911
4049
|
onGetSpreadSheet?: (spreadsheet: SpreadSheet_2) => any;
|
|
3912
4050
|
}, {}>;
|
|
3913
4051
|
|
|
@@ -3919,7 +4057,7 @@ export declare interface SheetExpose {
|
|
|
3919
4057
|
instance: SpreadSheet | undefined;
|
|
3920
4058
|
}
|
|
3921
4059
|
|
|
3922
|
-
declare type SheetType = 'pivot' | 'table' | 'gridAnalysis' | 'strategy';
|
|
4060
|
+
declare type SheetType = 'pivot' | 'table' | 'gridAnalysis' | 'strategy' | 'editable';
|
|
3923
4061
|
|
|
3924
4062
|
/** render callback */
|
|
3925
4063
|
declare type SheetUpdateCallback = (params: S2RenderOptions) => S2RenderOptions;
|
|
@@ -4057,9 +4195,10 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4057
4195
|
* Group sort params kept in {@see store} and
|
|
4058
4196
|
* Priority: group sort > advanced sort
|
|
4059
4197
|
* @param dataCfg
|
|
4198
|
+
* @param reset reset: true, 直接使用用户传入的 DataCfg ,不再与上次数据进行合并
|
|
4060
4199
|
*/
|
|
4061
|
-
setDataCfg(dataCfg: S2DataConfig_2): void;
|
|
4062
|
-
setOptions(options: Partial<S2Options_2
|
|
4200
|
+
setDataCfg(dataCfg: S2DataConfig_2, reset?: boolean): void;
|
|
4201
|
+
setOptions(options: Partial<S2Options_2>, reset?: boolean): void;
|
|
4063
4202
|
render(reloadData?: boolean, options?: S2RenderOptions_2): void;
|
|
4064
4203
|
destroy(): void;
|
|
4065
4204
|
setThemeCfg(themeCfg?: ThemeCfg_2): void;
|
|
@@ -4107,7 +4246,7 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4107
4246
|
*/
|
|
4108
4247
|
updateScrollOffset(offsetConfig: OffsetConfig): void;
|
|
4109
4248
|
getTooltipDataItemMappingCallback(): MappingDataItemCallback;
|
|
4110
|
-
getCell<T extends
|
|
4249
|
+
getCell<T extends S2CellType_2 = S2CellType_2>(target: Event_2['target']): T;
|
|
4111
4250
|
getCellType(target: Event_2['target']): CellTypes;
|
|
4112
4251
|
/**
|
|
4113
4252
|
* get total's config by dimension id
|
|
@@ -4130,13 +4269,27 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4130
4269
|
clearColumnLeafNodes(): void;
|
|
4131
4270
|
private initHiddenColumnsDetail;
|
|
4132
4271
|
private clearCanvasEvent;
|
|
4272
|
+
/**
|
|
4273
|
+
* 获取文本在画布中的测量信息
|
|
4274
|
+
* @param text 待计算的文本
|
|
4275
|
+
* @param font 文本 css 样式
|
|
4276
|
+
* @returns 文本测量信息 TextMetrics
|
|
4277
|
+
*/
|
|
4278
|
+
measureText: ((text: number | string, font: unknown) => TextMetrics) & MemoizedFunction;
|
|
4133
4279
|
/**
|
|
4134
4280
|
* 计算文本在画布中的宽度
|
|
4135
4281
|
* @param text 待计算的文本
|
|
4136
4282
|
* @param font 文本 css 样式
|
|
4137
4283
|
* @returns 文本宽度
|
|
4138
4284
|
*/
|
|
4139
|
-
measureTextWidth: (
|
|
4285
|
+
measureTextWidth: (text: number | string, font: unknown) => number;
|
|
4286
|
+
/**
|
|
4287
|
+
* 计算文本在画布中的宽度 https://developer.mozilla.org/zh-CN/docs/Web/API/TextMetrics
|
|
4288
|
+
* @param text 待计算的文本
|
|
4289
|
+
* @param font 文本 css 样式
|
|
4290
|
+
* @returns 文本高度
|
|
4291
|
+
*/
|
|
4292
|
+
measureTextHeight: (text: number | string, font: unknown) => number;
|
|
4140
4293
|
/**
|
|
4141
4294
|
* 粗略计算文本在画布中的宽度
|
|
4142
4295
|
* @param text 待计算的文本
|
|
@@ -4144,6 +4297,8 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4144
4297
|
* @returns 文本宽度
|
|
4145
4298
|
*/
|
|
4146
4299
|
measureTextWidthRoughly: (text: any, font?: any) => number;
|
|
4300
|
+
updateSortMethodMap(nodeId: string, sortMethod: SortMethod, replace?: boolean): void;
|
|
4301
|
+
getMenuDefaultSelectedKeys(nodeId: string): string[];
|
|
4147
4302
|
}
|
|
4148
4303
|
|
|
4149
4304
|
/**
|
|
@@ -4195,8 +4350,9 @@ declare interface StoreKey {
|
|
|
4195
4350
|
lastRenderedColumnFields: string[];
|
|
4196
4351
|
resized: boolean;
|
|
4197
4352
|
visibleActionIcons: GuiIcon[];
|
|
4198
|
-
lastClickedCell:
|
|
4353
|
+
lastClickedCell: S2CellType_2<ViewMeta_2>;
|
|
4199
4354
|
initOverscrollBehavior: InteractionOptions['overscrollBehavior'];
|
|
4355
|
+
sortMethodMap: Record<string, SortMethod>;
|
|
4200
4356
|
[key: string]: unknown;
|
|
4201
4357
|
}
|
|
4202
4358
|
|
|
@@ -4214,10 +4370,10 @@ declare interface Style {
|
|
|
4214
4370
|
device?: 'pc' | 'mobile';
|
|
4215
4371
|
}
|
|
4216
4372
|
|
|
4217
|
-
export declare const TableSheet: DefineComponent<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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">, {
|
|
4373
|
+
export declare const TableSheet: DefineComponent<GetInitProps<SheetComponentProps, "onMounted" | "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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" | "onLayoutAfterRealDataCellRender" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
|
|
4218
4374
|
s2Ref: ShallowRef<SheetExpose>;
|
|
4219
4375
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4220
|
-
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
|
|
4376
|
+
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => SpreadSheet_2;
|
|
4221
4377
|
getSpreadSheet: (spreadsheet: SpreadSheet_2) => void;
|
|
4222
4378
|
sheetUpdate: SheetUpdateCallback;
|
|
4223
4379
|
rowCellHover: (data: TargetCellInfo_2) => void;
|
|
@@ -4289,6 +4445,7 @@ hiddenColumnsDetail: HiddenColumnsInfo_2[];
|
|
|
4289
4445
|
}) => void;
|
|
4290
4446
|
beforeRender: () => void;
|
|
4291
4447
|
afterRender: () => void;
|
|
4448
|
+
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
4292
4449
|
destroy: () => void;
|
|
4293
4450
|
layoutResize: (params: ResizeParams_2) => void;
|
|
4294
4451
|
layoutResizeSeriesWidth: (params: ResizeParams_2) => void;
|
|
@@ -4323,16 +4480,22 @@ mouseHover: (event: default_2) => void;
|
|
|
4323
4480
|
mouseUp: (event: MouseEvent) => void;
|
|
4324
4481
|
mouseDown: (event: MouseEvent) => void;
|
|
4325
4482
|
mouseMove: (event: MouseEvent) => void;
|
|
4326
|
-
selected: (cells:
|
|
4483
|
+
selected: (cells: S2CellType_2<ViewMeta_2>[]) => void;
|
|
4327
4484
|
reset: (event: KeyboardEvent) => void;
|
|
4328
4485
|
linkFieldJump: (data: {
|
|
4329
4486
|
key: string;
|
|
4330
4487
|
record: Data_2;
|
|
4331
4488
|
}) => void;
|
|
4332
4489
|
scroll: (position: CellScrollPosition_2) => void;
|
|
4490
|
+
layoutAfterRealDataCellRender: (options: {
|
|
4491
|
+
add: [number, number][];
|
|
4492
|
+
remove: [number, number][];
|
|
4493
|
+
spreadsheet: SpreadSheet_2;
|
|
4494
|
+
}) => void;
|
|
4333
4495
|
rowCellBrushSelection: (event: default_2) => void;
|
|
4334
4496
|
colCellBrushSelection: (event: default_2) => void;
|
|
4335
|
-
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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">>> & {
|
|
4497
|
+
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<GetInitProps<SheetComponentProps, "onMounted" | "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "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" | "onLayoutCollapseRows" | "onLayoutAfterCollapseRows" | "onCollapseRowsAll" | "onLayoutColsExpanded" | "onLayoutColsHidden" | "onBeforeRender" | "onAfterRender" | "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" | "onLayoutAfterRealDataCellRender" | "onRowCellBrushSelection" | "onColCellBrushSelection">>> & {
|
|
4498
|
+
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
4336
4499
|
onSheetUpdate?: (params: S2RenderOptions_2) => any;
|
|
4337
4500
|
onRowCellHover?: (data: TargetCellInfo_2) => any;
|
|
4338
4501
|
onRowCellClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -4437,21 +4600,26 @@ onMouseHover?: (event: default_2) => any;
|
|
|
4437
4600
|
onMouseUp?: (event: MouseEvent) => any;
|
|
4438
4601
|
onMouseDown?: (event: MouseEvent) => any;
|
|
4439
4602
|
onMouseMove?: (event: MouseEvent) => any;
|
|
4440
|
-
onSelected?: (cells:
|
|
4603
|
+
onSelected?: (cells: S2CellType_2<ViewMeta_2>[]) => any;
|
|
4441
4604
|
onReset?: (event: KeyboardEvent) => any;
|
|
4442
4605
|
onLinkFieldJump?: (data: {
|
|
4443
4606
|
key: string;
|
|
4444
4607
|
record: Data_2;
|
|
4445
4608
|
}) => any;
|
|
4446
4609
|
onScroll?: (position: CellScrollPosition_2) => any;
|
|
4610
|
+
onLayoutAfterRealDataCellRender?: (options: {
|
|
4611
|
+
add: [number, number][];
|
|
4612
|
+
remove: [number, number][];
|
|
4613
|
+
spreadsheet: SpreadSheet_2;
|
|
4614
|
+
}) => any;
|
|
4447
4615
|
onRowCellBrushSelection?: (event: default_2) => any;
|
|
4448
4616
|
onColCellBrushSelection?: (event: default_2) => any;
|
|
4449
|
-
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => any;
|
|
4617
|
+
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, string | Element, string>) => any;
|
|
4450
4618
|
onGetSpreadSheet?: (spreadsheet: SpreadSheet_2) => any;
|
|
4451
4619
|
}, {}>;
|
|
4452
4620
|
|
|
4453
4621
|
declare interface TargetCellInfo_2 {
|
|
4454
|
-
target:
|
|
4622
|
+
target: S2CellType_2;
|
|
4455
4623
|
event: Event_2;
|
|
4456
4624
|
viewMeta: Node_2_2;
|
|
4457
4625
|
}
|
|
@@ -4482,11 +4650,11 @@ declare interface ThemeCfg_2 {
|
|
|
4482
4650
|
|
|
4483
4651
|
declare type ThemeName = 'default' | 'colorful' | 'gray';
|
|
4484
4652
|
|
|
4485
|
-
declare interface Tooltip<T = TooltipContentType_2> extends BaseTooltipConfig<T> {
|
|
4486
|
-
row?: BaseTooltipConfig<T>;
|
|
4487
|
-
col?: BaseTooltipConfig<T>;
|
|
4488
|
-
corner?: BaseTooltipConfig<T>;
|
|
4489
|
-
data?: BaseTooltipConfig<T>;
|
|
4653
|
+
declare interface Tooltip<T = TooltipContentType_2, Icon = Element | string, Text = string> extends BaseTooltipConfig<T, Icon, Text> {
|
|
4654
|
+
row?: BaseTooltipConfig<T, Icon, Text>;
|
|
4655
|
+
col?: BaseTooltipConfig<T, Icon, Text>;
|
|
4656
|
+
corner?: BaseTooltipConfig<T, Icon, Text>;
|
|
4657
|
+
data?: BaseTooltipConfig<T, Icon, Text>;
|
|
4490
4658
|
}
|
|
4491
4659
|
|
|
4492
4660
|
declare type TooltipAutoAdjustBoundary = 'body' | 'container';
|
|
@@ -4495,7 +4663,7 @@ declare type TooltipContentType_2 = Element | string;
|
|
|
4495
4663
|
|
|
4496
4664
|
declare type TooltipData = {
|
|
4497
4665
|
summaries?: TooltipSummaryOptions[];
|
|
4498
|
-
details?:
|
|
4666
|
+
details?: TooltipDetailListItem[];
|
|
4499
4667
|
headInfo?: TooltipHeadInfo;
|
|
4500
4668
|
name?: string;
|
|
4501
4669
|
tips?: string;
|
|
@@ -4508,9 +4676,15 @@ declare type TooltipData = {
|
|
|
4508
4676
|
|
|
4509
4677
|
declare type TooltipDataItem = Record<string, any>;
|
|
4510
4678
|
|
|
4679
|
+
declare type TooltipDetailListItem = {
|
|
4680
|
+
name: string;
|
|
4681
|
+
value: string | number;
|
|
4682
|
+
icon?: Element | string;
|
|
4683
|
+
};
|
|
4684
|
+
|
|
4511
4685
|
declare type TooltipHeadInfo = {
|
|
4512
|
-
rows:
|
|
4513
|
-
cols:
|
|
4686
|
+
rows: TooltipDetailListItem[];
|
|
4687
|
+
cols: TooltipDetailListItem[];
|
|
4514
4688
|
};
|
|
4515
4689
|
|
|
4516
4690
|
declare type TooltipInterpretationOptions = {
|
|
@@ -4520,35 +4694,37 @@ declare type TooltipInterpretationOptions = {
|
|
|
4520
4694
|
render?: Element | string;
|
|
4521
4695
|
};
|
|
4522
4696
|
|
|
4523
|
-
declare interface TooltipOperation extends TooltipOperatorOptions {
|
|
4697
|
+
declare interface TooltipOperation<Icon = Element | string, Text = string> extends TooltipOperatorOptions<Icon, Text> {
|
|
4524
4698
|
hiddenColumns?: boolean;
|
|
4525
4699
|
trend?: boolean;
|
|
4526
4700
|
sort?: boolean;
|
|
4527
4701
|
tableSort?: boolean;
|
|
4528
4702
|
}
|
|
4529
4703
|
|
|
4530
|
-
declare interface TooltipOperatorMenu {
|
|
4704
|
+
declare interface TooltipOperatorMenu<Icon = Element | string, Text = string> {
|
|
4531
4705
|
key: string;
|
|
4532
|
-
icon?:
|
|
4533
|
-
text?:
|
|
4534
|
-
onClick?: (cell:
|
|
4535
|
-
visible?: boolean | ((cell:
|
|
4536
|
-
children?: TooltipOperatorMenu[];
|
|
4706
|
+
icon?: Icon;
|
|
4707
|
+
text?: Text;
|
|
4708
|
+
onClick?: (cell: S2CellType_2) => void;
|
|
4709
|
+
visible?: boolean | ((cell: S2CellType_2) => boolean);
|
|
4710
|
+
children?: TooltipOperatorMenu<Icon, Text>[];
|
|
4537
4711
|
}
|
|
4538
4712
|
|
|
4539
|
-
declare interface TooltipOperatorOptions {
|
|
4713
|
+
declare interface TooltipOperatorOptions<Icon = Element | string, Text = string> {
|
|
4540
4714
|
onClick?: (...args: unknown[]) => void;
|
|
4541
|
-
menus?: TooltipOperatorMenu[];
|
|
4715
|
+
menus?: TooltipOperatorMenu<Icon, Text>[];
|
|
4716
|
+
defaultSelectedKeys?: string[];
|
|
4542
4717
|
}
|
|
4543
4718
|
|
|
4544
|
-
declare interface TooltipOptions {
|
|
4719
|
+
declare interface TooltipOptions<Icon = Element | string, Text = string> {
|
|
4545
4720
|
hideSummary?: boolean;
|
|
4546
|
-
operator?: TooltipOperatorOptions
|
|
4721
|
+
operator?: TooltipOperatorOptions<Icon, Text>;
|
|
4547
4722
|
enterable?: boolean;
|
|
4548
4723
|
isTotals?: boolean;
|
|
4549
4724
|
showSingleTips?: boolean;
|
|
4550
4725
|
onlyMenu?: boolean;
|
|
4551
4726
|
enableFormat?: boolean;
|
|
4727
|
+
forceRender?: boolean;
|
|
4552
4728
|
}
|
|
4553
4729
|
|
|
4554
4730
|
declare interface TooltipPosition {
|
|
@@ -4561,12 +4737,12 @@ declare interface TooltipPositionInfo {
|
|
|
4561
4737
|
event: Event_2 | MouseEvent;
|
|
4562
4738
|
}
|
|
4563
4739
|
|
|
4564
|
-
declare type TooltipShowOptions<T = TooltipContentType_2> = {
|
|
4740
|
+
declare type TooltipShowOptions<T = TooltipContentType_2, Icon = Element | string, Text = string> = {
|
|
4565
4741
|
position: TooltipPosition;
|
|
4566
4742
|
data?: TooltipData;
|
|
4567
4743
|
cellInfos?: TooltipDataItem[];
|
|
4568
|
-
options?: TooltipOptions
|
|
4569
|
-
content?: ((cell:
|
|
4744
|
+
options?: TooltipOptions<Icon, Text>;
|
|
4745
|
+
content?: ((cell: S2CellType_2, defaultTooltipShowOptions: TooltipShowOptions<T, Icon, Text>) => T) | T;
|
|
4570
4746
|
event?: Event_2 | MouseEvent;
|
|
4571
4747
|
};
|
|
4572
4748
|
|