@gingkoo/pandora-metabase 1.0.0-alpha.3 → 1.0.0-alpha.30

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/README.md CHANGED
@@ -38,27 +38,36 @@ export type ToolbarType =
38
38
  | 'customColumn'
39
39
  | 'sort'
40
40
  | 'rowLimit'
41
- | 'group'; //展示合并结果集,会变为多个数组
41
+ | 'union'; //展示合并结果集,会变为多个数组
42
42
 
43
43
  export interface MetaBaseProps {
44
- loading?: boolean; // 加载状态
45
- btnText?: string; //按钮文字
46
- showFields?:boolean ; //是否显示字段
47
- tableNameTpl?: string; //表名
48
- fieldNameTpl?: string; //字段名
49
44
  /**
50
45
  * 工具栏列表
51
46
  * 默认 ['filter','summarize','joinData','permissionTable','customColumn','sort','rowLimit']
52
47
  */
53
- toolbar?:ToolbarType[]|false;
54
- readonly?: boolean; //是否只读
55
- getTables: (datasourceId: string) => Promise<any>; //获取表
56
- getColumns: (table: string, datasourceId: string) => Promise<any>;//获取数据源
57
- onOk: (params: any) => Promise<void>;
48
+ loading?: boolean;
49
+ btnText?: string;
50
+ showFields?: boolean; // 显示字段
51
+ readonly?: boolean;
52
+ getTables: (datasourceId: string) => Promise<any>;
53
+ getColumns: (table: { name: string; [key: string]: any }, datasourceId: string) => Promise<any>;
54
+ toolbar?: ToolbarType[];
55
+ subToolbar?: ToolbarType[]; //子查询功能菜单 默认取toolbar
56
+ tableNameTpl?: string; //表名
57
+ fieldNameTpl?: string; //字段名
58
+ onOk?: (params: any) => void;
58
59
  value?: MetaListType[]; //默认值
59
60
  sourceList?: DatasourceType[];
60
61
  showSubquery?: boolean; //是否展示子查询
61
62
  subShowSubquery?: boolean; //子查询是否展示子查询
63
+ constantList?: OptionItem[]; //常量下拉框
64
+ notExistsToolbar?: ToolbarType[]; // notExists的功能菜单 默认取toolbar
65
+ }
66
+
67
+ export interface OptionItem {
68
+ value?: string;
69
+ label: string;
70
+ icon?: React.ReactNode;
62
71
  }
63
72
 
64
73
  export interface SqlVisionBuilderRef {
@@ -10,6 +10,7 @@ interface PropsType {
10
10
  onChange: (reocrd: MetaFilter_Item) => void;
11
11
  didUpdate?: Function;
12
12
  isCustom?: boolean;
13
+ container?: any;
13
14
  }
14
15
  declare const _default: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
15
16
  export default _default;
@@ -25,6 +25,7 @@ export interface ColumnType {
25
25
  id: string;
26
26
  datasourceId: string;
27
27
  datasourceName: string;
28
+ quotes?: string;
28
29
  table2?: Omit<MetaJoin_TalbeType, 'column' | 'column_id'> | null;
29
30
  }
30
31
  export interface ColumnGroupType {
@@ -1,16 +1,20 @@
1
1
  import * as React from 'react';
2
2
  export declare function generateTrigger(PortalComponent: any): {
3
3
  new (props: PropsType): {
4
+ resizeObserver: ResizeObserver | null;
4
5
  resetId: number;
5
6
  ref: any;
6
7
  componentDidMount(): void;
8
+ componentDidUpdate(prevProps: PropsType): void;
7
9
  componentWillUnmount(): void;
10
+ initResizeObserver: () => void;
8
11
  bindEvent: () => void;
9
12
  closePopup: () => void;
10
13
  attachParent: (popupContainer: HTMLSpanElement) => void;
11
14
  getCurrentNodePos: () => {
12
15
  x: number;
13
16
  y: number;
17
+ t: number;
14
18
  h: any;
15
19
  };
16
20
  getContainer: () => HTMLSpanElement;
@@ -28,7 +32,6 @@ export declare function generateTrigger(PortalComponent: any): {
28
32
  shouldComponentUpdate?(nextProps: Readonly<PropsType>, nextState: Readonly<{}>, nextContext: any): boolean;
29
33
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
30
34
  getSnapshotBeforeUpdate?(prevProps: Readonly<PropsType>, prevState: Readonly<{}>): any;
31
- componentDidUpdate?(prevProps: Readonly<PropsType>, prevState: Readonly<{}>, snapshot?: any): void;
32
35
  componentWillMount?(): void;
33
36
  UNSAFE_componentWillMount?(): void;
34
37
  componentWillReceiveProps?(nextProps: Readonly<PropsType>, nextContext: any): void;
@@ -44,16 +47,20 @@ export declare function generateTrigger(PortalComponent: any): {
44
47
  };
45
48
  declare const _default: {
46
49
  new (props: PropsType): {
50
+ resizeObserver: ResizeObserver | null;
47
51
  resetId: number;
48
52
  ref: any;
49
53
  componentDidMount(): void;
54
+ componentDidUpdate(prevProps: PropsType): void;
50
55
  componentWillUnmount(): void;
56
+ initResizeObserver: () => void;
51
57
  bindEvent: () => void;
52
58
  closePopup: () => void;
53
59
  attachParent: (popupContainer: HTMLSpanElement) => void;
54
60
  getCurrentNodePos: () => {
55
61
  x: number;
56
62
  y: number;
63
+ t: number;
57
64
  h: any;
58
65
  };
59
66
  getContainer: () => HTMLSpanElement;
@@ -71,7 +78,6 @@ declare const _default: {
71
78
  shouldComponentUpdate?(nextProps: Readonly<PropsType>, nextState: Readonly<{}>, nextContext: any): boolean;
72
79
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
73
80
  getSnapshotBeforeUpdate?(prevProps: Readonly<PropsType>, prevState: Readonly<{}>): any;
74
- componentDidUpdate?(prevProps: Readonly<PropsType>, prevState: Readonly<{}>, snapshot?: any): void;
75
81
  componentWillMount?(): void;
76
82
  UNSAFE_componentWillMount?(): void;
77
83
  componentWillReceiveProps?(nextProps: Readonly<PropsType>, nextContext: any): void;