@gingkoo/pandora-metabase 1.0.0-alpha.8 → 1.0.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/lib/es/index.js +566 -321
- package/lib/es/index.js.map +1 -1
- package/lib/es/store/types.d.ts +6 -4
- package/lib/es/types.d.ts +2 -0
- package/lib/es/utils/helper-dom.d.ts +0 -1
- package/lib/es/utils.d.ts +3 -2
- package/package.json +4 -4
package/lib/es/store/types.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ interface ExpressionsType {
|
|
|
9
9
|
left_fieldUuid: string;
|
|
10
10
|
left_quotes: string;
|
|
11
11
|
left_string: string;
|
|
12
|
-
left_isString: boolean;
|
|
13
12
|
left_type: 'string' | 'constant' | 'field' | '' | null;
|
|
14
13
|
left_constant: string;
|
|
15
14
|
right_fieldAlias: string;
|
|
@@ -18,7 +17,6 @@ interface ExpressionsType {
|
|
|
18
17
|
right_string: string;
|
|
19
18
|
right_type: 'string' | 'constant' | 'field' | '' | null;
|
|
20
19
|
right_constant: string;
|
|
21
|
-
right_isString: boolean;
|
|
22
20
|
}
|
|
23
21
|
export interface TableColumnsMapType {
|
|
24
22
|
[tableName: string]: initColumnsType[];
|
|
@@ -51,6 +49,8 @@ export interface MetaData {
|
|
|
51
49
|
type: TypeEnum.data;
|
|
52
50
|
table: MetaData_TableType;
|
|
53
51
|
columns: MetaData_ColumnsType[];
|
|
52
|
+
isSubquery?: boolean;
|
|
53
|
+
subquery?: MetaListType[];
|
|
54
54
|
}
|
|
55
55
|
export interface MetaJoin_TalbeType {
|
|
56
56
|
name: string;
|
|
@@ -59,6 +59,8 @@ export interface MetaJoin_TalbeType {
|
|
|
59
59
|
alias: string;
|
|
60
60
|
datasourceName: string;
|
|
61
61
|
datasourceId: string;
|
|
62
|
+
column_id?: string;
|
|
63
|
+
column?: string;
|
|
62
64
|
fieldAlias: string;
|
|
63
65
|
fieldUuid: string;
|
|
64
66
|
groupSql?: string;
|
|
@@ -75,7 +77,7 @@ export interface MetaJoin {
|
|
|
75
77
|
columns: MetaData_ColumnsType[];
|
|
76
78
|
expressions: ExpressionsType[];
|
|
77
79
|
isSubquery?: boolean;
|
|
78
|
-
subquery?:
|
|
80
|
+
subquery?: MetaListType[];
|
|
79
81
|
}
|
|
80
82
|
export interface MetaCustom_Item {
|
|
81
83
|
name: string;
|
|
@@ -116,7 +118,7 @@ export interface MetaFilter_Item {
|
|
|
116
118
|
constantName?: string;
|
|
117
119
|
table2?: MetaJoin_TalbeType | null;
|
|
118
120
|
formula?: Filter_Formula;
|
|
119
|
-
|
|
121
|
+
notExists?: MetaListType[];
|
|
120
122
|
type?: Filter_TypeEnum;
|
|
121
123
|
summarizeType?: MetaSummarize_Enum;
|
|
122
124
|
sql?: string;
|
package/lib/es/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MetaListType, ToolbarType } from './store/types';
|
|
2
2
|
import { UnionEnum } from './store/enum';
|
|
3
|
+
import { DataType } from './components/dialog/select-join-column';
|
|
3
4
|
export interface MetaListProps {
|
|
4
5
|
name: string;
|
|
5
6
|
type: 'group' | 'union';
|
|
@@ -28,6 +29,7 @@ export interface MetabaseProps {
|
|
|
28
29
|
subShowSubquery?: boolean;
|
|
29
30
|
constantList?: OptionItem[];
|
|
30
31
|
notExistsToolbar?: ToolbarType[];
|
|
32
|
+
notExistsColumns?: DataType[];
|
|
31
33
|
}
|
|
32
34
|
export interface OptionItem {
|
|
33
35
|
value?: string;
|
package/lib/es/utils.d.ts
CHANGED
|
@@ -14,8 +14,9 @@ interface HelperResultType {
|
|
|
14
14
|
}
|
|
15
15
|
export declare const getHelper: (list: MetaListType[], item: MetaListType) => HelperResultType;
|
|
16
16
|
export declare const getSubColumns: (metaList: any) => DataType[];
|
|
17
|
-
export declare const changeTableAlias: (list: MetaListType[], curObj: MetaData_TableType) => MetaListType[];
|
|
17
|
+
export declare const changeTableAlias: (list: MetaListType[] | [], curObj: MetaData_TableType) => MetaListType[];
|
|
18
18
|
export declare const changeFieldAlias: (list: MetaListType[], curObj: MetaData_ColumnsType) => MetaListType[];
|
|
19
19
|
export declare function splitByUnion(data: any): any[];
|
|
20
|
-
export declare function reassembleByUnion(target
|
|
20
|
+
export declare function reassembleByUnion(target?: any[]): any[];
|
|
21
|
+
export declare const buildSqlQuery: (data?: MetaListType[]) => string;
|
|
21
22
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gingkoo/pandora-metabase",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/es/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@gingkoo/pandora": "
|
|
29
|
-
"@gingkoo/pandora-hooks": "
|
|
30
|
-
"@gingkoo/pandora-icons": "
|
|
28
|
+
"@gingkoo/pandora": "1.1.7",
|
|
29
|
+
"@gingkoo/pandora-hooks": "1.0.5",
|
|
30
|
+
"@gingkoo/pandora-icons": "0.0.1-alpha.28",
|
|
31
31
|
"dayjs": "^1.11.11",
|
|
32
32
|
"lodash": "^4.17.21",
|
|
33
33
|
"mobx": "^6.7.0",
|