@gingkoo/pandora-metabase 1.0.0-alpha.17 → 1.0.0-alpha.2
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 +11 -20
- package/lib/es/components/dialog/select-filter/index.d.ts +0 -1
- package/lib/es/components/dialog/select-join-column/index.d.ts +0 -1
- package/lib/es/components/modules/{union.d.ts → group.d.ts} +1 -1
- package/lib/es/components/popup.d.ts +2 -8
- package/lib/es/index.js +210 -493
- package/lib/es/index.js.map +1 -1
- package/lib/es/store/enum.d.ts +1 -1
- package/lib/es/store/types.d.ts +16 -14
- package/lib/es/types.d.ts +2 -4
- package/lib/es/utils/helper-dom.d.ts +3 -4
- package/lib/es/utils.d.ts +0 -2
- package/package.json +1 -1
package/lib/es/store/enum.d.ts
CHANGED
package/lib/es/store/types.d.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import type { DatasourceType } from '../types';
|
|
2
2
|
import { TypeEnum, SpecialType, JoinEnum, SQL_COLUMN_TYPE, SortEnum } from './enum';
|
|
3
|
-
export type ToolbarType = TypeEnum | 'filter' | 'summarize' | 'joinData' | 'permissionTable' | 'customColumn' | 'sort' | 'rowLimit' | '
|
|
3
|
+
export type ToolbarType = TypeEnum | 'filter' | 'summarize' | 'joinData' | 'permissionTable' | 'customColumn' | 'sort' | 'rowLimit' | 'group';
|
|
4
4
|
export type MetaListType = MetaData | MetaJoin | MetaCustom | MetaFilter | MetaSummarize | MetaSort | MetaLimit | MetaPermissionTable;
|
|
5
5
|
export type initColumnsType = MetaData_ColumnsType;
|
|
6
6
|
interface ExpressionsType {
|
|
7
7
|
operator: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
left_quotes: string;
|
|
8
|
+
left_column: string;
|
|
9
|
+
left_column_id: string;
|
|
11
10
|
left_string: string;
|
|
11
|
+
left_isString: boolean;
|
|
12
12
|
left_type: 'string' | 'constant' | 'field' | '' | null;
|
|
13
13
|
left_constant: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
right_quotes: string;
|
|
14
|
+
right_column: string;
|
|
15
|
+
right_column_id: string;
|
|
17
16
|
right_string: string;
|
|
18
17
|
right_type: 'string' | 'constant' | 'field' | '' | null;
|
|
19
18
|
right_constant: string;
|
|
@@ -41,7 +40,6 @@ export interface MetaData_ColumnsType {
|
|
|
41
40
|
datasourceId: string;
|
|
42
41
|
datasourceName: string;
|
|
43
42
|
select: boolean;
|
|
44
|
-
summarizeType?: MetaSummarize_Enum;
|
|
45
43
|
}
|
|
46
44
|
export interface MetaData {
|
|
47
45
|
metaKey: number;
|
|
@@ -58,12 +56,10 @@ export interface MetaJoin_TalbeType {
|
|
|
58
56
|
alias: string;
|
|
59
57
|
datasourceName: string;
|
|
60
58
|
datasourceId: string;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
fieldAlias: string;
|
|
64
|
-
fieldUuid: string;
|
|
59
|
+
column: string;
|
|
60
|
+
column_id: string;
|
|
65
61
|
groupSql?: string;
|
|
66
|
-
|
|
62
|
+
[name: string]: any;
|
|
67
63
|
}
|
|
68
64
|
export interface MetaJoin {
|
|
69
65
|
metaKey: number;
|
|
@@ -80,6 +76,7 @@ export interface MetaJoin {
|
|
|
80
76
|
}
|
|
81
77
|
export interface MetaCustom_Item {
|
|
82
78
|
name: string;
|
|
79
|
+
formula: string;
|
|
83
80
|
type?: string;
|
|
84
81
|
formulaList?: any[];
|
|
85
82
|
}
|
|
@@ -115,7 +112,7 @@ export interface MetaFilter_Item {
|
|
|
115
112
|
isField?: boolean;
|
|
116
113
|
valType?: 'field' | 'string' | 'constant' | '';
|
|
117
114
|
constantName?: string;
|
|
118
|
-
table2?: MetaJoin_TalbeType | null;
|
|
115
|
+
table2?: Omit<MetaJoin_TalbeType, 'column' | 'column_id'> | null;
|
|
119
116
|
formula?: Filter_Formula;
|
|
120
117
|
subquery?: any[];
|
|
121
118
|
type?: Filter_TypeEnum;
|
|
@@ -149,6 +146,8 @@ export interface MetaSummarize_Group {
|
|
|
149
146
|
quotes: string;
|
|
150
147
|
datasourceId: string;
|
|
151
148
|
datasourceName: string;
|
|
149
|
+
column: string;
|
|
150
|
+
column_id: string;
|
|
152
151
|
summarizeType: MetaSummarize_Enum;
|
|
153
152
|
[params: string]: any;
|
|
154
153
|
}
|
|
@@ -163,6 +162,8 @@ export interface MetaSummarize_By {
|
|
|
163
162
|
id: string;
|
|
164
163
|
datasourceId: string;
|
|
165
164
|
datasourceName: string;
|
|
165
|
+
column: string;
|
|
166
|
+
column_id: string;
|
|
166
167
|
realName?: string;
|
|
167
168
|
sql: string;
|
|
168
169
|
database_type: SQL_COLUMN_TYPE | '';
|
|
@@ -215,6 +216,7 @@ export interface LooseObject {
|
|
|
215
216
|
}
|
|
216
217
|
interface ParamsCustomColumns {
|
|
217
218
|
alias: string;
|
|
219
|
+
formula: string;
|
|
218
220
|
}
|
|
219
221
|
interface ParamsJoinTables {
|
|
220
222
|
alias: string;
|
package/lib/es/types.d.ts
CHANGED
|
@@ -2,9 +2,8 @@ import type { MetaListType, ToolbarType } from './store/types';
|
|
|
2
2
|
import { UnionEnum } from './store/enum';
|
|
3
3
|
export interface MetaListProps {
|
|
4
4
|
name: string;
|
|
5
|
-
type: 'group' | '
|
|
6
|
-
|
|
7
|
-
subquery?: MetaListType[];
|
|
5
|
+
type: 'group' | 'operator';
|
|
6
|
+
operator?: UnionEnum;
|
|
8
7
|
list: MetaListType[];
|
|
9
8
|
}
|
|
10
9
|
export interface MetabaseProps {
|
|
@@ -27,7 +26,6 @@ export interface MetabaseProps {
|
|
|
27
26
|
showSubquery?: boolean;
|
|
28
27
|
subShowSubquery?: boolean;
|
|
29
28
|
constantList?: OptionItem[];
|
|
30
|
-
notExistsToolbar?: ToolbarType[];
|
|
31
29
|
}
|
|
32
30
|
export interface OptionItem {
|
|
33
31
|
value?: string;
|
|
@@ -2,10 +2,9 @@ export declare const getComputedTranslate: (obj: any) => {
|
|
|
2
2
|
x: number;
|
|
3
3
|
y: number;
|
|
4
4
|
};
|
|
5
|
-
export declare const getElementTop: (elem
|
|
6
|
-
export declare const getElementLeft: (elem
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const getScrollTop: (elem?: HTMLElement) => number;
|
|
5
|
+
export declare const getElementTop: (elem: HTMLElement) => number;
|
|
6
|
+
export declare const getElementLeft: (elem: HTMLElement) => number;
|
|
7
|
+
export declare const getScrollTop: () => number;
|
|
9
8
|
export declare const getWindowSize: () => {
|
|
10
9
|
width: number;
|
|
11
10
|
height: number;
|
package/lib/es/utils.d.ts
CHANGED
|
@@ -16,6 +16,4 @@ export declare const getHelper: (list: MetaListType[], item: MetaListType) => He
|
|
|
16
16
|
export declare const getSubColumns: (metaList: any) => DataType[];
|
|
17
17
|
export declare const changeTableAlias: (list: MetaListType[], curObj: MetaData_TableType) => MetaListType[];
|
|
18
18
|
export declare const changeFieldAlias: (list: MetaListType[], curObj: MetaData_ColumnsType) => MetaListType[];
|
|
19
|
-
export declare function splitByUnion(data: any): any[];
|
|
20
|
-
export declare function reassembleByUnion(target?: any[]): any[];
|
|
21
19
|
export {};
|