@antv/s2-vue 1.3.0 → 1.4.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/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 +138 -80
- package/esm/index.js +6 -2
- package/esm/index.js.map +1 -1
- package/esm/style.css +19 -2
- package/lib/index.js +6 -2
- package/lib/index.js.map +1 -1
- package/lib/style.css +19 -2
- package/package.json +1 -1
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';
|
|
@@ -107,6 +108,9 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
107
108
|
protected linkFieldShape: IShape;
|
|
108
109
|
protected actualText: string;
|
|
109
110
|
protected actualTextWidth: number;
|
|
111
|
+
protected conditions: Conditions;
|
|
112
|
+
protected conditionIntervalShape: IShape;
|
|
113
|
+
protected conditionIconShape: GuiIcon;
|
|
110
114
|
protected stateShapes: Map<StateShapeLayer, IShape>;
|
|
111
115
|
constructor(meta: T, spreadsheet: SpreadSheet_2, ...restOptions: unknown[]);
|
|
112
116
|
getMeta(): T;
|
|
@@ -145,10 +149,12 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
145
149
|
protected abstract getFormattedFieldValue(): FormatResult;
|
|
146
150
|
protected abstract getMaxTextWidth(): number;
|
|
147
151
|
protected abstract getTextPosition(): Point;
|
|
152
|
+
protected abstract findFieldCondition(conditions: Condition[]): Condition;
|
|
153
|
+
protected abstract mappingValue(condition: Condition): MappingResult;
|
|
148
154
|
getStyle<K extends keyof S2Theme = keyof CellThemes>(name?: K): DefaultCellTheme | S2Theme[K];
|
|
149
155
|
protected getResizeAreaStyle(): ResizeArea;
|
|
150
|
-
protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell:
|
|
151
|
-
|
|
156
|
+
protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell: S2CellType_2): boolean | ((cell: S2CellType_2<ViewMeta_2>) => boolean) | ResizeType | ((resizeInfo: ResizeInfo_2) => boolean);
|
|
157
|
+
getCellArea(): {
|
|
152
158
|
x: number;
|
|
153
159
|
y: number;
|
|
154
160
|
height: number;
|
|
@@ -166,7 +172,7 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
166
172
|
};
|
|
167
173
|
protected drawTextShape(): void;
|
|
168
174
|
protected drawLinkFieldShape(showLinkFieldShape: boolean, linkFillColor: string): void;
|
|
169
|
-
updateByState(stateName: InteractionStateName, cell:
|
|
175
|
+
updateByState(stateName: InteractionStateName, cell: S2CellType_2): void;
|
|
170
176
|
protected getInteractiveBorderShapeStyle<T>(style: T & number): {
|
|
171
177
|
x: number;
|
|
172
178
|
y: number;
|
|
@@ -176,6 +182,9 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
176
182
|
hideInteractionShape(): void;
|
|
177
183
|
clearUnselectedState(): void;
|
|
178
184
|
getTextShape(): IShape;
|
|
185
|
+
get cellConditions(): Conditions;
|
|
186
|
+
drawConditionIconShapes(): void;
|
|
187
|
+
getTextConditionFill(textStyle: TextTheme): string;
|
|
179
188
|
}
|
|
180
189
|
|
|
181
190
|
declare interface BaseChartData {
|
|
@@ -432,7 +441,7 @@ declare abstract class BaseFacet {
|
|
|
432
441
|
* @protected
|
|
433
442
|
*/
|
|
434
443
|
protected translateRelatedGroups(scrollX: number, scrollY: number, hRowScroll: number): void;
|
|
435
|
-
addCell: (cell:
|
|
444
|
+
addCell: (cell: S2CellType_2<ViewMeta_2>) => void;
|
|
436
445
|
realCellRender: (scrollX: number, scrollY: number) => void;
|
|
437
446
|
protected init(): void;
|
|
438
447
|
protected renderBackground(): void;
|
|
@@ -553,7 +562,7 @@ declare interface BaseNodeConfig {
|
|
|
553
562
|
field?: string;
|
|
554
563
|
spreadsheet?: SpreadSheet_2;
|
|
555
564
|
query?: Record<string, any>;
|
|
556
|
-
belongsCell?:
|
|
565
|
+
belongsCell?: S2CellType_2;
|
|
557
566
|
isTotalMeasure?: boolean;
|
|
558
567
|
inCollapseNode?: boolean;
|
|
559
568
|
isLeaf?: boolean;
|
|
@@ -593,6 +602,7 @@ default: Adaptive;
|
|
|
593
602
|
};
|
|
594
603
|
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: SheetComponentOptions) => SpreadSheet>;
|
|
595
604
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
605
|
+
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
596
606
|
}, {
|
|
597
607
|
S2_PREFIX_CLS: string;
|
|
598
608
|
wrapperRef: Ref<HTMLDivElement>;
|
|
@@ -682,6 +692,7 @@ hiddenColumnsDetail: HiddenColumnsInfo[];
|
|
|
682
692
|
}) => void;
|
|
683
693
|
beforeRender: () => void;
|
|
684
694
|
afterRender: () => void;
|
|
695
|
+
mounted: (spreadsheet: SpreadSheet) => void;
|
|
685
696
|
destroy: () => void;
|
|
686
697
|
layoutResize: (params: ResizeParams) => void;
|
|
687
698
|
layoutResizeSeriesWidth: (params: ResizeParams) => void;
|
|
@@ -716,7 +727,7 @@ mouseHover: (event: default_2) => void;
|
|
|
716
727
|
mouseUp: (event: MouseEvent) => void;
|
|
717
728
|
mouseDown: (event: MouseEvent) => void;
|
|
718
729
|
mouseMove: (event: MouseEvent) => void;
|
|
719
|
-
selected: (cells:
|
|
730
|
+
selected: (cells: S2CellType<ViewMeta>[]) => void;
|
|
720
731
|
reset: (event: KeyboardEvent) => void;
|
|
721
732
|
linkFieldJump: (data: {
|
|
722
733
|
key: string;
|
|
@@ -752,7 +763,9 @@ default: Adaptive;
|
|
|
752
763
|
};
|
|
753
764
|
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: SheetComponentOptions) => SpreadSheet>;
|
|
754
765
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
766
|
+
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
755
767
|
}>> & {
|
|
768
|
+
onMounted?: (spreadsheet: SpreadSheet) => any;
|
|
756
769
|
onSheetUpdate?: (params: S2RenderOptions) => any;
|
|
757
770
|
onRowCellHover?: (data: TargetCellInfo) => any;
|
|
758
771
|
onRowCellClick?: (data: TargetCellInfo) => any;
|
|
@@ -857,7 +870,7 @@ onMouseHover?: (event: default_2) => any;
|
|
|
857
870
|
onMouseUp?: (event: MouseEvent) => any;
|
|
858
871
|
onMouseDown?: (event: MouseEvent) => any;
|
|
859
872
|
onMouseMove?: (event: MouseEvent) => any;
|
|
860
|
-
onSelected?: (cells:
|
|
873
|
+
onSelected?: (cells: S2CellType<ViewMeta>[]) => any;
|
|
861
874
|
onReset?: (event: KeyboardEvent) => any;
|
|
862
875
|
onLinkFieldJump?: (data: {
|
|
863
876
|
key: string;
|
|
@@ -896,6 +909,7 @@ declare interface BaseSheetComponentProps<PartialDrillDown = unknown, Header = u
|
|
|
896
909
|
};
|
|
897
910
|
themeCfg?: ThemeCfg;
|
|
898
911
|
header?: Header;
|
|
912
|
+
/** @deprecated 1.29.0 已废弃, 请使用 onMounted 代替 */
|
|
899
913
|
getSpreadSheet?: (spreadsheet: SpreadSheet) => void;
|
|
900
914
|
/** 底表 render callback */
|
|
901
915
|
onSheetUpdate?: SheetUpdateCallback;
|
|
@@ -969,6 +983,7 @@ declare interface BaseSheetComponentProps<PartialDrillDown = unknown, Header = u
|
|
|
969
983
|
}) => void;
|
|
970
984
|
onBeforeRender?: () => void;
|
|
971
985
|
onAfterRender?: () => void;
|
|
986
|
+
onMounted?: (spreadsheet: SpreadSheet) => void;
|
|
972
987
|
onDestroy?: () => void;
|
|
973
988
|
onLayoutResize?: (params: ResizeParams) => void;
|
|
974
989
|
onLayoutResizeSeriesWidth?: (params: ResizeParams) => void;
|
|
@@ -1003,7 +1018,7 @@ declare interface BaseSheetComponentProps<PartialDrillDown = unknown, Header = u
|
|
|
1003
1018
|
onMouseUp?: (event: MouseEvent) => void;
|
|
1004
1019
|
onMouseDown?: (event: MouseEvent) => void;
|
|
1005
1020
|
onMouseMove?: (event: MouseEvent) => void;
|
|
1006
|
-
onSelected?: (cells:
|
|
1021
|
+
onSelected?: (cells: S2CellType[]) => void;
|
|
1007
1022
|
onReset?: (event: KeyboardEvent) => void;
|
|
1008
1023
|
onLinkFieldJump?: (data: {
|
|
1009
1024
|
key: string;
|
|
@@ -1061,6 +1076,7 @@ declare interface BulletTheme {
|
|
|
1061
1076
|
comparativeMeasure: {
|
|
1062
1077
|
width: number;
|
|
1063
1078
|
height: number;
|
|
1079
|
+
fill?: string;
|
|
1064
1080
|
color?: string;
|
|
1065
1081
|
opacity?: number;
|
|
1066
1082
|
};
|
|
@@ -1094,7 +1110,7 @@ declare enum CellBorderPosition {
|
|
|
1094
1110
|
RIGHT = "RIGHT"
|
|
1095
1111
|
}
|
|
1096
1112
|
|
|
1097
|
-
declare type CellCallback<T extends BaseHeaderConfig> = (node: Node_2_2, spreadsheet: SpreadSheet_2, headerConfig: T) =>
|
|
1113
|
+
declare type CellCallback<T extends BaseHeaderConfig> = (node: Node_2_2, spreadsheet: SpreadSheet_2, headerConfig: T) => S2CellType_2;
|
|
1098
1114
|
|
|
1099
1115
|
declare interface CellCfg {
|
|
1100
1116
|
width?: number;
|
|
@@ -1102,6 +1118,7 @@ declare interface CellCfg {
|
|
|
1102
1118
|
valuesCfg?: {
|
|
1103
1119
|
originalValueField?: string;
|
|
1104
1120
|
widthPercent?: number[];
|
|
1121
|
+
showOriginalValue?: boolean;
|
|
1105
1122
|
};
|
|
1106
1123
|
}
|
|
1107
1124
|
|
|
@@ -1170,15 +1187,14 @@ declare class ColCell extends HeaderCell {
|
|
|
1170
1187
|
protected textPosition: Point;
|
|
1171
1188
|
get cellType(): CellTypes;
|
|
1172
1189
|
protected initCell(): void;
|
|
1173
|
-
protected drawBackgroundShape(): void;
|
|
1174
1190
|
protected drawInteractiveBgShape(): void;
|
|
1175
1191
|
/**
|
|
1176
1192
|
* 绘制hover悬停,刷选的外框
|
|
1177
1193
|
*/
|
|
1178
1194
|
protected drawInteractiveBorderShape(): void;
|
|
1179
|
-
protected getTextStyle(): TextTheme;
|
|
1180
1195
|
protected getMaxTextWidth(): number;
|
|
1181
1196
|
protected getIconPosition(): Point;
|
|
1197
|
+
protected isBolderText(): boolean;
|
|
1182
1198
|
protected getTextPosition(): Point;
|
|
1183
1199
|
protected getActionIconsWidth(): number;
|
|
1184
1200
|
protected getColResizeAreaKey(): string;
|
|
@@ -1277,6 +1293,7 @@ declare class CornerBBox extends BaseBBox {
|
|
|
1277
1293
|
declare class CornerCell extends HeaderCell {
|
|
1278
1294
|
protected headerConfig: CornerHeaderConfig;
|
|
1279
1295
|
protected textShapes: IShape[];
|
|
1296
|
+
protected isBolderText(): boolean;
|
|
1280
1297
|
cornerType: CornerNodeType;
|
|
1281
1298
|
get cellType(): CellTypes;
|
|
1282
1299
|
update(): void;
|
|
@@ -1286,7 +1303,6 @@ declare class CornerCell extends HeaderCell {
|
|
|
1286
1303
|
* 绘制折叠展开的icon
|
|
1287
1304
|
*/
|
|
1288
1305
|
protected drawTreeIcon(): void;
|
|
1289
|
-
protected drawBackgroundShape(): void;
|
|
1290
1306
|
/**
|
|
1291
1307
|
* Render cell horizontalBorder border
|
|
1292
1308
|
* @protected
|
|
@@ -1333,7 +1349,7 @@ declare class CornerHeader extends BaseHeader<CornerHeaderConfig> {
|
|
|
1333
1349
|
protected clip(): void;
|
|
1334
1350
|
}
|
|
1335
1351
|
|
|
1336
|
-
declare type CornerHeaderCallback = (parent:
|
|
1352
|
+
declare type CornerHeaderCallback = (parent: S2CellType_2, spreadsheet: SpreadSheet_2, ...restOptions: unknown[]) => void;
|
|
1337
1353
|
|
|
1338
1354
|
declare interface CornerHeaderConfig extends BaseHeaderConfig {
|
|
1339
1355
|
hierarchyType: S2Options_2['hierarchyType'];
|
|
@@ -1382,16 +1398,14 @@ declare type Data_2 = Record<string, DataItem>;
|
|
|
1382
1398
|
* |interval text| icon |
|
|
1383
1399
|
* | | |
|
|
1384
1400
|
* ----------------------------
|
|
1385
|
-
* There are four conditions(
|
|
1401
|
+
* There are four conditions({@see BaseCell.conditions}) to determine how to render
|
|
1386
1402
|
* 1、background color
|
|
1387
1403
|
* 2、icon align in right with size {@link ICON_SIZE}
|
|
1388
1404
|
* 3、left rect area is interval(in left) and text(in right)
|
|
1389
1405
|
*/
|
|
1390
1406
|
declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
1391
|
-
protected conditions: Conditions;
|
|
1392
|
-
protected conditionIntervalShape: IShape;
|
|
1393
|
-
protected conditionIconShape: GuiIcon;
|
|
1394
1407
|
get cellType(): CellTypes;
|
|
1408
|
+
get valueRangeByField(): ValueRange;
|
|
1395
1409
|
protected handleByStateName(cells: CellMeta_2[], stateName: InteractionStateName): void;
|
|
1396
1410
|
protected handleSearchResult(cells: CellMeta_2[]): void;
|
|
1397
1411
|
protected handleSelect(cells: CellMeta_2[]): void;
|
|
@@ -1399,20 +1413,27 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
|
1399
1413
|
update(): void;
|
|
1400
1414
|
setMeta(viewMeta: ViewMeta_2): void;
|
|
1401
1415
|
protected initCell(): void;
|
|
1416
|
+
/**
|
|
1417
|
+
* 获取默认字体颜色:根据字段标记背景颜色,设置字体颜色
|
|
1418
|
+
* @param textStyle
|
|
1419
|
+
* @private
|
|
1420
|
+
*/
|
|
1421
|
+
private getDefaultTextFill;
|
|
1402
1422
|
protected getTextStyle(): TextTheme;
|
|
1403
1423
|
getIconStyle(): IconCfg | undefined;
|
|
1424
|
+
protected drawConditionIntervalShape(): void;
|
|
1425
|
+
protected shouldHideRowSubtotalData(): boolean;
|
|
1404
1426
|
protected getFormattedFieldValue(): FormatResult;
|
|
1405
1427
|
protected getMaxTextWidth(): number;
|
|
1406
1428
|
protected getTextPosition(): Point;
|
|
1407
|
-
protected drawConditionIconShapes(): void;
|
|
1408
|
-
/**
|
|
1409
|
-
* Draw interval condition shape
|
|
1410
|
-
* @protected
|
|
1411
|
-
*/
|
|
1412
|
-
protected drawConditionIntervalShape(): void;
|
|
1413
1429
|
getBackgroundColor(): {
|
|
1414
1430
|
backgroundColor: string;
|
|
1415
1431
|
backgroundColorOpacity: number;
|
|
1432
|
+
intelligentReverseTextColor?: undefined;
|
|
1433
|
+
} | {
|
|
1434
|
+
backgroundColor: string;
|
|
1435
|
+
backgroundColorOpacity: number;
|
|
1436
|
+
intelligentReverseTextColor: boolean;
|
|
1416
1437
|
};
|
|
1417
1438
|
/**
|
|
1418
1439
|
* Draw cell background
|
|
@@ -1436,18 +1457,18 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
|
1436
1457
|
* Find current field related condition
|
|
1437
1458
|
* @param conditions
|
|
1438
1459
|
*/
|
|
1439
|
-
|
|
1460
|
+
findFieldCondition(conditions: Condition[]): Condition;
|
|
1440
1461
|
/**
|
|
1441
1462
|
* Mapping value to get condition related attrs
|
|
1442
1463
|
* @param condition
|
|
1443
1464
|
*/
|
|
1444
|
-
|
|
1465
|
+
mappingValue(condition: Condition): MappingResult;
|
|
1445
1466
|
updateByState(stateName: InteractionStateName): void;
|
|
1446
1467
|
clearUnselectedState(): void;
|
|
1447
1468
|
protected drawLeftBorder(): void;
|
|
1448
1469
|
}
|
|
1449
1470
|
|
|
1450
|
-
declare type DataCellCallback = (viewMeta: ViewMeta_2) =>
|
|
1471
|
+
declare type DataCellCallback = (viewMeta: ViewMeta_2) => S2CellType_2;
|
|
1451
1472
|
|
|
1452
1473
|
declare type DataItem = SimpleDataItem | MultiData;
|
|
1453
1474
|
|
|
@@ -1504,7 +1525,7 @@ declare interface EmitterType {
|
|
|
1504
1525
|
[S2Event.DATA_CELL_DOUBLE_CLICK]: CanvasEventHandler;
|
|
1505
1526
|
[S2Event.DATA_CELL_CONTEXT_MENU]: CanvasEventHandler;
|
|
1506
1527
|
[S2Event.DATA_CELL_TREND_ICON_CLICK]: (data: ViewMeta_2) => void;
|
|
1507
|
-
[S2Event.DATA_CELL_BRUSH_SELECTION]: (cells: DataCell_2[]) => void;
|
|
1528
|
+
[S2Event.DATA_CELL_BRUSH_SELECTION]: (cells: (DataCell_2 | CellMeta_2)[]) => void;
|
|
1508
1529
|
[S2Event.DATA_CELL_SELECT_MOVE]: (metas: CellMeta_2[]) => void;
|
|
1509
1530
|
/** ================ Row Cell ================ */
|
|
1510
1531
|
[S2Event.ROW_CELL_MOUSE_DOWN]: CanvasEventHandler;
|
|
@@ -1790,6 +1811,7 @@ declare abstract class HeaderCell extends BaseCell<Node_2_2> {
|
|
|
1790
1811
|
protected treeLeafNodeAlignDot: IShape | undefined;
|
|
1791
1812
|
protected actionIcons: GuiIcon[];
|
|
1792
1813
|
protected hasDefaultHiddenIcon: boolean;
|
|
1814
|
+
protected abstract isBolderText(): boolean;
|
|
1793
1815
|
protected handleRestOptions(...[headerConfig]: [BaseHeaderConfig]): void;
|
|
1794
1816
|
protected initCell(): void;
|
|
1795
1817
|
protected getInteractiveBorderShapeStyle(border: number): {
|
|
@@ -1810,16 +1832,24 @@ declare abstract class HeaderCell extends BaseCell<Node_2_2> {
|
|
|
1810
1832
|
protected hasDefaultHideActionIcon(): boolean;
|
|
1811
1833
|
protected addActionIcon(options: HeaderActionIconOptions): void;
|
|
1812
1834
|
protected drawActionIcons(): void;
|
|
1835
|
+
protected drawBackgroundShape(): void;
|
|
1813
1836
|
protected isSortCell(): boolean;
|
|
1814
1837
|
protected handleByStateName(cells: CellMeta_2[], stateName: InteractionStateName): void;
|
|
1815
1838
|
protected handleSearchResult(cells: CellMeta_2[]): void;
|
|
1816
1839
|
protected handleHover(cells: CellMeta_2[]): void;
|
|
1817
1840
|
protected handleSelect(cells: CellMeta_2[], nodes: Node_2_2[]): void;
|
|
1841
|
+
protected getTextStyle(): TextTheme;
|
|
1842
|
+
getBackgroundColor(): {
|
|
1843
|
+
backgroundColor: string;
|
|
1844
|
+
backgroundColorOpacity: number;
|
|
1845
|
+
};
|
|
1818
1846
|
toggleActionIcon(id: string): void;
|
|
1819
1847
|
update(): void;
|
|
1820
1848
|
updateByState(stateName: InteractionStateName): void;
|
|
1821
1849
|
hideInteractionShape(): void;
|
|
1822
1850
|
isMeasureField(): boolean;
|
|
1851
|
+
mappingValue(condition: Condition): MappingResult;
|
|
1852
|
+
findFieldCondition(conditions: Condition[]): Condition;
|
|
1823
1853
|
}
|
|
1824
1854
|
|
|
1825
1855
|
declare interface HeaderIconClickParams {
|
|
@@ -1928,7 +1958,7 @@ declare type InteractionState = {
|
|
|
1928
1958
|
declare interface InteractionStateInfo {
|
|
1929
1959
|
stateName?: InteractionStateName;
|
|
1930
1960
|
cells?: CellMeta_2[];
|
|
1931
|
-
interactedCells?:
|
|
1961
|
+
interactedCells?: S2CellType_2[];
|
|
1932
1962
|
nodes?: Node_2_2[];
|
|
1933
1963
|
force?: boolean;
|
|
1934
1964
|
/** 交互行为改变后,会被更新和重绘的单元格回调 */
|
|
@@ -1968,6 +1998,11 @@ declare enum InterceptType {
|
|
|
1968
1998
|
RESIZE = "resize"
|
|
1969
1999
|
}
|
|
1970
2000
|
|
|
2001
|
+
declare interface IntervalTheme {
|
|
2002
|
+
height: number;
|
|
2003
|
+
fill: string;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
1971
2006
|
declare type IsEmitKey<Type> = Exclude<Type, undefined> extends (...args: any) => any ? true : false;
|
|
1972
2007
|
|
|
1973
2008
|
declare type KeyboardEventHandler = (event: KeyboardEvent) => void;
|
|
@@ -2031,12 +2066,6 @@ declare interface LineTheme {
|
|
|
2031
2066
|
};
|
|
2032
2067
|
}
|
|
2033
2068
|
|
|
2034
|
-
declare type ListItem = {
|
|
2035
|
-
name: string;
|
|
2036
|
-
value: string | number;
|
|
2037
|
-
icon?: Element | string;
|
|
2038
|
-
};
|
|
2039
|
-
|
|
2040
2069
|
declare type MappingDataItemCallback = (valueField: string, data: DataItem) => Record<string, string | number> | DataItem;
|
|
2041
2070
|
|
|
2042
2071
|
declare type MappingFunction = (fieldValue: number | string, data: Record<string, any>) => MappingResult;
|
|
@@ -2045,6 +2074,11 @@ declare interface MappingResult extends ValueRange {
|
|
|
2045
2074
|
icon?: string;
|
|
2046
2075
|
fill: string;
|
|
2047
2076
|
isCompare?: boolean;
|
|
2077
|
+
/**
|
|
2078
|
+
* @description only used in background condition, when the background color is too light, the font color will be white
|
|
2079
|
+
* @version 1.34.0
|
|
2080
|
+
*/
|
|
2081
|
+
intelligentReverseTextColor?: boolean;
|
|
2048
2082
|
}
|
|
2049
2083
|
|
|
2050
2084
|
declare type Margin = Padding;
|
|
@@ -2053,9 +2087,9 @@ declare type Margin = Padding;
|
|
|
2053
2087
|
* Cell for panelGroup area
|
|
2054
2088
|
*/
|
|
2055
2089
|
declare class MergedCell extends DataCell_2 {
|
|
2056
|
-
cells:
|
|
2057
|
-
constructor(spreadsheet: SpreadSheet_2, cells:
|
|
2058
|
-
handleRestOptions(...[cells]: [
|
|
2090
|
+
cells: S2CellType_2[];
|
|
2091
|
+
constructor(spreadsheet: SpreadSheet_2, cells: S2CellType_2[], meta?: ViewMeta_2);
|
|
2092
|
+
handleRestOptions(...[cells]: [S2CellType_2[]]): void;
|
|
2059
2093
|
get cellType(): CellTypes;
|
|
2060
2094
|
update(): void;
|
|
2061
2095
|
protected initCell(): void;
|
|
@@ -2091,6 +2125,7 @@ declare interface MiniChartTheme {
|
|
|
2091
2125
|
line?: LineTheme;
|
|
2092
2126
|
bar?: BarTheme;
|
|
2093
2127
|
bullet?: BulletTheme;
|
|
2128
|
+
interval?: IntervalTheme;
|
|
2094
2129
|
}
|
|
2095
2130
|
|
|
2096
2131
|
/** mini 图类型 */
|
|
@@ -2197,7 +2232,7 @@ declare class Node_2_2 {
|
|
|
2197
2232
|
field: string;
|
|
2198
2233
|
spreadsheet: SpreadSheet_2;
|
|
2199
2234
|
query?: Record<string, any>;
|
|
2200
|
-
belongsCell?:
|
|
2235
|
+
belongsCell?: S2CellType_2;
|
|
2201
2236
|
inCollapseNode?: boolean;
|
|
2202
2237
|
cornerType?: CornerNodeType;
|
|
2203
2238
|
isGrandTotals?: boolean;
|
|
@@ -2327,6 +2362,7 @@ default: Adaptive;
|
|
|
2327
2362
|
};
|
|
2328
2363
|
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: SheetComponentOptions) => SpreadSheet>;
|
|
2329
2364
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
2365
|
+
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
2330
2366
|
}, {
|
|
2331
2367
|
s2Ref: ShallowRef<SheetExpose>;
|
|
2332
2368
|
options: S2Options<TooltipContentType, Pagination>;
|
|
@@ -2403,6 +2439,7 @@ hiddenColumnsDetail: HiddenColumnsInfo[];
|
|
|
2403
2439
|
}) => void;
|
|
2404
2440
|
beforeRender: () => void;
|
|
2405
2441
|
afterRender: () => void;
|
|
2442
|
+
mounted: (spreadsheet: SpreadSheet) => void;
|
|
2406
2443
|
destroy: () => void;
|
|
2407
2444
|
layoutResize: (params: ResizeParams) => void;
|
|
2408
2445
|
layoutResizeSeriesWidth: (params: ResizeParams) => void;
|
|
@@ -2437,7 +2474,7 @@ mouseHover: (event: default_2) => void;
|
|
|
2437
2474
|
mouseUp: (event: MouseEvent) => void;
|
|
2438
2475
|
mouseDown: (event: MouseEvent) => void;
|
|
2439
2476
|
mouseMove: (event: MouseEvent) => void;
|
|
2440
|
-
selected: (cells:
|
|
2477
|
+
selected: (cells: S2CellType<ViewMeta>[]) => void;
|
|
2441
2478
|
reset: (event: KeyboardEvent) => void;
|
|
2442
2479
|
linkFieldJump: (data: {
|
|
2443
2480
|
key: string;
|
|
@@ -2473,7 +2510,9 @@ default: Adaptive;
|
|
|
2473
2510
|
};
|
|
2474
2511
|
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: SheetComponentOptions) => SpreadSheet>;
|
|
2475
2512
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
2513
|
+
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
2476
2514
|
}>> & {
|
|
2515
|
+
onMounted?: (spreadsheet: SpreadSheet) => any;
|
|
2477
2516
|
onSheetUpdate?: (params: S2RenderOptions) => any;
|
|
2478
2517
|
onRowCellHover?: (data: TargetCellInfo) => any;
|
|
2479
2518
|
onRowCellClick?: (data: TargetCellInfo) => any;
|
|
@@ -2578,7 +2617,7 @@ onMouseHover?: (event: default_2) => any;
|
|
|
2578
2617
|
onMouseUp?: (event: MouseEvent) => any;
|
|
2579
2618
|
onMouseDown?: (event: MouseEvent) => any;
|
|
2580
2619
|
onMouseMove?: (event: MouseEvent) => any;
|
|
2581
|
-
onSelected?: (cells:
|
|
2620
|
+
onSelected?: (cells: S2CellType<ViewMeta>[]) => any;
|
|
2582
2621
|
onReset?: (event: KeyboardEvent) => any;
|
|
2583
2622
|
onLinkFieldJump?: (data: {
|
|
2584
2623
|
key: string;
|
|
@@ -2680,7 +2719,7 @@ declare interface ResizeInteractionOptions {
|
|
|
2680
2719
|
colCellVertical?: boolean;
|
|
2681
2720
|
rowResizeType?: ResizeType;
|
|
2682
2721
|
disable?: (resizeInfo: ResizeInfo_2) => boolean;
|
|
2683
|
-
visible?: (cell:
|
|
2722
|
+
visible?: (cell: S2CellType_2) => boolean;
|
|
2684
2723
|
}
|
|
2685
2724
|
|
|
2686
2725
|
declare interface ResizeParams_2 {
|
|
@@ -2706,8 +2745,8 @@ declare class RootInteraction {
|
|
|
2706
2745
|
private onTriggerInteractionsResetEffect;
|
|
2707
2746
|
setState(interactionStateInfo: InteractionStateInfo): void;
|
|
2708
2747
|
getState(): InteractionStateInfo;
|
|
2709
|
-
setInteractedCells(cell:
|
|
2710
|
-
getInteractedCells():
|
|
2748
|
+
setInteractedCells(cell: S2CellType_2): void;
|
|
2749
|
+
getInteractedCells(): S2CellType_2<ViewMeta_2>[];
|
|
2711
2750
|
resetState(): void;
|
|
2712
2751
|
getCurrentStateName(): InteractionStateName;
|
|
2713
2752
|
isEqualStateName(stateName: InteractionStateName): boolean;
|
|
@@ -2716,19 +2755,19 @@ declare class RootInteraction {
|
|
|
2716
2755
|
isAllSelectedState(): boolean;
|
|
2717
2756
|
isHoverFocusState(): boolean;
|
|
2718
2757
|
isHoverState(): boolean;
|
|
2719
|
-
isActiveCell(cell:
|
|
2720
|
-
isSelectedCell(cell:
|
|
2758
|
+
isActiveCell(cell: S2CellType_2): boolean;
|
|
2759
|
+
isSelectedCell(cell: S2CellType_2): boolean;
|
|
2721
2760
|
getCells(): CellMeta_2[];
|
|
2722
|
-
getActiveCells():
|
|
2761
|
+
getActiveCells(): S2CellType_2[];
|
|
2723
2762
|
clearStyleIndependent(): void;
|
|
2724
2763
|
getPanelGroupAllUnSelectedDataCells(): DataCell_2[];
|
|
2725
2764
|
getPanelGroupAllDataCells(): DataCell_2[];
|
|
2726
2765
|
getAllRowHeaderCells(): RowCell[];
|
|
2727
2766
|
getAllColHeaderCells(): ColCell[];
|
|
2728
|
-
getRowColActiveCells(ids: string[]):
|
|
2729
|
-
getAllCells():
|
|
2767
|
+
getRowColActiveCells(ids: string[]): S2CellType_2<ViewMeta_2>[];
|
|
2768
|
+
getAllCells(): S2CellType_2<ViewMeta_2>[];
|
|
2730
2769
|
selectAll: () => void;
|
|
2731
|
-
getCellChildrenNodes: (cell:
|
|
2770
|
+
getCellChildrenNodes: (cell: S2CellType_2) => Node_2_2[];
|
|
2732
2771
|
selectHeaderCell: (selectHeaderCellInfo?: SelectHeaderCellInfo) => boolean;
|
|
2733
2772
|
highlightNodes: (nodes?: Node_2_2[]) => void;
|
|
2734
2773
|
mergeCells: (cellsInfo?: MergedCellInfo[], hideData?: boolean) => void;
|
|
@@ -2742,7 +2781,7 @@ declare class RootInteraction {
|
|
|
2742
2781
|
clearState(): void;
|
|
2743
2782
|
changeState(interactionStateInfo: InteractionStateInfo): void;
|
|
2744
2783
|
updatePanelGroupAllDataCells(): void;
|
|
2745
|
-
updateCells(cells?:
|
|
2784
|
+
updateCells(cells?: S2CellType_2[]): void;
|
|
2746
2785
|
addIntercepts(interceptTypes?: InterceptType[]): void;
|
|
2747
2786
|
hasIntercepts(interceptTypes?: InterceptType[]): boolean;
|
|
2748
2787
|
removeIntercepts(interceptTypes?: InterceptType[]): void;
|
|
@@ -2757,7 +2796,6 @@ declare class RowCell extends HeaderCell {
|
|
|
2757
2796
|
get cellType(): CellTypes;
|
|
2758
2797
|
destroy(): void;
|
|
2759
2798
|
protected initCell(): void;
|
|
2760
|
-
protected drawBackgroundShape(): void;
|
|
2761
2799
|
/**
|
|
2762
2800
|
* 绘制hover悬停,刷选的外框
|
|
2763
2801
|
*/
|
|
@@ -2768,6 +2806,7 @@ declare class RowCell extends HeaderCell {
|
|
|
2768
2806
|
protected getParentTreeIconCfg(): any;
|
|
2769
2807
|
protected drawTreeIcon(): void;
|
|
2770
2808
|
protected drawTreeLeafNodeAlignDot(): void;
|
|
2809
|
+
protected isBolderText(): boolean;
|
|
2771
2810
|
protected drawTextShape(): void;
|
|
2772
2811
|
protected drawLinkFieldShape(): void;
|
|
2773
2812
|
protected drawRectBorder(): void;
|
|
@@ -2775,8 +2814,6 @@ declare class RowCell extends HeaderCell {
|
|
|
2775
2814
|
protected getContentIndent(): number;
|
|
2776
2815
|
protected getTextIndent(): number;
|
|
2777
2816
|
protected isTreeLevel(): any;
|
|
2778
|
-
protected isBolderText(): boolean;
|
|
2779
|
-
protected getTextStyle(): TextTheme;
|
|
2780
2817
|
protected getIconPosition(): {
|
|
2781
2818
|
x: any;
|
|
2782
2819
|
y: any;
|
|
@@ -2866,7 +2903,7 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2> {
|
|
|
2866
2903
|
mappingDisplayDataItem?: MappingDataItemCallback;
|
|
2867
2904
|
}
|
|
2868
2905
|
|
|
2869
|
-
declare type
|
|
2906
|
+
declare type S2CellType_2<T extends SimpleBBox = ViewMeta_2> = DataCell_2 | HeaderCell | ColCell | CornerCell | RowCell | MergedCell | BaseCell<T>;
|
|
2870
2907
|
|
|
2871
2908
|
declare interface S2DataConfig_2 {
|
|
2872
2909
|
data: Data_2[];
|
|
@@ -3108,10 +3145,10 @@ declare interface ScrollSpeedRatio {
|
|
|
3108
3145
|
vertical?: number;
|
|
3109
3146
|
}
|
|
3110
3147
|
|
|
3111
|
-
declare type SelectedHandler = (cells:
|
|
3148
|
+
declare type SelectedHandler = (cells: S2CellType_2[]) => void;
|
|
3112
3149
|
|
|
3113
3150
|
declare interface SelectHeaderCellInfo {
|
|
3114
|
-
cell:
|
|
3151
|
+
cell: S2CellType_2<ViewMeta_2>;
|
|
3115
3152
|
isMultiSelection?: boolean;
|
|
3116
3153
|
}
|
|
3117
3154
|
|
|
@@ -3138,7 +3175,7 @@ declare class SeriesNumberHeader extends BaseHeader<BaseHeaderConfig> {
|
|
|
3138
3175
|
private getTextPadding;
|
|
3139
3176
|
}
|
|
3140
3177
|
|
|
3141
|
-
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">, {
|
|
3178
|
+
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" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
|
|
3142
3179
|
s2Ref: ShallowRef<SheetExpose>;
|
|
3143
3180
|
sheetType: ComputedRef<DefineComponent< {
|
|
3144
3181
|
sheetType: PropType<SheetType>;
|
|
@@ -3167,6 +3204,7 @@ default: Adaptive;
|
|
|
3167
3204
|
};
|
|
3168
3205
|
onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: SheetComponentOptions) => SpreadSheet_2>;
|
|
3169
3206
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
3207
|
+
onMounted: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
3170
3208
|
}, {
|
|
3171
3209
|
s2Ref: ShallowRef<SheetExpose>;
|
|
3172
3210
|
options: S2Options_2<TooltipContentType_2, Pagination_2>;
|
|
@@ -3243,6 +3281,7 @@ hiddenColumnsDetail: HiddenColumnsInfo_2[];
|
|
|
3243
3281
|
}) => void;
|
|
3244
3282
|
beforeRender: () => void;
|
|
3245
3283
|
afterRender: () => void;
|
|
3284
|
+
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
3246
3285
|
destroy: () => void;
|
|
3247
3286
|
layoutResize: (params: ResizeParams_2) => void;
|
|
3248
3287
|
layoutResizeSeriesWidth: (params: ResizeParams_2) => void;
|
|
@@ -3277,7 +3316,7 @@ mouseHover: (event: default_2) => void;
|
|
|
3277
3316
|
mouseUp: (event: MouseEvent) => void;
|
|
3278
3317
|
mouseDown: (event: MouseEvent) => void;
|
|
3279
3318
|
mouseMove: (event: MouseEvent) => void;
|
|
3280
|
-
selected: (cells:
|
|
3319
|
+
selected: (cells: S2CellType_2<ViewMeta_2>[]) => void;
|
|
3281
3320
|
reset: (event: KeyboardEvent) => void;
|
|
3282
3321
|
linkFieldJump: (data: {
|
|
3283
3322
|
key: string;
|
|
@@ -3313,7 +3352,9 @@ default: Adaptive;
|
|
|
3313
3352
|
};
|
|
3314
3353
|
onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: SheetComponentOptions) => SpreadSheet_2>;
|
|
3315
3354
|
onGetSpreadSheet: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
3355
|
+
onMounted: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
3316
3356
|
}>> & {
|
|
3357
|
+
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
3317
3358
|
onSheetUpdate?: (params: S2RenderOptions_2) => any;
|
|
3318
3359
|
onRowCellHover?: (data: TargetCellInfo_2) => any;
|
|
3319
3360
|
onRowCellClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -3418,7 +3459,7 @@ onMouseHover?: (event: default_2) => any;
|
|
|
3418
3459
|
onMouseUp?: (event: MouseEvent) => any;
|
|
3419
3460
|
onMouseDown?: (event: MouseEvent) => any;
|
|
3420
3461
|
onMouseMove?: (event: MouseEvent) => any;
|
|
3421
|
-
onSelected?: (cells:
|
|
3462
|
+
onSelected?: (cells: S2CellType_2<ViewMeta_2>[]) => any;
|
|
3422
3463
|
onReset?: (event: KeyboardEvent) => any;
|
|
3423
3464
|
onLinkFieldJump?: (data: {
|
|
3424
3465
|
key: string;
|
|
@@ -3441,7 +3482,7 @@ showPagination: boolean | {
|
|
|
3441
3482
|
onShowSizeChange?: (pageSize: number) => void;
|
|
3442
3483
|
onChange?: (current: number) => void;
|
|
3443
3484
|
};
|
|
3444
|
-
}> | 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">, {
|
|
3485
|
+
}> | 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" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
|
|
3445
3486
|
s2Ref: ShallowRef<SheetExpose>;
|
|
3446
3487
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
3447
3488
|
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
|
|
@@ -3516,6 +3557,7 @@ hiddenColumnsDetail: HiddenColumnsInfo_2[];
|
|
|
3516
3557
|
}) => void;
|
|
3517
3558
|
beforeRender: () => void;
|
|
3518
3559
|
afterRender: () => void;
|
|
3560
|
+
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
3519
3561
|
destroy: () => void;
|
|
3520
3562
|
layoutResize: (params: ResizeParams_2) => void;
|
|
3521
3563
|
layoutResizeSeriesWidth: (params: ResizeParams_2) => void;
|
|
@@ -3550,7 +3592,7 @@ mouseHover: (event: default_2) => void;
|
|
|
3550
3592
|
mouseUp: (event: MouseEvent) => void;
|
|
3551
3593
|
mouseDown: (event: MouseEvent) => void;
|
|
3552
3594
|
mouseMove: (event: MouseEvent) => void;
|
|
3553
|
-
selected: (cells:
|
|
3595
|
+
selected: (cells: S2CellType_2<ViewMeta_2>[]) => void;
|
|
3554
3596
|
reset: (event: KeyboardEvent) => void;
|
|
3555
3597
|
linkFieldJump: (data: {
|
|
3556
3598
|
key: string;
|
|
@@ -3559,7 +3601,8 @@ record: Data_2;
|
|
|
3559
3601
|
scroll: (position: CellScrollPosition_2) => void;
|
|
3560
3602
|
rowCellBrushSelection: (event: default_2) => void;
|
|
3561
3603
|
colCellBrushSelection: (event: default_2) => void;
|
|
3562
|
-
}, 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">>> & {
|
|
3604
|
+
}, 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" | "onRowCellBrushSelection" | "onColCellBrushSelection">>> & {
|
|
3605
|
+
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
3563
3606
|
onSheetUpdate?: (params: S2RenderOptions_2) => any;
|
|
3564
3607
|
onRowCellHover?: (data: TargetCellInfo_2) => any;
|
|
3565
3608
|
onRowCellClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -3664,7 +3707,7 @@ onMouseHover?: (event: default_2) => any;
|
|
|
3664
3707
|
onMouseUp?: (event: MouseEvent) => any;
|
|
3665
3708
|
onMouseDown?: (event: MouseEvent) => any;
|
|
3666
3709
|
onMouseMove?: (event: MouseEvent) => any;
|
|
3667
|
-
onSelected?: (cells:
|
|
3710
|
+
onSelected?: (cells: S2CellType_2<ViewMeta_2>[]) => any;
|
|
3668
3711
|
onReset?: (event: KeyboardEvent) => any;
|
|
3669
3712
|
onLinkFieldJump?: (data: {
|
|
3670
3713
|
key: string;
|
|
@@ -3749,6 +3792,7 @@ hiddenColumnsDetail: HiddenColumnsInfo_2[];
|
|
|
3749
3792
|
}) => void;
|
|
3750
3793
|
beforeRender: () => void;
|
|
3751
3794
|
afterRender: () => void;
|
|
3795
|
+
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
3752
3796
|
destroy: () => void;
|
|
3753
3797
|
layoutResize: (params: ResizeParams_2) => void;
|
|
3754
3798
|
layoutResizeSeriesWidth: (params: ResizeParams_2) => void;
|
|
@@ -3783,7 +3827,7 @@ mouseHover: (event: default_2) => void;
|
|
|
3783
3827
|
mouseUp: (event: MouseEvent) => void;
|
|
3784
3828
|
mouseDown: (event: MouseEvent) => void;
|
|
3785
3829
|
mouseMove: (event: MouseEvent) => void;
|
|
3786
|
-
selected: (cells:
|
|
3830
|
+
selected: (cells: S2CellType_2<ViewMeta_2>[]) => void;
|
|
3787
3831
|
reset: (event: KeyboardEvent) => void;
|
|
3788
3832
|
linkFieldJump: (data: {
|
|
3789
3833
|
key: string;
|
|
@@ -3792,7 +3836,8 @@ record: Data_2;
|
|
|
3792
3836
|
scroll: (position: CellScrollPosition_2) => void;
|
|
3793
3837
|
rowCellBrushSelection: (event: default_2) => void;
|
|
3794
3838
|
colCellBrushSelection: (event: default_2) => void;
|
|
3795
|
-
}, 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">>> & {
|
|
3839
|
+
}, 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" | "onRowCellBrushSelection" | "onColCellBrushSelection">>> & {
|
|
3840
|
+
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
3796
3841
|
onSheetUpdate?: (params: S2RenderOptions_2) => any;
|
|
3797
3842
|
onRowCellHover?: (data: TargetCellInfo_2) => any;
|
|
3798
3843
|
onRowCellClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -3897,7 +3942,7 @@ onMouseHover?: (event: default_2) => any;
|
|
|
3897
3942
|
onMouseUp?: (event: MouseEvent) => any;
|
|
3898
3943
|
onMouseDown?: (event: MouseEvent) => any;
|
|
3899
3944
|
onMouseMove?: (event: MouseEvent) => any;
|
|
3900
|
-
onSelected?: (cells:
|
|
3945
|
+
onSelected?: (cells: S2CellType_2<ViewMeta_2>[]) => any;
|
|
3901
3946
|
onReset?: (event: KeyboardEvent) => any;
|
|
3902
3947
|
onLinkFieldJump?: (data: {
|
|
3903
3948
|
key: string;
|
|
@@ -3918,7 +3963,7 @@ export declare interface SheetExpose {
|
|
|
3918
3963
|
instance: SpreadSheet | undefined;
|
|
3919
3964
|
}
|
|
3920
3965
|
|
|
3921
|
-
declare type SheetType = 'pivot' | 'table' | 'gridAnalysis' | 'strategy';
|
|
3966
|
+
declare type SheetType = 'pivot' | 'table' | 'gridAnalysis' | 'strategy' | 'editable';
|
|
3922
3967
|
|
|
3923
3968
|
/** render callback */
|
|
3924
3969
|
declare type SheetUpdateCallback = (params: S2RenderOptions) => S2RenderOptions;
|
|
@@ -4106,7 +4151,7 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4106
4151
|
*/
|
|
4107
4152
|
updateScrollOffset(offsetConfig: OffsetConfig): void;
|
|
4108
4153
|
getTooltipDataItemMappingCallback(): MappingDataItemCallback;
|
|
4109
|
-
getCell<T extends
|
|
4154
|
+
getCell<T extends S2CellType_2 = S2CellType_2>(target: Event_2['target']): T;
|
|
4110
4155
|
getCellType(target: Event_2['target']): CellTypes;
|
|
4111
4156
|
/**
|
|
4112
4157
|
* get total's config by dimension id
|
|
@@ -4143,6 +4188,8 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4143
4188
|
* @returns 文本宽度
|
|
4144
4189
|
*/
|
|
4145
4190
|
measureTextWidthRoughly: (text: any, font?: any) => number;
|
|
4191
|
+
updateSortMethodMap(nodeId: string, sortMethod: SortMethod, replace?: boolean): void;
|
|
4192
|
+
getMenuDefaultSelectedKeys(nodeId: string): string[];
|
|
4146
4193
|
}
|
|
4147
4194
|
|
|
4148
4195
|
/**
|
|
@@ -4194,8 +4241,9 @@ declare interface StoreKey {
|
|
|
4194
4241
|
lastRenderedColumnFields: string[];
|
|
4195
4242
|
resized: boolean;
|
|
4196
4243
|
visibleActionIcons: GuiIcon[];
|
|
4197
|
-
lastClickedCell:
|
|
4244
|
+
lastClickedCell: S2CellType_2<ViewMeta_2>;
|
|
4198
4245
|
initOverscrollBehavior: InteractionOptions['overscrollBehavior'];
|
|
4246
|
+
sortMethodMap: Record<string, SortMethod>;
|
|
4199
4247
|
[key: string]: unknown;
|
|
4200
4248
|
}
|
|
4201
4249
|
|
|
@@ -4213,7 +4261,7 @@ declare interface Style {
|
|
|
4213
4261
|
device?: 'pc' | 'mobile';
|
|
4214
4262
|
}
|
|
4215
4263
|
|
|
4216
|
-
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">, {
|
|
4264
|
+
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" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
|
|
4217
4265
|
s2Ref: ShallowRef<SheetExpose>;
|
|
4218
4266
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4219
4267
|
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2>) => SpreadSheet_2;
|
|
@@ -4288,6 +4336,7 @@ hiddenColumnsDetail: HiddenColumnsInfo_2[];
|
|
|
4288
4336
|
}) => void;
|
|
4289
4337
|
beforeRender: () => void;
|
|
4290
4338
|
afterRender: () => void;
|
|
4339
|
+
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
4291
4340
|
destroy: () => void;
|
|
4292
4341
|
layoutResize: (params: ResizeParams_2) => void;
|
|
4293
4342
|
layoutResizeSeriesWidth: (params: ResizeParams_2) => void;
|
|
@@ -4322,7 +4371,7 @@ mouseHover: (event: default_2) => void;
|
|
|
4322
4371
|
mouseUp: (event: MouseEvent) => void;
|
|
4323
4372
|
mouseDown: (event: MouseEvent) => void;
|
|
4324
4373
|
mouseMove: (event: MouseEvent) => void;
|
|
4325
|
-
selected: (cells:
|
|
4374
|
+
selected: (cells: S2CellType_2<ViewMeta_2>[]) => void;
|
|
4326
4375
|
reset: (event: KeyboardEvent) => void;
|
|
4327
4376
|
linkFieldJump: (data: {
|
|
4328
4377
|
key: string;
|
|
@@ -4331,7 +4380,8 @@ record: Data_2;
|
|
|
4331
4380
|
scroll: (position: CellScrollPosition_2) => void;
|
|
4332
4381
|
rowCellBrushSelection: (event: default_2) => void;
|
|
4333
4382
|
colCellBrushSelection: (event: default_2) => void;
|
|
4334
|
-
}, 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">>> & {
|
|
4383
|
+
}, 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" | "onRowCellBrushSelection" | "onColCellBrushSelection">>> & {
|
|
4384
|
+
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
4335
4385
|
onSheetUpdate?: (params: S2RenderOptions_2) => any;
|
|
4336
4386
|
onRowCellHover?: (data: TargetCellInfo_2) => any;
|
|
4337
4387
|
onRowCellClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -4436,7 +4486,7 @@ onMouseHover?: (event: default_2) => any;
|
|
|
4436
4486
|
onMouseUp?: (event: MouseEvent) => any;
|
|
4437
4487
|
onMouseDown?: (event: MouseEvent) => any;
|
|
4438
4488
|
onMouseMove?: (event: MouseEvent) => any;
|
|
4439
|
-
onSelected?: (cells:
|
|
4489
|
+
onSelected?: (cells: S2CellType_2<ViewMeta_2>[]) => any;
|
|
4440
4490
|
onReset?: (event: KeyboardEvent) => any;
|
|
4441
4491
|
onLinkFieldJump?: (data: {
|
|
4442
4492
|
key: string;
|
|
@@ -4450,7 +4500,7 @@ onGetSpreadSheet?: (spreadsheet: SpreadSheet_2) => any;
|
|
|
4450
4500
|
}, {}>;
|
|
4451
4501
|
|
|
4452
4502
|
declare interface TargetCellInfo_2 {
|
|
4453
|
-
target:
|
|
4503
|
+
target: S2CellType_2;
|
|
4454
4504
|
event: Event_2;
|
|
4455
4505
|
viewMeta: Node_2_2;
|
|
4456
4506
|
}
|
|
@@ -4494,7 +4544,7 @@ declare type TooltipContentType_2 = Element | string;
|
|
|
4494
4544
|
|
|
4495
4545
|
declare type TooltipData = {
|
|
4496
4546
|
summaries?: TooltipSummaryOptions[];
|
|
4497
|
-
details?:
|
|
4547
|
+
details?: TooltipDetailListItem[];
|
|
4498
4548
|
headInfo?: TooltipHeadInfo;
|
|
4499
4549
|
name?: string;
|
|
4500
4550
|
tips?: string;
|
|
@@ -4507,9 +4557,15 @@ declare type TooltipData = {
|
|
|
4507
4557
|
|
|
4508
4558
|
declare type TooltipDataItem = Record<string, any>;
|
|
4509
4559
|
|
|
4560
|
+
declare type TooltipDetailListItem = {
|
|
4561
|
+
name: string;
|
|
4562
|
+
value: string | number;
|
|
4563
|
+
icon?: Element | string;
|
|
4564
|
+
};
|
|
4565
|
+
|
|
4510
4566
|
declare type TooltipHeadInfo = {
|
|
4511
|
-
rows:
|
|
4512
|
-
cols:
|
|
4567
|
+
rows: TooltipDetailListItem[];
|
|
4568
|
+
cols: TooltipDetailListItem[];
|
|
4513
4569
|
};
|
|
4514
4570
|
|
|
4515
4571
|
declare type TooltipInterpretationOptions = {
|
|
@@ -4530,14 +4586,15 @@ declare interface TooltipOperatorMenu {
|
|
|
4530
4586
|
key: string;
|
|
4531
4587
|
icon?: Element | string;
|
|
4532
4588
|
text?: string;
|
|
4533
|
-
onClick?: (cell:
|
|
4534
|
-
visible?: boolean | ((cell:
|
|
4589
|
+
onClick?: (cell: S2CellType_2) => void;
|
|
4590
|
+
visible?: boolean | ((cell: S2CellType_2) => boolean);
|
|
4535
4591
|
children?: TooltipOperatorMenu[];
|
|
4536
4592
|
}
|
|
4537
4593
|
|
|
4538
4594
|
declare interface TooltipOperatorOptions {
|
|
4539
4595
|
onClick?: (...args: unknown[]) => void;
|
|
4540
4596
|
menus?: TooltipOperatorMenu[];
|
|
4597
|
+
defaultSelectedKeys?: string[];
|
|
4541
4598
|
}
|
|
4542
4599
|
|
|
4543
4600
|
declare interface TooltipOptions {
|
|
@@ -4548,6 +4605,7 @@ declare interface TooltipOptions {
|
|
|
4548
4605
|
showSingleTips?: boolean;
|
|
4549
4606
|
onlyMenu?: boolean;
|
|
4550
4607
|
enableFormat?: boolean;
|
|
4608
|
+
forceRender?: boolean;
|
|
4551
4609
|
}
|
|
4552
4610
|
|
|
4553
4611
|
declare interface TooltipPosition {
|
|
@@ -4565,7 +4623,7 @@ declare type TooltipShowOptions<T = TooltipContentType_2> = {
|
|
|
4565
4623
|
data?: TooltipData;
|
|
4566
4624
|
cellInfos?: TooltipDataItem[];
|
|
4567
4625
|
options?: TooltipOptions;
|
|
4568
|
-
content?: ((cell:
|
|
4626
|
+
content?: ((cell: S2CellType_2, defaultTooltipShowOptions: TooltipShowOptions<T>) => T) | T;
|
|
4569
4627
|
event?: Event_2 | MouseEvent;
|
|
4570
4628
|
};
|
|
4571
4629
|
|