@quickbi/bi-types 3.2.3 → 3.2.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  // Generated by dts-bundle v0.7.3
2
2
  // Dependencies for this module:
3
- // ../../../../../../../../../../react
3
+ // ../../../../../react
4
4
 
5
5
  declare module '@quickbi/bi-types' {
6
6
  export { CommonCompInputAreaTypeEnum, DataConfig, DataConfigAreaItemColumn, DataPanelDataSchema, DataSchemaAreaItem, OperationMenuItem, DropdownMenuItem, OperationTypes, Aggregators, FieldConfigTypes, ContrastTypes, AdvanceCalTypes, AdvanceCalcDateTypes, NumberFormats, AlignTypes, VerticalAlignTypes, AlignmentCategory, SortTypes, FieldChartTypes, ImageSizes, CUSTOM_FIELD_TYPES, FieldType, QueryAxisType, DropDownMenuType, SecondFieldType, ChartStatus, StackedSortType, ResultMode, RetainAreaId, ConfigCellType, ConfigColumnType, CheckBoxState, FieldGroupType, DataSchemaRule, TableType, TableDirection, ProportionType, AccumulateCalcType, FieldCollectionType, LnglatGroupChildFlags, FieldGroupSelectorType, VirtualFieldOperation, NumberValueType, ContrastType, } from '@quickbi/bi-types/data-panel';
@@ -26,8 +26,6 @@ declare module '@quickbi/bi-types' {
26
26
  export * from '@quickbi/bi-types/open/components/style-schema';
27
27
  export type { MenuMeta, MenuProps, MenuSchema, MenuSchemaBase, MenuSchemaItem } from '@quickbi/bi-types/open/menus/menu-schema';
28
28
  export * from '@quickbi/bi-types/open/menus/menu-props';
29
- export type { PageComponentProps } from '@quickbi/bi-types/open/custom-page/pages-props';
30
- export type { PageMeta } from '@quickbi/bi-types/open/custom-page/pages-schema';
31
29
  export type { EmbedBaseSrc, EmbedBaseFeature, EmbedBaseEventMessageDTO, EmbedBaseEventMessageContent, EmbedBaseEventListener, EmbedBaseEventListenerReturn, } from '@quickbi/bi-types/open/embed/core';
32
30
  export { OpenPageTypeEnum } from '@quickbi/bi-types/open/common/page-types';
33
31
  export { OpenEventTypeEnum } from '@quickbi/bi-types/open/common/event-types';
@@ -202,9 +200,9 @@ declare module '@quickbi/bi-types/component-type' {
202
200
  WORDCLOUD = 12,
203
201
  /** 旋风漏斗(已下线) */
204
202
  TORNADO = 13,
205
- /** 老树图(已下线) */
203
+ /** 老树图(已关闭入口,线上有图) */
206
204
  TREE = 14,
207
- /** 老的来源去向图(已下线) */
205
+ /** 老的来源去向图(已关闭入口,线上有图) */
208
206
  PATH = 15,
209
207
  /** 矩阵树图 */
210
208
  TREEMAP = 16,
@@ -433,9 +431,7 @@ declare module '@quickbi/bi-types/component-type' {
433
431
  /** 非结构化图表-词频(词云图,已下线) */
434
432
  UNSTRUCTURED_FREQUENCY = 129,
435
433
  /** 智能解读 */
436
- SMART_INTERPRETATION = 130,
437
- /** 探索分析-智能推荐 */
438
- EXPLORATION_SMART_CHART = 131
434
+ SMART_INTERPRETATION = 130
439
435
  }
440
436
  export const ScreenComponentCode: Record<ScreenComponentType, number>;
441
437
  export enum ChartType {
@@ -532,8 +528,6 @@ declare module '@quickbi/bi-types/component-type' {
532
528
  CONCAT_CONTAINER = "concat-container",
533
529
  INDICATOR_RELATION = "indicator-relation",
534
530
  SMART_INTERPRETATION = "smart-interpretation",
535
- /** 探索分析-智能推荐 */
536
- EXPLORATION_SMART_CHART = "exploration-smart-chart",
537
531
  /** ------------非结构化图表 ------------ */
538
532
  UNSTRUCTURED_PARALLEL = "parallel",
539
533
  UNSTRUCTURED_CONTRAST = "contrast",
@@ -1141,19 +1135,19 @@ declare module '@quickbi/bi-types/open/components/component-lifecycle' {
1141
1135
  /**
1142
1136
  * 开机阶段钩子
1143
1137
  */
1144
- export type LifecycleBootstrap<T = object, P = any> = (props: LifecycleProps<T>) => void | Promise<P>;
1138
+ export type LifecycleBootstrap<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
1145
1139
  /**
1146
1140
  * 渲染阶段钩子
1147
1141
  */
1148
- export type LifecycleMount<T = object, P = any> = (props: LifecycleProps<T>) => void | Promise<P>;
1142
+ export type LifecycleMount<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
1149
1143
  /**
1150
1144
  * 卸载阶段钩子
1151
1145
  */
1152
- export type LifecycleUnmount<T = object, P = any> = (props: LifecycleProps<T>) => void | Promise<P>;
1146
+ export type LifecycleUnmount<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
1153
1147
  /**
1154
1148
  * 更新阶段钩子
1155
1149
  */
1156
- export type LifecycleUpdate<T = object, P = any> = (props: LifecycleProps<T>) => void | Promise<P>;
1150
+ export type LifecycleUpdate<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
1157
1151
  /**
1158
1152
  * 开放组件生命周期
1159
1153
  */
@@ -1550,13 +1544,6 @@ declare module '@quickbi/bi-types/chart-config' {
1550
1544
  /** 空 */
1551
1545
  empty = ""
1552
1546
  }
1553
- /** 图例显示百分比位置 */
1554
- export enum LegendDisplayPercentPositionValue {
1555
- /** 默认值为'-' */
1556
- Bottom = "bottom",
1557
- /** 空 */
1558
- Right = "right"
1559
- }
1560
1547
  /** 钻取 面包屑的文字样式 */
1561
1548
  export interface DrillBreadcrumbTextStyle {
1562
1549
  fontSize: number;
@@ -1795,8 +1782,7 @@ declare module '@quickbi/bi-types/standard-model' {
1795
1782
  * | areas区域模型
1796
1783
  * -------------------------------------------------------------------------------------------
1797
1784
  */
1798
- import type { EmptyValueDisplayConfig } from '@quickbi/bi-types/cube/cube-model';
1799
- import type { SecondDataType } from '@quickbi/bi-types/cube/cube-schema';
1785
+ import type { EmptyValueDisplayConfig, SecondDataType } from '@quickbi/bi-types/cube/cube-model';
1800
1786
  import type { CountParams, FieldCollectionType, PercentileParams, TopNParams, CompareParams, DateAccumulateParams, ProportionParams } from '@quickbi/bi-types/data-panel';
1801
1787
  import type { DifferenceParams, MovingCalculationParams, MultiFieldCombinationConfig, RankParams } from '@quickbi/bi-types/data-panel/data-config';
1802
1788
  /** 字段信息 */
@@ -2299,14 +2285,12 @@ declare module '@quickbi/bi-types/cube' {
2299
2285
  * @author 无愚
2300
2286
  * @description 数据集类型定义
2301
2287
  */
2302
- export * from '@quickbi/bi-types/cube/cube-blend';
2303
- export * from '@quickbi/bi-types/cube/cube-field-expression';
2304
- export * from '@quickbi/bi-types/cube/cube-links';
2305
2288
  export * from '@quickbi/bi-types/cube/cube-model';
2306
- export * from '@quickbi/bi-types/cube/cube-schema';
2307
2289
  export * from '@quickbi/bi-types/cube/data-source';
2308
- export * from '@quickbi/bi-types/cube/logical-schema';
2309
- export * from '@quickbi/bi-types/cube/physical-schema';
2290
+ export * from '@quickbi/bi-types/cube/cube-links';
2291
+ export * from '@quickbi/bi-types/cube/table-schema';
2292
+ export * from '@quickbi/bi-types/cube/cube-field-expression';
2293
+ export type { BlendSchema, CubeBlend, CubeLink } from '@quickbi/bi-types/cube/cube-blend';
2310
2294
  }
2311
2295
 
2312
2296
  declare module '@quickbi/bi-types/open/menus/menu-schema' {
@@ -2357,7 +2341,6 @@ declare module '@quickbi/bi-types/open/menus/menu-props' {
2357
2341
  import type { EnumAsUnion } from '@quickbi/bi-types/open/common/tools';
2358
2342
  import type { OpenPageTypeEnum } from '@quickbi/bi-types/open/common/page-types';
2359
2343
  import type { OpenDeviceTypeEnum } from '@quickbi/bi-types/open/common/misc';
2360
- import type { RouteKey } from '@quickbi/bi-types/router/route-key';
2361
2344
  /**
2362
2345
  * 事件/菜单通用的页面信息
2363
2346
  */
@@ -2382,10 +2365,8 @@ declare module '@quickbi/bi-types/open/menus/menu-props' {
2382
2365
  ownerUserName: string;
2383
2366
  /** 页面标题 */
2384
2367
  title: string;
2385
- /** @deprecated 页面类型, 已废弃, 后续请用routeKey判断页面类型 */
2386
- pageType?: EnumAsUnion<typeof OpenPageTypeEnum>;
2387
- /** 页面路由 key */
2388
- routeKey?: RouteKey;
2368
+ /** 页面类型 */
2369
+ pageType: EnumAsUnion<typeof OpenPageTypeEnum>;
2389
2370
  }
2390
2371
  /**
2391
2372
  * 事件/菜单通用的工具方法
@@ -2533,23 +2514,6 @@ declare module '@quickbi/bi-types/open/menus/menu-props' {
2533
2514
  }
2534
2515
  }
2535
2516
 
2536
- declare module '@quickbi/bi-types/open/custom-page/pages-props' {
2537
- import type { CommonPageConfig } from '@quickbi/bi-types/open/menus/menu-props';
2538
- /**
2539
- * 自定义页面 props 接口
2540
- */
2541
- export interface PageComponentProps {
2542
- /** 页面信息 */
2543
- pageConfig: Pick<CommonPageConfig, 'userId' | 'userName' | 'routeKey'>;
2544
- }
2545
- }
2546
-
2547
- declare module '@quickbi/bi-types/open/custom-page/pages-schema' {
2548
- /** 自定义页面元信息 */
2549
- export interface PageMeta {
2550
- }
2551
- }
2552
-
2553
2517
  declare module '@quickbi/bi-types/open/embed/core' {
2554
2518
  /**
2555
2519
  * @author 海狸
@@ -2620,7 +2584,7 @@ declare module '@quickbi/bi-types/open/embed/core' {
2620
2584
 
2621
2585
  declare module '@quickbi/bi-types/open/common/page-types' {
2622
2586
  /**
2623
- * @deprecated 开放相关页面类型枚举, 注意要和 routerKey 做区分, 这个 key 后续要废弃
2587
+ * @deprecated 开放相关页面类型枚举, 注意要和 routerKkey 做区分, 这个 key 后续要废弃
2624
2588
  * */
2625
2589
  export enum OpenPageTypeEnum {
2626
2590
  /** 仪表板 */
@@ -2819,12 +2783,10 @@ declare module '@quickbi/bi-types/router/route-key' {
2819
2783
  orgAdminSmartQGlobalConfig = "orgAdminSmartQGlobalConfig",
2820
2784
  /** 组织管理-智能小 Q - 通用配置 - 大模型配置 */
2821
2785
  orgAdminSmartQGlobalConfigLlmConfig = "orgAdminSmartQGlobalConfigLlmConfig",
2822
- /** 组织管理-智能小 Q - 通用配置 - AI功能管理 */
2823
- orgAdminSmartQGlobalConfigAIConfig = "orgAdminSmartQGlobalConfigAIConfig",
2824
2786
  /** 组织管理-智能小 Q - 通用配置 - 智能体管理 */
2825
2787
  orgAdminSmartQGlobalConfigAgentManage = "orgAdminSmartQGlobalConfigAgentManage",
2826
- /** 组织管理-智能小 Q - 通用配置 - 知识库 */
2827
- orgAdminSmartQGlobalConfigKnowledgeManage = "orgAdminSmartQGlobalConfigKnowledgeManage",
2788
+ /** 组织管理-智能小 Q - 通用配置 - 主题定制 */
2789
+ orgAdminSmartQGlobalThemeSetting = "orgAdminSmartQGlobalThemeSetting",
2828
2790
  /** 组织管理-小Q问数 */
2829
2791
  orgAdminCopilot = "orgAdminCopilot",
2830
2792
  /** 组织管理-小Q问数 - 探索版 */
@@ -2835,8 +2797,6 @@ declare module '@quickbi/bi-types/router/route-key' {
2835
2797
  orgQueryAgentAnalysisThemeAuth = "orgQueryAgentAnalysisThemeAuth",
2836
2798
  /** 组织管理-小Q问数-知识库管理 */
2837
2799
  orgQueryAgentKnowledgeBaseManage = "orgQueryAgentKnowledgeBaseManage",
2838
- /** 组织管理-小Q问数-全局配置 */
2839
- orgQueryAgentGlobalConfig = "orgQueryAgentGlobalConfig",
2840
2800
  /** 组织管理-小Q问数-问数资源管理 */
2841
2801
  orgResourceManage = "orgResourceManage",
2842
2802
  /** 组织管理-小Q问数-分析主题管理 */
@@ -2960,14 +2920,10 @@ declare module '@quickbi/bi-types/router/route-key' {
2960
2920
  dataServiceCount = "dataServiceCount",
2961
2921
  /** 发布渠道 */
2962
2922
  embedChannel = "embedChannel",
2963
- /** 自定义可视化 */
2964
- customManage = "componentManage",
2965
2923
  /** 自定义组件 */
2966
2924
  customComponent = "customComponent",
2967
2925
  /** 自定义菜单 */
2968
2926
  customMenu = "customMenu",
2969
- /** 自定义页面 */
2970
- customPage = "customPage",
2971
2927
  /** 自定义模板 */
2972
2928
  customTemplate = "customTemplate",
2973
2929
  /** 自定义驱动 */
@@ -3002,8 +2958,6 @@ declare module '@quickbi/bi-types/router/route-key' {
3002
2958
  viewHome = "viewHome",
3003
2959
  /** 卡片卡板 */
3004
2960
  viewBoard = "viewBoard",
3005
- /** 探索分析 */
3006
- viewExploration = "viewExploration",
3007
2961
  /** 我的收藏 */
3008
2962
  viewFavorite = "viewFavorite",
3009
2963
  /** 最近访问 */
@@ -3038,6 +2992,10 @@ declare module '@quickbi/bi-types/router/route-key' {
3038
2992
  copilotPageQReport = "copilotPageQReport",
3039
2993
  /** 首页下的小Q搭建 */
3040
2994
  copilotPageQDashboard = "copilotPageQDashboard",
2995
+ /** 首页下的小Q搜索 */
2996
+ copilotPageSearch = "copilotPageSearch",
2997
+ /** 首页下的小Q更多 */
2998
+ copilotPageMore = "copilotPageMore",
3041
2999
  /** 首页下的自定义智能体列表页 */
3042
3000
  copilotPageAgentList = "copilotPageAgentList",
3043
3001
  /** 首页下的自定义智能体 */
@@ -3181,12 +3139,6 @@ declare module '@quickbi/bi-types/router/route-key' {
3181
3139
  downloadView = "downloadView",
3182
3140
  /** 自助取数公开预览 */
3183
3141
  downloadPublicView = "downloadPublicView",
3184
- /** ---------------------------------------------------- 探索分析 -------------------------------------------------- */
3185
- explorationRoot = "explorationRoot",
3186
- /** 探索分析编辑 */
3187
- explorationEdit = "explorationEdit",
3188
- /** 探索分析预览 */
3189
- explorationView = "explorationView",
3190
3142
  /** --------------------------------------------------- 即席分析 -------------------------------------------------- */
3191
3143
  analysisRoot = "analysisRoot",
3192
3144
  /** 即席分析编辑 */
@@ -3560,13 +3512,9 @@ declare module '@quickbi/bi-types/router/route-tree' {
3560
3512
  readonly key: RouteKey.orgAdminSmartQGlobalConfigLlmConfig;
3561
3513
  readonly path: "/org/admin/smartQ/globalConfig/llmConfig";
3562
3514
  }, {
3563
- /** 智能小 Q - 通用配置 - AI功能管理 */
3564
- readonly key: RouteKey.orgAdminSmartQGlobalConfigAIConfig;
3565
- readonly path: "/org/admin/smartQ/globalConfig/aiConfig";
3566
- }, {
3567
- /** 智能小 Q - 通用配置 - 大模型配置 */
3568
- readonly key: RouteKey.orgAdminSmartQGlobalConfigKnowledgeManage;
3569
- readonly path: "/org/admin/smartQ/globalConfig/knowledgeManage";
3515
+ /** 智能小 Q - 通用配置 - 主题定制 */
3516
+ readonly key: RouteKey.orgAdminSmartQGlobalThemeSetting;
3517
+ readonly path: "/org/admin/smartQ/globalConfig/themeSetting";
3570
3518
  }];
3571
3519
  }, {
3572
3520
  readonly key: RouteKey.orgAdminCopilot;
@@ -3608,9 +3556,6 @@ declare module '@quickbi/bi-types/router/route-tree' {
3608
3556
  }, {
3609
3557
  readonly key: RouteKey.orgQueryAgentKnowledgeBaseManage;
3610
3558
  readonly path: "/org/admin/copilot/queryAgent/orgKnowledgeBaseManage";
3611
- }, {
3612
- readonly key: RouteKey.orgQueryAgentGlobalConfig;
3613
- readonly path: "/org/admin/copilot/queryAgent/globalConfig";
3614
3559
  }];
3615
3560
  }, {
3616
3561
  readonly key: RouteKey.orgAdminQMessage;
@@ -3785,18 +3730,11 @@ declare module '@quickbi/bi-types/router/route-tree' {
3785
3730
  readonly key: RouteKey.embedChannel;
3786
3731
  readonly path: "/openservice/embedChannel";
3787
3732
  }, {
3788
- readonly key: RouteKey.customManage;
3733
+ readonly key: RouteKey.customComponent;
3789
3734
  readonly path: "/openservice/componentManage";
3790
- readonly children: [{
3791
- readonly key: RouteKey.customComponent;
3792
- readonly path: "/openservice/componentManage/customComponent";
3793
- }, {
3794
- readonly key: RouteKey.customMenu;
3795
- readonly path: "/openservice/componentManage/customMenu";
3796
- }, {
3797
- readonly key: RouteKey.customPage;
3798
- readonly path: "/openservice/componentManage/customPage";
3799
- }];
3735
+ }, {
3736
+ readonly key: RouteKey.customMenu;
3737
+ readonly path: "/openservice/componentMenu";
3800
3738
  }, {
3801
3739
  readonly key: RouteKey.customTemplate;
3802
3740
  readonly path: "/openservice/defineTemplate";
@@ -3851,9 +3789,6 @@ declare module '@quickbi/bi-types/router/route-tree' {
3851
3789
  }, {
3852
3790
  readonly key: RouteKey.viewBoard;
3853
3791
  readonly path: "/view/card";
3854
- }, {
3855
- readonly key: RouteKey.viewExploration;
3856
- readonly path: "/view/exploration";
3857
3792
  }, {
3858
3793
  readonly key: RouteKey.viewFavorite;
3859
3794
  readonly path: "/view/favorite";
@@ -4128,16 +4063,6 @@ declare module '@quickbi/bi-types/router/route-tree' {
4128
4063
  readonly key: RouteKey.downloadPublicView;
4129
4064
  readonly path: "/token3rd/offline/view/pc.htm";
4130
4065
  }];
4131
- }, {
4132
- readonly key: RouteKey.explorationRoot;
4133
- readonly path: "/exploration";
4134
- readonly children: [{
4135
- readonly key: RouteKey.explorationEdit;
4136
- readonly path: "/exploration/pc.htm";
4137
- }, {
4138
- readonly key: RouteKey.explorationView;
4139
- readonly path: "/exploration/view/pc.htm";
4140
- }];
4141
4066
  }, {
4142
4067
  readonly key: RouteKey.analysisRoot;
4143
4068
  readonly path: "/analysis";
@@ -4479,9 +4404,7 @@ declare module '@quickbi/bi-types/permission-type' {
4479
4404
  /** 资源包管理 */
4480
4405
  resourceConfig = "resourceConfig",
4481
4406
  /** 小Q报告 */
4482
- qReport = "qreport",
4483
- /** 探索分析 */
4484
- exploration = "exploration"
4407
+ qReport = "qreport"
4485
4408
  }
4486
4409
  }
4487
4410
 
@@ -4557,8 +4480,7 @@ declare module '@quickbi/bi-types/data-panel/base' {
4557
4480
  AGGREGATE_CALC_FIELD = "AGGREGATE_CALC_FIELD",
4558
4481
  FIELD_GROUP = "FIELD_GROUP",
4559
4482
  AGGREGATE_FIELD = "AGGREGATE_FIELD",
4560
- STRING_FIELD = "STRING_FIELD",
4561
- GROUP_CONTRAST = "GROUP_CONTRAST"
4483
+ STRING_FIELD = "STRING_FIELD"
4562
4484
  }
4563
4485
  export enum ResultMode {
4564
4486
  SELECT_ALL = "selectAll",
@@ -5091,17 +5013,6 @@ declare module '@quickbi/bi-types/data-panel/data-config' {
5091
5013
  isMultiField?: boolean;
5092
5014
  /** 父字段的guid */
5093
5015
  parentFieldGuid?: string;
5094
- /** 是否虚拟字段,如散点图中的聚类字段、线柱图中的度量名字段 */
5095
- isVirtual?: boolean;
5096
- /** 分组对比组配置, 如果有 groupContrast, 说明是分组对比字段 */
5097
- groupContrast?: {
5098
- /** 分组 id */
5099
- groupId: string;
5100
- /** 分组名称 */
5101
- groupName: string;
5102
- /** 分组字段 */
5103
- columnList: Partial<DataConfigAreaItemColumn>[];
5104
- }[];
5105
5016
  }
5106
5017
  export enum ContrastType {
5107
5018
  DAY_DAY_RING_RATIO = "day_day",
@@ -5158,8 +5069,7 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5158
5069
  */
5159
5070
  import type * as React from 'react';
5160
5071
  import type { BlendSchema } from '@quickbi/bi-types/cube/cube-blend';
5161
- import type { CubeModel, EmptyValueDisplayConfig } from '@quickbi/bi-types/cube/cube-model';
5162
- import type { Aggregator, DateGranularity, Field, FieldAttribute, FolderAndHierarchyNode, RegionGranularity } from '@quickbi/bi-types/cube/cube-schema';
5072
+ import type { Aggregator, CubeModel, DateGranularity, EmptyValueDisplayConfig, Field, FieldAttribute, FolderAndHierarchyNode, RegionGranularity } from '@quickbi/bi-types/cube/cube-model';
5163
5073
  import type { FieldType, QueryAxisType, FieldGroupType, SecondFieldType, ChartStatus, StackedSortType, RetainAreaId, FieldCollectionType } from '@quickbi/bi-types/data-panel/base';
5164
5074
  import type { DataConfigAreaItemColumn } from '@quickbi/bi-types/data-panel/data-config';
5165
5075
  export interface ValidateResult {
@@ -5262,7 +5172,6 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5262
5172
  avg = "avg",
5263
5173
  count = "count",
5264
5174
  countd = "countd",
5265
- approx_distinct = "approx_distinct",
5266
5175
  null = "null",
5267
5176
  more = "more",
5268
5177
  max = "max",
@@ -5380,7 +5289,6 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5380
5289
  /** 字段别名 */
5381
5290
  export interface LabelConfig extends FieldCommonConfig {
5382
5291
  type: FieldConfigTypes.rename;
5383
- title?: string;
5384
5292
  useDescription?: boolean;
5385
5293
  }
5386
5294
  /** 对齐类别 */
@@ -5561,8 +5469,6 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5561
5469
  defaultValues?: string[];
5562
5470
  };
5563
5471
  };
5564
- /** 分组对比字段新增时自动打开配置且只打开一次,设置为运行时状态 */
5565
- groupContrastAutoOpen?: boolean;
5566
5472
  }
5567
5473
  /** 字段组内具体字段的字段信息,包含是否隐藏等+columnList信息 */
5568
5474
  export interface ChildFieldInfo {
@@ -5622,20 +5528,10 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5622
5528
  description?: React.ReactNode;
5623
5529
  customRenderer?: React.ReactNode;
5624
5530
  isVirtualField?: boolean;
5625
- colorType?: Field['type'];
5626
5531
  /** 虚拟字段icon */
5627
5532
  operations?: VirtualFieldOperation[];
5628
5533
  /** 触发事件 */
5629
5534
  onClick?: Function;
5630
- /** 分组对比组配置, 如果有 groupContrast, 说明是分组对比字段 */
5631
- groupContrast?: {
5632
- /** 分组 id */
5633
- groupId: string;
5634
- /** 分组名称 */
5635
- groupName: string;
5636
- /** 分组字段 */
5637
- columnList: Partial<DataConfigAreaItemColumn>[];
5638
- }[];
5639
5535
  }
5640
5536
  /** [字段集]FieldCollectionInfo信息 */
5641
5537
  export interface FieldCollectionInfo {
@@ -5710,7 +5606,7 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5710
5606
  }
5711
5607
  export class DataSchemaRule {
5712
5608
  /** 默认展示值 */
5713
- placeholder?: string | (() => React.ReactNode);
5609
+ placeholder?: string;
5714
5610
  /** 字段配置个数限制 */
5715
5611
  maxColNum?: number | ((areaMap: AreaMap, options: {
5716
5612
  isConvertQueryInput?: boolean;
@@ -5877,8 +5773,6 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5877
5773
  isExtendAssociateFields?: boolean;
5878
5774
  /** 是否切换数据集 */
5879
5775
  isSwitchCube?: boolean;
5880
- /** 是否需要进行重新取数(探索分析场景由查询控件触发) */
5881
- needRefetch?: boolean;
5882
5776
  }
5883
5777
  export type OnChangeCubeOptions = Omit<OnFreshComponentOptions, 'isClickButton' | 'refreshMobileChart' | 'ReloadCube' | 'noPollingCache'>;
5884
5778
  export type OnFreshComponentType = (comp: any, changeAttributeList?: string[], isFresh?: boolean, options?: OnFreshComponentOptions) => any;
@@ -6041,132 +5935,328 @@ declare module '@quickbi/bi-types/data-panel/data-schema' {
6041
5935
 
6042
5936
  declare module '@quickbi/bi-types/cube/cube-model' {
6043
5937
  /**
6044
- * @author 嘉念
6045
- * @description 数据集接口模型
6046
- */
6047
- import type { FieldAttribute } from '@quickbi/bi-types/cube/cube-schema';
6048
- import { CubeSchema, EmptyValueDisplayType } from '@quickbi/bi-types/cube/cube-schema';
6049
- import type { DsCreateOriginEnum, DataLoadMode } from '@quickbi/bi-types/cube/data-source';
6050
- import { LogicalSchema } from '@quickbi/bi-types/cube/logical-schema';
5938
+ * @author 嘉念
5939
+ * @description 数据集接口模型
5940
+ */
5941
+ import type { FieldExpressionModel } from '@quickbi/bi-types/cube/cube-field-expression';
5942
+ import type { DsCreateOriginEnum, DsType, DataLoadMode } from '@quickbi/bi-types/cube/data-source';
5943
+ export enum CustomAreaType {
5944
+ /** 自定义地理信息 */
5945
+ CUSTOM_AREA = "CUSTOM_AREA",
5946
+ /** 自定义瓦片底图 */
5947
+ CUSTOM_GIS = "CUSTOM_GIS",
5948
+ /** 自定义geojson */
5949
+ CUSTOM_GEOJSON = "CUSTOM_GEOJSON",
5950
+ /** 自定义层级 */
5951
+ CUSTOM_TREE = "CUSTOM_TREE",
5952
+ /** 自定义图片 */
5953
+ CUSTOM_PICTURE = "CUSTOM_PICTURE"
5954
+ }
5955
+ /** 自定义图片底图信息 */
5956
+ export enum PictureCoordinateType {
5957
+ /** 纵坐标 */
5958
+ HORIZONTAL = "CUSTOM_PICTURE_HORIZONTAL",
5959
+ /** 横坐标 */
5960
+ VERTICAL = "CUSTOM_PICTURE_VERTICAL"
5961
+ }
5962
+ /** 自定义地理信息 */
5963
+ export interface ExtraInfo {
5964
+ /** 自定义层级Id */
5965
+ customGeoLevel?: number;
5966
+ /** 自定义图片类型 */
5967
+ pictureCoordinateType?: PictureCoordinateType;
5968
+ }
5969
+ /**
5970
+ * 关联字段
5971
+ * 数据混合blend和数据集物理表关联physical均使用该字段
5972
+ */
5973
+ export type JoinKey = {
5974
+ /** 源表字段(blend模式为数据集字段id,physical模式为物理字段名) */
5975
+ sourceKey: string;
5976
+ /**
5977
+ * @deprecated
5978
+ * 源表关联物理字段类型(QBI目前没在用,保留)
5979
+ */
5980
+ sourceType?: string;
5981
+ /** 目标表字段(blend模式为数据集字段id,physical模式为物理字段名) */
5982
+ targetKey: string;
5983
+ /**
5984
+ * @deprecated
5985
+ * 标表关联物理字段类型(QBI目前没在用,保留)
5986
+ */
5987
+ targetType?: string;
5988
+ /**
5989
+ * 条件
5990
+ */
5991
+ condition: JoinCondition;
5992
+ /**
5993
+ * 目前仅physical模式使用
5994
+ */
5995
+ targetCalculateMember?: boolean;
5996
+ /**
5997
+ * 目前仅physical模式使用
5998
+ */
5999
+ sourceCalculateMember?: boolean;
6000
+ };
6001
+ /** 物理表类型 */
6002
+ export enum PhysicalTableType {
6003
+ /** 物理表 */
6004
+ Table = "table",
6005
+ /** 自定义SQL */
6006
+ Sql = "sql",
6007
+ /** 上传文件(探索空间 & 数据库)、API数据源、文档数据源 */
6008
+ File = "file"
6009
+ }
6010
+ /** 表模型 */
6011
+ export interface PhysicalTable {
6012
+ /** 唯一标识 */
6013
+ uniqueId: string;
6014
+ /** 表展示名称 */
6015
+ caption?: string;
6016
+ /** 表id */
6017
+ tableName: string;
6018
+ /** 物理表所属数据源ID */
6019
+ datasourceId: string;
6020
+ /** 是否为事实表(中心表标识) */
6021
+ factTable: boolean;
6022
+ /** 数据源类型 */
6023
+ dsType: DsType;
6024
+ /** 表类型(不落库,每次获取cubeSchema模型时后端实时查询返回) */
6025
+ tableType?: PhysicalTableType;
6026
+ }
6027
+ /** 表模型 */
6028
+ export interface VirtualTable {
6029
+ /** 唯一标识 */
6030
+ uniqueId: string;
6031
+ /** 表展示名称 */
6032
+ caption: string;
6033
+ /** 表名 */
6034
+ tableName: string;
6035
+ /** 物理表所属数据源ID */
6036
+ datasourceId: string;
6037
+ /** 是否为事实表(中心表标识) */
6038
+ factTable: boolean;
6039
+ dsType: DsType;
6040
+ sqlId: string;
6041
+ sql: string;
6042
+ /** 表类型(不落库,每次获取cubeSchema模型时后端实时查询返回) */
6043
+ tableType?: PhysicalTableType;
6044
+ }
6045
+ /** 合并字段来源表信息 */
6046
+ export interface UnionTableColumnModel {
6047
+ /** 来源表id */
6048
+ table: string;
6049
+ /** 来源字段物理字段名(表名称列不传) */
6050
+ column?: string;
6051
+ /** 来源表的名称(表名称列需要传) */
6052
+ value?: string;
6053
+ }
6054
+ /** 合并字段 */
6055
+ export interface UnionColumn {
6056
+ /** 合并后的字段名 */
6057
+ column: string;
6058
+ /** 备注 */
6059
+ caption: string;
6060
+ /** 合并字段的来源表字段信息 */
6061
+ tableColumns: UnionTableColumnModel[];
6062
+ /** 非源表字段,自动生成的表名称列 */
6063
+ isAuto?: boolean;
6064
+ }
6065
+ /** 合并表模型 */
6066
+ export interface UnionTable extends PhysicalTable {
6067
+ /** 物理表 */
6068
+ tables: PhysicalTable[];
6069
+ /** 自定义sql、view */
6070
+ virtualTables: VirtualTable[];
6071
+ /** 合并字段信息 */
6072
+ unionColumns: UnionColumn[];
6073
+ }
6074
+ export interface Link {
6075
+ /** 源表id(blend模式为数据集id,physical模式为物理表id) */
6076
+ source: string;
6077
+ /** 关联表id(blend模式为数据集id,physical模式为物理表id) */
6078
+ target: string;
6079
+ /** 关联类型 */
6080
+ joinType: TableJoinType;
6081
+ /**
6082
+ * @deprecated
6083
+ * 目前只有many-to-one
6084
+ */
6085
+ relation?: TableRelation;
6086
+ joinKeys: JoinKey[];
6087
+ }
6088
+ /** 物理表关联模型 */
6089
+ export type PhysicalLink = Link;
6090
+ export class PhysicalSchema {
6091
+ /** 物理表 */
6092
+ tables: PhysicalTable[];
6093
+ /** 自定义sql、view */
6094
+ virtualTables: VirtualTable[];
6095
+ /** union合并表 */
6096
+ unionTables: UnionTable[];
6097
+ /** 表关联关系 */
6098
+ links: PhysicalLink[];
6099
+ /** odps表是否开启全表扫描 */
6100
+ sqlHintTypes?: string[];
6101
+ sqlHints?: HintModal[];
6102
+ }
6103
+ /** 数据集层级结构/文件夹/属性的嵌套关系 */
6104
+ export type FieldTree = AttributeNode | FolderAndHierarchyNode;
6105
+ export type AttributeMapValue = {
6106
+ attribute: FieldAttribute;
6107
+ type: 'Dimension' | 'Measure';
6108
+ };
6109
+ /** 数据集逻辑模型 */
6110
+ export class CubeSchema {
6111
+ /** 唯一标识,无业务逻辑,不要使用 */
6112
+ uniqueId: string;
6113
+ /** 数据集ID */
6114
+ cubeId: string;
6115
+ /** 数据源ID */
6116
+ datasourceId: string;
6117
+ /** 数据集名称 */
6118
+ caption: string;
6119
+ /** 字段列表 */
6120
+ fields: Field[];
6121
+ /** 普通字段、层系、文件夹树形结构 */
6122
+ fieldTree: FieldTree[];
6123
+ /** 过滤条件 */
6124
+ filter?: FilterAttr[];
6125
+ /** 全局参数 */
6126
+ params: ParamType[];
6127
+ /** 占位符 */
6128
+ sqlPlaceholders: ParamType[];
6129
+ }
6051
6130
  /** 编辑权限属性 */
6052
6131
  export enum EditPermitType {
6053
- /** 脏数据代表空间成员 */
6054
- oldWorkSpaceMember = 1,
6055
- /** 指定成员 */
6056
- appointPerson = 12,
6057
- /** 全部空间成员 */
6058
- allWorkSpacePerson = 11
6132
+ /** 脏数据代表空间成员 */
6133
+ oldWorkSpaceMember = 1,
6134
+ /** 指定成员 */
6135
+ appointPerson = 12,
6136
+ /** 全部空间成员 */
6137
+ allWorkSpacePerson = 11
6059
6138
  }
6060
6139
  /** 使用权限属性 */
6061
6140
  export enum UsePermitType {
6062
- /** 指定成员 */
6063
- appointPerson = 2,
6064
- /** 全部空间成员 */
6065
- allWorkSpacePerson = 1
6141
+ /** 指定成员 */
6142
+ appointPerson = 2,
6143
+ /** 全部空间成员 */
6144
+ allWorkSpacePerson = 1
6066
6145
  }
6067
6146
  /** 数据集额外信息 */
6068
6147
  export class SchemaExtraInfo {
6069
- /** 数据集所在工作空间的文件夹位置 */
6070
- aimDirId: string;
6071
- hasAuthorizedUse?: boolean;
6072
- /** 权限列表 */
6073
- permissionList?: string[];
6074
- /** 行级权限,列级权限字段id */
6075
- dataLevelAttributeIds: string[];
6076
- /** 无列级权限的字段 */
6077
- withoutColumnLevelPermissionFields: string[];
6078
- /** 聚合方式 */
6079
- aggFunctions?: string[];
6080
- /** 是否开启数据脱敏 */
6081
- isDataMaskOpen?: number;
6082
- /** 是否开启列级权限 1=开启 0=未开启 */
6083
- isOpenColumnLevelPermission?: number;
6084
- /** 是否开启了行级权限 1=开启 0=未开启 */
6085
- isOpenRowLevelPermission?: number;
6086
- /** 当前数据集来自的类型 */
6087
- dsCreateOrigin?: DsCreateOriginEnum;
6088
- /** 跨源模式 */
6089
- dataLoadMode?: DataLoadMode;
6090
- /** 是否为etl 生成的数据集 */
6091
- etlGenerateCube?: boolean;
6092
- /** 数据集类型 */
6093
- cubeType?: 'upload' | 'upload_static';
6094
- /** 数据集owner */
6095
- creatorId?: string;
6096
- /** 数据集owner name */
6097
- creatorName?: string;
6098
- /** 编辑权限属性 0-私密 11-空间成员 12-指定成员 1-脏数据代表空间成员 */
6099
- authLevel?: EditPermitType;
6100
- /** 数据集描述 */
6101
- comments?: string;
6102
- /** 使用权限属性 1-空间成员 2-指定人 */
6103
- authorizedUseType?: UsePermitType;
6104
- /** */
6105
- functionConfig: {
6106
- enableCache: boolean;
6107
- enableCalculateMember: boolean;
6108
- enableCustomizedSql: boolean;
6109
- enableJoin: boolean;
6110
- };
6111
- /** 数据集修改时间 */
6112
- gmtModified?: string;
6148
+ /** 数据集所在工作空间的文件夹位置 */
6149
+ aimDirId: string;
6150
+ hasAuthorizedUse?: boolean;
6151
+ /** 权限列表 */
6152
+ permissionList?: string[];
6153
+ /** 行级权限,列级权限字段id */
6154
+ dataLevelAttributeIds: string[];
6155
+ /** 无列级权限的字段 */
6156
+ withoutColumnLevelPermissionFields: string[];
6157
+ /** 聚合方式 */
6158
+ aggFunctions?: string[];
6159
+ /** 是否开启数据脱敏 */
6160
+ isDataMaskOpen?: number;
6161
+ /** 是否开启列级权限 1=开启 0=未开启 */
6162
+ isOpenColumnLevelPermission?: number;
6163
+ /** 是否开启了行级权限 1=开启 0=未开启 */
6164
+ isOpenRowLevelPermission?: number;
6165
+ /** 当前数据集来自的类型 */
6166
+ dsCreateOrigin?: DsCreateOriginEnum;
6167
+ /** 跨源模式 */
6168
+ dataLoadMode?: DataLoadMode;
6169
+ /** 是否为etl 生成的数据集 */
6170
+ etlGenerateCube?: boolean;
6171
+ /** 数据集类型 */
6172
+ cubeType?: 'upload' | 'upload_static';
6173
+ /** 数据集owner */
6174
+ creatorId?: string;
6175
+ /** 数据集owner name */
6176
+ creatorName?: string;
6177
+ /** 编辑权限属性 0-私密 11-空间成员 12-指定成员 1-脏数据代表空间成员 */
6178
+ authLevel?: EditPermitType;
6179
+ /** 数据集描述 */
6180
+ comments?: string;
6181
+ /** 使用权限属性 1-空间成员 2-指定人 */
6182
+ authorizedUseType?: UsePermitType;
6183
+ /** */
6184
+ functionConfig: {
6185
+ enableCache: boolean;
6186
+ enableCalculateMember: boolean;
6187
+ enableCustomizedSql: boolean;
6188
+ enableJoin: boolean;
6189
+ };
6190
+ /** 数据集修改时间 */
6191
+ gmtModified?: string;
6113
6192
  }
6114
- /** 空值展示配置类型 */
6115
- export enum EmptyValueType {
6116
- /** 空值 */
6117
- EmptyValue = "EmptyValue",
6118
- /** 空字符串 */
6119
- EmptyString = "EmptyString"
6193
+ /** 数据集模型 */
6194
+ export class CubeModel {
6195
+ /** 物理表 */
6196
+ physicalSchema: PhysicalSchema;
6197
+ /** 数据集逻辑模型 */
6198
+ cubeSchema: CubeSchema;
6199
+ /** 数据集结构版本 */
6200
+ metaModelVersion: string;
6201
+ /** 数据集订正版本(前端使用) */
6202
+ userDefineVersion: string;
6203
+ /** 数据集额外信息 */
6204
+ schemaExtraInfo: SchemaExtraInfo;
6120
6205
  }
6121
- export class EmptyStringOrNullDisplayConfig {
6122
- /** 展示类型 */
6123
- formatType: EmptyValueDisplayType;
6124
- /** 自定义展示内容 */
6125
- customFormat: string;
6126
- /** 是否是自动(继承数据集) */
6127
- isAuto?: boolean;
6206
+ /** 数据集影子模型 */
6207
+ export type CubeShadow = CubeSchema;
6208
+ /** 表关联类型 */
6209
+ export enum TableJoinType {
6210
+ /** 左连接 */
6211
+ LEFT_OUTER_JOIN = "LEFT_OUTER_JOIN",
6212
+ /** 内连接 */
6213
+ INNER_JOIN = "INNER_JOIN",
6214
+ /** 右连接 */
6215
+ RIGHT_OUTER_JOIN = "RIGHT_OUTER_JOIN",
6216
+ /** 全连接 */
6217
+ FULL_OUTER_JOIN = "FULL_OUTER_JOIN",
6218
+ JOIN_ERROR = "JOIN_ERROR"
6128
6219
  }
6129
- /** 空值展示配置 */
6130
- export class EmptyValueDisplayConfig {
6131
- /** 空值展示配置 */
6132
- emptyValueConfig: EmptyStringOrNullDisplayConfig;
6133
- /** 空字符串展示配置 */
6134
- emptyStringConfig: EmptyStringOrNullDisplayConfig;
6135
- static getDefaultConfigForQuickReport(): EmptyValueDisplayConfig;
6136
- static convertAttrEmptyValueDisplayConfig(attr: FieldAttribute, isAuto?: boolean): EmptyValueDisplayConfig;
6137
- /** 根据fieldSettingMap中存储的配置转换成空值展示配置模型 */
6138
- static getConfigByFieldSettingMap(fieldSetting: any, defaultValue?: any): EmptyValueDisplayConfig;
6220
+ export enum TableRelation {
6221
+ MANY_TO_ONE = "many-to-one"
6139
6222
  }
6140
- /** 返回值cellset中的dimType */
6141
- export enum CellsetDimTypes {
6142
- StandardDimension = "StandardDimension",
6143
- StrDateTypeDimension = "StrDateTypeDimension",
6144
- StarDimension = "StarDimension",
6145
- GeographicDimension = "GeographicDimension",
6146
- /** 上面为维度字段,measureCol代表度量 */
6147
- measureCol = "measureCol"
6223
+ export enum JoinCondition {
6224
+ /** 等于 */
6225
+ EQUAL_TO = "equal-to",
6226
+ /** 不等于 */
6227
+ UNEQUAL_TO = "unequal-to",
6228
+ /** 大于 */
6229
+ GREATER_THAN = "greater-than",
6230
+ /** 大于等于 */
6231
+ GREATER_THAN_OR_EQUAL_TO = "greater-than-or-equal-to",
6232
+ /** 小于 */
6233
+ LESS_THAN = "less-than",
6234
+ /** 小于等于 */
6235
+ LESS_THAN_OR_EQUAL_TO = "less-than-or-equal-to"
6148
6236
  }
6149
- /** 数据集模型 */
6150
- export class CubeModel {
6151
- /** 数据集逻辑模型 */
6152
- logicalSchema: LogicalSchema;
6153
- /** 数据集字段相关模型 */
6154
- cubeSchema: CubeSchema;
6155
- /** 数据集结构版本 */
6156
- metaModelVersion: string;
6157
- /** 数据集订正版本(前端使用) */
6158
- userDefineVersion: string;
6159
- /** 数据集额外信息 */
6160
- schemaExtraInfo: SchemaExtraInfo;
6237
+ /** 字段列表定义,包含维度、度量 */
6238
+ export interface Field {
6239
+ /** 唯一标识 */
6240
+ uniqueId: string;
6241
+ /** 字段名称 */
6242
+ caption: string;
6243
+ type: 'Dimension' | 'Measure';
6244
+ /** 标记数据面板上的字段、文件夹,和数据集原有的字段、文件夹区别开来 */
6245
+ fromPanel?: boolean;
6246
+ /** 老接口保留字段(计算字段expression中作为唯一标识使用),新数据跟uniqueId值相同 */
6247
+ name?: string;
6248
+ /** 引用表id */
6249
+ table: string;
6250
+ /** 物理字段 */
6251
+ column: string;
6252
+ /** 是否为衍生字段,分组字段和计算字段都为true */
6253
+ calculateMember: boolean;
6254
+ /** 字段描述,仅日期类型会使用 */
6255
+ comments?: string;
6256
+ /** 是否支持修改字段类型 */
6257
+ supportCastDataType?: boolean;
6258
+ attributes: FieldAttribute[];
6161
6259
  }
6162
- }
6163
-
6164
- declare module '@quickbi/bi-types/cube/cube-schema' {
6165
- /**
6166
- * @author 嘉念
6167
- * @description 数据集字段相关模型
6168
- */
6169
- import type { FieldExpressionModel } from '@quickbi/bi-types/cube/cube-field-expression';
6170
6260
  /** 当前数据类型,如果没有进行过类型切换,则和OriginDataType一致 影响sql生成 (原colType) */
6171
6261
  export enum DataType {
6172
6262
  number = "number",
@@ -6189,15 +6279,6 @@ declare module '@quickbi/bi-types/cube/cube-schema' {
6189
6279
  }
6190
6280
  /** 物理数据类型:第一次初始化时填写,后续不会修改 */
6191
6281
  export type OriginDataType = DataType;
6192
- /** 度量类型聚合方式 */
6193
- export enum Aggregator {
6194
- 'sum' = "sum",
6195
- 'count' = "count",
6196
- 'distinct-count' = "distinct-count",
6197
- 'max' = "max",
6198
- 'min' = "min",
6199
- 'avg' = "avg"
6200
- }
6201
6282
  /** 年粒度日期类型 */
6202
6283
  export enum CalendarTypeEnum {
6203
6284
  /** 公历年 */
@@ -6250,44 +6331,78 @@ declare module '@quickbi/bi-types/cube/cube-schema' {
6250
6331
  semicolon = ";",
6251
6332
  space = " "
6252
6333
  }
6253
- /** 空值展示配置枚举 */
6254
- export enum EmptyValueDisplayType {
6255
- /** 展示为'-' */
6256
- Hyphen = "hyphen",
6257
- /** 展示为{空}/{空字符串} */
6258
- Braces = "braces",
6259
- /** 展示为"null" */
6260
- Null = "null",
6261
- /** 不展示 */
6262
- NotDisplay = "notDisplay",
6263
- /** 自定义 */
6264
- Custom = "custom"
6265
- }
6266
- export enum CustomAreaType {
6267
- /** 自定义地理信息 */
6268
- CUSTOM_AREA = "CUSTOM_AREA",
6269
- /** 自定义瓦片底图 */
6270
- CUSTOM_GIS = "CUSTOM_GIS",
6271
- /** 自定义geojson */
6272
- CUSTOM_GEOJSON = "CUSTOM_GEOJSON",
6273
- /** 自定义层级 */
6274
- CUSTOM_TREE = "CUSTOM_TREE",
6275
- /** 自定义图片 */
6276
- CUSTOM_PICTURE = "CUSTOM_PICTURE"
6334
+ /**
6335
+ * 维度树结构类型
6336
+ * Normal: 正常层级结构
6337
+ * Date: 日期类型层级结构
6338
+ * Linked: 关联类型文件夹
6339
+ */
6340
+ export type DimensionTreeFlags = 'DimensionNormal' | 'DimensionDate' | 'DimensionLinked' | null;
6341
+ /**
6342
+ * 度量树结构类型
6343
+ * Normal: 正常层级结构
6344
+ * Linked: 关联类型文件夹
6345
+ */
6346
+ export type MeasureTreeFlags = 'MeasureNormal' | 'MeasureLinked' | null;
6347
+ /**
6348
+ * 树节点类型
6349
+ * folder: 文件夹
6350
+ * hierarchy: 层级结构
6351
+ * attribute: 普通节点
6352
+ * dimensionGroup: 维度组
6353
+ * measureGroup: 度量组
6354
+ * lnglatGroup: 经纬度组
6355
+ * */
6356
+ export type TreeNodeTypes = 'folder' | 'hierarchy' | 'attribute' | 'dimensionGroup' | 'measureGroup' | 'lnglatGroup';
6357
+ /** 占位符类型 */
6358
+ export enum ParamStyleType {
6359
+ /** 条件占位符 */
6360
+ condition = "condition",
6361
+ /** 值占位符 */
6362
+ placeholder = "placeholder",
6363
+ /** 表达式占位符 */
6364
+ param = "param",
6365
+ /** 加速占位符 */
6366
+ accelerate = "accelerate"
6277
6367
  }
6278
- /** 自定义图片底图信息 */
6279
- export enum PictureCoordinateType {
6280
- /** 纵坐标 */
6281
- HORIZONTAL = "CUSTOM_PICTURE_HORIZONTAL",
6282
- /** 横坐标 */
6283
- VERTICAL = "CUSTOM_PICTURE_VERTICAL"
6368
+ /** 空值展示配置类型 */
6369
+ export enum EmptyValueType {
6370
+ /** 空值 */
6371
+ EmptyValue = "EmptyValue",
6372
+ /** 空字符串 */
6373
+ EmptyString = "EmptyString"
6284
6374
  }
6285
- /** 自定义地理信息 */
6286
- export interface ExtraInfo {
6287
- /** 自定义层级Id */
6288
- customGeoLevel?: number;
6289
- /** 自定义图片类型 */
6290
- pictureCoordinateType?: PictureCoordinateType;
6375
+ /** 空值展示配置枚举 */
6376
+ export enum EmptyValueDisplayType {
6377
+ /** 展示为'-' */
6378
+ Hyphen = "hyphen",
6379
+ /** 展示为{空}/{空字符串} */
6380
+ Braces = "braces",
6381
+ /** 展示为"null" */
6382
+ Null = "null",
6383
+ /** 不展示 */
6384
+ NotDisplay = "notDisplay",
6385
+ /** 自定义 */
6386
+ Custom = "custom"
6387
+ }
6388
+ export class EmptyStringOrNullDisplayConfig {
6389
+ /** 展示类型 */
6390
+ formatType: EmptyValueDisplayType;
6391
+ /** 自定义展示内容 */
6392
+ customFormat: string;
6393
+ /** 是否是自动(继承数据集) */
6394
+ isAuto?: boolean;
6395
+ }
6396
+ /** 空值展示配置 */
6397
+ export class EmptyValueDisplayConfig {
6398
+ /** 空值展示配置 */
6399
+ emptyValueConfig: EmptyStringOrNullDisplayConfig;
6400
+ /** 空字符串展示配置 */
6401
+ emptyStringConfig: EmptyStringOrNullDisplayConfig;
6402
+ static getDefaultConfigForQuickReport(): EmptyValueDisplayConfig;
6403
+ static convertAttrEmptyValueDisplayConfig(attr: FieldAttribute, isAuto?: boolean): EmptyValueDisplayConfig;
6404
+ /** 根据fieldSettingMap中存储的配置转换成空值展示配置模型 */
6405
+ static getConfigByFieldSettingMap(fieldSetting: any, defaultValue?: any): EmptyValueDisplayConfig;
6291
6406
  }
6292
6407
  /** 字段属性 */
6293
6408
  export interface FieldAttribute {
@@ -6331,6 +6446,10 @@ declare module '@quickbi/bi-types/cube/cube-schema' {
6331
6446
  name?: string;
6332
6447
  /** 字段描述 */
6333
6448
  comments?: string;
6449
+ /** 字段备注类型 文本/链接 */
6450
+ commentType?: 'text' | 'url';
6451
+ /** 链接模式下的链接文字(commentType=url 时有效) */
6452
+ commentLinkText?: string;
6334
6453
  /** 字段自定义排序设置 */
6335
6454
  sortModel?: {
6336
6455
  sortType: 'ASC' | 'DESC' | 'CUSTOM';
@@ -6353,63 +6472,37 @@ declare module '@quickbi/bi-types/cube/cube-schema' {
6353
6472
  customAreaType?: CustomAreaType;
6354
6473
  /** 数据集属性额外信息 */
6355
6474
  extraInfo?: ExtraInfo;
6356
- /** 逻辑表id */
6357
- node?: string;
6358
- /** 物理字段 */
6359
- column?: string;
6360
6475
  }
6361
- /** 字段列表定义,包含维度、度量 */
6362
- export interface Field {
6363
- /** 唯一标识 */
6364
- uniqueId: string;
6365
- /** 字段名称 */
6366
- caption: string;
6367
- type: 'Dimension' | 'Measure';
6368
- /** 标记数据面板上的字段、文件夹,和数据集原有的字段、文件夹区别开来 */
6369
- fromPanel?: boolean;
6370
- /** 老接口保留字段(计算字段expression中作为唯一标识使用),新数据跟uniqueId值相同 */
6371
- name?: string;
6372
- /** 引用表id */
6373
- table: string;
6374
- /** 逻辑表id */
6375
- node: string;
6376
- /** 物理字段 */
6377
- column: string;
6378
- /** 是否为衍生字段,分组字段和计算字段都为true */
6379
- calculateMember: boolean;
6380
- /** 字段描述,仅日期类型会使用 */
6381
- comments?: string;
6382
- /** 是否支持修改字段类型 */
6383
- supportCastDataType?: boolean;
6384
- attributes: FieldAttribute[];
6476
+ /** 度量类型聚合方式 */
6477
+ export enum Aggregator {
6478
+ 'sum' = "sum",
6479
+ 'count' = "count",
6480
+ 'distinct-count' = "distinct-count",
6481
+ 'max' = "max",
6482
+ 'min' = "min",
6483
+ 'avg' = "avg"
6484
+ }
6485
+ export class FilterAttr {
6486
+ logicalOperator: 'and' | 'or';
6487
+ /** 过滤值 */
6488
+ filterElements: FilterElement[];
6489
+ /** 嵌套过滤条件 */
6490
+ filters: FilterAttr[];
6491
+ beforeJoin?: boolean;
6492
+ tableId?: string;
6493
+ }
6494
+ export interface FilterElement {
6495
+ /** 过滤条件引用的字段uid */
6496
+ resourceId: string;
6497
+ /** 过滤条件比较运算符:> < =, 和查询控件所用保持一致 */
6498
+ functionalOperator: string;
6499
+ values: {
6500
+ type?: 'absolute' | 'relative' | null;
6501
+ value: string;
6502
+ }[];
6503
+ /** 前端是否隐藏掉 */
6504
+ hidden?: boolean;
6385
6505
  }
6386
- export type AttributeMapValue = {
6387
- attribute: FieldAttribute;
6388
- type: 'Dimension' | 'Measure';
6389
- };
6390
- /**
6391
- * 树节点类型
6392
- * folder: 文件夹
6393
- * hierarchy: 层级结构
6394
- * attribute: 普通节点
6395
- * dimensionGroup: 维度组
6396
- * measureGroup: 度量组
6397
- * lnglatGroup: 经纬度组
6398
- * */
6399
- export type TreeNodeTypes = 'folder' | 'hierarchy' | 'attribute' | 'dimensionGroup' | 'measureGroup' | 'lnglatGroup';
6400
- /**
6401
- * 维度树结构类型
6402
- * Normal: 正常层级结构
6403
- * Date: 日期类型层级结构
6404
- * Linked: 关联类型文件夹
6405
- */
6406
- export type DimensionTreeFlags = 'DimensionNormal' | 'DimensionDate' | 'DimensionLinked' | null;
6407
- /**
6408
- * 度量树结构类型
6409
- * Normal: 正常层级结构
6410
- * Linked: 关联类型文件夹
6411
- */
6412
- export type MeasureTreeFlags = 'MeasureNormal' | 'MeasureLinked' | null;
6413
6506
  /** 普通字段 */
6414
6507
  export interface AttributeNode {
6415
6508
  /** 字段ID */
@@ -6420,8 +6513,6 @@ declare module '@quickbi/bi-types/cube/cube-schema' {
6420
6513
  fromPanel?: boolean;
6421
6514
  /** 节点名称,attribute类型为null */
6422
6515
  name?: null;
6423
- /** 逻辑表id */
6424
- node?: string;
6425
6516
  caption?: string;
6426
6517
  children?: (AttributeNode | FolderAndHierarchyNode)[];
6427
6518
  flag: null;
@@ -6438,8 +6529,6 @@ declare module '@quickbi/bi-types/cube/cube-schema' {
6438
6529
  fromPanel?: boolean;
6439
6530
  /** 节点名称 */
6440
6531
  name?: string;
6441
- /** 逻辑表id */
6442
- node?: string;
6443
6532
  /** 节点名称,attribute类型为null */
6444
6533
  caption?: string;
6445
6534
  /** 所引用的关联表的id,仅flag为DimensionLinked和MeasureLinked时存在 */
@@ -6448,61 +6537,14 @@ declare module '@quickbi/bi-types/cube/cube-schema' {
6448
6537
  /** 文件夹和层级结构类型 */
6449
6538
  flag: DimensionTreeFlags | MeasureTreeFlags;
6450
6539
  }
6451
- /** 数据集层级结构/文件夹/属性的嵌套关系 */
6452
- export type FieldTree = AttributeNode | FolderAndHierarchyNode;
6453
- export interface FilterElement {
6454
- /** 过滤条件引用的字段uid */
6455
- resourceId: string;
6456
- /** 过滤条件比较运算符:> < =, 和查询控件所用保持一致 */
6457
- functionalOperator: string;
6458
- values: {
6459
- type?: 'absolute' | 'relative' | null;
6460
- value: string;
6461
- }[];
6462
- /** 前端是否隐藏掉 */
6463
- hidden?: boolean;
6464
- }
6465
- /** 过滤条件 */
6466
- export class FilterAttr {
6467
- logicalOperator: 'and' | 'or';
6468
- /** 过滤值 */
6469
- filterElements: FilterElement[];
6470
- /** 嵌套过滤条件 */
6471
- filters: FilterAttr[];
6472
- beforeJoin?: boolean;
6473
- tableId?: string;
6474
- }
6475
- /** 占位符类型 */
6476
- export enum ParamStyleType {
6477
- /** 条件占位符 */
6478
- condition = "condition",
6479
- /** 值占位符 */
6480
- placeholder = "placeholder",
6481
- /** 表达式占位符 */
6482
- param = "param",
6483
- /** 加速占位符 */
6484
- accelerate = "accelerate"
6485
- }
6486
- /** 占位符参数 */
6487
- export enum ParamDataType {
6488
- /** 文本 */
6489
- string = "string",
6490
- /** 数值 */
6491
- number = "number",
6492
- /** 日期 */
6493
- dateTime = "datetime",
6494
- /** 日期-年月日 */
6495
- dateRegion = "dateRegion",
6496
- /** 日期-年季 */
6497
- quarterRegion = "quarterRegion",
6498
- /** 日期-年月 */
6499
- monthRegion = "monthRegion",
6500
- /** 日期-年周 */
6501
- weekRegion = "weekRegion",
6502
- /** 日期-年 */
6503
- yearRegion = "yearRegion",
6504
- /** 日期-年月日时分秒 */
6505
- ymdHmsRegion = "ymdHmsRegion"
6540
+ /**
6541
+ * 日期占位符的类型(单个/范围)
6542
+ */
6543
+ export enum OriginDateType {
6544
+ /** 单个日期 */
6545
+ SingleDate = "singleDate",
6546
+ /** 日期区间 */
6547
+ DateRange = "dateRange"
6506
6548
  }
6507
6549
  export interface ParamType {
6508
6550
  /** sql参数id */
@@ -6519,346 +6561,47 @@ declare module '@quickbi/bi-types/cube/cube-schema' {
6519
6561
  /** 是否是影子数据集的占位符 */
6520
6562
  fromPanel?: boolean;
6521
6563
  /** condition条件参数时,才会有该属性 */
6522
- conditionPlaceHolderFields?: {
6523
- uniqueId: string;
6524
- name: string;
6525
- column: string;
6526
- table: string;
6527
- }[];
6528
- /** sql 占位符的原始类型 */
6529
- originalType: 'dateRange';
6530
- /** sql 参数,占位符默认值 */
6531
- defaultValue?: (string | number)[];
6532
- /** 默认值是否全局生效,true: 生效范围与过滤器一致。false: 默认值仅在数据集生效 */
6533
- useInGlobal?: boolean;
6534
- }
6535
- /** 数据集逻辑字段模型 */
6536
- export class CubeSchema {
6537
- /** 唯一标识,无业务逻辑,不要使用 */
6538
- uniqueId: string;
6539
- /** 数据集ID */
6540
- cubeId: string;
6541
- /** 数据源ID */
6542
- datasourceId: string;
6543
- /** 数据集名称 */
6544
- caption: string;
6545
- /** 字段列表 */
6546
- fields: Field[];
6547
- /** 普通字段、层系、文件夹树形结构 */
6548
- fieldTree: FieldTree[];
6549
- /** 过滤条件 */
6550
- filter?: FilterAttr[];
6551
- /** 全局参数 */
6552
- params: ParamType[];
6553
- /** 占位符 */
6554
- sqlPlaceholders: ParamType[];
6555
- }
6556
- /** 数据集影子模型 */
6557
- export type CubeShadow = CubeSchema;
6558
- }
6559
-
6560
- declare module '@quickbi/bi-types/cube/cube-blend' {
6561
- /**
6562
- * @author 雅影
6563
- * @description 数据混合类型定义
6564
- */
6565
- import type { CubeLinkModel, CubeLinkJoinKeyModel } from '@quickbi/bi-types/cube/cube-links';
6566
- /** 数据集之间关联的模型定义 */
6567
- export interface CubeLink extends Omit<CubeLinkModel, 'joinKeys'> {
6568
- joinKeys: Omit<CubeLinkJoinKeyModel, 'condition'>[];
6569
- }
6570
- /** 数据集混合schema */
6571
- export interface BlendSchema {
6572
- /** 数据混合唯一id */
6573
- uniqueId: string;
6574
- /** 数据混合名称 */
6575
- caption: string;
6576
- /** 数据混合关联关系 */
6577
- cubeLinks: CubeLink[];
6578
- /** 标识是否存在字段id重复 */
6579
- hasRepeatFid?: boolean;
6580
- }
6581
- /** 数据混合消费端模型定义 */
6582
- export type CubeBlend = BlendSchema;
6583
- }
6584
-
6585
- declare module '@quickbi/bi-types/cube/cube-field-expression' {
6586
- /**
6587
- * @author 嘉念
6588
- * @description 数据集字段表达式模型
6589
- */
6590
- export enum FieldExpressionType {
6591
- /** 分组字段 */
6592
- dataGroup = "dataGroup",
6593
- /** 计算字段 */
6594
- udf = "udf",
6595
- /** lod字段 */
6596
- system = "system",
6597
- /** 工具栏字段(时间差字段、缺失值替换字段、新增别名字段、拆分列字段、合并字段) */
6598
- tool = "tool"
6599
- }
6600
- /** 工具栏字段类型 */
6601
- export enum ToolFieldType {
6602
- /** 时间差字段 */
6603
- DateDifference = "dateDifference",
6604
- /** 缺失值替换字段 */
6605
- MissingValueReplacement = "missingValueReplacement",
6606
- /** 维度别名字段 */
6607
- ValueReplacement = "valueReplacement",
6608
- /** 拆分列字段 */
6609
- SplitField = "SplitField",
6610
- /** 合并字段 */
6611
- MergeField = "mergeField"
6612
- }
6613
- /** 时间差字段配置 */
6614
- export interface DateDiffFieldConfig {
6615
- /** 开始字段 */
6616
- firstField: string;
6617
- /** 结束字段 */
6618
- endField: string;
6619
- /** 时间单位 */
6620
- timeUnit: string;
6621
- }
6622
- /** 维值替换字段配置 */
6623
- export interface ReplaceDimValueFieldConfig {
6624
- /** 引用字段Id */
6625
- refUniqueId: string;
6626
- /** 替换维值列表 */
6627
- replaceElementList: {
6628
- /** 原始值 */
6629
- originalValue: string;
6630
- /** 替换值 */
6631
- value: string;
6632
- }[];
6633
- }
6634
- /** 缺失值替换字段配置 */
6635
- export interface MissingValueReplaceFieldConfig {
6636
- /** 引用字段Id */
6637
- refUniqueId: string;
6638
- /** 替换空值 */
6639
- replaceNullValue: boolean;
6640
- /** 替换空白值 */
6641
- replaceBlankValue: boolean;
6642
- /** 替换值 */
6643
- value: string;
6644
- }
6645
- /** 拆分列字段配置 */
6646
- export interface SplitColumnFieldConfig {
6647
- /** 引用字段Id */
6648
- refUniqueId: string;
6649
- /** 分隔符 */
6650
- delimiter: string;
6651
- /** 是否是第N列拆分字段 */
6652
- firstN: boolean;
6653
- /** 拆分字符数 */
6654
- splitNumber: number;
6655
- /** 拆分索引 */
6656
- splitIndex: number;
6657
- }
6658
- /** 合并字段配置 */
6659
- export interface MergeFieldsFieldConfig {
6660
- /** 连接符 */
6661
- delimiter: string;
6662
- /** 合并字段id列表 */
6663
- mergeElementList: string[];
6664
- }
6665
- export interface ToolFieldConfig {
6666
- /** 唯一标识 */
6667
- uniqueId: string;
6668
- /** 字段名称 */
6669
- caption: string;
6670
- /** 工具栏类型 */
6671
- toolType: ToolFieldType;
6672
- /** 时间差字段配置 */
6673
- dateDiffItem: DateDiffFieldConfig;
6674
- /** 新增别名字段配置 */
6675
- replaceItem: ReplaceDimValueFieldConfig;
6676
- /** 缺失值替换字段配置 */
6677
- missingReplaceItem: MissingValueReplaceFieldConfig;
6678
- /** 拆分列字段配置 */
6679
- splitItem: SplitColumnFieldConfig;
6680
- /** 合并字段配置 */
6681
- mergeItem: MergeFieldsFieldConfig;
6682
- }
6683
- /** 分组字段类型 */
6684
- export enum GroupType {
6685
- /** 日期类型-自定义区间分组 */
6686
- NormalGroup = "NormalGroup",
6687
- /** 枚举-列表分组类型 */
6688
- ListGroup = "ListGroup",
6689
- /** 数值-自定义分组类型 */
6690
- CustomizedGroup = "CustomizedGroup"
6691
- }
6692
- /** 分组字段操作符 */
6693
- export enum GroupOperator {
6694
- /** 小于 */
6695
- LessThan = "lessThan",
6696
- /** 小于等于 */
6697
- LessThanOrEqualTo = "lessThanOrEqualTo",
6698
- /** 大于 */
6699
- GreaterThan = "greaterThan",
6700
- /** 大于等于 */
6701
- GreaterThanOrEqualTo = "greaterThanOrEqualTo",
6702
- /** 为空 */
6703
- IsNull = "isNull",
6704
- /** 介于 */
6705
- Between = "between"
6706
- }
6707
- /** 数值-自定义分组类型 */
6708
- export type CustomizedGroup = {
6709
- /** 是否是默认分组字段 */
6710
- groupName: string;
6711
- defaultGroup: boolean;
6712
- lower: string;
6713
- upper: string;
6714
- lowerOperator: GroupOperator.IsNull | GroupOperator.GreaterThan | GroupOperator.GreaterThanOrEqualTo;
6715
- upperOperator: GroupOperator.LessThan | GroupOperator.LessThanOrEqualTo;
6716
- groupNameType: any;
6717
- };
6718
- /** 枚举-列表分组类型 */
6719
- export type ListGrouping = {
6720
- groupName: string;
6721
- groupElementList: string[];
6722
- defaultGroup: boolean;
6723
- };
6724
- /** 日期类型-自定义区间分组 */
6725
- export type NormalGroup = {
6726
- groupName: string;
6727
- defaultGroup: boolean;
6728
- lower: string;
6729
- upper: string;
6730
- lowerOperator: GroupOperator.GreaterThanOrEqualTo;
6731
- upperOperator: GroupOperator.LessThanOrEqualTo;
6732
- };
6733
- /** 分组字段 */
6734
- export type Groups = CustomizedGroup[] | ListGrouping[] | NormalGroup[];
6735
- export interface GroupFieldConfig {
6736
- /** 唯一标识 */
6737
- uniqueId: string;
6738
- /** 分组名称 */
6739
- caption: string;
6740
- /** 分组类型 */
6741
- groupType: GroupType;
6742
- refUniqueId: string;
6743
- /** qa中使用。qbi目前用不到 */
6744
- refSql?: string;
6745
- /** qa中使用。qbi目前用不到 */
6746
- refFunction?: string;
6747
- /** 数值类型分组字段 */
6748
- customizedGroups?: CustomizedGroup[];
6749
- /** 字符串类型分组字段 */
6750
- listGroupings?: ListGrouping[];
6751
- /** 日期类型分组字段 */
6752
- normalGroups?: NormalGroup[];
6753
- }
6754
- /**
6755
- * 原先计算字段、分组字段存储配置的模型,v6.0.2新增:时间差字段、缺失值替换字段、新增别名字段、拆分列字段、合并字段
6756
- */
6757
- export interface FieldExpressionModel {
6758
- type: FieldExpressionType;
6759
- value?: string;
6760
- /** 分组字段配置 */
6761
- dataGroup: GroupFieldConfig;
6762
- /** 工具栏字段配置 */
6763
- tool?: ToolFieldConfig;
6764
- }
6765
- }
6766
-
6767
- declare module '@quickbi/bi-types/cube/cube-links' {
6768
- /**
6769
- * @author 雅影
6770
- * @description 数据集关联模型类型定义
6771
- */
6772
- import type { TableJoinType } from '@quickbi/bi-types/cube/physical-schema';
6773
- export enum JoinCondition {
6774
- /** 等于 */
6775
- EQUAL_TO = "equal-to",
6776
- /** 不等于 */
6777
- UNEQUAL_TO = "unequal-to",
6778
- /** 大于 */
6779
- GREATER_THAN = "greater-than",
6780
- /** 大于等于 */
6781
- GREATER_THAN_OR_EQUAL_TO = "greater-than-or-equal-to",
6782
- /** 小于 */
6783
- LESS_THAN = "less-than",
6784
- /** 小于等于 */
6785
- LESS_THAN_OR_EQUAL_TO = "less-than-or-equal-to"
6786
- }
6787
- /** 基数 */
6788
- export enum TableRelation {
6789
- /** 一对一 */
6790
- ONE_TO_ONE = "one-to-one",
6791
- /** 多对多 */
6792
- MANY_TO_MANY = "many-to-many",
6793
- /** 一对多 */
6794
- ONE_TO_MANY = "one-to-many",
6795
- /** 多对一 */
6796
- MANY_TO_ONE = "many-to-one"
6797
- }
6798
- /** 引用完整性 */
6799
- export enum ReferentialIntegrity {
6800
- /** 全部对全部 */
6801
- ALL_TO_ALL = "all-to-all",
6802
- /** 全部对部分 */
6803
- ALL_TO_SOME = "all-to-some",
6804
- /** 部分对全部 */
6805
- SOME_TO_ALL = "some-to-all",
6806
- /** 部分对部分 */
6807
- SOME_TO_SOME = "some-to-some"
6808
- }
6809
- /**
6810
- * 关联字段
6811
- * 数据混合blend和数据集物理表关联physical均使用该字段
6812
- */
6813
- export type CubeLinkJoinKeyModel = {
6814
- /** 源表字段(blend模式为数据集字段id,physical模式为物理字段名) */
6815
- sourceKey: string;
6816
- /**
6817
- * @deprecated
6818
- * 源表关联物理字段类型(QBI目前没在用,保留)
6819
- */
6820
- sourceType?: string;
6821
- /** 目标表字段(blend模式为数据集字段id,physical模式为物理字段名) */
6822
- targetKey: string;
6823
- /**
6824
- * @deprecated
6825
- * 标表关联物理字段类型(QBI目前没在用,保留)
6826
- */
6827
- targetType?: string;
6828
- /**
6829
- * 条件
6830
- */
6831
- condition: JoinCondition;
6832
- /**
6833
- * 目前仅physical模式使用
6834
- */
6835
- targetCalculateMember?: boolean;
6836
- /**
6837
- * 目前仅physical模式使用
6838
- */
6839
- sourceCalculateMember?: boolean;
6840
- };
6841
- export interface CubeLinkModel {
6842
- /** 源表id(blend模式为数据集id,physical模式为物理表id) */
6843
- source: string;
6844
- /** 关联表id(blend模式为数据集id,physical模式为物理表id) */
6845
- target: string;
6846
- /** 关联类型 */
6847
- joinType: TableJoinType;
6848
- /** 关联字段 */
6849
- joinKeys: CubeLinkJoinKeyModel[];
6850
- /** 基数 物理表关联目前只有many-to-one */
6851
- relation?: TableRelation;
6852
- /** 引用完整性 */
6853
- match?: ReferentialIntegrity;
6854
- /**
6855
- * 是否为自动生成的关联键(未经用户确认)
6856
- * 前端临时字段,用于标记自动匹配的关联键
6857
- * - true: 系统自动匹配生成,需要弹窗让用户确认
6858
- * - false/undefined: 用户已确认,或手动创建的
6859
- * 注意:此字段不应该发送到后端,仅在前端逻辑中使用
6860
- */
6861
- isAutoGenerated?: boolean;
6564
+ conditionPlaceHolderFields?: {
6565
+ uniqueId: string;
6566
+ name: string;
6567
+ column: string;
6568
+ table: string;
6569
+ }[];
6570
+ /** sql 占位符的原始类型 */
6571
+ originalType: 'dateRange';
6572
+ /** sql 参数,占位符默认值 */
6573
+ defaultValue?: (string | number)[];
6574
+ /** 默认值是否全局生效,true: 生效范围与过滤器一致。false: 默认值仅在数据集生效 */
6575
+ useInGlobal?: boolean;
6576
+ }
6577
+ /** 占位符参数 */
6578
+ export enum ParamDataType {
6579
+ string = "string",
6580
+ number = "number",
6581
+ dateTime = "datetime",
6582
+ dateRegion = "dateRegion",
6583
+ quarterRegion = "quarterRegion",
6584
+ monthRegion = "monthRegion",
6585
+ weekRegion = "weekRegion",
6586
+ yearRegion = "yearRegion",
6587
+ ymdHmsRegion = "ymdHmsRegion"
6588
+ }
6589
+ /** 返回值cellset中的dimType */
6590
+ export enum CellsetDimTypes {
6591
+ StandardDimension = "StandardDimension",
6592
+ StrDateTypeDimension = "StrDateTypeDimension",
6593
+ StarDimension = "StarDimension",
6594
+ GeographicDimension = "GeographicDimension",
6595
+ /** 上面为维度字段,measureCol代表度量 */
6596
+ measureCol = "measureCol"
6597
+ }
6598
+ export class HintModal {
6599
+ dsType: DsType;
6600
+ head: `set`;
6601
+ key: string;
6602
+ connector: `=`;
6603
+ value: string;
6604
+ support: boolean;
6862
6605
  }
6863
6606
  }
6864
6607
 
@@ -7128,9 +6871,7 @@ declare module '@quickbi/bi-types/cube/data-source' {
7128
6871
  /** 达梦 */
7129
6872
  dm = "dm",
7130
6873
  /** 日志服务SLS */
7131
- sls = "sls",
7132
- /** RDS MySQL DuckDB */
7133
- mysql_duckdb = "mysql_duckdb"
6874
+ sls = "sls"
7134
6875
  }
7135
6876
  export enum AcrossDsType {
7136
6877
  UN_SET,
@@ -7153,9 +6894,7 @@ declare module '@quickbi/bi-types/cube/data-source' {
7153
6894
  /** 端口号为8242 此后所有注释 皆为表明 变量代表的端口号码 */
7154
6895
  eight_two_four_two = "8242",
7155
6896
  three_three_zero_six_zero = "33060",
7156
- three_zero_zero_six_zero = "30060",
7157
- three_three_zero_six = "33306",
7158
- one_zero_zero_zero_zero = "10000"
6897
+ three_zero_zero_six_zero = "30060"
7159
6898
  }
7160
6899
  /** 数据源 - 根据类型 - 排序 */
7161
6900
  export enum DataSourceSort {
@@ -7191,47 +6930,56 @@ declare module '@quickbi/bi-types/cube/data-source' {
7191
6930
  google = "google",
7192
6931
  customDs = "customDs"
7193
6932
  }
6933
+ /** 数据库数据源类型 */
6934
+ export const dataBaseType: DataSourcesConfigId[];
7194
6935
  /** 文档数据源 */
7195
6936
  export const SHEET_TABLE: DsType[];
7196
6937
  }
7197
6938
 
7198
- declare module '@quickbi/bi-types/cube/logical-schema' {
6939
+ declare module '@quickbi/bi-types/cube/cube-links' {
7199
6940
  /**
7200
- * @author 嘉念
7201
- * @description 数据集逻辑模型
6941
+ * @author 雅影
6942
+ * @description 数据集关联模型类型定义
7202
6943
  */
7203
- import type { CubeLinkModel } from '@quickbi/bi-types/cube/cube-links';
7204
- import type { PhysicalSchema } from '@quickbi/bi-types/cube/physical-schema';
7205
- /** 逻辑表模型 */
7206
- export class LogicalTable {
7207
- /** 节点唯一id */
7208
- uniqueId: string;
7209
- /** 节点名称 */
7210
- caption: string;
7211
- /** 物理表模型 */
7212
- physicalSchema: PhysicalSchema;
7213
- }
7214
- export class LogicalTree {
7215
- uniqueId: string;
7216
- /** 描述了逻辑节点的边关系 只维护引用的节点id */
7217
- links: CubeLinkModel[];
7218
- }
7219
- export class LogicalSchema {
7220
- /** 数据集逻辑节点列表 */
7221
- logicalNodes: LogicalTable[];
7222
- /** 数据集逻辑树列表 */
7223
- logicalTrees: LogicalTree[];
6944
+ import type { TableJoinType, JoinCondition, TableRelation } from '@quickbi/bi-types/cube/cube-model';
6945
+ /** 数据集字段关联模型 */
6946
+ export interface CubeLinkJoinKeyModel {
6947
+ /** 关联条件 */
6948
+ condition: JoinCondition;
6949
+ /** 关联字段名称 */
6950
+ sourceKey: string;
6951
+ /** 目标字段名称 */
6952
+ targetKey: string;
6953
+ }
6954
+ /** 数据集关联模型 */
6955
+ export interface CubeLinkModel {
6956
+ /** 来源id */
6957
+ sourceId: string;
6958
+ /** 目标id */
6959
+ targetId: string;
6960
+ /** 来源类型 */
6961
+ sourceType: 'TABLE' | 'FILE';
6962
+ /** 目标类型 */
6963
+ targetType: 'TABLE' | 'FILE';
6964
+ /** 来源表名称 */
6965
+ sourceTableName: string;
6966
+ /** 目标表名称 */
6967
+ targetTableName: string;
6968
+ /** 关联类型 */
6969
+ joinType: TableJoinType;
6970
+ /** 关联key */
6971
+ joinKeys: CubeLinkJoinKeyModel[];
6972
+ /** 关联关系 */
6973
+ relation: TableRelation;
7224
6974
  }
7225
6975
  }
7226
6976
 
7227
- declare module '@quickbi/bi-types/cube/physical-schema' {
6977
+ declare module '@quickbi/bi-types/cube/table-schema' {
7228
6978
  /**
7229
- * @author 嘉念
7230
- * @description 数据集表模型
6979
+ * @author 雅影
6980
+ * @description 物理表模型
7231
6981
  */
7232
- import type { CubeLinkModel } from '@quickbi/bi-types/cube/cube-links';
7233
- import type { DataType, DateGranularity, RegionGranularity, SecondDataType } from '@quickbi/bi-types/cube/cube-schema';
7234
- import type { DsType } from '@quickbi/bi-types/cube/data-source';
6982
+ import type { DataType, DateGranularity, RegionGranularity, SecondDataType } from '@quickbi/bi-types/cube/cube-model';
7235
6983
  /** 物理表字段模型 */
7236
6984
  export interface TableField {
7237
6985
  /** 物理字段备注 */
@@ -7255,7 +7003,7 @@ declare module '@quickbi/bi-types/cube/physical-schema' {
7255
7003
  /** 支持修改字段类型 */
7256
7004
  supportCastDataType?: boolean | null;
7257
7005
  }
7258
- /** 物理表详情接口模型 */
7006
+ /** 物理表模型 */
7259
7007
  export interface TableSchema {
7260
7008
  /** 数据源id */
7261
7009
  datasourceId?: string;
@@ -7276,112 +7024,210 @@ declare module '@quickbi/bi-types/cube/physical-schema' {
7276
7024
  /** 表类型 上传文件为file */
7277
7025
  tableType?: string;
7278
7026
  }
7279
- /** 表关联类型 */
7280
- export enum TableJoinType {
7281
- /** 左关联 */
7282
- LEFT_OUTER_JOIN = "LEFT_OUTER_JOIN",
7283
- /** 内关联 */
7284
- INNER_JOIN = "INNER_JOIN",
7285
- /** 右关联 */
7286
- RIGHT_OUTER_JOIN = "RIGHT_OUTER_JOIN",
7287
- /** 全关联 */
7288
- FULL_OUTER_JOIN = "FULL_OUTER_JOIN",
7289
- JOIN_ERROR = "JOIN_ERROR"
7027
+ }
7028
+
7029
+ declare module '@quickbi/bi-types/cube/cube-field-expression' {
7030
+ /**
7031
+ * @author 嘉念
7032
+ * @description 数据集字段表达式模型
7033
+ */
7034
+ export enum FieldExpressionType {
7035
+ /** 分组字段 */
7036
+ dataGroup = "dataGroup",
7037
+ /** 计算字段 */
7038
+ udf = "udf",
7039
+ /** lod字段 */
7040
+ system = "system",
7041
+ /** 工具栏字段(时间差字段、缺失值替换字段、新增别名字段、拆分列字段、合并字段) */
7042
+ tool = "tool"
7290
7043
  }
7291
- /** 物理表类型 */
7292
- export enum PhysicalTableType {
7293
- /** 物理表 */
7294
- Table = "table",
7295
- /** 自定义SQL */
7296
- Sql = "sql",
7297
- /** 上传文件(探索空间 & 数据库)、API数据源、文档数据源 */
7298
- File = "file"
7044
+ /** 工具栏字段类型 */
7045
+ export enum ToolFieldType {
7046
+ /** 时间差字段 */
7047
+ DateDifference = "dateDifference",
7048
+ /** 缺失值替换字段 */
7049
+ MissingValueReplacement = "missingValueReplacement",
7050
+ /** 维度别名字段 */
7051
+ ValueReplacement = "valueReplacement",
7052
+ /** 拆分列字段 */
7053
+ SplitField = "SplitField",
7054
+ /** 合并字段 */
7055
+ MergeField = "mergeField"
7299
7056
  }
7300
- /** 物理表模型 */
7301
- export interface PhysicalTable {
7302
- /** 唯一标识 */
7303
- uniqueId: string;
7304
- /** 表展示名称 */
7305
- caption?: string;
7306
- /** 表id */
7307
- tableName: string;
7308
- /** 物理表所属数据源ID */
7309
- datasourceId: string;
7310
- /** 是否为事实表(中心表标识) */
7311
- factTable: boolean;
7312
- /** 数据源类型 */
7313
- dsType: DsType;
7314
- /** 表类型(不落库,每次获取cubeSchema模型时后端实时查询返回) */
7315
- tableType?: PhysicalTableType;
7316
- }
7317
- /** 自定义SQL虚拟表模型 */
7318
- export interface VirtualTable {
7319
- /** 唯一标识 */
7320
- uniqueId: string;
7321
- /** 表展示名称 */
7322
- caption: string;
7323
- /** 表名 */
7324
- tableName: string;
7325
- /** 物理表所属数据源ID */
7326
- datasourceId: string;
7327
- /** 是否为事实表(中心表标识) */
7328
- factTable: boolean;
7329
- dsType: DsType;
7330
- sqlId: string;
7331
- sql: string;
7332
- /** 表类型(不落库,每次获取cubeSchema模型时后端实时查询返回) */
7333
- tableType?: PhysicalTableType;
7057
+ /** 时间差字段配置 */
7058
+ export interface DateDiffFieldConfig {
7059
+ /** 开始字段 */
7060
+ firstField: string;
7061
+ /** 结束字段 */
7062
+ endField: string;
7063
+ /** 时间单位 */
7064
+ timeUnit: string;
7334
7065
  }
7335
- /** 合并字段来源表信息 */
7336
- export interface UnionTableColumnModel {
7337
- /** 来源表id */
7338
- table: string;
7339
- /** 来源字段物理字段名(表名称列不传) */
7340
- column?: string;
7341
- /** 来源表的名称(表名称列需要传) */
7342
- value?: string;
7066
+ /** 维值替换字段配置 */
7067
+ export interface ReplaceDimValueFieldConfig {
7068
+ /** 引用字段Id */
7069
+ refUniqueId: string;
7070
+ /** 替换维值列表 */
7071
+ replaceElementList: {
7072
+ /** 原始值 */
7073
+ originalValue: string;
7074
+ /** 替换值 */
7075
+ value: string;
7076
+ }[];
7343
7077
  }
7344
- /** 合并字段 */
7345
- export interface UnionColumn {
7346
- /** 合并后的字段名 */
7347
- column: string;
7348
- /** 备注 */
7349
- caption: string;
7350
- /** 合并字段的来源表字段信息 */
7351
- tableColumns: UnionTableColumnModel[];
7352
- /** 非源表字段,自动生成的表名称列 */
7353
- isAuto?: boolean;
7078
+ /** 缺失值替换字段配置 */
7079
+ export interface MissingValueReplaceFieldConfig {
7080
+ /** 引用字段Id */
7081
+ refUniqueId: string;
7082
+ /** 替换空值 */
7083
+ replaceNullValue: boolean;
7084
+ /** 替换空白值 */
7085
+ replaceBlankValue: boolean;
7086
+ /** 替换值 */
7087
+ value: string;
7354
7088
  }
7355
- /** 合并表模型 */
7356
- export interface UnionTable extends PhysicalTable {
7357
- /** 物理表 */
7358
- tables: PhysicalTable[];
7359
- /** 自定义sql、view */
7360
- virtualTables: VirtualTable[];
7361
- /** 合并字段信息 */
7362
- unionColumns: UnionColumn[];
7089
+ /** 拆分列字段配置 */
7090
+ export interface SplitColumnFieldConfig {
7091
+ /** 引用字段Id */
7092
+ refUniqueId: string;
7093
+ /** 分隔符 */
7094
+ delimiter: string;
7095
+ /** 是否是第N列拆分字段 */
7096
+ firstN: boolean;
7097
+ /** 拆分字符数 */
7098
+ splitNumber: number;
7099
+ /** 拆分索引 */
7100
+ splitIndex: number;
7363
7101
  }
7364
- export class HintModal {
7365
- dsType: DsType;
7366
- head: `set`;
7367
- key: string;
7368
- connector: `=`;
7369
- value: string;
7370
- support: boolean;
7102
+ /** 合并字段配置 */
7103
+ export interface MergeFieldsFieldConfig {
7104
+ /** 连接符 */
7105
+ delimiter: string;
7106
+ /** 合并字段id列表 */
7107
+ mergeElementList: string[];
7371
7108
  }
7372
- export class PhysicalSchema {
7373
- /** 物理表 */
7374
- tables: PhysicalTable[];
7375
- /** 自定义sql、view */
7376
- virtualTables: VirtualTable[];
7377
- /** union合并表 */
7378
- unionTables: UnionTable[];
7379
- /** 表关联关系 */
7380
- links: CubeLinkModel[];
7381
- /** odps表是否开启全表扫描 */
7382
- sqlHintTypes?: string[];
7383
- /** 主逻辑表下才有 */
7384
- sqlHints?: HintModal[];
7109
+ export interface ToolFieldConfig {
7110
+ /** 唯一标识 */
7111
+ uniqueId: string;
7112
+ /** 字段名称 */
7113
+ caption: string;
7114
+ /** 工具栏类型 */
7115
+ toolType: ToolFieldType;
7116
+ /** 时间差字段配置 */
7117
+ dateDiffItem: DateDiffFieldConfig;
7118
+ /** 新增别名字段配置 */
7119
+ replaceItem: ReplaceDimValueFieldConfig;
7120
+ /** 缺失值替换字段配置 */
7121
+ missingReplaceItem: MissingValueReplaceFieldConfig;
7122
+ /** 拆分列字段配置 */
7123
+ splitItem: SplitColumnFieldConfig;
7124
+ /** 合并字段配置 */
7125
+ mergeItem: MergeFieldsFieldConfig;
7126
+ }
7127
+ /** 分组字段类型 */
7128
+ export enum GroupType {
7129
+ /** 日期类型-自定义区间分组 */
7130
+ NormalGroup = "NormalGroup",
7131
+ /** 枚举-列表分组类型 */
7132
+ ListGroup = "ListGroup",
7133
+ /** 数值-自定义分组类型 */
7134
+ CustomizedGroup = "CustomizedGroup"
7135
+ }
7136
+ /** 分组字段操作符 */
7137
+ export enum GroupOperator {
7138
+ /** 小于 */
7139
+ LessThan = "lessThan",
7140
+ /** 小于等于 */
7141
+ LessThanOrEqualTo = "lessThanOrEqualTo",
7142
+ /** 大于 */
7143
+ GreaterThan = "greaterThan",
7144
+ /** 大于等于 */
7145
+ GreaterThanOrEqualTo = "greaterThanOrEqualTo",
7146
+ /** 为空 */
7147
+ IsNull = "isNull"
7148
+ }
7149
+ /** 数值-自定义分组类型 */
7150
+ export type CustomizedGroup = {
7151
+ /** 是否是默认分组字段 */
7152
+ groupName: string;
7153
+ defaultGroup: boolean;
7154
+ lower: string;
7155
+ upper: string;
7156
+ lowerOperator: GroupOperator.IsNull | GroupOperator.GreaterThan | GroupOperator.GreaterThanOrEqualTo;
7157
+ upperOperator: GroupOperator.LessThan | GroupOperator.LessThanOrEqualTo;
7158
+ groupNameType: any;
7159
+ };
7160
+ /** 枚举-列表分组类型 */
7161
+ export type ListGrouping = {
7162
+ groupName: string;
7163
+ groupElementList: string[];
7164
+ defaultGroup: boolean;
7165
+ };
7166
+ /** 日期类型-自定义区间分组 */
7167
+ export type NormalGroup = {
7168
+ groupName: string;
7169
+ defaultGroup: boolean;
7170
+ lower: string;
7171
+ upper: string;
7172
+ lowerOperator: GroupOperator.GreaterThanOrEqualTo;
7173
+ upperOperator: GroupOperator.LessThanOrEqualTo;
7174
+ };
7175
+ /** 分组字段 */
7176
+ export type Groups = CustomizedGroup[] | ListGrouping[] | NormalGroup[];
7177
+ export interface GroupFieldConfig {
7178
+ /** 唯一标识 */
7179
+ uniqueId: string;
7180
+ /** 分组名称 */
7181
+ caption: string;
7182
+ /** 分组类型 */
7183
+ groupType: GroupType;
7184
+ refUniqueId: string;
7185
+ /** qa中使用。qbi目前用不到 */
7186
+ refSql?: string;
7187
+ /** qa中使用。qbi目前用不到 */
7188
+ refFunction?: string;
7189
+ /** 数值类型分组字段 */
7190
+ customizedGroups?: CustomizedGroup[];
7191
+ /** 字符串类型分组字段 */
7192
+ listGroupings?: ListGrouping[];
7193
+ /** 日期类型分组字段 */
7194
+ normalGroups?: NormalGroup[];
7195
+ }
7196
+ /**
7197
+ * 原先计算字段、分组字段存储配置的模型,v6.0.2新增:时间差字段、缺失值替换字段、新增别名字段、拆分列字段、合并字段
7198
+ */
7199
+ export interface FieldExpressionModel {
7200
+ type: FieldExpressionType;
7201
+ value?: string;
7202
+ /** 分组字段配置 */
7203
+ dataGroup: GroupFieldConfig;
7204
+ /** 工具栏字段配置 */
7205
+ tool?: ToolFieldConfig;
7206
+ }
7207
+ }
7208
+
7209
+ declare module '@quickbi/bi-types/cube/cube-blend' {
7210
+ /**
7211
+ * @author 雅影
7212
+ * @description 数据混合类型定义
7213
+ */
7214
+ import type { Link, JoinKey } from '@quickbi/bi-types/cube/cube-model';
7215
+ /** 数据集之间关联的模型定义 */
7216
+ export interface CubeLink extends Omit<Link, 'joinKeys'> {
7217
+ joinKeys: Omit<JoinKey, 'condition'>[];
7218
+ }
7219
+ /** 数据集混合schema */
7220
+ export interface BlendSchema {
7221
+ /** 数据混合唯一id */
7222
+ uniqueId: string;
7223
+ /** 数据混合名称 */
7224
+ caption: string;
7225
+ /** 数据混合关联关系 */
7226
+ cubeLinks: CubeLink[];
7227
+ /** 标识是否存在字段id重复 */
7228
+ hasRepeatFid?: boolean;
7385
7229
  }
7230
+ /** 数据混合消费端模型定义 */
7231
+ export type CubeBlend = BlendSchema;
7386
7232
  }
7387
7233