@gingkoo/pandora-metabase 1.0.0-alpha.1 → 1.0.0-alpha.11

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