@gingkoo/pandora-metabase 1.0.0-alpha.1 → 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.
@@ -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,10 @@ export interface MetaJoin_TalbeType {
56
58
  alias: string;
57
59
  datasourceName: string;
58
60
  datasourceId: string;
59
- column: string;
60
- column_id: string;
61
+ fieldAlias: string;
62
+ fieldUuid: string;
61
63
  groupSql?: string;
62
- [name: string]: any;
64
+ quotes?: string;
63
65
  }
64
66
  export interface MetaJoin {
65
67
  metaKey: number;
@@ -76,7 +78,6 @@ export interface MetaJoin {
76
78
  }
77
79
  export interface MetaCustom_Item {
78
80
  name: string;
79
- formula: string;
80
81
  type?: string;
81
82
  formulaList?: any[];
82
83
  }
@@ -112,7 +113,7 @@ export interface MetaFilter_Item {
112
113
  isField?: boolean;
113
114
  valType?: 'field' | 'string' | 'constant' | '';
114
115
  constantName?: string;
115
- table2?: Omit<MetaJoin_TalbeType, 'column' | 'column_id'> | null;
116
+ table2?: MetaJoin_TalbeType | null;
116
117
  formula?: Filter_Formula;
117
118
  subquery?: any[];
118
119
  type?: Filter_TypeEnum;
@@ -146,8 +147,6 @@ export interface MetaSummarize_Group {
146
147
  quotes: string;
147
148
  datasourceId: string;
148
149
  datasourceName: string;
149
- column: string;
150
- column_id: string;
151
150
  summarizeType: MetaSummarize_Enum;
152
151
  [params: string]: any;
153
152
  }
@@ -162,8 +161,6 @@ export interface MetaSummarize_By {
162
161
  id: string;
163
162
  datasourceId: string;
164
163
  datasourceName: string;
165
- column: string;
166
- column_id: string;
167
164
  realName?: string;
168
165
  sql: string;
169
166
  database_type: SQL_COLUMN_TYPE | '';
@@ -216,7 +213,6 @@ export interface LooseObject {
216
213
  }
217
214
  interface ParamsCustomColumns {
218
215
  alias: string;
219
- formula: string;
220
216
  }
221
217
  interface ParamsJoinTables {
222
218
  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.10",
4
4
  "description": "",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",