@canvas-components/pivot-table 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +92 -0
- package/dist/index.cjs +5205 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1186 -0
- package/dist/index.d.ts +1186 -0
- package/dist/index.js +5135 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1186 @@
|
|
|
1
|
+
export { getValueByDataIndex, isSameDataIndex, stringifyDataIndex } from '@canvas-components/utils';
|
|
2
|
+
|
|
3
|
+
/** PivotTable 支持的数据路径。 */
|
|
4
|
+
type PivotDataIndex = string | number | Array<string | number>;
|
|
5
|
+
/** PivotTable 可接受的维度原始值。 */
|
|
6
|
+
type PivotDimensionValue = unknown;
|
|
7
|
+
/** 单元格水平对齐方式。 */
|
|
8
|
+
type PivotTextAlign = "left" | "center" | "right";
|
|
9
|
+
/** 当前单元格选择时的高亮范围。 */
|
|
10
|
+
type PivotHighlightMode = "cell" | "row" | "column" | "cross";
|
|
11
|
+
|
|
12
|
+
/** 与 ListTable 一致的过滤候选项。 */
|
|
13
|
+
interface PivotDimensionFilterOption {
|
|
14
|
+
label: string;
|
|
15
|
+
value: string | number | null;
|
|
16
|
+
}
|
|
17
|
+
/** 与 ListTable 一致的表头文本内容。 */
|
|
18
|
+
interface PivotDimensionHeaderTextContent {
|
|
19
|
+
type: "text";
|
|
20
|
+
text: string;
|
|
21
|
+
color?: string;
|
|
22
|
+
fontSize?: number;
|
|
23
|
+
fontWeight?: string;
|
|
24
|
+
}
|
|
25
|
+
/** 与 ListTable 一致的表头图片内容。 */
|
|
26
|
+
interface PivotDimensionHeaderImageContent {
|
|
27
|
+
type: "img";
|
|
28
|
+
src: string;
|
|
29
|
+
alt?: string;
|
|
30
|
+
width?: number;
|
|
31
|
+
height?: number;
|
|
32
|
+
}
|
|
33
|
+
/** 与 ListTable 一致的表头内容。 */
|
|
34
|
+
type PivotDimensionHeaderContent = PivotDimensionHeaderTextContent | PivotDimensionHeaderImageContent;
|
|
35
|
+
/** 与 ListTable 一致的表头标题。 */
|
|
36
|
+
type PivotDimensionTitle = string | PivotDimensionHeaderContent | PivotDimensionHeaderContent[];
|
|
37
|
+
/** PivotTable 行轴或列轴维度定义。 */
|
|
38
|
+
interface PivotDimension<RecordType = Record<string, unknown>> {
|
|
39
|
+
/** 稳定维度标识;未传时与 ListTable 一样由 dataIndex 推导。 */
|
|
40
|
+
key?: string;
|
|
41
|
+
/** 展示标题。 */
|
|
42
|
+
title?: PivotDimensionTitle;
|
|
43
|
+
/** 维度值路径。 */
|
|
44
|
+
dataIndex: PivotDataIndex;
|
|
45
|
+
/** 维度表头宽度。 */
|
|
46
|
+
width?: number;
|
|
47
|
+
minWidth?: number;
|
|
48
|
+
maxWidth?: number;
|
|
49
|
+
/** 表头对齐方式。 */
|
|
50
|
+
align?: PivotTextAlign;
|
|
51
|
+
/** 是否允许运行时切换升序、降序和默认顺序。 */
|
|
52
|
+
allowSort?: boolean;
|
|
53
|
+
/** 与 ListTable 一致的排序值提取函数。 */
|
|
54
|
+
sortValueGetter?: (record: RecordType) => string | number | null | undefined;
|
|
55
|
+
defaultSortOrder?: "ascend" | "descend";
|
|
56
|
+
sortPriority?: number;
|
|
57
|
+
/** 是否允许表头过滤。 */
|
|
58
|
+
allowFilter?: boolean;
|
|
59
|
+
filterModes?: Array<"fuzzy" | "exact">;
|
|
60
|
+
/** 与 ListTable 一致的过滤值提取函数。 */
|
|
61
|
+
filterValueGetter?: (record: RecordType) => unknown;
|
|
62
|
+
/** 与 ListTable 一致的过滤候选值提取函数。 */
|
|
63
|
+
filterOptionValueGetter?: (record: RecordType) => unknown;
|
|
64
|
+
filterOptions?: Array<string | PivotDimensionFilterOption>;
|
|
65
|
+
/** 与 ListTable 一致的单元格渲染回调签名。 */
|
|
66
|
+
render?: (value: unknown, record: RecordType, rowIndex: number, column: any) => unknown;
|
|
67
|
+
/** 默认展开到该维度层级。 */
|
|
68
|
+
defaultExpandDepth?: number;
|
|
69
|
+
/** 业务扩展元数据。 */
|
|
70
|
+
meta?: Record<string, unknown>;
|
|
71
|
+
}
|
|
72
|
+
/** 已解析的维度成员。 */
|
|
73
|
+
interface ResolvedPivotDimensionValue {
|
|
74
|
+
rawValue: PivotDimensionValue;
|
|
75
|
+
normalizedValue: unknown;
|
|
76
|
+
sortValue: unknown;
|
|
77
|
+
filterValue: unknown;
|
|
78
|
+
filterOptionValue: unknown;
|
|
79
|
+
filterOptionKey: string;
|
|
80
|
+
valueKey: string;
|
|
81
|
+
label: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** 稀疏聚合结果单元格。 */
|
|
85
|
+
interface PivotAggregateCell {
|
|
86
|
+
key: string;
|
|
87
|
+
rowPathKey: string;
|
|
88
|
+
columnPathKey: string;
|
|
89
|
+
indicatorKey: string;
|
|
90
|
+
value: unknown;
|
|
91
|
+
formattedValue: string;
|
|
92
|
+
recordCount: number;
|
|
93
|
+
recordIndexes: number[];
|
|
94
|
+
}
|
|
95
|
+
/** 创建稳定的聚合单元格键。 */
|
|
96
|
+
declare function createPivotCellKey(rowPathKey: string, columnPathKey: string, indicatorKey: string): string;
|
|
97
|
+
|
|
98
|
+
/** PivotTable 滚动状态。 */
|
|
99
|
+
interface PivotScrollState {
|
|
100
|
+
left: number;
|
|
101
|
+
top: number;
|
|
102
|
+
}
|
|
103
|
+
/** PivotTable 单元格地址。 */
|
|
104
|
+
interface PivotCellAddress {
|
|
105
|
+
rowNodeId: string;
|
|
106
|
+
columnNodeId: string;
|
|
107
|
+
indicatorKey: string;
|
|
108
|
+
}
|
|
109
|
+
/** PivotTable 选区状态。 */
|
|
110
|
+
interface PivotSelectionState {
|
|
111
|
+
activeCell: PivotCellAddress | null;
|
|
112
|
+
anchorCell: PivotCellAddress | null;
|
|
113
|
+
ranges: PivotSelectionRange[];
|
|
114
|
+
activeNode?: {
|
|
115
|
+
axis: "row" | "column";
|
|
116
|
+
nodeId: string;
|
|
117
|
+
} | null;
|
|
118
|
+
}
|
|
119
|
+
/** PivotTable 矩形选区。 */
|
|
120
|
+
interface PivotSelectionRange {
|
|
121
|
+
start: PivotCellAddress;
|
|
122
|
+
end: PivotCellAddress;
|
|
123
|
+
/** 选区来源;行列选区的边框包含对应表头。 */
|
|
124
|
+
kind?: "cell" | "row" | "column" | "row-cell";
|
|
125
|
+
}
|
|
126
|
+
/** 条件过滤操作符。 */
|
|
127
|
+
type PivotFilterConditionOperator = "none" | "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "greaterThanOrEqual" | "lessThan" | "lessThanOrEqual" | "between" | "notBetween" | "notStartsWith" | "notEndsWith" | "blank" | "notBlank";
|
|
128
|
+
/** 单个条件过滤项。 */
|
|
129
|
+
interface PivotFilterCondition {
|
|
130
|
+
operator: PivotFilterConditionOperator;
|
|
131
|
+
value?: unknown;
|
|
132
|
+
secondValue?: unknown;
|
|
133
|
+
}
|
|
134
|
+
/** 维度过滤状态。 */
|
|
135
|
+
interface PivotDimensionFilter {
|
|
136
|
+
selectedKeys?: string[];
|
|
137
|
+
searchKeyword?: string;
|
|
138
|
+
searchExact?: boolean;
|
|
139
|
+
condition?: PivotFilterCondition;
|
|
140
|
+
secondCondition?: PivotFilterCondition;
|
|
141
|
+
conditionRelation?: "and" | "or";
|
|
142
|
+
}
|
|
143
|
+
/** 行轴、列轴和报告筛选字段的独立过滤状态。 */
|
|
144
|
+
interface PivotFilterState {
|
|
145
|
+
rows: Record<string, PivotDimensionFilter>;
|
|
146
|
+
columns: Record<string, PivotDimensionFilter>;
|
|
147
|
+
filters?: Record<string, PivotDimensionFilter>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** PivotTable 维度成员排序规则。 */
|
|
151
|
+
interface PivotSortRule {
|
|
152
|
+
axis: PivotAxis;
|
|
153
|
+
dimensionKey: string;
|
|
154
|
+
direction: "asc" | "desc";
|
|
155
|
+
by?: "raw" | "label" | "indicator";
|
|
156
|
+
indicatorKey?: string;
|
|
157
|
+
counterpartPathKey?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** 维度轴。 */
|
|
161
|
+
type PivotAxis = "row" | "column";
|
|
162
|
+
/** 可设置过滤条件的字段轴。 */
|
|
163
|
+
type PivotFilterAxis = PivotAxis | "filter";
|
|
164
|
+
/** PivotTable 选择变化事件。 */
|
|
165
|
+
interface PivotSelectionChangeEvent {
|
|
166
|
+
activeCell: PivotCellAddress | null;
|
|
167
|
+
activeNode?: {
|
|
168
|
+
axis: PivotAxis;
|
|
169
|
+
nodeId: string;
|
|
170
|
+
} | null;
|
|
171
|
+
/** 变化后的完整选区,可用于同步受控选区。 */
|
|
172
|
+
selection: PivotSelectionState;
|
|
173
|
+
}
|
|
174
|
+
/** PivotTable 展开状态变化事件。 */
|
|
175
|
+
interface PivotExpansionChangeEvent {
|
|
176
|
+
axis: PivotAxis;
|
|
177
|
+
nodeId: string;
|
|
178
|
+
expanded: boolean;
|
|
179
|
+
}
|
|
180
|
+
/** PivotTable 过滤状态变化事件。 */
|
|
181
|
+
interface PivotFilterChangeEvent {
|
|
182
|
+
axis: PivotFilterAxis;
|
|
183
|
+
dimensionKey: string;
|
|
184
|
+
filter: PivotDimensionFilter | null;
|
|
185
|
+
}
|
|
186
|
+
/** PivotTable 排序状态变化事件。 */
|
|
187
|
+
interface PivotSortChangeEvent {
|
|
188
|
+
sorts: PivotSortRule[];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** PivotTable 维度树节点类型。 */
|
|
192
|
+
type PivotNodeKind = "root" | "dimension" | "subtotal" | "grandTotal" | "indicator";
|
|
193
|
+
/** PivotTable 行轴或列轴节点。 */
|
|
194
|
+
interface PivotNode {
|
|
195
|
+
id: string;
|
|
196
|
+
axis: PivotAxis;
|
|
197
|
+
kind: PivotNodeKind;
|
|
198
|
+
dimensionKey: string | null;
|
|
199
|
+
dimensionValueKey: string | null;
|
|
200
|
+
rawValue: unknown;
|
|
201
|
+
sortValue: unknown;
|
|
202
|
+
label: string;
|
|
203
|
+
depth: number;
|
|
204
|
+
parentId: string | null;
|
|
205
|
+
pathKey: string;
|
|
206
|
+
indicatorKey?: string;
|
|
207
|
+
children: PivotNode[];
|
|
208
|
+
leafCount: number;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** 一条记录解析后的维度路径。 */
|
|
212
|
+
interface PivotResolvedPath {
|
|
213
|
+
key: string;
|
|
214
|
+
values: ResolvedPivotDimensionValue[];
|
|
215
|
+
}
|
|
216
|
+
/** 第一版 PivotTable 稀疏数据模型。 */
|
|
217
|
+
interface PivotModel<RecordType> {
|
|
218
|
+
records: RecordType[];
|
|
219
|
+
rowPaths: Map<string, PivotResolvedPath>;
|
|
220
|
+
columnPaths: Map<string, PivotResolvedPath>;
|
|
221
|
+
cells: Map<string, PivotAggregateCell>;
|
|
222
|
+
rowTree: PivotNode;
|
|
223
|
+
columnTree: PivotNode;
|
|
224
|
+
rowNodes: Map<string, PivotNode>;
|
|
225
|
+
columnNodes: Map<string, PivotNode>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/** 聚合器执行上下文。 */
|
|
229
|
+
interface PivotAggregatorContext<RecordType> {
|
|
230
|
+
record: RecordType;
|
|
231
|
+
recordIndex: number;
|
|
232
|
+
indicatorKey: string;
|
|
233
|
+
}
|
|
234
|
+
/** 可扩展 PivotTable 聚合器。 */
|
|
235
|
+
interface PivotAggregator<State = unknown, Result = unknown, RecordType = Record<string, unknown>> {
|
|
236
|
+
create: () => State;
|
|
237
|
+
add: (state: State, value: unknown, context: PivotAggregatorContext<RecordType>) => State | void;
|
|
238
|
+
remove?: (state: State, value: unknown, context: PivotAggregatorContext<RecordType>) => State | void;
|
|
239
|
+
merge?: (state: State, source: State) => State | void;
|
|
240
|
+
finalize: (state: State) => Result;
|
|
241
|
+
}
|
|
242
|
+
/** 聚合器注册表。 */
|
|
243
|
+
type PivotAggregatorRegistry<RecordType = Record<string, unknown>> = Record<string, PivotAggregator<any, any, RecordType>>;
|
|
244
|
+
/** 第一阶段内置聚合器名称。 */
|
|
245
|
+
type BuiltInPivotAggregatorName = "sum" | "avg" | "count" | "distinctCount" | "min" | "max";
|
|
246
|
+
|
|
247
|
+
/** 指标格式化上下文。 */
|
|
248
|
+
interface PivotIndicatorFormatContext<RecordType> {
|
|
249
|
+
indicator: PivotIndicator<RecordType>;
|
|
250
|
+
recordCount: number;
|
|
251
|
+
rowPathKey: string;
|
|
252
|
+
columnPathKey: string;
|
|
253
|
+
}
|
|
254
|
+
/** PivotTable 指标定义。 */
|
|
255
|
+
interface PivotIndicator<RecordType = Record<string, unknown>> {
|
|
256
|
+
/** 稳定指标标识。 */
|
|
257
|
+
key: string;
|
|
258
|
+
/** 指标标题。 */
|
|
259
|
+
title?: string;
|
|
260
|
+
/** 指标值路径;count 指标允许省略。 */
|
|
261
|
+
dataIndex?: PivotDataIndex;
|
|
262
|
+
/** 自定义指标值提取。 */
|
|
263
|
+
valueGetter?: (record: RecordType, recordIndex: number) => unknown;
|
|
264
|
+
/** 聚合器名称或内联聚合器。 */
|
|
265
|
+
aggregator?: BuiltInPivotAggregatorName | string | PivotAggregator<any, any, RecordType>;
|
|
266
|
+
/** 聚合结果格式化。 */
|
|
267
|
+
formatter?: (value: unknown, context: PivotIndicatorFormatContext<RecordType>) => string;
|
|
268
|
+
/** 数字精度。 */
|
|
269
|
+
precision?: number;
|
|
270
|
+
/** 指标列宽。 */
|
|
271
|
+
width?: number;
|
|
272
|
+
/** 指标对齐方式。 */
|
|
273
|
+
align?: PivotTextAlign;
|
|
274
|
+
/** 第一阶段单元格类型。 */
|
|
275
|
+
cellType?: "text" | "number" | "money" | "percent" | "progress" | "chart";
|
|
276
|
+
/** 业务扩展元数据。 */
|
|
277
|
+
meta?: Record<string, unknown>;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/** PivotTable 单元格样式。 */
|
|
281
|
+
interface PivotCellStyle {
|
|
282
|
+
backgroundColor?: string;
|
|
283
|
+
color?: string;
|
|
284
|
+
fontSize?: number;
|
|
285
|
+
fontWeight?: string;
|
|
286
|
+
textAlign?: CanvasTextAlign;
|
|
287
|
+
paddingInline?: number;
|
|
288
|
+
paddingBlock?: number;
|
|
289
|
+
borderColor?: string;
|
|
290
|
+
borderWidth?: number;
|
|
291
|
+
}
|
|
292
|
+
/** PivotTable 主题。 */
|
|
293
|
+
interface PivotTableTheme {
|
|
294
|
+
backgroundColor: string;
|
|
295
|
+
borderColor: string;
|
|
296
|
+
textColor: string;
|
|
297
|
+
mutedTextColor: string;
|
|
298
|
+
rowHeaderBackgroundColor: string;
|
|
299
|
+
columnHeaderBackgroundColor: string;
|
|
300
|
+
cornerBackgroundColor: string;
|
|
301
|
+
subtotalBackgroundColor: string;
|
|
302
|
+
grandTotalBackgroundColor: string;
|
|
303
|
+
hoverBackgroundColor: string;
|
|
304
|
+
selectionBackgroundColor: string;
|
|
305
|
+
selectionBorderColor: string;
|
|
306
|
+
fontFamily: string;
|
|
307
|
+
fontSize: number;
|
|
308
|
+
}
|
|
309
|
+
/** 默认 PivotTable 主题。 */
|
|
310
|
+
declare const defaultPivotTableTheme: PivotTableTheme;
|
|
311
|
+
|
|
312
|
+
/** 小计位置。 */
|
|
313
|
+
type PivotSubtotalPosition = "before" | "after";
|
|
314
|
+
/** 总计位置。 */
|
|
315
|
+
type PivotGrandTotalPosition = "start" | "end";
|
|
316
|
+
/** PivotTable 小计和总计配置。 */
|
|
317
|
+
interface PivotTotalsOptions {
|
|
318
|
+
showRowSubtotals?: boolean;
|
|
319
|
+
showColumnSubtotals?: boolean;
|
|
320
|
+
showRowGrandTotal?: boolean;
|
|
321
|
+
showColumnGrandTotal?: boolean;
|
|
322
|
+
rowSubtotalPosition?: PivotSubtotalPosition;
|
|
323
|
+
columnSubtotalPosition?: PivotSubtotalPosition;
|
|
324
|
+
rowGrandTotalPosition?: PivotGrandTotalPosition;
|
|
325
|
+
columnGrandTotalPosition?: PivotGrandTotalPosition;
|
|
326
|
+
subtotalLabel?: string | ((dimensionKey: string, label: string) => string);
|
|
327
|
+
grandTotalLabel?: string;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** 过滤面板候选项。 */
|
|
331
|
+
interface PivotFilterOptionItem {
|
|
332
|
+
label: string;
|
|
333
|
+
value: string;
|
|
334
|
+
count: number;
|
|
335
|
+
kind: "value" | "blank" | "notBlank" | "all";
|
|
336
|
+
}
|
|
337
|
+
/** PivotTable 维度过滤面板请求。 */
|
|
338
|
+
interface PivotDimensionFilterPanelRequest {
|
|
339
|
+
axis: PivotFilterAxis;
|
|
340
|
+
dimensionKey: string;
|
|
341
|
+
title: string;
|
|
342
|
+
x: number;
|
|
343
|
+
y: number;
|
|
344
|
+
width: number;
|
|
345
|
+
options: PivotFilterOptionItem[];
|
|
346
|
+
value: PivotDimensionFilter;
|
|
347
|
+
loading?: boolean;
|
|
348
|
+
filterOptionImmediateApply?: boolean;
|
|
349
|
+
onApply: (value: PivotDimensionFilter) => void;
|
|
350
|
+
onApplyCondition: (params: {
|
|
351
|
+
condition: PivotFilterCondition;
|
|
352
|
+
secondCondition?: PivotFilterCondition;
|
|
353
|
+
relation?: "and" | "or";
|
|
354
|
+
}) => void;
|
|
355
|
+
onReset: () => void;
|
|
356
|
+
onCancel: () => void;
|
|
357
|
+
}
|
|
358
|
+
/** PivotTable tooltip 请求。 */
|
|
359
|
+
interface PivotTooltipRequest {
|
|
360
|
+
x: number;
|
|
361
|
+
y: number;
|
|
362
|
+
text: string;
|
|
363
|
+
onClose: () => void;
|
|
364
|
+
}
|
|
365
|
+
/** PivotTable loading 请求。 */
|
|
366
|
+
interface PivotLoadingRequest {
|
|
367
|
+
text?: string;
|
|
368
|
+
}
|
|
369
|
+
/** PivotTable 值区右键菜单请求。 */
|
|
370
|
+
interface PivotContextMenuRequest {
|
|
371
|
+
x: number;
|
|
372
|
+
y: number;
|
|
373
|
+
recordCount: number;
|
|
374
|
+
onCopy: () => void;
|
|
375
|
+
onCopySelection?: () => void;
|
|
376
|
+
customSelection?: {
|
|
377
|
+
startRow: number;
|
|
378
|
+
startColumn: number;
|
|
379
|
+
endRow: number;
|
|
380
|
+
endColumn: number;
|
|
381
|
+
rowCount: number;
|
|
382
|
+
columnCount: number;
|
|
383
|
+
};
|
|
384
|
+
onCopyCustomSelection?: (range: {
|
|
385
|
+
startRow: number;
|
|
386
|
+
startColumn: number;
|
|
387
|
+
endRow: number;
|
|
388
|
+
endColumn: number;
|
|
389
|
+
}) => void;
|
|
390
|
+
onExportCsv: () => void;
|
|
391
|
+
onExportXlsx: () => void;
|
|
392
|
+
onClose: () => void;
|
|
393
|
+
}
|
|
394
|
+
/** PivotTable UI 适配协议。 */
|
|
395
|
+
interface PivotTableUiOptions {
|
|
396
|
+
onFilterPanelRequest?: (request: PivotDimensionFilterPanelRequest | null) => void;
|
|
397
|
+
onTooltipRequest?: (request: PivotTooltipRequest | null) => void;
|
|
398
|
+
onLoadingRequest?: (request: PivotLoadingRequest | null) => void;
|
|
399
|
+
onContextMenuRequest?: (request: PivotContextMenuRequest | null) => void;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/** PivotTable 构造配置。 */
|
|
403
|
+
interface PivotTableOptions<RecordType = Record<string, unknown>> {
|
|
404
|
+
dataSource: RecordType[];
|
|
405
|
+
rows: PivotDimension<RecordType>[];
|
|
406
|
+
columns: PivotDimension<RecordType>[];
|
|
407
|
+
/** 不参与行列分组、仅在聚合前过滤原始记录的报告筛选字段。 */
|
|
408
|
+
filterDimensions?: PivotDimension<RecordType>[];
|
|
409
|
+
indicators: PivotIndicator<RecordType>[];
|
|
410
|
+
aggregators?: PivotAggregatorRegistry<RecordType>;
|
|
411
|
+
totals?: PivotTotalsOptions;
|
|
412
|
+
dataVersion?: string | number;
|
|
413
|
+
defaultExpandedRowKeys?: string[];
|
|
414
|
+
defaultExpandedColumnKeys?: string[];
|
|
415
|
+
expandedRowKeys?: string[];
|
|
416
|
+
expandedColumnKeys?: string[];
|
|
417
|
+
indicatorLayout?: "columns" | "rows";
|
|
418
|
+
width?: number | string;
|
|
419
|
+
height?: number | string;
|
|
420
|
+
rowHeight?: number;
|
|
421
|
+
columnWidth?: number;
|
|
422
|
+
/**
|
|
423
|
+
* 点击单元格后的高亮模式。
|
|
424
|
+
* - `cell`: 仅高亮当前单元格
|
|
425
|
+
* - `row`: 仅高亮当前行(默认)
|
|
426
|
+
* - `column`: 仅高亮当前列
|
|
427
|
+
* - `cross`: 同时高亮当前行与列
|
|
428
|
+
*/
|
|
429
|
+
highlightMode?: PivotHighlightMode;
|
|
430
|
+
overscanRowCount?: number;
|
|
431
|
+
overscanColumnCount?: number;
|
|
432
|
+
filterOptionImmediateApply?: boolean;
|
|
433
|
+
filters?: PivotFilterState;
|
|
434
|
+
defaultFilters?: PivotFilterState;
|
|
435
|
+
sorts?: PivotSortRule[];
|
|
436
|
+
defaultSorts?: PivotSortRule[];
|
|
437
|
+
selection?: PivotSelectionState;
|
|
438
|
+
theme?: Partial<PivotTableTheme>;
|
|
439
|
+
readonly?: boolean;
|
|
440
|
+
emptyText?: string;
|
|
441
|
+
loading?: boolean;
|
|
442
|
+
loadingText?: string;
|
|
443
|
+
errorText?: string;
|
|
444
|
+
debug?: boolean;
|
|
445
|
+
ui?: PivotTableUiOptions;
|
|
446
|
+
onSelectionChange?: (event: PivotSelectionChangeEvent) => void;
|
|
447
|
+
onExpansionChange?: (event: PivotExpansionChangeEvent) => void;
|
|
448
|
+
onFilterChange?: (event: PivotFilterChangeEvent) => void;
|
|
449
|
+
onSortChange?: (event: PivotSortChangeEvent) => void;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/** PivotTable 滚动条矩形。 */
|
|
453
|
+
interface PivotScrollbarRect {
|
|
454
|
+
x: number;
|
|
455
|
+
y: number;
|
|
456
|
+
width: number;
|
|
457
|
+
height: number;
|
|
458
|
+
}
|
|
459
|
+
/** PivotTable 单轴滚动条布局。 */
|
|
460
|
+
interface PivotAxisScrollbarLayout {
|
|
461
|
+
decreaseButton: PivotScrollbarRect;
|
|
462
|
+
increaseButton: PivotScrollbarRect;
|
|
463
|
+
track: PivotScrollbarRect;
|
|
464
|
+
thumb: PivotScrollbarRect;
|
|
465
|
+
}
|
|
466
|
+
/** PivotTable 双轴滚动条布局。 */
|
|
467
|
+
interface PivotScrollbarLayout {
|
|
468
|
+
horizontal?: PivotAxisScrollbarLayout;
|
|
469
|
+
vertical?: PivotAxisScrollbarLayout;
|
|
470
|
+
}
|
|
471
|
+
type PivotScrollbarAxis = "horizontal" | "vertical";
|
|
472
|
+
type PivotScrollbarRole = "decrease-button" | "increase-button" | "track" | "thumb";
|
|
473
|
+
|
|
474
|
+
/** 布局矩形。 */
|
|
475
|
+
interface PivotRect {
|
|
476
|
+
x: number;
|
|
477
|
+
y: number;
|
|
478
|
+
width: number;
|
|
479
|
+
height: number;
|
|
480
|
+
}
|
|
481
|
+
/** 当前轴上的一个可见值槽位。 */
|
|
482
|
+
interface PivotAxisSlot {
|
|
483
|
+
key: string;
|
|
484
|
+
nodeId: string | null;
|
|
485
|
+
pathKey: string;
|
|
486
|
+
indicatorKey: string | null;
|
|
487
|
+
kind: PivotNodeKind | "empty";
|
|
488
|
+
}
|
|
489
|
+
/** 行表头或列表头布局单元。 */
|
|
490
|
+
interface PivotHeaderCellLayout {
|
|
491
|
+
axis: "row" | "column";
|
|
492
|
+
/** 字段标题单元格直接关联的维度键。 */
|
|
493
|
+
dimensionKey?: string | null;
|
|
494
|
+
nodeId: string | null;
|
|
495
|
+
pathKey: string;
|
|
496
|
+
indicatorKey: string | null;
|
|
497
|
+
kind: PivotNodeKind | "empty";
|
|
498
|
+
label: string;
|
|
499
|
+
align?: PivotTextAlign;
|
|
500
|
+
level: number;
|
|
501
|
+
rowSpan: number;
|
|
502
|
+
columnSpan: number;
|
|
503
|
+
expandable: boolean;
|
|
504
|
+
expanded: boolean;
|
|
505
|
+
filterable: boolean;
|
|
506
|
+
filterActive: boolean;
|
|
507
|
+
sortable: boolean;
|
|
508
|
+
sortDirection: "asc" | "desc" | null;
|
|
509
|
+
rect: PivotRect;
|
|
510
|
+
}
|
|
511
|
+
/** 表格顶部的报告筛选字段布局。 */
|
|
512
|
+
interface PivotReportFilterCellLayout {
|
|
513
|
+
dimensionKey: string;
|
|
514
|
+
label: string;
|
|
515
|
+
valueLabel: string;
|
|
516
|
+
active: boolean;
|
|
517
|
+
rect: PivotRect;
|
|
518
|
+
labelRect: PivotRect;
|
|
519
|
+
valueRect: PivotRect;
|
|
520
|
+
}
|
|
521
|
+
/** 指标值单元格布局。 */
|
|
522
|
+
interface PivotBodyCellLayout {
|
|
523
|
+
rowIndex: number;
|
|
524
|
+
columnIndex: number;
|
|
525
|
+
rowNodeId: string | null;
|
|
526
|
+
columnNodeId: string | null;
|
|
527
|
+
rowPathKey: string;
|
|
528
|
+
columnPathKey: string;
|
|
529
|
+
indicatorKey: string;
|
|
530
|
+
value: unknown;
|
|
531
|
+
formattedValue: string;
|
|
532
|
+
rect: PivotRect;
|
|
533
|
+
}
|
|
534
|
+
/** PivotTable 布局快照。 */
|
|
535
|
+
interface PivotLayoutSnapshot {
|
|
536
|
+
width: number;
|
|
537
|
+
/** 当前可见表格的实际宽度;内容不足容器时不延伸到空白区域。 */
|
|
538
|
+
tableWidth: number;
|
|
539
|
+
height: number;
|
|
540
|
+
recordCount: number;
|
|
541
|
+
rowHeight: number;
|
|
542
|
+
columnWidth: number;
|
|
543
|
+
columnWidths: number[];
|
|
544
|
+
columnOffsets: number[];
|
|
545
|
+
rowHeaderWidth: number;
|
|
546
|
+
rowDimensionWidths: number[];
|
|
547
|
+
reportFilterHeight: number;
|
|
548
|
+
columnHeaderHeight: number;
|
|
549
|
+
reportFilterRect: PivotRect;
|
|
550
|
+
cornerRect: PivotRect;
|
|
551
|
+
rowHeaderRect: PivotRect;
|
|
552
|
+
columnHeaderRect: PivotRect;
|
|
553
|
+
bodyRect: PivotRect;
|
|
554
|
+
rowSlots: PivotAxisSlot[];
|
|
555
|
+
columnSlots: PivotAxisSlot[];
|
|
556
|
+
visibleRowRange: {
|
|
557
|
+
start: number;
|
|
558
|
+
end: number;
|
|
559
|
+
};
|
|
560
|
+
visibleColumnRange: {
|
|
561
|
+
start: number;
|
|
562
|
+
end: number;
|
|
563
|
+
};
|
|
564
|
+
reportFilterCells: PivotReportFilterCellLayout[];
|
|
565
|
+
rowFieldHeaderCells: PivotHeaderCellLayout[];
|
|
566
|
+
rowHeaderCells: PivotHeaderCellLayout[];
|
|
567
|
+
columnHeaderCells: PivotHeaderCellLayout[];
|
|
568
|
+
bodyCells: PivotBodyCellLayout[];
|
|
569
|
+
scroll: {
|
|
570
|
+
left: number;
|
|
571
|
+
top: number;
|
|
572
|
+
};
|
|
573
|
+
viewport: {
|
|
574
|
+
maxScrollLeft: number;
|
|
575
|
+
maxScrollTop: number;
|
|
576
|
+
totalBodyWidth: number;
|
|
577
|
+
totalBodyHeight: number;
|
|
578
|
+
};
|
|
579
|
+
scrollbar: PivotScrollbarLayout;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/** PivotTable 可持久化状态快照。 */
|
|
583
|
+
interface PivotTableStateSnapshot {
|
|
584
|
+
version: 1;
|
|
585
|
+
expandedRowNodeIds: string[];
|
|
586
|
+
expandedColumnNodeIds: string[];
|
|
587
|
+
filters: PivotFilterState;
|
|
588
|
+
sorts: PivotSortRule[];
|
|
589
|
+
selection: PivotSelectionState;
|
|
590
|
+
scroll: PivotScrollState;
|
|
591
|
+
rowDimensionWidths: Record<string, number>;
|
|
592
|
+
columnWidths: Record<string, number>;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/** PivotTable 纯原生核心协调器。 */
|
|
596
|
+
declare class PivotTableCore<RecordType> {
|
|
597
|
+
private options;
|
|
598
|
+
private model;
|
|
599
|
+
private readonly modelCache;
|
|
600
|
+
private expandedRowNodeIds;
|
|
601
|
+
private expandedColumnNodeIds;
|
|
602
|
+
private expansionVersion;
|
|
603
|
+
private layoutCache;
|
|
604
|
+
private selection;
|
|
605
|
+
private filters;
|
|
606
|
+
private sorts;
|
|
607
|
+
private rowDimensionWidths;
|
|
608
|
+
private columnWidths;
|
|
609
|
+
private visibleNodeCache;
|
|
610
|
+
constructor(options: PivotTableOptions<RecordType>);
|
|
611
|
+
/** 更新配置并重建当前数据模型。 */
|
|
612
|
+
updateOptions(options: PivotTableOptions<RecordType>): void;
|
|
613
|
+
/** 获取当前只读 PivotModel。 */
|
|
614
|
+
getPivotModel(): PivotModel<RecordType> | null;
|
|
615
|
+
/** 获取当前展开状态下的行轴可见叶节点。 */
|
|
616
|
+
getVisibleRowNodes(): PivotNode[];
|
|
617
|
+
/** 获取当前展开状态下的列轴可见叶节点。 */
|
|
618
|
+
getVisibleColumnNodes(): PivotNode[];
|
|
619
|
+
/** 获取可复用的当前布局快照。 */
|
|
620
|
+
getLayoutSnapshot(params: {
|
|
621
|
+
width: number;
|
|
622
|
+
height: number;
|
|
623
|
+
scrollLeft: number;
|
|
624
|
+
scrollTop: number;
|
|
625
|
+
}): PivotLayoutSnapshot | null;
|
|
626
|
+
/** 获取当前值区选区。 */
|
|
627
|
+
getSelection(): PivotSelectionState;
|
|
628
|
+
/** 设置完整选区状态。 */
|
|
629
|
+
setSelection(selection: PivotSelectionState): PivotSelectionState;
|
|
630
|
+
/** 设置当前活动单元格,并可从锚点扩展为矩形选区。 */
|
|
631
|
+
selectCell(address: PivotCellAddress, extend?: boolean): PivotSelectionState;
|
|
632
|
+
/** 选中稳定的行轴或列轴维度节点。 */
|
|
633
|
+
selectNode(axis: PivotAxis, nodeId: string): PivotSelectionState | null;
|
|
634
|
+
/** 判断节点当前是否展开。 */
|
|
635
|
+
isNodeExpanded(axis: PivotAxis, nodeId: string): boolean;
|
|
636
|
+
/** 获取当前双轴过滤状态。 */
|
|
637
|
+
getFilters(): PivotFilterState;
|
|
638
|
+
/** 获取当前运行时排序规则。 */
|
|
639
|
+
getSorts(): PivotSortRule[];
|
|
640
|
+
/** 设置维度排序;null 表示恢复维度默认排序。 */
|
|
641
|
+
setDimensionSort(axis: PivotAxis, dimensionKey: string, direction: PivotSortRule["direction"] | null): PivotSortRule[];
|
|
642
|
+
/** 按指定指标聚合结果设置维度排序。 */
|
|
643
|
+
setIndicatorSort(params: {
|
|
644
|
+
axis: PivotAxis;
|
|
645
|
+
dimensionKey: string;
|
|
646
|
+
indicatorKey: string;
|
|
647
|
+
direction: PivotSortRule["direction"] | null;
|
|
648
|
+
counterpartPathKey?: string;
|
|
649
|
+
}): PivotSortRule[];
|
|
650
|
+
/** 将全部运行时排序规则恢复为列级默认排序。 */
|
|
651
|
+
resetSorts(): PivotSortRule[];
|
|
652
|
+
/** 设置行维度表头宽度,不失效聚合模型。 */
|
|
653
|
+
setRowDimensionWidth(dimensionKey: string, width: number): void;
|
|
654
|
+
/** 设置指定值列宽度,不失效聚合模型。 */
|
|
655
|
+
setColumnWidth(columnKey: string, width: number): void;
|
|
656
|
+
/** 获取当前布局宽度覆盖。 */
|
|
657
|
+
getRuntimeWidths(): {
|
|
658
|
+
rowDimensionWidths: {
|
|
659
|
+
[k: string]: number;
|
|
660
|
+
};
|
|
661
|
+
columnWidths: {
|
|
662
|
+
[k: string]: number;
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
/** 获取模型、可见树、布局和缓存调试快照。 */
|
|
666
|
+
getDebugSnapshot(): {
|
|
667
|
+
buildDurationMs: number;
|
|
668
|
+
buildCount: number;
|
|
669
|
+
records: number;
|
|
670
|
+
rowNodeCount: number;
|
|
671
|
+
columnNodeCount: number;
|
|
672
|
+
aggregateCellCount: number;
|
|
673
|
+
visibleRowCount: number;
|
|
674
|
+
visibleColumnCount: number;
|
|
675
|
+
renderedBodyCellCount: number;
|
|
676
|
+
};
|
|
677
|
+
/** 设置指定维度过滤,非受控模式下立即重建聚合模型。 */
|
|
678
|
+
setDimensionFilter(axis: PivotFilterAxis, dimensionKey: string, filter: PivotDimensionFilter | null): {
|
|
679
|
+
rows: Record<string, PivotDimensionFilter>;
|
|
680
|
+
columns: Record<string, PivotDimensionFilter>;
|
|
681
|
+
filters?: Record<string, PivotDimensionFilter>;
|
|
682
|
+
};
|
|
683
|
+
/** 清除行轴、列轴和报告字段的全部过滤条件。 */
|
|
684
|
+
resetFilters(): PivotFilterState;
|
|
685
|
+
/** 获取排除当前维度自身条件后的过滤候选项。 */
|
|
686
|
+
getDimensionFilterOptions(axis: PivotFilterAxis, dimensionKey: string): PivotFilterOptionItem[];
|
|
687
|
+
/** 创建与当前展开状态一致的导出矩阵。 */
|
|
688
|
+
createExportMatrix(mode?: "visible" | "all"): PivotExportMatrix | null;
|
|
689
|
+
/** 获取稳定地址对应的聚合值。 */
|
|
690
|
+
getCellValue(address: PivotCellAddress): unknown;
|
|
691
|
+
/** 创建不含 DOM 滚动位置的核心状态快照。 */
|
|
692
|
+
createStateSnapshot(scroll: PivotTableStateSnapshot["scroll"]): PivotTableStateSnapshot;
|
|
693
|
+
/** 恢复未受控的核心状态,未知版本安全忽略。 */
|
|
694
|
+
restoreStateSnapshot(snapshot: PivotTableStateSnapshot): boolean;
|
|
695
|
+
/** 设置维度节点展开状态。 */
|
|
696
|
+
setNodeExpanded(axis: PivotAxis, nodeId: string, expanded: boolean): boolean;
|
|
697
|
+
/** 展开或收起指定轴全部可展开节点。 */
|
|
698
|
+
setAllNodesExpanded(axis: PivotAxis, expanded: boolean): number;
|
|
699
|
+
/** 获取指定聚合单元格参与计算的原始记录。 */
|
|
700
|
+
getCellRecords(params: {
|
|
701
|
+
rowPathKey: string;
|
|
702
|
+
columnPathKey: string;
|
|
703
|
+
indicatorKey: string;
|
|
704
|
+
}): RecordType[];
|
|
705
|
+
/** 释放当前模型引用。 */
|
|
706
|
+
destroy(): void;
|
|
707
|
+
private getEffectiveOptions;
|
|
708
|
+
private createLayoutOptions;
|
|
709
|
+
private resolveVisibleNodeCache;
|
|
710
|
+
private normalizeSelectionToVisibleNodes;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/** 单次 Canvas 绘制统计。 */
|
|
714
|
+
interface PivotRenderStats {
|
|
715
|
+
headerCellCount: number;
|
|
716
|
+
bodyCellCount: number;
|
|
717
|
+
}
|
|
718
|
+
/** 绘制 PivotTable 四区内容。 */
|
|
719
|
+
declare function renderPivotTable<RecordType>(params: {
|
|
720
|
+
context: CanvasRenderingContext2D;
|
|
721
|
+
layout: PivotLayoutSnapshot;
|
|
722
|
+
options: PivotTableOptions<RecordType>;
|
|
723
|
+
activeCell?: PivotCellAddress | null;
|
|
724
|
+
hoverCell?: PivotCellAddress | null;
|
|
725
|
+
selection?: PivotSelectionState | null;
|
|
726
|
+
resizeGuideX?: number | null;
|
|
727
|
+
}): PivotRenderStats;
|
|
728
|
+
|
|
729
|
+
/** PivotTable 导出矩阵。 */
|
|
730
|
+
interface PivotExportMatrix {
|
|
731
|
+
values: string[][];
|
|
732
|
+
headerRowCount: number;
|
|
733
|
+
rowHeaderColumnCount: number;
|
|
734
|
+
merges: Array<{
|
|
735
|
+
startRow: number;
|
|
736
|
+
endRow: number;
|
|
737
|
+
startColumn: number;
|
|
738
|
+
endColumn: number;
|
|
739
|
+
}>;
|
|
740
|
+
}
|
|
741
|
+
/** PivotTable 导出范围。 */
|
|
742
|
+
interface PivotExportOptions {
|
|
743
|
+
mode?: "visible" | "all";
|
|
744
|
+
sheetName?: string;
|
|
745
|
+
}
|
|
746
|
+
/** 根据当前展开节点创建统一导出矩阵。 */
|
|
747
|
+
declare function createPivotExportMatrix<RecordType>(params: {
|
|
748
|
+
model: PivotModel<RecordType>;
|
|
749
|
+
options: PivotTableOptions<RecordType>;
|
|
750
|
+
visibleRowNodes: PivotNode[];
|
|
751
|
+
visibleColumnNodes: PivotNode[];
|
|
752
|
+
}): PivotExportMatrix;
|
|
753
|
+
/** 将导出矩阵序列化为 CSV。 */
|
|
754
|
+
declare function exportPivotMatrixToCsv(matrix: PivotExportMatrix): string;
|
|
755
|
+
/** 将导出矩阵序列化为 XLSX 字节。 */
|
|
756
|
+
declare function exportPivotMatrixToXlsx(matrix: PivotExportMatrix, sheetName?: string): Uint8Array;
|
|
757
|
+
|
|
758
|
+
/** PivotTable 原生实例入口。 */
|
|
759
|
+
declare class PivotTable<RecordType = Record<string, unknown>> {
|
|
760
|
+
private readonly container;
|
|
761
|
+
private options;
|
|
762
|
+
private core;
|
|
763
|
+
private host;
|
|
764
|
+
private stopResizeObserver;
|
|
765
|
+
private frameId;
|
|
766
|
+
private width;
|
|
767
|
+
private height;
|
|
768
|
+
private layout;
|
|
769
|
+
private renderStats;
|
|
770
|
+
private hoverCell;
|
|
771
|
+
private tooltipText;
|
|
772
|
+
private scroll;
|
|
773
|
+
private wheelScrollTarget;
|
|
774
|
+
private wheelScrollFrameId;
|
|
775
|
+
private wheelScrollLastTime;
|
|
776
|
+
private resizeSession;
|
|
777
|
+
private resizeGuideX;
|
|
778
|
+
private suppressNextClick;
|
|
779
|
+
private scrollbarDrag;
|
|
780
|
+
private cellSelectionDrag;
|
|
781
|
+
private rowHeaderSelectionDrag;
|
|
782
|
+
constructor(container: HTMLElement, options: PivotTableOptions<RecordType>);
|
|
783
|
+
/** 挂载 PivotTable。 */
|
|
784
|
+
mount(): void;
|
|
785
|
+
/** 更新 PivotTable 配置。 */
|
|
786
|
+
updateOptions(options: PivotTableOptions<RecordType>): void;
|
|
787
|
+
/** 获取当前数据透视模型。 */
|
|
788
|
+
getPivotModel(): PivotModel<RecordType> | null;
|
|
789
|
+
/** 获取当前可见行轴节点。 */
|
|
790
|
+
getVisibleRowNodes(): PivotNode[];
|
|
791
|
+
/** 获取当前可见列轴节点。 */
|
|
792
|
+
getVisibleColumnNodes(): PivotNode[];
|
|
793
|
+
/** 获取最近一次布局快照。 */
|
|
794
|
+
getLayoutSnapshot(): PivotLayoutSnapshot | null;
|
|
795
|
+
/** 获取最近一次绘制统计。 */
|
|
796
|
+
getRenderStats(): PivotRenderStats | null;
|
|
797
|
+
/** 获取核心调试快照。 */
|
|
798
|
+
getDebugSnapshot(): {
|
|
799
|
+
buildDurationMs: number;
|
|
800
|
+
buildCount: number;
|
|
801
|
+
records: number;
|
|
802
|
+
rowNodeCount: number;
|
|
803
|
+
columnNodeCount: number;
|
|
804
|
+
aggregateCellCount: number;
|
|
805
|
+
visibleRowCount: number;
|
|
806
|
+
visibleColumnCount: number;
|
|
807
|
+
renderedBodyCellCount: number;
|
|
808
|
+
} | null;
|
|
809
|
+
/** 获取当前选区。 */
|
|
810
|
+
getSelection(): PivotSelectionState | null;
|
|
811
|
+
/** 设置完整选区状态。 */
|
|
812
|
+
setSelection(selection: PivotSelectionState): PivotSelectionState | null;
|
|
813
|
+
/** 获取当前过滤状态。 */
|
|
814
|
+
getFilters(): PivotFilterState | null;
|
|
815
|
+
/** 获取当前排序规则。 */
|
|
816
|
+
getSorts(): PivotSortRule[];
|
|
817
|
+
/** 清除全部排序规则。 */
|
|
818
|
+
resetSorters(): PivotSortRule[];
|
|
819
|
+
/** 设置指定维度排序。 */
|
|
820
|
+
setDimensionSort(axis: PivotAxis, dimensionKey: string, direction: "asc" | "desc" | null): PivotSortRule[];
|
|
821
|
+
/** 按指标聚合结果设置维度排序。 */
|
|
822
|
+
setIndicatorSort(params: Parameters<PivotTableCore<RecordType>["setIndicatorSort"]>[0]): PivotSortRule[];
|
|
823
|
+
/** 设置指定轴维度过滤。 */
|
|
824
|
+
setDimensionFilter(axis: PivotFilterAxis, dimensionKey: string, filter: PivotDimensionFilter | null): {
|
|
825
|
+
rows: Record<string, PivotDimensionFilter>;
|
|
826
|
+
columns: Record<string, PivotDimensionFilter>;
|
|
827
|
+
filters?: Record<string, PivotDimensionFilter>;
|
|
828
|
+
} | null;
|
|
829
|
+
/** 获取指定轴维度的过滤候选项。 */
|
|
830
|
+
getDimensionFilterOptions(axis: PivotFilterAxis, dimensionKey: string): PivotFilterOptionItem[];
|
|
831
|
+
/** 清除全部维度过滤。 */
|
|
832
|
+
resetFilters(): PivotFilterState | null;
|
|
833
|
+
/** 导出当前可见透视结果 CSV。 */
|
|
834
|
+
exportCsv(options?: PivotExportOptions): string;
|
|
835
|
+
/** 导出当前可见透视结果 XLSX 字节。 */
|
|
836
|
+
exportXlsx(options?: PivotExportOptions): Uint8Array<ArrayBufferLike>;
|
|
837
|
+
/** 获取可序列化状态快照。 */
|
|
838
|
+
getState(): PivotTableStateSnapshot | null;
|
|
839
|
+
/** 恢复版本兼容的状态快照。 */
|
|
840
|
+
restoreState(snapshot: PivotTableStateSnapshot): boolean;
|
|
841
|
+
/** 选中指定值单元格。 */
|
|
842
|
+
selectCell(address: PivotCellAddress, extend?: boolean): PivotSelectionState | null;
|
|
843
|
+
/** 选中行轴或列轴维度节点。 */
|
|
844
|
+
selectNode(axis: PivotAxis, nodeId: string): PivotSelectionState | null;
|
|
845
|
+
/** 将指定稳定地址滚动到可视区域。 */
|
|
846
|
+
scrollToCell(address: PivotCellAddress): boolean;
|
|
847
|
+
/** 设置行轴节点展开状态。 */
|
|
848
|
+
setRowNodeExpanded(nodeId: string, expanded: boolean): boolean;
|
|
849
|
+
/** 展开行轴节点。 */
|
|
850
|
+
expandRowNode(nodeId: string): boolean;
|
|
851
|
+
/** 收起行轴节点。 */
|
|
852
|
+
collapseRowNode(nodeId: string): boolean;
|
|
853
|
+
/** 设置列轴节点展开状态。 */
|
|
854
|
+
setColumnNodeExpanded(nodeId: string, expanded: boolean): boolean;
|
|
855
|
+
/** 展开列轴节点。 */
|
|
856
|
+
expandColumnNode(nodeId: string): boolean;
|
|
857
|
+
/** 收起列轴节点。 */
|
|
858
|
+
collapseColumnNode(nodeId: string): boolean;
|
|
859
|
+
/** 展开指定范围内的全部维度节点。 */
|
|
860
|
+
expandAll(axis?: PivotAxis | "both"): number;
|
|
861
|
+
/** 收起指定范围内的全部维度节点。 */
|
|
862
|
+
collapseAll(axis?: PivotAxis | "both"): number;
|
|
863
|
+
/** 获取稳定地址对应的聚合值。 */
|
|
864
|
+
getCellValue(address: PivotCellAddress): unknown;
|
|
865
|
+
/** 获取指定聚合单元格对应的原始记录。 */
|
|
866
|
+
getCellRecords(params: {
|
|
867
|
+
rowPathKey: string;
|
|
868
|
+
columnPathKey: string;
|
|
869
|
+
indicatorKey: string;
|
|
870
|
+
}): RecordType[];
|
|
871
|
+
/** 销毁 PivotTable。 */
|
|
872
|
+
destroy(): void;
|
|
873
|
+
private readonly handlePointerMove;
|
|
874
|
+
private readonly handlePointerLeave;
|
|
875
|
+
private readonly handleClick;
|
|
876
|
+
private readonly handleDocumentKeyDown;
|
|
877
|
+
private readonly handleCopy;
|
|
878
|
+
private readonly handleWheel;
|
|
879
|
+
private startWheelScrollSmoothing;
|
|
880
|
+
private stopWheelScrollSmoothing;
|
|
881
|
+
private advanceWheelScrollSmoothing;
|
|
882
|
+
private readonly handleContextMenu;
|
|
883
|
+
private updateTooltip;
|
|
884
|
+
private readonly handlePointerDown;
|
|
885
|
+
private readonly handlePointerUp;
|
|
886
|
+
private updateCellSelectionDrag;
|
|
887
|
+
private updateRowHeaderSelectionDrag;
|
|
888
|
+
private selectValueColumn;
|
|
889
|
+
private beginScrollbarInteraction;
|
|
890
|
+
private updateScrollbarDrag;
|
|
891
|
+
private stepScrollbar;
|
|
892
|
+
private applyScrollPosition;
|
|
893
|
+
private applyResize;
|
|
894
|
+
private openFilterPanel;
|
|
895
|
+
private openReportFilterPanel;
|
|
896
|
+
private requestFilterPanel;
|
|
897
|
+
private resolveHit;
|
|
898
|
+
private resolveResizeHit;
|
|
899
|
+
private resolveScrollbarHit;
|
|
900
|
+
private createSelectionTsv;
|
|
901
|
+
private scheduleRender;
|
|
902
|
+
private render;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/** 将原始记录聚合成第一版稀疏 PivotModel。 */
|
|
906
|
+
declare function aggregatePivotRecords<RecordType>(params: {
|
|
907
|
+
records: RecordType[];
|
|
908
|
+
rowDimensions: PivotDimension<RecordType>[];
|
|
909
|
+
columnDimensions: PivotDimension<RecordType>[];
|
|
910
|
+
indicators: PivotIndicator<RecordType>[];
|
|
911
|
+
aggregators?: PivotAggregatorRegistry<RecordType>;
|
|
912
|
+
totals?: PivotTotalsOptions;
|
|
913
|
+
sorts?: PivotSortRule[];
|
|
914
|
+
}): PivotModel<RecordType>;
|
|
915
|
+
|
|
916
|
+
/** 创建内置 PivotTable 聚合器注册表。 */
|
|
917
|
+
declare function createBuiltInPivotAggregators<RecordType>(): PivotAggregatorRegistry<RecordType>;
|
|
918
|
+
|
|
919
|
+
/** 合并内置和自定义聚合器。 */
|
|
920
|
+
declare function createPivotAggregatorRegistry<RecordType>(custom?: PivotAggregatorRegistry<RecordType>): PivotAggregatorRegistry<RecordType>;
|
|
921
|
+
/** 解析指标使用的聚合器。 */
|
|
922
|
+
declare function resolvePivotIndicatorAggregator<RecordType>(indicator: PivotIndicator<RecordType>, registry: PivotAggregatorRegistry<RecordType>): PivotAggregator<any, any, RecordType>;
|
|
923
|
+
|
|
924
|
+
/** 将维度值编码成稳定且包含类型信息的键。 */
|
|
925
|
+
declare function encodePivotDimensionValue(value: unknown): string;
|
|
926
|
+
/** 将维度路径编码成组合键。 */
|
|
927
|
+
declare function encodePivotPath(values: readonly string[]): string;
|
|
928
|
+
/** 解析一条记录的维度成员。 */
|
|
929
|
+
declare function resolvePivotDimensionValue<RecordType>(params: {
|
|
930
|
+
record: RecordType;
|
|
931
|
+
recordIndex: number;
|
|
932
|
+
dimension: PivotDimension<RecordType>;
|
|
933
|
+
}): ResolvedPivotDimensionValue;
|
|
934
|
+
|
|
935
|
+
/** 解析维度稳定标识。 */
|
|
936
|
+
declare function resolvePivotDimensionKey<RecordType>(dimension: PivotDimension<RecordType>): string;
|
|
937
|
+
/** 将与 ListTable 一致的标题配置转换为 Canvas 文本。 */
|
|
938
|
+
declare function resolvePivotDimensionTitle<RecordType>(dimension: PivotDimension<RecordType>): string;
|
|
939
|
+
/** 解析受最小、最大宽度约束的行维度宽度。 */
|
|
940
|
+
declare function resolvePivotDimensionWidth<RecordType>(dimension: PivotDimension<RecordType>, runtimeWidth?: number, fallbackWidth?: number): number;
|
|
941
|
+
/** 将列级默认排序配置转换为 PivotTable 双轴排序状态。 */
|
|
942
|
+
declare function resolvePivotDefaultSorts<RecordType>(params: {
|
|
943
|
+
rows: PivotDimension<RecordType>[];
|
|
944
|
+
columns: PivotDimension<RecordType>[];
|
|
945
|
+
}): PivotSortRule[];
|
|
946
|
+
|
|
947
|
+
/** 创建空的行、列与报告字段过滤状态。 */
|
|
948
|
+
declare function createEmptyPivotFilterState(): PivotFilterState;
|
|
949
|
+
/** 按当前行、列与报告字段条件过滤原始记录。 */
|
|
950
|
+
declare function filterPivotRecords<RecordType>(params: {
|
|
951
|
+
records: RecordType[];
|
|
952
|
+
rows: PivotDimension<RecordType>[];
|
|
953
|
+
columns: PivotDimension<RecordType>[];
|
|
954
|
+
filterDimensions?: PivotDimension<RecordType>[];
|
|
955
|
+
filters?: PivotFilterState;
|
|
956
|
+
exclude?: {
|
|
957
|
+
axis: PivotFilterAxis;
|
|
958
|
+
dimensionKey: string;
|
|
959
|
+
};
|
|
960
|
+
}): RecordType[];
|
|
961
|
+
/** 统计指定维度在其他过滤条件下的候选成员。 */
|
|
962
|
+
declare function getPivotDimensionFilterOptions<RecordType>(params: {
|
|
963
|
+
records: RecordType[];
|
|
964
|
+
rows: PivotDimension<RecordType>[];
|
|
965
|
+
columns: PivotDimension<RecordType>[];
|
|
966
|
+
filterDimensions?: PivotDimension<RecordType>[];
|
|
967
|
+
filters?: PivotFilterState;
|
|
968
|
+
axis: PivotFilterAxis;
|
|
969
|
+
dimensionKey: string;
|
|
970
|
+
}): PivotFilterOptionItem[];
|
|
971
|
+
|
|
972
|
+
/** 自定义字段可放置的透视区域。 */
|
|
973
|
+
type PivotFieldArea = "filter" | "column" | "row" | "value";
|
|
974
|
+
/** 自定义面板中的字段定义。 */
|
|
975
|
+
interface PivotField<RecordType = Record<string, unknown>> extends PivotDimension<RecordType> {
|
|
976
|
+
/** 勾选未使用字段时进入的默认区域。 */
|
|
977
|
+
defaultArea?: PivotFieldArea;
|
|
978
|
+
/** 字段进入值区域时使用的指标配置。 */
|
|
979
|
+
indicator?: Omit<PivotIndicator<RecordType>, "key" | "title" | "dataIndex"> & {
|
|
980
|
+
title?: string;
|
|
981
|
+
dataIndex?: PivotIndicator<RecordType>["dataIndex"];
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
/** 自定义面板四个区域内的有序字段键。 */
|
|
985
|
+
interface PivotFieldLayout {
|
|
986
|
+
filters: string[];
|
|
987
|
+
columns: string[];
|
|
988
|
+
rows: string[];
|
|
989
|
+
values: string[];
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/** 创建四个区域均为空的字段布局。 */
|
|
993
|
+
declare function createEmptyPivotFieldLayout(): PivotFieldLayout;
|
|
994
|
+
/** 根据当前透视配置创建字段区域布局。 */
|
|
995
|
+
declare function createPivotFieldLayout<RecordType>(params: {
|
|
996
|
+
filterDimensions?: PivotDimension<RecordType>[];
|
|
997
|
+
columns: PivotDimension<RecordType>[];
|
|
998
|
+
rows: PivotDimension<RecordType>[];
|
|
999
|
+
indicators: PivotIndicator<RecordType>[];
|
|
1000
|
+
}): PivotFieldLayout;
|
|
1001
|
+
/** 合并自定义字段与当前透视配置,生成稳定字段目录。 */
|
|
1002
|
+
declare function createPivotFieldCatalog<RecordType>(params: {
|
|
1003
|
+
fields?: PivotField<RecordType>[];
|
|
1004
|
+
filterDimensions?: PivotDimension<RecordType>[];
|
|
1005
|
+
columns: PivotDimension<RecordType>[];
|
|
1006
|
+
rows: PivotDimension<RecordType>[];
|
|
1007
|
+
indicators: PivotIndicator<RecordType>[];
|
|
1008
|
+
}): PivotField<RecordType>[];
|
|
1009
|
+
/**
|
|
1010
|
+
* 将字段移动到指定区域和位置。
|
|
1011
|
+
*
|
|
1012
|
+
* 筛选器、行和列区域中的字段互斥;值区域独立,可复用维度字段。
|
|
1013
|
+
*/
|
|
1014
|
+
declare function movePivotField(layout: PivotFieldLayout, fieldKey: string, area: PivotFieldArea, index?: number, sourceArea?: PivotFieldArea): PivotFieldLayout;
|
|
1015
|
+
/** 从全部区域中移除字段。 */
|
|
1016
|
+
declare function removePivotField(layout: PivotFieldLayout, fieldKey: string): PivotFieldLayout;
|
|
1017
|
+
/** 将字段布局转换为 PivotTable 原生配置。 */
|
|
1018
|
+
declare function resolvePivotFieldLayoutOptions<RecordType>(fields: PivotField<RecordType>[], layout: PivotFieldLayout): {
|
|
1019
|
+
filterDimensions: {
|
|
1020
|
+
key?: string;
|
|
1021
|
+
title?: PivotDimensionTitle;
|
|
1022
|
+
dataIndex: PivotDataIndex;
|
|
1023
|
+
width?: number;
|
|
1024
|
+
minWidth?: number;
|
|
1025
|
+
maxWidth?: number;
|
|
1026
|
+
align?: PivotTextAlign;
|
|
1027
|
+
allowSort?: boolean;
|
|
1028
|
+
sortValueGetter?: ((record: RecordType) => string | number | null | undefined) | undefined;
|
|
1029
|
+
defaultSortOrder?: "ascend" | "descend";
|
|
1030
|
+
sortPriority?: number;
|
|
1031
|
+
allowFilter?: boolean;
|
|
1032
|
+
filterModes?: Array<"fuzzy" | "exact">;
|
|
1033
|
+
filterValueGetter?: ((record: RecordType) => unknown) | undefined;
|
|
1034
|
+
filterOptionValueGetter?: ((record: RecordType) => unknown) | undefined;
|
|
1035
|
+
filterOptions?: Array<string | PivotDimensionFilterOption>;
|
|
1036
|
+
render?: ((value: unknown, record: RecordType, rowIndex: number, column: any) => unknown) | undefined;
|
|
1037
|
+
defaultExpandDepth?: number;
|
|
1038
|
+
meta?: Record<string, unknown>;
|
|
1039
|
+
}[];
|
|
1040
|
+
columns: {
|
|
1041
|
+
key?: string;
|
|
1042
|
+
title?: PivotDimensionTitle;
|
|
1043
|
+
dataIndex: PivotDataIndex;
|
|
1044
|
+
width?: number;
|
|
1045
|
+
minWidth?: number;
|
|
1046
|
+
maxWidth?: number;
|
|
1047
|
+
align?: PivotTextAlign;
|
|
1048
|
+
allowSort?: boolean;
|
|
1049
|
+
sortValueGetter?: ((record: RecordType) => string | number | null | undefined) | undefined;
|
|
1050
|
+
defaultSortOrder?: "ascend" | "descend";
|
|
1051
|
+
sortPriority?: number;
|
|
1052
|
+
allowFilter?: boolean;
|
|
1053
|
+
filterModes?: Array<"fuzzy" | "exact">;
|
|
1054
|
+
filterValueGetter?: ((record: RecordType) => unknown) | undefined;
|
|
1055
|
+
filterOptionValueGetter?: ((record: RecordType) => unknown) | undefined;
|
|
1056
|
+
filterOptions?: Array<string | PivotDimensionFilterOption>;
|
|
1057
|
+
render?: ((value: unknown, record: RecordType, rowIndex: number, column: any) => unknown) | undefined;
|
|
1058
|
+
defaultExpandDepth?: number;
|
|
1059
|
+
meta?: Record<string, unknown>;
|
|
1060
|
+
}[];
|
|
1061
|
+
rows: {
|
|
1062
|
+
key?: string;
|
|
1063
|
+
title?: PivotDimensionTitle;
|
|
1064
|
+
dataIndex: PivotDataIndex;
|
|
1065
|
+
width?: number;
|
|
1066
|
+
minWidth?: number;
|
|
1067
|
+
maxWidth?: number;
|
|
1068
|
+
align?: PivotTextAlign;
|
|
1069
|
+
allowSort?: boolean;
|
|
1070
|
+
sortValueGetter?: ((record: RecordType) => string | number | null | undefined) | undefined;
|
|
1071
|
+
defaultSortOrder?: "ascend" | "descend";
|
|
1072
|
+
sortPriority?: number;
|
|
1073
|
+
allowFilter?: boolean;
|
|
1074
|
+
filterModes?: Array<"fuzzy" | "exact">;
|
|
1075
|
+
filterValueGetter?: ((record: RecordType) => unknown) | undefined;
|
|
1076
|
+
filterOptionValueGetter?: ((record: RecordType) => unknown) | undefined;
|
|
1077
|
+
filterOptions?: Array<string | PivotDimensionFilterOption>;
|
|
1078
|
+
render?: ((value: unknown, record: RecordType, rowIndex: number, column: any) => unknown) | undefined;
|
|
1079
|
+
defaultExpandDepth?: number;
|
|
1080
|
+
meta?: Record<string, unknown>;
|
|
1081
|
+
}[];
|
|
1082
|
+
indicators: PivotIndicator<RecordType>[];
|
|
1083
|
+
};
|
|
1084
|
+
/** 返回字段当前所在的区域。 */
|
|
1085
|
+
declare function findPivotFieldArea(layout: PivotFieldLayout, fieldKey: string): PivotFieldArea | null;
|
|
1086
|
+
/** 生成包含汇总类型的值字段标题。 */
|
|
1087
|
+
declare function resolvePivotValueFieldTitle<RecordType>(field: PivotField<RecordType>): string;
|
|
1088
|
+
|
|
1089
|
+
/** 根据当前单元格、行节点或列节点选区生成剪贴板文本。 */
|
|
1090
|
+
declare function createPivotSelectionText<RecordType>(params: {
|
|
1091
|
+
layout: PivotLayoutSnapshot;
|
|
1092
|
+
model: PivotModel<RecordType>;
|
|
1093
|
+
selection: PivotSelectionState;
|
|
1094
|
+
}): string;
|
|
1095
|
+
|
|
1096
|
+
/** 构建四区 PivotTable 布局快照。 */
|
|
1097
|
+
declare function buildPivotLayoutSnapshot<RecordType>(params: {
|
|
1098
|
+
model: PivotModel<RecordType>;
|
|
1099
|
+
options: PivotTableOptions<RecordType>;
|
|
1100
|
+
visibleRowNodes: PivotNode[];
|
|
1101
|
+
visibleColumnNodes: PivotNode[];
|
|
1102
|
+
width: number;
|
|
1103
|
+
height: number;
|
|
1104
|
+
scroll: {
|
|
1105
|
+
left: number;
|
|
1106
|
+
top: number;
|
|
1107
|
+
};
|
|
1108
|
+
columnWidths?: ReadonlyMap<string, number>;
|
|
1109
|
+
expandedRowNodeIds?: ReadonlySet<string>;
|
|
1110
|
+
expandedColumnNodeIds?: ReadonlySet<string>;
|
|
1111
|
+
}): PivotLayoutSnapshot;
|
|
1112
|
+
/** 根据轴节点和指标布局生成最终值槽位。 */
|
|
1113
|
+
declare function createPivotAxisSlots(params: {
|
|
1114
|
+
nodes: PivotNode[];
|
|
1115
|
+
indicators: string[];
|
|
1116
|
+
includeIndicators: boolean;
|
|
1117
|
+
}): PivotAxisSlot[];
|
|
1118
|
+
|
|
1119
|
+
/** 计算覆盖于 PivotTable Canvas 上的双轴滚动条布局。 */
|
|
1120
|
+
declare function computePivotScrollbarLayout(params: {
|
|
1121
|
+
width: number;
|
|
1122
|
+
height: number;
|
|
1123
|
+
bodyTop: number;
|
|
1124
|
+
bodyHeight: number;
|
|
1125
|
+
bodyWidth: number;
|
|
1126
|
+
totalBodyWidth: number;
|
|
1127
|
+
totalBodyHeight: number;
|
|
1128
|
+
scrollLeft: number;
|
|
1129
|
+
scrollTop: number;
|
|
1130
|
+
maxScrollLeft: number;
|
|
1131
|
+
maxScrollTop: number;
|
|
1132
|
+
}): PivotScrollbarLayout;
|
|
1133
|
+
|
|
1134
|
+
/** PivotTable 命中区域。 */
|
|
1135
|
+
type PivotHitRegion = "reportFilter" | "corner" | "rowHeader" | "columnHeader" | "body";
|
|
1136
|
+
/** PivotTable 命中结果。 */
|
|
1137
|
+
interface PivotHitTestResult {
|
|
1138
|
+
region: PivotHitRegion;
|
|
1139
|
+
headerCell?: PivotHeaderCellLayout;
|
|
1140
|
+
reportFilterCell?: PivotReportFilterCellLayout;
|
|
1141
|
+
bodyCell?: PivotBodyCellLayout;
|
|
1142
|
+
onExpandIcon: boolean;
|
|
1143
|
+
onFilterIcon: boolean;
|
|
1144
|
+
onSortIcon: boolean;
|
|
1145
|
+
}
|
|
1146
|
+
/** 在当前布局快照中执行四区命中。 */
|
|
1147
|
+
declare function hitTestPivotLayout(layout: PivotLayoutSnapshot, x: number, y: number): PivotHitTestResult | null;
|
|
1148
|
+
|
|
1149
|
+
/** PivotTable 表头宽度调整命中。 */
|
|
1150
|
+
type PivotResizeHit = {
|
|
1151
|
+
kind: "rowDimension";
|
|
1152
|
+
index: number;
|
|
1153
|
+
} | {
|
|
1154
|
+
kind: "valueColumn";
|
|
1155
|
+
index: number;
|
|
1156
|
+
};
|
|
1157
|
+
/** 命中行维度或值列的宽度调整边界。 */
|
|
1158
|
+
declare function hitTestPivotResize(layout: PivotLayoutSnapshot, x: number, y: number, tolerance?: number): PivotResizeHit | null;
|
|
1159
|
+
|
|
1160
|
+
/** 命中 PivotTable Canvas 滚动条。 */
|
|
1161
|
+
declare function hitTestPivotScrollbar(layout: PivotScrollbarLayout, x: number, y: number): {
|
|
1162
|
+
axis: PivotScrollbarAxis;
|
|
1163
|
+
role: PivotScrollbarRole;
|
|
1164
|
+
} | null;
|
|
1165
|
+
|
|
1166
|
+
/** 构建完整行轴或列轴维度树。 */
|
|
1167
|
+
declare function buildPivotDimensionTree<RecordType>(params: {
|
|
1168
|
+
axis: PivotAxis;
|
|
1169
|
+
dimensions: PivotDimension<RecordType>[];
|
|
1170
|
+
paths: Iterable<PivotResolvedPath>;
|
|
1171
|
+
totals?: PivotTotalsOptions;
|
|
1172
|
+
sorts?: PivotSortRule[];
|
|
1173
|
+
cells?: ReadonlyMap<string, PivotAggregateCell>;
|
|
1174
|
+
}): {
|
|
1175
|
+
root: PivotNode;
|
|
1176
|
+
nodeMap: Map<string, PivotNode>;
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1179
|
+
/** 根据展开状态生成当前可见叶节点。 */
|
|
1180
|
+
declare function flattenVisiblePivotLeaves(params: {
|
|
1181
|
+
root: PivotNode;
|
|
1182
|
+
expandedNodeIds: ReadonlySet<string>;
|
|
1183
|
+
defaultExpandDepth?: number;
|
|
1184
|
+
}): PivotNode[];
|
|
1185
|
+
|
|
1186
|
+
export { type BuiltInPivotAggregatorName, type PivotAggregateCell, type PivotAggregator, type PivotAggregatorContext, type PivotAggregatorRegistry, type PivotAxis, type PivotAxisScrollbarLayout, type PivotAxisSlot, type PivotBodyCellLayout, type PivotCellAddress, type PivotCellStyle, type PivotContextMenuRequest, type PivotDataIndex, type PivotDimension, type PivotDimensionFilter, type PivotDimensionFilterOption, type PivotDimensionFilterPanelRequest, type PivotDimensionHeaderContent, type PivotDimensionHeaderImageContent, type PivotDimensionHeaderTextContent, type PivotDimensionTitle, type PivotDimensionValue, type PivotExpansionChangeEvent, type PivotExportMatrix, type PivotExportOptions, type PivotField, type PivotFieldArea, type PivotFieldLayout, type PivotFilterAxis, type PivotFilterChangeEvent, type PivotFilterCondition, type PivotFilterConditionOperator, type PivotFilterOptionItem, type PivotFilterState, type PivotGrandTotalPosition, type PivotHeaderCellLayout, type PivotHighlightMode, type PivotHitRegion, type PivotHitTestResult, type PivotIndicator, type PivotIndicatorFormatContext, type PivotLayoutSnapshot, type PivotLoadingRequest, type PivotModel, type PivotNode, type PivotNodeKind, type PivotRect, type PivotRenderStats, type PivotReportFilterCellLayout, type PivotResizeHit, type PivotResolvedPath, type PivotScrollState, type PivotScrollbarAxis, type PivotScrollbarLayout, type PivotScrollbarRect, type PivotScrollbarRole, type PivotSelectionChangeEvent, type PivotSelectionRange, type PivotSelectionState, type PivotSortChangeEvent, type PivotSortRule, type PivotSubtotalPosition, PivotTable, type PivotTableOptions, type PivotTableStateSnapshot, type PivotTableTheme, type PivotTableUiOptions, type PivotTextAlign, type PivotTooltipRequest, type PivotTotalsOptions, type ResolvedPivotDimensionValue, aggregatePivotRecords, buildPivotDimensionTree, buildPivotLayoutSnapshot, computePivotScrollbarLayout, createBuiltInPivotAggregators, createEmptyPivotFieldLayout, createEmptyPivotFilterState, createPivotAggregatorRegistry, createPivotAxisSlots, createPivotCellKey, createPivotExportMatrix, createPivotFieldCatalog, createPivotFieldLayout, createPivotSelectionText, defaultPivotTableTheme, encodePivotDimensionValue, encodePivotPath, exportPivotMatrixToCsv, exportPivotMatrixToXlsx, filterPivotRecords, findPivotFieldArea, flattenVisiblePivotLeaves, getPivotDimensionFilterOptions, hitTestPivotLayout, hitTestPivotResize, hitTestPivotScrollbar, movePivotField, removePivotField, renderPivotTable, resolvePivotDefaultSorts, resolvePivotDimensionKey, resolvePivotDimensionTitle, resolvePivotDimensionValue, resolvePivotDimensionWidth, resolvePivotFieldLayoutOptions, resolvePivotIndicatorAggregator, resolvePivotValueFieldTitle };
|