@antv/s2-vue 2.0.0-next.7 → 2.0.0-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/style.min.css +1 -1
- package/esm/index.d.ts +558 -331
- package/esm/index.js +52 -46
- package/esm/index.js.map +1 -1
- package/esm/style.css +28 -22
- package/lib/index.js +52 -46
- package/lib/index.js.map +1 -1
- package/lib/style.css +28 -22
- package/package.json +8 -8
package/esm/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { AllowedComponentProps } from 'vue';
|
|
2
2
|
import { BaseTooltip } from '@antv/s2';
|
|
3
|
+
import { BaseTooltipOperatorMenuOptions } from '@antv/s2';
|
|
3
4
|
import { Canvas } from '@antv/g';
|
|
5
|
+
import type { CanvasConfig } from '@antv/g';
|
|
4
6
|
import type { CellScrollPosition } from '@antv/s2';
|
|
5
7
|
import { ComponentCustomProps } from 'vue';
|
|
6
8
|
import { ComponentOptionsMixin } from 'vue';
|
|
7
9
|
import { ComputedRef } from 'vue';
|
|
8
10
|
import type * as CSS_2 from 'csstype';
|
|
11
|
+
import { CSSGlobalKeywords } from '@antv/g-lite/dist/css';
|
|
9
12
|
import { DataCell } from '@antv/s2';
|
|
10
13
|
import { DebouncedFunc } from 'lodash';
|
|
11
14
|
import { DefineComponent } from 'vue';
|
|
@@ -16,6 +19,8 @@ import { ExtractPropTypes } from 'vue';
|
|
|
16
19
|
import { FederatedPointerEvent } from '@antv/g';
|
|
17
20
|
import { GEvent } from '@antv/s2';
|
|
18
21
|
import { Group } from '@antv/g';
|
|
22
|
+
import { Group as Group_2 } from '@antv/g-lite';
|
|
23
|
+
import type { HeaderActionIcon } from '@antv/s2';
|
|
19
24
|
import { HiddenColumnsInfo } from '@antv/s2';
|
|
20
25
|
import { ICanvas } from '@antv/g';
|
|
21
26
|
import type { IEventTarget } from '@antv/g';
|
|
@@ -33,6 +38,7 @@ import { Polygon } from '@antv/g';
|
|
|
33
38
|
import { PropType } from 'vue';
|
|
34
39
|
import { RawData } from '@antv/s2';
|
|
35
40
|
import { Rect } from '@antv/g';
|
|
41
|
+
import { Rectangle } from '@antv/g';
|
|
36
42
|
import { Ref } from 'vue';
|
|
37
43
|
import { ResizeInfo } from '@antv/s2';
|
|
38
44
|
import { ResizeParams } from '@antv/s2';
|
|
@@ -52,12 +58,9 @@ import { TextStyleProps } from '@antv/g';
|
|
|
52
58
|
import { ThemeCfg } from '@antv/s2';
|
|
53
59
|
import { Timer } from 'd3-timer';
|
|
54
60
|
import { TooltipContentType } from '@antv/s2';
|
|
55
|
-
import { ViewMeta } from '@antv/s2';
|
|
56
61
|
import { ViewMetaData } from '@antv/s2';
|
|
57
62
|
import { VNodeProps } from 'vue';
|
|
58
63
|
|
|
59
|
-
declare type ActionIconName = string | FullyIconName;
|
|
60
|
-
|
|
61
64
|
declare type Adaptive = boolean | {
|
|
62
65
|
width?: boolean;
|
|
63
66
|
height?: boolean;
|
|
@@ -122,24 +125,13 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
122
125
|
protected textShapes: CustomText[];
|
|
123
126
|
protected linkFieldShape: Line;
|
|
124
127
|
protected actualText: string;
|
|
125
|
-
protected
|
|
128
|
+
protected originalText: string;
|
|
126
129
|
protected conditions: Conditions;
|
|
127
130
|
protected conditionIntervalShape: Rect | undefined;
|
|
128
131
|
protected conditionIconShape: GuiIcon;
|
|
129
132
|
protected conditionIconShapes: GuiIcon[];
|
|
130
133
|
protected groupedIcons: GroupedIcons;
|
|
131
134
|
protected stateShapes: Map<StateShapeLayer, DisplayObject<any, any>>;
|
|
132
|
-
constructor(meta: T, spreadsheet: SpreadSheet_2, ...restOptions: unknown[]);
|
|
133
|
-
getMeta(): T;
|
|
134
|
-
setMeta(viewMeta: T): void;
|
|
135
|
-
getIconStyle(): DeepRequired<IconTheme>;
|
|
136
|
-
getActualText(): string;
|
|
137
|
-
getFieldValue(): string;
|
|
138
|
-
/**
|
|
139
|
-
* in case there are more params to be handled
|
|
140
|
-
* @param options any type's rest params
|
|
141
|
-
*/
|
|
142
|
-
protected handleRestOptions(...options: unknown[]): void;
|
|
143
135
|
/**
|
|
144
136
|
* Return the type of the cell
|
|
145
137
|
*/
|
|
@@ -160,11 +152,64 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
160
152
|
protected abstract getIconPosition(): PointLike;
|
|
161
153
|
protected abstract findFieldCondition(conditions: Condition[] | undefined): Condition | undefined;
|
|
162
154
|
protected abstract mappingValue(condition: Condition): ConditionMappingResult | undefined | null;
|
|
155
|
+
constructor(meta: T, spreadsheet: SpreadSheet_2, ...restOptions: unknown[]);
|
|
156
|
+
/**
|
|
157
|
+
* in case there are more params to be handled
|
|
158
|
+
* @param options any type's rest params
|
|
159
|
+
*/
|
|
160
|
+
protected handleRestOptions(...options: unknown[]): void;
|
|
161
|
+
getMeta(): T;
|
|
162
|
+
setMeta(viewMeta: T): void;
|
|
163
|
+
getIconStyle(): DeepRequired<IconTheme>;
|
|
164
|
+
/**
|
|
165
|
+
* 获取实际渲染的文本 (含省略号)
|
|
166
|
+
*/
|
|
167
|
+
getActualText(): string;
|
|
168
|
+
/**
|
|
169
|
+
* 实际渲染的文本宽度, 如果是多行文本, 取最大的一行宽度
|
|
170
|
+
*/
|
|
171
|
+
getActualTextWidth(): number;
|
|
172
|
+
/**
|
|
173
|
+
* 实际渲染的文本宽度, 如果是多行文本, 取每一行文本高度的总和)
|
|
174
|
+
* @alias getMultiLineActualTextHeight
|
|
175
|
+
*/
|
|
176
|
+
getActualTextHeight(): number;
|
|
177
|
+
/**
|
|
178
|
+
* 获取实际渲染的多行文本 (含省略号)
|
|
179
|
+
*/
|
|
180
|
+
getMultiLineActualTexts(): string[];
|
|
181
|
+
/**
|
|
182
|
+
* 实际渲染的多行文本宽度 (每一行文本宽度的总和)
|
|
183
|
+
*/
|
|
184
|
+
getMultiLineActualTextWidth(): number;
|
|
185
|
+
/**
|
|
186
|
+
* 实际渲染的多行文本高度 (每一行文本高度的总和)
|
|
187
|
+
* @alias getActualTextHeight
|
|
188
|
+
*/
|
|
189
|
+
getMultiLineActualTextHeight(): number;
|
|
190
|
+
/**
|
|
191
|
+
* 获取原始的文本 (不含省略号)
|
|
192
|
+
*/
|
|
193
|
+
getOriginalText(): string;
|
|
194
|
+
/**
|
|
195
|
+
* 文本是否溢出 (有省略号)
|
|
196
|
+
*/
|
|
197
|
+
isTextOverflowing(): boolean;
|
|
198
|
+
/**
|
|
199
|
+
* 是否是多行文本
|
|
200
|
+
*/
|
|
201
|
+
isMultiLineText(): boolean;
|
|
202
|
+
getEmptyPlaceholder(): string | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* 获取文本包围盒
|
|
205
|
+
*/
|
|
206
|
+
getTextLineBoundingRects(): Rectangle[];
|
|
207
|
+
getFieldValue(): string;
|
|
163
208
|
protected shouldInit(): boolean;
|
|
164
209
|
getStyle<K extends keyof InternalFullyTheme = CellType>(name?: K): InternalFullyTheme[K] | InternalFullyCellTheme;
|
|
165
210
|
getLinkFieldShape(): Line;
|
|
166
211
|
protected getResizeAreaStyle(): ResizeArea;
|
|
167
|
-
protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell: S2CellType_2): boolean | ResizeType | ((resizeInfo: ResizeInfo_2) => boolean) | ((cell: S2CellType_2
|
|
212
|
+
protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell: S2CellType_2): boolean | ResizeType | ((resizeInfo: ResizeInfo_2) => boolean) | ((cell: S2CellType_2) => boolean) | undefined;
|
|
168
213
|
getBBoxByType(type?: CellClipBox): SimpleBBox;
|
|
169
214
|
drawBorders(): void;
|
|
170
215
|
/**
|
|
@@ -181,10 +226,12 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
181
226
|
* 交互使用的背景色
|
|
182
227
|
*/
|
|
183
228
|
protected drawInteractiveBgShape(): void;
|
|
184
|
-
|
|
229
|
+
renderTextShape(style: TextStyleProps, options?: RenderTextShapeOptions): CustomText;
|
|
230
|
+
updateTextPosition(position?: PointLike): void;
|
|
231
|
+
drawTextShape(options?: RenderTextShapeOptions): void;
|
|
185
232
|
protected drawLinkFieldShape(showLinkFieldShape: boolean, linkFillColor: string): void;
|
|
186
233
|
protected getLinkFieldStyle(): string;
|
|
187
|
-
protected drawLinkField(meta: Node_2_2 |
|
|
234
|
+
protected drawLinkField(meta: Node_2_2 | ViewMeta): void;
|
|
188
235
|
updateByState(stateName: InteractionStateName, cell: S2CellType_2): void;
|
|
189
236
|
protected getInteractiveBorderShapeStyle<T>(borderSize: T & number): {
|
|
190
237
|
x: number;
|
|
@@ -203,7 +250,7 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
203
250
|
resetTextAndConditionIconShapes(): void;
|
|
204
251
|
get cellConditions(): Conditions;
|
|
205
252
|
drawConditionIconShapes(): void;
|
|
206
|
-
getTextConditionMappingResult(): ConditionMappingResult
|
|
253
|
+
getTextConditionMappingResult(): ConditionMappingResult | null | undefined;
|
|
207
254
|
getContainConditionMappingResultTextStyle(style: TextTheme | undefined): {
|
|
208
255
|
fill: string;
|
|
209
256
|
minValue?: number | undefined;
|
|
@@ -212,13 +259,19 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
212
259
|
isCompare?: boolean | undefined;
|
|
213
260
|
intelligentReverseTextColor?: boolean | undefined;
|
|
214
261
|
fieldValue?: number | undefined;
|
|
215
|
-
fontFamily?: string | undefined;
|
|
216
262
|
fontSize?: number | undefined;
|
|
217
|
-
fontWeight?: number | "bold" | "normal" | "bolder" | "lighter" | undefined;
|
|
218
263
|
linkTextFill?: string | undefined;
|
|
219
|
-
opacity?: number | undefined;
|
|
220
264
|
textAlign?: TextAlign | undefined;
|
|
221
265
|
textBaseline?: TextBaseline | undefined;
|
|
266
|
+
opacity?: string | number | undefined;
|
|
267
|
+
fontFamily?: string | undefined;
|
|
268
|
+
fontWeight?: number | "bold" | CSSGlobalKeywords | "normal" | "bolder" | "lighter" | undefined;
|
|
269
|
+
wordWrap?: boolean | undefined;
|
|
270
|
+
maxLines?: number | undefined;
|
|
271
|
+
lineHeight?: string | number | undefined;
|
|
272
|
+
textOverflow?: string | undefined;
|
|
273
|
+
fontStyle?: CSSGlobalKeywords | "normal" | "italic" | "oblique" | undefined;
|
|
274
|
+
fontVariant?: string | undefined;
|
|
222
275
|
};
|
|
223
276
|
/**
|
|
224
277
|
* 获取默认字体颜色:根据字段标记背景颜色,设置字体颜色
|
|
@@ -233,7 +286,7 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
233
286
|
intelligentReverseTextColor: boolean;
|
|
234
287
|
backgroundColor?: undefined;
|
|
235
288
|
};
|
|
236
|
-
getIconConditionResult():
|
|
289
|
+
getIconConditionResult(): HeaderActionNameOptions | undefined;
|
|
237
290
|
protected getActionAndConditionIconWidth(position?: IconPosition): number;
|
|
238
291
|
}
|
|
239
292
|
|
|
@@ -296,15 +349,36 @@ declare interface BaseDataSet {
|
|
|
296
349
|
}
|
|
297
350
|
|
|
298
351
|
declare abstract class BaseDataSet_2 {
|
|
352
|
+
/**
|
|
353
|
+
* 字段信息
|
|
354
|
+
*/
|
|
299
355
|
fields: Fields;
|
|
356
|
+
/**
|
|
357
|
+
* 字段元信息,包含有字段名、格式化、描述等
|
|
358
|
+
*/
|
|
300
359
|
meta: Meta[];
|
|
360
|
+
/**
|
|
361
|
+
* 原始数据
|
|
362
|
+
*/
|
|
301
363
|
originData: RawData_2[];
|
|
364
|
+
/**
|
|
365
|
+
* 二维索引数据
|
|
366
|
+
*/
|
|
302
367
|
indexesData: RawData_2[][] | RawData_2[];
|
|
368
|
+
/**
|
|
369
|
+
* 高级排序, 组内排序
|
|
370
|
+
*/
|
|
303
371
|
sortParams: SortParams_2 | undefined;
|
|
372
|
+
/**
|
|
373
|
+
* 筛选配置
|
|
374
|
+
*/
|
|
304
375
|
filterParams: FilterParam[] | undefined;
|
|
376
|
+
/**
|
|
377
|
+
* 表格实例
|
|
378
|
+
*/
|
|
305
379
|
protected spreadsheet: SpreadSheet_2;
|
|
306
|
-
constructor(spreadsheet: SpreadSheet_2);
|
|
307
380
|
protected displayData: RawData_2[];
|
|
381
|
+
constructor(spreadsheet: SpreadSheet_2);
|
|
308
382
|
private getField;
|
|
309
383
|
/**
|
|
310
384
|
* 获取字段信息
|
|
@@ -319,12 +393,12 @@ declare abstract class BaseDataSet_2 {
|
|
|
319
393
|
* 获取自定义单元格字段名称
|
|
320
394
|
* @param cell
|
|
321
395
|
*/
|
|
322
|
-
getCustomRowFieldName(cell: S2CellType_2<
|
|
396
|
+
getCustomRowFieldName(cell: S2CellType_2<ViewMeta | Node_2_2>): string | undefined;
|
|
323
397
|
/**
|
|
324
398
|
* 获取自定义单元格字段描述
|
|
325
399
|
* @param cell
|
|
326
400
|
*/
|
|
327
|
-
getCustomFieldDescription: (cell: S2CellType_2<
|
|
401
|
+
getCustomFieldDescription: (cell: S2CellType_2<ViewMeta | Node_2_2>) => string | undefined;
|
|
328
402
|
/**
|
|
329
403
|
* 获得字段格式方法
|
|
330
404
|
* @param field
|
|
@@ -335,8 +409,15 @@ declare abstract class BaseDataSet_2 {
|
|
|
335
409
|
* @param field
|
|
336
410
|
*/
|
|
337
411
|
getFieldDescription(field: CustomHeaderField): string | undefined;
|
|
412
|
+
/**
|
|
413
|
+
* 设置数据配置
|
|
414
|
+
* @param dataCfg
|
|
415
|
+
*/
|
|
338
416
|
setDataCfg(dataCfg: S2DataConfig_2): void;
|
|
339
|
-
|
|
417
|
+
/**
|
|
418
|
+
* 添加 (角头/数值虚拟字段) 格式化信息
|
|
419
|
+
*/
|
|
420
|
+
getFieldMetaWithExtraField(meta: Meta[] | undefined, defaultExtraFieldText: string): Meta[];
|
|
340
421
|
getDisplayDataSet(): RawData_2[];
|
|
341
422
|
getValueRangeByField(field: string): ValueRange;
|
|
342
423
|
/** ******************NEED IMPLEMENT BY USER CASE************************ */
|
|
@@ -346,6 +427,7 @@ declare abstract class BaseDataSet_2 {
|
|
|
346
427
|
*/
|
|
347
428
|
abstract processDataCfg(dataCfg: S2DataConfig_2): S2DataConfig_2;
|
|
348
429
|
/**
|
|
430
|
+
* 获取指定字段下的维值
|
|
349
431
|
* 1、query !== null
|
|
350
432
|
* province city => field
|
|
351
433
|
* 辽宁省
|
|
@@ -359,30 +441,28 @@ declare abstract class BaseDataSet_2 {
|
|
|
359
441
|
* query param is not necessary, when just
|
|
360
442
|
* get some field's all dimension values
|
|
361
443
|
*
|
|
362
|
-
* @param field
|
|
363
|
-
* @param query
|
|
444
|
+
* @param field
|
|
445
|
+
* @param query
|
|
364
446
|
*/
|
|
365
447
|
abstract getDimensionValues(field: string, query?: Query): string[];
|
|
366
448
|
/**
|
|
367
|
-
*
|
|
368
|
-
* cross data cell data
|
|
369
|
-
* @param params
|
|
449
|
+
* 获取单个的单元格数据
|
|
370
450
|
*/
|
|
371
|
-
abstract getCellData(params:
|
|
451
|
+
abstract getCellData(params: GetCellDataParams): ViewMetaData_2 | undefined;
|
|
372
452
|
/**
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
453
|
+
* 获取批量的单元格数据
|
|
454
|
+
* 如果 query 为空, 则返回全量数据
|
|
455
|
+
*/
|
|
456
|
+
abstract getCellMultiData(params: GetCellMultiDataParams): ViewMetaData_2[];
|
|
457
|
+
/**
|
|
458
|
+
* 是否超过 1 个数值
|
|
378
459
|
*/
|
|
379
|
-
abstract getMultiData(query: Query, totals?: TotalSelectionsOfMultiData, drillDownFields?: string[]): Data[] | CellData[];
|
|
380
460
|
moreThanOneValue(): boolean;
|
|
381
461
|
/**
|
|
382
462
|
* get a row cells data including cell
|
|
383
|
-
* @param
|
|
463
|
+
* @param cellMeta
|
|
384
464
|
*/
|
|
385
|
-
abstract getRowData(
|
|
465
|
+
abstract getRowData(cellMeta: CellMeta): RowData;
|
|
386
466
|
}
|
|
387
467
|
|
|
388
468
|
declare interface BaseDrillDownComponentProps<DataSet = BaseDataSet> {
|
|
@@ -441,7 +521,8 @@ declare abstract class BaseFacet {
|
|
|
441
521
|
gridInfo: GridInfo;
|
|
442
522
|
protected abstract doLayout(): LayoutResult_2;
|
|
443
523
|
abstract getViewCellHeights(): ViewCellHeights;
|
|
444
|
-
abstract getCellMeta(rowIndex: number, colIndex: number):
|
|
524
|
+
abstract getCellMeta(rowIndex: number, colIndex: number): ViewMeta | null;
|
|
525
|
+
protected abstract getColNodeHeight(colNode: Node_2_2, colsHierarchy: Hierarchy): number;
|
|
445
526
|
protected scrollFrameId: ReturnType<typeof requestAnimationFrame> | null;
|
|
446
527
|
get scrollBarTheme(): DeepRequired<ScrollBarTheme>;
|
|
447
528
|
get scrollBarSize(): number;
|
|
@@ -456,7 +537,12 @@ declare abstract class BaseFacet {
|
|
|
456
537
|
protected getRowCellHeight(node: Node_2_2): number;
|
|
457
538
|
protected getColCellDraggedWidth(node: Node_2_2): number | undefined;
|
|
458
539
|
protected getColCellDraggedHeight(node: Node_2_2): number | undefined;
|
|
459
|
-
protected getDefaultColNodeHeight(colNode: Node_2_2): number;
|
|
540
|
+
protected getDefaultColNodeHeight(colNode: Node_2_2, colsHierarchy: Hierarchy): number;
|
|
541
|
+
protected getCellAdaptiveHeight(cell: HeaderCell, defaultHeight: number): number;
|
|
542
|
+
/**
|
|
543
|
+
* 将每一层级的采样节点更新为高度最大的节点 (未隐藏, 非汇总节点)
|
|
544
|
+
*/
|
|
545
|
+
protected updateColsHierarchySampleMaxHeightNodes(colsHierarchy: Hierarchy): void;
|
|
460
546
|
hideScrollBar: () => void;
|
|
461
547
|
delayHideScrollBar: DebouncedFunc<() => void>;
|
|
462
548
|
delayHideScrollbarOnMobile: () => void;
|
|
@@ -569,7 +655,7 @@ declare abstract class BaseFacet {
|
|
|
569
655
|
* @protected
|
|
570
656
|
*/
|
|
571
657
|
protected translateRelatedGroups(scrollX: number, scrollY: number, hRowScroll: number): void;
|
|
572
|
-
addCell: (cell: S2CellType_2<
|
|
658
|
+
addCell: (cell: S2CellType_2<ViewMeta>) => void;
|
|
573
659
|
realCellRender: (scrollX: number, scrollY: number) => void;
|
|
574
660
|
protected init(): void;
|
|
575
661
|
protected renderBackground(): void;
|
|
@@ -791,23 +877,23 @@ declare abstract class BaseFacet {
|
|
|
791
877
|
* @example 获取全部: facet.getHeaderCells()
|
|
792
878
|
* @example 获取一组 facet.getHeaderCells(['root[&]浙江省[&]宁波市', 'root[&]浙江省[&]杭州市'])
|
|
793
879
|
*/
|
|
794
|
-
getHeaderCells(cellIds?: string[]): S2CellType_2<
|
|
880
|
+
getHeaderCells(cellIds?: string[]): S2CellType_2<ViewMeta>[];
|
|
795
881
|
/**
|
|
796
882
|
* 根据单元格 id 获取指定单元格 (不含可视区域)
|
|
797
883
|
* @example facet.getCellById('root[&]浙江省[&]宁波市')
|
|
798
884
|
*/
|
|
799
|
-
getCellById(cellId: string): S2CellType_2<
|
|
885
|
+
getCellById(cellId: string): S2CellType_2<ViewMeta> | undefined;
|
|
800
886
|
/**
|
|
801
887
|
* 根据单元格 field 获取指定单元格 (不含可视区域)
|
|
802
888
|
* @example facet.getCellByField('city')
|
|
803
889
|
*/
|
|
804
|
-
getCellsByField(cellField: string): S2CellType_2<
|
|
890
|
+
getCellsByField(cellField: string): S2CellType_2<ViewMeta>[];
|
|
805
891
|
/**
|
|
806
892
|
* 获取所有单元格 (角头,行头,列头,数值) (不含可视区域)
|
|
807
893
|
* @example 获取全部: facet.getCells()
|
|
808
894
|
* @example 获取一组 facet.getCells(['root[&]浙江省[&]宁波市', 'root[&]浙江省[&]杭州市'])
|
|
809
895
|
*/
|
|
810
|
-
getCells(cellIds?: string[]): S2CellType_2<
|
|
896
|
+
getCells(cellIds?: string[]): S2CellType_2<ViewMeta>[];
|
|
811
897
|
getInitColLeafNodes(): Node_2_2[];
|
|
812
898
|
clearInitColLeafNodes(): void;
|
|
813
899
|
}
|
|
@@ -829,8 +915,12 @@ declare interface BaseFields {
|
|
|
829
915
|
* use {@see headerConfig} instead
|
|
830
916
|
*/
|
|
831
917
|
declare abstract class BaseHeader<T extends BaseHeaderConfig> extends Group {
|
|
918
|
+
protected abstract layout(): void;
|
|
919
|
+
protected abstract offset(): void;
|
|
920
|
+
protected abstract clip(): void;
|
|
921
|
+
protected abstract getCellInstance(node: Node_2_2): S2CellType_2;
|
|
832
922
|
protected headerConfig: T;
|
|
833
|
-
protected constructor(
|
|
923
|
+
protected constructor(config: T);
|
|
834
924
|
getHeaderConfig(): T;
|
|
835
925
|
/**
|
|
836
926
|
* 清空热区,为重绘做准备,防止热区重复渲染
|
|
@@ -851,9 +941,6 @@ declare abstract class BaseHeader<T extends BaseHeaderConfig> extends Group {
|
|
|
851
941
|
* @param type
|
|
852
942
|
*/
|
|
853
943
|
onRowScrollX(rowHeaderScrollX: number, type: string): void;
|
|
854
|
-
protected abstract layout(): void;
|
|
855
|
-
protected abstract offset(): void;
|
|
856
|
-
protected abstract clip(): void;
|
|
857
944
|
clear(): void;
|
|
858
945
|
/**
|
|
859
946
|
* Check whether header cell in viewPort
|
|
@@ -939,14 +1026,14 @@ loading: BooleanConstructor;
|
|
|
939
1026
|
partDrillDown: ObjectConstructor;
|
|
940
1027
|
header: ObjectConstructor;
|
|
941
1028
|
options: {
|
|
942
|
-
type: PropType<S2Options<TooltipContentType, Pagination,
|
|
943
|
-
default: S2Options<TooltipContentType, Pagination,
|
|
1029
|
+
type: PropType<S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>>;
|
|
1030
|
+
default: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>;
|
|
944
1031
|
};
|
|
945
1032
|
adaptive: {
|
|
946
1033
|
type: PropType<Adaptive>;
|
|
947
1034
|
default: Adaptive;
|
|
948
1035
|
};
|
|
949
|
-
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination,
|
|
1036
|
+
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>) => SpreadSheet>;
|
|
950
1037
|
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
951
1038
|
}, {
|
|
952
1039
|
S2_PREFIX_CLS: string;
|
|
@@ -965,7 +1052,7 @@ showSizeChange: (nextPageSize: number) => void;
|
|
|
965
1052
|
handlePageChange: (nextCurrent: number) => void;
|
|
966
1053
|
handlePageSizeChange: (nextSize: number) => void;
|
|
967
1054
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
968
|
-
spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination,
|
|
1055
|
+
spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>) => SpreadSheet;
|
|
969
1056
|
sheetUpdate: SheetUpdateCallback;
|
|
970
1057
|
rowCellHover: (data: TargetCellInfo) => void;
|
|
971
1058
|
rowCellClick: (data: TargetCellInfo) => void;
|
|
@@ -997,7 +1084,7 @@ dataCellMouseDown: (data: TargetCellInfo) => void;
|
|
|
997
1084
|
dataCellMouseUp: (data: TargetCellInfo) => void;
|
|
998
1085
|
dataCellMouseMove: (data: TargetCellInfo) => void;
|
|
999
1086
|
dataCellBrushSelection: (brushRangeDataCells: DataCell[]) => void;
|
|
1000
|
-
dataCellSelectMove: (
|
|
1087
|
+
dataCellSelectMove: (metaList: ViewMetaData[]) => void;
|
|
1001
1088
|
cornerCellHover: (data: TargetCellInfo) => void;
|
|
1002
1089
|
cornerCellClick: (data: TargetCellInfo) => void;
|
|
1003
1090
|
cornerCellDoubleClick: (data: TargetCellInfo) => void;
|
|
@@ -1021,7 +1108,7 @@ filteredValues: string[];
|
|
|
1021
1108
|
rangeFiltered: (data: ViewMetaData[]) => void;
|
|
1022
1109
|
layoutAfterHeaderLayout: (layoutResult: LayoutResult) => void;
|
|
1023
1110
|
layoutPagination: (data: LayoutPaginationParams) => void;
|
|
1024
|
-
layoutCellMounted: (cell: S2CellType
|
|
1111
|
+
layoutCellMounted: (cell: S2CellType) => void;
|
|
1025
1112
|
beforeRender: () => void;
|
|
1026
1113
|
afterRender: () => void;
|
|
1027
1114
|
mounted: (spreadsheet: SpreadSheet) => void;
|
|
@@ -1059,7 +1146,7 @@ mouseHover: (event: GEvent) => void;
|
|
|
1059
1146
|
mouseUp: (event: MouseEvent) => void;
|
|
1060
1147
|
mouseDown: (event: MouseEvent) => void;
|
|
1061
1148
|
mouseMove: (event: MouseEvent) => void;
|
|
1062
|
-
selected: (cells: S2CellType
|
|
1149
|
+
selected: (cells: S2CellType[]) => void;
|
|
1063
1150
|
reset: (event: KeyboardEvent) => void;
|
|
1064
1151
|
linkFieldJump: (data: {
|
|
1065
1152
|
field: string;
|
|
@@ -1091,14 +1178,14 @@ loading: BooleanConstructor;
|
|
|
1091
1178
|
partDrillDown: ObjectConstructor;
|
|
1092
1179
|
header: ObjectConstructor;
|
|
1093
1180
|
options: {
|
|
1094
|
-
type: PropType<S2Options<TooltipContentType, Pagination,
|
|
1095
|
-
default: S2Options<TooltipContentType, Pagination,
|
|
1181
|
+
type: PropType<S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>>;
|
|
1182
|
+
default: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>;
|
|
1096
1183
|
};
|
|
1097
1184
|
adaptive: {
|
|
1098
1185
|
type: PropType<Adaptive>;
|
|
1099
1186
|
default: Adaptive;
|
|
1100
1187
|
};
|
|
1101
|
-
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination,
|
|
1188
|
+
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>) => SpreadSheet>;
|
|
1102
1189
|
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
1103
1190
|
}>> & {
|
|
1104
1191
|
onSheetUpdate?: (params: S2RenderOptions) => any;
|
|
@@ -1132,7 +1219,7 @@ onDataCellMouseDown?: (data: TargetCellInfo) => any;
|
|
|
1132
1219
|
onDataCellMouseUp?: (data: TargetCellInfo) => any;
|
|
1133
1220
|
onDataCellMouseMove?: (data: TargetCellInfo) => any;
|
|
1134
1221
|
onDataCellBrushSelection?: (brushRangeDataCells: DataCell[]) => any;
|
|
1135
|
-
onDataCellSelectMove?: (
|
|
1222
|
+
onDataCellSelectMove?: (metaList: ViewMetaData[]) => any;
|
|
1136
1223
|
onCornerCellHover?: (data: TargetCellInfo) => any;
|
|
1137
1224
|
onCornerCellClick?: (data: TargetCellInfo) => any;
|
|
1138
1225
|
onCornerCellDoubleClick?: (data: TargetCellInfo) => any;
|
|
@@ -1156,7 +1243,7 @@ filteredValues: string[];
|
|
|
1156
1243
|
onRangeFiltered?: (data: ViewMetaData[]) => any;
|
|
1157
1244
|
onLayoutAfterHeaderLayout?: (layoutResult: LayoutResult) => any;
|
|
1158
1245
|
onLayoutPagination?: (data: LayoutPaginationParams) => any;
|
|
1159
|
-
onLayoutCellMounted?: (cell: S2CellType
|
|
1246
|
+
onLayoutCellMounted?: (cell: S2CellType) => any;
|
|
1160
1247
|
onBeforeRender?: () => any;
|
|
1161
1248
|
onAfterRender?: () => any;
|
|
1162
1249
|
onMounted?: (spreadsheet: SpreadSheet) => any;
|
|
@@ -1194,7 +1281,7 @@ onMouseHover?: (event: GEvent) => any;
|
|
|
1194
1281
|
onMouseUp?: (event: MouseEvent) => any;
|
|
1195
1282
|
onMouseDown?: (event: MouseEvent) => any;
|
|
1196
1283
|
onMouseMove?: (event: MouseEvent) => any;
|
|
1197
|
-
onSelected?: (cells: S2CellType
|
|
1284
|
+
onSelected?: (cells: S2CellType[]) => any;
|
|
1198
1285
|
onReset?: (event: KeyboardEvent) => any;
|
|
1199
1286
|
onLinkFieldJump?: (data: {
|
|
1200
1287
|
field: string;
|
|
@@ -1208,9 +1295,9 @@ spreadsheet: SpreadSheet;
|
|
|
1208
1295
|
}) => any;
|
|
1209
1296
|
onRowCellBrushSelection?: (event: GEvent) => any;
|
|
1210
1297
|
onColCellBrushSelection?: (event: GEvent) => any;
|
|
1211
|
-
onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination,
|
|
1298
|
+
onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>) => any;
|
|
1212
1299
|
}, {
|
|
1213
|
-
options: S2Options<TooltipContentType, Pagination,
|
|
1300
|
+
options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>;
|
|
1214
1301
|
loading: boolean;
|
|
1215
1302
|
adaptive: boolean | {
|
|
1216
1303
|
width?: boolean;
|
|
@@ -1221,7 +1308,7 @@ showPagination: boolean | {
|
|
|
1221
1308
|
onShowSizeChange?: (pageSize: number) => void;
|
|
1222
1309
|
onChange?: (current: number) => void;
|
|
1223
1310
|
};
|
|
1224
|
-
}>;
|
|
1311
|
+
}, {}>;
|
|
1225
1312
|
|
|
1226
1313
|
declare interface BaseSheetComponentProps<RenderHandler = unknown, PartialDrillDown = PartDrillDown, Header = unknown, Options = S2Options<TooltipContentType, Pagination>> {
|
|
1227
1314
|
sheetType?: SheetType;
|
|
@@ -1270,7 +1357,7 @@ declare interface BaseSheetComponentProps<RenderHandler = unknown, PartialDrillD
|
|
|
1270
1357
|
onDataCellMouseUp?: (data: TargetCellInfo) => void;
|
|
1271
1358
|
onDataCellMouseMove?: (data: TargetCellInfo) => void;
|
|
1272
1359
|
onDataCellBrushSelection?: (brushRangeDataCells: DataCell[]) => void;
|
|
1273
|
-
onDataCellSelectMove?: (
|
|
1360
|
+
onDataCellSelectMove?: (metaList: ViewMetaData[]) => void;
|
|
1274
1361
|
onCornerCellHover?: (data: TargetCellInfo) => void;
|
|
1275
1362
|
onCornerCellClick?: (data: TargetCellInfo) => void;
|
|
1276
1363
|
onCornerCellDoubleClick?: (data: TargetCellInfo) => void;
|
|
@@ -1349,16 +1436,24 @@ declare interface BaseSheetComponentProps<RenderHandler = unknown, PartialDrillD
|
|
|
1349
1436
|
}
|
|
1350
1437
|
|
|
1351
1438
|
/**
|
|
1352
|
-
*
|
|
1439
|
+
* Tooltip 基类
|
|
1440
|
+
* @see https://s2.antv.antgroup.com/manual/basic/tooltip#%E8%87%AA%E5%AE%9A%E4%B9%89
|
|
1441
|
+
* @example
|
|
1442
|
+
* import CustomTooltip extends BaseTooltip {
|
|
1443
|
+
renderContent() {}
|
|
1444
|
+
show() {}
|
|
1445
|
+
hide() {}
|
|
1446
|
+
destroy() {}
|
|
1447
|
+
}
|
|
1353
1448
|
*/
|
|
1354
|
-
declare class BaseTooltip_2 {
|
|
1449
|
+
declare class BaseTooltip_2<Content = TooltipContentType_2, Menu = BaseTooltipOperatorMenuOptions_2> {
|
|
1355
1450
|
visible: boolean;
|
|
1356
1451
|
spreadsheet: SpreadSheet_2;
|
|
1357
1452
|
container: HTMLElement | null;
|
|
1358
|
-
options: TooltipShowOptions
|
|
1453
|
+
options: TooltipShowOptions<Content, Menu>;
|
|
1359
1454
|
position: TooltipPosition;
|
|
1360
1455
|
constructor(spreadsheet: SpreadSheet_2);
|
|
1361
|
-
show<T =
|
|
1456
|
+
show<T = Content, M = Menu>(options: TooltipShowOptions<T, M>): void;
|
|
1362
1457
|
hide(): void;
|
|
1363
1458
|
destroy(): void;
|
|
1364
1459
|
renderContent<T = TooltipContentType_2>(content: T): void;
|
|
@@ -1368,7 +1463,7 @@ declare class BaseTooltip_2 {
|
|
|
1368
1463
|
private getContainer;
|
|
1369
1464
|
}
|
|
1370
1465
|
|
|
1371
|
-
declare interface BaseTooltipConfig<T = TooltipContentType_2,
|
|
1466
|
+
declare interface BaseTooltipConfig<T = TooltipContentType_2, Menu = BaseTooltipOperatorMenuOptions_2> {
|
|
1372
1467
|
/**
|
|
1373
1468
|
* 是否开启 tooltip, 在点击/悬停/停留/刷选/多选等场景会显示
|
|
1374
1469
|
* @description @antv/s2 中只保留了 tooltip 的核心显隐逻辑,提供相应数据,不渲染内容
|
|
@@ -1385,7 +1480,7 @@ declare interface BaseTooltipConfig<T = TooltipContentType_2, Icon = Element | s
|
|
|
1385
1480
|
* 自定义操作项
|
|
1386
1481
|
* @see https://s2.antv.antgroup.com/manual/basic/tooltip#%E8%87%AA%E5%AE%9A%E4%B9%89
|
|
1387
1482
|
*/
|
|
1388
|
-
operation?: TooltipOperation<
|
|
1483
|
+
operation?: TooltipOperation<Menu>;
|
|
1389
1484
|
/**
|
|
1390
1485
|
* 显示边界, 当 tooltip 超过边界时自动调整显示位置,container: 图表区域,body: 整个浏览器窗口,设置为 `null` 可关闭此功能
|
|
1391
1486
|
*/
|
|
@@ -1394,7 +1489,7 @@ declare interface BaseTooltipConfig<T = TooltipContentType_2, Icon = Element | s
|
|
|
1394
1489
|
* 自定义 Tooltip 类
|
|
1395
1490
|
* @see https://s2.antv.antgroup.com/zh/examples/react-component/tooltip/#custom-tooltip
|
|
1396
1491
|
*/
|
|
1397
|
-
render?: (spreadsheet: SpreadSheet_2) => BaseTooltip_2
|
|
1492
|
+
render?: (spreadsheet: SpreadSheet_2) => BaseTooltip_2<T, Menu>;
|
|
1398
1493
|
/**
|
|
1399
1494
|
* 自定义坐标
|
|
1400
1495
|
*/
|
|
@@ -1402,7 +1497,7 @@ declare interface BaseTooltipConfig<T = TooltipContentType_2, Icon = Element | s
|
|
|
1402
1497
|
/**
|
|
1403
1498
|
* 自定义挂载容器, 默认 body
|
|
1404
1499
|
*/
|
|
1405
|
-
getContainer?: () => HTMLElement;
|
|
1500
|
+
getContainer?: () => HTMLElement | null;
|
|
1406
1501
|
/**
|
|
1407
1502
|
* 容器类名
|
|
1408
1503
|
*/
|
|
@@ -1413,6 +1508,8 @@ declare interface BaseTooltipConfig<T = TooltipContentType_2, Icon = Element | s
|
|
|
1413
1508
|
style?: CSS_2.Properties;
|
|
1414
1509
|
}
|
|
1415
1510
|
|
|
1511
|
+
declare type BaseTooltipOperatorMenuOptions_2 = TooltipOperatorMenuOptions<Element | string, string>;
|
|
1512
|
+
|
|
1416
1513
|
declare interface BBox {
|
|
1417
1514
|
x: number;
|
|
1418
1515
|
y: number;
|
|
@@ -1472,8 +1569,11 @@ declare interface BulletValue {
|
|
|
1472
1569
|
declare interface CalcTotals {
|
|
1473
1570
|
/** 聚合方式 */
|
|
1474
1571
|
aggregation?: Aggregation;
|
|
1475
|
-
/**
|
|
1476
|
-
|
|
1572
|
+
/**
|
|
1573
|
+
* 自定义计算汇总
|
|
1574
|
+
* @see https://s2.antv.antgroup.com/examples/analysis/totals/#custom
|
|
1575
|
+
*/
|
|
1576
|
+
calcFunc?: (query: Query, data: CellData[]) => number;
|
|
1477
1577
|
}
|
|
1478
1578
|
|
|
1479
1579
|
declare type CanvasEventHandler = (event: FederatedPointerEvent) => void;
|
|
@@ -1528,13 +1628,6 @@ declare class CellData {
|
|
|
1528
1628
|
get [VALUE_FIELD](): DataItem;
|
|
1529
1629
|
}
|
|
1530
1630
|
|
|
1531
|
-
declare interface CellDataParams {
|
|
1532
|
-
query: Query;
|
|
1533
|
-
isTotals?: boolean;
|
|
1534
|
-
rowNode?: Node_2_2;
|
|
1535
|
-
isRow?: boolean;
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
1631
|
declare type CellEventTarget = FederatedPointerEvent['target'] | null | undefined | EventTarget | IEventTarget;
|
|
1539
1632
|
|
|
1540
1633
|
declare interface CellMeta {
|
|
@@ -1594,8 +1687,7 @@ declare enum CellType {
|
|
|
1594
1687
|
MERGED_CELL = "mergedCell"
|
|
1595
1688
|
}
|
|
1596
1689
|
|
|
1597
|
-
declare class ColCell extends HeaderCell {
|
|
1598
|
-
protected headerConfig: ColHeaderConfig;
|
|
1690
|
+
declare class ColCell extends HeaderCell<ColHeaderConfig> {
|
|
1599
1691
|
get cellType(): CellType;
|
|
1600
1692
|
protected getBorderPositions(): CellBorderPosition[];
|
|
1601
1693
|
protected initCell(): void;
|
|
@@ -1656,7 +1748,8 @@ declare interface ColCellStyle extends BaseCellStyle {
|
|
|
1656
1748
|
declare class ColHeader extends BaseHeader<ColHeaderConfig> {
|
|
1657
1749
|
protected scrollGroup: Group;
|
|
1658
1750
|
protected background: DisplayObject;
|
|
1659
|
-
constructor(
|
|
1751
|
+
constructor(config: ColHeaderConfig);
|
|
1752
|
+
protected getCellInstance(node: Node_2_2): S2CellType_2;
|
|
1660
1753
|
private initScrollGroup;
|
|
1661
1754
|
/**
|
|
1662
1755
|
* Make colHeader scroll with hScrollBar
|
|
@@ -1667,7 +1760,6 @@ declare class ColHeader extends BaseHeader<ColHeaderConfig> {
|
|
|
1667
1760
|
onColScroll(scrollX: number, type: string): void;
|
|
1668
1761
|
protected clip(): void;
|
|
1669
1762
|
clear(): void;
|
|
1670
|
-
protected getCellInstance(node: Node_2_2, spreadsheet: SpreadSheet_2, headerConfig: ColHeaderConfig): S2CellType_2;
|
|
1671
1763
|
protected getCellGroup(node: Node_2_2): Group;
|
|
1672
1764
|
protected isColCellInRect(node: Node_2_2): boolean;
|
|
1673
1765
|
protected layout(): void;
|
|
@@ -1736,15 +1828,13 @@ declare class CornerBBox extends BaseBBox {
|
|
|
1736
1828
|
private adjustCornerBBoxWidth;
|
|
1737
1829
|
}
|
|
1738
1830
|
|
|
1739
|
-
declare class CornerCell extends HeaderCell {
|
|
1740
|
-
cornerType: CornerNodeType;
|
|
1741
|
-
protected headerConfig: CornerHeaderConfig;
|
|
1742
|
-
protected isBolderText(): boolean;
|
|
1831
|
+
declare class CornerCell extends HeaderCell<CornerHeaderConfig> {
|
|
1743
1832
|
get cellType(): CellType;
|
|
1833
|
+
protected isBolderText(): boolean;
|
|
1744
1834
|
protected getBorderPositions(): CellBorderPosition[];
|
|
1745
1835
|
update(): void;
|
|
1746
1836
|
protected initCell(): void;
|
|
1747
|
-
|
|
1837
|
+
drawTextShape(options?: RenderTextShapeOptions): void;
|
|
1748
1838
|
/**
|
|
1749
1839
|
* 绘制折叠展开的icon
|
|
1750
1840
|
*/
|
|
@@ -1758,13 +1848,14 @@ declare class CornerCell extends HeaderCell {
|
|
|
1758
1848
|
protected getMaxTextWidth(): number;
|
|
1759
1849
|
protected getTextPosition(): PointLike;
|
|
1760
1850
|
protected getFormattedFieldValue(): FormatResult;
|
|
1761
|
-
protected getCornerText(): string;
|
|
1762
1851
|
}
|
|
1763
1852
|
|
|
1764
1853
|
/**
|
|
1765
1854
|
* Corner Header for SpreadSheet
|
|
1766
1855
|
*/
|
|
1767
1856
|
declare class CornerHeader extends BaseHeader<CornerHeaderConfig> {
|
|
1857
|
+
constructor(config: CornerHeaderConfig);
|
|
1858
|
+
protected getCellInstance(node: Node_2_2): S2CellType_2;
|
|
1768
1859
|
/**
|
|
1769
1860
|
* Get corner Header by config
|
|
1770
1861
|
*/
|
|
@@ -1778,7 +1869,6 @@ declare class CornerHeader extends BaseHeader<CornerHeaderConfig> {
|
|
|
1778
1869
|
width: number;
|
|
1779
1870
|
height: number;
|
|
1780
1871
|
}): Node_2_2[];
|
|
1781
|
-
constructor(cfg: CornerHeaderConfig);
|
|
1782
1872
|
/**
|
|
1783
1873
|
* Make cornerHeader scroll with hScrollBar
|
|
1784
1874
|
* @param scrollX
|
|
@@ -1823,12 +1913,22 @@ declare interface CustomInteraction {
|
|
|
1823
1913
|
}
|
|
1824
1914
|
|
|
1825
1915
|
declare interface CustomSVGIcon {
|
|
1826
|
-
/**
|
|
1916
|
+
/**
|
|
1917
|
+
* icon 名称
|
|
1918
|
+
*/
|
|
1827
1919
|
name: string;
|
|
1828
1920
|
/**
|
|
1829
|
-
* 1、
|
|
1830
|
-
* 2
|
|
1831
|
-
|
|
1921
|
+
* @example 1、base64
|
|
1922
|
+
* @example 2. svg本地文件 (兼容老方式, 可以改颜色)
|
|
1923
|
+
|
|
1924
|
+
import Icon from 'path/to/xxx.svg'
|
|
1925
|
+
|
|
1926
|
+
=> { name: 'iconA', svg: Icon }
|
|
1927
|
+
=> { name: 'iconB', svg: '<svg>...</svg>' }
|
|
1928
|
+
|
|
1929
|
+
* @example 3. 线上支持的图片地址
|
|
1930
|
+
带后缀: https://gw.alipayobjects.com/zos/antfincdn/gu1Fsz3fw0/filter%26sort_filter.svg
|
|
1931
|
+
无后缀: https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*5nsESLuvc_EAAAAAAAAAAAAADmJ7AQ/original
|
|
1832
1932
|
*/
|
|
1833
1933
|
svg: string;
|
|
1834
1934
|
}
|
|
@@ -1885,7 +1985,7 @@ declare type Data = (RawData_2 & ExtraData) | undefined | null;
|
|
|
1885
1985
|
* 2、icon align in right with size {@link ICON_SIZE}
|
|
1886
1986
|
* 3、left rect area is interval(in left) and text(in right)
|
|
1887
1987
|
*/
|
|
1888
|
-
declare class DataCell_2 extends BaseCell<
|
|
1988
|
+
declare class DataCell_2 extends BaseCell<ViewMeta> {
|
|
1889
1989
|
iconPosition: PointLike;
|
|
1890
1990
|
get cellType(): CellType;
|
|
1891
1991
|
protected getBorderPositions(): CellBorderPosition[];
|
|
@@ -1895,8 +1995,8 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
|
1895
1995
|
protected handleSelect(cells: CellMeta[]): void;
|
|
1896
1996
|
protected handleHover(cells: CellMeta[]): void;
|
|
1897
1997
|
update(): void;
|
|
1898
|
-
setMeta(viewMeta:
|
|
1899
|
-
|
|
1998
|
+
setMeta(viewMeta: ViewMeta): void;
|
|
1999
|
+
drawTextShape(options?: RenderTextShapeOptions): void;
|
|
1900
2000
|
protected initCell(): void;
|
|
1901
2001
|
protected generateIconConfig(): void;
|
|
1902
2002
|
protected getTextStyle(): TextTheme;
|
|
@@ -1931,7 +2031,7 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
|
|
|
1931
2031
|
private toggleConditionIntervalShapeOpacity;
|
|
1932
2032
|
}
|
|
1933
2033
|
|
|
1934
|
-
declare type DataCellCallback = (viewMeta:
|
|
2034
|
+
declare type DataCellCallback = (viewMeta: ViewMeta) => S2CellType_2;
|
|
1935
2035
|
|
|
1936
2036
|
declare interface DataCellStyle {
|
|
1937
2037
|
/**
|
|
@@ -2191,7 +2291,13 @@ declare interface FormatResult {
|
|
|
2191
2291
|
value: DataItem;
|
|
2192
2292
|
}
|
|
2193
2293
|
|
|
2194
|
-
|
|
2294
|
+
/**
|
|
2295
|
+
* 第二个参数在以下情况会传入:
|
|
2296
|
+
* 1. data cell 格式化
|
|
2297
|
+
* 2. copy/export
|
|
2298
|
+
* 3. tooltip, 且仅在选择多个单元格时,data 类型为数组
|
|
2299
|
+
*/
|
|
2300
|
+
declare type Formatter = (v: unknown, data?: ViewMetaData_2 | ViewMetaData_2[], meta?: Node_2_2 | ViewMeta) => string;
|
|
2195
2301
|
|
|
2196
2302
|
declare class Frame extends Group {
|
|
2197
2303
|
cfg: FrameConfig;
|
|
@@ -2232,12 +2338,39 @@ declare interface FrameConfig {
|
|
|
2232
2338
|
declare class FrozenGroup extends GridGroup {
|
|
2233
2339
|
}
|
|
2234
2340
|
|
|
2235
|
-
declare
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2341
|
+
declare interface GetCellDataParams {
|
|
2342
|
+
/**
|
|
2343
|
+
* 查询条件
|
|
2344
|
+
*/
|
|
2345
|
+
query: Query;
|
|
2346
|
+
/**
|
|
2347
|
+
* 是否是汇总节点
|
|
2348
|
+
*/
|
|
2349
|
+
isTotals?: boolean;
|
|
2350
|
+
/**
|
|
2351
|
+
* 行头节点, 用于下钻场景
|
|
2352
|
+
*/
|
|
2353
|
+
rowNode?: Node_2_2;
|
|
2354
|
+
/**
|
|
2355
|
+
* 是否是行头
|
|
2356
|
+
*/
|
|
2357
|
+
isRow?: boolean;
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
declare interface GetCellMultiDataParams {
|
|
2361
|
+
/**
|
|
2362
|
+
* 查询条件
|
|
2363
|
+
*/
|
|
2364
|
+
query: Query;
|
|
2365
|
+
/**
|
|
2366
|
+
* 汇总
|
|
2367
|
+
*/
|
|
2368
|
+
totals?: TotalSelectionsOfMultiData;
|
|
2369
|
+
/**
|
|
2370
|
+
* 下钻
|
|
2371
|
+
*/
|
|
2372
|
+
drillDownFields?: string[];
|
|
2373
|
+
}
|
|
2241
2374
|
|
|
2242
2375
|
declare type GetInitProps<T, OptionalKeys = GetOptionalKeys<T>> = {
|
|
2243
2376
|
[K in keyof T as IsEmitKey<T[K]> extends true ? never : K]-?: K extends OptionalKeys ? PropOption<NonNullable<T[K]>> : RequiredPropOption<NonNullable<T[K]>>;
|
|
@@ -2279,7 +2412,7 @@ declare interface GridInfo {
|
|
|
2279
2412
|
}
|
|
2280
2413
|
|
|
2281
2414
|
declare type GroupedIcons = {
|
|
2282
|
-
[key in IconPosition]:
|
|
2415
|
+
[key in IconPosition]: HeaderActionNameOptions[];
|
|
2283
2416
|
};
|
|
2284
2417
|
|
|
2285
2418
|
/**
|
|
@@ -2290,6 +2423,7 @@ declare class GuiIcon extends Group {
|
|
|
2290
2423
|
iconImageShape: CustomImage;
|
|
2291
2424
|
private cfg;
|
|
2292
2425
|
constructor(cfg: GuiIconCfg);
|
|
2426
|
+
getCfg(): GuiIconCfg;
|
|
2293
2427
|
getImage(name: string, cacheKey: string, fill?: string): Promise<HTMLImageElement>;
|
|
2294
2428
|
/**
|
|
2295
2429
|
* 1. https://xxx.svg
|
|
@@ -2331,57 +2465,95 @@ declare class HdAdapter {
|
|
|
2331
2465
|
private renderByZoomScale;
|
|
2332
2466
|
}
|
|
2333
2467
|
|
|
2334
|
-
declare interface
|
|
2468
|
+
declare interface HeaderActionIcon_2 extends HeaderActionIconBaseOptions {
|
|
2335
2469
|
/**
|
|
2336
|
-
*
|
|
2470
|
+
* 内置 icon 或通过 @customSVGIcons 自定义的 icon 名称
|
|
2337
2471
|
* 如果是 string[], 则默认 icon 位置为右侧
|
|
2472
|
+
* @see https://s2.antv.antgroup.com/manual/advanced/custom/custom-icon
|
|
2473
|
+
* @example icons: ['iconNameA', 'iconNameB']
|
|
2474
|
+
* @example icons: [{ name: 'iconNameA', position: "left", fill: "red" }]
|
|
2475
|
+
*/
|
|
2476
|
+
icons: HeaderActionName[];
|
|
2477
|
+
/**
|
|
2478
|
+
* 所属的 cell 类型, 即当前 icon 展示在哪种类型单元格中
|
|
2479
|
+
* @example belongsCell: 'rowCell'
|
|
2480
|
+
*/
|
|
2481
|
+
belongsCell: Omit<CellType, 'dataCell' | 'mergedCell' | 'seriesNumberCell'>;
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
declare interface HeaderActionIconBaseOptions {
|
|
2485
|
+
/**
|
|
2486
|
+
* 是否默认隐藏, 开启后 hover 后才显示, 关闭后则始终显示, 可根据当前单元格信息动态判断
|
|
2487
|
+
* @example defaultHide: (meta, iconName) => meta.id === 'xxx'
|
|
2488
|
+
* @default false
|
|
2338
2489
|
*/
|
|
2339
|
-
icons: ActionIconName[];
|
|
2340
|
-
belongsCell: Omit<CellType, 'dataCell'>;
|
|
2341
|
-
/** 是否默认隐藏, true 为 hover后显示, false 为一直显示 */
|
|
2342
2490
|
defaultHide?: boolean | ((meta: Node_2_2, iconName: string) => boolean);
|
|
2343
|
-
/**
|
|
2491
|
+
/**
|
|
2492
|
+
* 是否展示, 可根据当前单元格信息动态判断
|
|
2493
|
+
* @example displayCondition: (meta, iconName) => !meta.isTotals
|
|
2494
|
+
*/
|
|
2344
2495
|
displayCondition?: (mete: Node_2_2, iconName: string) => boolean;
|
|
2345
|
-
/**
|
|
2496
|
+
/**
|
|
2497
|
+
* 点击回调函数
|
|
2498
|
+
*/
|
|
2346
2499
|
onClick?: (headerIconClickParams: HeaderIconClickParams) => void;
|
|
2347
|
-
/**
|
|
2500
|
+
/**
|
|
2501
|
+
* 悬停回调函数
|
|
2502
|
+
*/
|
|
2348
2503
|
onHover?: (headerIconHoverParams: HeaderIconHoverParams) => void;
|
|
2349
2504
|
}
|
|
2350
2505
|
|
|
2351
|
-
declare interface HeaderActionIconOptions {
|
|
2352
|
-
|
|
2506
|
+
declare interface HeaderActionIconOptions extends HeaderActionIconBaseOptions {
|
|
2507
|
+
fill?: string;
|
|
2508
|
+
name: string;
|
|
2353
2509
|
x: number;
|
|
2354
2510
|
y: number;
|
|
2355
|
-
onClick?: (headerIconClickParams: HeaderIconClickParams) => void;
|
|
2356
|
-
onHover?: (headerIconHoverParams: HeaderIconHoverParams) => void;
|
|
2357
2511
|
isSortIcon?: boolean;
|
|
2358
|
-
defaultHide?: boolean;
|
|
2359
2512
|
}
|
|
2360
2513
|
|
|
2361
|
-
declare
|
|
2362
|
-
|
|
2514
|
+
declare type HeaderActionName = string | Omit<HeaderActionNameOptions, 'isConditionIcon'>;
|
|
2515
|
+
|
|
2516
|
+
declare type HeaderActionNameOptions = HeaderActionIconBaseOptions & {
|
|
2517
|
+
/**
|
|
2518
|
+
* icon 颜色配置
|
|
2519
|
+
* @description 优先级: 单个 icon > 主题 icon 配置 > 文本颜色
|
|
2520
|
+
*/
|
|
2521
|
+
fill?: string;
|
|
2522
|
+
/**
|
|
2523
|
+
* icon 名称
|
|
2524
|
+
*/
|
|
2525
|
+
name: string;
|
|
2526
|
+
/**
|
|
2527
|
+
* icon 相对文本的位置
|
|
2528
|
+
* 可选: 'left' | 'right'
|
|
2529
|
+
*/
|
|
2530
|
+
position?: IconPosition;
|
|
2531
|
+
/**
|
|
2532
|
+
* 是否是条件格式的 icon
|
|
2533
|
+
*/
|
|
2534
|
+
isConditionIcon?: boolean;
|
|
2535
|
+
};
|
|
2536
|
+
|
|
2537
|
+
declare abstract class HeaderCell<T extends BaseHeaderConfig = BaseHeaderConfig> extends BaseCell<Node_2_2> {
|
|
2538
|
+
protected headerConfig: T;
|
|
2363
2539
|
protected actionIconConfig: InternalFullyHeaderActionIcon | undefined;
|
|
2364
2540
|
protected treeIcon: GuiIcon | undefined;
|
|
2365
2541
|
protected treeLeafNodeAlignDot: DisplayObject | undefined;
|
|
2366
2542
|
protected actionIcons: GuiIcon[];
|
|
2367
2543
|
protected hasDefaultHiddenIcon: boolean;
|
|
2368
|
-
protected conditionIconMappingResult:
|
|
2544
|
+
protected conditionIconMappingResult: HeaderActionNameOptions | undefined;
|
|
2369
2545
|
/** left icon 绘制起始坐标 */
|
|
2370
2546
|
protected leftIconPosition: PointLike;
|
|
2371
|
-
/**
|
|
2547
|
+
/** right icon 绘制起始坐标 */
|
|
2372
2548
|
protected rightIconPosition: PointLike;
|
|
2373
2549
|
protected abstract isBolderText(): boolean;
|
|
2374
|
-
|
|
2550
|
+
getHeaderConfig(): T;
|
|
2551
|
+
protected handleRestOptions(...[headerConfig]: [T]): void;
|
|
2375
2552
|
protected initCell(): void;
|
|
2376
2553
|
protected generateIconConfig(): void;
|
|
2377
2554
|
protected getFormattedFieldValue(): FormatResult;
|
|
2378
2555
|
protected showSortIcon(): boolean | "" | undefined;
|
|
2379
|
-
protected
|
|
2380
|
-
protected getActionIconStyle(): {
|
|
2381
|
-
width: number;
|
|
2382
|
-
height: number;
|
|
2383
|
-
fill: string;
|
|
2384
|
-
};
|
|
2556
|
+
protected getActionIconStyle(options: Partial<HeaderActionIconOptions>): Partial<GuiIconCfg>;
|
|
2385
2557
|
protected hasDefaultHideActionIcon(): boolean;
|
|
2386
2558
|
protected addActionIcon(options: HeaderActionIconOptions): void;
|
|
2387
2559
|
protected drawActionAndConditionIcons(): void;
|
|
@@ -2407,10 +2579,11 @@ declare abstract class HeaderCell extends BaseCell<Node_2_2> {
|
|
|
2407
2579
|
mappingValue(condition: Condition): ConditionMappingResult;
|
|
2408
2580
|
findFieldCondition(conditions: Condition[]): Condition | undefined;
|
|
2409
2581
|
getTreeIcon(): GuiIcon | undefined;
|
|
2582
|
+
getActionIcons(): GuiIcon[];
|
|
2410
2583
|
}
|
|
2411
2584
|
|
|
2412
2585
|
declare interface HeaderIconClickParams {
|
|
2413
|
-
|
|
2586
|
+
name: string;
|
|
2414
2587
|
meta: Node_2_2;
|
|
2415
2588
|
event?: FederatedPointerEvent;
|
|
2416
2589
|
}
|
|
@@ -2505,7 +2678,7 @@ declare interface InteractionOptions {
|
|
|
2505
2678
|
* 链接跳转
|
|
2506
2679
|
* @see https://s2.antv.antgroup.com/manual/advanced/interaction/link-jump
|
|
2507
2680
|
*/
|
|
2508
|
-
linkFields?: string[] | ((meta: Node_2_2 |
|
|
2681
|
+
linkFields?: string[] | ((meta: Node_2_2 | ViewMeta) => boolean);
|
|
2509
2682
|
/**
|
|
2510
2683
|
* 选中单元格高亮聚焦
|
|
2511
2684
|
*/
|
|
@@ -2668,8 +2841,8 @@ declare enum InterceptType {
|
|
|
2668
2841
|
|
|
2669
2842
|
declare type InternalFullyCellTheme = DeepRequired<DefaultCellTheme>;
|
|
2670
2843
|
|
|
2671
|
-
declare interface InternalFullyHeaderActionIcon extends
|
|
2672
|
-
icons:
|
|
2844
|
+
declare interface InternalFullyHeaderActionIcon extends HeaderActionIcon_2 {
|
|
2845
|
+
icons: HeaderActionNameOptions[];
|
|
2673
2846
|
isSortIcon?: boolean;
|
|
2674
2847
|
}
|
|
2675
2848
|
|
|
@@ -2693,7 +2866,7 @@ declare type LayoutArrange = (spreadsheet: SpreadSheet_2, parent: Node_2_2, fiel
|
|
|
2693
2866
|
/**
|
|
2694
2867
|
* determine the data of cells in Cartesian coordinates
|
|
2695
2868
|
*/
|
|
2696
|
-
declare type LayoutCellMeta = (viewMeta:
|
|
2869
|
+
declare type LayoutCellMeta = (viewMeta: ViewMeta) => ViewMeta | null;
|
|
2697
2870
|
|
|
2698
2871
|
/**
|
|
2699
2872
|
* determine the location(x,y,width,height eg..) of every node
|
|
@@ -2794,22 +2967,19 @@ declare type MatrixPlainTransformer = (data: DataItem[][], separator?: string) =
|
|
|
2794
2967
|
*/
|
|
2795
2968
|
declare class MergedCell extends DataCell_2 {
|
|
2796
2969
|
cells: S2CellType_2[];
|
|
2797
|
-
constructor(spreadsheet: SpreadSheet_2, cells: S2CellType_2[], meta?: ViewMeta_2);
|
|
2798
|
-
handleRestOptions(...[cells]: [S2CellType_2[]]): void;
|
|
2799
2970
|
get cellType(): CellType;
|
|
2971
|
+
constructor(spreadsheet: SpreadSheet_2, cells: S2CellType_2[], meta?: ViewMeta);
|
|
2972
|
+
handleRestOptions(...[cells]: [S2CellType_2[]]): void;
|
|
2800
2973
|
update(): void;
|
|
2801
2974
|
protected initCell(): void;
|
|
2802
2975
|
/**
|
|
2803
2976
|
* Draw merged cells background
|
|
2804
2977
|
*/
|
|
2805
2978
|
protected drawBackgroundShape(): void;
|
|
2806
|
-
|
|
2807
|
-
* Render data text
|
|
2808
|
-
*/
|
|
2809
|
-
drawTextShape(): void;
|
|
2979
|
+
drawTextShape(options?: RenderTextShapeOptions): void;
|
|
2810
2980
|
}
|
|
2811
2981
|
|
|
2812
|
-
declare type MergedCellCallback = (spreadsheet: SpreadSheet_2, cells: S2CellType_2[], meta?:
|
|
2982
|
+
declare type MergedCellCallback = (spreadsheet: SpreadSheet_2, cells: S2CellType_2[], meta?: ViewMeta) => MergedCell;
|
|
2813
2983
|
|
|
2814
2984
|
declare interface MergedCellInfo {
|
|
2815
2985
|
colIndex?: number;
|
|
@@ -2906,7 +3076,7 @@ declare class Node_2_2 {
|
|
|
2906
3076
|
isPivotMode: boolean;
|
|
2907
3077
|
seriesNumberWidth: number;
|
|
2908
3078
|
spreadsheet: SpreadSheet_2;
|
|
2909
|
-
query?:
|
|
3079
|
+
query?: Query;
|
|
2910
3080
|
belongsCell?: S2CellType_2 | null | undefined;
|
|
2911
3081
|
inCollapseNode?: boolean;
|
|
2912
3082
|
cornerType?: CornerNodeType;
|
|
@@ -3011,6 +3181,25 @@ declare interface Pagination_2 {
|
|
|
3011
3181
|
}
|
|
3012
3182
|
|
|
3013
3183
|
declare interface Palette extends PaletteMeta {
|
|
3184
|
+
/**
|
|
3185
|
+
* 基础色值(共15个)
|
|
3186
|
+
*
|
|
3187
|
+
* 1. 角头字体、列头字体
|
|
3188
|
+
* 2. 行头背景、数据格背景(斑马纹)
|
|
3189
|
+
* 3. 行头&数据格交互(hover、选中、十字)
|
|
3190
|
+
* 4. 角头背景、列头背景
|
|
3191
|
+
* 5. 列头交互(hover、选中)
|
|
3192
|
+
* 6. 刷选遮罩
|
|
3193
|
+
* 7. 行头 link
|
|
3194
|
+
* 8. mini bar、resize 交互(参考线等)
|
|
3195
|
+
* 9. 数据格背景(非斑马纹)、整体表底色(建议白色)
|
|
3196
|
+
* 10. 行头边框、数据格边框
|
|
3197
|
+
* 11. 角头边框、列头边框
|
|
3198
|
+
* 12. 竖向大分割线
|
|
3199
|
+
* 13. 横向大分割线
|
|
3200
|
+
* 14. 数据格字体
|
|
3201
|
+
* 15. 行头字体、数据格交互色(hover)
|
|
3202
|
+
*/
|
|
3014
3203
|
basicColors: string[];
|
|
3015
3204
|
}
|
|
3016
3205
|
|
|
@@ -3069,14 +3258,13 @@ declare class PanelScrollGroup extends GridGroup {
|
|
|
3069
3258
|
update(gridInfo: GridInfo): void;
|
|
3070
3259
|
}
|
|
3071
3260
|
|
|
3072
|
-
declare interface PartDrillDown<T = BaseDrillDownComponentProps> {
|
|
3261
|
+
declare interface PartDrillDown<T = BaseDrillDownComponentProps> extends Pick<HeaderActionIcon, 'displayCondition'> {
|
|
3073
3262
|
drillConfig: T;
|
|
3074
3263
|
drillItemsNum?: number;
|
|
3075
3264
|
fetchData: (meta: Node_2, drillFields: string[]) => Promise<PartDrillDownInfo>;
|
|
3076
3265
|
clearDrillDown?: {
|
|
3077
3266
|
rowId: string;
|
|
3078
3267
|
};
|
|
3079
|
-
displayCondition?: (meta: Node_2) => boolean;
|
|
3080
3268
|
}
|
|
3081
3269
|
|
|
3082
3270
|
declare interface PartDrillDownFieldInLevel {
|
|
@@ -3107,20 +3295,20 @@ loading: BooleanConstructor;
|
|
|
3107
3295
|
partDrillDown: ObjectConstructor;
|
|
3108
3296
|
header: ObjectConstructor;
|
|
3109
3297
|
options: {
|
|
3110
|
-
type: PropType<S2Options<TooltipContentType, Pagination,
|
|
3111
|
-
default: S2Options<TooltipContentType, Pagination,
|
|
3298
|
+
type: PropType<S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>>;
|
|
3299
|
+
default: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>;
|
|
3112
3300
|
};
|
|
3113
3301
|
adaptive: {
|
|
3114
3302
|
type: PropType<Adaptive>;
|
|
3115
3303
|
default: Adaptive;
|
|
3116
3304
|
};
|
|
3117
|
-
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination,
|
|
3305
|
+
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>) => SpreadSheet>;
|
|
3118
3306
|
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
3119
3307
|
}, {
|
|
3120
3308
|
s2Ref: ShallowRef<SheetExpose>;
|
|
3121
|
-
options: S2Options<TooltipContentType, Pagination,
|
|
3309
|
+
options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>;
|
|
3122
3310
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
3123
|
-
spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination,
|
|
3311
|
+
spreadsheet: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>) => SpreadSheet;
|
|
3124
3312
|
sheetUpdate: SheetUpdateCallback;
|
|
3125
3313
|
rowCellHover: (data: TargetCellInfo) => void;
|
|
3126
3314
|
rowCellClick: (data: TargetCellInfo) => void;
|
|
@@ -3152,7 +3340,7 @@ dataCellMouseDown: (data: TargetCellInfo) => void;
|
|
|
3152
3340
|
dataCellMouseUp: (data: TargetCellInfo) => void;
|
|
3153
3341
|
dataCellMouseMove: (data: TargetCellInfo) => void;
|
|
3154
3342
|
dataCellBrushSelection: (brushRangeDataCells: DataCell[]) => void;
|
|
3155
|
-
dataCellSelectMove: (
|
|
3343
|
+
dataCellSelectMove: (metaList: ViewMetaData[]) => void;
|
|
3156
3344
|
cornerCellHover: (data: TargetCellInfo) => void;
|
|
3157
3345
|
cornerCellClick: (data: TargetCellInfo) => void;
|
|
3158
3346
|
cornerCellDoubleClick: (data: TargetCellInfo) => void;
|
|
@@ -3176,7 +3364,7 @@ filteredValues: string[];
|
|
|
3176
3364
|
rangeFiltered: (data: ViewMetaData[]) => void;
|
|
3177
3365
|
layoutAfterHeaderLayout: (layoutResult: LayoutResult) => void;
|
|
3178
3366
|
layoutPagination: (data: LayoutPaginationParams) => void;
|
|
3179
|
-
layoutCellMounted: (cell: S2CellType
|
|
3367
|
+
layoutCellMounted: (cell: S2CellType) => void;
|
|
3180
3368
|
beforeRender: () => void;
|
|
3181
3369
|
afterRender: () => void;
|
|
3182
3370
|
mounted: (spreadsheet: SpreadSheet) => void;
|
|
@@ -3214,7 +3402,7 @@ mouseHover: (event: GEvent) => void;
|
|
|
3214
3402
|
mouseUp: (event: MouseEvent) => void;
|
|
3215
3403
|
mouseDown: (event: MouseEvent) => void;
|
|
3216
3404
|
mouseMove: (event: MouseEvent) => void;
|
|
3217
|
-
selected: (cells: S2CellType
|
|
3405
|
+
selected: (cells: S2CellType[]) => void;
|
|
3218
3406
|
reset: (event: KeyboardEvent) => void;
|
|
3219
3407
|
linkFieldJump: (data: {
|
|
3220
3408
|
field: string;
|
|
@@ -3246,14 +3434,14 @@ loading: BooleanConstructor;
|
|
|
3246
3434
|
partDrillDown: ObjectConstructor;
|
|
3247
3435
|
header: ObjectConstructor;
|
|
3248
3436
|
options: {
|
|
3249
|
-
type: PropType<S2Options<TooltipContentType, Pagination,
|
|
3250
|
-
default: S2Options<TooltipContentType, Pagination,
|
|
3437
|
+
type: PropType<S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>>;
|
|
3438
|
+
default: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>;
|
|
3251
3439
|
};
|
|
3252
3440
|
adaptive: {
|
|
3253
3441
|
type: PropType<Adaptive>;
|
|
3254
3442
|
default: Adaptive;
|
|
3255
3443
|
};
|
|
3256
|
-
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination,
|
|
3444
|
+
onSpreadsheet: PropType<(container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>) => SpreadSheet>;
|
|
3257
3445
|
onMounted: PropType<(spreadsheet: SpreadSheet) => void>;
|
|
3258
3446
|
}>> & {
|
|
3259
3447
|
onSheetUpdate?: (params: S2RenderOptions) => any;
|
|
@@ -3287,7 +3475,7 @@ onDataCellMouseDown?: (data: TargetCellInfo) => any;
|
|
|
3287
3475
|
onDataCellMouseUp?: (data: TargetCellInfo) => any;
|
|
3288
3476
|
onDataCellMouseMove?: (data: TargetCellInfo) => any;
|
|
3289
3477
|
onDataCellBrushSelection?: (brushRangeDataCells: DataCell[]) => any;
|
|
3290
|
-
onDataCellSelectMove?: (
|
|
3478
|
+
onDataCellSelectMove?: (metaList: ViewMetaData[]) => any;
|
|
3291
3479
|
onCornerCellHover?: (data: TargetCellInfo) => any;
|
|
3292
3480
|
onCornerCellClick?: (data: TargetCellInfo) => any;
|
|
3293
3481
|
onCornerCellDoubleClick?: (data: TargetCellInfo) => any;
|
|
@@ -3311,7 +3499,7 @@ filteredValues: string[];
|
|
|
3311
3499
|
onRangeFiltered?: (data: ViewMetaData[]) => any;
|
|
3312
3500
|
onLayoutAfterHeaderLayout?: (layoutResult: LayoutResult) => any;
|
|
3313
3501
|
onLayoutPagination?: (data: LayoutPaginationParams) => any;
|
|
3314
|
-
onLayoutCellMounted?: (cell: S2CellType
|
|
3502
|
+
onLayoutCellMounted?: (cell: S2CellType) => any;
|
|
3315
3503
|
onBeforeRender?: () => any;
|
|
3316
3504
|
onAfterRender?: () => any;
|
|
3317
3505
|
onMounted?: (spreadsheet: SpreadSheet) => any;
|
|
@@ -3349,7 +3537,7 @@ onMouseHover?: (event: GEvent) => any;
|
|
|
3349
3537
|
onMouseUp?: (event: MouseEvent) => any;
|
|
3350
3538
|
onMouseDown?: (event: MouseEvent) => any;
|
|
3351
3539
|
onMouseMove?: (event: MouseEvent) => any;
|
|
3352
|
-
onSelected?: (cells: S2CellType
|
|
3540
|
+
onSelected?: (cells: S2CellType[]) => any;
|
|
3353
3541
|
onReset?: (event: KeyboardEvent) => any;
|
|
3354
3542
|
onLinkFieldJump?: (data: {
|
|
3355
3543
|
field: string;
|
|
@@ -3363,9 +3551,9 @@ spreadsheet: SpreadSheet;
|
|
|
3363
3551
|
}) => any;
|
|
3364
3552
|
onRowCellBrushSelection?: (event: GEvent) => any;
|
|
3365
3553
|
onColCellBrushSelection?: (event: GEvent) => any;
|
|
3366
|
-
onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination,
|
|
3554
|
+
onSpreadsheet?: (container: S2MountContainer, dataCfg: S2DataConfig, options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>) => any;
|
|
3367
3555
|
}, {
|
|
3368
|
-
options: S2Options<TooltipContentType, Pagination,
|
|
3556
|
+
options: S2Options<TooltipContentType, Pagination, BaseTooltipOperatorMenuOptions>;
|
|
3369
3557
|
loading: boolean;
|
|
3370
3558
|
adaptive: boolean | {
|
|
3371
3559
|
width?: boolean;
|
|
@@ -3376,7 +3564,7 @@ showPagination: boolean | {
|
|
|
3376
3564
|
onShowSizeChange?: (pageSize: number) => void;
|
|
3377
3565
|
onChange?: (current: number) => void;
|
|
3378
3566
|
};
|
|
3379
|
-
}>;
|
|
3567
|
+
}, {}>;
|
|
3380
3568
|
|
|
3381
3569
|
declare interface Point {
|
|
3382
3570
|
x: number;
|
|
@@ -3409,6 +3597,13 @@ declare interface RangeColors {
|
|
|
3409
3597
|
|
|
3410
3598
|
declare type RawData_2 = Record<string, DataItem>;
|
|
3411
3599
|
|
|
3600
|
+
declare interface RenderTextShapeOptions {
|
|
3601
|
+
/**
|
|
3602
|
+
* 只渲染文本, 不记录 textShape 信息
|
|
3603
|
+
*/
|
|
3604
|
+
shallowRender: boolean;
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3412
3607
|
declare interface RequiredPropOption<T = any> {
|
|
3413
3608
|
type?: PropType<T>;
|
|
3414
3609
|
required: true;
|
|
@@ -3429,6 +3624,10 @@ declare interface ResizeArea {
|
|
|
3429
3624
|
backgroundOpacity?: number;
|
|
3430
3625
|
/** 交互态 */
|
|
3431
3626
|
interactionState?: InteractionState;
|
|
3627
|
+
/** 单元格可拖拽最小宽度 */
|
|
3628
|
+
minCellWidth?: number;
|
|
3629
|
+
/** 单元格可拖拽最小高度 */
|
|
3630
|
+
minCellHeight?: number;
|
|
3432
3631
|
}
|
|
3433
3632
|
|
|
3434
3633
|
declare enum ResizeAreaEffect {
|
|
@@ -3464,7 +3663,7 @@ declare interface ResizeInfo_2 {
|
|
|
3464
3663
|
isResizeArea?: boolean;
|
|
3465
3664
|
isResizeMask?: boolean;
|
|
3466
3665
|
/** 当前拖拽热区对应的节点信息 */
|
|
3467
|
-
meta: Node_2_2 |
|
|
3666
|
+
meta: Node_2_2 | ViewMeta;
|
|
3468
3667
|
/** 拖拽后的宽度 */
|
|
3469
3668
|
resizedWidth?: number;
|
|
3470
3669
|
/** 拖拽后的高度 */
|
|
@@ -3514,7 +3713,7 @@ declare class RootInteraction {
|
|
|
3514
3713
|
setState(interactionStateInfo: InteractionStateInfo): void;
|
|
3515
3714
|
getState(): InteractionStateInfo;
|
|
3516
3715
|
setInteractedCells(cell: S2CellType_2): void;
|
|
3517
|
-
getInteractedCells(): S2CellType_2<
|
|
3716
|
+
getInteractedCells(): S2CellType_2<ViewMeta>[];
|
|
3518
3717
|
resetState(): void;
|
|
3519
3718
|
getCurrentStateName(): InteractionStateName | undefined;
|
|
3520
3719
|
isEqualStateName(stateName: InteractionStateName): boolean;
|
|
@@ -3534,7 +3733,7 @@ declare class RootInteraction {
|
|
|
3534
3733
|
highlightNodes: (nodes?: Node_2_2[]) => void;
|
|
3535
3734
|
mergeCells: (cellsInfo?: MergedCellInfo[], hideData?: boolean) => void;
|
|
3536
3735
|
unmergeCell: (removedCells: MergedCell) => void;
|
|
3537
|
-
hideColumns(hiddenColumnFields?: string[], forceRender?: boolean): void
|
|
3736
|
+
hideColumns(hiddenColumnFields?: string[], forceRender?: boolean): Promise<void>;
|
|
3538
3737
|
private getBrushSelectionInfo;
|
|
3539
3738
|
private getDefaultInteractions;
|
|
3540
3739
|
private registerInteractions;
|
|
@@ -3553,8 +3752,7 @@ declare class RootInteraction {
|
|
|
3553
3752
|
getSelectedCellHighlight(): InteractionCellSelectedHighlightOptions;
|
|
3554
3753
|
}
|
|
3555
3754
|
|
|
3556
|
-
declare class RowCell extends HeaderCell {
|
|
3557
|
-
protected headerConfig: RowHeaderConfig;
|
|
3755
|
+
declare class RowCell extends HeaderCell<RowHeaderConfig> {
|
|
3558
3756
|
get cellType(): CellType;
|
|
3559
3757
|
protected getBorderPositions(): CellBorderPosition[];
|
|
3560
3758
|
protected initCell(): void;
|
|
@@ -3566,7 +3764,7 @@ declare class RowCell extends HeaderCell {
|
|
|
3566
3764
|
protected drawTreeIcon(): void;
|
|
3567
3765
|
protected drawTreeLeafNodeAlignDot(): void;
|
|
3568
3766
|
protected isBolderText(): boolean;
|
|
3569
|
-
|
|
3767
|
+
drawTextShape(options?: RenderTextShapeOptions): void;
|
|
3570
3768
|
protected drawResizeAreaInLeaf(): void;
|
|
3571
3769
|
protected getContentIndent(): number;
|
|
3572
3770
|
protected getTextIndent(): number;
|
|
@@ -3615,7 +3813,8 @@ declare type RowData = Data | CellData[];
|
|
|
3615
3813
|
* Row Header for SpreadSheet
|
|
3616
3814
|
*/
|
|
3617
3815
|
declare class RowHeader extends BaseHeader<RowHeaderConfig> {
|
|
3618
|
-
constructor(
|
|
3816
|
+
constructor(config: RowHeaderConfig);
|
|
3817
|
+
protected getCellInstance(node: Node_2_2): S2CellType_2;
|
|
3619
3818
|
protected layout(): void;
|
|
3620
3819
|
protected offset(): void;
|
|
3621
3820
|
protected clip(): void;
|
|
@@ -3623,7 +3822,7 @@ declare class RowHeader extends BaseHeader<RowHeaderConfig> {
|
|
|
3623
3822
|
|
|
3624
3823
|
declare type RowHeaderConfig = BaseHeaderConfig;
|
|
3625
3824
|
|
|
3626
|
-
declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2,
|
|
3825
|
+
declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Menu = BaseTooltipOperatorMenuOptions_2> {
|
|
3627
3826
|
/**
|
|
3628
3827
|
* 表格宽度
|
|
3629
3828
|
*/
|
|
@@ -3645,7 +3844,7 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Ico
|
|
|
3645
3844
|
* 提示信息
|
|
3646
3845
|
* @see https://s2.antv.antgroup.com/manual/basic/tooltip
|
|
3647
3846
|
*/
|
|
3648
|
-
tooltip?: Tooltip<T,
|
|
3847
|
+
tooltip?: Tooltip<T, Menu> | null;
|
|
3649
3848
|
/**
|
|
3650
3849
|
* 交互配置
|
|
3651
3850
|
* @see https://s2.antv.antgroup.com/manual/advanced/interaction/basic
|
|
@@ -3671,7 +3870,7 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Ico
|
|
|
3671
3870
|
* 自定义表头图标配置
|
|
3672
3871
|
* @see https://s2.antv.antgroup.com/manual/advanced/custom/custom-icon
|
|
3673
3872
|
*/
|
|
3674
|
-
headerActionIcons?:
|
|
3873
|
+
headerActionIcons?: HeaderActionIcon_2[];
|
|
3675
3874
|
/**
|
|
3676
3875
|
* 自定义 SVG 图标
|
|
3677
3876
|
* @see https://s2.antv.antgroup.com/manual/advanced/custom/custom-icon
|
|
@@ -3691,18 +3890,27 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Ico
|
|
|
3691
3890
|
* 空值单元格占位符
|
|
3692
3891
|
*/
|
|
3693
3892
|
placeholder?: ((meta: Record<string, any>) => string) | string;
|
|
3694
|
-
/**
|
|
3695
|
-
* 是否支持 CSS 的 transform 属性
|
|
3696
|
-
*/
|
|
3697
|
-
supportCSSTransform?: boolean;
|
|
3698
|
-
/**
|
|
3699
|
-
* 自定义 DPR, 默认 "window.devicePixelRatio"
|
|
3700
|
-
*/
|
|
3701
|
-
devicePixelRatio?: number;
|
|
3702
3893
|
/**
|
|
3703
3894
|
* 设备类型: pc / mobile
|
|
3704
3895
|
*/
|
|
3705
3896
|
device?: DeviceType;
|
|
3897
|
+
/**
|
|
3898
|
+
* 自定义 AntV/G 渲染引擎配置参数 & 插件注册
|
|
3899
|
+
* @see https://g.antv.antgroup.com/plugins/intro
|
|
3900
|
+
* @see https://g.antv.antgroup.com/api/canvas/options
|
|
3901
|
+
* @example
|
|
3902
|
+
import { Plugin as PluginA11y } from '@antv/g-plugin-a11y';
|
|
3903
|
+
|
|
3904
|
+
transformCanvasConfig(renderer) {
|
|
3905
|
+
console.log('当前已注册插件:', renderer.getPlugins(), renderer.getConfig());
|
|
3906
|
+
renderer.registerPlugin(new PluginA11y({ enableExtractingText: true }));
|
|
3907
|
+
|
|
3908
|
+
return {
|
|
3909
|
+
supportsCSSTransform: true,
|
|
3910
|
+
};
|
|
3911
|
+
},
|
|
3912
|
+
*/
|
|
3913
|
+
transformCanvasConfig?: (renderer: CanvasConfig['renderer'], spreadsheet: SpreadSheet_2) => (Partial<CanvasConfig> | null | undefined) | void;
|
|
3706
3914
|
/** *********** 自定义单元格 hooks **************** */
|
|
3707
3915
|
/**
|
|
3708
3916
|
* 自定义数值单元格
|
|
@@ -3779,7 +3987,7 @@ declare interface S2BasicOptions<T = TooltipContentType_2, P = Pagination_2, Ico
|
|
|
3779
3987
|
facet?: (spreadsheet: SpreadSheet_2) => BaseFacet;
|
|
3780
3988
|
}
|
|
3781
3989
|
|
|
3782
|
-
declare type S2CellType_2<T extends SimpleBBox =
|
|
3990
|
+
declare type S2CellType_2<T extends SimpleBBox = ViewMeta> = DataCell_2 | HeaderCell | ColCell | CornerCell | RowCell | SeriesNumberCell | MergedCell | TableCornerCell | TableSeriesNumberCell | BaseCell<T>;
|
|
3783
3991
|
|
|
3784
3992
|
declare interface S2DataConfig_2 {
|
|
3785
3993
|
/**
|
|
@@ -3908,7 +4116,7 @@ declare interface S2EventHandler {
|
|
|
3908
4116
|
|
|
3909
4117
|
declare type S2MountContainer_2 = string | Element;
|
|
3910
4118
|
|
|
3911
|
-
declare interface S2Options_2<T = TooltipContentType_2, P = Pagination_2,
|
|
4119
|
+
declare interface S2Options_2<T = TooltipContentType_2, P = Pagination_2, Menu = BaseTooltipOperatorMenuOptions_2> extends S2BasicOptions<T, P, Menu>, S2PivotSheetOptions {
|
|
3912
4120
|
/**
|
|
3913
4121
|
* 行列冻结
|
|
3914
4122
|
*/
|
|
@@ -4124,13 +4332,14 @@ declare interface ScrollSpeedRatio {
|
|
|
4124
4332
|
declare type SelectedHandler = (cells: S2CellType_2[]) => void;
|
|
4125
4333
|
|
|
4126
4334
|
declare interface SelectHeaderCellInfo {
|
|
4127
|
-
cell: S2CellType_2<
|
|
4335
|
+
cell: S2CellType_2<ViewMeta>;
|
|
4128
4336
|
isMultiSelection?: boolean;
|
|
4129
4337
|
}
|
|
4130
4338
|
|
|
4131
4339
|
declare class SeriesNumberCell extends BaseCell<Node_2_2> {
|
|
4132
4340
|
protected headerConfig: BaseHeaderConfig;
|
|
4133
4341
|
protected handleRestOptions(...[headerConfig]: [BaseHeaderConfig]): void;
|
|
4342
|
+
getHeaderConfig(): BaseHeaderConfig;
|
|
4134
4343
|
get cellType(): CellType;
|
|
4135
4344
|
protected getBorderPositions(): CellBorderPosition[];
|
|
4136
4345
|
protected initCell(): void;
|
|
@@ -4150,6 +4359,8 @@ declare class SeriesNumberCell extends BaseCell<Node_2_2> {
|
|
|
4150
4359
|
}
|
|
4151
4360
|
|
|
4152
4361
|
declare class SeriesNumberHeader extends BaseHeader<BaseHeaderConfig> {
|
|
4362
|
+
constructor(config: BaseHeaderConfig);
|
|
4363
|
+
protected getCellInstance(node: Node_2_2): S2CellType_2;
|
|
4153
4364
|
/**
|
|
4154
4365
|
* Get seriesNumber header by config
|
|
4155
4366
|
*/
|
|
@@ -4160,7 +4371,6 @@ declare class SeriesNumberHeader extends BaseHeader<BaseHeaderConfig> {
|
|
|
4160
4371
|
spreadsheet: SpreadSheet_2;
|
|
4161
4372
|
cornerWidth: number;
|
|
4162
4373
|
}): SeriesNumberHeader;
|
|
4163
|
-
constructor(cfg: BaseHeaderConfig);
|
|
4164
4374
|
clip(): void;
|
|
4165
4375
|
layout(): void;
|
|
4166
4376
|
protected offset(): void;
|
|
@@ -4187,20 +4397,20 @@ loading: BooleanConstructor;
|
|
|
4187
4397
|
partDrillDown: ObjectConstructor;
|
|
4188
4398
|
header: ObjectConstructor;
|
|
4189
4399
|
options: {
|
|
4190
|
-
type: PropType<S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4191
|
-
default: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4400
|
+
type: PropType<S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>>;
|
|
4401
|
+
default: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>;
|
|
4192
4402
|
};
|
|
4193
4403
|
adaptive: {
|
|
4194
4404
|
type: PropType<Adaptive>;
|
|
4195
4405
|
default: Adaptive;
|
|
4196
4406
|
};
|
|
4197
|
-
onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4407
|
+
onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => SpreadSheet_2>;
|
|
4198
4408
|
onMounted: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
4199
4409
|
}, {
|
|
4200
4410
|
s2Ref: ShallowRef<SheetExpose>;
|
|
4201
|
-
options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4411
|
+
options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>;
|
|
4202
4412
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4203
|
-
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4413
|
+
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => SpreadSheet_2;
|
|
4204
4414
|
sheetUpdate: SheetUpdateCallback;
|
|
4205
4415
|
rowCellHover: (data: TargetCellInfo_2) => void;
|
|
4206
4416
|
rowCellClick: (data: TargetCellInfo_2) => void;
|
|
@@ -4232,7 +4442,7 @@ dataCellMouseDown: (data: TargetCellInfo_2) => void;
|
|
|
4232
4442
|
dataCellMouseUp: (data: TargetCellInfo_2) => void;
|
|
4233
4443
|
dataCellMouseMove: (data: TargetCellInfo_2) => void;
|
|
4234
4444
|
dataCellBrushSelection: (brushRangeDataCells: DataCell_2[]) => void;
|
|
4235
|
-
dataCellSelectMove: (
|
|
4445
|
+
dataCellSelectMove: (metaList: ViewMetaData_2[]) => void;
|
|
4236
4446
|
cornerCellHover: (data: TargetCellInfo_2) => void;
|
|
4237
4447
|
cornerCellClick: (data: TargetCellInfo_2) => void;
|
|
4238
4448
|
cornerCellDoubleClick: (data: TargetCellInfo_2) => void;
|
|
@@ -4256,7 +4466,7 @@ filteredValues: string[];
|
|
|
4256
4466
|
rangeFiltered: (data: ViewMetaData_2[]) => void;
|
|
4257
4467
|
layoutAfterHeaderLayout: (layoutResult: LayoutResult_2) => void;
|
|
4258
4468
|
layoutPagination: (data: LayoutPaginationParams) => void;
|
|
4259
|
-
layoutCellMounted: (cell: S2CellType_2
|
|
4469
|
+
layoutCellMounted: (cell: S2CellType_2) => void;
|
|
4260
4470
|
beforeRender: () => void;
|
|
4261
4471
|
afterRender: () => void;
|
|
4262
4472
|
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
@@ -4294,7 +4504,7 @@ mouseHover: (event: FederatedPointerEvent) => void;
|
|
|
4294
4504
|
mouseUp: (event: MouseEvent) => void;
|
|
4295
4505
|
mouseDown: (event: MouseEvent) => void;
|
|
4296
4506
|
mouseMove: (event: MouseEvent) => void;
|
|
4297
|
-
selected: (cells: S2CellType_2
|
|
4507
|
+
selected: (cells: S2CellType_2[]) => void;
|
|
4298
4508
|
reset: (event: KeyboardEvent) => void;
|
|
4299
4509
|
linkFieldJump: (data: {
|
|
4300
4510
|
field: string;
|
|
@@ -4326,14 +4536,14 @@ loading: BooleanConstructor;
|
|
|
4326
4536
|
partDrillDown: ObjectConstructor;
|
|
4327
4537
|
header: ObjectConstructor;
|
|
4328
4538
|
options: {
|
|
4329
|
-
type: PropType<S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4330
|
-
default: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4539
|
+
type: PropType<S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>>;
|
|
4540
|
+
default: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>;
|
|
4331
4541
|
};
|
|
4332
4542
|
adaptive: {
|
|
4333
4543
|
type: PropType<Adaptive>;
|
|
4334
4544
|
default: Adaptive;
|
|
4335
4545
|
};
|
|
4336
|
-
onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4546
|
+
onSpreadsheet: PropType<(container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => SpreadSheet_2>;
|
|
4337
4547
|
onMounted: PropType<(spreadsheet: SpreadSheet_2) => void>;
|
|
4338
4548
|
}>> & {
|
|
4339
4549
|
onSheetUpdate?: (params: S2RenderOptions_2) => any;
|
|
@@ -4367,7 +4577,7 @@ onDataCellMouseDown?: (data: TargetCellInfo_2) => any;
|
|
|
4367
4577
|
onDataCellMouseUp?: (data: TargetCellInfo_2) => any;
|
|
4368
4578
|
onDataCellMouseMove?: (data: TargetCellInfo_2) => any;
|
|
4369
4579
|
onDataCellBrushSelection?: (brushRangeDataCells: DataCell_2[]) => any;
|
|
4370
|
-
onDataCellSelectMove?: (
|
|
4580
|
+
onDataCellSelectMove?: (metaList: ViewMetaData_2[]) => any;
|
|
4371
4581
|
onCornerCellHover?: (data: TargetCellInfo_2) => any;
|
|
4372
4582
|
onCornerCellClick?: (data: TargetCellInfo_2) => any;
|
|
4373
4583
|
onCornerCellDoubleClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -4391,7 +4601,7 @@ filteredValues: string[];
|
|
|
4391
4601
|
onRangeFiltered?: (data: ViewMetaData_2[]) => any;
|
|
4392
4602
|
onLayoutAfterHeaderLayout?: (layoutResult: LayoutResult_2) => any;
|
|
4393
4603
|
onLayoutPagination?: (data: LayoutPaginationParams) => any;
|
|
4394
|
-
onLayoutCellMounted?: (cell: S2CellType_2
|
|
4604
|
+
onLayoutCellMounted?: (cell: S2CellType_2) => any;
|
|
4395
4605
|
onBeforeRender?: () => any;
|
|
4396
4606
|
onAfterRender?: () => any;
|
|
4397
4607
|
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
@@ -4429,7 +4639,7 @@ onMouseHover?: (event: FederatedPointerEvent) => any;
|
|
|
4429
4639
|
onMouseUp?: (event: MouseEvent) => any;
|
|
4430
4640
|
onMouseDown?: (event: MouseEvent) => any;
|
|
4431
4641
|
onMouseMove?: (event: MouseEvent) => any;
|
|
4432
|
-
onSelected?: (cells: S2CellType_2
|
|
4642
|
+
onSelected?: (cells: S2CellType_2[]) => any;
|
|
4433
4643
|
onReset?: (event: KeyboardEvent) => any;
|
|
4434
4644
|
onLinkFieldJump?: (data: {
|
|
4435
4645
|
field: string;
|
|
@@ -4443,9 +4653,9 @@ spreadsheet: SpreadSheet_2;
|
|
|
4443
4653
|
}) => any;
|
|
4444
4654
|
onRowCellBrushSelection?: (event: FederatedPointerEvent) => any;
|
|
4445
4655
|
onColCellBrushSelection?: (event: FederatedPointerEvent) => any;
|
|
4446
|
-
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4656
|
+
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => any;
|
|
4447
4657
|
}, {
|
|
4448
|
-
options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4658
|
+
options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>;
|
|
4449
4659
|
loading: boolean;
|
|
4450
4660
|
adaptive: boolean | {
|
|
4451
4661
|
width?: boolean;
|
|
@@ -4456,10 +4666,10 @@ showPagination: boolean | {
|
|
|
4456
4666
|
onShowSizeChange?: (pageSize: number) => void;
|
|
4457
4667
|
onChange?: (current: number) => void;
|
|
4458
4668
|
};
|
|
4459
|
-
}> | 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">, {
|
|
4669
|
+
}, {}> | 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">, {
|
|
4460
4670
|
s2Ref: ShallowRef<SheetExpose>;
|
|
4461
4671
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4462
|
-
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4672
|
+
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => SpreadSheet_2;
|
|
4463
4673
|
sheetUpdate: SheetUpdateCallback;
|
|
4464
4674
|
rowCellHover: (data: TargetCellInfo_2) => void;
|
|
4465
4675
|
rowCellClick: (data: TargetCellInfo_2) => void;
|
|
@@ -4491,7 +4701,7 @@ dataCellMouseDown: (data: TargetCellInfo_2) => void;
|
|
|
4491
4701
|
dataCellMouseUp: (data: TargetCellInfo_2) => void;
|
|
4492
4702
|
dataCellMouseMove: (data: TargetCellInfo_2) => void;
|
|
4493
4703
|
dataCellBrushSelection: (brushRangeDataCells: DataCell_2[]) => void;
|
|
4494
|
-
dataCellSelectMove: (
|
|
4704
|
+
dataCellSelectMove: (metaList: ViewMetaData_2[]) => void;
|
|
4495
4705
|
cornerCellHover: (data: TargetCellInfo_2) => void;
|
|
4496
4706
|
cornerCellClick: (data: TargetCellInfo_2) => void;
|
|
4497
4707
|
cornerCellDoubleClick: (data: TargetCellInfo_2) => void;
|
|
@@ -4515,7 +4725,7 @@ filteredValues: string[];
|
|
|
4515
4725
|
rangeFiltered: (data: ViewMetaData_2[]) => void;
|
|
4516
4726
|
layoutAfterHeaderLayout: (layoutResult: LayoutResult_2) => void;
|
|
4517
4727
|
layoutPagination: (data: LayoutPaginationParams) => void;
|
|
4518
|
-
layoutCellMounted: (cell: S2CellType_2
|
|
4728
|
+
layoutCellMounted: (cell: S2CellType_2) => void;
|
|
4519
4729
|
beforeRender: () => void;
|
|
4520
4730
|
afterRender: () => void;
|
|
4521
4731
|
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
@@ -4553,7 +4763,7 @@ mouseHover: (event: FederatedPointerEvent) => void;
|
|
|
4553
4763
|
mouseUp: (event: MouseEvent) => void;
|
|
4554
4764
|
mouseDown: (event: MouseEvent) => void;
|
|
4555
4765
|
mouseMove: (event: MouseEvent) => void;
|
|
4556
|
-
selected: (cells: S2CellType_2
|
|
4766
|
+
selected: (cells: S2CellType_2[]) => void;
|
|
4557
4767
|
reset: (event: KeyboardEvent) => void;
|
|
4558
4768
|
linkFieldJump: (data: {
|
|
4559
4769
|
field: string;
|
|
@@ -4599,7 +4809,7 @@ onDataCellMouseDown?: (data: TargetCellInfo_2) => any;
|
|
|
4599
4809
|
onDataCellMouseUp?: (data: TargetCellInfo_2) => any;
|
|
4600
4810
|
onDataCellMouseMove?: (data: TargetCellInfo_2) => any;
|
|
4601
4811
|
onDataCellBrushSelection?: (brushRangeDataCells: DataCell_2[]) => any;
|
|
4602
|
-
onDataCellSelectMove?: (
|
|
4812
|
+
onDataCellSelectMove?: (metaList: ViewMetaData_2[]) => any;
|
|
4603
4813
|
onCornerCellHover?: (data: TargetCellInfo_2) => any;
|
|
4604
4814
|
onCornerCellClick?: (data: TargetCellInfo_2) => any;
|
|
4605
4815
|
onCornerCellDoubleClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -4623,7 +4833,7 @@ filteredValues: string[];
|
|
|
4623
4833
|
onRangeFiltered?: (data: ViewMetaData_2[]) => any;
|
|
4624
4834
|
onLayoutAfterHeaderLayout?: (layoutResult: LayoutResult_2) => any;
|
|
4625
4835
|
onLayoutPagination?: (data: LayoutPaginationParams) => any;
|
|
4626
|
-
onLayoutCellMounted?: (cell: S2CellType_2
|
|
4836
|
+
onLayoutCellMounted?: (cell: S2CellType_2) => any;
|
|
4627
4837
|
onBeforeRender?: () => any;
|
|
4628
4838
|
onAfterRender?: () => any;
|
|
4629
4839
|
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
@@ -4661,7 +4871,7 @@ onMouseHover?: (event: FederatedPointerEvent) => any;
|
|
|
4661
4871
|
onMouseUp?: (event: MouseEvent) => any;
|
|
4662
4872
|
onMouseDown?: (event: MouseEvent) => any;
|
|
4663
4873
|
onMouseMove?: (event: MouseEvent) => any;
|
|
4664
|
-
onSelected?: (cells: S2CellType_2
|
|
4874
|
+
onSelected?: (cells: S2CellType_2[]) => any;
|
|
4665
4875
|
onReset?: (event: KeyboardEvent) => any;
|
|
4666
4876
|
onLinkFieldJump?: (data: {
|
|
4667
4877
|
field: string;
|
|
@@ -4675,10 +4885,10 @@ spreadsheet: SpreadSheet_2;
|
|
|
4675
4885
|
}) => any;
|
|
4676
4886
|
onRowCellBrushSelection?: (event: FederatedPointerEvent) => any;
|
|
4677
4887
|
onColCellBrushSelection?: (event: FederatedPointerEvent) => any;
|
|
4678
|
-
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4679
|
-
}, {}>>;
|
|
4888
|
+
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => any;
|
|
4889
|
+
}, {}, {}>>;
|
|
4680
4890
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4681
|
-
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4891
|
+
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => SpreadSheet_2;
|
|
4682
4892
|
sheetUpdate: SheetUpdateCallback;
|
|
4683
4893
|
rowCellHover: (data: TargetCellInfo_2) => void;
|
|
4684
4894
|
rowCellClick: (data: TargetCellInfo_2) => void;
|
|
@@ -4710,7 +4920,7 @@ dataCellMouseDown: (data: TargetCellInfo_2) => void;
|
|
|
4710
4920
|
dataCellMouseUp: (data: TargetCellInfo_2) => void;
|
|
4711
4921
|
dataCellMouseMove: (data: TargetCellInfo_2) => void;
|
|
4712
4922
|
dataCellBrushSelection: (brushRangeDataCells: DataCell_2[]) => void;
|
|
4713
|
-
dataCellSelectMove: (
|
|
4923
|
+
dataCellSelectMove: (metaList: ViewMetaData_2[]) => void;
|
|
4714
4924
|
cornerCellHover: (data: TargetCellInfo_2) => void;
|
|
4715
4925
|
cornerCellClick: (data: TargetCellInfo_2) => void;
|
|
4716
4926
|
cornerCellDoubleClick: (data: TargetCellInfo_2) => void;
|
|
@@ -4734,7 +4944,7 @@ filteredValues: string[];
|
|
|
4734
4944
|
rangeFiltered: (data: ViewMetaData_2[]) => void;
|
|
4735
4945
|
layoutAfterHeaderLayout: (layoutResult: LayoutResult_2) => void;
|
|
4736
4946
|
layoutPagination: (data: LayoutPaginationParams) => void;
|
|
4737
|
-
layoutCellMounted: (cell: S2CellType_2
|
|
4947
|
+
layoutCellMounted: (cell: S2CellType_2) => void;
|
|
4738
4948
|
beforeRender: () => void;
|
|
4739
4949
|
afterRender: () => void;
|
|
4740
4950
|
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
@@ -4772,7 +4982,7 @@ mouseHover: (event: FederatedPointerEvent) => void;
|
|
|
4772
4982
|
mouseUp: (event: MouseEvent) => void;
|
|
4773
4983
|
mouseDown: (event: MouseEvent) => void;
|
|
4774
4984
|
mouseMove: (event: MouseEvent) => void;
|
|
4775
|
-
selected: (cells: S2CellType_2
|
|
4985
|
+
selected: (cells: S2CellType_2[]) => void;
|
|
4776
4986
|
reset: (event: KeyboardEvent) => void;
|
|
4777
4987
|
linkFieldJump: (data: {
|
|
4778
4988
|
field: string;
|
|
@@ -4818,7 +5028,7 @@ onDataCellMouseDown?: (data: TargetCellInfo_2) => any;
|
|
|
4818
5028
|
onDataCellMouseUp?: (data: TargetCellInfo_2) => any;
|
|
4819
5029
|
onDataCellMouseMove?: (data: TargetCellInfo_2) => any;
|
|
4820
5030
|
onDataCellBrushSelection?: (brushRangeDataCells: DataCell_2[]) => any;
|
|
4821
|
-
onDataCellSelectMove?: (
|
|
5031
|
+
onDataCellSelectMove?: (metaList: ViewMetaData_2[]) => any;
|
|
4822
5032
|
onCornerCellHover?: (data: TargetCellInfo_2) => any;
|
|
4823
5033
|
onCornerCellClick?: (data: TargetCellInfo_2) => any;
|
|
4824
5034
|
onCornerCellDoubleClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -4842,7 +5052,7 @@ filteredValues: string[];
|
|
|
4842
5052
|
onRangeFiltered?: (data: ViewMetaData_2[]) => any;
|
|
4843
5053
|
onLayoutAfterHeaderLayout?: (layoutResult: LayoutResult_2) => any;
|
|
4844
5054
|
onLayoutPagination?: (data: LayoutPaginationParams) => any;
|
|
4845
|
-
onLayoutCellMounted?: (cell: S2CellType_2
|
|
5055
|
+
onLayoutCellMounted?: (cell: S2CellType_2) => any;
|
|
4846
5056
|
onBeforeRender?: () => any;
|
|
4847
5057
|
onAfterRender?: () => any;
|
|
4848
5058
|
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
@@ -4880,7 +5090,7 @@ onMouseHover?: (event: FederatedPointerEvent) => any;
|
|
|
4880
5090
|
onMouseUp?: (event: MouseEvent) => any;
|
|
4881
5091
|
onMouseDown?: (event: MouseEvent) => any;
|
|
4882
5092
|
onMouseMove?: (event: MouseEvent) => any;
|
|
4883
|
-
onSelected?: (cells: S2CellType_2
|
|
5093
|
+
onSelected?: (cells: S2CellType_2[]) => any;
|
|
4884
5094
|
onReset?: (event: KeyboardEvent) => any;
|
|
4885
5095
|
onLinkFieldJump?: (data: {
|
|
4886
5096
|
field: string;
|
|
@@ -4894,8 +5104,8 @@ spreadsheet: SpreadSheet_2;
|
|
|
4894
5104
|
}) => any;
|
|
4895
5105
|
onRowCellBrushSelection?: (event: FederatedPointerEvent) => any;
|
|
4896
5106
|
onColCellBrushSelection?: (event: FederatedPointerEvent) => any;
|
|
4897
|
-
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
4898
|
-
}, {}>;
|
|
5107
|
+
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => any;
|
|
5108
|
+
}, {}, {}>;
|
|
4899
5109
|
|
|
4900
5110
|
declare type SheetComponentOptions = S2Options<TooltipContentType, Pagination & PaginationProps>;
|
|
4901
5111
|
|
|
@@ -4920,8 +5130,9 @@ declare interface SimpleBBox {
|
|
|
4920
5130
|
declare type SimpleData = string | number | null;
|
|
4921
5131
|
|
|
4922
5132
|
declare interface Sort {
|
|
4923
|
-
/** 字段id
|
|
5133
|
+
/** 字段id */
|
|
4924
5134
|
sortFieldId: string;
|
|
5135
|
+
/** 排序方式 */
|
|
4925
5136
|
sortMethod?: SortMethod;
|
|
4926
5137
|
/** 自定义排序 */
|
|
4927
5138
|
sortBy?: string[];
|
|
@@ -4975,27 +5186,37 @@ declare interface SplitLine {
|
|
|
4975
5186
|
}
|
|
4976
5187
|
|
|
4977
5188
|
declare abstract class SpreadSheet_2 extends EE {
|
|
5189
|
+
themeName: ThemeName;
|
|
4978
5190
|
theme: InternalFullyTheme;
|
|
4979
5191
|
store: Store;
|
|
4980
5192
|
dataCfg: S2DataConfig_2;
|
|
4981
5193
|
options: S2Options_2;
|
|
4982
5194
|
dataSet: BaseDataSet_2;
|
|
4983
|
-
/**
|
|
4984
|
-
* Facet: determine how to render headers/cell
|
|
4985
|
-
*/
|
|
4986
5195
|
facet: BaseFacet;
|
|
4987
5196
|
tooltip: BaseTooltip_2;
|
|
4988
5197
|
container: Canvas;
|
|
4989
5198
|
interaction: RootInteraction;
|
|
4990
5199
|
hdAdapter: HdAdapter;
|
|
4991
|
-
private untypedOn;
|
|
4992
|
-
private untypedEmit;
|
|
4993
5200
|
/**
|
|
4994
5201
|
* 表格是否已销毁
|
|
4995
5202
|
*/
|
|
4996
5203
|
private destroyed;
|
|
5204
|
+
private untypedOn;
|
|
5205
|
+
private untypedEmit;
|
|
4997
5206
|
on: <K extends keyof EmitterType>(event: K, listener: EmitterType[K]) => this;
|
|
4998
5207
|
emit: <K extends keyof EmitterType>(event: K, ...args: Parameters<EmitterType[K]>) => boolean;
|
|
5208
|
+
protected abstract bindEvents(): void;
|
|
5209
|
+
abstract getDataSet(): BaseDataSet_2;
|
|
5210
|
+
abstract enableFrozenHeaders(): boolean;
|
|
5211
|
+
abstract isPivotMode(): boolean;
|
|
5212
|
+
abstract isCustomRowFields(): boolean;
|
|
5213
|
+
abstract isHierarchyTreeType(): boolean;
|
|
5214
|
+
abstract isFrozenRowHeader(): boolean;
|
|
5215
|
+
abstract isTableMode(): boolean;
|
|
5216
|
+
abstract isValueInCols(): boolean;
|
|
5217
|
+
protected abstract buildFacet(): void;
|
|
5218
|
+
abstract clearDrillDownData(rowNodeId?: string, preventRender?: boolean): void;
|
|
5219
|
+
abstract groupSortByMethod(sortMethod: SortMethod, meta: Node_2_2): void;
|
|
4999
5220
|
constructor(dom: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2 | null);
|
|
5000
5221
|
isCustomHeaderFields(fieldType?: keyof Pick<Fields, 'columns' | 'rows'>): boolean;
|
|
5001
5222
|
isCustomColumnFields(): boolean;
|
|
@@ -5008,38 +5229,8 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
5008
5229
|
private initInteraction;
|
|
5009
5230
|
private initTooltip;
|
|
5010
5231
|
private renderTooltip;
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
/**
|
|
5014
|
-
* 是否开启冻结行列头效果
|
|
5015
|
-
*/
|
|
5016
|
-
abstract enableFrozenHeaders(): boolean;
|
|
5017
|
-
/**
|
|
5018
|
-
* Check if is pivot mode
|
|
5019
|
-
*/
|
|
5020
|
-
abstract isPivotMode(): boolean;
|
|
5021
|
-
abstract isCustomRowFields(): boolean;
|
|
5022
|
-
/**
|
|
5023
|
-
* tree type must be in strategy mode
|
|
5024
|
-
*/
|
|
5025
|
-
abstract isHierarchyTreeType(): boolean;
|
|
5026
|
-
/**
|
|
5027
|
-
* Scroll Freeze Row Header
|
|
5028
|
-
*/
|
|
5029
|
-
abstract isFrozenRowHeader(): boolean;
|
|
5030
|
-
/**
|
|
5031
|
-
* Check if is pivot mode
|
|
5032
|
-
*/
|
|
5033
|
-
abstract isTableMode(): boolean;
|
|
5034
|
-
/**
|
|
5035
|
-
* Check if the value is in the columns
|
|
5036
|
-
*/
|
|
5037
|
-
abstract isValueInCols(): boolean;
|
|
5038
|
-
protected abstract buildFacet(): void;
|
|
5039
|
-
abstract clearDrillDownData(rowNodeId?: string, preventRender?: boolean): void;
|
|
5040
|
-
abstract handleGroupSort(event: FederatedPointerEvent, meta: Node_2_2): void;
|
|
5041
|
-
showTooltip<T = TooltipContentType_2>(showOptions: TooltipShowOptions<T>): void;
|
|
5042
|
-
showTooltipWithInfo(event: FederatedPointerEvent | MouseEvent, cellInfos: TooltipData[], options?: TooltipOptions): void;
|
|
5232
|
+
showTooltip<T = TooltipContentType_2, Menu = BaseTooltipOperatorMenuOptions_2>(showOptions: TooltipShowOptions<T, Menu>): Promise<void>;
|
|
5233
|
+
showTooltipWithInfo(event: FederatedPointerEvent | MouseEvent, cellInfos: TooltipData[], options?: TooltipOptions): Promise<void> | void;
|
|
5043
5234
|
hideTooltip(): void;
|
|
5044
5235
|
destroyTooltip(): void;
|
|
5045
5236
|
registerIcons(): void;
|
|
@@ -5060,8 +5251,11 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
5060
5251
|
UNSAFE_render(reloadData?: boolean, options?: S2RenderOptions_2): void;
|
|
5061
5252
|
render(reloadData?: boolean, options?: S2RenderOptions_2): Promise<void>;
|
|
5062
5253
|
destroy(): void;
|
|
5254
|
+
private setThemeName;
|
|
5063
5255
|
setThemeCfg(themeCfg?: ThemeCfg_2): void;
|
|
5064
5256
|
setTheme(theme: S2Theme): void;
|
|
5257
|
+
getTheme(): InternalFullyTheme;
|
|
5258
|
+
getThemeName(): "default" | "colorful" | "gray" | "dark";
|
|
5065
5259
|
/**
|
|
5066
5260
|
* Update pagination config which store in {@see options}
|
|
5067
5261
|
* @param pagination
|
|
@@ -5093,10 +5287,9 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
5093
5287
|
getCell<T extends S2CellType_2 = S2CellType_2>(target: CellEventTarget): T | null;
|
|
5094
5288
|
getCellType(target: CellEventTarget): CellType | undefined;
|
|
5095
5289
|
/**
|
|
5096
|
-
*
|
|
5097
|
-
* @param dimension unique dimension id
|
|
5290
|
+
* 获取当前维度对应的汇总配置
|
|
5098
5291
|
*/
|
|
5099
|
-
getTotalsConfig(dimension: string):
|
|
5292
|
+
getTotalsConfig(dimension: string): Total;
|
|
5100
5293
|
/**
|
|
5101
5294
|
* Create all related groups, contains:
|
|
5102
5295
|
* 1. container -- base canvas group
|
|
@@ -5140,6 +5333,7 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
5140
5333
|
measureTextWidthRoughly: (text: any, font?: any) => number;
|
|
5141
5334
|
updateSortMethodMap(nodeId: string, sortMethod: SortMethod, replace?: boolean): void;
|
|
5142
5335
|
getMenuDefaultSelectedKeys(nodeId: string): string[];
|
|
5336
|
+
handleGroupSort(event: FederatedPointerEvent, meta: Node_2_2): void;
|
|
5143
5337
|
}
|
|
5144
5338
|
|
|
5145
5339
|
declare type StateShapeLayer = 'interactiveBgShape' | 'interactiveBorderShape';
|
|
@@ -5233,7 +5427,7 @@ declare interface StoreKey {
|
|
|
5233
5427
|
/**
|
|
5234
5428
|
* 上一次点击的单元格
|
|
5235
5429
|
*/
|
|
5236
|
-
lastClickedCell: S2CellType_2<
|
|
5430
|
+
lastClickedCell: S2CellType_2<ViewMeta> | null;
|
|
5237
5431
|
/**
|
|
5238
5432
|
* 初始化时的边界滚动配置
|
|
5239
5433
|
*/
|
|
@@ -5254,7 +5448,7 @@ declare class TableColCell extends ColCell {
|
|
|
5254
5448
|
x: number;
|
|
5255
5449
|
y: number;
|
|
5256
5450
|
};
|
|
5257
|
-
protected getColResizeArea():
|
|
5451
|
+
protected getColResizeArea(): Group_2 | undefined;
|
|
5258
5452
|
protected isSortCell(): boolean;
|
|
5259
5453
|
protected showSortIcon(): boolean | undefined;
|
|
5260
5454
|
protected getTextStyle(): DeepRequired<TextTheme>;
|
|
@@ -5283,7 +5477,7 @@ declare class TableSeriesNumberCell extends TableDataCell {
|
|
|
5283
5477
|
export declare const TableSheet: 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">, {
|
|
5284
5478
|
s2Ref: ShallowRef<SheetExpose>;
|
|
5285
5479
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
5286
|
-
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
5480
|
+
spreadsheet: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => SpreadSheet_2;
|
|
5287
5481
|
sheetUpdate: SheetUpdateCallback;
|
|
5288
5482
|
rowCellHover: (data: TargetCellInfo_2) => void;
|
|
5289
5483
|
rowCellClick: (data: TargetCellInfo_2) => void;
|
|
@@ -5315,7 +5509,7 @@ dataCellMouseDown: (data: TargetCellInfo_2) => void;
|
|
|
5315
5509
|
dataCellMouseUp: (data: TargetCellInfo_2) => void;
|
|
5316
5510
|
dataCellMouseMove: (data: TargetCellInfo_2) => void;
|
|
5317
5511
|
dataCellBrushSelection: (brushRangeDataCells: DataCell_2[]) => void;
|
|
5318
|
-
dataCellSelectMove: (
|
|
5512
|
+
dataCellSelectMove: (metaList: ViewMetaData_2[]) => void;
|
|
5319
5513
|
cornerCellHover: (data: TargetCellInfo_2) => void;
|
|
5320
5514
|
cornerCellClick: (data: TargetCellInfo_2) => void;
|
|
5321
5515
|
cornerCellDoubleClick: (data: TargetCellInfo_2) => void;
|
|
@@ -5339,7 +5533,7 @@ filteredValues: string[];
|
|
|
5339
5533
|
rangeFiltered: (data: ViewMetaData_2[]) => void;
|
|
5340
5534
|
layoutAfterHeaderLayout: (layoutResult: LayoutResult_2) => void;
|
|
5341
5535
|
layoutPagination: (data: LayoutPaginationParams) => void;
|
|
5342
|
-
layoutCellMounted: (cell: S2CellType_2
|
|
5536
|
+
layoutCellMounted: (cell: S2CellType_2) => void;
|
|
5343
5537
|
beforeRender: () => void;
|
|
5344
5538
|
afterRender: () => void;
|
|
5345
5539
|
mounted: (spreadsheet: SpreadSheet_2) => void;
|
|
@@ -5377,7 +5571,7 @@ mouseHover: (event: FederatedPointerEvent) => void;
|
|
|
5377
5571
|
mouseUp: (event: MouseEvent) => void;
|
|
5378
5572
|
mouseDown: (event: MouseEvent) => void;
|
|
5379
5573
|
mouseMove: (event: MouseEvent) => void;
|
|
5380
|
-
selected: (cells: S2CellType_2
|
|
5574
|
+
selected: (cells: S2CellType_2[]) => void;
|
|
5381
5575
|
reset: (event: KeyboardEvent) => void;
|
|
5382
5576
|
linkFieldJump: (data: {
|
|
5383
5577
|
field: string;
|
|
@@ -5423,7 +5617,7 @@ onDataCellMouseDown?: (data: TargetCellInfo_2) => any;
|
|
|
5423
5617
|
onDataCellMouseUp?: (data: TargetCellInfo_2) => any;
|
|
5424
5618
|
onDataCellMouseMove?: (data: TargetCellInfo_2) => any;
|
|
5425
5619
|
onDataCellBrushSelection?: (brushRangeDataCells: DataCell_2[]) => any;
|
|
5426
|
-
onDataCellSelectMove?: (
|
|
5620
|
+
onDataCellSelectMove?: (metaList: ViewMetaData_2[]) => any;
|
|
5427
5621
|
onCornerCellHover?: (data: TargetCellInfo_2) => any;
|
|
5428
5622
|
onCornerCellClick?: (data: TargetCellInfo_2) => any;
|
|
5429
5623
|
onCornerCellDoubleClick?: (data: TargetCellInfo_2) => any;
|
|
@@ -5447,7 +5641,7 @@ filteredValues: string[];
|
|
|
5447
5641
|
onRangeFiltered?: (data: ViewMetaData_2[]) => any;
|
|
5448
5642
|
onLayoutAfterHeaderLayout?: (layoutResult: LayoutResult_2) => any;
|
|
5449
5643
|
onLayoutPagination?: (data: LayoutPaginationParams) => any;
|
|
5450
|
-
onLayoutCellMounted?: (cell: S2CellType_2
|
|
5644
|
+
onLayoutCellMounted?: (cell: S2CellType_2) => any;
|
|
5451
5645
|
onBeforeRender?: () => any;
|
|
5452
5646
|
onAfterRender?: () => any;
|
|
5453
5647
|
onMounted?: (spreadsheet: SpreadSheet_2) => any;
|
|
@@ -5485,7 +5679,7 @@ onMouseHover?: (event: FederatedPointerEvent) => any;
|
|
|
5485
5679
|
onMouseUp?: (event: MouseEvent) => any;
|
|
5486
5680
|
onMouseDown?: (event: MouseEvent) => any;
|
|
5487
5681
|
onMouseMove?: (event: MouseEvent) => any;
|
|
5488
|
-
onSelected?: (cells: S2CellType_2
|
|
5682
|
+
onSelected?: (cells: S2CellType_2[]) => any;
|
|
5489
5683
|
onReset?: (event: KeyboardEvent) => any;
|
|
5490
5684
|
onLinkFieldJump?: (data: {
|
|
5491
5685
|
field: string;
|
|
@@ -5499,8 +5693,8 @@ spreadsheet: SpreadSheet_2;
|
|
|
5499
5693
|
}) => any;
|
|
5500
5694
|
onRowCellBrushSelection?: (event: FederatedPointerEvent) => any;
|
|
5501
5695
|
onColCellBrushSelection?: (event: FederatedPointerEvent) => any;
|
|
5502
|
-
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2,
|
|
5503
|
-
}, {}>;
|
|
5696
|
+
onSpreadsheet?: (container: S2MountContainer_2, dataCfg: S2DataConfig_2, options: S2Options_2<TooltipContentType_2, Pagination_2, BaseTooltipOperatorMenuOptions_2>) => any;
|
|
5697
|
+
}, {}, {}>;
|
|
5504
5698
|
|
|
5505
5699
|
declare interface TargetCellInfo_2 {
|
|
5506
5700
|
target: S2CellType_2;
|
|
@@ -5521,19 +5715,13 @@ declare interface TextCondition extends Condition<TextTheme> {
|
|
|
5521
5715
|
position?: IconPosition;
|
|
5522
5716
|
}
|
|
5523
5717
|
|
|
5524
|
-
declare interface TextTheme extends TextAlignStyle {
|
|
5525
|
-
/** 字体 */
|
|
5526
|
-
fontFamily?: string;
|
|
5718
|
+
declare interface TextTheme extends TextAlignStyle, Pick<TextStyleProps, 'fontFamily' | 'fontSize' | 'fontWeight' | 'fill' | 'opacity' | 'wordWrap' | 'maxLines' | 'lineHeight' | 'textOverflow' | 'fontStyle' | 'fontVariant'> {
|
|
5527
5719
|
/** 字体大小 */
|
|
5528
5720
|
fontSize?: number;
|
|
5529
|
-
/** 字体粗细 */
|
|
5530
|
-
fontWeight?: number | 'normal' | 'bold' | 'bolder' | 'lighter';
|
|
5531
5721
|
/** 字体颜色 */
|
|
5532
5722
|
fill?: string;
|
|
5533
5723
|
/** 链接文本颜色 */
|
|
5534
5724
|
linkTextFill?: string;
|
|
5535
|
-
/** 字体透明度 */
|
|
5536
|
-
opacity?: number;
|
|
5537
5725
|
}
|
|
5538
5726
|
|
|
5539
5727
|
declare interface ThemeCfg_2 {
|
|
@@ -5547,23 +5735,23 @@ declare interface ThemeCfg_2 {
|
|
|
5547
5735
|
|
|
5548
5736
|
declare type ThemeName = keyof typeof PALETTE_MAP;
|
|
5549
5737
|
|
|
5550
|
-
declare interface Tooltip<T = TooltipContentType_2,
|
|
5738
|
+
declare interface Tooltip<T = TooltipContentType_2, Menu = BaseTooltipOperatorMenuOptions_2> extends BaseTooltipConfig<T, Menu> {
|
|
5551
5739
|
/**
|
|
5552
5740
|
* Tooltip 行头单元格配置
|
|
5553
5741
|
*/
|
|
5554
|
-
rowCell?: BaseTooltipConfig<T,
|
|
5742
|
+
rowCell?: BaseTooltipConfig<T, Menu>;
|
|
5555
5743
|
/**
|
|
5556
5744
|
* Tooltip 列头单元格配置
|
|
5557
5745
|
*/
|
|
5558
|
-
colCell?: BaseTooltipConfig<T,
|
|
5746
|
+
colCell?: BaseTooltipConfig<T, Menu>;
|
|
5559
5747
|
/**
|
|
5560
5748
|
* Tooltip 角头单元格配置
|
|
5561
5749
|
*/
|
|
5562
|
-
cornerCell?: BaseTooltipConfig<T,
|
|
5750
|
+
cornerCell?: BaseTooltipConfig<T, Menu>;
|
|
5563
5751
|
/**
|
|
5564
5752
|
* Tooltip 数值单元格配置
|
|
5565
5753
|
*/
|
|
5566
|
-
dataCell?: BaseTooltipConfig<T,
|
|
5754
|
+
dataCell?: BaseTooltipConfig<T, Menu>;
|
|
5567
5755
|
}
|
|
5568
5756
|
|
|
5569
5757
|
declare type TooltipAutoAdjustBoundary = 'body' | 'container' | null | undefined;
|
|
@@ -5596,14 +5784,14 @@ declare type TooltipHeadInfo = {
|
|
|
5596
5784
|
cols: TooltipDetailListItem[];
|
|
5597
5785
|
};
|
|
5598
5786
|
|
|
5599
|
-
declare type TooltipInterpretationOptions = {
|
|
5787
|
+
declare type TooltipInterpretationOptions<T = TooltipContentType_2, Icon = Element | string, Text = string> = {
|
|
5600
5788
|
name: string;
|
|
5601
|
-
icon?:
|
|
5602
|
-
text?:
|
|
5603
|
-
|
|
5789
|
+
icon?: Icon;
|
|
5790
|
+
text?: Text;
|
|
5791
|
+
content?: T;
|
|
5604
5792
|
};
|
|
5605
5793
|
|
|
5606
|
-
declare interface TooltipOperation<
|
|
5794
|
+
declare interface TooltipOperation<Menu = BaseTooltipOperatorMenuOptions_2> extends TooltipOperatorOptions<Menu> {
|
|
5607
5795
|
/**
|
|
5608
5796
|
* 隐藏列 (叶子节点有效)
|
|
5609
5797
|
*/
|
|
@@ -5618,33 +5806,51 @@ declare interface TooltipOperation<Icon = Element | string, Text = string> exten
|
|
|
5618
5806
|
tableSort?: boolean;
|
|
5619
5807
|
}
|
|
5620
5808
|
|
|
5621
|
-
declare type TooltipOperatorClickHandler = (
|
|
5622
|
-
|
|
5809
|
+
declare type TooltipOperatorClickHandler = (info: TooltipOperatorMenuInfo, cell: S2CellType_2 | undefined | null) => void;
|
|
5810
|
+
|
|
5811
|
+
declare interface TooltipOperatorMenuInfo {
|
|
5812
|
+
key: string;
|
|
5623
5813
|
[key: string]: unknown;
|
|
5624
|
-
}
|
|
5814
|
+
}
|
|
5625
5815
|
|
|
5626
|
-
declare interface
|
|
5816
|
+
declare interface TooltipOperatorMenuItem<Icon, Text> {
|
|
5627
5817
|
/** 唯一标识 */
|
|
5628
5818
|
key: string;
|
|
5629
5819
|
/** 自定义 icon */
|
|
5630
5820
|
icon?: Icon;
|
|
5631
5821
|
/** 名称 */
|
|
5632
|
-
|
|
5822
|
+
label?: Text;
|
|
5633
5823
|
/** 点击回调 */
|
|
5634
|
-
onClick?:
|
|
5824
|
+
onClick?: TooltipOperatorClickHandler;
|
|
5635
5825
|
/** 是否显示 */
|
|
5636
5826
|
visible?: boolean | ((cell: S2CellType_2) => boolean);
|
|
5637
5827
|
/** 子菜单 */
|
|
5638
|
-
children?:
|
|
5828
|
+
children?: TooltipOperatorMenuItem<Icon, Text>[];
|
|
5639
5829
|
}
|
|
5640
5830
|
|
|
5641
|
-
declare interface
|
|
5831
|
+
declare interface TooltipOperatorMenuOptions<Icon, Text> {
|
|
5832
|
+
/**
|
|
5833
|
+
* 菜单内容
|
|
5834
|
+
*/
|
|
5835
|
+
items?: TooltipOperatorMenuItem<Icon, Text>[];
|
|
5836
|
+
/**
|
|
5837
|
+
* 菜单项点击
|
|
5838
|
+
*/
|
|
5642
5839
|
onClick?: TooltipOperatorClickHandler;
|
|
5643
|
-
|
|
5840
|
+
/**
|
|
5841
|
+
* 默认选中的菜单项 key
|
|
5842
|
+
*/
|
|
5644
5843
|
defaultSelectedKeys?: string[];
|
|
5645
5844
|
}
|
|
5646
5845
|
|
|
5647
|
-
declare interface
|
|
5846
|
+
declare interface TooltipOperatorOptions<Menu = BaseTooltipOperatorMenuOptions_2> {
|
|
5847
|
+
/**
|
|
5848
|
+
* 菜单项配置
|
|
5849
|
+
*/
|
|
5850
|
+
menu?: Menu;
|
|
5851
|
+
}
|
|
5852
|
+
|
|
5853
|
+
declare interface TooltipOptions<Menu = BaseTooltipOperatorMenuOptions_2> {
|
|
5648
5854
|
/**
|
|
5649
5855
|
* 是否隐藏汇总项
|
|
5650
5856
|
* @example "数量(总和) 999"
|
|
@@ -5653,7 +5859,7 @@ declare interface TooltipOptions<Icon = Element | string, Text = string> {
|
|
|
5653
5859
|
/**
|
|
5654
5860
|
* 顶部操作项
|
|
5655
5861
|
*/
|
|
5656
|
-
operator?: TooltipOperatorOptions<
|
|
5862
|
+
operator?: TooltipOperatorOptions<Menu>;
|
|
5657
5863
|
/**
|
|
5658
5864
|
* 是否是小计/总计
|
|
5659
5865
|
*/
|
|
@@ -5702,13 +5908,14 @@ declare interface TooltipPositionInfo {
|
|
|
5702
5908
|
event: FederatedPointerEvent | MouseEvent;
|
|
5703
5909
|
}
|
|
5704
5910
|
|
|
5705
|
-
declare type TooltipShowOptions<T = TooltipContentType_2,
|
|
5911
|
+
declare type TooltipShowOptions<T = TooltipContentType_2, Menu = BaseTooltipOperatorMenuOptions_2> = {
|
|
5706
5912
|
position: TooltipPosition;
|
|
5707
5913
|
data?: TooltipData;
|
|
5708
5914
|
cellInfos?: TooltipDataItem[];
|
|
5709
|
-
options?: TooltipOptions<
|
|
5710
|
-
content?: ((cell: S2CellType_2, defaultTooltipShowOptions: TooltipShowOptions<T,
|
|
5915
|
+
options?: TooltipOptions<Menu>;
|
|
5916
|
+
content?: ((cell: S2CellType_2, defaultTooltipShowOptions: TooltipShowOptions<T, Menu>) => T) | T;
|
|
5711
5917
|
event?: FederatedPointerEvent | MouseEvent;
|
|
5918
|
+
onMounted?: () => void;
|
|
5712
5919
|
};
|
|
5713
5920
|
|
|
5714
5921
|
declare interface TooltipSummaryOptions {
|
|
@@ -5721,33 +5928,53 @@ declare interface TooltipSummaryOptions {
|
|
|
5721
5928
|
declare type TooltipSummaryOptionsValue = number | string | undefined | null;
|
|
5722
5929
|
|
|
5723
5930
|
declare interface Total {
|
|
5724
|
-
/**
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5931
|
+
/**
|
|
5932
|
+
* 是否显示总计
|
|
5933
|
+
*/
|
|
5934
|
+
showGrandTotals?: boolean;
|
|
5935
|
+
/**
|
|
5936
|
+
*是否显示小计
|
|
5937
|
+
*/
|
|
5938
|
+
showSubTotals?: boolean | {
|
|
5728
5939
|
/** 当子维度个数 <=1 时,仍然展示小计:默认 true */
|
|
5729
5940
|
always: boolean;
|
|
5730
5941
|
};
|
|
5731
|
-
|
|
5942
|
+
/**
|
|
5943
|
+
* 自定义计算总计
|
|
5944
|
+
*/
|
|
5945
|
+
calcGrandTotals?: CalcTotals;
|
|
5946
|
+
/**
|
|
5947
|
+
* 自定义计算小计
|
|
5948
|
+
*/
|
|
5732
5949
|
calcSubTotals?: CalcTotals;
|
|
5733
|
-
/**
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5950
|
+
/**
|
|
5951
|
+
* 小计的汇总维度
|
|
5952
|
+
* @example subTotalsDimensions: ['province']
|
|
5953
|
+
*/
|
|
5954
|
+
subTotalsDimensions?: string[];
|
|
5955
|
+
/**
|
|
5956
|
+
* 总计布局位置,默认是下或右
|
|
5957
|
+
*/
|
|
5958
|
+
reverseGrandTotalsLayout?: boolean;
|
|
5959
|
+
/**
|
|
5960
|
+
* 小计布局位置,默认是下或右
|
|
5961
|
+
*/
|
|
5962
|
+
reverseSubTotalsLayout?: boolean;
|
|
5963
|
+
/**
|
|
5964
|
+
* 总计展示名
|
|
5965
|
+
* @default "总计"
|
|
5966
|
+
*/
|
|
5967
|
+
grandTotalsLabel?: string;
|
|
5968
|
+
/**
|
|
5969
|
+
* 小计展示名
|
|
5970
|
+
* @default "小计"
|
|
5971
|
+
*/
|
|
5972
|
+
subTotalsLabel?: string;
|
|
5741
5973
|
}
|
|
5742
5974
|
|
|
5743
|
-
/**
|
|
5744
|
-
* tableau的英文是这个,这里有个绕的概念
|
|
5745
|
-
* 如,某行维度需要展示小计,实际上是将对应的一列数据进行聚合,所以文案上显示的应该是“展示列小计”
|
|
5746
|
-
* 但是内部配置我倾向于仍然按照字段所属维度区,即配置的row,代表的是行维度而不是行小计
|
|
5747
|
-
*/
|
|
5748
5975
|
declare interface Totals {
|
|
5749
|
-
row?:
|
|
5750
|
-
col?:
|
|
5976
|
+
row?: Total;
|
|
5977
|
+
col?: Total;
|
|
5751
5978
|
}
|
|
5752
5979
|
|
|
5753
5980
|
declare type TotalSelection = {
|
|
@@ -5787,7 +6014,7 @@ declare interface ViewCellHeights {
|
|
|
5787
6014
|
};
|
|
5788
6015
|
}
|
|
5789
6016
|
|
|
5790
|
-
declare interface
|
|
6017
|
+
declare interface ViewMeta {
|
|
5791
6018
|
spreadsheet: SpreadSheet_2;
|
|
5792
6019
|
id: string;
|
|
5793
6020
|
x: number;
|
|
@@ -5815,7 +6042,7 @@ declare interface ViewMeta_2 {
|
|
|
5815
6042
|
|
|
5816
6043
|
declare type ViewMetaData_2 = Data | CellData;
|
|
5817
6044
|
|
|
5818
|
-
declare type ViewMetaIndexType = keyof Pick<
|
|
6045
|
+
declare type ViewMetaIndexType = keyof Pick<ViewMeta, 'colIndex' | 'rowIndex'>;
|
|
5819
6046
|
|
|
5820
6047
|
/**
|
|
5821
6048
|
* 移动端滚动事件
|