@quickbi/bi-types 3.1.5-beta.0 → 3.2.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/esm/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';
@@ -13,7 +13,7 @@ declare module '@quickbi/bi-types' {
13
13
  export { ResourcePageHeaderGroupEnum } from '@quickbi/bi-types/ui/page-header';
14
14
  export { PersonalThemeMode, OrgThemeMode } from '@quickbi/bi-types/ui/theme';
15
15
  export { CustomEventType } from '@quickbi/bi-types/open/events/event-props';
16
- export type { CustomEventModalPayload, CustomEventPageConfig, CustomEventPropsDispatch, CustomEventProps, } from '@quickbi/bi-types/open/events/event-props';
16
+ export type { CustomEventModalPayload, CustomEventPageConfig, CustomEventPropsDispatch, CustomEventProps, CustomEventDownloadFiles, } from '@quickbi/bi-types/open/events/event-props';
17
17
  export type { CustomEventMeta } from '@quickbi/bi-types/open/events/event-schema';
18
18
  export type { ComponentError, ComponentConfigError, ComponentNoPermissionError, ComponentDataMaskError, ComponentNoDataError, ComponentRenderError, ComponentProps, ComponentPropsColorSeries, ComponentPropsCubeConfig, ComponentPropsDispatch, ComponentPropsGlobalConfig, ComponentPropsSkin, ComponentPropsViewConfig, DimGranularity, } from '@quickbi/bi-types/open/components/component-props';
19
19
  export type { ComponentMeta, ComponentMetaPropsSchema } from '@quickbi/bi-types/open/components/component-meta';
@@ -26,6 +26,7 @@ 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';
29
30
  export type { EmbedBaseSrc, EmbedBaseFeature, EmbedBaseEventMessageDTO, EmbedBaseEventMessageContent, EmbedBaseEventListener, EmbedBaseEventListenerReturn, } from '@quickbi/bi-types/open/embed/core';
30
31
  export { OpenPageTypeEnum } from '@quickbi/bi-types/open/common/page-types';
31
32
  export { OpenEventTypeEnum } from '@quickbi/bi-types/open/common/event-types';
@@ -431,7 +432,9 @@ declare module '@quickbi/bi-types/component-type' {
431
432
  /** 非结构化图表-词频(词云图,已下线) */
432
433
  UNSTRUCTURED_FREQUENCY = 129,
433
434
  /** 智能解读 */
434
- SMART_INTERPRETATION = 130
435
+ SMART_INTERPRETATION = 130,
436
+ /** 探索分析-智能推荐 */
437
+ EXPLORATION_SMART_CHART = 131
435
438
  }
436
439
  export const ScreenComponentCode: Record<ScreenComponentType, number>;
437
440
  export enum ChartType {
@@ -528,6 +531,8 @@ declare module '@quickbi/bi-types/component-type' {
528
531
  CONCAT_CONTAINER = "concat-container",
529
532
  INDICATOR_RELATION = "indicator-relation",
530
533
  SMART_INTERPRETATION = "smart-interpretation",
534
+ /** 探索分析-智能推荐 */
535
+ EXPLORATION_SMART_CHART = "exploration-smart-chart",
531
536
  /** ------------非结构化图表 ------------ */
532
537
  UNSTRUCTURED_PARALLEL = "parallel",
533
538
  UNSTRUCTURED_CONTRAST = "contrast",
@@ -855,13 +860,28 @@ declare module '@quickbi/bi-types/open/events/event-props' {
855
860
  */
856
861
  export type CustomEventPropsDispatch = (param: CommonOpenModalAction | CommonCloseModalAction | CommonShowMessageAction) => void;
857
862
  export enum CustomEventType {
858
- /** 自定义事件-下载前 */
859
- beforeDownloadEvent = "before-download-event",
860
863
  /** 自定义事件-页面加载前 */
861
864
  beforePageLoadEvent = "before-page-loaded-event",
862
865
  /** 自定义事件-发布前 */
863
- beforePublishEvent = "before-publish-event"
866
+ beforePublishEvent = "before-publish-event",
867
+ /** 自定义事件-下载前 */
868
+ beforeDownloadEvent = "before-download-event",
869
+ /** 自定义事件-下载后 */
870
+ afterDownloadEvent = "after-download-event"
864
871
  }
872
+ export type CustomEventDownloadFiles = Array<{
873
+ /** 文件数据 */
874
+ blob: Blob;
875
+ /** 文件名称 */
876
+ name: string;
877
+ /** 文件的 MIME 类型 */
878
+ type: string;
879
+ } | {
880
+ /** 文件地址 */
881
+ url: string;
882
+ /** 文件名称 */
883
+ name: string;
884
+ }>;
865
885
  /**
866
886
  * 自定义事件 props 接口
867
887
  */
@@ -870,6 +890,8 @@ declare module '@quickbi/bi-types/open/events/event-props' {
870
890
  type: CustomEventType;
871
891
  /** 页面信息 */
872
892
  pageConfig: CustomEventPageConfig;
893
+ /** 导出后事件文件信息 */
894
+ files?: CustomEventDownloadFiles;
873
895
  /** 操作 */
874
896
  dispatch?: CustomEventPropsDispatch;
875
897
  /** 自定义菜单展示模式 */
@@ -1118,19 +1140,19 @@ declare module '@quickbi/bi-types/open/components/component-lifecycle' {
1118
1140
  /**
1119
1141
  * 开机阶段钩子
1120
1142
  */
1121
- export type LifecycleBootstrap<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
1143
+ export type LifecycleBootstrap<T = object, P = any> = (props: LifecycleProps<T>) => void | Promise<P>;
1122
1144
  /**
1123
1145
  * 渲染阶段钩子
1124
1146
  */
1125
- export type LifecycleMount<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
1147
+ export type LifecycleMount<T = object, P = any> = (props: LifecycleProps<T>) => void | Promise<P>;
1126
1148
  /**
1127
1149
  * 卸载阶段钩子
1128
1150
  */
1129
- export type LifecycleUnmount<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
1151
+ export type LifecycleUnmount<T = object, P = any> = (props: LifecycleProps<T>) => void | Promise<P>;
1130
1152
  /**
1131
1153
  * 更新阶段钩子
1132
1154
  */
1133
- export type LifecycleUpdate<T = object, P = any> = (props?: LifecycleProps<T>) => void | Promise<P>;
1155
+ export type LifecycleUpdate<T = object, P = any> = (props: LifecycleProps<T>) => void | Promise<P>;
1134
1156
  /**
1135
1157
  * 开放组件生命周期
1136
1158
  */
@@ -1772,7 +1794,8 @@ declare module '@quickbi/bi-types/standard-model' {
1772
1794
  * | areas区域模型
1773
1795
  * -------------------------------------------------------------------------------------------
1774
1796
  */
1775
- import type { EmptyValueDisplayConfig, SecondDataType } from '@quickbi/bi-types/cube/cube-model';
1797
+ import type { EmptyValueDisplayConfig } from '@quickbi/bi-types/cube/cube-model';
1798
+ import type { SecondDataType } from '@quickbi/bi-types/cube/cube-schema';
1776
1799
  import type { CountParams, FieldCollectionType, PercentileParams, TopNParams, CompareParams, DateAccumulateParams, ProportionParams } from '@quickbi/bi-types/data-panel';
1777
1800
  import type { DifferenceParams, MovingCalculationParams, MultiFieldCombinationConfig, RankParams } from '@quickbi/bi-types/data-panel/data-config';
1778
1801
  /** 字段信息 */
@@ -2275,12 +2298,14 @@ declare module '@quickbi/bi-types/cube' {
2275
2298
  * @author 无愚
2276
2299
  * @description 数据集类型定义
2277
2300
  */
2301
+ export * from '@quickbi/bi-types/cube/cube-blend';
2302
+ export * from '@quickbi/bi-types/cube/cube-field-expression';
2303
+ export * from '@quickbi/bi-types/cube/cube-links';
2278
2304
  export * from '@quickbi/bi-types/cube/cube-model';
2305
+ export * from '@quickbi/bi-types/cube/cube-schema';
2279
2306
  export * from '@quickbi/bi-types/cube/data-source';
2280
- export * from '@quickbi/bi-types/cube/cube-links';
2281
- export * from '@quickbi/bi-types/cube/table-schema';
2282
- export * from '@quickbi/bi-types/cube/cube-field-expression';
2283
- export type { BlendSchema, CubeBlend, CubeLink } from '@quickbi/bi-types/cube/cube-blend';
2307
+ export * from '@quickbi/bi-types/cube/logical-schema';
2308
+ export * from '@quickbi/bi-types/cube/physical-schema';
2284
2309
  }
2285
2310
 
2286
2311
  declare module '@quickbi/bi-types/open/menus/menu-schema' {
@@ -2331,6 +2356,7 @@ declare module '@quickbi/bi-types/open/menus/menu-props' {
2331
2356
  import type { EnumAsUnion } from '@quickbi/bi-types/open/common/tools';
2332
2357
  import type { OpenPageTypeEnum } from '@quickbi/bi-types/open/common/page-types';
2333
2358
  import type { OpenDeviceTypeEnum } from '@quickbi/bi-types/open/common/misc';
2359
+ import type { RouteKey } from '@quickbi/bi-types/router/route-key';
2334
2360
  /**
2335
2361
  * 事件/菜单通用的页面信息
2336
2362
  */
@@ -2355,8 +2381,10 @@ declare module '@quickbi/bi-types/open/menus/menu-props' {
2355
2381
  ownerUserName: string;
2356
2382
  /** 页面标题 */
2357
2383
  title: string;
2358
- /** 页面类型 */
2359
- pageType: EnumAsUnion<typeof OpenPageTypeEnum>;
2384
+ /** @deprecated 页面类型, 已废弃, 后续请用routeKey判断页面类型 */
2385
+ pageType?: EnumAsUnion<typeof OpenPageTypeEnum>;
2386
+ /** 页面路由 key */
2387
+ routeKey?: RouteKey;
2360
2388
  }
2361
2389
  /**
2362
2390
  * 事件/菜单通用的工具方法
@@ -2504,6 +2532,17 @@ declare module '@quickbi/bi-types/open/menus/menu-props' {
2504
2532
  }
2505
2533
  }
2506
2534
 
2535
+ declare module '@quickbi/bi-types/open/custom-page/pages-props' {
2536
+ import type { CommonPageConfig } from '@quickbi/bi-types/open/menus/menu-props';
2537
+ /**
2538
+ * 自定义页面 props 接口
2539
+ */
2540
+ export interface PageComponentProps {
2541
+ /** 页面信息 */
2542
+ pageConfig: Pick<CommonPageConfig, 'userId' | 'userName' | 'routeKey'>;
2543
+ }
2544
+ }
2545
+
2507
2546
  declare module '@quickbi/bi-types/open/embed/core' {
2508
2547
  /**
2509
2548
  * @author 海狸
@@ -2574,7 +2613,7 @@ declare module '@quickbi/bi-types/open/embed/core' {
2574
2613
 
2575
2614
  declare module '@quickbi/bi-types/open/common/page-types' {
2576
2615
  /**
2577
- * @deprecated 开放相关页面类型枚举, 注意要和 routerKkey 做区分, 这个 key 后续要废弃
2616
+ * @deprecated 开放相关页面类型枚举, 注意要和 routerKey 做区分, 这个 key 后续要废弃
2578
2617
  * */
2579
2618
  export enum OpenPageTypeEnum {
2580
2619
  /** 仪表板 */
@@ -2602,12 +2641,14 @@ declare module '@quickbi/bi-types/open/common/event-types' {
2602
2641
  'before-page-change-event' = "before-page-change-event",
2603
2642
  /** 图表加载后事件 */
2604
2643
  'after-component-rendered-event' = "after-component-rendered-event",
2605
- /** 导出前事件 */
2606
- 'before-download-event' = "before-download-event",
2607
2644
  /** 页面加载前事件 */
2608
2645
  'before-page-loaded-event' = "before-page-loaded-event",
2609
2646
  /** 发布前事件 */
2610
- 'before-publish-event' = "before-publish-event"
2647
+ 'before-publish-event' = "before-publish-event",
2648
+ /** 导出前事件 */
2649
+ 'before-download-event' = "before-download-event",
2650
+ /** 导出后事件 */
2651
+ 'after-download-event' = "after-download-event"
2611
2652
  }
2612
2653
  /** 开放相关事件取值固定为 before-xxx-event, after-xxx-event */
2613
2654
  export type OpenEventTypeValue = `before-${string}-event` | `after-${string}-event`;
@@ -2771,8 +2812,12 @@ declare module '@quickbi/bi-types/router/route-key' {
2771
2812
  orgAdminSmartQGlobalConfig = "orgAdminSmartQGlobalConfig",
2772
2813
  /** 组织管理-智能小 Q - 通用配置 - 大模型配置 */
2773
2814
  orgAdminSmartQGlobalConfigLlmConfig = "orgAdminSmartQGlobalConfigLlmConfig",
2815
+ /** 组织管理-智能小 Q - 通用配置 - AI功能管理 */
2816
+ orgAdminSmartQGlobalConfigAIConfig = "orgAdminSmartQGlobalConfigAIConfig",
2774
2817
  /** 组织管理-智能小 Q - 通用配置 - 智能体管理 */
2775
2818
  orgAdminSmartQGlobalConfigAgentManage = "orgAdminSmartQGlobalConfigAgentManage",
2819
+ /** 组织管理-智能小 Q - 通用配置 - 知识库 */
2820
+ orgAdminSmartQGlobalConfigKnowledgeManage = "orgAdminSmartQGlobalConfigKnowledgeManage",
2776
2821
  /** 组织管理-小Q问数 */
2777
2822
  orgAdminCopilot = "orgAdminCopilot",
2778
2823
  /** 组织管理-小Q问数 - 探索版 */
@@ -2783,6 +2828,8 @@ declare module '@quickbi/bi-types/router/route-key' {
2783
2828
  orgQueryAgentAnalysisThemeAuth = "orgQueryAgentAnalysisThemeAuth",
2784
2829
  /** 组织管理-小Q问数-知识库管理 */
2785
2830
  orgQueryAgentKnowledgeBaseManage = "orgQueryAgentKnowledgeBaseManage",
2831
+ /** 组织管理-小Q问数-全局配置 */
2832
+ orgQueryAgentGlobalConfig = "orgQueryAgentGlobalConfig",
2786
2833
  /** 组织管理-小Q问数-问数资源管理 */
2787
2834
  orgResourceManage = "orgResourceManage",
2788
2835
  /** 组织管理-小Q问数-分析主题管理 */
@@ -2906,16 +2953,22 @@ declare module '@quickbi/bi-types/router/route-key' {
2906
2953
  dataServiceCount = "dataServiceCount",
2907
2954
  /** 发布渠道 */
2908
2955
  embedChannel = "embedChannel",
2956
+ /** 自定义可视化 */
2957
+ customManage = "componentManage",
2909
2958
  /** 自定义组件 */
2910
2959
  customComponent = "customComponent",
2911
2960
  /** 自定义菜单 */
2912
2961
  customMenu = "customMenu",
2962
+ /** 自定义页面 */
2963
+ customPage = "customPage",
2913
2964
  /** 自定义模板 */
2914
2965
  customTemplate = "customTemplate",
2915
2966
  /** 自定义驱动 */
2916
2967
  customConnect = "customConnect",
2917
2968
  /** 自定义插件 */
2918
2969
  customPlugin = "customPlugin",
2970
+ /** 自定义脚本 */
2971
+ customScript = "customScript",
2919
2972
  /** 监听事件 */
2920
2973
  monitorEvent = "monitorEvent",
2921
2974
  /** 行为事件 */
@@ -2942,6 +2995,8 @@ declare module '@quickbi/bi-types/router/route-key' {
2942
2995
  viewHome = "viewHome",
2943
2996
  /** 卡片卡板 */
2944
2997
  viewBoard = "viewBoard",
2998
+ /** 探索分析 */
2999
+ viewExploration = "viewExploration",
2945
3000
  /** 我的收藏 */
2946
3001
  viewFavorite = "viewFavorite",
2947
3002
  /** 最近访问 */
@@ -3119,6 +3174,12 @@ declare module '@quickbi/bi-types/router/route-key' {
3119
3174
  downloadView = "downloadView",
3120
3175
  /** 自助取数公开预览 */
3121
3176
  downloadPublicView = "downloadPublicView",
3177
+ /** ---------------------------------------------------- 探索分析 -------------------------------------------------- */
3178
+ explorationRoot = "explorationRoot",
3179
+ /** 探索分析编辑 */
3180
+ explorationEdit = "explorationEdit",
3181
+ /** 探索分析预览 */
3182
+ explorationView = "explorationView",
3122
3183
  /** --------------------------------------------------- 即席分析 -------------------------------------------------- */
3123
3184
  analysisRoot = "analysisRoot",
3124
3185
  /** 即席分析编辑 */
@@ -3491,6 +3552,14 @@ declare module '@quickbi/bi-types/router/route-tree' {
3491
3552
  /** 智能小 Q - 通用配置 - 大模型配置 */
3492
3553
  readonly key: RouteKey.orgAdminSmartQGlobalConfigLlmConfig;
3493
3554
  readonly path: "/org/admin/smartQ/globalConfig/llmConfig";
3555
+ }, {
3556
+ /** 智能小 Q - 通用配置 - AI功能管理 */
3557
+ readonly key: RouteKey.orgAdminSmartQGlobalConfigAIConfig;
3558
+ readonly path: "/org/admin/smartQ/globalConfig/aiConfig";
3559
+ }, {
3560
+ /** 智能小 Q - 通用配置 - 大模型配置 */
3561
+ readonly key: RouteKey.orgAdminSmartQGlobalConfigKnowledgeManage;
3562
+ readonly path: "/org/admin/smartQ/globalConfig/knowledgeManage";
3494
3563
  }];
3495
3564
  }, {
3496
3565
  readonly key: RouteKey.orgAdminCopilot;
@@ -3532,6 +3601,9 @@ declare module '@quickbi/bi-types/router/route-tree' {
3532
3601
  }, {
3533
3602
  readonly key: RouteKey.orgQueryAgentKnowledgeBaseManage;
3534
3603
  readonly path: "/org/admin/copilot/queryAgent/orgKnowledgeBaseManage";
3604
+ }, {
3605
+ readonly key: RouteKey.orgQueryAgentGlobalConfig;
3606
+ readonly path: "/org/admin/copilot/queryAgent/globalConfig";
3535
3607
  }];
3536
3608
  }, {
3537
3609
  readonly key: RouteKey.orgAdminQMessage;
@@ -3706,11 +3778,18 @@ declare module '@quickbi/bi-types/router/route-tree' {
3706
3778
  readonly key: RouteKey.embedChannel;
3707
3779
  readonly path: "/openservice/embedChannel";
3708
3780
  }, {
3709
- readonly key: RouteKey.customComponent;
3781
+ readonly key: RouteKey.customManage;
3710
3782
  readonly path: "/openservice/componentManage";
3711
- }, {
3712
- readonly key: RouteKey.customMenu;
3713
- readonly path: "/openservice/componentMenu";
3783
+ readonly children: [{
3784
+ readonly key: RouteKey.customComponent;
3785
+ readonly path: "/openservice/componentManage/customComponent";
3786
+ }, {
3787
+ readonly key: RouteKey.customMenu;
3788
+ readonly path: "/openservice/componentManage/customMenu";
3789
+ }, {
3790
+ readonly key: RouteKey.customPage;
3791
+ readonly path: "/openservice/componentManage/customPage";
3792
+ }];
3714
3793
  }, {
3715
3794
  readonly key: RouteKey.customTemplate;
3716
3795
  readonly path: "/openservice/defineTemplate";
@@ -3720,6 +3799,9 @@ declare module '@quickbi/bi-types/router/route-tree' {
3720
3799
  }, {
3721
3800
  readonly key: RouteKey.customPlugin;
3722
3801
  readonly path: "/openservice/customPlugin";
3802
+ }, {
3803
+ readonly key: RouteKey.customScript;
3804
+ readonly path: "/openservice/customScript";
3723
3805
  }, {
3724
3806
  readonly key: RouteKey.monitorEvent;
3725
3807
  readonly path: "/openservice/event";
@@ -3762,6 +3844,9 @@ declare module '@quickbi/bi-types/router/route-tree' {
3762
3844
  }, {
3763
3845
  readonly key: RouteKey.viewBoard;
3764
3846
  readonly path: "/view/card";
3847
+ }, {
3848
+ readonly key: RouteKey.viewExploration;
3849
+ readonly path: "/view/exploration";
3765
3850
  }, {
3766
3851
  readonly key: RouteKey.viewFavorite;
3767
3852
  readonly path: "/view/favorite";
@@ -4036,6 +4121,16 @@ declare module '@quickbi/bi-types/router/route-tree' {
4036
4121
  readonly key: RouteKey.downloadPublicView;
4037
4122
  readonly path: "/token3rd/offline/view/pc.htm";
4038
4123
  }];
4124
+ }, {
4125
+ readonly key: RouteKey.explorationRoot;
4126
+ readonly path: "/exploration";
4127
+ readonly children: [{
4128
+ readonly key: RouteKey.explorationEdit;
4129
+ readonly path: "/exploration/pc.htm";
4130
+ }, {
4131
+ readonly key: RouteKey.explorationView;
4132
+ readonly path: "/exploration/view/pc.htm";
4133
+ }];
4039
4134
  }, {
4040
4135
  readonly key: RouteKey.analysisRoot;
4041
4136
  readonly path: "/analysis";
@@ -4377,7 +4472,9 @@ declare module '@quickbi/bi-types/permission-type' {
4377
4472
  /** 资源包管理 */
4378
4473
  resourceConfig = "resourceConfig",
4379
4474
  /** 小Q报告 */
4380
- qReport = "qreport"
4475
+ qReport = "qreport",
4476
+ /** 探索分析 */
4477
+ exploration = "exploration"
4381
4478
  }
4382
4479
  }
4383
4480
 
@@ -4453,7 +4550,8 @@ declare module '@quickbi/bi-types/data-panel/base' {
4453
4550
  AGGREGATE_CALC_FIELD = "AGGREGATE_CALC_FIELD",
4454
4551
  FIELD_GROUP = "FIELD_GROUP",
4455
4552
  AGGREGATE_FIELD = "AGGREGATE_FIELD",
4456
- STRING_FIELD = "STRING_FIELD"
4553
+ STRING_FIELD = "STRING_FIELD",
4554
+ GROUP_CONTRAST = "GROUP_CONTRAST"
4457
4555
  }
4458
4556
  export enum ResultMode {
4459
4557
  SELECT_ALL = "selectAll",
@@ -4986,6 +5084,17 @@ declare module '@quickbi/bi-types/data-panel/data-config' {
4986
5084
  isMultiField?: boolean;
4987
5085
  /** 父字段的guid */
4988
5086
  parentFieldGuid?: string;
5087
+ /** 是否虚拟字段,如散点图中的聚类字段、线柱图中的度量名字段 */
5088
+ isVirtual?: boolean;
5089
+ /** 分组对比组配置, 如果有 groupContrast, 说明是分组对比字段 */
5090
+ groupContrast?: {
5091
+ /** 分组 id */
5092
+ groupId: string;
5093
+ /** 分组名称 */
5094
+ groupName: string;
5095
+ /** 分组字段 */
5096
+ columnList: Partial<DataConfigAreaItemColumn>[];
5097
+ }[];
4989
5098
  }
4990
5099
  export enum ContrastType {
4991
5100
  DAY_DAY_RING_RATIO = "day_day",
@@ -5042,7 +5151,8 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5042
5151
  */
5043
5152
  import type * as React from 'react';
5044
5153
  import type { BlendSchema } from '@quickbi/bi-types/cube/cube-blend';
5045
- import type { Aggregator, CubeModel, DateGranularity, EmptyValueDisplayConfig, Field, FieldAttribute, FolderAndHierarchyNode, RegionGranularity } from '@quickbi/bi-types/cube/cube-model';
5154
+ import type { CubeModel, EmptyValueDisplayConfig } from '@quickbi/bi-types/cube/cube-model';
5155
+ import type { Aggregator, DateGranularity, Field, FieldAttribute, FolderAndHierarchyNode, RegionGranularity } from '@quickbi/bi-types/cube/cube-schema';
5046
5156
  import type { FieldType, QueryAxisType, FieldGroupType, SecondFieldType, ChartStatus, StackedSortType, RetainAreaId, FieldCollectionType } from '@quickbi/bi-types/data-panel/base';
5047
5157
  import type { DataConfigAreaItemColumn } from '@quickbi/bi-types/data-panel/data-config';
5048
5158
  export interface ValidateResult {
@@ -5145,6 +5255,7 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5145
5255
  avg = "avg",
5146
5256
  count = "count",
5147
5257
  countd = "countd",
5258
+ approx_distinct = "approx_distinct",
5148
5259
  null = "null",
5149
5260
  more = "more",
5150
5261
  max = "max",
@@ -5262,6 +5373,7 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5262
5373
  /** 字段别名 */
5263
5374
  export interface LabelConfig extends FieldCommonConfig {
5264
5375
  type: FieldConfigTypes.rename;
5376
+ title?: string;
5265
5377
  useDescription?: boolean;
5266
5378
  }
5267
5379
  /** 对齐类别 */
@@ -5442,6 +5554,8 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5442
5554
  defaultValues?: string[];
5443
5555
  };
5444
5556
  };
5557
+ /** 分组对比字段新增时自动打开配置且只打开一次,设置为运行时状态 */
5558
+ groupContrastAutoOpen?: boolean;
5445
5559
  }
5446
5560
  /** 字段组内具体字段的字段信息,包含是否隐藏等+columnList信息 */
5447
5561
  export interface ChildFieldInfo {
@@ -5501,10 +5615,20 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5501
5615
  description?: React.ReactNode;
5502
5616
  customRenderer?: React.ReactNode;
5503
5617
  isVirtualField?: boolean;
5618
+ colorType?: Field['type'];
5504
5619
  /** 虚拟字段icon */
5505
5620
  operations?: VirtualFieldOperation[];
5506
5621
  /** 触发事件 */
5507
5622
  onClick?: Function;
5623
+ /** 分组对比组配置, 如果有 groupContrast, 说明是分组对比字段 */
5624
+ groupContrast?: {
5625
+ /** 分组 id */
5626
+ groupId: string;
5627
+ /** 分组名称 */
5628
+ groupName: string;
5629
+ /** 分组字段 */
5630
+ columnList: Partial<DataConfigAreaItemColumn>[];
5631
+ }[];
5508
5632
  }
5509
5633
  /** [字段集]FieldCollectionInfo信息 */
5510
5634
  export interface FieldCollectionInfo {
@@ -5579,7 +5703,7 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5579
5703
  }
5580
5704
  export class DataSchemaRule {
5581
5705
  /** 默认展示值 */
5582
- placeholder?: string;
5706
+ placeholder?: string | (() => React.ReactNode);
5583
5707
  /** 字段配置个数限制 */
5584
5708
  maxColNum?: number | ((areaMap: AreaMap, options: {
5585
5709
  isConvertQueryInput?: boolean;
@@ -5746,6 +5870,8 @@ declare module '@quickbi/bi-types/data-panel/data-schema-item' {
5746
5870
  isExtendAssociateFields?: boolean;
5747
5871
  /** 是否切换数据集 */
5748
5872
  isSwitchCube?: boolean;
5873
+ /** 是否需要进行重新取数(探索分析场景由查询控件触发) */
5874
+ needRefetch?: boolean;
5749
5875
  }
5750
5876
  export type OnChangeCubeOptions = Omit<OnFreshComponentOptions, 'isClickButton' | 'refreshMobileChart' | 'ReloadCube' | 'noPollingCache'>;
5751
5877
  export type OnFreshComponentType = (comp: any, changeAttributeList?: string[], isFresh?: boolean, options?: OnFreshComponentOptions) => any;
@@ -5908,328 +6034,132 @@ declare module '@quickbi/bi-types/data-panel/data-schema' {
5908
6034
 
5909
6035
  declare module '@quickbi/bi-types/cube/cube-model' {
5910
6036
  /**
5911
- * @author 嘉念
5912
- * @description 数据集接口模型
5913
- */
5914
- import type { FieldExpressionModel } from '@quickbi/bi-types/cube/cube-field-expression';
5915
- import type { DsCreateOriginEnum, DsType, DataLoadMode } from '@quickbi/bi-types/cube/data-source';
5916
- export enum CustomAreaType {
5917
- /** 自定义地理信息 */
5918
- CUSTOM_AREA = "CUSTOM_AREA",
5919
- /** 自定义瓦片底图 */
5920
- CUSTOM_GIS = "CUSTOM_GIS",
5921
- /** 自定义geojson */
5922
- CUSTOM_GEOJSON = "CUSTOM_GEOJSON",
5923
- /** 自定义层级 */
5924
- CUSTOM_TREE = "CUSTOM_TREE",
5925
- /** 自定义图片 */
5926
- CUSTOM_PICTURE = "CUSTOM_PICTURE"
5927
- }
5928
- /** 自定义图片底图信息 */
5929
- export enum PictureCoordinateType {
5930
- /** 纵坐标 */
5931
- HORIZONTAL = "CUSTOM_PICTURE_HORIZONTAL",
5932
- /** 横坐标 */
5933
- VERTICAL = "CUSTOM_PICTURE_VERTICAL"
5934
- }
5935
- /** 自定义地理信息 */
5936
- export interface ExtraInfo {
5937
- /** 自定义层级Id */
5938
- customGeoLevel?: number;
5939
- /** 自定义图片类型 */
5940
- pictureCoordinateType?: PictureCoordinateType;
5941
- }
5942
- /**
5943
- * 关联字段
5944
- * 数据混合blend和数据集物理表关联physical均使用该字段
5945
- */
5946
- export type JoinKey = {
5947
- /** 源表字段(blend模式为数据集字段id,physical模式为物理字段名) */
5948
- sourceKey: string;
5949
- /**
5950
- * @deprecated
5951
- * 源表关联物理字段类型(QBI目前没在用,保留)
5952
- */
5953
- sourceType?: string;
5954
- /** 目标表字段(blend模式为数据集字段id,physical模式为物理字段名) */
5955
- targetKey: string;
5956
- /**
5957
- * @deprecated
5958
- * 标表关联物理字段类型(QBI目前没在用,保留)
5959
- */
5960
- targetType?: string;
5961
- /**
5962
- * 条件
5963
- */
5964
- condition: JoinCondition;
5965
- /**
5966
- * 目前仅physical模式使用
5967
- */
5968
- targetCalculateMember?: boolean;
5969
- /**
5970
- * 目前仅physical模式使用
5971
- */
5972
- sourceCalculateMember?: boolean;
5973
- };
5974
- /** 物理表类型 */
5975
- export enum PhysicalTableType {
5976
- /** 物理表 */
5977
- Table = "table",
5978
- /** 自定义SQL */
5979
- Sql = "sql",
5980
- /** 上传文件(探索空间 & 数据库)、API数据源、文档数据源 */
5981
- File = "file"
5982
- }
5983
- /** 表模型 */
5984
- export interface PhysicalTable {
5985
- /** 唯一标识 */
5986
- uniqueId: string;
5987
- /** 表展示名称 */
5988
- caption?: string;
5989
- /** 表id */
5990
- tableName: string;
5991
- /** 物理表所属数据源ID */
5992
- datasourceId: string;
5993
- /** 是否为事实表(中心表标识) */
5994
- factTable: boolean;
5995
- /** 数据源类型 */
5996
- dsType: DsType;
5997
- /** 表类型(不落库,每次获取cubeSchema模型时后端实时查询返回) */
5998
- tableType?: PhysicalTableType;
5999
- }
6000
- /** 表模型 */
6001
- export interface VirtualTable {
6002
- /** 唯一标识 */
6003
- uniqueId: string;
6004
- /** 表展示名称 */
6005
- caption: string;
6006
- /** 表名 */
6007
- tableName: string;
6008
- /** 物理表所属数据源ID */
6009
- datasourceId: string;
6010
- /** 是否为事实表(中心表标识) */
6011
- factTable: boolean;
6012
- dsType: DsType;
6013
- sqlId: string;
6014
- sql: string;
6015
- /** 表类型(不落库,每次获取cubeSchema模型时后端实时查询返回) */
6016
- tableType?: PhysicalTableType;
6017
- }
6018
- /** 合并字段来源表信息 */
6019
- export interface UnionTableColumnModel {
6020
- /** 来源表id */
6021
- table: string;
6022
- /** 来源字段物理字段名(表名称列不传) */
6023
- column?: string;
6024
- /** 来源表的名称(表名称列需要传) */
6025
- value?: string;
6026
- }
6027
- /** 合并字段 */
6028
- export interface UnionColumn {
6029
- /** 合并后的字段名 */
6030
- column: string;
6031
- /** 备注 */
6032
- caption: string;
6033
- /** 合并字段的来源表字段信息 */
6034
- tableColumns: UnionTableColumnModel[];
6035
- /** 非源表字段,自动生成的表名称列 */
6036
- isAuto?: boolean;
6037
- }
6038
- /** 合并表模型 */
6039
- export interface UnionTable extends PhysicalTable {
6040
- /** 物理表 */
6041
- tables: PhysicalTable[];
6042
- /** 自定义sql、view */
6043
- virtualTables: VirtualTable[];
6044
- /** 合并字段信息 */
6045
- unionColumns: UnionColumn[];
6046
- }
6047
- export interface Link {
6048
- /** 源表id(blend模式为数据集id,physical模式为物理表id) */
6049
- source: string;
6050
- /** 关联表id(blend模式为数据集id,physical模式为物理表id) */
6051
- target: string;
6052
- /** 关联类型 */
6053
- joinType: TableJoinType;
6054
- /**
6055
- * @deprecated
6056
- * 目前只有many-to-one
6057
- */
6058
- relation?: TableRelation;
6059
- joinKeys: JoinKey[];
6060
- }
6061
- /** 物理表关联模型 */
6062
- export type PhysicalLink = Link;
6063
- export class PhysicalSchema {
6064
- /** 物理表 */
6065
- tables: PhysicalTable[];
6066
- /** 自定义sql、view */
6067
- virtualTables: VirtualTable[];
6068
- /** union合并表 */
6069
- unionTables: UnionTable[];
6070
- /** 表关联关系 */
6071
- links: PhysicalLink[];
6072
- /** odps表是否开启全表扫描 */
6073
- sqlHintTypes?: string[];
6074
- sqlHints?: HintModal[];
6075
- }
6076
- /** 数据集层级结构/文件夹/属性的嵌套关系 */
6077
- export type FieldTree = AttributeNode | FolderAndHierarchyNode;
6078
- export type AttributeMapValue = {
6079
- attribute: FieldAttribute;
6080
- type: 'Dimension' | 'Measure';
6081
- };
6082
- /** 数据集逻辑模型 */
6083
- export class CubeSchema {
6084
- /** 唯一标识,无业务逻辑,不要使用 */
6085
- uniqueId: string;
6086
- /** 数据集ID */
6087
- cubeId: string;
6088
- /** 数据源ID */
6089
- datasourceId: string;
6090
- /** 数据集名称 */
6091
- caption: string;
6092
- /** 字段列表 */
6093
- fields: Field[];
6094
- /** 普通字段、层系、文件夹树形结构 */
6095
- fieldTree: FieldTree[];
6096
- /** 过滤条件 */
6097
- filter?: FilterAttr[];
6098
- /** 全局参数 */
6099
- params: ParamType[];
6100
- /** 占位符 */
6101
- sqlPlaceholders: ParamType[];
6102
- }
6037
+ * @author 嘉念
6038
+ * @description 数据集接口模型
6039
+ */
6040
+ import type { FieldAttribute } from '@quickbi/bi-types/cube/cube-schema';
6041
+ import { CubeSchema, EmptyValueDisplayType } from '@quickbi/bi-types/cube/cube-schema';
6042
+ import type { DsCreateOriginEnum, DataLoadMode } from '@quickbi/bi-types/cube/data-source';
6043
+ import { LogicalSchema } from '@quickbi/bi-types/cube/logical-schema';
6103
6044
  /** 编辑权限属性 */
6104
6045
  export enum EditPermitType {
6105
- /** 脏数据代表空间成员 */
6106
- oldWorkSpaceMember = 1,
6107
- /** 指定成员 */
6108
- appointPerson = 12,
6109
- /** 全部空间成员 */
6110
- allWorkSpacePerson = 11
6046
+ /** 脏数据代表空间成员 */
6047
+ oldWorkSpaceMember = 1,
6048
+ /** 指定成员 */
6049
+ appointPerson = 12,
6050
+ /** 全部空间成员 */
6051
+ allWorkSpacePerson = 11
6111
6052
  }
6112
6053
  /** 使用权限属性 */
6113
6054
  export enum UsePermitType {
6114
- /** 指定成员 */
6115
- appointPerson = 2,
6116
- /** 全部空间成员 */
6117
- allWorkSpacePerson = 1
6055
+ /** 指定成员 */
6056
+ appointPerson = 2,
6057
+ /** 全部空间成员 */
6058
+ allWorkSpacePerson = 1
6118
6059
  }
6119
6060
  /** 数据集额外信息 */
6120
6061
  export class SchemaExtraInfo {
6121
- /** 数据集所在工作空间的文件夹位置 */
6122
- aimDirId: string;
6123
- hasAuthorizedUse?: boolean;
6124
- /** 权限列表 */
6125
- permissionList?: string[];
6126
- /** 行级权限,列级权限字段id */
6127
- dataLevelAttributeIds: string[];
6128
- /** 无列级权限的字段 */
6129
- withoutColumnLevelPermissionFields: string[];
6130
- /** 聚合方式 */
6131
- aggFunctions?: string[];
6132
- /** 是否开启数据脱敏 */
6133
- isDataMaskOpen?: number;
6134
- /** 是否开启列级权限 1=开启 0=未开启 */
6135
- isOpenColumnLevelPermission?: number;
6136
- /** 是否开启了行级权限 1=开启 0=未开启 */
6137
- isOpenRowLevelPermission?: number;
6138
- /** 当前数据集来自的类型 */
6139
- dsCreateOrigin?: DsCreateOriginEnum;
6140
- /** 跨源模式 */
6141
- dataLoadMode?: DataLoadMode;
6142
- /** 是否为etl 生成的数据集 */
6143
- etlGenerateCube?: boolean;
6144
- /** 数据集类型 */
6145
- cubeType?: 'upload' | 'upload_static';
6146
- /** 数据集owner */
6147
- creatorId?: string;
6148
- /** 数据集owner name */
6149
- creatorName?: string;
6150
- /** 编辑权限属性 0-私密 11-空间成员 12-指定成员 1-脏数据代表空间成员 */
6151
- authLevel?: EditPermitType;
6152
- /** 数据集描述 */
6153
- comments?: string;
6154
- /** 使用权限属性 1-空间成员 2-指定人 */
6155
- authorizedUseType?: UsePermitType;
6156
- /** */
6157
- functionConfig: {
6158
- enableCache: boolean;
6159
- enableCalculateMember: boolean;
6160
- enableCustomizedSql: boolean;
6161
- enableJoin: boolean;
6162
- };
6163
- /** 数据集修改时间 */
6164
- gmtModified?: string;
6062
+ /** 数据集所在工作空间的文件夹位置 */
6063
+ aimDirId: string;
6064
+ hasAuthorizedUse?: boolean;
6065
+ /** 权限列表 */
6066
+ permissionList?: string[];
6067
+ /** 行级权限,列级权限字段id */
6068
+ dataLevelAttributeIds: string[];
6069
+ /** 无列级权限的字段 */
6070
+ withoutColumnLevelPermissionFields: string[];
6071
+ /** 聚合方式 */
6072
+ aggFunctions?: string[];
6073
+ /** 是否开启数据脱敏 */
6074
+ isDataMaskOpen?: number;
6075
+ /** 是否开启列级权限 1=开启 0=未开启 */
6076
+ isOpenColumnLevelPermission?: number;
6077
+ /** 是否开启了行级权限 1=开启 0=未开启 */
6078
+ isOpenRowLevelPermission?: number;
6079
+ /** 当前数据集来自的类型 */
6080
+ dsCreateOrigin?: DsCreateOriginEnum;
6081
+ /** 跨源模式 */
6082
+ dataLoadMode?: DataLoadMode;
6083
+ /** 是否为etl 生成的数据集 */
6084
+ etlGenerateCube?: boolean;
6085
+ /** 数据集类型 */
6086
+ cubeType?: 'upload' | 'upload_static';
6087
+ /** 数据集owner */
6088
+ creatorId?: string;
6089
+ /** 数据集owner name */
6090
+ creatorName?: string;
6091
+ /** 编辑权限属性 0-私密 11-空间成员 12-指定成员 1-脏数据代表空间成员 */
6092
+ authLevel?: EditPermitType;
6093
+ /** 数据集描述 */
6094
+ comments?: string;
6095
+ /** 使用权限属性 1-空间成员 2-指定人 */
6096
+ authorizedUseType?: UsePermitType;
6097
+ /** */
6098
+ functionConfig: {
6099
+ enableCache: boolean;
6100
+ enableCalculateMember: boolean;
6101
+ enableCustomizedSql: boolean;
6102
+ enableJoin: boolean;
6103
+ };
6104
+ /** 数据集修改时间 */
6105
+ gmtModified?: string;
6165
6106
  }
6166
- /** 数据集模型 */
6167
- export class CubeModel {
6168
- /** 物理表 */
6169
- physicalSchema: PhysicalSchema;
6170
- /** 数据集逻辑模型 */
6171
- cubeSchema: CubeSchema;
6172
- /** 数据集结构版本 */
6173
- metaModelVersion: string;
6174
- /** 数据集订正版本(前端使用) */
6175
- userDefineVersion: string;
6176
- /** 数据集额外信息 */
6177
- schemaExtraInfo: SchemaExtraInfo;
6107
+ /** 空值展示配置类型 */
6108
+ export enum EmptyValueType {
6109
+ /** 空值 */
6110
+ EmptyValue = "EmptyValue",
6111
+ /** 空字符串 */
6112
+ EmptyString = "EmptyString"
6178
6113
  }
6179
- /** 数据集影子模型 */
6180
- export type CubeShadow = CubeSchema;
6181
- /** 表关联类型 */
6182
- export enum TableJoinType {
6183
- /** 左连接 */
6184
- LEFT_OUTER_JOIN = "LEFT_OUTER_JOIN",
6185
- /** 内连接 */
6186
- INNER_JOIN = "INNER_JOIN",
6187
- /** 右连接 */
6188
- RIGHT_OUTER_JOIN = "RIGHT_OUTER_JOIN",
6189
- /** 全连接 */
6190
- FULL_OUTER_JOIN = "FULL_OUTER_JOIN",
6191
- JOIN_ERROR = "JOIN_ERROR"
6114
+ export class EmptyStringOrNullDisplayConfig {
6115
+ /** 展示类型 */
6116
+ formatType: EmptyValueDisplayType;
6117
+ /** 自定义展示内容 */
6118
+ customFormat: string;
6119
+ /** 是否是自动(继承数据集) */
6120
+ isAuto?: boolean;
6192
6121
  }
6193
- export enum TableRelation {
6194
- MANY_TO_ONE = "many-to-one"
6122
+ /** 空值展示配置 */
6123
+ export class EmptyValueDisplayConfig {
6124
+ /** 空值展示配置 */
6125
+ emptyValueConfig: EmptyStringOrNullDisplayConfig;
6126
+ /** 空字符串展示配置 */
6127
+ emptyStringConfig: EmptyStringOrNullDisplayConfig;
6128
+ static getDefaultConfigForQuickReport(): EmptyValueDisplayConfig;
6129
+ static convertAttrEmptyValueDisplayConfig(attr: FieldAttribute, isAuto?: boolean): EmptyValueDisplayConfig;
6130
+ /** 根据fieldSettingMap中存储的配置转换成空值展示配置模型 */
6131
+ static getConfigByFieldSettingMap(fieldSetting: any, defaultValue?: any): EmptyValueDisplayConfig;
6195
6132
  }
6196
- export enum JoinCondition {
6197
- /** 等于 */
6198
- EQUAL_TO = "equal-to",
6199
- /** 不等于 */
6200
- UNEQUAL_TO = "unequal-to",
6201
- /** 大于 */
6202
- GREATER_THAN = "greater-than",
6203
- /** 大于等于 */
6204
- GREATER_THAN_OR_EQUAL_TO = "greater-than-or-equal-to",
6205
- /** 小于 */
6206
- LESS_THAN = "less-than",
6207
- /** 小于等于 */
6208
- LESS_THAN_OR_EQUAL_TO = "less-than-or-equal-to"
6133
+ /** 返回值cellset中的dimType */
6134
+ export enum CellsetDimTypes {
6135
+ StandardDimension = "StandardDimension",
6136
+ StrDateTypeDimension = "StrDateTypeDimension",
6137
+ StarDimension = "StarDimension",
6138
+ GeographicDimension = "GeographicDimension",
6139
+ /** 上面为维度字段,measureCol代表度量 */
6140
+ measureCol = "measureCol"
6209
6141
  }
6210
- /** 字段列表定义,包含维度、度量 */
6211
- export interface Field {
6212
- /** 唯一标识 */
6213
- uniqueId: string;
6214
- /** 字段名称 */
6215
- caption: string;
6216
- type: 'Dimension' | 'Measure';
6217
- /** 标记数据面板上的字段、文件夹,和数据集原有的字段、文件夹区别开来 */
6218
- fromPanel?: boolean;
6219
- /** 老接口保留字段(计算字段expression中作为唯一标识使用),新数据跟uniqueId值相同 */
6220
- name?: string;
6221
- /** 引用表id */
6222
- table: string;
6223
- /** 物理字段 */
6224
- column: string;
6225
- /** 是否为衍生字段,分组字段和计算字段都为true */
6226
- calculateMember: boolean;
6227
- /** 字段描述,仅日期类型会使用 */
6228
- comments?: string;
6229
- /** 是否支持修改字段类型 */
6230
- supportCastDataType?: boolean;
6231
- attributes: FieldAttribute[];
6142
+ /** 数据集模型 */
6143
+ export class CubeModel {
6144
+ /** 数据集逻辑模型 */
6145
+ logicalSchema: LogicalSchema;
6146
+ /** 数据集字段相关模型 */
6147
+ cubeSchema: CubeSchema;
6148
+ /** 数据集结构版本 */
6149
+ metaModelVersion: string;
6150
+ /** 数据集订正版本(前端使用) */
6151
+ userDefineVersion: string;
6152
+ /** 数据集额外信息 */
6153
+ schemaExtraInfo: SchemaExtraInfo;
6232
6154
  }
6155
+ }
6156
+
6157
+ declare module '@quickbi/bi-types/cube/cube-schema' {
6158
+ /**
6159
+ * @author 嘉念
6160
+ * @description 数据集字段相关模型
6161
+ */
6162
+ import type { FieldExpressionModel } from '@quickbi/bi-types/cube/cube-field-expression';
6233
6163
  /** 当前数据类型,如果没有进行过类型切换,则和OriginDataType一致 影响sql生成 (原colType) */
6234
6164
  export enum DataType {
6235
6165
  number = "number",
@@ -6252,6 +6182,15 @@ declare module '@quickbi/bi-types/cube/cube-model' {
6252
6182
  }
6253
6183
  /** 物理数据类型:第一次初始化时填写,后续不会修改 */
6254
6184
  export type OriginDataType = DataType;
6185
+ /** 度量类型聚合方式 */
6186
+ export enum Aggregator {
6187
+ 'sum' = "sum",
6188
+ 'count' = "count",
6189
+ 'distinct-count' = "distinct-count",
6190
+ 'max' = "max",
6191
+ 'min' = "min",
6192
+ 'avg' = "avg"
6193
+ }
6255
6194
  /** 年粒度日期类型 */
6256
6195
  export enum CalendarTypeEnum {
6257
6196
  /** 公历年 */
@@ -6304,47 +6243,6 @@ declare module '@quickbi/bi-types/cube/cube-model' {
6304
6243
  semicolon = ";",
6305
6244
  space = " "
6306
6245
  }
6307
- /**
6308
- * 维度树结构类型
6309
- * Normal: 正常层级结构
6310
- * Date: 日期类型层级结构
6311
- * Linked: 关联类型文件夹
6312
- */
6313
- export type DimensionTreeFlags = 'DimensionNormal' | 'DimensionDate' | 'DimensionLinked' | null;
6314
- /**
6315
- * 度量树结构类型
6316
- * Normal: 正常层级结构
6317
- * Linked: 关联类型文件夹
6318
- */
6319
- export type MeasureTreeFlags = 'MeasureNormal' | 'MeasureLinked' | null;
6320
- /**
6321
- * 树节点类型
6322
- * folder: 文件夹
6323
- * hierarchy: 层级结构
6324
- * attribute: 普通节点
6325
- * dimensionGroup: 维度组
6326
- * measureGroup: 度量组
6327
- * lnglatGroup: 经纬度组
6328
- * */
6329
- export type TreeNodeTypes = 'folder' | 'hierarchy' | 'attribute' | 'dimensionGroup' | 'measureGroup' | 'lnglatGroup';
6330
- /** 占位符类型 */
6331
- export enum ParamStyleType {
6332
- /** 条件占位符 */
6333
- condition = "condition",
6334
- /** 值占位符 */
6335
- placeholder = "placeholder",
6336
- /** 表达式占位符 */
6337
- param = "param",
6338
- /** 加速占位符 */
6339
- accelerate = "accelerate"
6340
- }
6341
- /** 空值展示配置类型 */
6342
- export enum EmptyValueType {
6343
- /** 空值 */
6344
- EmptyValue = "EmptyValue",
6345
- /** 空字符串 */
6346
- EmptyString = "EmptyString"
6347
- }
6348
6246
  /** 空值展示配置枚举 */
6349
6247
  export enum EmptyValueDisplayType {
6350
6248
  /** 展示为'-' */
@@ -6358,24 +6256,31 @@ declare module '@quickbi/bi-types/cube/cube-model' {
6358
6256
  /** 自定义 */
6359
6257
  Custom = "custom"
6360
6258
  }
6361
- export class EmptyStringOrNullDisplayConfig {
6362
- /** 展示类型 */
6363
- formatType: EmptyValueDisplayType;
6364
- /** 自定义展示内容 */
6365
- customFormat: string;
6366
- /** 是否是自动(继承数据集) */
6367
- isAuto?: boolean;
6259
+ export enum CustomAreaType {
6260
+ /** 自定义地理信息 */
6261
+ CUSTOM_AREA = "CUSTOM_AREA",
6262
+ /** 自定义瓦片底图 */
6263
+ CUSTOM_GIS = "CUSTOM_GIS",
6264
+ /** 自定义geojson */
6265
+ CUSTOM_GEOJSON = "CUSTOM_GEOJSON",
6266
+ /** 自定义层级 */
6267
+ CUSTOM_TREE = "CUSTOM_TREE",
6268
+ /** 自定义图片 */
6269
+ CUSTOM_PICTURE = "CUSTOM_PICTURE"
6368
6270
  }
6369
- /** 空值展示配置 */
6370
- export class EmptyValueDisplayConfig {
6371
- /** 空值展示配置 */
6372
- emptyValueConfig: EmptyStringOrNullDisplayConfig;
6373
- /** 空字符串展示配置 */
6374
- emptyStringConfig: EmptyStringOrNullDisplayConfig;
6375
- static getDefaultConfigForQuickReport(): EmptyValueDisplayConfig;
6376
- static convertAttrEmptyValueDisplayConfig(attr: FieldAttribute, isAuto?: boolean): EmptyValueDisplayConfig;
6377
- /** 根据fieldSettingMap中存储的配置转换成空值展示配置模型 */
6378
- static getConfigByFieldSettingMap(fieldSetting: any, defaultValue?: any): EmptyValueDisplayConfig;
6271
+ /** 自定义图片底图信息 */
6272
+ export enum PictureCoordinateType {
6273
+ /** 纵坐标 */
6274
+ HORIZONTAL = "CUSTOM_PICTURE_HORIZONTAL",
6275
+ /** 横坐标 */
6276
+ VERTICAL = "CUSTOM_PICTURE_VERTICAL"
6277
+ }
6278
+ /** 自定义地理信息 */
6279
+ export interface ExtraInfo {
6280
+ /** 自定义层级Id */
6281
+ customGeoLevel?: number;
6282
+ /** 自定义图片类型 */
6283
+ pictureCoordinateType?: PictureCoordinateType;
6379
6284
  }
6380
6285
  /** 字段属性 */
6381
6286
  export interface FieldAttribute {
@@ -6441,37 +6346,63 @@ declare module '@quickbi/bi-types/cube/cube-model' {
6441
6346
  customAreaType?: CustomAreaType;
6442
6347
  /** 数据集属性额外信息 */
6443
6348
  extraInfo?: ExtraInfo;
6349
+ /** 逻辑表id */
6350
+ node?: string;
6351
+ /** 物理字段 */
6352
+ column?: string;
6444
6353
  }
6445
- /** 度量类型聚合方式 */
6446
- export enum Aggregator {
6447
- 'sum' = "sum",
6448
- 'count' = "count",
6449
- 'distinct-count' = "distinct-count",
6450
- 'max' = "max",
6451
- 'min' = "min",
6452
- 'avg' = "avg"
6453
- }
6454
- export class FilterAttr {
6455
- logicalOperator: 'and' | 'or';
6456
- /** 过滤值 */
6457
- filterElements: FilterElement[];
6458
- /** 嵌套过滤条件 */
6459
- filters: FilterAttr[];
6460
- beforeJoin?: boolean;
6461
- tableId?: string;
6462
- }
6463
- export interface FilterElement {
6464
- /** 过滤条件引用的字段uid */
6465
- resourceId: string;
6466
- /** 过滤条件比较运算符:> < =, 和查询控件所用保持一致 */
6467
- functionalOperator: string;
6468
- values: {
6469
- type?: 'absolute' | 'relative' | null;
6470
- value: string;
6471
- }[];
6472
- /** 前端是否隐藏掉 */
6473
- hidden?: boolean;
6354
+ /** 字段列表定义,包含维度、度量 */
6355
+ export interface Field {
6356
+ /** 唯一标识 */
6357
+ uniqueId: string;
6358
+ /** 字段名称 */
6359
+ caption: string;
6360
+ type: 'Dimension' | 'Measure';
6361
+ /** 标记数据面板上的字段、文件夹,和数据集原有的字段、文件夹区别开来 */
6362
+ fromPanel?: boolean;
6363
+ /** 老接口保留字段(计算字段expression中作为唯一标识使用),新数据跟uniqueId值相同 */
6364
+ name?: string;
6365
+ /** 引用表id */
6366
+ table: string;
6367
+ /** 逻辑表id */
6368
+ node: string;
6369
+ /** 物理字段 */
6370
+ column: string;
6371
+ /** 是否为衍生字段,分组字段和计算字段都为true */
6372
+ calculateMember: boolean;
6373
+ /** 字段描述,仅日期类型会使用 */
6374
+ comments?: string;
6375
+ /** 是否支持修改字段类型 */
6376
+ supportCastDataType?: boolean;
6377
+ attributes: FieldAttribute[];
6474
6378
  }
6379
+ export type AttributeMapValue = {
6380
+ attribute: FieldAttribute;
6381
+ type: 'Dimension' | 'Measure';
6382
+ };
6383
+ /**
6384
+ * 树节点类型
6385
+ * folder: 文件夹
6386
+ * hierarchy: 层级结构
6387
+ * attribute: 普通节点
6388
+ * dimensionGroup: 维度组
6389
+ * measureGroup: 度量组
6390
+ * lnglatGroup: 经纬度组
6391
+ * */
6392
+ export type TreeNodeTypes = 'folder' | 'hierarchy' | 'attribute' | 'dimensionGroup' | 'measureGroup' | 'lnglatGroup';
6393
+ /**
6394
+ * 维度树结构类型
6395
+ * Normal: 正常层级结构
6396
+ * Date: 日期类型层级结构
6397
+ * Linked: 关联类型文件夹
6398
+ */
6399
+ export type DimensionTreeFlags = 'DimensionNormal' | 'DimensionDate' | 'DimensionLinked' | null;
6400
+ /**
6401
+ * 度量树结构类型
6402
+ * Normal: 正常层级结构
6403
+ * Linked: 关联类型文件夹
6404
+ */
6405
+ export type MeasureTreeFlags = 'MeasureNormal' | 'MeasureLinked' | null;
6475
6406
  /** 普通字段 */
6476
6407
  export interface AttributeNode {
6477
6408
  /** 字段ID */
@@ -6482,6 +6413,8 @@ declare module '@quickbi/bi-types/cube/cube-model' {
6482
6413
  fromPanel?: boolean;
6483
6414
  /** 节点名称,attribute类型为null */
6484
6415
  name?: null;
6416
+ /** 逻辑表id */
6417
+ node?: string;
6485
6418
  caption?: string;
6486
6419
  children?: (AttributeNode | FolderAndHierarchyNode)[];
6487
6420
  flag: null;
@@ -6498,6 +6431,8 @@ declare module '@quickbi/bi-types/cube/cube-model' {
6498
6431
  fromPanel?: boolean;
6499
6432
  /** 节点名称 */
6500
6433
  name?: string;
6434
+ /** 逻辑表id */
6435
+ node?: string;
6501
6436
  /** 节点名称,attribute类型为null */
6502
6437
  caption?: string;
6503
6438
  /** 所引用的关联表的id,仅flag为DimensionLinked和MeasureLinked时存在 */
@@ -6506,14 +6441,61 @@ declare module '@quickbi/bi-types/cube/cube-model' {
6506
6441
  /** 文件夹和层级结构类型 */
6507
6442
  flag: DimensionTreeFlags | MeasureTreeFlags;
6508
6443
  }
6509
- /**
6510
- * 日期占位符的类型(单个/范围)
6511
- */
6512
- export enum OriginDateType {
6513
- /** 单个日期 */
6514
- SingleDate = "singleDate",
6515
- /** 日期区间 */
6516
- DateRange = "dateRange"
6444
+ /** 数据集层级结构/文件夹/属性的嵌套关系 */
6445
+ export type FieldTree = AttributeNode | FolderAndHierarchyNode;
6446
+ export interface FilterElement {
6447
+ /** 过滤条件引用的字段uid */
6448
+ resourceId: string;
6449
+ /** 过滤条件比较运算符:> < =, 和查询控件所用保持一致 */
6450
+ functionalOperator: string;
6451
+ values: {
6452
+ type?: 'absolute' | 'relative' | null;
6453
+ value: string;
6454
+ }[];
6455
+ /** 前端是否隐藏掉 */
6456
+ hidden?: boolean;
6457
+ }
6458
+ /** 过滤条件 */
6459
+ export class FilterAttr {
6460
+ logicalOperator: 'and' | 'or';
6461
+ /** 过滤值 */
6462
+ filterElements: FilterElement[];
6463
+ /** 嵌套过滤条件 */
6464
+ filters: FilterAttr[];
6465
+ beforeJoin?: boolean;
6466
+ tableId?: string;
6467
+ }
6468
+ /** 占位符类型 */
6469
+ export enum ParamStyleType {
6470
+ /** 条件占位符 */
6471
+ condition = "condition",
6472
+ /** 值占位符 */
6473
+ placeholder = "placeholder",
6474
+ /** 表达式占位符 */
6475
+ param = "param",
6476
+ /** 加速占位符 */
6477
+ accelerate = "accelerate"
6478
+ }
6479
+ /** 占位符参数 */
6480
+ export enum ParamDataType {
6481
+ /** 文本 */
6482
+ string = "string",
6483
+ /** 数值 */
6484
+ number = "number",
6485
+ /** 日期 */
6486
+ dateTime = "datetime",
6487
+ /** 日期-年月日 */
6488
+ dateRegion = "dateRegion",
6489
+ /** 日期-年季 */
6490
+ quarterRegion = "quarterRegion",
6491
+ /** 日期-年月 */
6492
+ monthRegion = "monthRegion",
6493
+ /** 日期-年周 */
6494
+ weekRegion = "weekRegion",
6495
+ /** 日期-年 */
6496
+ yearRegion = "yearRegion",
6497
+ /** 日期-年月日时分秒 */
6498
+ ymdHmsRegion = "ymdHmsRegion"
6517
6499
  }
6518
6500
  export interface ParamType {
6519
6501
  /** sql参数id */
@@ -6543,34 +6525,333 @@ declare module '@quickbi/bi-types/cube/cube-model' {
6543
6525
  /** 默认值是否全局生效,true: 生效范围与过滤器一致。false: 默认值仅在数据集生效 */
6544
6526
  useInGlobal?: boolean;
6545
6527
  }
6546
- /** 占位符参数 */
6547
- export enum ParamDataType {
6548
- string = "string",
6549
- number = "number",
6550
- dateTime = "datetime",
6551
- dateRegion = "dateRegion",
6552
- quarterRegion = "quarterRegion",
6553
- monthRegion = "monthRegion",
6554
- weekRegion = "weekRegion",
6555
- yearRegion = "yearRegion",
6556
- ymdHmsRegion = "ymdHmsRegion"
6528
+ /** 数据集逻辑字段模型 */
6529
+ export class CubeSchema {
6530
+ /** 唯一标识,无业务逻辑,不要使用 */
6531
+ uniqueId: string;
6532
+ /** 数据集ID */
6533
+ cubeId: string;
6534
+ /** 数据源ID */
6535
+ datasourceId: string;
6536
+ /** 数据集名称 */
6537
+ caption: string;
6538
+ /** 字段列表 */
6539
+ fields: Field[];
6540
+ /** 普通字段、层系、文件夹树形结构 */
6541
+ fieldTree: FieldTree[];
6542
+ /** 过滤条件 */
6543
+ filter?: FilterAttr[];
6544
+ /** 全局参数 */
6545
+ params: ParamType[];
6546
+ /** 占位符 */
6547
+ sqlPlaceholders: ParamType[];
6557
6548
  }
6558
- /** 返回值cellset中的dimType */
6559
- export enum CellsetDimTypes {
6560
- StandardDimension = "StandardDimension",
6561
- StrDateTypeDimension = "StrDateTypeDimension",
6562
- StarDimension = "StarDimension",
6563
- GeographicDimension = "GeographicDimension",
6564
- /** 上面为维度字段,measureCol代表度量 */
6565
- measureCol = "measureCol"
6549
+ /** 数据集影子模型 */
6550
+ export type CubeShadow = CubeSchema;
6551
+ }
6552
+
6553
+ declare module '@quickbi/bi-types/cube/cube-blend' {
6554
+ /**
6555
+ * @author 雅影
6556
+ * @description 数据混合类型定义
6557
+ */
6558
+ import type { CubeLinkModel, CubeLinkJoinKeyModel } from '@quickbi/bi-types/cube/cube-links';
6559
+ /** 数据集之间关联的模型定义 */
6560
+ export interface CubeLink extends Omit<CubeLinkModel, 'joinKeys'> {
6561
+ joinKeys: Omit<CubeLinkJoinKeyModel, 'condition'>[];
6566
6562
  }
6567
- export class HintModal {
6568
- dsType: DsType;
6569
- head: `set`;
6570
- key: string;
6571
- connector: `=`;
6563
+ /** 数据集混合schema */
6564
+ export interface BlendSchema {
6565
+ /** 数据混合唯一id */
6566
+ uniqueId: string;
6567
+ /** 数据混合名称 */
6568
+ caption: string;
6569
+ /** 数据混合关联关系 */
6570
+ cubeLinks: CubeLink[];
6571
+ /** 标识是否存在字段id重复 */
6572
+ hasRepeatFid?: boolean;
6573
+ }
6574
+ /** 数据混合消费端模型定义 */
6575
+ export type CubeBlend = BlendSchema;
6576
+ }
6577
+
6578
+ declare module '@quickbi/bi-types/cube/cube-field-expression' {
6579
+ /**
6580
+ * @author 嘉念
6581
+ * @description 数据集字段表达式模型
6582
+ */
6583
+ export enum FieldExpressionType {
6584
+ /** 分组字段 */
6585
+ dataGroup = "dataGroup",
6586
+ /** 计算字段 */
6587
+ udf = "udf",
6588
+ /** lod字段 */
6589
+ system = "system",
6590
+ /** 工具栏字段(时间差字段、缺失值替换字段、新增别名字段、拆分列字段、合并字段) */
6591
+ tool = "tool"
6592
+ }
6593
+ /** 工具栏字段类型 */
6594
+ export enum ToolFieldType {
6595
+ /** 时间差字段 */
6596
+ DateDifference = "dateDifference",
6597
+ /** 缺失值替换字段 */
6598
+ MissingValueReplacement = "missingValueReplacement",
6599
+ /** 维度别名字段 */
6600
+ ValueReplacement = "valueReplacement",
6601
+ /** 拆分列字段 */
6602
+ SplitField = "SplitField",
6603
+ /** 合并字段 */
6604
+ MergeField = "mergeField"
6605
+ }
6606
+ /** 时间差字段配置 */
6607
+ export interface DateDiffFieldConfig {
6608
+ /** 开始字段 */
6609
+ firstField: string;
6610
+ /** 结束字段 */
6611
+ endField: string;
6612
+ /** 时间单位 */
6613
+ timeUnit: string;
6614
+ }
6615
+ /** 维值替换字段配置 */
6616
+ export interface ReplaceDimValueFieldConfig {
6617
+ /** 引用字段Id */
6618
+ refUniqueId: string;
6619
+ /** 替换维值列表 */
6620
+ replaceElementList: {
6621
+ /** 原始值 */
6622
+ originalValue: string;
6623
+ /** 替换值 */
6624
+ value: string;
6625
+ }[];
6626
+ }
6627
+ /** 缺失值替换字段配置 */
6628
+ export interface MissingValueReplaceFieldConfig {
6629
+ /** 引用字段Id */
6630
+ refUniqueId: string;
6631
+ /** 替换空值 */
6632
+ replaceNullValue: boolean;
6633
+ /** 替换空白值 */
6634
+ replaceBlankValue: boolean;
6635
+ /** 替换值 */
6572
6636
  value: string;
6573
- support: boolean;
6637
+ }
6638
+ /** 拆分列字段配置 */
6639
+ export interface SplitColumnFieldConfig {
6640
+ /** 引用字段Id */
6641
+ refUniqueId: string;
6642
+ /** 分隔符 */
6643
+ delimiter: string;
6644
+ /** 是否是第N列拆分字段 */
6645
+ firstN: boolean;
6646
+ /** 拆分字符数 */
6647
+ splitNumber: number;
6648
+ /** 拆分索引 */
6649
+ splitIndex: number;
6650
+ }
6651
+ /** 合并字段配置 */
6652
+ export interface MergeFieldsFieldConfig {
6653
+ /** 连接符 */
6654
+ delimiter: string;
6655
+ /** 合并字段id列表 */
6656
+ mergeElementList: string[];
6657
+ }
6658
+ export interface ToolFieldConfig {
6659
+ /** 唯一标识 */
6660
+ uniqueId: string;
6661
+ /** 字段名称 */
6662
+ caption: string;
6663
+ /** 工具栏类型 */
6664
+ toolType: ToolFieldType;
6665
+ /** 时间差字段配置 */
6666
+ dateDiffItem: DateDiffFieldConfig;
6667
+ /** 新增别名字段配置 */
6668
+ replaceItem: ReplaceDimValueFieldConfig;
6669
+ /** 缺失值替换字段配置 */
6670
+ missingReplaceItem: MissingValueReplaceFieldConfig;
6671
+ /** 拆分列字段配置 */
6672
+ splitItem: SplitColumnFieldConfig;
6673
+ /** 合并字段配置 */
6674
+ mergeItem: MergeFieldsFieldConfig;
6675
+ }
6676
+ /** 分组字段类型 */
6677
+ export enum GroupType {
6678
+ /** 日期类型-自定义区间分组 */
6679
+ NormalGroup = "NormalGroup",
6680
+ /** 枚举-列表分组类型 */
6681
+ ListGroup = "ListGroup",
6682
+ /** 数值-自定义分组类型 */
6683
+ CustomizedGroup = "CustomizedGroup"
6684
+ }
6685
+ /** 分组字段操作符 */
6686
+ export enum GroupOperator {
6687
+ /** 小于 */
6688
+ LessThan = "lessThan",
6689
+ /** 小于等于 */
6690
+ LessThanOrEqualTo = "lessThanOrEqualTo",
6691
+ /** 大于 */
6692
+ GreaterThan = "greaterThan",
6693
+ /** 大于等于 */
6694
+ GreaterThanOrEqualTo = "greaterThanOrEqualTo",
6695
+ /** 为空 */
6696
+ IsNull = "isNull",
6697
+ /** 介于 */
6698
+ Between = "between"
6699
+ }
6700
+ /** 数值-自定义分组类型 */
6701
+ export type CustomizedGroup = {
6702
+ /** 是否是默认分组字段 */
6703
+ groupName: string;
6704
+ defaultGroup: boolean;
6705
+ lower: string;
6706
+ upper: string;
6707
+ lowerOperator: GroupOperator.IsNull | GroupOperator.GreaterThan | GroupOperator.GreaterThanOrEqualTo;
6708
+ upperOperator: GroupOperator.LessThan | GroupOperator.LessThanOrEqualTo;
6709
+ groupNameType: any;
6710
+ };
6711
+ /** 枚举-列表分组类型 */
6712
+ export type ListGrouping = {
6713
+ groupName: string;
6714
+ groupElementList: string[];
6715
+ defaultGroup: boolean;
6716
+ };
6717
+ /** 日期类型-自定义区间分组 */
6718
+ export type NormalGroup = {
6719
+ groupName: string;
6720
+ defaultGroup: boolean;
6721
+ lower: string;
6722
+ upper: string;
6723
+ lowerOperator: GroupOperator.GreaterThanOrEqualTo;
6724
+ upperOperator: GroupOperator.LessThanOrEqualTo;
6725
+ };
6726
+ /** 分组字段 */
6727
+ export type Groups = CustomizedGroup[] | ListGrouping[] | NormalGroup[];
6728
+ export interface GroupFieldConfig {
6729
+ /** 唯一标识 */
6730
+ uniqueId: string;
6731
+ /** 分组名称 */
6732
+ caption: string;
6733
+ /** 分组类型 */
6734
+ groupType: GroupType;
6735
+ refUniqueId: string;
6736
+ /** qa中使用。qbi目前用不到 */
6737
+ refSql?: string;
6738
+ /** qa中使用。qbi目前用不到 */
6739
+ refFunction?: string;
6740
+ /** 数值类型分组字段 */
6741
+ customizedGroups?: CustomizedGroup[];
6742
+ /** 字符串类型分组字段 */
6743
+ listGroupings?: ListGrouping[];
6744
+ /** 日期类型分组字段 */
6745
+ normalGroups?: NormalGroup[];
6746
+ }
6747
+ /**
6748
+ * 原先计算字段、分组字段存储配置的模型,v6.0.2新增:时间差字段、缺失值替换字段、新增别名字段、拆分列字段、合并字段
6749
+ */
6750
+ export interface FieldExpressionModel {
6751
+ type: FieldExpressionType;
6752
+ value?: string;
6753
+ /** 分组字段配置 */
6754
+ dataGroup: GroupFieldConfig;
6755
+ /** 工具栏字段配置 */
6756
+ tool?: ToolFieldConfig;
6757
+ }
6758
+ }
6759
+
6760
+ declare module '@quickbi/bi-types/cube/cube-links' {
6761
+ /**
6762
+ * @author 雅影
6763
+ * @description 数据集关联模型类型定义
6764
+ */
6765
+ import type { TableJoinType } from '@quickbi/bi-types/cube/physical-schema';
6766
+ export enum JoinCondition {
6767
+ /** 等于 */
6768
+ EQUAL_TO = "equal-to",
6769
+ /** 不等于 */
6770
+ UNEQUAL_TO = "unequal-to",
6771
+ /** 大于 */
6772
+ GREATER_THAN = "greater-than",
6773
+ /** 大于等于 */
6774
+ GREATER_THAN_OR_EQUAL_TO = "greater-than-or-equal-to",
6775
+ /** 小于 */
6776
+ LESS_THAN = "less-than",
6777
+ /** 小于等于 */
6778
+ LESS_THAN_OR_EQUAL_TO = "less-than-or-equal-to"
6779
+ }
6780
+ /** 基数 */
6781
+ export enum TableRelation {
6782
+ /** 一对一 */
6783
+ ONE_TO_ONE = "one-to-one",
6784
+ /** 多对多 */
6785
+ MANY_TO_MANY = "many-to-many",
6786
+ /** 一对多 */
6787
+ ONE_TO_MANY = "one-to-many",
6788
+ /** 多对一 */
6789
+ MANY_TO_ONE = "many-to-one"
6790
+ }
6791
+ /** 引用完整性 */
6792
+ export enum ReferentialIntegrity {
6793
+ /** 全部对全部 */
6794
+ ALL_TO_ALL = "all-to-all",
6795
+ /** 全部对部分 */
6796
+ ALL_TO_SOME = "all-to-some",
6797
+ /** 部分对全部 */
6798
+ SOME_TO_ALL = "some-to-all",
6799
+ /** 部分对部分 */
6800
+ SOME_TO_SOME = "some-to-some"
6801
+ }
6802
+ /**
6803
+ * 关联字段
6804
+ * 数据混合blend和数据集物理表关联physical均使用该字段
6805
+ */
6806
+ export type CubeLinkJoinKeyModel = {
6807
+ /** 源表字段(blend模式为数据集字段id,physical模式为物理字段名) */
6808
+ sourceKey: string;
6809
+ /**
6810
+ * @deprecated
6811
+ * 源表关联物理字段类型(QBI目前没在用,保留)
6812
+ */
6813
+ sourceType?: string;
6814
+ /** 目标表字段(blend模式为数据集字段id,physical模式为物理字段名) */
6815
+ targetKey: string;
6816
+ /**
6817
+ * @deprecated
6818
+ * 标表关联物理字段类型(QBI目前没在用,保留)
6819
+ */
6820
+ targetType?: string;
6821
+ /**
6822
+ * 条件
6823
+ */
6824
+ condition: JoinCondition;
6825
+ /**
6826
+ * 目前仅physical模式使用
6827
+ */
6828
+ targetCalculateMember?: boolean;
6829
+ /**
6830
+ * 目前仅physical模式使用
6831
+ */
6832
+ sourceCalculateMember?: boolean;
6833
+ };
6834
+ export interface CubeLinkModel {
6835
+ /** 源表id(blend模式为数据集id,physical模式为物理表id) */
6836
+ source: string;
6837
+ /** 关联表id(blend模式为数据集id,physical模式为物理表id) */
6838
+ target: string;
6839
+ /** 关联类型 */
6840
+ joinType: TableJoinType;
6841
+ /** 关联字段 */
6842
+ joinKeys: CubeLinkJoinKeyModel[];
6843
+ /** 基数 物理表关联目前只有many-to-one */
6844
+ relation?: TableRelation;
6845
+ /** 引用完整性 */
6846
+ match?: ReferentialIntegrity;
6847
+ /**
6848
+ * 是否为自动生成的关联键(未经用户确认)
6849
+ * 前端临时字段,用于标记自动匹配的关联键
6850
+ * - true: 系统自动匹配生成,需要弹窗让用户确认
6851
+ * - false/undefined: 用户已确认,或手动创建的
6852
+ * 注意:此字段不应该发送到后端,仅在前端逻辑中使用
6853
+ */
6854
+ isAutoGenerated?: boolean;
6574
6855
  }
6575
6856
  }
6576
6857
 
@@ -6865,7 +7146,9 @@ declare module '@quickbi/bi-types/cube/data-source' {
6865
7146
  /** 端口号为8242 此后所有注释 皆为表明 变量代表的端口号码 */
6866
7147
  eight_two_four_two = "8242",
6867
7148
  three_three_zero_six_zero = "33060",
6868
- three_zero_zero_six_zero = "30060"
7149
+ three_zero_zero_six_zero = "30060",
7150
+ three_three_zero_six = "33306",
7151
+ one_zero_zero_zero_zero = "10000"
6869
7152
  }
6870
7153
  /** 数据源 - 根据类型 - 排序 */
6871
7154
  export enum DataSourceSort {
@@ -6905,50 +7188,43 @@ declare module '@quickbi/bi-types/cube/data-source' {
6905
7188
  export const SHEET_TABLE: DsType[];
6906
7189
  }
6907
7190
 
6908
- declare module '@quickbi/bi-types/cube/cube-links' {
7191
+ declare module '@quickbi/bi-types/cube/logical-schema' {
6909
7192
  /**
6910
- * @author 雅影
6911
- * @description 数据集关联模型类型定义
7193
+ * @author 嘉念
7194
+ * @description 数据集逻辑模型
6912
7195
  */
6913
- import type { TableJoinType, JoinCondition, TableRelation } from '@quickbi/bi-types/cube/cube-model';
6914
- /** 数据集字段关联模型 */
6915
- export interface CubeLinkJoinKeyModel {
6916
- /** 关联条件 */
6917
- condition: JoinCondition;
6918
- /** 关联字段名称 */
6919
- sourceKey: string;
6920
- /** 目标字段名称 */
6921
- targetKey: string;
6922
- }
6923
- /** 数据集关联模型 */
6924
- export interface CubeLinkModel {
6925
- /** 来源id */
6926
- sourceId: string;
6927
- /** 目标id */
6928
- targetId: string;
6929
- /** 来源类型 */
6930
- sourceType: 'TABLE' | 'FILE';
6931
- /** 目标类型 */
6932
- targetType: 'TABLE' | 'FILE';
6933
- /** 来源表名称 */
6934
- sourceTableName: string;
6935
- /** 目标表名称 */
6936
- targetTableName: string;
6937
- /** 关联类型 */
6938
- joinType: TableJoinType;
6939
- /** 关联key */
6940
- joinKeys: CubeLinkJoinKeyModel[];
6941
- /** 关联关系 */
6942
- relation: TableRelation;
7196
+ import type { CubeLinkModel } from '@quickbi/bi-types/cube/cube-links';
7197
+ import type { PhysicalSchema } from '@quickbi/bi-types/cube/physical-schema';
7198
+ /** 逻辑表模型 */
7199
+ export class LogicalTable {
7200
+ /** 节点唯一id */
7201
+ uniqueId: string;
7202
+ /** 节点名称 */
7203
+ caption: string;
7204
+ /** 物理表模型 */
7205
+ physicalSchema: PhysicalSchema;
7206
+ }
7207
+ export class LogicalTree {
7208
+ uniqueId: string;
7209
+ /** 描述了逻辑节点的边关系 只维护引用的节点id */
7210
+ links: CubeLinkModel[];
7211
+ }
7212
+ export class LogicalSchema {
7213
+ /** 数据集逻辑节点列表 */
7214
+ logicalNodes: LogicalTable[];
7215
+ /** 数据集逻辑树列表 */
7216
+ logicalTrees: LogicalTree[];
6943
7217
  }
6944
7218
  }
6945
7219
 
6946
- declare module '@quickbi/bi-types/cube/table-schema' {
7220
+ declare module '@quickbi/bi-types/cube/physical-schema' {
6947
7221
  /**
6948
- * @author 雅影
6949
- * @description 物理表模型
7222
+ * @author 嘉念
7223
+ * @description 数据集表模型
6950
7224
  */
6951
- import type { DataType, DateGranularity, RegionGranularity, SecondDataType } from '@quickbi/bi-types/cube/cube-model';
7225
+ import type { CubeLinkModel } from '@quickbi/bi-types/cube/cube-links';
7226
+ import type { DataType, DateGranularity, RegionGranularity, SecondDataType } from '@quickbi/bi-types/cube/cube-schema';
7227
+ import type { DsType } from '@quickbi/bi-types/cube/data-source';
6952
7228
  /** 物理表字段模型 */
6953
7229
  export interface TableField {
6954
7230
  /** 物理字段备注 */
@@ -6972,7 +7248,7 @@ declare module '@quickbi/bi-types/cube/table-schema' {
6972
7248
  /** 支持修改字段类型 */
6973
7249
  supportCastDataType?: boolean | null;
6974
7250
  }
6975
- /** 物理表模型 */
7251
+ /** 物理表详情接口模型 */
6976
7252
  export interface TableSchema {
6977
7253
  /** 数据源id */
6978
7254
  datasourceId?: string;
@@ -6993,210 +7269,112 @@ declare module '@quickbi/bi-types/cube/table-schema' {
6993
7269
  /** 表类型 上传文件为file */
6994
7270
  tableType?: string;
6995
7271
  }
6996
- }
6997
-
6998
- declare module '@quickbi/bi-types/cube/cube-field-expression' {
6999
- /**
7000
- * @author 嘉念
7001
- * @description 数据集字段表达式模型
7002
- */
7003
- export enum FieldExpressionType {
7004
- /** 分组字段 */
7005
- dataGroup = "dataGroup",
7006
- /** 计算字段 */
7007
- udf = "udf",
7008
- /** lod字段 */
7009
- system = "system",
7010
- /** 工具栏字段(时间差字段、缺失值替换字段、新增别名字段、拆分列字段、合并字段) */
7011
- tool = "tool"
7012
- }
7013
- /** 工具栏字段类型 */
7014
- export enum ToolFieldType {
7015
- /** 时间差字段 */
7016
- DateDifference = "dateDifference",
7017
- /** 缺失值替换字段 */
7018
- MissingValueReplacement = "missingValueReplacement",
7019
- /** 维度别名字段 */
7020
- ValueReplacement = "valueReplacement",
7021
- /** 拆分列字段 */
7022
- SplitField = "SplitField",
7023
- /** 合并字段 */
7024
- MergeField = "mergeField"
7025
- }
7026
- /** 时间差字段配置 */
7027
- export interface DateDiffFieldConfig {
7028
- /** 开始字段 */
7029
- firstField: string;
7030
- /** 结束字段 */
7031
- endField: string;
7032
- /** 时间单位 */
7033
- timeUnit: string;
7034
- }
7035
- /** 维值替换字段配置 */
7036
- export interface ReplaceDimValueFieldConfig {
7037
- /** 引用字段Id */
7038
- refUniqueId: string;
7039
- /** 替换维值列表 */
7040
- replaceElementList: {
7041
- /** 原始值 */
7042
- originalValue: string;
7043
- /** 替换值 */
7044
- value: string;
7045
- }[];
7046
- }
7047
- /** 缺失值替换字段配置 */
7048
- export interface MissingValueReplaceFieldConfig {
7049
- /** 引用字段Id */
7050
- refUniqueId: string;
7051
- /** 替换空值 */
7052
- replaceNullValue: boolean;
7053
- /** 替换空白值 */
7054
- replaceBlankValue: boolean;
7055
- /** 替换值 */
7056
- value: string;
7057
- }
7058
- /** 拆分列字段配置 */
7059
- export interface SplitColumnFieldConfig {
7060
- /** 引用字段Id */
7061
- refUniqueId: string;
7062
- /** 分隔符 */
7063
- delimiter: string;
7064
- /** 是否是第N列拆分字段 */
7065
- firstN: boolean;
7066
- /** 拆分字符数 */
7067
- splitNumber: number;
7068
- /** 拆分索引 */
7069
- splitIndex: number;
7070
- }
7071
- /** 合并字段配置 */
7072
- export interface MergeFieldsFieldConfig {
7073
- /** 连接符 */
7074
- delimiter: string;
7075
- /** 合并字段id列表 */
7076
- mergeElementList: string[];
7272
+ /** 表关联类型 */
7273
+ export enum TableJoinType {
7274
+ /** 左关联 */
7275
+ LEFT_OUTER_JOIN = "LEFT_OUTER_JOIN",
7276
+ /** 内关联 */
7277
+ INNER_JOIN = "INNER_JOIN",
7278
+ /** 右关联 */
7279
+ RIGHT_OUTER_JOIN = "RIGHT_OUTER_JOIN",
7280
+ /** 全关联 */
7281
+ FULL_OUTER_JOIN = "FULL_OUTER_JOIN",
7282
+ JOIN_ERROR = "JOIN_ERROR"
7077
7283
  }
7078
- export interface ToolFieldConfig {
7079
- /** 唯一标识 */
7080
- uniqueId: string;
7081
- /** 字段名称 */
7082
- caption: string;
7083
- /** 工具栏类型 */
7084
- toolType: ToolFieldType;
7085
- /** 时间差字段配置 */
7086
- dateDiffItem: DateDiffFieldConfig;
7087
- /** 新增别名字段配置 */
7088
- replaceItem: ReplaceDimValueFieldConfig;
7089
- /** 缺失值替换字段配置 */
7090
- missingReplaceItem: MissingValueReplaceFieldConfig;
7091
- /** 拆分列字段配置 */
7092
- splitItem: SplitColumnFieldConfig;
7093
- /** 合并字段配置 */
7094
- mergeItem: MergeFieldsFieldConfig;
7284
+ /** 物理表类型 */
7285
+ export enum PhysicalTableType {
7286
+ /** 物理表 */
7287
+ Table = "table",
7288
+ /** 自定义SQL */
7289
+ Sql = "sql",
7290
+ /** 上传文件(探索空间 & 数据库)、API数据源、文档数据源 */
7291
+ File = "file"
7095
7292
  }
7096
- /** 分组字段类型 */
7097
- export enum GroupType {
7098
- /** 日期类型-自定义区间分组 */
7099
- NormalGroup = "NormalGroup",
7100
- /** 枚举-列表分组类型 */
7101
- ListGroup = "ListGroup",
7102
- /** 数值-自定义分组类型 */
7103
- CustomizedGroup = "CustomizedGroup"
7293
+ /** 物理表模型 */
7294
+ export interface PhysicalTable {
7295
+ /** 唯一标识 */
7296
+ uniqueId: string;
7297
+ /** 表展示名称 */
7298
+ caption?: string;
7299
+ /** 表id */
7300
+ tableName: string;
7301
+ /** 物理表所属数据源ID */
7302
+ datasourceId: string;
7303
+ /** 是否为事实表(中心表标识) */
7304
+ factTable: boolean;
7305
+ /** 数据源类型 */
7306
+ dsType: DsType;
7307
+ /** 表类型(不落库,每次获取cubeSchema模型时后端实时查询返回) */
7308
+ tableType?: PhysicalTableType;
7309
+ }
7310
+ /** 自定义SQL虚拟表模型 */
7311
+ export interface VirtualTable {
7312
+ /** 唯一标识 */
7313
+ uniqueId: string;
7314
+ /** 表展示名称 */
7315
+ caption: string;
7316
+ /** 表名 */
7317
+ tableName: string;
7318
+ /** 物理表所属数据源ID */
7319
+ datasourceId: string;
7320
+ /** 是否为事实表(中心表标识) */
7321
+ factTable: boolean;
7322
+ dsType: DsType;
7323
+ sqlId: string;
7324
+ sql: string;
7325
+ /** 表类型(不落库,每次获取cubeSchema模型时后端实时查询返回) */
7326
+ tableType?: PhysicalTableType;
7104
7327
  }
7105
- /** 分组字段操作符 */
7106
- export enum GroupOperator {
7107
- /** 小于 */
7108
- LessThan = "lessThan",
7109
- /** 小于等于 */
7110
- LessThanOrEqualTo = "lessThanOrEqualTo",
7111
- /** 大于 */
7112
- GreaterThan = "greaterThan",
7113
- /** 大于等于 */
7114
- GreaterThanOrEqualTo = "greaterThanOrEqualTo",
7115
- /** 为空 */
7116
- IsNull = "isNull"
7328
+ /** 合并字段来源表信息 */
7329
+ export interface UnionTableColumnModel {
7330
+ /** 来源表id */
7331
+ table: string;
7332
+ /** 来源字段物理字段名(表名称列不传) */
7333
+ column?: string;
7334
+ /** 来源表的名称(表名称列需要传) */
7335
+ value?: string;
7117
7336
  }
7118
- /** 数值-自定义分组类型 */
7119
- export type CustomizedGroup = {
7120
- /** 是否是默认分组字段 */
7121
- groupName: string;
7122
- defaultGroup: boolean;
7123
- lower: string;
7124
- upper: string;
7125
- lowerOperator: GroupOperator.IsNull | GroupOperator.GreaterThan | GroupOperator.GreaterThanOrEqualTo;
7126
- upperOperator: GroupOperator.LessThan | GroupOperator.LessThanOrEqualTo;
7127
- groupNameType: any;
7128
- };
7129
- /** 枚举-列表分组类型 */
7130
- export type ListGrouping = {
7131
- groupName: string;
7132
- groupElementList: string[];
7133
- defaultGroup: boolean;
7134
- };
7135
- /** 日期类型-自定义区间分组 */
7136
- export type NormalGroup = {
7137
- groupName: string;
7138
- defaultGroup: boolean;
7139
- lower: string;
7140
- upper: string;
7141
- lowerOperator: GroupOperator.GreaterThanOrEqualTo;
7142
- upperOperator: GroupOperator.LessThanOrEqualTo;
7143
- };
7144
- /** 分组字段 */
7145
- export type Groups = CustomizedGroup[] | ListGrouping[] | NormalGroup[];
7146
- export interface GroupFieldConfig {
7147
- /** 唯一标识 */
7148
- uniqueId: string;
7149
- /** 分组名称 */
7150
- caption: string;
7151
- /** 分组类型 */
7152
- groupType: GroupType;
7153
- refUniqueId: string;
7154
- /** qa中使用。qbi目前用不到 */
7155
- refSql?: string;
7156
- /** qa中使用。qbi目前用不到 */
7157
- refFunction?: string;
7158
- /** 数值类型分组字段 */
7159
- customizedGroups?: CustomizedGroup[];
7160
- /** 字符串类型分组字段 */
7161
- listGroupings?: ListGrouping[];
7162
- /** 日期类型分组字段 */
7163
- normalGroups?: NormalGroup[];
7337
+ /** 合并字段 */
7338
+ export interface UnionColumn {
7339
+ /** 合并后的字段名 */
7340
+ column: string;
7341
+ /** 备注 */
7342
+ caption: string;
7343
+ /** 合并字段的来源表字段信息 */
7344
+ tableColumns: UnionTableColumnModel[];
7345
+ /** 非源表字段,自动生成的表名称列 */
7346
+ isAuto?: boolean;
7164
7347
  }
7165
- /**
7166
- * 原先计算字段、分组字段存储配置的模型,v6.0.2新增:时间差字段、缺失值替换字段、新增别名字段、拆分列字段、合并字段
7167
- */
7168
- export interface FieldExpressionModel {
7169
- type: FieldExpressionType;
7170
- value?: string;
7171
- /** 分组字段配置 */
7172
- dataGroup: GroupFieldConfig;
7173
- /** 工具栏字段配置 */
7174
- tool?: ToolFieldConfig;
7348
+ /** 合并表模型 */
7349
+ export interface UnionTable extends PhysicalTable {
7350
+ /** 物理表 */
7351
+ tables: PhysicalTable[];
7352
+ /** 自定义sql、view */
7353
+ virtualTables: VirtualTable[];
7354
+ /** 合并字段信息 */
7355
+ unionColumns: UnionColumn[];
7175
7356
  }
7176
- }
7177
-
7178
- declare module '@quickbi/bi-types/cube/cube-blend' {
7179
- /**
7180
- * @author 雅影
7181
- * @description 数据混合类型定义
7182
- */
7183
- import type { Link, JoinKey } from '@quickbi/bi-types/cube/cube-model';
7184
- /** 数据集之间关联的模型定义 */
7185
- export interface CubeLink extends Omit<Link, 'joinKeys'> {
7186
- joinKeys: Omit<JoinKey, 'condition'>[];
7357
+ export class HintModal {
7358
+ dsType: DsType;
7359
+ head: `set`;
7360
+ key: string;
7361
+ connector: `=`;
7362
+ value: string;
7363
+ support: boolean;
7187
7364
  }
7188
- /** 数据集混合schema */
7189
- export interface BlendSchema {
7190
- /** 数据混合唯一id */
7191
- uniqueId: string;
7192
- /** 数据混合名称 */
7193
- caption: string;
7194
- /** 数据混合关联关系 */
7195
- cubeLinks: CubeLink[];
7196
- /** 标识是否存在字段id重复 */
7197
- hasRepeatFid?: boolean;
7365
+ export class PhysicalSchema {
7366
+ /** 物理表 */
7367
+ tables: PhysicalTable[];
7368
+ /** 自定义sql、view */
7369
+ virtualTables: VirtualTable[];
7370
+ /** union合并表 */
7371
+ unionTables: UnionTable[];
7372
+ /** 表关联关系 */
7373
+ links: CubeLinkModel[];
7374
+ /** odps表是否开启全表扫描 */
7375
+ sqlHintTypes?: string[];
7376
+ /** 主逻辑表下才有 */
7377
+ sqlHints?: HintModal[];
7198
7378
  }
7199
- /** 数据混合消费端模型定义 */
7200
- export type CubeBlend = BlendSchema;
7201
7379
  }
7202
7380