@antv/s2-vue 2.0.0-next.6 → 2.0.0-next.7
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 -0
- 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 +898 -230
- package/esm/index.js +14 -12
- package/esm/index.js.map +1 -1
- package/esm/style.css +27 -20
- package/lib/index.js +14 -12
- package/lib/index.js.map +1 -1
- package/lib/style.css +27 -20
- package/package.json +1 -1
package/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AllowedComponentProps } from 'vue';
|
|
2
2
|
import { BaseTooltip } from '@antv/s2';
|
|
3
3
|
import { Canvas } from '@antv/g';
|
|
4
|
-
import { CellScrollPosition } from '@antv/s2';
|
|
4
|
+
import type { CellScrollPosition } from '@antv/s2';
|
|
5
5
|
import { ComponentCustomProps } from 'vue';
|
|
6
6
|
import { ComponentOptionsMixin } from 'vue';
|
|
7
7
|
import { ComputedRef } from 'vue';
|
|
@@ -18,6 +18,7 @@ import { GEvent } from '@antv/s2';
|
|
|
18
18
|
import { Group } from '@antv/g';
|
|
19
19
|
import { HiddenColumnsInfo } from '@antv/s2';
|
|
20
20
|
import { ICanvas } from '@antv/g';
|
|
21
|
+
import type { IEventTarget } from '@antv/g';
|
|
21
22
|
import { Image as Image_2 } from '@antv/g';
|
|
22
23
|
import { ImageStyleProps } from '@antv/g';
|
|
23
24
|
import { LayoutResult } from '@antv/s2';
|
|
@@ -41,6 +42,7 @@ import { S2DataConfig } from '@antv/s2';
|
|
|
41
42
|
import { S2MountContainer } from '@antv/s2';
|
|
42
43
|
import { S2Options } from '@antv/s2';
|
|
43
44
|
import { S2RenderOptions } from '@antv/s2';
|
|
45
|
+
import { ScrollOffset } from '@antv/s2';
|
|
44
46
|
import { ShallowRef } from 'vue';
|
|
45
47
|
import { SortParams } from '@antv/s2';
|
|
46
48
|
import { SpreadSheet } from '@antv/s2';
|
|
@@ -54,6 +56,8 @@ import { ViewMeta } from '@antv/s2';
|
|
|
54
56
|
import { ViewMetaData } from '@antv/s2';
|
|
55
57
|
import { VNodeProps } from 'vue';
|
|
56
58
|
|
|
59
|
+
declare type ActionIconName = string | FullyIconName;
|
|
60
|
+
|
|
57
61
|
declare type Adaptive = boolean | {
|
|
58
62
|
width?: boolean;
|
|
59
63
|
height?: boolean;
|
|
@@ -82,6 +86,7 @@ declare interface Background {
|
|
|
82
86
|
color?: string;
|
|
83
87
|
}
|
|
84
88
|
|
|
89
|
+
/** 柱状图样式配置 */
|
|
85
90
|
declare interface BarTheme {
|
|
86
91
|
intervalPadding?: number;
|
|
87
92
|
fill?: string;
|
|
@@ -111,7 +116,7 @@ declare abstract class BaseBBox implements BBox {
|
|
|
111
116
|
declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
112
117
|
protected meta: T;
|
|
113
118
|
protected spreadsheet: SpreadSheet_2;
|
|
114
|
-
protected theme:
|
|
119
|
+
protected theme: InternalFullyTheme;
|
|
115
120
|
protected backgroundShape: Rect | Polygon;
|
|
116
121
|
protected textShape: CustomText;
|
|
117
122
|
protected textShapes: CustomText[];
|
|
@@ -122,21 +127,12 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
122
127
|
protected conditionIntervalShape: Rect | undefined;
|
|
123
128
|
protected conditionIconShape: GuiIcon;
|
|
124
129
|
protected conditionIconShapes: GuiIcon[];
|
|
130
|
+
protected groupedIcons: GroupedIcons;
|
|
125
131
|
protected stateShapes: Map<StateShapeLayer, DisplayObject<any, any>>;
|
|
126
132
|
constructor(meta: T, spreadsheet: SpreadSheet_2, ...restOptions: unknown[]);
|
|
127
133
|
getMeta(): T;
|
|
128
134
|
setMeta(viewMeta: T): void;
|
|
129
|
-
getIconStyle(): IconTheme
|
|
130
|
-
getTextIconPosition(iconCount?: number): {
|
|
131
|
-
text: {
|
|
132
|
-
x: number;
|
|
133
|
-
y: number;
|
|
134
|
-
};
|
|
135
|
-
icon: {
|
|
136
|
-
x: number;
|
|
137
|
-
y: number;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
135
|
+
getIconStyle(): DeepRequired<IconTheme>;
|
|
140
136
|
getActualText(): string;
|
|
141
137
|
getFieldValue(): string;
|
|
142
138
|
/**
|
|
@@ -147,7 +143,7 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
147
143
|
/**
|
|
148
144
|
* Return the type of the cell
|
|
149
145
|
*/
|
|
150
|
-
abstract get cellType():
|
|
146
|
+
abstract get cellType(): CellType;
|
|
151
147
|
/**
|
|
152
148
|
* Determine how to render this cell area
|
|
153
149
|
*/
|
|
@@ -161,13 +157,14 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
161
157
|
protected abstract getFormattedFieldValue(): FormatResult;
|
|
162
158
|
protected abstract getMaxTextWidth(): number;
|
|
163
159
|
protected abstract getTextPosition(): PointLike;
|
|
160
|
+
protected abstract getIconPosition(): PointLike;
|
|
164
161
|
protected abstract findFieldCondition(conditions: Condition[] | undefined): Condition | undefined;
|
|
165
|
-
protected abstract mappingValue(condition: Condition):
|
|
162
|
+
protected abstract mappingValue(condition: Condition): ConditionMappingResult | undefined | null;
|
|
166
163
|
protected shouldInit(): boolean;
|
|
167
|
-
getStyle<K extends keyof
|
|
164
|
+
getStyle<K extends keyof InternalFullyTheme = CellType>(name?: K): InternalFullyTheme[K] | InternalFullyCellTheme;
|
|
168
165
|
getLinkFieldShape(): Line;
|
|
169
166
|
protected getResizeAreaStyle(): ResizeArea;
|
|
170
|
-
protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell: S2CellType_2): boolean | ((
|
|
167
|
+
protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell: S2CellType_2): boolean | ResizeType | ((resizeInfo: ResizeInfo_2) => boolean) | ((cell: S2CellType_2<ViewMeta_2>) => boolean) | undefined;
|
|
171
168
|
getBBoxByType(type?: CellClipBox): SimpleBBox;
|
|
172
169
|
drawBorders(): void;
|
|
173
170
|
/**
|
|
@@ -177,18 +174,17 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
177
174
|
protected abstract getBackgroundColor(): {
|
|
178
175
|
backgroundColor: string | undefined;
|
|
179
176
|
backgroundColorOpacity: number | undefined;
|
|
177
|
+
intelligentReverseTextColor: boolean;
|
|
180
178
|
};
|
|
181
179
|
protected drawBackgroundShape(): void;
|
|
182
180
|
/**
|
|
183
181
|
* 交互使用的背景色
|
|
184
182
|
*/
|
|
185
183
|
protected drawInteractiveBgShape(): void;
|
|
186
|
-
protected getIconPosition(iconCount?: number): {
|
|
187
|
-
x: number;
|
|
188
|
-
y: number;
|
|
189
|
-
};
|
|
190
184
|
protected drawTextShape(): void;
|
|
191
185
|
protected drawLinkFieldShape(showLinkFieldShape: boolean, linkFillColor: string): void;
|
|
186
|
+
protected getLinkFieldStyle(): string;
|
|
187
|
+
protected drawLinkField(meta: Node_2_2 | ViewMeta_2): void;
|
|
192
188
|
updateByState(stateName: InteractionStateName, cell: S2CellType_2): void;
|
|
193
189
|
protected getInteractiveBorderShapeStyle<T>(borderSize: T & number): {
|
|
194
190
|
x: number;
|
|
@@ -207,7 +203,38 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
207
203
|
resetTextAndConditionIconShapes(): void;
|
|
208
204
|
get cellConditions(): Conditions;
|
|
209
205
|
drawConditionIconShapes(): void;
|
|
210
|
-
|
|
206
|
+
getTextConditionMappingResult(): ConditionMappingResult<unknown> | null | undefined;
|
|
207
|
+
getContainConditionMappingResultTextStyle(style: TextTheme | undefined): {
|
|
208
|
+
fill: string;
|
|
209
|
+
minValue?: number | undefined;
|
|
210
|
+
maxValue?: number | undefined;
|
|
211
|
+
icon?: string | undefined;
|
|
212
|
+
isCompare?: boolean | undefined;
|
|
213
|
+
intelligentReverseTextColor?: boolean | undefined;
|
|
214
|
+
fieldValue?: number | undefined;
|
|
215
|
+
fontFamily?: string | undefined;
|
|
216
|
+
fontSize?: number | undefined;
|
|
217
|
+
fontWeight?: number | "bold" | "normal" | "bolder" | "lighter" | undefined;
|
|
218
|
+
linkTextFill?: string | undefined;
|
|
219
|
+
opacity?: number | undefined;
|
|
220
|
+
textAlign?: TextAlign | undefined;
|
|
221
|
+
textBaseline?: TextBaseline | undefined;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* 获取默认字体颜色:根据字段标记背景颜色,设置字体颜色
|
|
225
|
+
* @param textStyle
|
|
226
|
+
* @private
|
|
227
|
+
*/
|
|
228
|
+
protected getDefaultTextFill(textFill: string): string;
|
|
229
|
+
getBackgroundConditionFill(): {
|
|
230
|
+
backgroundColor: string | undefined;
|
|
231
|
+
intelligentReverseTextColor: boolean;
|
|
232
|
+
} | {
|
|
233
|
+
intelligentReverseTextColor: boolean;
|
|
234
|
+
backgroundColor?: undefined;
|
|
235
|
+
};
|
|
236
|
+
getIconConditionResult(): FullyIconName | undefined;
|
|
237
|
+
protected getActionAndConditionIconWidth(position?: IconPosition): number;
|
|
211
238
|
}
|
|
212
239
|
|
|
213
240
|
declare interface BaseCellStyle {
|
|
@@ -309,6 +336,7 @@ declare abstract class BaseDataSet_2 {
|
|
|
309
336
|
*/
|
|
310
337
|
getFieldDescription(field: CustomHeaderField): string | undefined;
|
|
311
338
|
setDataCfg(dataCfg: S2DataConfig_2): void;
|
|
339
|
+
processMeta(meta: Meta[] | undefined, defaultExtraFieldText: string): Meta[];
|
|
312
340
|
getDisplayDataSet(): RawData_2[];
|
|
313
341
|
getValueRangeByField(field: string): ValueRange;
|
|
314
342
|
/** ******************NEED IMPLEMENT BY USER CASE************************ */
|
|
@@ -393,7 +421,11 @@ declare abstract class BaseFacet {
|
|
|
393
421
|
frozenTopGroup: FrozenGroup;
|
|
394
422
|
frozenBottomGroup: FrozenGroup;
|
|
395
423
|
foregroundGroup: Group;
|
|
396
|
-
|
|
424
|
+
/**
|
|
425
|
+
* 当前布局节点信息
|
|
426
|
+
* @description 内部消费, 外部调用请使用 facet.getLayoutResult()
|
|
427
|
+
*/
|
|
428
|
+
private layoutResult;
|
|
397
429
|
viewCellWidths: number[];
|
|
398
430
|
viewCellHeights: ViewCellHeights;
|
|
399
431
|
protected mobileWheel: WheelEvent_2;
|
|
@@ -408,12 +440,14 @@ declare abstract class BaseFacet {
|
|
|
408
440
|
centerFrame: Frame;
|
|
409
441
|
gridInfo: GridInfo;
|
|
410
442
|
protected abstract doLayout(): LayoutResult_2;
|
|
411
|
-
abstract getViewCellHeights(
|
|
443
|
+
abstract getViewCellHeights(): ViewCellHeights;
|
|
444
|
+
abstract getCellMeta(rowIndex: number, colIndex: number): ViewMeta_2 | null;
|
|
412
445
|
protected scrollFrameId: ReturnType<typeof requestAnimationFrame> | null;
|
|
413
|
-
get scrollBarTheme(): ScrollBarTheme
|
|
446
|
+
get scrollBarTheme(): DeepRequired<ScrollBarTheme>;
|
|
414
447
|
get scrollBarSize(): number;
|
|
415
448
|
protected preCellIndexes: PanelIndexes | null;
|
|
416
449
|
constructor(spreadsheet: SpreadSheet_2);
|
|
450
|
+
getLayoutResult: () => LayoutResult_2;
|
|
417
451
|
protected initGroups(): void;
|
|
418
452
|
protected initPanelGroups(): void;
|
|
419
453
|
protected getCellCustomSize(node: Node_2_2 | null, size: CellCustomSize): number | null | undefined;
|
|
@@ -453,8 +487,8 @@ declare abstract class BaseFacet {
|
|
|
453
487
|
updateScrollOffset(offsetConfig: OffsetConfig): void;
|
|
454
488
|
getPaginationScrollY(): number;
|
|
455
489
|
destroy(): void;
|
|
456
|
-
setScrollOffset: (scrollOffset:
|
|
457
|
-
getScrollOffset: () => Required<
|
|
490
|
+
setScrollOffset: (scrollOffset: ScrollOffset_2) => void;
|
|
491
|
+
getScrollOffset: () => Required<ScrollOffset_2>;
|
|
458
492
|
resetScrollX: () => void;
|
|
459
493
|
resetRowScrollX: () => void;
|
|
460
494
|
resetScrollY: () => void;
|
|
@@ -484,12 +518,12 @@ declare abstract class BaseFacet {
|
|
|
484
518
|
scrollImmediately: (offsetConfig?: OffsetConfig) => void;
|
|
485
519
|
/**
|
|
486
520
|
*
|
|
487
|
-
* @param skipScrollEvent
|
|
521
|
+
* @param skipScrollEvent 不触发 S2Event.GLOBAL_SCROLL
|
|
488
522
|
*/
|
|
489
523
|
startScroll: (skipScrollEvent?: boolean) => void;
|
|
490
|
-
getRendererHeight
|
|
524
|
+
private getRendererHeight;
|
|
491
525
|
private getAdjustedScrollOffset;
|
|
492
|
-
renderRowScrollBar
|
|
526
|
+
private renderRowScrollBar;
|
|
493
527
|
getValidScrollBarOffset: (offset: number, maxOffset: number) => number;
|
|
494
528
|
renderHScrollBar: (width: number, realWidth: number, scrollX: number) => void;
|
|
495
529
|
private getScrollbarPosition;
|
|
@@ -516,21 +550,12 @@ declare abstract class BaseFacet {
|
|
|
516
550
|
cancelScrollFrame: () => boolean;
|
|
517
551
|
clearScrollFrameIdOnMobile: () => void;
|
|
518
552
|
/**
|
|
519
|
-
|
|
520
|
-
*
|
|
521
|
-
|
|
522
|
-
*1.
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
*所以只要不为 `auto`, 或者表格内, 都需要阻止外部容器滚动
|
|
526
|
-
*=======
|
|
527
|
-
*https://developer.mozilla.org/zh-CN/docs/Web/CSS/overscroll-behavior
|
|
528
|
-
*阻止外部容器滚动: 表格是虚拟滚动, 这里按照标准模拟浏览器的 [overscroll-behavior] 实现
|
|
529
|
-
*1. auto => 只有在滚动到表格顶部或底部时才触发外部容器滚动
|
|
530
|
-
*1. contain => 默认的滚动边界行为不变(“触底”效果或者刷新),但是临近的滚动区域不会被滚动链影响到
|
|
531
|
-
*2. none => 临近滚动区域不受到滚动链影响,而且默认的滚动到边界的表现也被阻止
|
|
532
|
-
*所以只要不为 `auto`, 或者表格内, 都需要阻止外部容器滚动
|
|
533
|
-
*>>>>>>> next
|
|
553
|
+
* https://developer.mozilla.org/zh-CN/docs/Web/CSS/overscroll-behavior
|
|
554
|
+
* 阻止外部容器滚动: 表格是虚拟滚动, 这里按照标准模拟浏览器的 [overscroll-behavior] 实现
|
|
555
|
+
* 1. auto => 只有在滚动到表格顶部或底部时才触发外部容器滚动
|
|
556
|
+
* 1. contain => 默认的滚动边界行为不变(“触底”效果或者刷新),但是临近的滚动区域不会被滚动链影响到
|
|
557
|
+
* 2. none => 临近滚动区域不受到滚动链影响,而且默认的滚动到边界的表现也被阻止
|
|
558
|
+
* 所以只要不为 `auto`, 或者表格内, 都需要阻止外部容器滚动
|
|
534
559
|
*/
|
|
535
560
|
private stopScrollChainingIfNeeded;
|
|
536
561
|
private stopScrollChaining;
|
|
@@ -586,7 +611,7 @@ declare abstract class BaseFacet {
|
|
|
586
611
|
protected onAfterScroll: DebouncedFunc<() => void>;
|
|
587
612
|
protected saveInitColumnLeafNodes(columnNodes?: Node_2_2[]): void;
|
|
588
613
|
getHiddenColumnsInfo(columnNode: Node_2_2): HiddenColumnsInfo_2 | undefined;
|
|
589
|
-
|
|
614
|
+
updateCustomFieldsSampleNodes(colsHierarchy: Hierarchy): void;
|
|
590
615
|
/**
|
|
591
616
|
* @description 自定义行头时, 叶子节点层级不定, 需要自动对齐其宽度, 填充空白
|
|
592
617
|
* -------------------------------------------------
|
|
@@ -608,12 +633,193 @@ declare abstract class BaseFacet {
|
|
|
608
633
|
*/
|
|
609
634
|
adjustColLeafNodesHeight(params: AdjustLeafNodesParams): void;
|
|
610
635
|
adjustLeafNodesSize(type: 'width' | 'height'): ({ leafNodes, hierarchy }: AdjustLeafNodesParams) => void;
|
|
636
|
+
/**
|
|
637
|
+
* 获取表头节点 (角头,序号, 行头,列头) (含可视区域)
|
|
638
|
+
* @example 获取全部: facet.getHeaderNodes()
|
|
639
|
+
* @example 获取一组 facet.getHeaderNodes(['root[&]浙江省[&]宁波市', 'root[&]浙江省[&]杭州市'])
|
|
640
|
+
*/
|
|
641
|
+
getHeaderNodes(nodeIds?: string[]): Node_2_2[];
|
|
642
|
+
/**
|
|
643
|
+
* 获取角头节点
|
|
644
|
+
*/
|
|
645
|
+
getCornerNodes(): Node_2_2[];
|
|
646
|
+
/**
|
|
647
|
+
* 获取序号节点
|
|
648
|
+
*/
|
|
649
|
+
getSeriesNumberNodes(): Node_2_2[];
|
|
650
|
+
/**
|
|
651
|
+
* 获取列头节点 (含非可视区域)
|
|
652
|
+
* @description 获取列头单元格 (可视区域内) facet.getColCells()
|
|
653
|
+
* @example 获取全部: facet.getColNodes()
|
|
654
|
+
* @example 指定层级: facet.getColNodes(level)
|
|
655
|
+
*/
|
|
656
|
+
getColNodes(level?: number): Node_2_2[];
|
|
657
|
+
/**
|
|
658
|
+
* 根据 id 获取指定列头节点
|
|
659
|
+
* @example facet.getColNodeById('root[&]节点1[&]数值')
|
|
660
|
+
*/
|
|
661
|
+
getColNodeById(nodeId: string): Node_2_2 | undefined;
|
|
662
|
+
/**
|
|
663
|
+
* 根据列头索引获取指定列头节点
|
|
664
|
+
* @example facet.getColNodeByIndex(colIndex)
|
|
665
|
+
*/
|
|
666
|
+
getColNodeByIndex(colIndex: number): Node_2_2 | undefined;
|
|
667
|
+
/**
|
|
668
|
+
* 根据列头索引获取指定列头叶子节点
|
|
669
|
+
* @example facet.getColLeafNodes(colIndex)
|
|
670
|
+
*/
|
|
671
|
+
getColLeafNodeByIndex(colIndex: number): Node_2_2 | undefined;
|
|
672
|
+
/**
|
|
673
|
+
* 根据 field 获取指定列头节点
|
|
674
|
+
* @example facet.getColCellNodeByField('number')
|
|
675
|
+
*/
|
|
676
|
+
getColNodesByField(nodeField: string): Node_2_2[];
|
|
677
|
+
/**
|
|
678
|
+
* 获取列头叶子节点节点 (含非可视区域)
|
|
679
|
+
*/
|
|
680
|
+
getColLeafNodes(): Node_2_2[];
|
|
681
|
+
/**
|
|
682
|
+
* 获取列头小计/总计节点 (含非可视区域)
|
|
683
|
+
* @example 获取全部: facet.getColTotalsNodes()
|
|
684
|
+
* @example 指定层级: facet.getColTotalsNodes(level)
|
|
685
|
+
*/
|
|
686
|
+
getColTotalsNodes(level?: number): Node_2_2[];
|
|
687
|
+
/**
|
|
688
|
+
* 获取列头小计节点 (含非可视区域)
|
|
689
|
+
* @example 获取全部: facet.getColSubTotalsNodes()
|
|
690
|
+
* @example 指定层级: facet.getColSubTotalsNodes(level)
|
|
691
|
+
*/
|
|
692
|
+
getColSubTotalsNodes(level?: number): Node_2_2[];
|
|
693
|
+
/**
|
|
694
|
+
* 获取列头总计节点 (含非可视区域)
|
|
695
|
+
* @example 获取全部: facet.getColGrandTotalsNodes()
|
|
696
|
+
* @example 指定层级: facet.getColGrandTotalsNodes(level)
|
|
697
|
+
*/
|
|
698
|
+
getColGrandTotalsNodes(level?: number): Node_2_2[];
|
|
699
|
+
/**
|
|
700
|
+
* 获取行头节点 (含非可视区域)
|
|
701
|
+
* @description 获取行头单元格 (可视区域内) facet.getRowCells()
|
|
702
|
+
* @example 获取全部: facet.getRowNodes()
|
|
703
|
+
* @example 指定层级: facet.getRowNodes(level)
|
|
704
|
+
*/
|
|
705
|
+
getRowNodes(level?: number): Node_2_2[];
|
|
706
|
+
/**
|
|
707
|
+
* 根据 id 获取单个行头节点
|
|
708
|
+
* @example facet.getRowNodeById('root[&]节点1[&]数值')
|
|
709
|
+
*/
|
|
710
|
+
getRowNodeById(nodeId: string): Node_2_2 | undefined;
|
|
711
|
+
/**
|
|
712
|
+
* 根据行头索引获取指定列头节点
|
|
713
|
+
* @example facet.getRowNodeByIndex(rowIndex)
|
|
714
|
+
*/
|
|
715
|
+
getRowNodeByIndex(rowIndex: number): Node_2_2 | undefined;
|
|
716
|
+
/**
|
|
717
|
+
* 根据行头索引获取指定列头叶子节点
|
|
718
|
+
* @example facet.getRowLeafNodeByIndex(rowIndex)
|
|
719
|
+
*/
|
|
720
|
+
getRowLeafNodeByIndex(rowIndex: number): Node_2_2 | undefined;
|
|
721
|
+
/**
|
|
722
|
+
* 根据 field 获取行头节点
|
|
723
|
+
* @example facet.getRowNodeByField('number')
|
|
724
|
+
*/
|
|
725
|
+
getRowNodesByField(nodeField: string): Node_2_2[];
|
|
726
|
+
/**
|
|
727
|
+
* 获取行头叶子节点节点 (含非可视区域)
|
|
728
|
+
*/
|
|
729
|
+
getRowLeafNodes(): Node_2_2[];
|
|
730
|
+
/**
|
|
731
|
+
* 获取行头小计/总计节点 (含非可视区域)
|
|
732
|
+
* @example 获取全部: facet.getRowTotalsNodes()
|
|
733
|
+
* @example 指定层级: facet.getRowTotalsNodes(level)
|
|
734
|
+
*/
|
|
735
|
+
getRowTotalsNodes(level?: number): Node_2_2[];
|
|
736
|
+
/**
|
|
737
|
+
* 获取行头小计节点 (含非可视区域)
|
|
738
|
+
* @example 获取全部: facet.getRowSubTotalsNodes()
|
|
739
|
+
* @example 指定层级: facet.getRowSubTotalsNodes(level)
|
|
740
|
+
*/
|
|
741
|
+
getRowSubTotalsNodes(level?: number): Node_2_2[];
|
|
742
|
+
/**
|
|
743
|
+
* 获取行头总计节点 (含非可视区域)
|
|
744
|
+
* @example 获取全部: facet.getRowGrandTotalsNodes()
|
|
745
|
+
* @example 指定层级: facet.getRowGrandTotalsNodes(level)
|
|
746
|
+
*/
|
|
747
|
+
getRowGrandTotalsNodes(level?: number): Node_2_2[];
|
|
748
|
+
/**
|
|
749
|
+
* 获取单元格的所有子节点 (含非可视区域)
|
|
750
|
+
* @example
|
|
751
|
+
* const rowCell = facet.getRowCells()[0]
|
|
752
|
+
* facet.getCellChildrenNodes(rowCell)
|
|
753
|
+
*/
|
|
754
|
+
getCellChildrenNodes: (cell: S2CellType_2) => Node_2_2[];
|
|
755
|
+
/**
|
|
756
|
+
* 获取数值单元格 (不含可视区域)
|
|
757
|
+
* @description 由于虚拟滚动, 按需加载的特性, 非可视区域的单元格未被实例化
|
|
758
|
+
* @example 获取非可视区域的数值节点 facet.getCellMeta(rowIndex, colIndex)
|
|
759
|
+
*/
|
|
760
|
+
getDataCells(): DataCell_2[];
|
|
761
|
+
/**
|
|
762
|
+
* 获取行头单元格 (不含可视区域)
|
|
763
|
+
*/
|
|
764
|
+
getRowCells(): RowCell[];
|
|
765
|
+
/**
|
|
766
|
+
* 获取行头叶子节点单元格 (不含可视区域)
|
|
767
|
+
*/
|
|
768
|
+
getRowLeafCells(): RowCell[];
|
|
769
|
+
/**
|
|
770
|
+
* 获取列头单元格 (不含可视区域)
|
|
771
|
+
*/
|
|
772
|
+
getColCells(): ColCell[];
|
|
773
|
+
/**
|
|
774
|
+
* 获取列头叶子节点单元格 (不含可视区域)
|
|
775
|
+
*/
|
|
776
|
+
getColLeafCells(): ColCell[];
|
|
777
|
+
/**
|
|
778
|
+
* 获取合并单元格 (不含可视区域)
|
|
779
|
+
*/
|
|
780
|
+
getMergedCells(): MergedCell[];
|
|
781
|
+
/**
|
|
782
|
+
* 获取角头单元格
|
|
783
|
+
*/
|
|
784
|
+
getCornerCells(): CornerCell[];
|
|
785
|
+
/**
|
|
786
|
+
* 获取序号单元格
|
|
787
|
+
*/
|
|
788
|
+
abstract getSeriesNumberCells(): SeriesNumberCell[] | TableSeriesNumberCell[];
|
|
789
|
+
/**
|
|
790
|
+
* 获取表头单元格 (角头,行头,列头) (不含可视区域)
|
|
791
|
+
* @example 获取全部: facet.getHeaderCells()
|
|
792
|
+
* @example 获取一组 facet.getHeaderCells(['root[&]浙江省[&]宁波市', 'root[&]浙江省[&]杭州市'])
|
|
793
|
+
*/
|
|
794
|
+
getHeaderCells(cellIds?: string[]): S2CellType_2<ViewMeta_2>[];
|
|
795
|
+
/**
|
|
796
|
+
* 根据单元格 id 获取指定单元格 (不含可视区域)
|
|
797
|
+
* @example facet.getCellById('root[&]浙江省[&]宁波市')
|
|
798
|
+
*/
|
|
799
|
+
getCellById(cellId: string): S2CellType_2<ViewMeta_2> | undefined;
|
|
800
|
+
/**
|
|
801
|
+
* 根据单元格 field 获取指定单元格 (不含可视区域)
|
|
802
|
+
* @example facet.getCellByField('city')
|
|
803
|
+
*/
|
|
804
|
+
getCellsByField(cellField: string): S2CellType_2<ViewMeta_2>[];
|
|
805
|
+
/**
|
|
806
|
+
* 获取所有单元格 (角头,行头,列头,数值) (不含可视区域)
|
|
807
|
+
* @example 获取全部: facet.getCells()
|
|
808
|
+
* @example 获取一组 facet.getCells(['root[&]浙江省[&]宁波市', 'root[&]浙江省[&]杭州市'])
|
|
809
|
+
*/
|
|
810
|
+
getCells(cellIds?: string[]): S2CellType_2<ViewMeta_2>[];
|
|
811
|
+
getInitColLeafNodes(): Node_2_2[];
|
|
812
|
+
clearInitColLeafNodes(): void;
|
|
611
813
|
}
|
|
612
814
|
|
|
613
815
|
declare interface BaseFields {
|
|
816
|
+
/** 行头字段 */
|
|
614
817
|
rows?: CustomHeaderFields;
|
|
818
|
+
/** 列头字段 */
|
|
615
819
|
columns?: CustomHeaderFields;
|
|
820
|
+
/** 数值字段 */
|
|
616
821
|
values?: string[];
|
|
822
|
+
/** 数值是否置于列头 (透视表有效) */
|
|
617
823
|
valueInCols?: boolean;
|
|
618
824
|
}
|
|
619
825
|
|
|
@@ -641,10 +847,10 @@ declare abstract class BaseHeader<T extends BaseHeaderConfig> extends Group {
|
|
|
641
847
|
onScrollXY(scrollX: number, scrollY: number, type: string): void;
|
|
642
848
|
/**
|
|
643
849
|
* Only call when hRowScrollBar scrolls
|
|
644
|
-
* @param
|
|
850
|
+
* @param rowHeaderScrollX hRowScrollbar horizontal offset
|
|
645
851
|
* @param type
|
|
646
852
|
*/
|
|
647
|
-
onRowScrollX(
|
|
853
|
+
onRowScrollX(rowHeaderScrollX: number, type: string): void;
|
|
648
854
|
protected abstract layout(): void;
|
|
649
855
|
protected abstract offset(): void;
|
|
650
856
|
protected abstract clip(): void;
|
|
@@ -770,7 +976,7 @@ rowCellMouseUp: (data: TargetCellInfo) => void;
|
|
|
770
976
|
rowCellMouseMove: (data: TargetCellInfo) => void;
|
|
771
977
|
rowCellCollapsed: (params: RowCellCollapsedParams) => void;
|
|
772
978
|
rowCellAllCollapsed: (isCollapsed: boolean) => void;
|
|
773
|
-
rowCellScroll: (position:
|
|
979
|
+
rowCellScroll: (position: Required<ScrollOffset>) => void;
|
|
774
980
|
colCellHover: (data: TargetCellInfo) => void;
|
|
775
981
|
colCellClick: (data: TargetCellInfo) => void;
|
|
776
982
|
colCellDoubleClick: (data: TargetCellInfo) => void;
|
|
@@ -859,7 +1065,7 @@ linkFieldJump: (data: {
|
|
|
859
1065
|
field: string;
|
|
860
1066
|
record: RawData;
|
|
861
1067
|
}) => void;
|
|
862
|
-
scroll: (position:
|
|
1068
|
+
scroll: (position: Required<ScrollOffset>) => void;
|
|
863
1069
|
layoutAfterRealDataCellRender: (options: {
|
|
864
1070
|
add: [number, number][];
|
|
865
1071
|
remove: [number, number][];
|
|
@@ -905,7 +1111,7 @@ onRowCellMouseUp?: (data: TargetCellInfo) => any;
|
|
|
905
1111
|
onRowCellMouseMove?: (data: TargetCellInfo) => any;
|
|
906
1112
|
onRowCellCollapsed?: (params: RowCellCollapsedParams) => any;
|
|
907
1113
|
onRowCellAllCollapsed?: (isCollapsed: boolean) => any;
|
|
908
|
-
onRowCellScroll?: (position:
|
|
1114
|
+
onRowCellScroll?: (position: Required<ScrollOffset>) => any;
|
|
909
1115
|
onColCellHover?: (data: TargetCellInfo) => any;
|
|
910
1116
|
onColCellClick?: (data: TargetCellInfo) => any;
|
|
911
1117
|
onColCellDoubleClick?: (data: TargetCellInfo) => any;
|
|
@@ -994,7 +1200,7 @@ onLinkFieldJump?: (data: {
|
|
|
994
1200
|
field: string;
|
|
995
1201
|
record: RawData;
|
|
996
1202
|
}) => any;
|
|
997
|
-
onScroll?: (position:
|
|
1203
|
+
onScroll?: (position: Required<ScrollOffset>) => any;
|
|
998
1204
|
onLayoutAfterRealDataCellRender?: (options: {
|
|
999
1205
|
add: [number, number][];
|
|
1000
1206
|
remove: [number, number][];
|
|
@@ -1152,7 +1358,7 @@ declare class BaseTooltip_2 {
|
|
|
1152
1358
|
options: TooltipShowOptions;
|
|
1153
1359
|
position: TooltipPosition;
|
|
1154
1360
|
constructor(spreadsheet: SpreadSheet_2);
|
|
1155
|
-
show<T = Element | string>(
|
|
1361
|
+
show<T = Element | string>(options: TooltipShowOptions<T>): void;
|
|
1156
1362
|
hide(): void;
|
|
1157
1363
|
destroy(): void;
|
|
1158
1364
|
renderContent<T = TooltipContentType_2>(content: T): void;
|
|
@@ -1163,14 +1369,47 @@ declare class BaseTooltip_2 {
|
|
|
1163
1369
|
}
|
|
1164
1370
|
|
|
1165
1371
|
declare interface BaseTooltipConfig<T = TooltipContentType_2, Icon = Element | string, Text = string> {
|
|
1166
|
-
|
|
1372
|
+
/**
|
|
1373
|
+
* 是否开启 tooltip, 在点击/悬停/停留/刷选/多选等场景会显示
|
|
1374
|
+
* @description @antv/s2 中只保留了 tooltip 的核心显隐逻辑,提供相应数据,不渲染内容
|
|
1375
|
+
* React 版本 和 Vue3 版本中通过 自定义 Tooltip 类 的方式渲染 tooltip 的内容,包括 排序下拉菜单, 单元格选中信息汇总, 列头隐藏按钮 等。
|
|
1376
|
+
* @see https://s2.antv.antgroup.com/manual/basic/tooltip
|
|
1377
|
+
*/
|
|
1378
|
+
enable?: boolean;
|
|
1379
|
+
/**
|
|
1380
|
+
* 自定义内容
|
|
1381
|
+
* @see https://s2.antv.antgroup.com/manual/basic/tooltip#%E8%87%AA%E5%AE%9A%E4%B9%89
|
|
1382
|
+
*/
|
|
1167
1383
|
content?: TooltipShowOptions<T>['content'];
|
|
1384
|
+
/**
|
|
1385
|
+
* 自定义操作项
|
|
1386
|
+
* @see https://s2.antv.antgroup.com/manual/basic/tooltip#%E8%87%AA%E5%AE%9A%E4%B9%89
|
|
1387
|
+
*/
|
|
1168
1388
|
operation?: TooltipOperation<Icon, Text>;
|
|
1389
|
+
/**
|
|
1390
|
+
* 显示边界, 当 tooltip 超过边界时自动调整显示位置,container: 图表区域,body: 整个浏览器窗口,设置为 `null` 可关闭此功能
|
|
1391
|
+
*/
|
|
1169
1392
|
autoAdjustBoundary?: TooltipAutoAdjustBoundary;
|
|
1170
|
-
|
|
1393
|
+
/**
|
|
1394
|
+
* 自定义 Tooltip 类
|
|
1395
|
+
* @see https://s2.antv.antgroup.com/zh/examples/react-component/tooltip/#custom-tooltip
|
|
1396
|
+
*/
|
|
1397
|
+
render?: (spreadsheet: SpreadSheet_2) => BaseTooltip_2;
|
|
1398
|
+
/**
|
|
1399
|
+
* 自定义坐标
|
|
1400
|
+
*/
|
|
1171
1401
|
adjustPosition?: (positionInfo: TooltipPositionInfo) => TooltipPosition;
|
|
1402
|
+
/**
|
|
1403
|
+
* 自定义挂载容器, 默认 body
|
|
1404
|
+
*/
|
|
1172
1405
|
getContainer?: () => HTMLElement;
|
|
1406
|
+
/**
|
|
1407
|
+
* 容器类名
|
|
1408
|
+
*/
|
|
1173
1409
|
className?: string | string[];
|
|
1410
|
+
/**
|
|
1411
|
+
* 容器样式
|
|
1412
|
+
*/
|
|
1174
1413
|
style?: CSS_2.Properties;
|
|
1175
1414
|
}
|
|
1176
1415
|
|
|
@@ -1186,24 +1425,31 @@ declare interface BBox {
|
|
|
1186
1425
|
}
|
|
1187
1426
|
|
|
1188
1427
|
declare interface BrushSelection {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1428
|
+
dataCell?: boolean;
|
|
1429
|
+
rowCell?: boolean;
|
|
1430
|
+
colCell?: boolean;
|
|
1192
1431
|
}
|
|
1193
1432
|
|
|
1433
|
+
/** 子弹图样式配置 */
|
|
1194
1434
|
declare interface BulletTheme {
|
|
1435
|
+
/** 进度条 */
|
|
1195
1436
|
progressBar: {
|
|
1437
|
+
/** 子弹图宽度相对单元格 content 占比,小数 */
|
|
1196
1438
|
widthPercent: number;
|
|
1197
1439
|
height: number;
|
|
1440
|
+
/** 内高度 */
|
|
1198
1441
|
innerHeight: number;
|
|
1199
1442
|
};
|
|
1443
|
+
/** 测量标记线 */
|
|
1200
1444
|
comparativeMeasure: {
|
|
1201
1445
|
width: number;
|
|
1202
1446
|
height: number;
|
|
1203
1447
|
fill?: string;
|
|
1204
1448
|
opacity?: number;
|
|
1205
1449
|
};
|
|
1450
|
+
/** 子弹图状态颜色 */
|
|
1206
1451
|
rangeColors: RangeColors;
|
|
1452
|
+
/** 子弹图背景色 */
|
|
1207
1453
|
backgroundColor: string;
|
|
1208
1454
|
}
|
|
1209
1455
|
|
|
@@ -1224,7 +1470,9 @@ declare interface BulletValue {
|
|
|
1224
1470
|
}
|
|
1225
1471
|
|
|
1226
1472
|
declare interface CalcTotals {
|
|
1473
|
+
/** 聚合方式 */
|
|
1227
1474
|
aggregation?: Aggregation;
|
|
1475
|
+
/** 自定义计算 */
|
|
1228
1476
|
calcFunc?: (query: Query, arr: CellData[]) => number;
|
|
1229
1477
|
}
|
|
1230
1478
|
|
|
@@ -1287,13 +1535,13 @@ declare interface CellDataParams {
|
|
|
1287
1535
|
isRow?: boolean;
|
|
1288
1536
|
}
|
|
1289
1537
|
|
|
1290
|
-
declare type CellEventTarget = FederatedPointerEvent['target'] | null | undefined;
|
|
1538
|
+
declare type CellEventTarget = FederatedPointerEvent['target'] | null | undefined | EventTarget | IEventTarget;
|
|
1291
1539
|
|
|
1292
1540
|
declare interface CellMeta {
|
|
1293
1541
|
id: string;
|
|
1294
1542
|
colIndex: number;
|
|
1295
1543
|
rowIndex: number;
|
|
1296
|
-
type:
|
|
1544
|
+
type: CellType;
|
|
1297
1545
|
rowQuery?: Record<string, any>;
|
|
1298
1546
|
[key: string]: unknown;
|
|
1299
1547
|
}
|
|
@@ -1306,51 +1554,55 @@ declare interface CellScrollOffset {
|
|
|
1306
1554
|
offsetY: number;
|
|
1307
1555
|
}
|
|
1308
1556
|
|
|
1309
|
-
declare
|
|
1310
|
-
scrollX: number;
|
|
1311
|
-
scrollY: number;
|
|
1312
|
-
}
|
|
1557
|
+
declare type CellScrollPosition_2 = Required<ScrollOffset_2>;
|
|
1313
1558
|
|
|
1314
1559
|
declare interface CellTheme {
|
|
1560
|
+
/** 奇数行单元格背景色 */
|
|
1315
1561
|
crossBackgroundColor?: string;
|
|
1562
|
+
/** 单元格背景色 */
|
|
1316
1563
|
backgroundColor?: string;
|
|
1564
|
+
/** 单元格背景色透明度 */
|
|
1317
1565
|
backgroundColorOpacity?: number;
|
|
1566
|
+
/** 单元格水平边线颜色 */
|
|
1318
1567
|
horizontalBorderColor?: string;
|
|
1568
|
+
/** 单元格水平边线颜色透明度 */
|
|
1319
1569
|
horizontalBorderColorOpacity?: number;
|
|
1570
|
+
/** 单元格垂直边线颜色 */
|
|
1320
1571
|
verticalBorderColor?: string;
|
|
1572
|
+
/** 单元格垂直边线颜色透明度 */
|
|
1321
1573
|
verticalBorderColorOpacity?: number;
|
|
1574
|
+
/** 单元格水平边线宽度 */
|
|
1322
1575
|
horizontalBorderWidth?: number;
|
|
1576
|
+
/** 单元格垂直边线宽度 */
|
|
1323
1577
|
verticalBorderWidth?: number;
|
|
1578
|
+
/** 单元格内边距 */
|
|
1324
1579
|
padding?: Padding;
|
|
1580
|
+
/** 交互态 */
|
|
1325
1581
|
interactionState?: InteractionState;
|
|
1326
1582
|
}
|
|
1327
1583
|
|
|
1328
1584
|
declare type CellThemes = {
|
|
1329
|
-
[K in
|
|
1585
|
+
[K in CellType]?: DefaultCellTheme;
|
|
1330
1586
|
};
|
|
1331
1587
|
|
|
1332
|
-
declare enum
|
|
1588
|
+
declare enum CellType {
|
|
1333
1589
|
DATA_CELL = "dataCell",
|
|
1334
|
-
HEADER_CELL = "headerCell",
|
|
1335
1590
|
ROW_CELL = "rowCell",
|
|
1336
1591
|
COL_CELL = "colCell",
|
|
1592
|
+
SERIES_NUMBER_CELL = "seriesNumberCell",
|
|
1337
1593
|
CORNER_CELL = "cornerCell",
|
|
1338
1594
|
MERGED_CELL = "mergedCell"
|
|
1339
1595
|
}
|
|
1340
1596
|
|
|
1341
1597
|
declare class ColCell extends HeaderCell {
|
|
1342
1598
|
protected headerConfig: ColHeaderConfig;
|
|
1343
|
-
|
|
1344
|
-
protected iconPosition: PointLike;
|
|
1345
|
-
get cellType(): CellTypes;
|
|
1599
|
+
get cellType(): CellType;
|
|
1346
1600
|
protected getBorderPositions(): CellBorderPosition[];
|
|
1347
1601
|
protected initCell(): void;
|
|
1348
1602
|
protected getFormattedFieldValue(): FormatResult;
|
|
1349
1603
|
protected getMaxTextWidth(): number;
|
|
1350
1604
|
protected isBolderText(): boolean;
|
|
1351
1605
|
protected getTextPosition(): PointLike;
|
|
1352
|
-
protected getIconPosition(): PointLike;
|
|
1353
|
-
protected getActionIconsWidth(): number;
|
|
1354
1606
|
protected getColResizeArea(): Group | undefined;
|
|
1355
1607
|
protected getHorizontalResizeAreaName(): string;
|
|
1356
1608
|
/**
|
|
@@ -1429,13 +1681,31 @@ declare interface ColHeaderConfig extends BaseHeaderConfig {
|
|
|
1429
1681
|
/**
|
|
1430
1682
|
* One field can hold a condition
|
|
1431
1683
|
*/
|
|
1432
|
-
declare interface Condition {
|
|
1684
|
+
declare interface Condition<T = unknown> {
|
|
1433
1685
|
field?: string | RegExp;
|
|
1434
|
-
mapping:
|
|
1686
|
+
mapping: ConditionMapping<T>;
|
|
1435
1687
|
}
|
|
1436
1688
|
|
|
1689
|
+
declare type ConditionMapping<T = unknown> = (fieldValue: number | string, data: RawData_2, cell?: DataCell_2 | HeaderCell) => ConditionMappingResult<T> | undefined | null;
|
|
1690
|
+
|
|
1691
|
+
declare type ConditionMappingResult<T = unknown> = ValueRange & T & {
|
|
1692
|
+
icon?: string;
|
|
1693
|
+
fill?: string;
|
|
1694
|
+
isCompare?: boolean;
|
|
1695
|
+
/**
|
|
1696
|
+
* @description only used in background condition, when the background color is too light, the font color will be white
|
|
1697
|
+
* @version 1.34.0
|
|
1698
|
+
*/
|
|
1699
|
+
intelligentReverseTextColor?: boolean;
|
|
1700
|
+
/**
|
|
1701
|
+
* @description custom the interval condition's width
|
|
1702
|
+
* @version 1.38.0
|
|
1703
|
+
*/
|
|
1704
|
+
fieldValue?: number;
|
|
1705
|
+
};
|
|
1706
|
+
|
|
1437
1707
|
declare interface Conditions {
|
|
1438
|
-
text?:
|
|
1708
|
+
text?: TextCondition[];
|
|
1439
1709
|
background?: Condition[];
|
|
1440
1710
|
interval?: Condition[];
|
|
1441
1711
|
icon?: IconCondition[];
|
|
@@ -1470,7 +1740,7 @@ declare class CornerCell extends HeaderCell {
|
|
|
1470
1740
|
cornerType: CornerNodeType;
|
|
1471
1741
|
protected headerConfig: CornerHeaderConfig;
|
|
1472
1742
|
protected isBolderText(): boolean;
|
|
1473
|
-
get cellType():
|
|
1743
|
+
get cellType(): CellType;
|
|
1474
1744
|
protected getBorderPositions(): CellBorderPosition[];
|
|
1475
1745
|
update(): void;
|
|
1476
1746
|
protected initCell(): void;
|
|
@@ -1483,7 +1753,6 @@ declare class CornerCell extends HeaderCell {
|
|
|
1483
1753
|
protected getResizeAreaEffect(): ResizeAreaEffect.Field | ResizeAreaEffect.Tree | ResizeAreaEffect.Series;
|
|
1484
1754
|
protected drawResizeArea(): void;
|
|
1485
1755
|
protected showTreeIcon(): boolean;
|
|
1486
|
-
protected getIconPosition(): PointLike;
|
|
1487
1756
|
protected getTreeIconWidth(): number;
|
|
1488
1757
|
protected getTextStyle(): TextTheme;
|
|
1489
1758
|
protected getMaxTextWidth(): number;
|
|
@@ -1554,7 +1823,13 @@ declare interface CustomInteraction {
|
|
|
1554
1823
|
}
|
|
1555
1824
|
|
|
1556
1825
|
declare interface CustomSVGIcon {
|
|
1826
|
+
/** icon 名称 */
|
|
1557
1827
|
name: string;
|
|
1828
|
+
/**
|
|
1829
|
+
* 1、base 64
|
|
1830
|
+
* 2、svg本地文件(兼容老方式,可以改颜色)
|
|
1831
|
+
* 3、线上支持的图片地址
|
|
1832
|
+
*/
|
|
1558
1833
|
svg: string;
|
|
1559
1834
|
}
|
|
1560
1835
|
|
|
@@ -1611,7 +1886,8 @@ declare type Data = (RawData_2 & ExtraData) | undefined | null;
|
|
|
1611
1886
|
* 3、left rect area is interval(in left) and text(in right)
|
|
1612
1887
|
*/
|
|
1613
1888
|
declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
1614
|
-
|
|
1889
|
+
iconPosition: PointLike;
|
|
1890
|
+
get cellType(): CellType;
|
|
1615
1891
|
protected getBorderPositions(): CellBorderPosition[];
|
|
1616
1892
|
get valueRangeByField(): ValueRange;
|
|
1617
1893
|
protected handleByStateName(cells: CellMeta[], stateName: InteractionStateName): void;
|
|
@@ -1620,27 +1896,19 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
|
1620
1896
|
protected handleHover(cells: CellMeta[]): void;
|
|
1621
1897
|
update(): void;
|
|
1622
1898
|
setMeta(viewMeta: ViewMeta_2): void;
|
|
1899
|
+
protected drawTextShape(): void;
|
|
1623
1900
|
protected initCell(): void;
|
|
1624
|
-
|
|
1625
|
-
* 获取默认字体颜色:根据字段标记背景颜色,设置字体颜色
|
|
1626
|
-
* @param textStyle
|
|
1627
|
-
* @private
|
|
1628
|
-
*/
|
|
1629
|
-
private getDefaultTextFill;
|
|
1901
|
+
protected generateIconConfig(): void;
|
|
1630
1902
|
protected getTextStyle(): TextTheme;
|
|
1631
|
-
getIconStyle(): IconStyle | undefined;
|
|
1632
1903
|
protected drawConditionIntervalShape(): void;
|
|
1633
1904
|
protected shouldHideRowSubtotalData(): boolean;
|
|
1634
1905
|
protected getFormattedFieldValue(): FormatResult;
|
|
1635
1906
|
protected getMaxTextWidth(): number;
|
|
1636
1907
|
protected getTextPosition(): PointLike;
|
|
1908
|
+
protected getIconPosition(): PointLike;
|
|
1637
1909
|
getBackgroundColor(): {
|
|
1638
|
-
backgroundColor: string
|
|
1639
|
-
backgroundColorOpacity: number
|
|
1640
|
-
intelligentReverseTextColor?: undefined;
|
|
1641
|
-
} | {
|
|
1642
|
-
backgroundColor: string | undefined;
|
|
1643
|
-
backgroundColorOpacity: number | undefined;
|
|
1910
|
+
backgroundColor: string;
|
|
1911
|
+
backgroundColorOpacity: number;
|
|
1644
1912
|
intelligentReverseTextColor: boolean;
|
|
1645
1913
|
};
|
|
1646
1914
|
protected changeRowColSelectState(indexType: ViewMetaIndexType): void;
|
|
@@ -1657,7 +1925,7 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
|
1657
1925
|
* Mapping value to get condition related attrs
|
|
1658
1926
|
* @param condition
|
|
1659
1927
|
*/
|
|
1660
|
-
mappingValue(condition: Condition):
|
|
1928
|
+
mappingValue(condition: Condition): ConditionMappingResult | undefined | null;
|
|
1661
1929
|
updateByState(stateName: InteractionStateName): void;
|
|
1662
1930
|
clearUnselectedState(): void;
|
|
1663
1931
|
private toggleConditionIntervalShapeOpacity;
|
|
@@ -1666,14 +1934,30 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
|
1666
1934
|
declare type DataCellCallback = (viewMeta: ViewMeta_2) => S2CellType_2;
|
|
1667
1935
|
|
|
1668
1936
|
declare interface DataCellStyle {
|
|
1937
|
+
/**
|
|
1938
|
+
* 宽度
|
|
1939
|
+
*/
|
|
1669
1940
|
width?: number;
|
|
1941
|
+
/**
|
|
1942
|
+
* 高度
|
|
1943
|
+
*/
|
|
1670
1944
|
height?: number;
|
|
1671
1945
|
/**
|
|
1672
1946
|
* 多列数值配置
|
|
1673
1947
|
*/
|
|
1674
1948
|
valuesCfg?: {
|
|
1949
|
+
/**
|
|
1950
|
+
* 原始值字段
|
|
1951
|
+
*/
|
|
1675
1952
|
originalValueField?: string;
|
|
1953
|
+
/**
|
|
1954
|
+
* 每一列数值占单元格宽度百分比
|
|
1955
|
+
* @example [0.1, 0.3, 0.6]
|
|
1956
|
+
*/
|
|
1676
1957
|
widthPercent?: number[];
|
|
1958
|
+
/**
|
|
1959
|
+
* 是否显示原始值 (tooltip 中显示)
|
|
1960
|
+
*/
|
|
1677
1961
|
showOriginalValue?: boolean;
|
|
1678
1962
|
};
|
|
1679
1963
|
}
|
|
@@ -1682,14 +1966,26 @@ declare type DataItem = SimpleData | MultiData | Record<string, unknown> | undef
|
|
|
1682
1966
|
|
|
1683
1967
|
declare type DataPath = (number | string)[];
|
|
1684
1968
|
|
|
1969
|
+
declare type DeepRequired<T extends Record<string, any>> = {
|
|
1970
|
+
[K in keyof T]-?: NonNullable<T[K]> extends Record<string, any> ? DeepRequired<NonNullable<T[K]>> : NonNullable<T[K]>;
|
|
1971
|
+
};
|
|
1972
|
+
|
|
1685
1973
|
declare interface DefaultCellTheme extends GridAnalysisCellTheme {
|
|
1974
|
+
/** 粗体文本样式 */
|
|
1686
1975
|
bolderText?: TextTheme;
|
|
1976
|
+
/** 文本样式 */
|
|
1687
1977
|
text?: TextTheme;
|
|
1978
|
+
/** 序号样式 */
|
|
1688
1979
|
seriesText?: TextTheme;
|
|
1980
|
+
/** 度量值文本样式 */
|
|
1689
1981
|
measureText?: TextTheme;
|
|
1982
|
+
/** 单元格样式 */
|
|
1690
1983
|
cell?: CellTheme;
|
|
1984
|
+
/** 图标样式 */
|
|
1691
1985
|
icon?: IconTheme;
|
|
1986
|
+
/** mini 图样式配置 */
|
|
1692
1987
|
miniChart?: MiniChartTheme;
|
|
1988
|
+
/** 序号列宽 */
|
|
1693
1989
|
seriesNumberWidth?: number;
|
|
1694
1990
|
}
|
|
1695
1991
|
|
|
@@ -1788,7 +2084,7 @@ declare interface EmitterType {
|
|
|
1788
2084
|
total: number;
|
|
1789
2085
|
current: number;
|
|
1790
2086
|
}) => void;
|
|
1791
|
-
[S2Event.LAYOUT_AFTER_HEADER_LAYOUT]: (
|
|
2087
|
+
[S2Event.LAYOUT_AFTER_HEADER_LAYOUT]: (layoutResult: LayoutResult_2) => void;
|
|
1792
2088
|
[S2Event.LAYOUT_AFTER_REAL_DATA_CELL_RENDER]: (options: {
|
|
1793
2089
|
add: [number, number][];
|
|
1794
2090
|
remove: [number, number][];
|
|
@@ -1823,6 +2119,7 @@ declare class EventController {
|
|
|
1823
2119
|
private onKeyboardCopy;
|
|
1824
2120
|
private onKeyboardEsc;
|
|
1825
2121
|
private resetSheetStyle;
|
|
2122
|
+
private isMouseEvent;
|
|
1826
2123
|
private isMouseOnTheCanvasContainer;
|
|
1827
2124
|
private getContainerRect;
|
|
1828
2125
|
private isMouseOnTheTooltip;
|
|
@@ -1877,6 +2174,9 @@ declare type ExtraData = {
|
|
|
1877
2174
|
};
|
|
1878
2175
|
|
|
1879
2176
|
declare interface Fields extends BaseFields {
|
|
2177
|
+
/**
|
|
2178
|
+
* 自定义指标维度在行列头中的层级顺序 (即 `values` 的 顺序,从 `0` 开始
|
|
2179
|
+
*/
|
|
1880
2180
|
customValueOrder?: number;
|
|
1881
2181
|
}
|
|
1882
2182
|
|
|
@@ -1932,7 +2232,12 @@ declare interface FrameConfig {
|
|
|
1932
2232
|
declare class FrozenGroup extends GridGroup {
|
|
1933
2233
|
}
|
|
1934
2234
|
|
|
1935
|
-
declare type
|
|
2235
|
+
declare type FullyIconName = {
|
|
2236
|
+
name: string;
|
|
2237
|
+
position: IconPosition;
|
|
2238
|
+
fill?: string;
|
|
2239
|
+
isConditionIcon?: boolean;
|
|
2240
|
+
};
|
|
1936
2241
|
|
|
1937
2242
|
declare type GetInitProps<T, OptionalKeys = GetOptionalKeys<T>> = {
|
|
1938
2243
|
[K in keyof T as IsEmitKey<T[K]> extends true ? never : K]-?: K extends OptionalKeys ? PropOption<NonNullable<T[K]>> : RequiredPropOption<NonNullable<T[K]>>;
|
|
@@ -1943,7 +2248,9 @@ declare type GetOptionalKeys<T> = keyof {
|
|
|
1943
2248
|
};
|
|
1944
2249
|
|
|
1945
2250
|
declare interface GridAnalysisCellTheme {
|
|
2251
|
+
/** 次级文本,如副指标 */
|
|
1946
2252
|
minorText?: TextTheme;
|
|
2253
|
+
/** 衍生指标 */
|
|
1947
2254
|
derivedMeasureText?: {
|
|
1948
2255
|
mainUp: string;
|
|
1949
2256
|
mainDown: string;
|
|
@@ -1971,6 +2278,10 @@ declare interface GridInfo {
|
|
|
1971
2278
|
rows: number[];
|
|
1972
2279
|
}
|
|
1973
2280
|
|
|
2281
|
+
declare type GroupedIcons = {
|
|
2282
|
+
[key in IconPosition]: FullyIconName[];
|
|
2283
|
+
};
|
|
2284
|
+
|
|
1974
2285
|
/**
|
|
1975
2286
|
* 使用 iconfont 上的 svg 来创建 Icon
|
|
1976
2287
|
*/
|
|
@@ -1979,7 +2290,7 @@ declare class GuiIcon extends Group {
|
|
|
1979
2290
|
iconImageShape: CustomImage;
|
|
1980
2291
|
private cfg;
|
|
1981
2292
|
constructor(cfg: GuiIconCfg);
|
|
1982
|
-
|
|
2293
|
+
getImage(name: string, cacheKey: string, fill?: string): Promise<HTMLImageElement>;
|
|
1983
2294
|
/**
|
|
1984
2295
|
* 1. https://xxx.svg
|
|
1985
2296
|
* 2. http://xxx.svg
|
|
@@ -1987,6 +2298,10 @@ declare class GuiIcon extends Group {
|
|
|
1987
2298
|
*/
|
|
1988
2299
|
isOnlineLink: (src: string) => boolean;
|
|
1989
2300
|
private render;
|
|
2301
|
+
setImageAttrs(attrs: Partial<{
|
|
2302
|
+
name: string;
|
|
2303
|
+
fill: string;
|
|
2304
|
+
}>): void;
|
|
1990
2305
|
}
|
|
1991
2306
|
|
|
1992
2307
|
declare interface GuiIconCfg extends Omit<ImageStyleProps, 'fill'> {
|
|
@@ -2017,11 +2332,19 @@ declare class HdAdapter {
|
|
|
2017
2332
|
}
|
|
2018
2333
|
|
|
2019
2334
|
declare interface HeaderActionIcon {
|
|
2020
|
-
|
|
2021
|
-
|
|
2335
|
+
/**
|
|
2336
|
+
* 已注册的 icon 类型或自定义的 icon 类型名
|
|
2337
|
+
* 如果是 string[], 则默认 icon 位置为右侧
|
|
2338
|
+
*/
|
|
2339
|
+
icons: ActionIconName[];
|
|
2340
|
+
belongsCell: Omit<CellType, 'dataCell'>;
|
|
2341
|
+
/** 是否默认隐藏, true 为 hover后显示, false 为一直显示 */
|
|
2022
2342
|
defaultHide?: boolean | ((meta: Node_2_2, iconName: string) => boolean);
|
|
2343
|
+
/** 是否展示当前 iconNames 配置的 icon */
|
|
2023
2344
|
displayCondition?: (mete: Node_2_2, iconName: string) => boolean;
|
|
2345
|
+
/** 点击回调函数 */
|
|
2024
2346
|
onClick?: (headerIconClickParams: HeaderIconClickParams) => void;
|
|
2347
|
+
/** 悬停回调函数 */
|
|
2025
2348
|
onHover?: (headerIconHoverParams: HeaderIconHoverParams) => void;
|
|
2026
2349
|
}
|
|
2027
2350
|
|
|
@@ -2031,30 +2354,37 @@ declare interface HeaderActionIconOptions {
|
|
|
2031
2354
|
y: number;
|
|
2032
2355
|
onClick?: (headerIconClickParams: HeaderIconClickParams) => void;
|
|
2033
2356
|
onHover?: (headerIconHoverParams: HeaderIconHoverParams) => void;
|
|
2357
|
+
isSortIcon?: boolean;
|
|
2034
2358
|
defaultHide?: boolean;
|
|
2035
2359
|
}
|
|
2036
2360
|
|
|
2037
2361
|
declare abstract class HeaderCell extends BaseCell<Node_2_2> {
|
|
2038
2362
|
protected headerConfig: BaseHeaderConfig;
|
|
2363
|
+
protected actionIconConfig: InternalFullyHeaderActionIcon | undefined;
|
|
2039
2364
|
protected treeIcon: GuiIcon | undefined;
|
|
2040
2365
|
protected treeLeafNodeAlignDot: DisplayObject | undefined;
|
|
2041
2366
|
protected actionIcons: GuiIcon[];
|
|
2042
2367
|
protected hasDefaultHiddenIcon: boolean;
|
|
2368
|
+
protected conditionIconMappingResult: FullyIconName | undefined;
|
|
2369
|
+
/** left icon 绘制起始坐标 */
|
|
2370
|
+
protected leftIconPosition: PointLike;
|
|
2371
|
+
/** left icon 绘制起始坐标 */
|
|
2372
|
+
protected rightIconPosition: PointLike;
|
|
2043
2373
|
protected abstract isBolderText(): boolean;
|
|
2044
2374
|
protected handleRestOptions(...[headerConfig]: [BaseHeaderConfig]): void;
|
|
2045
2375
|
protected initCell(): void;
|
|
2376
|
+
protected generateIconConfig(): void;
|
|
2046
2377
|
protected getFormattedFieldValue(): FormatResult;
|
|
2047
|
-
/**
|
|
2048
|
-
* 获取操作 icons
|
|
2049
|
-
*/
|
|
2050
|
-
protected getActionIconCfg(): HeaderActionIcon | undefined;
|
|
2051
2378
|
protected showSortIcon(): boolean | "" | undefined;
|
|
2052
2379
|
protected getActionIconsCount(): number;
|
|
2053
|
-
protected
|
|
2054
|
-
|
|
2380
|
+
protected getActionIconStyle(): {
|
|
2381
|
+
width: number;
|
|
2382
|
+
height: number;
|
|
2383
|
+
fill: string;
|
|
2384
|
+
};
|
|
2055
2385
|
protected hasDefaultHideActionIcon(): boolean;
|
|
2056
2386
|
protected addActionIcon(options: HeaderActionIconOptions): void;
|
|
2057
|
-
protected
|
|
2387
|
+
protected drawActionAndConditionIcons(): void;
|
|
2058
2388
|
protected isSortCell(): boolean;
|
|
2059
2389
|
protected handleByStateName(cells: CellMeta[], stateName: InteractionStateName): void;
|
|
2060
2390
|
protected handleSearchResult(cells: CellMeta[]): void;
|
|
@@ -2062,15 +2392,19 @@ declare abstract class HeaderCell extends BaseCell<Node_2_2> {
|
|
|
2062
2392
|
protected handleSelect(cells: CellMeta[], nodes?: Node_2_2[]): void;
|
|
2063
2393
|
protected getTextStyle(): TextTheme;
|
|
2064
2394
|
getBackgroundColor(): {
|
|
2395
|
+
backgroundColor: string;
|
|
2396
|
+
backgroundColorOpacity: number;
|
|
2397
|
+
} & {
|
|
2065
2398
|
backgroundColor: string | undefined;
|
|
2066
|
-
|
|
2399
|
+
intelligentReverseTextColor: boolean;
|
|
2067
2400
|
};
|
|
2068
2401
|
toggleActionIcon(id: string): void;
|
|
2402
|
+
protected getIconPosition(): PointLike;
|
|
2069
2403
|
update(): void;
|
|
2070
2404
|
updateByState(stateName: InteractionStateName): void;
|
|
2071
2405
|
hideInteractionShape(): void;
|
|
2072
2406
|
isMeasureField(): boolean;
|
|
2073
|
-
mappingValue(condition: Condition):
|
|
2407
|
+
mappingValue(condition: Condition): ConditionMappingResult;
|
|
2074
2408
|
findFieldCondition(conditions: Condition[]): Condition | undefined;
|
|
2075
2409
|
getTreeIcon(): GuiIcon | undefined;
|
|
2076
2410
|
}
|
|
@@ -2086,7 +2420,13 @@ declare interface HeaderIconHoverParams extends HeaderIconClickParams {
|
|
|
2086
2420
|
}
|
|
2087
2421
|
|
|
2088
2422
|
declare interface HiddenColumnsInfo_2 {
|
|
2423
|
+
/**
|
|
2424
|
+
* 当前显示的兄弟节点之前所隐藏的节点
|
|
2425
|
+
*/
|
|
2089
2426
|
hideColumnNodes: Node_2_2[];
|
|
2427
|
+
/**
|
|
2428
|
+
* 当前隐藏列所对应展示展开按钮的兄弟节点
|
|
2429
|
+
*/
|
|
2090
2430
|
displaySiblingNode: {
|
|
2091
2431
|
prev: Node_2_2 | null;
|
|
2092
2432
|
next: Node_2_2 | null;
|
|
@@ -2118,11 +2458,11 @@ declare class Hierarchy {
|
|
|
2118
2458
|
getNodesLessThanLevel(lessThanLevel: number): Node_2_2[];
|
|
2119
2459
|
/**
|
|
2120
2460
|
* Add new node
|
|
2121
|
-
* @param
|
|
2461
|
+
* @param node
|
|
2122
2462
|
* @param insetIndex
|
|
2123
2463
|
*/
|
|
2124
|
-
pushNode(
|
|
2125
|
-
pushIndexNode(
|
|
2464
|
+
pushNode(node: Node_2_2, insetIndex?: number): void;
|
|
2465
|
+
pushIndexNode(node: Node_2_2): void;
|
|
2126
2466
|
getIndexNodes(): Node_2_2[];
|
|
2127
2467
|
}
|
|
2128
2468
|
|
|
@@ -2130,54 +2470,128 @@ declare interface HoverFocusOptions {
|
|
|
2130
2470
|
duration?: number;
|
|
2131
2471
|
}
|
|
2132
2472
|
|
|
2133
|
-
declare interface IconCondition extends Condition {
|
|
2473
|
+
declare interface IconCondition extends Condition<IconTheme> {
|
|
2134
2474
|
position?: IconPosition;
|
|
2135
2475
|
}
|
|
2136
2476
|
|
|
2137
2477
|
declare type IconPosition = 'left' | 'right';
|
|
2138
2478
|
|
|
2139
|
-
declare type IconStyle = Pick<IconTheme, 'size' | 'margin'> & Pick<IconCondition, 'position'>;
|
|
2140
|
-
|
|
2141
2479
|
declare interface IconTheme {
|
|
2480
|
+
/** icon 填充色 */
|
|
2142
2481
|
fill?: string;
|
|
2143
|
-
|
|
2144
|
-
upIconColor?: string;
|
|
2482
|
+
/** icon 大小 */
|
|
2145
2483
|
size?: number;
|
|
2484
|
+
/** icon 外边距 */
|
|
2146
2485
|
margin?: Margin;
|
|
2147
2486
|
}
|
|
2148
2487
|
|
|
2149
2488
|
declare type Indexes = [number, number, number, number];
|
|
2150
2489
|
|
|
2151
|
-
declare interface
|
|
2490
|
+
declare interface InteractionCellSelectedHighlightOptions {
|
|
2491
|
+
/** 高亮行头 */
|
|
2152
2492
|
rowHeader?: boolean;
|
|
2493
|
+
/** 高亮列头 */
|
|
2153
2494
|
colHeader?: boolean;
|
|
2495
|
+
/** 高亮选中单元格所在行 */
|
|
2154
2496
|
currentRow?: boolean;
|
|
2497
|
+
/** 高亮选中单元格所在列 */
|
|
2155
2498
|
currentCol?: boolean;
|
|
2156
2499
|
}
|
|
2157
2500
|
|
|
2158
2501
|
declare type InteractionConstructor = new (spreadsheet: SpreadSheet_2) => BaseEvent;
|
|
2159
2502
|
|
|
2160
2503
|
declare interface InteractionOptions {
|
|
2504
|
+
/**
|
|
2505
|
+
* 链接跳转
|
|
2506
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/interaction/link-jump
|
|
2507
|
+
*/
|
|
2161
2508
|
linkFields?: string[] | ((meta: Node_2_2 | ViewMeta_2) => boolean);
|
|
2509
|
+
/**
|
|
2510
|
+
* 选中单元格高亮聚焦
|
|
2511
|
+
*/
|
|
2162
2512
|
selectedCellsSpotlight?: boolean;
|
|
2513
|
+
/**
|
|
2514
|
+
* 十字器高亮效果
|
|
2515
|
+
*/
|
|
2163
2516
|
hoverHighlight?: boolean;
|
|
2517
|
+
/**
|
|
2518
|
+
* 悬停聚焦, 800ms 后会显示其对应 tooltip, 可以自定义 duration
|
|
2519
|
+
*/
|
|
2164
2520
|
hoverFocus?: HoverFocusOptions | boolean;
|
|
2521
|
+
/**
|
|
2522
|
+
* 开启复制 Command/Ctrl + C
|
|
2523
|
+
*/
|
|
2165
2524
|
enableCopy?: boolean;
|
|
2525
|
+
/**
|
|
2526
|
+
* 复制带格式的数据
|
|
2527
|
+
*/
|
|
2166
2528
|
copyWithFormat?: boolean;
|
|
2529
|
+
/**
|
|
2530
|
+
* 复制包含其对应行列头的数据
|
|
2531
|
+
*/
|
|
2167
2532
|
copyWithHeader?: boolean;
|
|
2533
|
+
/**
|
|
2534
|
+
* 复制时支持自定义(transformer)数据导出格式化方法
|
|
2535
|
+
*/
|
|
2536
|
+
customTransformer?: (transformer: Transformer_2) => Partial<Transformer_2>;
|
|
2537
|
+
/**
|
|
2538
|
+
* 自动重置表格样式 (按下 ESC 键, 点击空白区域时, 关闭 tooltip/交互状态)
|
|
2539
|
+
*/
|
|
2168
2540
|
autoResetSheetStyle?: boolean;
|
|
2541
|
+
/**
|
|
2542
|
+
* 隐藏列头配置, 支持维度 (S2DataConfig.fields) 和具体维值 (id)
|
|
2543
|
+
* @example hiddenColumnFields: ['type', 'subType'];
|
|
2544
|
+
* @example hiddenColumnFields: ['root[&]家具[&]桌子[&]number']
|
|
2545
|
+
*/
|
|
2169
2546
|
hiddenColumnFields?: string[];
|
|
2547
|
+
/**
|
|
2548
|
+
* 自定义滚动速率, 默认 1
|
|
2549
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/interaction/scroll
|
|
2550
|
+
*/
|
|
2170
2551
|
scrollSpeedRatio?: ScrollSpeedRatio;
|
|
2552
|
+
/**
|
|
2553
|
+
* 宽高调整
|
|
2554
|
+
*/
|
|
2171
2555
|
resize?: ResizeInteractionOptions | boolean;
|
|
2556
|
+
/**
|
|
2557
|
+
* 刷选
|
|
2558
|
+
*/
|
|
2172
2559
|
brushSelection?: BrushSelection | boolean;
|
|
2560
|
+
/**
|
|
2561
|
+
* 多选 Command/Ctrl + click
|
|
2562
|
+
*/
|
|
2173
2563
|
multiSelection?: boolean;
|
|
2564
|
+
/**
|
|
2565
|
+
* 区间快捷多选 Shift + click
|
|
2566
|
+
*/
|
|
2174
2567
|
rangeSelection?: boolean;
|
|
2568
|
+
/**
|
|
2569
|
+
* 键盘方向键移动选中单元格
|
|
2570
|
+
*/
|
|
2175
2571
|
selectedCellMove?: boolean;
|
|
2572
|
+
/**
|
|
2573
|
+
* 滚动条位置 (可用于表格内容未撑满 Canvas 的场景)
|
|
2574
|
+
*/
|
|
2176
2575
|
scrollbarPosition?: ScrollbarPositionType;
|
|
2576
|
+
/**
|
|
2577
|
+
* 透传 listener 属性的可选参数对象
|
|
2578
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/EventTarget/addEventListener
|
|
2579
|
+
*/
|
|
2177
2580
|
eventListenerOptions?: boolean | AddEventListenerOptions;
|
|
2178
|
-
|
|
2581
|
+
/**
|
|
2582
|
+
* 选中单元格高亮联动 (高亮所对应行头/列头, 高亮当前行/当前列)
|
|
2583
|
+
*/
|
|
2584
|
+
selectedCellHighlight?: boolean | InteractionCellSelectedHighlightOptions;
|
|
2585
|
+
/**
|
|
2586
|
+
* 滚动到边界的行为
|
|
2587
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/interaction/scroll
|
|
2588
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior
|
|
2589
|
+
*/
|
|
2179
2590
|
overscrollBehavior?: 'auto' | 'none' | 'contain' | null;
|
|
2180
|
-
/**
|
|
2591
|
+
/**
|
|
2592
|
+
* 自定义交互
|
|
2593
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/interaction/custom
|
|
2594
|
+
*/
|
|
2181
2595
|
customInteractions?: CustomInteraction[];
|
|
2182
2596
|
}
|
|
2183
2597
|
|
|
@@ -2186,12 +2600,29 @@ declare type InteractionState = {
|
|
|
2186
2600
|
};
|
|
2187
2601
|
|
|
2188
2602
|
declare interface InteractionStateInfo {
|
|
2603
|
+
/**
|
|
2604
|
+
* 交互状态名
|
|
2605
|
+
*/
|
|
2189
2606
|
stateName?: InteractionStateName;
|
|
2607
|
+
/**
|
|
2608
|
+
* 单元格元数据 (包含不在可视范围内的)
|
|
2609
|
+
*/
|
|
2190
2610
|
cells?: CellMeta[];
|
|
2611
|
+
/**
|
|
2612
|
+
* 交互状态发生改变的单元格实例
|
|
2613
|
+
*/
|
|
2191
2614
|
interactedCells?: S2CellType_2[];
|
|
2615
|
+
/**
|
|
2616
|
+
* 选中的单元格节点
|
|
2617
|
+
*/
|
|
2192
2618
|
nodes?: Node_2_2[];
|
|
2619
|
+
/**
|
|
2620
|
+
* 如果单元格为空, 是否强制更新 (适用于反选等场景)
|
|
2621
|
+
*/
|
|
2193
2622
|
force?: boolean;
|
|
2194
|
-
/**
|
|
2623
|
+
/**
|
|
2624
|
+
* 交互行为改变后,会被更新和重绘的单元格回调
|
|
2625
|
+
*/
|
|
2195
2626
|
onUpdateCells?: OnUpdateCells;
|
|
2196
2627
|
}
|
|
2197
2628
|
|
|
@@ -2207,12 +2638,19 @@ declare enum InteractionStateName {
|
|
|
2207
2638
|
}
|
|
2208
2639
|
|
|
2209
2640
|
declare interface InteractionStateTheme {
|
|
2641
|
+
/** 背景透明度 */
|
|
2210
2642
|
backgroundOpacity?: number;
|
|
2643
|
+
/** 背景填充色 */
|
|
2211
2644
|
backgroundColor?: string;
|
|
2645
|
+
/** 文本透明度 */
|
|
2212
2646
|
textOpacity?: number;
|
|
2647
|
+
/** 边线颜色 */
|
|
2213
2648
|
borderColor?: string;
|
|
2649
|
+
/** 边线宽度 */
|
|
2214
2650
|
borderWidth?: number;
|
|
2651
|
+
/** 边线透明度 */
|
|
2215
2652
|
borderOpacity?: number;
|
|
2653
|
+
/** 透明度 */
|
|
2216
2654
|
opacity?: number;
|
|
2217
2655
|
}
|
|
2218
2656
|
|
|
@@ -2221,13 +2659,23 @@ declare type Intercept = InterceptType[keyof InterceptType];
|
|
|
2221
2659
|
declare enum InterceptType {
|
|
2222
2660
|
HOVER = "hover",
|
|
2223
2661
|
CLICK = "click",
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2662
|
+
DATA_CELL_BRUSH_SELECTION = "dataCellBrushSelection",
|
|
2663
|
+
ROW_CELL_BRUSH_SELECTION = "rowCellBrushSelection",
|
|
2664
|
+
COL_CELL_BRUSH_SELECTION = "colCellBrushSelection",
|
|
2227
2665
|
MULTI_SELECTION = "multiSelection",
|
|
2228
2666
|
RESIZE = "resize"
|
|
2229
2667
|
}
|
|
2230
2668
|
|
|
2669
|
+
declare type InternalFullyCellTheme = DeepRequired<DefaultCellTheme>;
|
|
2670
|
+
|
|
2671
|
+
declare interface InternalFullyHeaderActionIcon extends HeaderActionIcon {
|
|
2672
|
+
icons: FullyIconName[];
|
|
2673
|
+
isSortIcon?: boolean;
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2676
|
+
declare type InternalFullyTheme = DeepRequired<S2Theme>;
|
|
2677
|
+
|
|
2678
|
+
/** 条件格式柱图样式配置 */
|
|
2231
2679
|
declare interface IntervalTheme {
|
|
2232
2680
|
height: number;
|
|
2233
2681
|
fill: string;
|
|
@@ -2243,14 +2691,14 @@ declare type KeyboardEventHandler = (event: KeyboardEvent) => void;
|
|
|
2243
2691
|
declare type LayoutArrange = (spreadsheet: SpreadSheet_2, parent: Node_2_2, field: string, fieldValues: string[]) => string[];
|
|
2244
2692
|
|
|
2245
2693
|
/**
|
|
2246
|
-
* determine the
|
|
2694
|
+
* determine the data of cells in Cartesian coordinates
|
|
2247
2695
|
*/
|
|
2248
|
-
declare type
|
|
2696
|
+
declare type LayoutCellMeta = (viewMeta: ViewMeta_2) => ViewMeta_2 | null;
|
|
2249
2697
|
|
|
2250
2698
|
/**
|
|
2251
|
-
* determine the
|
|
2699
|
+
* determine the location(x,y,width,height eg..) of every node
|
|
2252
2700
|
*/
|
|
2253
|
-
declare type
|
|
2701
|
+
declare type LayoutCoordinate = (spreadsheet: SpreadSheet_2, rowNode: Node_2_2 | null, colNode: Node_2_2 | null) => void;
|
|
2254
2702
|
|
|
2255
2703
|
/**
|
|
2256
2704
|
* determine what does row/column hierarchy look like
|
|
@@ -2272,14 +2720,38 @@ declare type LayoutPaginationParams = {
|
|
|
2272
2720
|
};
|
|
2273
2721
|
|
|
2274
2722
|
declare interface LayoutResult_2 {
|
|
2723
|
+
/**
|
|
2724
|
+
* 列头节点, 对应 ColCell (含可视范围外)
|
|
2725
|
+
*/
|
|
2275
2726
|
colNodes: Node_2_2[];
|
|
2727
|
+
/**
|
|
2728
|
+
* 列头叶子节点, 对应 ColCell (含可视范围外)
|
|
2729
|
+
*/
|
|
2730
|
+
colLeafNodes: Node_2_2[];
|
|
2731
|
+
/**
|
|
2732
|
+
* 列头节点层级结构 (含可视范围外)
|
|
2733
|
+
*/
|
|
2276
2734
|
colsHierarchy: Hierarchy;
|
|
2735
|
+
/**
|
|
2736
|
+
* 行头节点, 对应 RowCell (含可视范围外)
|
|
2737
|
+
*/
|
|
2277
2738
|
rowNodes: Node_2_2[];
|
|
2739
|
+
/**
|
|
2740
|
+
* 行头节点层级结构 (含可视范围外)
|
|
2741
|
+
*/
|
|
2278
2742
|
rowsHierarchy: Hierarchy;
|
|
2743
|
+
/**
|
|
2744
|
+
* 行头叶子节点, 对应 RowCell (含可视范围外)
|
|
2745
|
+
*/
|
|
2279
2746
|
rowLeafNodes: Node_2_2[];
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2747
|
+
/**
|
|
2748
|
+
* 序号节点, 对应 SeriesNumberCell (含可视范围外)
|
|
2749
|
+
*/
|
|
2750
|
+
seriesNumberNodes?: Node_2_2[];
|
|
2751
|
+
/**
|
|
2752
|
+
* 角头节点, 对应 CornerCell (含可视范围外)
|
|
2753
|
+
*/
|
|
2754
|
+
cornerNodes?: Node_2_2[];
|
|
2283
2755
|
}
|
|
2284
2756
|
|
|
2285
2757
|
/**
|
|
@@ -2295,12 +2767,15 @@ declare type LayoutSeriesNumberNodes = (rowsHierarchy: Hierarchy, seriesNumberWi
|
|
|
2295
2767
|
*/
|
|
2296
2768
|
declare type LayoutWidthType = 'adaptive' | 'colAdaptive' | 'compact';
|
|
2297
2769
|
|
|
2770
|
+
/** 折线图样式配置 */
|
|
2298
2771
|
declare interface LineTheme {
|
|
2772
|
+
/** 点 */
|
|
2299
2773
|
point?: {
|
|
2300
2774
|
size: number;
|
|
2301
2775
|
fill?: string;
|
|
2302
2776
|
opacity?: number;
|
|
2303
2777
|
};
|
|
2778
|
+
/** 线 */
|
|
2304
2779
|
linkLine?: {
|
|
2305
2780
|
size: number;
|
|
2306
2781
|
fill?: string;
|
|
@@ -2308,25 +2783,11 @@ declare interface LineTheme {
|
|
|
2308
2783
|
};
|
|
2309
2784
|
}
|
|
2310
2785
|
|
|
2311
|
-
declare type
|
|
2786
|
+
declare type Margin = Padding;
|
|
2312
2787
|
|
|
2313
|
-
declare
|
|
2314
|
-
icon?: string;
|
|
2315
|
-
fill: string;
|
|
2316
|
-
isCompare?: boolean;
|
|
2317
|
-
/**
|
|
2318
|
-
* @description only used in background condition, when the background color is too light, the font color will be white
|
|
2319
|
-
* @version 1.34.0
|
|
2320
|
-
*/
|
|
2321
|
-
intelligentReverseTextColor?: boolean;
|
|
2322
|
-
/**
|
|
2323
|
-
* @description custom the interval condition's width
|
|
2324
|
-
* @version 1.38.0
|
|
2325
|
-
*/
|
|
2326
|
-
fieldValue?: number;
|
|
2327
|
-
}
|
|
2788
|
+
declare type MatrixHTMLTransformer = (data: DataItem[][]) => CopyableHTML;
|
|
2328
2789
|
|
|
2329
|
-
declare type
|
|
2790
|
+
declare type MatrixPlainTransformer = (data: DataItem[][], separator?: string) => CopyablePlain;
|
|
2330
2791
|
|
|
2331
2792
|
/**
|
|
2332
2793
|
* Cell for panelGroup area
|
|
@@ -2335,7 +2796,7 @@ declare class MergedCell extends DataCell_2 {
|
|
|
2335
2796
|
cells: S2CellType_2[];
|
|
2336
2797
|
constructor(spreadsheet: SpreadSheet_2, cells: S2CellType_2[], meta?: ViewMeta_2);
|
|
2337
2798
|
handleRestOptions(...[cells]: [S2CellType_2[]]): void;
|
|
2338
|
-
get cellType():
|
|
2799
|
+
get cellType(): CellType;
|
|
2339
2800
|
update(): void;
|
|
2340
2801
|
protected initCell(): void;
|
|
2341
2802
|
/**
|
|
@@ -2348,9 +2809,8 @@ declare class MergedCell extends DataCell_2 {
|
|
|
2348
2809
|
drawTextShape(): void;
|
|
2349
2810
|
}
|
|
2350
2811
|
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
*/
|
|
2812
|
+
declare type MergedCellCallback = (spreadsheet: SpreadSheet_2, cells: S2CellType_2[], meta?: ViewMeta_2) => MergedCell;
|
|
2813
|
+
|
|
2354
2814
|
declare interface MergedCellInfo {
|
|
2355
2815
|
colIndex?: number;
|
|
2356
2816
|
rowIndex?: number;
|
|
@@ -2370,11 +2830,17 @@ declare interface Meta {
|
|
|
2370
2830
|
* 字段描述
|
|
2371
2831
|
*/
|
|
2372
2832
|
description?: string;
|
|
2833
|
+
/**
|
|
2834
|
+
* 格式化
|
|
2835
|
+
* 数值字段:一般用于格式化数字单位
|
|
2836
|
+
* 文本字段:一般用于做字段枚举值的别名
|
|
2837
|
+
*/
|
|
2373
2838
|
formatter?: Formatter;
|
|
2374
2839
|
}
|
|
2375
2840
|
|
|
2376
2841
|
declare type MiniChartData = BaseChartData | BulletValue;
|
|
2377
2842
|
|
|
2843
|
+
/** 迷你图样式 */
|
|
2378
2844
|
declare interface MiniChartTheme {
|
|
2379
2845
|
line?: LineTheme;
|
|
2380
2846
|
bar?: BarTheme;
|
|
@@ -2392,19 +2858,24 @@ declare enum MiniChartTypes {
|
|
|
2392
2858
|
declare type MouseEventHandler = (event: MouseEvent) => void;
|
|
2393
2859
|
|
|
2394
2860
|
/**
|
|
2395
|
-
*
|
|
2396
|
-
*
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2861
|
+
* 单个单元格, 显示一组数据
|
|
2862
|
+
* 适用于 (网格分析表, 趋势分析表) 和其他自定义场景
|
|
2863
|
+
{
|
|
2864
|
+
label: '余额女',
|
|
2865
|
+
values: [
|
|
2866
|
+
['最近7天登端天数', 1, 3423423, 323],
|
|
2867
|
+
['自然月新登用户数', 1, 3423423, 323],
|
|
2868
|
+
['最近7天登端天数', 1, 3423423, 323],
|
|
2869
|
+
['自然月新登用户数', 1, 3423423, 323],
|
|
2870
|
+
],
|
|
2871
|
+
}
|
|
2404
2872
|
*/
|
|
2405
2873
|
declare interface MultiData<T = SimpleData[][] | MiniChartData> {
|
|
2874
|
+
/** 数值 */
|
|
2406
2875
|
values: T;
|
|
2876
|
+
/** 原始值 */
|
|
2407
2877
|
originalValues?: T;
|
|
2878
|
+
/** 单元格标题 */
|
|
2408
2879
|
label?: string;
|
|
2409
2880
|
[key: string]: unknown;
|
|
2410
2881
|
}
|
|
@@ -2507,6 +2978,10 @@ declare class Node_2_2 {
|
|
|
2507
2978
|
}
|
|
2508
2979
|
|
|
2509
2980
|
declare interface OffsetConfig {
|
|
2981
|
+
rowHeaderOffsetX?: {
|
|
2982
|
+
value: number | undefined;
|
|
2983
|
+
animate?: boolean;
|
|
2984
|
+
};
|
|
2510
2985
|
offsetX?: {
|
|
2511
2986
|
value: number | undefined;
|
|
2512
2987
|
animate?: boolean;
|
|
@@ -2527,8 +3002,11 @@ declare interface Padding {
|
|
|
2527
3002
|
}
|
|
2528
3003
|
|
|
2529
3004
|
declare interface Pagination_2 {
|
|
3005
|
+
/** 每页数量 */
|
|
2530
3006
|
pageSize: number;
|
|
3007
|
+
/** 当前页 (从 1 开始) */
|
|
2531
3008
|
current: number;
|
|
3009
|
+
/** 数据总条数 */
|
|
2532
3010
|
total?: number;
|
|
2533
3011
|
}
|
|
2534
3012
|
|
|
@@ -2536,6 +3014,13 @@ declare interface Palette extends PaletteMeta {
|
|
|
2536
3014
|
basicColors: string[];
|
|
2537
3015
|
}
|
|
2538
3016
|
|
|
3017
|
+
declare const PALETTE_MAP: {
|
|
3018
|
+
readonly default: Palette;
|
|
3019
|
+
readonly colorful: Palette;
|
|
3020
|
+
readonly gray: Palette;
|
|
3021
|
+
readonly dark: Palette;
|
|
3022
|
+
};
|
|
3023
|
+
|
|
2539
3024
|
declare interface PaletteMeta {
|
|
2540
3025
|
/** 主题色 */
|
|
2541
3026
|
brandColor: string;
|
|
@@ -2547,12 +3032,14 @@ declare interface PaletteMeta {
|
|
|
2547
3032
|
basicColorIndex: number;
|
|
2548
3033
|
standardColorIndex: number;
|
|
2549
3034
|
}>;
|
|
3035
|
+
/** 语义色值 */
|
|
2550
3036
|
semanticColors: {
|
|
2551
3037
|
red: string;
|
|
2552
3038
|
green: string;
|
|
2553
3039
|
yellow: string;
|
|
2554
3040
|
[key: string]: string;
|
|
2555
3041
|
};
|
|
3042
|
+
/** 补充色值 */
|
|
2556
3043
|
others?: {
|
|
2557
3044
|
results: string;
|
|
2558
3045
|
highlight: string;
|
|
@@ -2575,6 +3062,7 @@ declare type PanelIndexes = {
|
|
|
2575
3062
|
declare class PanelScrollGroup extends GridGroup {
|
|
2576
3063
|
protected mergedCellsGroup: Group;
|
|
2577
3064
|
constructor(cfg: GridGroupConstructorParameters);
|
|
3065
|
+
getMergedCellsGroup(): Group;
|
|
2578
3066
|
protected initMergedCellsGroup(): void;
|
|
2579
3067
|
updateMergedCells(): void;
|
|
2580
3068
|
addMergeCell(mergeCell: MergedCell): void;
|
|
@@ -2643,7 +3131,7 @@ rowCellMouseUp: (data: TargetCellInfo) => void;
|
|
|
2643
3131
|
rowCellMouseMove: (data: TargetCellInfo) => void;
|
|
2644
3132
|
rowCellCollapsed: (params: RowCellCollapsedParams) => void;
|
|
2645
3133
|
rowCellAllCollapsed: (isCollapsed: boolean) => void;
|
|
2646
|
-
rowCellScroll: (position:
|
|
3134
|
+
rowCellScroll: (position: Required<ScrollOffset>) => void;
|
|
2647
3135
|
colCellHover: (data: TargetCellInfo) => void;
|
|
2648
3136
|
colCellClick: (data: TargetCellInfo) => void;
|
|
2649
3137
|
colCellDoubleClick: (data: TargetCellInfo) => void;
|
|
@@ -2732,7 +3220,7 @@ linkFieldJump: (data: {
|
|
|
2732
3220
|
field: string;
|
|
2733
3221
|
record: RawData;
|
|
2734
3222
|
}) => void;
|
|
2735
|
-
scroll: (position:
|
|
3223
|
+
scroll: (position: Required<ScrollOffset>) => void;
|
|
2736
3224
|
layoutAfterRealDataCellRender: (options: {
|
|
2737
3225
|
add: [number, number][];
|
|
2738
3226
|
remove: [number, number][];
|
|
@@ -2778,7 +3266,7 @@ onRowCellMouseUp?: (data: TargetCellInfo) => any;
|
|
|
2778
3266
|
onRowCellMouseMove?: (data: TargetCellInfo) => any;
|
|
2779
3267
|
onRowCellCollapsed?: (params: RowCellCollapsedParams) => any;
|
|
2780
3268
|
onRowCellAllCollapsed?: (isCollapsed: boolean) => any;
|
|
2781
|
-
onRowCellScroll?: (position:
|
|
3269
|
+
onRowCellScroll?: (position: Required<ScrollOffset>) => any;
|
|
2782
3270
|
onColCellHover?: (data: TargetCellInfo) => any;
|
|
2783
3271
|
onColCellClick?: (data: TargetCellInfo) => any;
|
|
2784
3272
|
onColCellDoubleClick?: (data: TargetCellInfo) => any;
|
|
@@ -2867,7 +3355,7 @@ onLinkFieldJump?: (data: {
|
|
|
2867
3355
|
field: string;
|
|
2868
3356
|
record: RawData;
|
|
2869
3357
|
}) => any;
|
|
2870
|
-
onScroll?: (position:
|
|
3358
|
+
onScroll?: (position: Required<ScrollOffset>) => any;
|
|
2871
3359
|
onLayoutAfterRealDataCellRender?: (options: {
|
|
2872
3360
|
add: [number, number][];
|
|
2873
3361
|
remove: [number, number][];
|
|
@@ -2909,9 +3397,13 @@ declare interface PropOption<T = any> {
|
|
|
2909
3397
|
|
|
2910
3398
|
declare type Query = Record<string, any>;
|
|
2911
3399
|
|
|
3400
|
+
/** 子弹图状态颜色 */
|
|
2912
3401
|
declare interface RangeColors {
|
|
3402
|
+
/** 满意 */
|
|
2913
3403
|
good: string;
|
|
3404
|
+
/** 良好 */
|
|
2914
3405
|
satisfactory: string;
|
|
3406
|
+
/** 不符合预期 */
|
|
2915
3407
|
bad: string;
|
|
2916
3408
|
}
|
|
2917
3409
|
|
|
@@ -2923,12 +3415,19 @@ declare interface RequiredPropOption<T = any> {
|
|
|
2923
3415
|
}
|
|
2924
3416
|
|
|
2925
3417
|
declare interface ResizeArea {
|
|
3418
|
+
/** 热区尺寸 */
|
|
2926
3419
|
size?: number;
|
|
3420
|
+
/** 热区背景色 */
|
|
2927
3421
|
background?: string;
|
|
3422
|
+
/** 参考线颜色 */
|
|
2928
3423
|
guideLineColor?: string;
|
|
3424
|
+
/** 参考线不可用颜色 */
|
|
2929
3425
|
guideLineDisableColor?: string;
|
|
3426
|
+
/** 参考线间隔 */
|
|
2930
3427
|
guideLineDash?: number[];
|
|
3428
|
+
/** 热区背景色透明度 */
|
|
2931
3429
|
backgroundOpacity?: number;
|
|
3430
|
+
/** 交互态 */
|
|
2932
3431
|
interactionState?: InteractionState;
|
|
2933
3432
|
}
|
|
2934
3433
|
|
|
@@ -2985,7 +3484,9 @@ declare interface ResizeInteractionOptions {
|
|
|
2985
3484
|
rowResizeType?: ResizeType;
|
|
2986
3485
|
/** 列高调整时,影响当前列还是全部列 */
|
|
2987
3486
|
colResizeType?: ResizeType;
|
|
3487
|
+
/** 是否允许调整, 返回 false 时拖拽的宽高无效 */
|
|
2988
3488
|
disable?: (resizeInfo: ResizeInfo_2) => boolean;
|
|
3489
|
+
/** 是否显示热区 */
|
|
2989
3490
|
visible?: (cell: S2CellType_2) => boolean;
|
|
2990
3491
|
}
|
|
2991
3492
|
|
|
@@ -3024,17 +3525,11 @@ declare class RootInteraction {
|
|
|
3024
3525
|
isHoverState(): boolean;
|
|
3025
3526
|
isActiveCell(cell: S2CellType_2): boolean;
|
|
3026
3527
|
isSelectedCell(cell: S2CellType_2): boolean;
|
|
3027
|
-
getCells(cellType?:
|
|
3528
|
+
getCells(cellType?: CellType[]): CellMeta[];
|
|
3028
3529
|
getActiveCells(): S2CellType_2[];
|
|
3029
3530
|
clearStyleIndependent(): void;
|
|
3030
|
-
|
|
3031
|
-
getPanelGroupAllDataCells(): DataCell_2[];
|
|
3032
|
-
getAllRowHeaderCells(): RowCell[];
|
|
3033
|
-
getAllColHeaderCells(): ColCell[];
|
|
3034
|
-
getRowColActiveCells(ids: string[]): S2CellType_2<ViewMeta_2>[];
|
|
3035
|
-
getAllCells(): S2CellType_2<ViewMeta_2>[];
|
|
3531
|
+
getUnSelectedDataCells(): DataCell_2[];
|
|
3036
3532
|
selectAll: () => void;
|
|
3037
|
-
getCellChildrenNodes: (cell: S2CellType_2) => Node_2_2[];
|
|
3038
3533
|
selectHeaderCell: (selectHeaderCellInfo?: SelectHeaderCellInfo) => true | undefined;
|
|
3039
3534
|
highlightNodes: (nodes?: Node_2_2[]) => void;
|
|
3040
3535
|
mergeCells: (cellsInfo?: MergedCellInfo[], hideData?: boolean) => void;
|
|
@@ -3055,14 +3550,12 @@ declare class RootInteraction {
|
|
|
3055
3550
|
clearHoverTimer(): void;
|
|
3056
3551
|
setHoverTimer(timer: number): void;
|
|
3057
3552
|
getHoverTimer(): number | null;
|
|
3058
|
-
getSelectedCellHighlight():
|
|
3553
|
+
getSelectedCellHighlight(): InteractionCellSelectedHighlightOptions;
|
|
3059
3554
|
}
|
|
3060
3555
|
|
|
3061
3556
|
declare class RowCell extends HeaderCell {
|
|
3062
3557
|
protected headerConfig: RowHeaderConfig;
|
|
3063
|
-
|
|
3064
|
-
protected iconPosition: PointLike;
|
|
3065
|
-
get cellType(): CellTypes;
|
|
3558
|
+
get cellType(): CellType;
|
|
3066
3559
|
protected getBorderPositions(): CellBorderPosition[];
|
|
3067
3560
|
protected initCell(): void;
|
|
3068
3561
|
protected showTreeIcon(): boolean;
|
|
@@ -3074,12 +3567,10 @@ declare class RowCell extends HeaderCell {
|
|
|
3074
3567
|
protected drawTreeLeafNodeAlignDot(): void;
|
|
3075
3568
|
protected isBolderText(): boolean;
|
|
3076
3569
|
protected drawTextShape(): void;
|
|
3077
|
-
protected drawLinkFieldShape(): void;
|
|
3078
3570
|
protected drawResizeAreaInLeaf(): void;
|
|
3079
3571
|
protected getContentIndent(): number;
|
|
3080
3572
|
protected getTextIndent(): number;
|
|
3081
3573
|
protected isTreeLevel(): any;
|
|
3082
|
-
protected getIconPosition(): PointLike;
|
|
3083
3574
|
protected getMaxTextWidth(): number;
|
|
3084
3575
|
protected getTextArea(): {
|
|
3085
3576
|
x: number;
|
|
@@ -3147,14 +3638,17 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Ico
|
|
|
3147
3638
|
debug?: boolean;
|
|
3148
3639
|
/**
|
|
3149
3640
|
* 字段标记
|
|
3641
|
+
* @see https://s2.antv.antgroup.com/manual/basic/conditions
|
|
3150
3642
|
*/
|
|
3151
3643
|
conditions?: Conditions | null;
|
|
3152
3644
|
/**
|
|
3153
3645
|
* 提示信息
|
|
3646
|
+
* @see https://s2.antv.antgroup.com/manual/basic/tooltip
|
|
3154
3647
|
*/
|
|
3155
3648
|
tooltip?: Tooltip<T, Icon, Text> | null;
|
|
3156
3649
|
/**
|
|
3157
3650
|
* 交互配置
|
|
3651
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/interaction/basic
|
|
3158
3652
|
*/
|
|
3159
3653
|
interaction?: InteractionOptions;
|
|
3160
3654
|
/**
|
|
@@ -3175,18 +3669,22 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Ico
|
|
|
3175
3669
|
showDefaultHeaderActionIcon?: boolean;
|
|
3176
3670
|
/**
|
|
3177
3671
|
* 自定义表头图标配置
|
|
3672
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/custom/custom-icon
|
|
3178
3673
|
*/
|
|
3179
3674
|
headerActionIcons?: HeaderActionIcon[];
|
|
3180
3675
|
/**
|
|
3181
3676
|
* 自定义 SVG 图标
|
|
3677
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/custom/custom-icon
|
|
3182
3678
|
*/
|
|
3183
3679
|
customSVGIcons?: CustomSVGIcon[];
|
|
3184
3680
|
/**
|
|
3185
3681
|
* 表格单元格宽高配置
|
|
3682
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/custom/cell-size
|
|
3186
3683
|
*/
|
|
3187
3684
|
style?: S2Style;
|
|
3188
3685
|
/**
|
|
3189
3686
|
* 是否开启高清适配
|
|
3687
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/hd-adapter
|
|
3190
3688
|
*/
|
|
3191
3689
|
hdAdapter?: boolean;
|
|
3192
3690
|
/**
|
|
@@ -3208,49 +3706,64 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Ico
|
|
|
3208
3706
|
/** *********** 自定义单元格 hooks **************** */
|
|
3209
3707
|
/**
|
|
3210
3708
|
* 自定义数值单元格
|
|
3709
|
+
* @see https://s2.antv.antgroup.com/examples/custom/custom-cell#data-cell
|
|
3211
3710
|
*/
|
|
3212
3711
|
dataCell?: DataCellCallback;
|
|
3213
3712
|
/**
|
|
3214
3713
|
* 自定义角头单元格
|
|
3714
|
+
* @see https://s2.antv.antgroup.com/examples/custom/custom-cell#corner-cell
|
|
3215
3715
|
*/
|
|
3216
3716
|
cornerCell?: CellCallback<CornerHeaderConfig>;
|
|
3217
3717
|
/**
|
|
3218
3718
|
* 自定义序号单元格
|
|
3719
|
+
* @see https://s2.antv.antgroup.com/examples/custom/custom-cell#series-number-cell
|
|
3219
3720
|
*/
|
|
3220
3721
|
seriesNumberCell?: CellCallback<BaseHeaderConfig>;
|
|
3221
3722
|
/**
|
|
3222
3723
|
* 自定义行头单元格
|
|
3724
|
+
* @see https://s2.antv.antgroup.com/examples/custom/custom-cell#row-cell
|
|
3223
3725
|
*/
|
|
3224
3726
|
rowCell?: CellCallback<RowHeaderConfig>;
|
|
3225
3727
|
/**
|
|
3226
3728
|
* 自定义列头单元格
|
|
3729
|
+
* @see https://s2.antv.antgroup.com/examples/custom/custom-cell#col-cell
|
|
3227
3730
|
*/
|
|
3228
3731
|
colCell?: CellCallback<ColHeaderConfig>;
|
|
3732
|
+
/**
|
|
3733
|
+
* 自定义合并单元格
|
|
3734
|
+
*/
|
|
3735
|
+
mergedCell?: MergedCellCallback;
|
|
3229
3736
|
/**
|
|
3230
3737
|
* 自定义表格框架/边框
|
|
3738
|
+
* @see https://s2.antv.antgroup.com/examples/case/comparison#measure-comparison
|
|
3231
3739
|
*/
|
|
3232
3740
|
frame?: FrameCallback;
|
|
3233
3741
|
/**
|
|
3234
3742
|
* 自定义角头
|
|
3743
|
+
* @see https://s2.antv.antgroup.com/zh/examples/custom/custom-cell/#corner-header
|
|
3235
3744
|
*/
|
|
3236
3745
|
cornerHeader?: CornerHeaderCallback;
|
|
3237
3746
|
/** *********** 自定义布局 hooks **************** */
|
|
3238
3747
|
/**
|
|
3239
3748
|
* 自定义单元格层级, 动态增加/删除单元格
|
|
3749
|
+
* @see https://s2.antv.antgroup.com/examples/custom/custom-layout#custom-layout-hierarchy
|
|
3240
3750
|
*/
|
|
3241
3751
|
layoutHierarchy?: LayoutHierarchy;
|
|
3242
3752
|
/**
|
|
3243
3753
|
* 自定义节点排列顺序 (树状模式有效)
|
|
3754
|
+
* @see https://s2.antv.antgroup.com/examples/custom/custom-layout#custom-layout-arrange
|
|
3244
3755
|
*/
|
|
3245
3756
|
layoutArrange?: LayoutArrange;
|
|
3246
3757
|
/**
|
|
3247
3758
|
* 自定义单元格对应节点坐标/宽高
|
|
3759
|
+
* @see https://s2.antv.antgroup.com/examples/custom/custom-layout#custom-layout-coordinate
|
|
3248
3760
|
*/
|
|
3249
3761
|
layoutCoordinate?: LayoutCoordinate;
|
|
3250
3762
|
/**
|
|
3251
|
-
*
|
|
3763
|
+
* 自定义单元格对应元数据
|
|
3764
|
+
* @see https://s2.antv.antgroup.com/zh/examples/custom/custom-layout/#custom-data-position
|
|
3252
3765
|
*/
|
|
3253
|
-
|
|
3766
|
+
layoutCellMeta?: LayoutCellMeta;
|
|
3254
3767
|
/**
|
|
3255
3768
|
* 自定义序号节点
|
|
3256
3769
|
*/
|
|
@@ -3260,9 +3773,13 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Ico
|
|
|
3260
3773
|
* 自定义数据集
|
|
3261
3774
|
*/
|
|
3262
3775
|
dataSet?: (spreadsheet: SpreadSheet_2) => BaseDataSet_2;
|
|
3776
|
+
/**
|
|
3777
|
+
* 自定义分面
|
|
3778
|
+
*/
|
|
3779
|
+
facet?: (spreadsheet: SpreadSheet_2) => BaseFacet;
|
|
3263
3780
|
}
|
|
3264
3781
|
|
|
3265
|
-
declare type S2CellType_2<T extends SimpleBBox = ViewMeta_2> = DataCell_2 | HeaderCell | ColCell | CornerCell | RowCell | SeriesNumberCell | MergedCell | TableCornerCell |
|
|
3782
|
+
declare type S2CellType_2<T extends SimpleBBox = ViewMeta_2> = DataCell_2 | HeaderCell | ColCell | CornerCell | RowCell | SeriesNumberCell | MergedCell | TableCornerCell | TableSeriesNumberCell | BaseCell<T>;
|
|
3266
3783
|
|
|
3267
3784
|
declare interface S2DataConfig_2 {
|
|
3268
3785
|
/**
|
|
@@ -3392,6 +3909,9 @@ declare interface S2EventHandler {
|
|
|
3392
3909
|
declare type S2MountContainer_2 = string | Element;
|
|
3393
3910
|
|
|
3394
3911
|
declare interface S2Options_2<T = TooltipContentType_2, P = Pagination_2, Icon = Element | string, Text = string> extends S2BasicOptions<T, P, Icon, Text>, S2PivotSheetOptions {
|
|
3912
|
+
/**
|
|
3913
|
+
* 行列冻结
|
|
3914
|
+
*/
|
|
3395
3915
|
frozen?: S2PivotSheetFrozenOptions & S2TableSheetFrozenOptions;
|
|
3396
3916
|
}
|
|
3397
3917
|
|
|
@@ -3411,10 +3931,12 @@ declare interface S2PivotSheetOptions {
|
|
|
3411
3931
|
hierarchyType?: 'grid' | 'tree';
|
|
3412
3932
|
/**
|
|
3413
3933
|
* 小计/总计配置
|
|
3934
|
+
* @see https://s2.antv.antgroup.com/manual/basic/totals
|
|
3414
3935
|
*/
|
|
3415
3936
|
totals?: Totals | null;
|
|
3416
3937
|
/**
|
|
3417
3938
|
* 合并单元格配置
|
|
3939
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/interaction/merge-cell
|
|
3418
3940
|
*/
|
|
3419
3941
|
mergedCellsInfo?: MergedCellInfo[][];
|
|
3420
3942
|
/**
|
|
@@ -3481,10 +4003,15 @@ declare interface S2TableSheetFrozenOptions {
|
|
|
3481
4003
|
}
|
|
3482
4004
|
|
|
3483
4005
|
declare interface S2Theme extends CellThemes {
|
|
4006
|
+
/** 列宽行高调整热区 */
|
|
3484
4007
|
resizeArea?: ResizeArea;
|
|
4008
|
+
/** 滚动条样式 */
|
|
3485
4009
|
scrollBar?: ScrollBarTheme;
|
|
4010
|
+
/** 分割线样式 */
|
|
3486
4011
|
splitLine?: SplitLine;
|
|
4012
|
+
/** 刷选遮罩 */
|
|
3487
4013
|
prepareSelectMask?: InteractionStateTheme;
|
|
4014
|
+
/** 画布背景底色 */
|
|
3488
4015
|
background?: Background;
|
|
3489
4016
|
}
|
|
3490
4017
|
|
|
@@ -3565,21 +4092,28 @@ declare enum ScrollbarPositionType {
|
|
|
3565
4092
|
}
|
|
3566
4093
|
|
|
3567
4094
|
declare interface ScrollBarTheme {
|
|
4095
|
+
/** 滚动条轨道颜色 */
|
|
3568
4096
|
trackColor?: string;
|
|
4097
|
+
/** 滚动条 hover 态颜色 */
|
|
3569
4098
|
thumbHoverColor?: string;
|
|
4099
|
+
/** 滚动条颜色 */
|
|
3570
4100
|
thumbColor?: string;
|
|
4101
|
+
/** 滚动条水平最小尺寸 */
|
|
3571
4102
|
thumbHorizontalMinSize?: number;
|
|
4103
|
+
/** 滚动条垂直最小尺寸 */
|
|
3572
4104
|
thumbVerticalMinSize?: number;
|
|
4105
|
+
/** 滚动条尺寸 */
|
|
3573
4106
|
size?: number;
|
|
4107
|
+
/** 滚动条 hover 态尺寸 */
|
|
3574
4108
|
hoverSize?: number;
|
|
3575
4109
|
/** 指定如何绘制每一条线段末端,lineCap?: 'butt' | 'round' | 'square'; */
|
|
3576
4110
|
lineCap?: LineStyleProps['lineCap'];
|
|
3577
4111
|
}
|
|
3578
4112
|
|
|
3579
|
-
declare interface
|
|
4113
|
+
declare interface ScrollOffset_2 {
|
|
3580
4114
|
scrollX?: number;
|
|
3581
4115
|
scrollY?: number;
|
|
3582
|
-
|
|
4116
|
+
rowHeaderScrollX?: number;
|
|
3583
4117
|
}
|
|
3584
4118
|
|
|
3585
4119
|
declare interface ScrollSpeedRatio {
|
|
@@ -3597,12 +4131,13 @@ declare interface SelectHeaderCellInfo {
|
|
|
3597
4131
|
declare class SeriesNumberCell extends BaseCell<Node_2_2> {
|
|
3598
4132
|
protected headerConfig: BaseHeaderConfig;
|
|
3599
4133
|
protected handleRestOptions(...[headerConfig]: [BaseHeaderConfig]): void;
|
|
3600
|
-
get cellType():
|
|
4134
|
+
get cellType(): CellType;
|
|
3601
4135
|
protected getBorderPositions(): CellBorderPosition[];
|
|
3602
4136
|
protected initCell(): void;
|
|
3603
4137
|
protected getBackgroundColor(): {
|
|
3604
|
-
backgroundColor: string
|
|
3605
|
-
backgroundColorOpacity: number
|
|
4138
|
+
backgroundColor: string;
|
|
4139
|
+
backgroundColorOpacity: number;
|
|
4140
|
+
intelligentReverseTextColor: boolean;
|
|
3606
4141
|
};
|
|
3607
4142
|
update(): void;
|
|
3608
4143
|
protected getTextStyle(): TextTheme;
|
|
@@ -3610,7 +4145,8 @@ declare class SeriesNumberCell extends BaseCell<Node_2_2> {
|
|
|
3610
4145
|
protected getMaxTextWidth(): number;
|
|
3611
4146
|
protected getTextPosition(): PointLike;
|
|
3612
4147
|
protected findFieldCondition(): Condition | undefined;
|
|
3613
|
-
protected mappingValue():
|
|
4148
|
+
protected mappingValue(): ConditionMappingResult | undefined;
|
|
4149
|
+
protected getIconPosition(): PointLike;
|
|
3614
4150
|
}
|
|
3615
4151
|
|
|
3616
4152
|
declare class SeriesNumberHeader extends BaseHeader<BaseHeaderConfig> {
|
|
@@ -3628,6 +4164,7 @@ declare class SeriesNumberHeader extends BaseHeader<BaseHeaderConfig> {
|
|
|
3628
4164
|
clip(): void;
|
|
3629
4165
|
layout(): void;
|
|
3630
4166
|
protected offset(): void;
|
|
4167
|
+
getNodes(): Node_2_2[];
|
|
3631
4168
|
}
|
|
3632
4169
|
|
|
3633
4170
|
export declare const SheetComponent: DefineComponent<GetInitProps<SheetComponentProps, "sheetType" | "spreadsheet" | "options" | "loading" | "partDrillDown" | "renderConfig" | "adaptive" | "showPagination" | "themeCfg" | "header" | "onSheetUpdate" | "onRowCellHover" | "onRowCellClick" | "onRowCellDoubleClick" | "onRowCellContextMenu" | "onRowCellMouseDown" | "onRowCellMouseUp" | "onRowCellMouseMove" | "onRowCellCollapsed" | "onRowCellAllCollapsed" | "onRowCellScroll" | "onColCellHover" | "onColCellClick" | "onColCellDoubleClick" | "onColCellContextMenu" | "onColCellMouseDown" | "onColCellMouseUp" | "onColCellMouseMove" | "onColCellExpanded" | "onColCellHidden" | "onDataCellHover" | "onDataCellClick" | "onDataCellDoubleClick" | "onDataCellContextMenu" | "onDataCellMouseDown" | "onDataCellMouseUp" | "onDataCellMouseMove" | "onDataCellBrushSelection" | "onDataCellSelectMove" | "onCornerCellHover" | "onCornerCellClick" | "onCornerCellDoubleClick" | "onCornerCellContextMenu" | "onCornerCellMouseDown" | "onCornerCellMouseUp" | "onCornerCellMouseMove" | "onMergedCellsHover" | "onMergedCellsClick" | "onMergedCellsDoubleClick" | "onMergedCellsContextMenu" | "onMergedCellsMouseDown" | "onMergedCellsMouseUp" | "onMergedCellsMouseMove" | "onRangeSort" | "onRangeSorted" | "onRangeFilter" | "onRangeFiltered" | "onLayoutAfterHeaderLayout" | "onLayoutPagination" | "onLayoutCellMounted" | "onBeforeRender" | "onAfterRender" | "onMounted" | "onDestroy" | "onLayoutResize" | "onLayoutResizeSeriesWidth" | "onLayoutResizeRowWidth" | "onLayoutResizeRowHeight" | "onLayoutResizeColWidth" | "onLayoutResizeColHeight" | "onLayoutResizeTreeWidth" | "onLayoutResizeMouseDown" | "onLayoutResizeMouseUp" | "onLayoutResizeMouseMove" | "onKeyBoardDown" | "onKeyBoardUp" | "onCopied" | "onActionIconHover" | "onActionIconHoverOff" | "onActionIconClick" | "onContextMenu" | "onClick" | "onHover" | "onDoubleClick" | "onMouseHover" | "onMouseUp" | "onMouseDown" | "onMouseMove" | "onSelected" | "onReset" | "onLinkFieldJump" | "onScroll" | "onLayoutAfterRealDataCellRender" | "onRowCellBrushSelection" | "onColCellBrushSelection">, {
|
|
@@ -3674,7 +4211,7 @@ rowCellMouseUp: (data: TargetCellInfo_2) => void;
|
|
|
3674
4211
|
rowCellMouseMove: (data: TargetCellInfo_2) => void;
|
|
3675
4212
|
rowCellCollapsed: (params: RowCellCollapsedParams_2) => void;
|
|
3676
4213
|
rowCellAllCollapsed: (isCollapsed: boolean) => void;
|
|
3677
|
-
rowCellScroll: (position:
|
|
4214
|
+
rowCellScroll: (position: Required<ScrollOffset_2>) => void;
|
|
3678
4215
|
colCellHover: (data: TargetCellInfo_2) => void;
|
|
3679
4216
|
colCellClick: (data: TargetCellInfo_2) => void;
|
|
3680
4217
|
colCellDoubleClick: (data: TargetCellInfo_2) => void;
|
|
@@ -3763,7 +4300,7 @@ linkFieldJump: (data: {
|
|
|
3763
4300
|
field: string;
|
|
3764
4301
|
record: RawData_2;
|
|
3765
4302
|
}) => void;
|
|
3766
|
-
scroll: (position:
|
|
4303
|
+
scroll: (position: Required<ScrollOffset_2>) => void;
|
|
3767
4304
|
layoutAfterRealDataCellRender: (options: {
|
|
3768
4305
|
add: [number, number][];
|
|
3769
4306
|
remove: [number, number][];
|
|
@@ -3809,7 +4346,7 @@ onRowCellMouseUp?: (data: TargetCellInfo_2) => any;
|
|
|
3809
4346
|
onRowCellMouseMove?: (data: TargetCellInfo_2) => any;
|
|
3810
4347
|
onRowCellCollapsed?: (params: RowCellCollapsedParams_2) => any;
|
|
3811
4348
|
onRowCellAllCollapsed?: (isCollapsed: boolean) => any;
|
|
3812
|
-
onRowCellScroll?: (position:
|
|
4349
|
+
onRowCellScroll?: (position: Required<ScrollOffset_2>) => any;
|
|
3813
4350
|
onColCellHover?: (data: TargetCellInfo_2) => any;
|
|
3814
4351
|
onColCellClick?: (data: TargetCellInfo_2) => any;
|
|
3815
4352
|
onColCellDoubleClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -3898,7 +4435,7 @@ onLinkFieldJump?: (data: {
|
|
|
3898
4435
|
field: string;
|
|
3899
4436
|
record: RawData_2;
|
|
3900
4437
|
}) => any;
|
|
3901
|
-
onScroll?: (position:
|
|
4438
|
+
onScroll?: (position: Required<ScrollOffset_2>) => any;
|
|
3902
4439
|
onLayoutAfterRealDataCellRender?: (options: {
|
|
3903
4440
|
add: [number, number][];
|
|
3904
4441
|
remove: [number, number][];
|
|
@@ -3933,7 +4470,7 @@ rowCellMouseUp: (data: TargetCellInfo_2) => void;
|
|
|
3933
4470
|
rowCellMouseMove: (data: TargetCellInfo_2) => void;
|
|
3934
4471
|
rowCellCollapsed: (params: RowCellCollapsedParams_2) => void;
|
|
3935
4472
|
rowCellAllCollapsed: (isCollapsed: boolean) => void;
|
|
3936
|
-
rowCellScroll: (position:
|
|
4473
|
+
rowCellScroll: (position: Required<ScrollOffset_2>) => void;
|
|
3937
4474
|
colCellHover: (data: TargetCellInfo_2) => void;
|
|
3938
4475
|
colCellClick: (data: TargetCellInfo_2) => void;
|
|
3939
4476
|
colCellDoubleClick: (data: TargetCellInfo_2) => void;
|
|
@@ -4022,7 +4559,7 @@ linkFieldJump: (data: {
|
|
|
4022
4559
|
field: string;
|
|
4023
4560
|
record: RawData_2;
|
|
4024
4561
|
}) => void;
|
|
4025
|
-
scroll: (position:
|
|
4562
|
+
scroll: (position: Required<ScrollOffset_2>) => void;
|
|
4026
4563
|
layoutAfterRealDataCellRender: (options: {
|
|
4027
4564
|
add: [number, number][];
|
|
4028
4565
|
remove: [number, number][];
|
|
@@ -4041,7 +4578,7 @@ onRowCellMouseUp?: (data: TargetCellInfo_2) => any;
|
|
|
4041
4578
|
onRowCellMouseMove?: (data: TargetCellInfo_2) => any;
|
|
4042
4579
|
onRowCellCollapsed?: (params: RowCellCollapsedParams_2) => any;
|
|
4043
4580
|
onRowCellAllCollapsed?: (isCollapsed: boolean) => any;
|
|
4044
|
-
onRowCellScroll?: (position:
|
|
4581
|
+
onRowCellScroll?: (position: Required<ScrollOffset_2>) => any;
|
|
4045
4582
|
onColCellHover?: (data: TargetCellInfo_2) => any;
|
|
4046
4583
|
onColCellClick?: (data: TargetCellInfo_2) => any;
|
|
4047
4584
|
onColCellDoubleClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -4130,7 +4667,7 @@ onLinkFieldJump?: (data: {
|
|
|
4130
4667
|
field: string;
|
|
4131
4668
|
record: RawData_2;
|
|
4132
4669
|
}) => any;
|
|
4133
|
-
onScroll?: (position:
|
|
4670
|
+
onScroll?: (position: Required<ScrollOffset_2>) => any;
|
|
4134
4671
|
onLayoutAfterRealDataCellRender?: (options: {
|
|
4135
4672
|
add: [number, number][];
|
|
4136
4673
|
remove: [number, number][];
|
|
@@ -4152,7 +4689,7 @@ rowCellMouseUp: (data: TargetCellInfo_2) => void;
|
|
|
4152
4689
|
rowCellMouseMove: (data: TargetCellInfo_2) => void;
|
|
4153
4690
|
rowCellCollapsed: (params: RowCellCollapsedParams_2) => void;
|
|
4154
4691
|
rowCellAllCollapsed: (isCollapsed: boolean) => void;
|
|
4155
|
-
rowCellScroll: (position:
|
|
4692
|
+
rowCellScroll: (position: Required<ScrollOffset_2>) => void;
|
|
4156
4693
|
colCellHover: (data: TargetCellInfo_2) => void;
|
|
4157
4694
|
colCellClick: (data: TargetCellInfo_2) => void;
|
|
4158
4695
|
colCellDoubleClick: (data: TargetCellInfo_2) => void;
|
|
@@ -4241,7 +4778,7 @@ linkFieldJump: (data: {
|
|
|
4241
4778
|
field: string;
|
|
4242
4779
|
record: RawData_2;
|
|
4243
4780
|
}) => void;
|
|
4244
|
-
scroll: (position:
|
|
4781
|
+
scroll: (position: Required<ScrollOffset_2>) => void;
|
|
4245
4782
|
layoutAfterRealDataCellRender: (options: {
|
|
4246
4783
|
add: [number, number][];
|
|
4247
4784
|
remove: [number, number][];
|
|
@@ -4260,7 +4797,7 @@ onRowCellMouseUp?: (data: TargetCellInfo_2) => any;
|
|
|
4260
4797
|
onRowCellMouseMove?: (data: TargetCellInfo_2) => any;
|
|
4261
4798
|
onRowCellCollapsed?: (params: RowCellCollapsedParams_2) => any;
|
|
4262
4799
|
onRowCellAllCollapsed?: (isCollapsed: boolean) => any;
|
|
4263
|
-
onRowCellScroll?: (position:
|
|
4800
|
+
onRowCellScroll?: (position: Required<ScrollOffset_2>) => any;
|
|
4264
4801
|
onColCellHover?: (data: TargetCellInfo_2) => any;
|
|
4265
4802
|
onColCellClick?: (data: TargetCellInfo_2) => any;
|
|
4266
4803
|
onColCellDoubleClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -4349,7 +4886,7 @@ onLinkFieldJump?: (data: {
|
|
|
4349
4886
|
field: string;
|
|
4350
4887
|
record: RawData_2;
|
|
4351
4888
|
}) => any;
|
|
4352
|
-
onScroll?: (position:
|
|
4889
|
+
onScroll?: (position: Required<ScrollOffset_2>) => any;
|
|
4353
4890
|
onLayoutAfterRealDataCellRender?: (options: {
|
|
4354
4891
|
add: [number, number][];
|
|
4355
4892
|
remove: [number, number][];
|
|
@@ -4405,29 +4942,40 @@ declare interface SortFuncParam extends Sort {
|
|
|
4405
4942
|
declare type SortMethod = 'ASC' | 'DESC' | 'asc' | 'desc';
|
|
4406
4943
|
|
|
4407
4944
|
declare interface SortParam extends Sort {
|
|
4408
|
-
/**
|
|
4945
|
+
/** 自定义排序 */
|
|
4409
4946
|
sortFunc?: (param: SortFuncParam) => Array<string | Record<string, any>>;
|
|
4410
4947
|
}
|
|
4411
4948
|
|
|
4412
4949
|
declare type SortParams_2 = SortParam[];
|
|
4413
4950
|
|
|
4414
4951
|
declare interface SplitLine {
|
|
4952
|
+
/** 水平分割线颜色 */
|
|
4415
4953
|
horizontalBorderColor?: string;
|
|
4954
|
+
/** 水平分割线颜色透明度 */
|
|
4416
4955
|
horizontalBorderColorOpacity?: number;
|
|
4956
|
+
/** 水平分割线宽度 */
|
|
4417
4957
|
horizontalBorderWidth?: number;
|
|
4958
|
+
/** 垂直分割线颜色 */
|
|
4418
4959
|
verticalBorderColor?: string;
|
|
4960
|
+
/** 垂直分割线颜色透明度 */
|
|
4419
4961
|
verticalBorderColorOpacity?: number;
|
|
4962
|
+
/** 垂直分割线宽度 */
|
|
4420
4963
|
verticalBorderWidth?: number;
|
|
4964
|
+
/** 分割线是否显示外阴影 */
|
|
4421
4965
|
showShadow?: boolean;
|
|
4966
|
+
/** 阴影宽度 */
|
|
4422
4967
|
shadowWidth?: number;
|
|
4968
|
+
/** 阴影线性渐变色 */
|
|
4423
4969
|
shadowColors?: {
|
|
4970
|
+
/** 线性变化左侧颜色 */
|
|
4424
4971
|
left: string;
|
|
4972
|
+
/** 线性变化右侧颜色 */
|
|
4425
4973
|
right: string;
|
|
4426
4974
|
};
|
|
4427
4975
|
}
|
|
4428
4976
|
|
|
4429
4977
|
declare abstract class SpreadSheet_2 extends EE {
|
|
4430
|
-
theme:
|
|
4978
|
+
theme: InternalFullyTheme;
|
|
4431
4979
|
store: Store;
|
|
4432
4980
|
dataCfg: S2DataConfig_2;
|
|
4433
4981
|
options: S2Options_2;
|
|
@@ -4442,6 +4990,10 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4442
4990
|
hdAdapter: HdAdapter;
|
|
4443
4991
|
private untypedOn;
|
|
4444
4992
|
private untypedEmit;
|
|
4993
|
+
/**
|
|
4994
|
+
* 表格是否已销毁
|
|
4995
|
+
*/
|
|
4996
|
+
private destroyed;
|
|
4445
4997
|
on: <K extends keyof EmitterType>(event: K, listener: EmitterType[K]) => this;
|
|
4446
4998
|
emit: <K extends keyof EmitterType>(event: K, ...args: Parameters<EmitterType[K]>) => boolean;
|
|
4447
4999
|
constructor(dom: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2 | null);
|
|
@@ -4487,7 +5039,7 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4487
5039
|
abstract clearDrillDownData(rowNodeId?: string, preventRender?: boolean): void;
|
|
4488
5040
|
abstract handleGroupSort(event: FederatedPointerEvent, meta: Node_2_2): void;
|
|
4489
5041
|
showTooltip<T = TooltipContentType_2>(showOptions: TooltipShowOptions<T>): void;
|
|
4490
|
-
showTooltipWithInfo(event: FederatedPointerEvent | MouseEvent,
|
|
5042
|
+
showTooltipWithInfo(event: FederatedPointerEvent | MouseEvent, cellInfos: TooltipData[], options?: TooltipOptions): void;
|
|
4491
5043
|
hideTooltip(): void;
|
|
4492
5044
|
destroyTooltip(): void;
|
|
4493
5045
|
registerIcons(): void;
|
|
@@ -4500,7 +5052,13 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4500
5052
|
*/
|
|
4501
5053
|
setDataCfg(dataCfg: S2DataConfig_2, reset?: boolean): void;
|
|
4502
5054
|
setOptions(options: Partial<S2Options_2>, reset?: boolean): void;
|
|
4503
|
-
|
|
5055
|
+
private doRender;
|
|
5056
|
+
/**
|
|
5057
|
+
* 同步渲染
|
|
5058
|
+
* @deprecated 适配 g5.0 异步渲染过程中暂时保留
|
|
5059
|
+
*/
|
|
5060
|
+
UNSAFE_render(reloadData?: boolean, options?: S2RenderOptions_2): void;
|
|
5061
|
+
render(reloadData?: boolean, options?: S2RenderOptions_2): Promise<void>;
|
|
4504
5062
|
destroy(): void;
|
|
4505
5063
|
setThemeCfg(themeCfg?: ThemeCfg_2): void;
|
|
4506
5064
|
setTheme(theme: S2Theme): void;
|
|
@@ -4524,14 +5082,6 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4524
5082
|
*/
|
|
4525
5083
|
getCanvasElement(): HTMLCanvasElement;
|
|
4526
5084
|
getLayoutWidthType(): LayoutWidthType;
|
|
4527
|
-
getRowNodes(level?: number): Node_2_2[];
|
|
4528
|
-
getRowLeafNodes(): Node_2_2[];
|
|
4529
|
-
/**
|
|
4530
|
-
* get columnNode in levels,
|
|
4531
|
-
* @param level -1 = get all
|
|
4532
|
-
*/
|
|
4533
|
-
getColumnNodes(level?: number): Node_2_2[];
|
|
4534
|
-
getColumnLeafNodes(): Node_2_2[];
|
|
4535
5085
|
/**
|
|
4536
5086
|
* Update scroll's offset, the value can be undefined,
|
|
4537
5087
|
* indicate not update current value
|
|
@@ -4541,7 +5091,7 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4541
5091
|
*/
|
|
4542
5092
|
updateScrollOffset(offsetConfig: OffsetConfig): void;
|
|
4543
5093
|
getCell<T extends S2CellType_2 = S2CellType_2>(target: CellEventTarget): T | null;
|
|
4544
|
-
getCellType(target: CellEventTarget):
|
|
5094
|
+
getCellType(target: CellEventTarget): CellType | undefined;
|
|
4545
5095
|
/**
|
|
4546
5096
|
* get total's config by dimension id
|
|
4547
5097
|
* @param dimension unique dimension id
|
|
@@ -4558,8 +5108,6 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
4558
5108
|
*/
|
|
4559
5109
|
protected initContainer(dom: S2MountContainer_2): void;
|
|
4560
5110
|
protected updateContainerStyle(): void;
|
|
4561
|
-
getInitColumnLeafNodes(): Node_2_2[];
|
|
4562
|
-
clearColumnLeafNodes(): void;
|
|
4563
5111
|
private initHiddenColumnsDetail;
|
|
4564
5112
|
private clearCanvasEvent;
|
|
4565
5113
|
/**
|
|
@@ -4608,34 +5156,91 @@ declare class Store {
|
|
|
4608
5156
|
size(): number;
|
|
4609
5157
|
}
|
|
4610
5158
|
|
|
4611
|
-
/**
|
|
4612
|
-
* All stored keys need type define here
|
|
4613
|
-
*/
|
|
4614
5159
|
declare interface StoreKey {
|
|
5160
|
+
/**
|
|
5161
|
+
* 水平滚动偏移
|
|
5162
|
+
*/
|
|
4615
5163
|
scrollX: number;
|
|
5164
|
+
/**
|
|
5165
|
+
* 垂直滚动偏移
|
|
5166
|
+
*/
|
|
4616
5167
|
scrollY: number;
|
|
4617
|
-
|
|
5168
|
+
/**
|
|
5169
|
+
* 行头水平滚动偏移
|
|
5170
|
+
*/
|
|
5171
|
+
rowHeaderScrollX: number;
|
|
5172
|
+
/**
|
|
5173
|
+
* 列头点击排序配置
|
|
5174
|
+
*/
|
|
4618
5175
|
sortParam: SortParam;
|
|
5176
|
+
/**
|
|
5177
|
+
* 下钻节点id和对应生成的 path 寻址路径
|
|
5178
|
+
*/
|
|
4619
5179
|
drillDownIdPathMap: Map<string, DataPath[]>;
|
|
5180
|
+
/**
|
|
5181
|
+
* 当前下钻节点
|
|
5182
|
+
*/
|
|
4620
5183
|
drillDownNode: Node_2_2;
|
|
5184
|
+
/**
|
|
5185
|
+
* 下钻数据的个数控制
|
|
5186
|
+
*/
|
|
4621
5187
|
drillItemsNum: number;
|
|
5188
|
+
/**
|
|
5189
|
+
* 下钻节点层级信息
|
|
5190
|
+
*/
|
|
4622
5191
|
drillDownFieldInLevel: PartDrillDownFieldInLevel[];
|
|
5192
|
+
/**
|
|
5193
|
+
* 当前交互状态信息
|
|
5194
|
+
*/
|
|
4623
5195
|
interactionStateInfo: InteractionStateInfo;
|
|
5196
|
+
/**
|
|
5197
|
+
* 原始数据配置
|
|
5198
|
+
*/
|
|
4624
5199
|
originalDataCfg: S2DataConfig_2;
|
|
5200
|
+
/**
|
|
5201
|
+
* 可视区域包裹盒模型
|
|
5202
|
+
*/
|
|
4625
5203
|
panelBBox: BBox;
|
|
5204
|
+
/**
|
|
5205
|
+
* 当前调整大小区域 group
|
|
5206
|
+
*/
|
|
4626
5207
|
activeResizeArea: Group;
|
|
5208
|
+
/**
|
|
5209
|
+
* 条件格式值区间
|
|
5210
|
+
*/
|
|
4627
5211
|
valueRanges: ValueRanges;
|
|
4628
|
-
|
|
5212
|
+
/**
|
|
5213
|
+
* 初次渲染时的列头叶子节点
|
|
5214
|
+
*/
|
|
5215
|
+
initColLeafNodes: Node_2_2[] | undefined;
|
|
4629
5216
|
/**
|
|
4630
5217
|
* 隐藏列详情
|
|
4631
5218
|
* | a, b, [c,d 隐藏] [icon e ] , [f 隐藏], [icon g] |
|
|
4632
5219
|
*/
|
|
4633
5220
|
hiddenColumnsDetail: HiddenColumnsInfo_2[];
|
|
5221
|
+
/**
|
|
5222
|
+
* 上一次渲染的列头
|
|
5223
|
+
*/
|
|
4634
5224
|
lastRenderedColumnFields: string[];
|
|
5225
|
+
/**
|
|
5226
|
+
* 是否手动调整过宽高
|
|
5227
|
+
*/
|
|
4635
5228
|
resized: boolean;
|
|
5229
|
+
/**
|
|
5230
|
+
* hover 显示的 icon 缓存
|
|
5231
|
+
*/
|
|
4636
5232
|
visibleActionIcons: GuiIcon[];
|
|
5233
|
+
/**
|
|
5234
|
+
* 上一次点击的单元格
|
|
5235
|
+
*/
|
|
4637
5236
|
lastClickedCell: S2CellType_2<ViewMeta_2> | null;
|
|
5237
|
+
/**
|
|
5238
|
+
* 初始化时的边界滚动配置
|
|
5239
|
+
*/
|
|
4638
5240
|
initOverscrollBehavior: InteractionOptions['overscrollBehavior'];
|
|
5241
|
+
/**
|
|
5242
|
+
* 排序方式
|
|
5243
|
+
*/
|
|
4639
5244
|
sortMethodMap: Record<string, SortMethod> | null;
|
|
4640
5245
|
[key: string]: unknown;
|
|
4641
5246
|
}
|
|
@@ -4652,7 +5257,7 @@ declare class TableColCell extends ColCell {
|
|
|
4652
5257
|
protected getColResizeArea(): Group | undefined;
|
|
4653
5258
|
protected isSortCell(): boolean;
|
|
4654
5259
|
protected showSortIcon(): boolean | undefined;
|
|
4655
|
-
protected getTextStyle(): TextTheme
|
|
5260
|
+
protected getTextStyle(): DeepRequired<TextTheme>;
|
|
4656
5261
|
protected getHorizontalResizeAreaName(): string;
|
|
4657
5262
|
protected drawBackgroundShape(): void;
|
|
4658
5263
|
protected handleViewport(viewport: AreaRange): AreaRange;
|
|
@@ -4664,15 +5269,14 @@ declare class TableCornerCell extends TableColCell {
|
|
|
4664
5269
|
}
|
|
4665
5270
|
|
|
4666
5271
|
declare class TableDataCell extends DataCell_2 {
|
|
4667
|
-
protected
|
|
4668
|
-
protected drawLinkFieldShape(): void;
|
|
5272
|
+
protected getLinkFieldStyle(): string;
|
|
4669
5273
|
drawBorders(): void;
|
|
4670
5274
|
protected shouldDrawResizeArea(): boolean;
|
|
4671
5275
|
drawResizeArea(): void;
|
|
4672
5276
|
}
|
|
4673
5277
|
|
|
4674
|
-
declare class
|
|
4675
|
-
get cellType():
|
|
5278
|
+
declare class TableSeriesNumberCell extends TableDataCell {
|
|
5279
|
+
get cellType(): CellType;
|
|
4676
5280
|
protected getTextStyle(): TextTheme;
|
|
4677
5281
|
}
|
|
4678
5282
|
|
|
@@ -4690,7 +5294,7 @@ rowCellMouseUp: (data: TargetCellInfo_2) => void;
|
|
|
4690
5294
|
rowCellMouseMove: (data: TargetCellInfo_2) => void;
|
|
4691
5295
|
rowCellCollapsed: (params: RowCellCollapsedParams_2) => void;
|
|
4692
5296
|
rowCellAllCollapsed: (isCollapsed: boolean) => void;
|
|
4693
|
-
rowCellScroll: (position:
|
|
5297
|
+
rowCellScroll: (position: Required<ScrollOffset_2>) => void;
|
|
4694
5298
|
colCellHover: (data: TargetCellInfo_2) => void;
|
|
4695
5299
|
colCellClick: (data: TargetCellInfo_2) => void;
|
|
4696
5300
|
colCellDoubleClick: (data: TargetCellInfo_2) => void;
|
|
@@ -4779,7 +5383,7 @@ linkFieldJump: (data: {
|
|
|
4779
5383
|
field: string;
|
|
4780
5384
|
record: RawData_2;
|
|
4781
5385
|
}) => void;
|
|
4782
|
-
scroll: (position:
|
|
5386
|
+
scroll: (position: Required<ScrollOffset_2>) => void;
|
|
4783
5387
|
layoutAfterRealDataCellRender: (options: {
|
|
4784
5388
|
add: [number, number][];
|
|
4785
5389
|
remove: [number, number][];
|
|
@@ -4798,7 +5402,7 @@ onRowCellMouseUp?: (data: TargetCellInfo_2) => any;
|
|
|
4798
5402
|
onRowCellMouseMove?: (data: TargetCellInfo_2) => any;
|
|
4799
5403
|
onRowCellCollapsed?: (params: RowCellCollapsedParams_2) => any;
|
|
4800
5404
|
onRowCellAllCollapsed?: (isCollapsed: boolean) => any;
|
|
4801
|
-
onRowCellScroll?: (position:
|
|
5405
|
+
onRowCellScroll?: (position: Required<ScrollOffset_2>) => any;
|
|
4802
5406
|
onColCellHover?: (data: TargetCellInfo_2) => any;
|
|
4803
5407
|
onColCellClick?: (data: TargetCellInfo_2) => any;
|
|
4804
5408
|
onColCellDoubleClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -4887,7 +5491,7 @@ onLinkFieldJump?: (data: {
|
|
|
4887
5491
|
field: string;
|
|
4888
5492
|
record: RawData_2;
|
|
4889
5493
|
}) => any;
|
|
4890
|
-
onScroll?: (position:
|
|
5494
|
+
onScroll?: (position: Required<ScrollOffset_2>) => any;
|
|
4891
5495
|
onLayoutAfterRealDataCellRender?: (options: {
|
|
4892
5496
|
add: [number, number][];
|
|
4893
5497
|
remove: [number, number][];
|
|
@@ -4913,22 +5517,35 @@ declare interface TextAlignStyle {
|
|
|
4913
5517
|
|
|
4914
5518
|
declare type TextBaseline = 'top' | 'middle' | 'bottom';
|
|
4915
5519
|
|
|
5520
|
+
declare interface TextCondition extends Condition<TextTheme> {
|
|
5521
|
+
position?: IconPosition;
|
|
5522
|
+
}
|
|
5523
|
+
|
|
4916
5524
|
declare interface TextTheme extends TextAlignStyle {
|
|
5525
|
+
/** 字体 */
|
|
4917
5526
|
fontFamily?: string;
|
|
5527
|
+
/** 字体大小 */
|
|
4918
5528
|
fontSize?: number;
|
|
5529
|
+
/** 字体粗细 */
|
|
4919
5530
|
fontWeight?: number | 'normal' | 'bold' | 'bolder' | 'lighter';
|
|
5531
|
+
/** 字体颜色 */
|
|
4920
5532
|
fill?: string;
|
|
5533
|
+
/** 链接文本颜色 */
|
|
4921
5534
|
linkTextFill?: string;
|
|
5535
|
+
/** 字体透明度 */
|
|
4922
5536
|
opacity?: number;
|
|
4923
5537
|
}
|
|
4924
5538
|
|
|
4925
5539
|
declare interface ThemeCfg_2 {
|
|
5540
|
+
/** 主题 */
|
|
4926
5541
|
theme?: S2Theme;
|
|
5542
|
+
/** 色板 */
|
|
4927
5543
|
palette?: Pick<Palette, 'basicColors' | 'semanticColors' | 'others'>;
|
|
5544
|
+
/** 主题名 */
|
|
4928
5545
|
name?: ThemeName;
|
|
4929
5546
|
}
|
|
4930
5547
|
|
|
4931
|
-
declare type ThemeName =
|
|
5548
|
+
declare type ThemeName = keyof typeof PALETTE_MAP;
|
|
4932
5549
|
|
|
4933
5550
|
declare interface Tooltip<T = TooltipContentType_2, Icon = Element | string, Text = string> extends BaseTooltipConfig<T, Icon, Text> {
|
|
4934
5551
|
/**
|
|
@@ -5007,11 +5624,17 @@ declare type TooltipOperatorClickHandler = (params: {
|
|
|
5007
5624
|
}) => void;
|
|
5008
5625
|
|
|
5009
5626
|
declare interface TooltipOperatorMenu<Icon = Element | string, Text = string> {
|
|
5627
|
+
/** 唯一标识 */
|
|
5010
5628
|
key: string;
|
|
5629
|
+
/** 自定义 icon */
|
|
5011
5630
|
icon?: Icon;
|
|
5631
|
+
/** 名称 */
|
|
5012
5632
|
text?: Text;
|
|
5633
|
+
/** 点击回调 */
|
|
5013
5634
|
onClick?: (cell: S2CellType_2) => void;
|
|
5635
|
+
/** 是否显示 */
|
|
5014
5636
|
visible?: boolean | ((cell: S2CellType_2) => boolean);
|
|
5637
|
+
/** 子菜单 */
|
|
5015
5638
|
children?: TooltipOperatorMenu<Icon, Text>[];
|
|
5016
5639
|
}
|
|
5017
5640
|
|
|
@@ -5022,14 +5645,54 @@ declare interface TooltipOperatorOptions<Icon = Element | string, Text = string>
|
|
|
5022
5645
|
}
|
|
5023
5646
|
|
|
5024
5647
|
declare interface TooltipOptions<Icon = Element | string, Text = string> {
|
|
5648
|
+
/**
|
|
5649
|
+
* 是否隐藏汇总项
|
|
5650
|
+
* @example "数量(总和) 999"
|
|
5651
|
+
*/
|
|
5025
5652
|
hideSummary?: boolean;
|
|
5653
|
+
/**
|
|
5654
|
+
* 顶部操作项
|
|
5655
|
+
*/
|
|
5026
5656
|
operator?: TooltipOperatorOptions<Icon, Text>;
|
|
5027
|
-
|
|
5657
|
+
/**
|
|
5658
|
+
* 是否是小计/总计
|
|
5659
|
+
*/
|
|
5028
5660
|
isTotals?: boolean;
|
|
5029
|
-
|
|
5030
|
-
|
|
5661
|
+
/**
|
|
5662
|
+
* 只展示当前单元格文本 (不含汇总/行列头信息), 如果存在省略, 显示完整文本
|
|
5663
|
+
* 1. 用于单元格省略后 hover 显示完整文本
|
|
5664
|
+
* 2. 明细表 hover/click 显示当前单元格文本
|
|
5665
|
+
* 3. 自定义交互 hover/click 场景
|
|
5666
|
+
* @example
|
|
5667
|
+
s2.showTooltip({
|
|
5668
|
+
...
|
|
5669
|
+
options: { onlyShowCellText: true }
|
|
5670
|
+
})
|
|
5671
|
+
*/
|
|
5672
|
+
onlyShowCellText?: boolean;
|
|
5673
|
+
/**
|
|
5674
|
+
* 只展示顶部操作项菜单 (不含汇总/行列头/单元格信息)
|
|
5675
|
+
* 1. 用于排序场景
|
|
5676
|
+
* 2. 自定义交互
|
|
5677
|
+
* @example
|
|
5678
|
+
s2.showTooltip({
|
|
5679
|
+
...
|
|
5680
|
+
options: { onlyShowOperator: true }
|
|
5681
|
+
})
|
|
5682
|
+
*/
|
|
5683
|
+
onlyShowOperator?: boolean;
|
|
5684
|
+
/**
|
|
5685
|
+
* 是否格式化数据
|
|
5686
|
+
*/
|
|
5031
5687
|
enableFormat?: boolean;
|
|
5688
|
+
/**
|
|
5689
|
+
* 是否强制清空 dom
|
|
5690
|
+
*/
|
|
5032
5691
|
forceRender?: boolean;
|
|
5692
|
+
/**
|
|
5693
|
+
* 自定义数据
|
|
5694
|
+
*/
|
|
5695
|
+
data?: TooltipData;
|
|
5033
5696
|
}
|
|
5034
5697
|
|
|
5035
5698
|
declare type TooltipPosition = Point;
|
|
@@ -5098,6 +5761,11 @@ declare type TotalSelectionsOfMultiData = {
|
|
|
5098
5761
|
column?: TotalSelection;
|
|
5099
5762
|
};
|
|
5100
5763
|
|
|
5764
|
+
declare interface Transformer_2 {
|
|
5765
|
+
[CopyMIMEType.PLAIN]: MatrixPlainTransformer;
|
|
5766
|
+
[CopyMIMEType.HTML]: MatrixHTMLTransformer;
|
|
5767
|
+
}
|
|
5768
|
+
|
|
5101
5769
|
export declare const useExpose: (expose: (exposed?: Record<string, any>) => void) => ShallowRef<SheetExpose>;
|
|
5102
5770
|
|
|
5103
5771
|
declare const VALUE_FIELD = "$$value$$";
|