@gingkoo/pandora-metabase 1.0.0-alpha.9 → 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 +565 -318
- package/lib/es/index.js.map +1 -1
- package/lib/es/store/types.d.ts +6 -3
- 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
|
@@ -17,7 +17,6 @@ interface ExpressionsType {
|
|
|
17
17
|
right_string: string;
|
|
18
18
|
right_type: 'string' | 'constant' | 'field' | '' | null;
|
|
19
19
|
right_constant: string;
|
|
20
|
-
right_isString: boolean;
|
|
21
20
|
}
|
|
22
21
|
export interface TableColumnsMapType {
|
|
23
22
|
[tableName: string]: initColumnsType[];
|
|
@@ -50,6 +49,8 @@ export interface MetaData {
|
|
|
50
49
|
type: TypeEnum.data;
|
|
51
50
|
table: MetaData_TableType;
|
|
52
51
|
columns: MetaData_ColumnsType[];
|
|
52
|
+
isSubquery?: boolean;
|
|
53
|
+
subquery?: MetaListType[];
|
|
53
54
|
}
|
|
54
55
|
export interface MetaJoin_TalbeType {
|
|
55
56
|
name: string;
|
|
@@ -58,6 +59,8 @@ export interface MetaJoin_TalbeType {
|
|
|
58
59
|
alias: string;
|
|
59
60
|
datasourceName: string;
|
|
60
61
|
datasourceId: string;
|
|
62
|
+
column_id?: string;
|
|
63
|
+
column?: string;
|
|
61
64
|
fieldAlias: string;
|
|
62
65
|
fieldUuid: string;
|
|
63
66
|
groupSql?: string;
|
|
@@ -74,7 +77,7 @@ export interface MetaJoin {
|
|
|
74
77
|
columns: MetaData_ColumnsType[];
|
|
75
78
|
expressions: ExpressionsType[];
|
|
76
79
|
isSubquery?: boolean;
|
|
77
|
-
subquery?:
|
|
80
|
+
subquery?: MetaListType[];
|
|
78
81
|
}
|
|
79
82
|
export interface MetaCustom_Item {
|
|
80
83
|
name: string;
|
|
@@ -115,7 +118,7 @@ export interface MetaFilter_Item {
|
|
|
115
118
|
constantName?: string;
|
|
116
119
|
table2?: MetaJoin_TalbeType | null;
|
|
117
120
|
formula?: Filter_Formula;
|
|
118
|
-
|
|
121
|
+
notExists?: MetaListType[];
|
|
119
122
|
type?: Filter_TypeEnum;
|
|
120
123
|
summarizeType?: MetaSummarize_Enum;
|
|
121
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",
|