@quickbi/bi-types 3.0.49 → 3.0.51-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.ts +6465 -30
- package/cjs/index.js +263 -45
- package/esm/index.d.ts +6465 -30
- package/esm/index.mjs +263 -45
- package/package.json +5 -7
- package/cjs/chart-config.d.ts +0 -378
- package/cjs/component-type.d.ts +0 -488
- package/cjs/cross-table.d.ts +0 -151
- package/cjs/cube/cube-blend.d.ts +0 -22
- package/cjs/cube/cube-links.d.ts +0 -35
- package/cjs/cube/cube-model.d.ts +0 -611
- package/cjs/cube/data-source.d.ts +0 -180
- package/cjs/cube/index.d.ts +0 -9
- package/cjs/cube/table-schema.d.ts +0 -43
- package/cjs/data-panel/base.d.ts +0 -159
- package/cjs/data-panel/data-config.d.ts +0 -236
- package/cjs/data-panel/data-schema-item.d.ts +0 -734
- package/cjs/data-panel/data-schema.d.ts +0 -101
- package/cjs/data-panel/index.d.ts +0 -9
- package/cjs/etl.d.ts +0 -76
- package/cjs/open/common/event-types.d.ts +0 -22
- package/cjs/open/common/misc.d.ts +0 -11
- package/cjs/open/common/page-types.d.ts +0 -19
- package/cjs/open/common/tools.d.ts +0 -23
- package/cjs/open/components/component-lifecycle.d.ts +0 -36
- package/cjs/open/components/component-meta.d.ts +0 -27
- package/cjs/open/components/component-props.d.ts +0 -148
- package/cjs/open/components/data-schema.d.ts +0 -53
- package/cjs/open/components/style-schema.d.ts +0 -161
- package/cjs/open/embed/core.d.ts +0 -65
- package/cjs/open/events/event-props.d.ts +0 -33
- package/cjs/open/events/event-schema.d.ts +0 -12
- package/cjs/open/menus/menu-props.d.ts +0 -178
- package/cjs/open/menus/menu-schema.d.ts +0 -35
- package/cjs/router/route-key.d.ts +0 -523
- package/cjs/router/route-tree.d.ts +0 -17
- package/cjs/standard-model.d.ts +0 -497
- package/cjs/ui/page-header.d.ts +0 -14
- package/esm/chart-config.d.ts +0 -378
- package/esm/component-type.d.ts +0 -488
- package/esm/cross-table.d.ts +0 -151
- package/esm/cube/cube-blend.d.ts +0 -22
- package/esm/cube/cube-links.d.ts +0 -35
- package/esm/cube/cube-model.d.ts +0 -611
- package/esm/cube/data-source.d.ts +0 -180
- package/esm/cube/index.d.ts +0 -9
- package/esm/cube/table-schema.d.ts +0 -43
- package/esm/data-panel/base.d.ts +0 -159
- package/esm/data-panel/data-config.d.ts +0 -236
- package/esm/data-panel/data-schema-item.d.ts +0 -734
- package/esm/data-panel/data-schema.d.ts +0 -101
- package/esm/data-panel/index.d.ts +0 -9
- package/esm/etl.d.ts +0 -76
- package/esm/open/common/event-types.d.ts +0 -22
- package/esm/open/common/misc.d.ts +0 -11
- package/esm/open/common/page-types.d.ts +0 -19
- package/esm/open/common/tools.d.ts +0 -23
- package/esm/open/components/component-lifecycle.d.ts +0 -36
- package/esm/open/components/component-meta.d.ts +0 -27
- package/esm/open/components/component-props.d.ts +0 -148
- package/esm/open/components/data-schema.d.ts +0 -53
- package/esm/open/components/style-schema.d.ts +0 -161
- package/esm/open/embed/core.d.ts +0 -65
- package/esm/open/events/event-props.d.ts +0 -33
- package/esm/open/events/event-schema.d.ts +0 -12
- package/esm/open/menus/menu-props.d.ts +0 -178
- package/esm/open/menus/menu-schema.d.ts +0 -35
- package/esm/router/route-key.d.ts +0 -523
- package/esm/router/route-tree.d.ts +0 -17
- package/esm/standard-model.d.ts +0 -497
- package/esm/ui/page-header.d.ts +0 -14
|
@@ -1,734 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 忘悠
|
|
3
|
-
* @description 数据面板每个区域的配置信息
|
|
4
|
-
*/
|
|
5
|
-
import type * as React from 'react';
|
|
6
|
-
import type { BlendSchema } from '../cube/cube-blend';
|
|
7
|
-
import type { Aggregator, CubeModel, DateGranularity, EmptyValueDisplayConfig, Field, FieldAttribute, FolderAndHierarchyNode, RegionGranularity } from '../cube/cube-model';
|
|
8
|
-
import type { FieldType, QueryAxisType, FieldGroupType, SecondFieldType, ChartStatus, StackedSortType, RetainAreaId, FieldCollectionType } from './base';
|
|
9
|
-
import type { DataConfigAreaItemColumn } from './data-config';
|
|
10
|
-
export interface ValidateResult {
|
|
11
|
-
isValid: boolean;
|
|
12
|
-
msg?: Message;
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}
|
|
15
|
-
export declare enum FieldConfigTypes {
|
|
16
|
-
/** 聚合方式, 度量默认打开 */
|
|
17
|
-
aggregation = "aggregation",
|
|
18
|
-
/** 同环比, 度量默认打开 */
|
|
19
|
-
contrast = "contrast",
|
|
20
|
-
/** 高级计算, 度量默认打开 */
|
|
21
|
-
advancedCalculation = "advancedCalculation",
|
|
22
|
-
/** 数据展示格式, 默认打开 */
|
|
23
|
-
numberFormat = "numberFormat",
|
|
24
|
-
/** 字段显示内容 */
|
|
25
|
-
rename = "rename",
|
|
26
|
-
/** 对齐方式, 默认关闭 */
|
|
27
|
-
align = "align",
|
|
28
|
-
/** 垂直对齐方式, 默认关闭 */
|
|
29
|
-
verticalAlign = "verticalAlign",
|
|
30
|
-
/** 排序, 默认打开 */
|
|
31
|
-
sort = "sort",
|
|
32
|
-
/** 时间格式 */
|
|
33
|
-
timeFormat = "timeFormat",
|
|
34
|
-
/** 图形样式 */
|
|
35
|
-
chartType = "chartType",
|
|
36
|
-
/** 图片大小 */
|
|
37
|
-
imageSize = "imageSize",
|
|
38
|
-
/** 字段组切换 */
|
|
39
|
-
switchFieldGroup = "switchFieldGroup",
|
|
40
|
-
/** 隐藏字段 */
|
|
41
|
-
hideField = "hideField",
|
|
42
|
-
/** 下钻配置的辅助字段(交叉表、明细表) */
|
|
43
|
-
auxiliaryField = "auxiliaryField",
|
|
44
|
-
/** 空值展示配置 */
|
|
45
|
-
emptyValueDisplay = "emptyValueDisplay"
|
|
46
|
-
}
|
|
47
|
-
export type DropDownMenuFieldConfig = AggregationConfig | ContrastConfig | AdvancedCalculationConfig | NumberFormatConfig | LabelConfig | AlignConfig | VerticalAlignConfig | SortConfig | FieldGroupConfig | ChartTypeConfig | ImageSizeConfig | TimeFormatConfig | HidenConfig | AuxiliaryFieldConfig | EmptyValueDisplayFieldConfig;
|
|
48
|
-
export type FieldConfigs = Array<DropDownMenuFieldConfig>;
|
|
49
|
-
export type ResetFieldConfigType = {
|
|
50
|
-
menuInfo: DropdownMenuItem;
|
|
51
|
-
field: DataConfigAreaItemColumn;
|
|
52
|
-
path: (string | number)[];
|
|
53
|
-
fieldInfo: FieldInfo;
|
|
54
|
-
component: any;
|
|
55
|
-
};
|
|
56
|
-
export type ResetMenuType = {
|
|
57
|
-
menuItem: DropdownMenuItem | DropdownMenuItem[];
|
|
58
|
-
field: DataConfigAreaItemColumn;
|
|
59
|
-
fieldInfo: FieldInfo;
|
|
60
|
-
area: DataSchemaAreaItem;
|
|
61
|
-
component: any;
|
|
62
|
-
};
|
|
63
|
-
interface FieldCommonConfig {
|
|
64
|
-
menuConfig?: DropdownMenuItem;
|
|
65
|
-
/** 默认是否展示,部分配置不需要默认打开,作为选配项即可 */
|
|
66
|
-
visible?: boolean;
|
|
67
|
-
/** 是否禁用 */
|
|
68
|
-
disabled?: boolean;
|
|
69
|
-
/** 支持的字段类型 */
|
|
70
|
-
usefulFieldtype?: FieldType[];
|
|
71
|
-
/** 是否在底部有分割线 */
|
|
72
|
-
hasDivider?: boolean;
|
|
73
|
-
/** 当前配置项,可使用的选项 */
|
|
74
|
-
usefulValues?: any[];
|
|
75
|
-
/** 禁用配置项,此项会对配置项开启disabled */
|
|
76
|
-
disabledValues?: string[];
|
|
77
|
-
/** 下拉菜单的类型值,固定写死,不需要覆盖 */
|
|
78
|
-
dropdownMenuType?: keyof typeof DropDownMenuType;
|
|
79
|
-
/**
|
|
80
|
-
* 图表自定义渲染处理函数,图表可以在这里对渲染菜单进行自定义
|
|
81
|
-
* @param item 当前菜单的配置信息, 聚合方式时会传递回配置数组
|
|
82
|
-
* @param field 当前字段配置
|
|
83
|
-
* @param component 组件信息
|
|
84
|
-
*/
|
|
85
|
-
resetMenu?: (params: ResetMenuType) => DropdownMenuItem | DropdownMenuItem[];
|
|
86
|
-
/**
|
|
87
|
-
* 图表自定义处理
|
|
88
|
-
* @param menuInfo 当前点击的菜单信息
|
|
89
|
-
* @param field 当前字段配置信息
|
|
90
|
-
* @param path 当前字段配置信息在图表area中的路径信息
|
|
91
|
-
* @param fieldInfo 当前数据集中的字段信息
|
|
92
|
-
* @param component 当前组件信息
|
|
93
|
-
* @return component 返回更新后的组件信息
|
|
94
|
-
*/
|
|
95
|
-
resetFieldConfig?: (params: ResetFieldConfigType) => any;
|
|
96
|
-
/** 获取高级排序所需字段 已排序字段 维度字段 度量字段 */
|
|
97
|
-
getAdvanceSortFields?: (component: any) => {
|
|
98
|
-
sortedFields: any[];
|
|
99
|
-
measureFields: any[];
|
|
100
|
-
dimensionFields: any[];
|
|
101
|
-
};
|
|
102
|
-
/** 高级排序编辑之后对component处理 */
|
|
103
|
-
onAdvancedSortChange?: (sortedFields: any[], component: any) => any;
|
|
104
|
-
}
|
|
105
|
-
export declare enum Aggregators {
|
|
106
|
-
sum = "sum",
|
|
107
|
-
avg = "avg",
|
|
108
|
-
count = "count",
|
|
109
|
-
countd = "countd",
|
|
110
|
-
null = "null",
|
|
111
|
-
more = "more",
|
|
112
|
-
max = "max",
|
|
113
|
-
min = "min",
|
|
114
|
-
median = "median",
|
|
115
|
-
percentile = "percentile",
|
|
116
|
-
stddev_pop = "stddev_pop",
|
|
117
|
-
stddev_samp = "stddev_samp",
|
|
118
|
-
var_pop = "var_pop",
|
|
119
|
-
var_samp = "var_samp",
|
|
120
|
-
last_period = "last_period",
|
|
121
|
-
first_period = "first_period"
|
|
122
|
-
}
|
|
123
|
-
/** 聚合方式, 度量默认打开 */
|
|
124
|
-
export interface AggregationConfig extends FieldCommonConfig {
|
|
125
|
-
type: FieldConfigTypes.aggregation;
|
|
126
|
-
/** 聚合方式 ,可以自定义排序 */
|
|
127
|
-
usefulValue?: Aggregators[];
|
|
128
|
-
/** 更多聚合方式 ,可以自定义排序 */
|
|
129
|
-
moreAggregators?: Aggregators[];
|
|
130
|
-
/** 不展示的聚合方式 */
|
|
131
|
-
hideValues?: Aggregators[];
|
|
132
|
-
/** 展示但禁用的聚合方式 */
|
|
133
|
-
disbaledAggregators?: Aggregators[];
|
|
134
|
-
/** 配置的当前聚合方式 */
|
|
135
|
-
value?: Aggregators;
|
|
136
|
-
}
|
|
137
|
-
export declare enum ContrastTypes {
|
|
138
|
-
customContrast = "customContrast",
|
|
139
|
-
noneContrast = "noneContrast"
|
|
140
|
-
}
|
|
141
|
-
/** 同环比, 度量默认打开 */
|
|
142
|
-
export interface ContrastConfig extends FieldCommonConfig {
|
|
143
|
-
type: FieldConfigTypes.contrast;
|
|
144
|
-
/** 同环比类型,可以自定义排序 */
|
|
145
|
-
usefulValue?: ContrastTypes[];
|
|
146
|
-
/** 不展示的同环比方式 */
|
|
147
|
-
hideValues?: ContrastTypes[];
|
|
148
|
-
}
|
|
149
|
-
export declare enum AdvanceCalTypes {
|
|
150
|
-
increase = "increase",
|
|
151
|
-
percentRatio = "percentRatio",
|
|
152
|
-
rank = "rank",
|
|
153
|
-
none = "none",
|
|
154
|
-
topn = "topn",
|
|
155
|
-
count = "count",
|
|
156
|
-
percentile = "percentile",
|
|
157
|
-
contrast = "contrast",
|
|
158
|
-
proportion = "proportion",
|
|
159
|
-
/** 时间补齐 */
|
|
160
|
-
timeCompletion = "timeCompletion"
|
|
161
|
-
}
|
|
162
|
-
export declare enum AdvanceCalcDateTypes {
|
|
163
|
-
day = "day",
|
|
164
|
-
week = "week",
|
|
165
|
-
month = "month",
|
|
166
|
-
quarter = "quarter",
|
|
167
|
-
year = "year"
|
|
168
|
-
}
|
|
169
|
-
/** 高级计算, 度量默认打开 */
|
|
170
|
-
export interface AdvancedCalculationConfig extends FieldCommonConfig {
|
|
171
|
-
type: FieldConfigTypes.advancedCalculation;
|
|
172
|
-
/** 高级计算类型,支持排序 */
|
|
173
|
-
usefulValue?: AdvanceCalTypes[];
|
|
174
|
-
/** 隐藏的类型 */
|
|
175
|
-
hideValues?: AdvanceCalTypes[];
|
|
176
|
-
/** 展示但禁用的类型 */
|
|
177
|
-
disabledAdvanceCalTypes?: AdvanceCalTypes[];
|
|
178
|
-
/** 高级计算时间字段类型 */
|
|
179
|
-
dateType?: AdvanceCalcDateTypes;
|
|
180
|
-
}
|
|
181
|
-
export declare enum NumberFormats {
|
|
182
|
-
auto = "auto",
|
|
183
|
-
int = "int",
|
|
184
|
-
oneDecimal = "oneDecimal",
|
|
185
|
-
twoDecimal = "twoDecimal",
|
|
186
|
-
percent = "percent",
|
|
187
|
-
oneDecimalPercent = "oneDecimalPercent",
|
|
188
|
-
twoDecimalPercent = "twoDecimalPercent",
|
|
189
|
-
custom = "custom"
|
|
190
|
-
}
|
|
191
|
-
/** 数据展示格式, 默认打开 */
|
|
192
|
-
export interface NumberFormatConfig extends FieldCommonConfig {
|
|
193
|
-
type: FieldConfigTypes.numberFormat;
|
|
194
|
-
/** 高级计算类型,支持排序 */
|
|
195
|
-
usefulValue?: NumberFormats[];
|
|
196
|
-
usePrefix?: boolean;
|
|
197
|
-
value?: NumberFormats;
|
|
198
|
-
/** 关闭手动输入 */
|
|
199
|
-
hideManualInput?: boolean;
|
|
200
|
-
/** 关闭数量量级使用标识位 */
|
|
201
|
-
hideDataMagnitude?: boolean;
|
|
202
|
-
/** 显示数据单位 */
|
|
203
|
-
showDataUnit?: boolean;
|
|
204
|
-
/** 关闭自动调整配置 */
|
|
205
|
-
hideRenderAutoAdjust?: boolean;
|
|
206
|
-
}
|
|
207
|
-
/** 字段别名 */
|
|
208
|
-
export interface LabelConfig extends FieldCommonConfig {
|
|
209
|
-
type: FieldConfigTypes.rename;
|
|
210
|
-
useDescription?: boolean;
|
|
211
|
-
}
|
|
212
|
-
/** 对齐类别 */
|
|
213
|
-
export declare enum AlignmentCategory {
|
|
214
|
-
/** 水平对齐 */
|
|
215
|
-
HorizontalAlign = "horizontalAlign",
|
|
216
|
-
/** 垂直对齐 */
|
|
217
|
-
VerticalAlign = "verticalAlign"
|
|
218
|
-
}
|
|
219
|
-
export declare enum AlignTypes {
|
|
220
|
-
auto = "auto",
|
|
221
|
-
left = "left",
|
|
222
|
-
center = "center",
|
|
223
|
-
right = "right"
|
|
224
|
-
}
|
|
225
|
-
/** 对齐方式, 默认关闭 */
|
|
226
|
-
export interface AlignConfig extends FieldCommonConfig {
|
|
227
|
-
type: FieldConfigTypes.align;
|
|
228
|
-
value?: AlignTypes;
|
|
229
|
-
usefulTypes?: AlignmentCategory[];
|
|
230
|
-
hideValues?: string[];
|
|
231
|
-
}
|
|
232
|
-
export declare enum VerticalAlignTypes {
|
|
233
|
-
auto = "auto",
|
|
234
|
-
top = "top",
|
|
235
|
-
middle = "middle",
|
|
236
|
-
bottom = "bottom"
|
|
237
|
-
}
|
|
238
|
-
/** 垂直对齐方式,默认关闭 */
|
|
239
|
-
export interface VerticalAlignConfig extends FieldCommonConfig {
|
|
240
|
-
type: FieldConfigTypes.verticalAlign;
|
|
241
|
-
value?: VerticalAlignTypes;
|
|
242
|
-
hideValues?: string[];
|
|
243
|
-
}
|
|
244
|
-
export declare enum SortTypes {
|
|
245
|
-
none = "",
|
|
246
|
-
asc = "ASC",
|
|
247
|
-
desc = "DESC",
|
|
248
|
-
custom = "custom",
|
|
249
|
-
group_asc = "GROUP_ASC",
|
|
250
|
-
group_desc = "GROUP_DESC",
|
|
251
|
-
group = "GROUP",
|
|
252
|
-
field = "field",
|
|
253
|
-
advance_sort = "advance_sort"
|
|
254
|
-
}
|
|
255
|
-
/** 排序, 默认打开 */
|
|
256
|
-
export interface SortConfig extends FieldCommonConfig {
|
|
257
|
-
type: FieldConfigTypes.sort;
|
|
258
|
-
useAdvancedSort?: boolean;
|
|
259
|
-
value?: SortTypes;
|
|
260
|
-
sortTypes?: SortTypes[];
|
|
261
|
-
/** 组件度量areaId,用于查找度量 */
|
|
262
|
-
measureAreaIds?: string[];
|
|
263
|
-
/** 高级排序是否支持从数据面板选择度量的快捷选项 */
|
|
264
|
-
presetSelectEnabled?: boolean;
|
|
265
|
-
hideFieldSortAggregators?: string[];
|
|
266
|
-
}
|
|
267
|
-
/** 字段组内字段切换 */
|
|
268
|
-
export interface FieldGroupConfig extends FieldCommonConfig {
|
|
269
|
-
type: FieldConfigTypes.switchFieldGroup;
|
|
270
|
-
}
|
|
271
|
-
/** 维度组多了单选/全选切换 */
|
|
272
|
-
export declare enum FieldGroupSelectorType {
|
|
273
|
-
/** 全选 */
|
|
274
|
-
selectAllInFieldGroup = "selectAllInFieldGroup",
|
|
275
|
-
/** 单选 */
|
|
276
|
-
fieldGroup = "fieldGroup"
|
|
277
|
-
}
|
|
278
|
-
export declare enum FieldChartTypes {
|
|
279
|
-
bar = "bar",
|
|
280
|
-
line = "line",
|
|
281
|
-
polyline = "polyline"
|
|
282
|
-
}
|
|
283
|
-
/** 图形样式 */
|
|
284
|
-
export interface ChartTypeConfig extends FieldCommonConfig {
|
|
285
|
-
type: FieldConfigTypes.chartType;
|
|
286
|
-
value?: FieldChartTypes;
|
|
287
|
-
}
|
|
288
|
-
export declare enum ImageSizes {
|
|
289
|
-
small = "small",
|
|
290
|
-
medium = "medium",
|
|
291
|
-
big = "big",
|
|
292
|
-
custom = "custom"
|
|
293
|
-
}
|
|
294
|
-
export interface HidenConfig extends FieldCommonConfig {
|
|
295
|
-
type: FieldConfigTypes.hideField;
|
|
296
|
-
value?: boolean;
|
|
297
|
-
}
|
|
298
|
-
export interface AuxiliaryFieldConfig extends FieldCommonConfig {
|
|
299
|
-
type: FieldConfigTypes.auxiliaryField;
|
|
300
|
-
config?: (AlignConfig | LabelConfig)[];
|
|
301
|
-
}
|
|
302
|
-
/** 图片大小 */
|
|
303
|
-
export interface ImageSizeConfig extends FieldCommonConfig {
|
|
304
|
-
type: FieldConfigTypes.imageSize;
|
|
305
|
-
value?: ImageSizes;
|
|
306
|
-
}
|
|
307
|
-
export interface TimeFormatConfig extends FieldCommonConfig {
|
|
308
|
-
type: FieldConfigTypes.timeFormat;
|
|
309
|
-
value?: string;
|
|
310
|
-
granularity?: DateGranularity;
|
|
311
|
-
/** 自定义日期格式下拉菜单 */
|
|
312
|
-
customDropdownMenu?: (dropdownMenuItem: DropdownMenuItem | DropdownMenuItem[]) => DropdownMenuItem | DropdownMenuItem[];
|
|
313
|
-
}
|
|
314
|
-
/** 数据面板字段粒度空值展示配置 */
|
|
315
|
-
export interface EmptyValueDisplayFieldConfig extends FieldCommonConfig {
|
|
316
|
-
type: FieldConfigTypes.emptyValueDisplay;
|
|
317
|
-
config?: EmptyValueDisplayConfig;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* 每个下拉菜单的选项
|
|
321
|
-
*/
|
|
322
|
-
export declare class DropdownMenuItem {
|
|
323
|
-
/** 当前配置项类型,如聚合,展示格式 */
|
|
324
|
-
type: string;
|
|
325
|
-
/** 唯一表示,不用value是因为需要和之前的逻辑保持兼容 */
|
|
326
|
-
id?: string;
|
|
327
|
-
/** 类名 */
|
|
328
|
-
className?: string;
|
|
329
|
-
title?: string | React.ReactNode;
|
|
330
|
-
icon?: React.ReactNode;
|
|
331
|
-
children?: {
|
|
332
|
-
[key in string]: DropdownMenuItem;
|
|
333
|
-
};
|
|
334
|
-
hasDivider?: boolean;
|
|
335
|
-
/** 是否禁用 */
|
|
336
|
-
disabled?: boolean;
|
|
337
|
-
/** 禁用提示 */
|
|
338
|
-
disabledTooltip?: string;
|
|
339
|
-
/** 是否隐藏 */
|
|
340
|
-
isHidden?: boolean;
|
|
341
|
-
selected?: boolean;
|
|
342
|
-
/** 操作icon列表 */
|
|
343
|
-
operatoredIcons?: any[];
|
|
344
|
-
/** 当前选中值 */
|
|
345
|
-
value?: string;
|
|
346
|
-
/** info信息 */
|
|
347
|
-
info?: string;
|
|
348
|
-
/** 额外的配置项,个别图表用到 */
|
|
349
|
-
extra?: {
|
|
350
|
-
/** 使用组内排序 */
|
|
351
|
-
hasGroupSort?: boolean;
|
|
352
|
-
/** 交叉表等禁用全局排序 */
|
|
353
|
-
disabledGlobalSort?: boolean;
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
/** 过滤器 | 更多 | 删除 | 隐藏 | 钻取 | 钻取并联动 | 自定义 */
|
|
357
|
-
export declare enum OperationTypes {
|
|
358
|
-
MORE = "more",
|
|
359
|
-
DRILL = "drill",
|
|
360
|
-
FILTER = "filter",
|
|
361
|
-
DELETE = "delete",
|
|
362
|
-
HIDE = "hide",
|
|
363
|
-
CUSTOM = "custom"
|
|
364
|
-
}
|
|
365
|
-
export interface FieldRuntime {
|
|
366
|
-
/** 是否是下钻根节点 */
|
|
367
|
-
isDrillRoot?: boolean;
|
|
368
|
-
fieldGroup?: any;
|
|
369
|
-
/** 在原数组中的序号 */
|
|
370
|
-
index?: number;
|
|
371
|
-
/** 下钻组是否折叠 */
|
|
372
|
-
isFold?: boolean;
|
|
373
|
-
/** 是否是新添加的字段,在component中不存在 */
|
|
374
|
-
isNew?: boolean;
|
|
375
|
-
/** 钉钉dsl补充字段信息 */
|
|
376
|
-
dslConfig?: {
|
|
377
|
-
dslCompId: string;
|
|
378
|
-
/** 聚合方式 */
|
|
379
|
-
aggregator?: Aggregator;
|
|
380
|
-
/** 排序 */
|
|
381
|
-
order?: 'ASC' | 'DESC';
|
|
382
|
-
/** 过滤器默认配置 */
|
|
383
|
-
filterDefaultConfig?: {
|
|
384
|
-
/** 默认值 */
|
|
385
|
-
defaultValues?: string[];
|
|
386
|
-
};
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
/** 字段组内具体字段的字段信息,包含是否隐藏等+columnList信息 */
|
|
390
|
-
export interface ChildFieldInfo {
|
|
391
|
-
/** 是否隐藏 */
|
|
392
|
-
isHidden: boolean;
|
|
393
|
-
/** 是否被选择过 */
|
|
394
|
-
hasSelected: boolean;
|
|
395
|
-
/** key,即attributeId */
|
|
396
|
-
key: string;
|
|
397
|
-
/** 其他Field信息(columnList) */
|
|
398
|
-
[key: string]: any;
|
|
399
|
-
}
|
|
400
|
-
/** 字段组的fieldInfo信息 */
|
|
401
|
-
export interface FieldGroupInfo {
|
|
402
|
-
/** 字段组在数据集中的节点信息 */
|
|
403
|
-
fieldGroup: FolderAndHierarchyNode;
|
|
404
|
-
/** 当前默认选中的节点id */
|
|
405
|
-
defaultFieldId: string;
|
|
406
|
-
/** 字段组中的所有字段节点信息 */
|
|
407
|
-
children: {
|
|
408
|
-
[key: string]: ChildFieldInfo;
|
|
409
|
-
};
|
|
410
|
-
/** 当前字段组的状态,单选|全选; undefined默认为default */
|
|
411
|
-
selectedType?: 'default' | 'all';
|
|
412
|
-
}
|
|
413
|
-
/** fieldinfo只能保存来自数据集的信息,通过uuid和component中的字段对应 */
|
|
414
|
-
export interface FieldInfo {
|
|
415
|
-
field?: Field;
|
|
416
|
-
attribute?: FieldAttribute;
|
|
417
|
-
uuid: string;
|
|
418
|
-
/** 字段运行时信息 */
|
|
419
|
-
runtime?: FieldRuntime;
|
|
420
|
-
/** 字段组field信息 */
|
|
421
|
-
fieldGroup?: FieldGroupInfo;
|
|
422
|
-
/** 字段集field信息 */
|
|
423
|
-
fieldCollection?: FieldCollectionInfo;
|
|
424
|
-
/** 字段为虚拟字段时,设置时使用的字段信息 */
|
|
425
|
-
configAreaItem?: DataConfigAreaItemColumn;
|
|
426
|
-
}
|
|
427
|
-
export interface ColumnFieldInfo {
|
|
428
|
-
uniqueId: string;
|
|
429
|
-
uuid: string;
|
|
430
|
-
fieldGroup: {
|
|
431
|
-
fieldGroupId: string;
|
|
432
|
-
defaultFieldId: string;
|
|
433
|
-
children: {
|
|
434
|
-
[key: string]: ChildFieldInfo;
|
|
435
|
-
};
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
|
-
export interface VirtualFieldInfo extends FieldInfo {
|
|
439
|
-
name: string;
|
|
440
|
-
icon?: React.ReactNode;
|
|
441
|
-
description?: React.ReactNode;
|
|
442
|
-
customRenderer?: React.ReactNode;
|
|
443
|
-
isVirtualField?: boolean;
|
|
444
|
-
}
|
|
445
|
-
/** [字段集]FieldCollectionInfo信息 */
|
|
446
|
-
export interface FieldCollectionInfo {
|
|
447
|
-
type: FieldCollectionType | null;
|
|
448
|
-
fieldCollection?: FolderAndHierarchyNode;
|
|
449
|
-
/** 字段集中的[类型:字段id]索引,目前仅经纬度组在使用 */
|
|
450
|
-
typeIndex?: {
|
|
451
|
-
type: string;
|
|
452
|
-
typeName: string;
|
|
453
|
-
id: string;
|
|
454
|
-
caption: string;
|
|
455
|
-
}[];
|
|
456
|
-
children?: {
|
|
457
|
-
[key: string]: FieldInfo;
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
export interface AreaMapItem {
|
|
461
|
-
fields: FieldInfo[];
|
|
462
|
-
id: RetainAreaId | string;
|
|
463
|
-
drillGroupCount?: number;
|
|
464
|
-
/** 允许和哪个area进行字段交换,值为areaId */
|
|
465
|
-
allowExchangeWith?: string;
|
|
466
|
-
componentId: string;
|
|
467
|
-
allowDimensionRepeat?: boolean;
|
|
468
|
-
cubeQueryTime: string;
|
|
469
|
-
}
|
|
470
|
-
export type AreaMap = {
|
|
471
|
-
[key: string]: AreaMapItem;
|
|
472
|
-
};
|
|
473
|
-
/** 字段的下拉菜单配置,保存在ref中,防止ping'fan */
|
|
474
|
-
export interface FieldMenuConfig {
|
|
475
|
-
menu?: DropdownMenuItem[];
|
|
476
|
-
fieldInfo?: FieldInfo;
|
|
477
|
-
areaId?: string;
|
|
478
|
-
fieldConfig?: CompFieldConfig;
|
|
479
|
-
aliasDesc?: {
|
|
480
|
-
fieldName: string;
|
|
481
|
-
aliasName: string;
|
|
482
|
-
desc?: string;
|
|
483
|
-
};
|
|
484
|
-
/** 是否是指标树节点 */
|
|
485
|
-
isNode?: boolean;
|
|
486
|
-
nodeInfo?: {
|
|
487
|
-
uuid: string;
|
|
488
|
-
name: string;
|
|
489
|
-
};
|
|
490
|
-
hasChildren?: boolean;
|
|
491
|
-
expanded?: boolean;
|
|
492
|
-
}
|
|
493
|
-
export type ChangeFieldMenuConfigs = (c?: FieldMenuConfig | ((c: FieldMenuConfig[]) => FieldMenuConfig[])) => FieldMenuConfig[];
|
|
494
|
-
export interface CompFieldConfig {
|
|
495
|
-
field: any;
|
|
496
|
-
path: (string | number)[];
|
|
497
|
-
}
|
|
498
|
-
export declare class OperationMenuItem {
|
|
499
|
-
type: OperationTypes;
|
|
500
|
-
/** hover提示文字 */
|
|
501
|
-
title?: string | React.ReactNode | ((component: any, fieldInfo: FieldInfo, fieldConfig?: CompFieldConfig) => React.ReactNode);
|
|
502
|
-
/** 是否是激活态 */
|
|
503
|
-
isActive?: boolean | ((component: any, fieldInfo: FieldInfo, fieldConfig?: CompFieldConfig) => boolean);
|
|
504
|
-
/** 自定义菜单点击事件 */
|
|
505
|
-
onClick?: ({ handleClickMenu, getCurrentFieldConfig, menuConfig, }: {
|
|
506
|
-
handleClickMenu: Function;
|
|
507
|
-
getCurrentFieldConfig: Function;
|
|
508
|
-
menuConfig: DropdownMenuItem[];
|
|
509
|
-
}) => void;
|
|
510
|
-
icon?: React.ReactNode;
|
|
511
|
-
disabled?: boolean;
|
|
512
|
-
/** 是否展示 */
|
|
513
|
-
visible?: boolean | ((component: any, fieldInfo: FieldInfo) => boolean);
|
|
514
|
-
action?: (fieldInfo: FieldInfo, area: DataSchemaAreaItem, e: React.MouseEvent) => any;
|
|
515
|
-
}
|
|
516
|
-
export declare class DataSchemaRule {
|
|
517
|
-
/** 默认展示值 */
|
|
518
|
-
placeholder?: string;
|
|
519
|
-
/** 字段配置个数限制 */
|
|
520
|
-
maxColNum?: number | ((areaMap: AreaMap, options: {
|
|
521
|
-
isConvertQueryInput?: boolean;
|
|
522
|
-
isSilent?: boolean;
|
|
523
|
-
nextFields?: FieldInfo[];
|
|
524
|
-
prevFields?: FieldInfo[];
|
|
525
|
-
area?: DataSchemaAreaItem;
|
|
526
|
-
}) => {
|
|
527
|
-
/** 字段数最大值 */
|
|
528
|
-
value: number;
|
|
529
|
-
/** 是否通过校验 */
|
|
530
|
-
isValid: boolean;
|
|
531
|
-
/** 是否展示字段数上限 */
|
|
532
|
-
hideMaxColNum: boolean;
|
|
533
|
-
/** 未通过校验的提示信息 */
|
|
534
|
-
msg?: {
|
|
535
|
-
type: string;
|
|
536
|
-
text: string;
|
|
537
|
-
};
|
|
538
|
-
} | number);
|
|
539
|
-
/** 是否取数必须 */
|
|
540
|
-
required?: boolean;
|
|
541
|
-
/** 允许拖拽的字段类型 */
|
|
542
|
-
fieldTypes?: FieldType[];
|
|
543
|
-
/** 允许拖入的字段组类型 */
|
|
544
|
-
fieldGroupTypes?: FieldGroupType[];
|
|
545
|
-
/** 允许拖入的字段集类型 */
|
|
546
|
-
fieldCollectionTypes?: FieldCollectionType[];
|
|
547
|
-
/** 细粒度字段类型 */
|
|
548
|
-
secondFieldTypes?: SecondFieldType[];
|
|
549
|
-
/** 地理粒度字段类型 */
|
|
550
|
-
granularityTypes?: RegionGranularity[];
|
|
551
|
-
/** 是否不允许双击自动添加字段 */
|
|
552
|
-
disableDblAddField?: boolean | ((component: any, options?: {
|
|
553
|
-
mobileView?: boolean;
|
|
554
|
-
}) => boolean);
|
|
555
|
-
/** 是否不允许拖拽添加字段 */
|
|
556
|
-
disableDragAddField?: boolean;
|
|
557
|
-
/** 字段数量为0是否隐藏 */
|
|
558
|
-
hidden?: boolean | ((component: any, options?: {
|
|
559
|
-
mobileView?: boolean;
|
|
560
|
-
}) => boolean);
|
|
561
|
-
/** 是否可以配置多个下钻组 一般图表只支持一个,而交叉表最多支持三个 */
|
|
562
|
-
drillGroupCount?: number;
|
|
563
|
-
/** 允许和其后的area调换位置 */
|
|
564
|
-
allowExchangeWithNext?: boolean;
|
|
565
|
-
/** 允许维度与其他area重复校验 */
|
|
566
|
-
allowDimensionRepeat?: boolean;
|
|
567
|
-
/** 允许字段组开启全选功能 */
|
|
568
|
-
allowSelectedAllInFieldGroup?: boolean;
|
|
569
|
-
}
|
|
570
|
-
export declare class DataSchemaAreaItem {
|
|
571
|
-
/** area id */
|
|
572
|
-
id: RetainAreaId | string;
|
|
573
|
-
/** area 名称 */
|
|
574
|
-
name: string;
|
|
575
|
-
/** 名称右边的提示icon内容 */
|
|
576
|
-
nameTip?: React.ReactNode;
|
|
577
|
-
/** 名称前面的自定义icon */
|
|
578
|
-
namePrefixIcon?: React.ReactNode;
|
|
579
|
-
/** 名称后面的自定义icon */
|
|
580
|
-
nameSuffix?: (component: any) => React.ReactNode;
|
|
581
|
-
/** 组合图特有,表示轴的状态 */
|
|
582
|
-
chartStatus?: ChartStatus;
|
|
583
|
-
/** 组合图轴状态不支持选项 */
|
|
584
|
-
chartStatusExclude?: ChartStatus[];
|
|
585
|
-
/** 堆积柱图/条形图特有,表示排序类型 */
|
|
586
|
-
stackedSortType?: StackedSortType;
|
|
587
|
-
/** 是否支持多度量和颜色图例并存 */
|
|
588
|
-
isMultiMeasureWithColorLegend?: boolean;
|
|
589
|
-
/** 是否可以批量设置 */
|
|
590
|
-
allowBatchConfig?: boolean | ((areaMap: AreaMap) => boolean);
|
|
591
|
-
/** 字段类型 */
|
|
592
|
-
queryAxis?: QueryAxisType;
|
|
593
|
-
/** 规则配置 */
|
|
594
|
-
rule?: DataSchemaRule;
|
|
595
|
-
/** 注入样式 */
|
|
596
|
-
style?: {
|
|
597
|
-
/** areaWrapper 样式 */
|
|
598
|
-
wrapper?: React.CSSProperties;
|
|
599
|
-
};
|
|
600
|
-
hooks?: {
|
|
601
|
-
/** 字段拖入之后的处理 */
|
|
602
|
-
afterDrag?: (nextFields: FieldInfo[], areaMap: AreaMap, from: string, to: string) => FieldInfo[];
|
|
603
|
-
/** 字段拖放时的预处理,校验失败中止拖放,进入其他逻辑 */
|
|
604
|
-
beforeDrop?: (component: any, lastFields: FieldInfo[], dragFields: FieldInfo[], onFreshComponent: OnFreshComponentType) => ValidateResult;
|
|
605
|
-
/** 拖放的时候的回调,校验失败返回报错信息 */
|
|
606
|
-
onDrop?: (areaMap: AreaMap, lastFields: FieldInfo[]) => ValidateResult;
|
|
607
|
-
/** 同步字段到component的之前的钩子 */
|
|
608
|
-
beforeSyncFieldsToComponent?: (component: any, areaMap: AreaMap) => {
|
|
609
|
-
component: any;
|
|
610
|
-
};
|
|
611
|
-
/** 获取字段的钩子 */
|
|
612
|
-
getAreaFieldsBeforeRender?: (fields: FieldInfo[], component: any) => (FieldInfo | VirtualFieldInfo)[];
|
|
613
|
-
/** 生成虚拟字段方法 */
|
|
614
|
-
getVirtualFields?: (areaMap: AreaMap, component: any) => {
|
|
615
|
-
virtualFields: VirtualFieldInfo[];
|
|
616
|
-
/** 虚拟字段是否允许拖拽 */
|
|
617
|
-
draggable?: boolean;
|
|
618
|
-
/** 虚拟字段的相对于其他字段的位置 */
|
|
619
|
-
placement?: 'before' | 'after';
|
|
620
|
-
};
|
|
621
|
-
};
|
|
622
|
-
/** 字段配置项信息 */
|
|
623
|
-
fieldConfigs?: FieldConfigs;
|
|
624
|
-
/** 是否关闭字段配置信息功能 */
|
|
625
|
-
hideAllFieldConfigs?: boolean;
|
|
626
|
-
/** 支持的icon菜单列表 */
|
|
627
|
-
operationList?: OperationMenuItem[];
|
|
628
|
-
/** area dom 插槽,主要用来自定义一些图表的特殊配置组件,目前只实现了
|
|
629
|
-
* 底部插槽,后续有需要再接
|
|
630
|
-
*/
|
|
631
|
-
slot?: Partial<{
|
|
632
|
-
/** 区域头,底部插槽 */
|
|
633
|
-
headerBottom: (component: any, freshComponent: OnFreshComponentType) => React.ReactNode;
|
|
634
|
-
/** 区域底部插槽 */
|
|
635
|
-
bottom: (component: any, freshComponent: OnFreshComponentType) => React.ReactNode;
|
|
636
|
-
/** 区域头,顶部插槽 */
|
|
637
|
-
headerTop: (component: any, freshComponent: OnFreshComponentType) => React.ReactNode;
|
|
638
|
-
}>;
|
|
639
|
-
}
|
|
640
|
-
declare enum AssociateFieldStatus {
|
|
641
|
-
close = "close",
|
|
642
|
-
selfOpen = "selfOpen",
|
|
643
|
-
autoOpen = "autoOpen"
|
|
644
|
-
}
|
|
645
|
-
export interface OnFreshComponentOptions {
|
|
646
|
-
/** 撤销重做options @雅影 */
|
|
647
|
-
disableUndo?: boolean;
|
|
648
|
-
grouped?: string;
|
|
649
|
-
isClickButton?: boolean;
|
|
650
|
-
refreshMobileChart?: boolean;
|
|
651
|
-
/**
|
|
652
|
-
* 触发源(目前仅用于继承型属性打标)
|
|
653
|
-
* ReloadCube = 刷新数据集
|
|
654
|
-
* ExtendCube = 用户修改过配置 切回自动继续继承数据集的场景
|
|
655
|
-
*/
|
|
656
|
-
triggerSource?: 'ReloadCube' | 'ExtendCube';
|
|
657
|
-
/** 取数时是否禁用轮询缓存 */
|
|
658
|
-
noPollingCache?: boolean;
|
|
659
|
-
/** 数据集 */
|
|
660
|
-
cubeBlendConfig?: {
|
|
661
|
-
/** 数据集组合集id */
|
|
662
|
-
uniqueId: string;
|
|
663
|
-
/** 数据集组合集已使用的关联字段 uuid */
|
|
664
|
-
usedBlendAssociateFields?: {
|
|
665
|
-
uniqueId: string;
|
|
666
|
-
status: AssociateFieldStatus;
|
|
667
|
-
}[];
|
|
668
|
-
};
|
|
669
|
-
cubeBlendMapping?: {
|
|
670
|
-
[uniqueId in string]: BlendSchema;
|
|
671
|
-
};
|
|
672
|
-
/** 需要更新的 mapping */
|
|
673
|
-
patchCubeMapping?: {
|
|
674
|
-
[key: string]: CubeModel;
|
|
675
|
-
};
|
|
676
|
-
isFreshComponent?: boolean;
|
|
677
|
-
/** 切换数据集时是否要继承之前设置的关联字段。
|
|
678
|
-
* 目前逻辑是切换数据集组合对关联字段需要保留,编辑数据集组合后,之前设置的字段关联会被重置(会存在主副数据集切换的场景,之前设置的关联字段会失效)
|
|
679
|
-
*/
|
|
680
|
-
isExtendAssociateFields?: boolean;
|
|
681
|
-
}
|
|
682
|
-
export type OnChangeCubeOptions = Omit<OnFreshComponentOptions, 'isClickButton' | 'refreshMobileChart' | 'ReloadCube' | 'noPollingCache'>;
|
|
683
|
-
export type OnFreshComponentType = (comp: any, changeAttributeList?: string[], isFresh?: boolean, options?: OnFreshComponentOptions) => any;
|
|
684
|
-
export interface Message {
|
|
685
|
-
type: 'success' | 'warn' | 'info' | 'error';
|
|
686
|
-
text: string;
|
|
687
|
-
}
|
|
688
|
-
export declare const DropDownMenuType: {
|
|
689
|
-
/** 排序 */
|
|
690
|
-
order: string;
|
|
691
|
-
/** 聚合方式 */
|
|
692
|
-
aggregater: string;
|
|
693
|
-
/** 高级计算 */
|
|
694
|
-
calculation: string;
|
|
695
|
-
/** 同环比 */
|
|
696
|
-
ratio: string;
|
|
697
|
-
/** 数值格式化 */
|
|
698
|
-
numberFormat: string;
|
|
699
|
-
/** 对齐方式 */
|
|
700
|
-
alignment: string;
|
|
701
|
-
/** 垂直对齐方式 */
|
|
702
|
-
verticalAlignment: string;
|
|
703
|
-
/** 图片尺寸 */
|
|
704
|
-
imageSize: string;
|
|
705
|
-
/** 时间格式化 */
|
|
706
|
-
timeFormat: string;
|
|
707
|
-
/** 组合图展示格式 */
|
|
708
|
-
chartType: string;
|
|
709
|
-
/** 重命名 */
|
|
710
|
-
renameSetting: string;
|
|
711
|
-
/** 百分比 */
|
|
712
|
-
percentile: string;
|
|
713
|
-
/** 字段排序 */
|
|
714
|
-
fieldOrder: string;
|
|
715
|
-
/** 最后时间点,这里因为id为字段的pathId,所以不适用聚合方式类型,避免无法区分问题 */
|
|
716
|
-
lastPeriod: string;
|
|
717
|
-
/** 开始时间点 */
|
|
718
|
-
firstPeriod: string;
|
|
719
|
-
/** 字段组替换 */
|
|
720
|
-
switchFieldGroup: string;
|
|
721
|
-
/** 字段组全选功能 */
|
|
722
|
-
selectAllFieldGroup: string;
|
|
723
|
-
/** 指标管理默认展开配置 */
|
|
724
|
-
defaultExpand: string;
|
|
725
|
-
/** 隐藏字段 */
|
|
726
|
-
hideField: string;
|
|
727
|
-
/** 下钻配置的辅助字段(交叉表、明细表存在) */
|
|
728
|
-
auxiliaryField: string;
|
|
729
|
-
/** 时间补齐 */
|
|
730
|
-
timeCompletion: string;
|
|
731
|
-
/** 空值展示配置 */
|
|
732
|
-
emptyValueDisplay: string;
|
|
733
|
-
};
|
|
734
|
-
export {};
|