@gingkoo/pandora-metabase 0.0.30 → 1.0.0-alpha.10
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 +25 -11
- package/lib/es/components/dialog/custom-editor/enum.d.ts +43 -0
- package/lib/es/components/dialog/custom-editor/index.d.ts +10 -0
- package/lib/es/components/dialog/custom-editor/utils.d.ts +8 -0
- package/lib/es/components/dialog/select-column/index.d.ts +2 -1
- package/lib/es/components/dialog/select-filter/index.d.ts +11 -1
- package/lib/es/components/dialog/select-join-column/index.d.ts +5 -0
- package/lib/es/components/dialog/select-list/index.d.ts +10 -0
- package/lib/es/components/icons.d.ts +1 -0
- package/lib/es/components/modules/components/meta-icon.d.ts +1 -0
- package/lib/es/components/modules/custom-column.d.ts +1 -0
- package/lib/es/components/modules/filter.d.ts +1 -0
- package/lib/es/components/modules/join-data.d.ts +1 -0
- package/lib/es/components/modules/permission-table.d.ts +1 -0
- package/lib/es/components/modules/row-limit.d.ts +1 -0
- package/lib/es/components/modules/sort.d.ts +1 -0
- package/lib/es/components/modules/summarize/group-by.d.ts +1 -0
- package/lib/es/components/modules/summarize/index.d.ts +1 -0
- package/lib/es/components/modules/summarize/select-index.d.ts +1 -0
- package/lib/es/components/modules/table-data.d.ts +1 -0
- package/lib/es/components/modules/union.d.ts +9 -0
- package/lib/es/components/popup.d.ts +8 -2
- package/lib/es/index.js +4988 -3789
- package/lib/es/index.js.map +1 -1
- package/lib/es/store/enum.d.ts +6 -1
- package/lib/es/store/helper.d.ts +4 -1
- package/lib/es/store/types.d.ts +51 -16
- package/lib/es/types.d.ts +16 -1
- package/lib/es/utils/helper-dom.d.ts +4 -3
- package/lib/es/utils/helper.d.ts +1 -0
- package/lib/es/utils.d.ts +5 -1
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -37,23 +37,37 @@ export type ToolbarType =
|
|
|
37
37
|
| 'permissionTable'
|
|
38
38
|
| 'customColumn'
|
|
39
39
|
| 'sort'
|
|
40
|
-
| 'rowLimit'
|
|
40
|
+
| 'rowLimit'
|
|
41
|
+
| 'union'; //展示合并结果集,会变为多个数组
|
|
41
42
|
|
|
42
43
|
export interface MetaBaseProps {
|
|
43
|
-
loading?: boolean; // 加载状态
|
|
44
|
-
btnText?: string; //按钮文字
|
|
45
|
-
showFields?:boolean ; //是否显示字段
|
|
46
|
-
tableNameTpl?: string; //表名
|
|
47
|
-
fieldNameTpl?: string; //字段名
|
|
48
44
|
/**
|
|
49
45
|
* 工具栏列表
|
|
50
46
|
* 默认 ['filter','summarize','joinData','permissionTable','customColumn','sort','rowLimit']
|
|
51
47
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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;
|
|
59
|
+
value?: MetaListType[]; //默认值
|
|
60
|
+
sourceList?: DatasourceType[];
|
|
61
|
+
showSubquery?: boolean; //是否展示子查询
|
|
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;
|
|
57
71
|
}
|
|
58
72
|
|
|
59
73
|
export interface SqlVisionBuilderRef {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare enum OptionsTypeEnum {
|
|
2
|
+
CONSTANT = "constant",// 常量
|
|
3
|
+
INPUT = "input",// 输入框
|
|
4
|
+
FIELD = "field",// 字段
|
|
5
|
+
OPERATOR = "operator",// 运算符
|
|
6
|
+
EXPRESSION = "expression",// 公式
|
|
7
|
+
OTHER = "other"
|
|
8
|
+
}
|
|
9
|
+
export declare enum FunctionEnum {
|
|
10
|
+
LOWER = "lower",
|
|
11
|
+
UPPER = "upper",
|
|
12
|
+
SUBSTRING = "substring",
|
|
13
|
+
REGEX_MATCH_FIRST = "regex-match-first",
|
|
14
|
+
'CONCAT' = "concat",
|
|
15
|
+
'REPLACE' = "replace",
|
|
16
|
+
'TRIM' = "trim",
|
|
17
|
+
'RTRIM' = "RTRIM",
|
|
18
|
+
'LTRIM' = "rtrim",
|
|
19
|
+
'LENGTH' = "length",
|
|
20
|
+
'ABS' = "abs",
|
|
21
|
+
'FLOOR' = "floor",
|
|
22
|
+
'CEIL' = "ceil",
|
|
23
|
+
'ROUND' = "round",
|
|
24
|
+
'SQRT' = "sqrt",
|
|
25
|
+
'POWER' = "power",
|
|
26
|
+
'LOG' = "log",
|
|
27
|
+
'EXP' = "exp",
|
|
28
|
+
'CONTAINS' = "contains",
|
|
29
|
+
'ENDS_WITH' = "ends-with",
|
|
30
|
+
'STARTS_WITH' = "starts-with",
|
|
31
|
+
'BETWEEN' = "between",
|
|
32
|
+
'TIME_INTERVAL' = "time-interval",
|
|
33
|
+
'IS_NULL' = "is-null",
|
|
34
|
+
'IS_EMPTY' = "is-empty",
|
|
35
|
+
'COALESCE' = "coalesce"
|
|
36
|
+
}
|
|
37
|
+
export declare const operatorList: string[];
|
|
38
|
+
export declare const otherList: string[];
|
|
39
|
+
export declare const functionList: string[];
|
|
40
|
+
export declare const customTypes: {
|
|
41
|
+
value: OptionsTypeEnum;
|
|
42
|
+
label: any;
|
|
43
|
+
}[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { MetaCustom_Item } from '../../../store/types';
|
|
3
|
+
interface PropsType {
|
|
4
|
+
value: MetaCustom_Item;
|
|
5
|
+
data: any;
|
|
6
|
+
onOk: Function;
|
|
7
|
+
onCancel: Function;
|
|
8
|
+
}
|
|
9
|
+
declare const CaseEditor: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default CaseEditor;
|
|
@@ -8,7 +8,8 @@ import './index.less';
|
|
|
8
8
|
import { MetaData_ColumnsType } from '../../../store/types';
|
|
9
9
|
interface PropsType {
|
|
10
10
|
data: MetaData_ColumnsType[];
|
|
11
|
+
groupIndex: number;
|
|
11
12
|
onChange: (record: MetaData_ColumnsType[]) => void;
|
|
12
13
|
}
|
|
13
|
-
declare const SelectColumn: ({ data, onChange }: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare const SelectColumn: ({ data, groupIndex, onChange }: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export default SelectColumn;
|
|
@@ -2,5 +2,15 @@
|
|
|
2
2
|
* 关联模块 选择表字段
|
|
3
3
|
*/
|
|
4
4
|
import './index.less';
|
|
5
|
-
|
|
5
|
+
import { MetaFilter_Item } from '../../../store/types';
|
|
6
|
+
import { DataType } from '../select-join-column';
|
|
7
|
+
interface PropsType {
|
|
8
|
+
data: DataType[];
|
|
9
|
+
value: MetaFilter_Item;
|
|
10
|
+
onChange: (reocrd: MetaFilter_Item) => void;
|
|
11
|
+
didUpdate?: Function;
|
|
12
|
+
isCustom?: boolean;
|
|
13
|
+
container?: any;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
6
16
|
export default _default;
|
|
@@ -15,6 +15,9 @@ export declare const NUMBER_GROUP_MAP: Map<string, string>;
|
|
|
15
15
|
export interface ColumnType {
|
|
16
16
|
table: string;
|
|
17
17
|
tableId: string;
|
|
18
|
+
tableUuid: string;
|
|
19
|
+
fieldUuid: string;
|
|
20
|
+
fieldAlias: string;
|
|
18
21
|
alias: string;
|
|
19
22
|
name: string;
|
|
20
23
|
database_type: SQL_COLUMN_TYPE | '';
|
|
@@ -22,6 +25,7 @@ export interface ColumnType {
|
|
|
22
25
|
id: string;
|
|
23
26
|
datasourceId: string;
|
|
24
27
|
datasourceName: string;
|
|
28
|
+
quotes?: string;
|
|
25
29
|
table2?: Omit<MetaJoin_TalbeType, 'column' | 'column_id'> | null;
|
|
26
30
|
}
|
|
27
31
|
export interface ColumnGroupType {
|
|
@@ -31,6 +35,7 @@ export interface ColumnGroupType {
|
|
|
31
35
|
export type DataType = Partial<DatasourceType> & {
|
|
32
36
|
table: string;
|
|
33
37
|
tableId: string;
|
|
38
|
+
tableUuid: string;
|
|
34
39
|
alias: string;
|
|
35
40
|
columns: MetaData_ColumnsType[];
|
|
36
41
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { OptionItem } from '../../../types';
|
|
3
|
+
interface PropsType {
|
|
4
|
+
className?: string;
|
|
5
|
+
value?: any;
|
|
6
|
+
list: OptionItem[];
|
|
7
|
+
onChange: (type: any) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const SelectList: ({ value, onChange, list, className }: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default SelectList;
|
|
@@ -7,6 +7,7 @@ export declare const CloseIcon2: (reset: any) => import("react/jsx-runtime").JSX
|
|
|
7
7
|
export declare const FilterIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export declare const SummarizeIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export declare const JoinDataIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const GroupIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export declare const PermissionTableIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export declare const CustomColumnIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export declare const SortIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;
|