@quickbi/bi-types 3.0.49 → 3.0.50
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 +5455 -30
- package/cjs/index.js +67 -4
- package/esm/index.d.ts +5455 -30
- package/esm/index.mjs +67 -4
- package/package.json +4 -2
- 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,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 忘悠
|
|
3
|
-
* @description 数据面板图表接入模型
|
|
4
|
-
*/
|
|
5
|
-
import type { AreaMap, DataSchemaAreaItem, ValidateResult, OnFreshComponentType } from './data-schema-item';
|
|
6
|
-
import type { Platform } from '../open/components/data-schema';
|
|
7
|
-
import type { FieldConfigRow } from './base';
|
|
8
|
-
export declare class ResultDisplay {
|
|
9
|
-
/** 上下限 */
|
|
10
|
-
upLimit?: number;
|
|
11
|
-
downLimit?: number;
|
|
12
|
-
/** 是否展示全量选择按钮 */
|
|
13
|
-
isShowAll?: boolean;
|
|
14
|
-
/** 是否隐藏展示结果设置 */
|
|
15
|
-
hide?: boolean;
|
|
16
|
-
/** hover在数值输入框的tooltip */
|
|
17
|
-
inputTooltip?: React.ReactNode;
|
|
18
|
-
}
|
|
19
|
-
export declare class DataPanelDataSchema {
|
|
20
|
-
/** 禁用调整面板大小以及收起展开功能 */
|
|
21
|
-
disableResize?: boolean;
|
|
22
|
-
/** 禁用收起展开功能 */
|
|
23
|
-
disableCollapse?: boolean;
|
|
24
|
-
/** 隐藏数据面板更新按钮 */
|
|
25
|
-
disableUpdate?: boolean;
|
|
26
|
-
/** 高级查询控件采用之前面板的模式,比较特殊 */
|
|
27
|
-
advanceQueryMode?: boolean;
|
|
28
|
-
areas?: DataSchemaAreaItem[];
|
|
29
|
-
/** 结果展示 */
|
|
30
|
-
resultDisplay?: ResultDisplay;
|
|
31
|
-
/** 是否需要 */
|
|
32
|
-
alwaysFresh?: boolean;
|
|
33
|
-
hooks?: {
|
|
34
|
-
/** 点击更新按钮之前的钩子 */
|
|
35
|
-
beforeUpdateComponent?: (component: any, platform?: Platform) => {
|
|
36
|
-
component: any;
|
|
37
|
-
};
|
|
38
|
-
/** 替换点击更新按钮的逻辑,返回点击更新成功与失败状态,成功的时候必须返回最新的component */
|
|
39
|
-
handleClickUpdate?: (p: {
|
|
40
|
-
component: any;
|
|
41
|
-
onFreshComponent: OnFreshComponentType;
|
|
42
|
-
}) => {
|
|
43
|
-
/** success true意味着更新成功,触发取数 */
|
|
44
|
-
success: boolean;
|
|
45
|
-
component?: any;
|
|
46
|
-
};
|
|
47
|
-
/** 点击聚合明细按钮的钩子,点击之后会更新component */
|
|
48
|
-
onClickQueryDetailBtns?: (component: any) => {
|
|
49
|
-
component: any;
|
|
50
|
-
};
|
|
51
|
-
/** 点击更新按钮时的自定义校验 */
|
|
52
|
-
beforeUpdateComponentValidate?: (areaMap: AreaMap, component: any) => ValidateResult;
|
|
53
|
-
/** 转换为component inputquery模型时调用 */
|
|
54
|
-
reviseWhenConvertToQueryInput?: (input: any) => any;
|
|
55
|
-
/** 动态更新dataSchema */
|
|
56
|
-
reviseDataSchemaByComponent?: (dataSchema: DataPanelDataSchema, options?: {
|
|
57
|
-
/** 是否是组件创建初始化,若为true,此时 attribute等参数不起作用,可以省略 */
|
|
58
|
-
isInit?: boolean;
|
|
59
|
-
/** 根据组件attribute动态更新dataSchema */
|
|
60
|
-
attribute?: any;
|
|
61
|
-
/** component信息,for 大屏 */
|
|
62
|
-
component?: any;
|
|
63
|
-
}) => DataPanelDataSchema;
|
|
64
|
-
/** 其他图表切换到当前图表订正input */
|
|
65
|
-
reviseInputWhenSwitchComponent?: {
|
|
66
|
-
/** 来源图表类型,如果没命中,则走默认订正逻辑 */
|
|
67
|
-
fromList: any[];
|
|
68
|
-
reviser: (fromInput: any, dftToInput: any, from: any, to: any) => any;
|
|
69
|
-
};
|
|
70
|
-
/** 指标树管理,趋势分析表用到 */
|
|
71
|
-
indicatorTreeManager?: {
|
|
72
|
-
setter: (component: any, newHierarchicalData?: any[]) => any;
|
|
73
|
-
getter: (component: any) => any[];
|
|
74
|
-
};
|
|
75
|
-
/** 自定义是否支持自动刷新的hook */
|
|
76
|
-
getSupportAutoRefresh?: (component: any) => boolean;
|
|
77
|
-
};
|
|
78
|
-
/** 批量字段配置相关 */
|
|
79
|
-
batchFieldSettingConfig?: {
|
|
80
|
-
/** 自定义批量字段设置表头 */
|
|
81
|
-
customFiledConfigRow?: (headerRow: FieldConfigRow) => FieldConfigRow;
|
|
82
|
-
};
|
|
83
|
-
/** 开启聚合明细按钮组 */
|
|
84
|
-
showQueryDetailBtns?: boolean;
|
|
85
|
-
/** 关闭度量重复校验 */
|
|
86
|
-
allowMeasureRepeat?: boolean;
|
|
87
|
-
/** 是否支持数据混合 */
|
|
88
|
-
supportCubeBlend?: boolean | ((component: any) => boolean);
|
|
89
|
-
/** 是否允许在同个area中,出现相同的维度字段 */
|
|
90
|
-
allowDimRepeatInOneArea?: boolean;
|
|
91
|
-
isShowCube?: (component: any) => boolean;
|
|
92
|
-
/** 面板插槽,主要用来自定义一些图表的特殊配置组件
|
|
93
|
-
*/
|
|
94
|
-
slot?: Partial<{
|
|
95
|
-
/** area配置区域包裹层插槽 */
|
|
96
|
-
areasWrapper: (props: {
|
|
97
|
-
component: any;
|
|
98
|
-
onFreshComponent: OnFreshComponentType;
|
|
99
|
-
}) => React.ReactElement;
|
|
100
|
-
}>;
|
|
101
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CommonCompInputAreaType, ConfigCellOption, FieldConfigRow } from './base';
|
|
2
|
-
import { CommonCompInputAreaTypeEnum, QueryAxisType, FieldType, CUSTOM_FIELD_TYPES, SecondFieldType, ChartStatus, StackedSortType, ResultMode, RetainAreaId, ConfigCellType, ConfigColumnType, CheckBoxState, FieldGroupType, FieldCollectionType, LnglatGroupChildFlags } from './base';
|
|
3
|
-
import type { CommonCompInputComplexFilter, TimeTypeFilter, CommonCompInputComplexFilterItem, TableCalculateParam, CalcOrder, TopNParams } from './data-config';
|
|
4
|
-
import { DataConfig, DataConfigAreaItemColumn, TableType, TableDirection, ProportionType, AccumulateCalcType } from './data-config';
|
|
5
|
-
import type { FieldConfigs, FieldInfo, ChildFieldInfo, DropDownMenuFieldConfig, AlignConfig, AggregationConfig, AdvancedCalculationConfig, ContrastConfig, NumberFormatConfig, FieldRuntime, CompFieldConfig, LabelConfig, AreaMapItem, AreaMap, VirtualFieldInfo, ResetFieldConfigType, ResetMenuType, SortConfig, Message, OnFreshComponentType, OnFreshComponentOptions, OnChangeCubeOptions, FieldMenuConfig, ChangeFieldMenuConfigs, ColumnFieldInfo, FieldCollectionInfo, ValidateResult, AuxiliaryFieldConfig, EmptyValueDisplayFieldConfig } from './data-schema-item';
|
|
6
|
-
import { DataSchemaAreaItem, OperationMenuItem, DropdownMenuItem, OperationTypes, Aggregators, FieldConfigTypes, ContrastTypes, AdvanceCalTypes, AdvanceCalcDateTypes, NumberFormats, AlignTypes, VerticalAlignTypes, AlignmentCategory, SortTypes, FieldChartTypes, ImageSizes, DropDownMenuType, DataSchemaRule, FieldGroupSelectorType } from './data-schema-item';
|
|
7
|
-
import { DataPanelDataSchema, ResultDisplay } from './data-schema';
|
|
8
|
-
export { DataSchemaRule, CommonCompInputAreaTypeEnum, DataConfig, DataConfigAreaItemColumn, TableType, TableDirection, DataPanelDataSchema, DataSchemaAreaItem, OperationMenuItem, DropdownMenuItem, OperationTypes, Aggregators, FieldConfigTypes, ContrastTypes, AdvanceCalTypes, AdvanceCalcDateTypes, NumberFormats, AlignTypes, VerticalAlignTypes, AlignmentCategory, SortTypes, FieldGroupSelectorType, FieldChartTypes, ImageSizes, CUSTOM_FIELD_TYPES, FieldType, QueryAxisType, DropDownMenuType, SecondFieldType, ChartStatus, StackedSortType, ResultMode, RetainAreaId, ConfigCellType, ConfigColumnType, CheckBoxState, ResultDisplay, FieldGroupType, ProportionType, AccumulateCalcType, FieldCollectionType, LnglatGroupChildFlags, };
|
|
9
|
-
export type { CommonCompInputAreaType, FieldInfo, ChildFieldInfo, FieldConfigs, DropDownMenuFieldConfig, AlignConfig, AggregationConfig, AdvancedCalculationConfig, ContrastConfig, NumberFormatConfig, FieldRuntime, CompFieldConfig, LabelConfig, TimeTypeFilter, CommonCompInputComplexFilter, ResetFieldConfigType, CommonCompInputComplexFilterItem, AreaMapItem, AreaMap, VirtualFieldInfo, ResetMenuType, SortConfig, Message, OnFreshComponentType, OnFreshComponentOptions, OnChangeCubeOptions, ConfigCellOption, FieldConfigRow, FieldMenuConfig, ChangeFieldMenuConfigs, ColumnFieldInfo, FieldCollectionInfo, AuxiliaryFieldConfig, ValidateResult, TableCalculateParam, CalcOrder, TopNParams, EmptyValueDisplayFieldConfig, };
|
package/esm/etl.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/** etl发布状态 */
|
|
2
|
-
export declare enum EtlPublishStatus {
|
|
3
|
-
/** 未发布 */
|
|
4
|
-
unPublisHed = 0,
|
|
5
|
-
/** 已发布 */
|
|
6
|
-
published = 1,
|
|
7
|
-
/** 已发布并且编辑保存正确 */
|
|
8
|
-
publishedEditOK = 2,
|
|
9
|
-
/** 下线 */
|
|
10
|
-
offline = 3,
|
|
11
|
-
/** 已发布但编辑有错误 */
|
|
12
|
-
publishedEditError = 4
|
|
13
|
-
}
|
|
14
|
-
/** etl 调度状态 */
|
|
15
|
-
/**
|
|
16
|
-
* NOT_RUN(-1, "未运行"),
|
|
17
|
-
READY_TO_RUN(1, "调度中待运行"),
|
|
18
|
-
RUNNING(2, "运行中"),
|
|
19
|
-
RUN_SUCCESS(3, "执行成功"),
|
|
20
|
-
RUN_FAILED(4, "执行失败"),
|
|
21
|
-
MANUAL_TERMINATED(5, "手动终止"),
|
|
22
|
-
*/
|
|
23
|
-
export declare enum EtlScheduleStatus {
|
|
24
|
-
/** 未运行 */
|
|
25
|
-
NotRun = -1,
|
|
26
|
-
/** 调度中待运行 */
|
|
27
|
-
ReadyToRun = 1,
|
|
28
|
-
/** 运行中 */
|
|
29
|
-
Running = 2,
|
|
30
|
-
/** 执行成功 */
|
|
31
|
-
RunSuccess = 3,
|
|
32
|
-
/** 执行失败 */
|
|
33
|
-
RunFailed = 4,
|
|
34
|
-
/** 手动终止 */
|
|
35
|
-
ManualTerminated = 5
|
|
36
|
-
}
|
|
37
|
-
/** elt 产物状态 */
|
|
38
|
-
export declare enum EtlProductStatus {
|
|
39
|
-
/**
|
|
40
|
-
* 正常输出中
|
|
41
|
-
*/
|
|
42
|
-
Running = 1,
|
|
43
|
-
/** 已解绑 */
|
|
44
|
-
UnBind = 2,
|
|
45
|
-
/** 已删除 */
|
|
46
|
-
Deleted = 3
|
|
47
|
-
}
|
|
48
|
-
/** etl 产物信息 */
|
|
49
|
-
export interface IEtlMeta {
|
|
50
|
-
/** etl 信息 */
|
|
51
|
-
etlId: string;
|
|
52
|
-
/** etl name */
|
|
53
|
-
etlName: string;
|
|
54
|
-
/** elt 发布状态 */
|
|
55
|
-
etlPublishStatus: EtlPublishStatus;
|
|
56
|
-
/** 是否停止调度了 */
|
|
57
|
-
etlSchedulePaused: boolean;
|
|
58
|
-
/** 创建时间 */
|
|
59
|
-
gmtCreate: string;
|
|
60
|
-
/** 修改时间 */
|
|
61
|
-
gmtModified: string;
|
|
62
|
-
/** 作品id */
|
|
63
|
-
productId: string;
|
|
64
|
-
/** 产物名称 */
|
|
65
|
-
productName: string;
|
|
66
|
-
/** 作品地址,数据源id或者文件夹id */
|
|
67
|
-
productAimDirId: string;
|
|
68
|
-
/** 文件夹名称或者数据源名称 */
|
|
69
|
-
productAimDirName: string;
|
|
70
|
-
/** 产物状态 已删除等 */
|
|
71
|
-
productStatus: EtlProductStatus;
|
|
72
|
-
/** 产物类型,数据表或数据集 */
|
|
73
|
-
productType: string;
|
|
74
|
-
/** 最后一次调度状态 */
|
|
75
|
-
lastScheduleStatus: EtlScheduleStatus;
|
|
76
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 开放事件类型定义
|
|
4
|
-
*/
|
|
5
|
-
import type { EnumAsUnion } from './tools';
|
|
6
|
-
/** 开放相关事件枚举, 取值固定为 before-xxx-event, after-xxx-event */
|
|
7
|
-
export declare enum OpenEventTypeEnum {
|
|
8
|
-
/** 嵌入事件-页面跳转前 */
|
|
9
|
-
'before-page-change-event' = "before-page-change-event",
|
|
10
|
-
/** 自定义事件-下载前 */
|
|
11
|
-
'before-download-event' = "before-download-event",
|
|
12
|
-
/** 自定义事件-页面加载前 */
|
|
13
|
-
'before-page-loaded-event' = "before-page-loaded-event",
|
|
14
|
-
/** 自定义事件-发布前 */
|
|
15
|
-
'before-publish-event' = "before-publish-event"
|
|
16
|
-
}
|
|
17
|
-
/** 开放相关事件取值固定为 before-xxx-event, after-xxx-event */
|
|
18
|
-
export type OpenEventTypeValue = `before-${string}-event` | `after-${string}-event`;
|
|
19
|
-
/** 开放事件名类型校验器 */
|
|
20
|
-
export type CreateOpenEventTypeUnion<T extends OpenEventTypeValue> = T extends OpenEventTypeValue ? T : never;
|
|
21
|
-
/** 开放相关页面类型值联合类型 */
|
|
22
|
-
export type OpenEventTypeUnion = CreateOpenEventTypeUnion<EnumAsUnion<typeof OpenEventTypeEnum>>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 开放页面类型定义
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated 开放相关页面类型枚举, 注意要和 routerKkey 做区分, 这个 key 后续要废弃
|
|
7
|
-
* */
|
|
8
|
-
export declare enum OpenPageTypeEnum {
|
|
9
|
-
/** 仪表板 */
|
|
10
|
-
dashboard = "dashboard",
|
|
11
|
-
/** 电子表格 */
|
|
12
|
-
webExcel = "webExcel",
|
|
13
|
-
/** 数据大屏 */
|
|
14
|
-
screen = "screen",
|
|
15
|
-
/** 自助取数 */
|
|
16
|
-
offline = "offline",
|
|
17
|
-
/** 即席分析 */
|
|
18
|
-
analysis = "analysis"
|
|
19
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 开放工具类型定义
|
|
4
|
-
*/
|
|
5
|
-
type StringValues<T> = {
|
|
6
|
-
[K in keyof T]: T[K] extends string ? T[K] : never;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type NumberValues<T> = {
|
|
9
|
-
[K in keyof T]: T[K] extends number ? T[K] : never;
|
|
10
|
-
}[keyof T];
|
|
11
|
-
/** 类型实现接口 */
|
|
12
|
-
export type Implements<T, U extends keyof U extends keyof T ? T : never> = U;
|
|
13
|
-
/**
|
|
14
|
-
* 将 enum 的 value 值转为 union
|
|
15
|
-
* @usage EnumAsUnion<typeof MyEnum>
|
|
16
|
-
*/
|
|
17
|
-
export type EnumAsUnion<T> = `${StringValues<T>}` | NumberValues<T>;
|
|
18
|
-
/**
|
|
19
|
-
* 字符串中划线类型
|
|
20
|
-
* @usage Kebab<'aaa-bbb'>
|
|
21
|
-
*/
|
|
22
|
-
export type KebabCase<T extends string, A extends string = ''> = T extends `${infer F}${infer R}` ? KebabCase<R, `${A}${F extends Lowercase<F> ? '' : '-'}${Lowercase<F>}`> : A;
|
|
23
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 组件生命周期
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* 开放组件生命周期属性
|
|
7
|
-
*/
|
|
8
|
-
export interface LifecycleProps<T = object> {
|
|
9
|
-
container?: HTMLElement;
|
|
10
|
-
customProps?: T;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* 开机阶段钩子
|
|
14
|
-
*/
|
|
15
|
-
export type LifecycleBootstrap<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
|
|
16
|
-
/**
|
|
17
|
-
* 渲染阶段钩子
|
|
18
|
-
*/
|
|
19
|
-
export type LifecycleMount<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
|
|
20
|
-
/**
|
|
21
|
-
* 卸载阶段钩子
|
|
22
|
-
*/
|
|
23
|
-
export type LifecycleUnmount<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
|
|
24
|
-
/**
|
|
25
|
-
* 更新阶段钩子
|
|
26
|
-
*/
|
|
27
|
-
export type LifecycleUpdate<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
|
|
28
|
-
/**
|
|
29
|
-
* 开放组件生命周期
|
|
30
|
-
*/
|
|
31
|
-
export interface Lifecycle {
|
|
32
|
-
bootstrap?: LifecycleBootstrap;
|
|
33
|
-
mount?: LifecycleMount;
|
|
34
|
-
unmount?: LifecycleUnmount;
|
|
35
|
-
update?: LifecycleUpdate;
|
|
36
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 组件元信息接口
|
|
4
|
-
*/
|
|
5
|
-
import type { ComponentProps } from './component-props';
|
|
6
|
-
import type { DataSchema } from './data-schema';
|
|
7
|
-
import type { MenuSchema } from '../menus/menu-schema';
|
|
8
|
-
import type { StyleSchema } from './style-schema';
|
|
9
|
-
/**
|
|
10
|
-
* 面板配置
|
|
11
|
-
*/
|
|
12
|
-
export interface ComponentMetaPropsSchema {
|
|
13
|
-
/** 数据面板配置 */
|
|
14
|
-
dataSchema?: DataSchema;
|
|
15
|
-
/** 样式面板配置 */
|
|
16
|
-
styleSchema?: StyleSchema | ((componentProps: ComponentProps) => StyleSchema);
|
|
17
|
-
/** 高级面板配置 */
|
|
18
|
-
advancedSchema?: StyleSchema | ((componentProps: ComponentProps) => StyleSchema);
|
|
19
|
-
/** 自定义菜单配置 */
|
|
20
|
-
menuSchema?: MenuSchema;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* 组件元信息
|
|
24
|
-
*/
|
|
25
|
-
export interface ComponentMeta {
|
|
26
|
-
propsSchema?: ComponentMetaPropsSchema;
|
|
27
|
-
}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 组件 props 接口
|
|
4
|
-
*/
|
|
5
|
-
import type { NumberFormat } from '../../chart-config';
|
|
6
|
-
import type { DataCell, AreaModel, GlobalConfig } from '../../standard-model';
|
|
7
|
-
export interface ComponentPropsGlobalConfig extends GlobalConfig {
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated
|
|
10
|
-
* 预览态 编辑态
|
|
11
|
-
* */
|
|
12
|
-
renderMode?: 'render' | 'edit';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* 图表关联数据集 配置
|
|
16
|
-
* */
|
|
17
|
-
export interface ComponentPropsCubeConfig {
|
|
18
|
-
/** 数据集ID */
|
|
19
|
-
cubeId: string;
|
|
20
|
-
/** 数据集名称 */
|
|
21
|
-
cubeName: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* 图表选中, 包含下钻/联动/跳转
|
|
25
|
-
*/
|
|
26
|
-
interface ComponentPropsActionSelect {
|
|
27
|
-
type: 'select';
|
|
28
|
-
payload: {
|
|
29
|
-
dataIndex: number;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* 图表取消选中, 包含下钻/联动/跳转
|
|
34
|
-
*/
|
|
35
|
-
interface ComponentPropsActionCancelSelect {
|
|
36
|
-
type: 'cancelSelect';
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* 修改 viewConfig 的值
|
|
40
|
-
*/
|
|
41
|
-
interface ComponentPropsActionChangeViewConfig {
|
|
42
|
-
type: 'changeViewConfig';
|
|
43
|
-
payload: {
|
|
44
|
-
[key: string]: any;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* 取消下钻
|
|
49
|
-
*/
|
|
50
|
-
interface ComponentPropsActionCancelDrill {
|
|
51
|
-
type: 'cancelDrill';
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* 取消联动
|
|
55
|
-
*/
|
|
56
|
-
interface ComponentPropsActionCancelLinkage {
|
|
57
|
-
type: 'cancelLinkage';
|
|
58
|
-
}
|
|
59
|
-
export type ComponentPropsDispatch = (param: ComponentPropsActionSelect | ComponentPropsActionCancelSelect | ComponentPropsActionChangeViewConfig | ComponentPropsActionCancelDrill | ComponentPropsActionCancelLinkage) => void;
|
|
60
|
-
interface ComponentPropsFieldSettingConfig {
|
|
61
|
-
/** 字段别名 */
|
|
62
|
-
aliasName: string;
|
|
63
|
-
/** 是否有更改 */
|
|
64
|
-
nameChangedFlag: boolean;
|
|
65
|
-
/** 数值显示格式 */
|
|
66
|
-
numberFormat: NumberFormat;
|
|
67
|
-
[key: string]: any;
|
|
68
|
-
}
|
|
69
|
-
export interface ComponentPropsColorSeries {
|
|
70
|
-
/** 色系key */
|
|
71
|
-
key: string;
|
|
72
|
-
/** 色系名称 */
|
|
73
|
-
name: string;
|
|
74
|
-
/** 色系颜色 */
|
|
75
|
-
colors: string[];
|
|
76
|
-
}
|
|
77
|
-
export interface ComponentPropsSkin {
|
|
78
|
-
/** 色系key */
|
|
79
|
-
key: 'black' | 'default';
|
|
80
|
-
}
|
|
81
|
-
export interface ComponentPropsViewConfig {
|
|
82
|
-
/** 标题 */
|
|
83
|
-
caption?: string;
|
|
84
|
-
/** 主题 */
|
|
85
|
-
chartColorSeries?: ComponentPropsColorSeries;
|
|
86
|
-
/** 皮肤 */
|
|
87
|
-
chartSkin?: ComponentPropsSkin;
|
|
88
|
-
/** 展示标题 */
|
|
89
|
-
title?: {
|
|
90
|
-
/** 展示主标题/备注 */
|
|
91
|
-
show: boolean;
|
|
92
|
-
/** 标题备注 */
|
|
93
|
-
viceName?: string;
|
|
94
|
-
/** 标题颜色 */
|
|
95
|
-
color?: string;
|
|
96
|
-
/** 展示链接跳转 */
|
|
97
|
-
showLink?: boolean;
|
|
98
|
-
/** 链接地址 */
|
|
99
|
-
link?: string;
|
|
100
|
-
/** 链接文案 */
|
|
101
|
-
linkName?: string;
|
|
102
|
-
/** 链接打开方式 */
|
|
103
|
-
linkOpen?: 'window' | 'modal';
|
|
104
|
-
};
|
|
105
|
-
/** 列设置 */
|
|
106
|
-
fieldSettingMap?: {
|
|
107
|
-
[fieldId: string]: ComponentPropsFieldSettingConfig;
|
|
108
|
-
};
|
|
109
|
-
/** 宽度 */
|
|
110
|
-
width?: number;
|
|
111
|
-
/** 高度 */
|
|
112
|
-
height?: number;
|
|
113
|
-
[key: string]: any;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* formatAllGranularityTime dimGranularity 枚举值
|
|
117
|
-
*/
|
|
118
|
-
export type DimGranularity = 'year' | 'year-quarter' | 'year-month' | 'year-week' | 'year-month-day' | 'hour' | 'hour-minute' | 'hour-minute-second' | 'datetime';
|
|
119
|
-
/**
|
|
120
|
-
* bi 组件通用属性模型
|
|
121
|
-
*/
|
|
122
|
-
export interface ComponentProps {
|
|
123
|
-
/** 自定义组件实例 id */
|
|
124
|
-
id: string;
|
|
125
|
-
/** 样式面板配置 */
|
|
126
|
-
viewConfig: ComponentPropsViewConfig;
|
|
127
|
-
/** 数据面板配置 */
|
|
128
|
-
dataConfig: AreaModel[];
|
|
129
|
-
/** 高级面板配置 */
|
|
130
|
-
advancedConfig: object;
|
|
131
|
-
/** 图表全局配置 */
|
|
132
|
-
globalConfig: ComponentPropsGlobalConfig;
|
|
133
|
-
/** 数据 */
|
|
134
|
-
data: Pick<DataCell, 'fieldId' | 'geoInfo' | 'originValue' | 'value'>[][];
|
|
135
|
-
/** 操作 */
|
|
136
|
-
dispatch?: ComponentPropsDispatch;
|
|
137
|
-
/** 工具类方法 */
|
|
138
|
-
utils?: {
|
|
139
|
-
formatNumberWithConfig: (num: number | string, config: any) => void;
|
|
140
|
-
formatAllGranularityTime: (dimGranularity: DimGranularity, formatType: string, raw: string) => void;
|
|
141
|
-
[key: string]: any;
|
|
142
|
-
};
|
|
143
|
-
/** 数据集配置 */
|
|
144
|
-
cubeConfig?: ComponentPropsCubeConfig[];
|
|
145
|
-
/** 查询SQL */
|
|
146
|
-
sql?: string[];
|
|
147
|
-
}
|
|
148
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 墨辞
|
|
3
|
-
* @description 自定义组件数据面板的配置接口定义
|
|
4
|
-
*/
|
|
5
|
-
import type { DataPanelDataSchema, DataSchemaAreaItem, QueryAxisType, DataSchemaRule, FieldType, FieldGroupType, FieldCollectionType } from '../../data-panel';
|
|
6
|
-
/**
|
|
7
|
-
* platform 环境
|
|
8
|
-
*/
|
|
9
|
-
export declare enum Platform {
|
|
10
|
-
/** 仪表板 */
|
|
11
|
-
dashboard = "dashboard",
|
|
12
|
-
/** 电子表格 */
|
|
13
|
-
excel = "excel",
|
|
14
|
-
/** 大屏 */
|
|
15
|
-
screen = "screen"
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* 区块id枚举
|
|
19
|
-
* - area_column: 列id
|
|
20
|
-
* - area_row: 行id
|
|
21
|
-
* - drill: 下钻id
|
|
22
|
-
* - filters: 过滤器id
|
|
23
|
-
* */
|
|
24
|
-
export type DataSchemaAreaId = 'area_column' | 'area_row' | 'drill' | 'filters';
|
|
25
|
-
/**
|
|
26
|
-
* 自定义组件的数据面板配置项
|
|
27
|
-
*/
|
|
28
|
-
export interface DataSchemaArea extends Pick<DataSchemaAreaItem, 'id' | 'name' | 'nameTip'> {
|
|
29
|
-
/** 字段类型 */
|
|
30
|
-
queryAxis: keyof typeof QueryAxisType;
|
|
31
|
-
/** 规则配置 */
|
|
32
|
-
rule: DataSchemaAreaRule;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* 自定义组件的字段规则
|
|
36
|
-
*/
|
|
37
|
-
export interface DataSchemaAreaRule extends Pick<DataSchemaRule, 'placeholder' | 'maxColNum' | 'required'> {
|
|
38
|
-
/** 允许拖拽的字段类型 */
|
|
39
|
-
fieldTypes?: (keyof typeof FieldType)[];
|
|
40
|
-
/** 允许拖入的字段组类型 */
|
|
41
|
-
fieldGroupTypes?: (keyof typeof FieldGroupType)[];
|
|
42
|
-
/** 允许拖入的字段集合类型 */
|
|
43
|
-
fieldCollectionTypes?: (keyof typeof FieldCollectionType)[];
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* 自定义组件的 data-schema
|
|
47
|
-
*/
|
|
48
|
-
export interface DataSchema {
|
|
49
|
-
/** 字段设置 */
|
|
50
|
-
areas: DataSchemaArea[];
|
|
51
|
-
/** 结果展示 */
|
|
52
|
-
resultDisplay: DataPanelDataSchema['resultDisplay'];
|
|
53
|
-
}
|