@gingkoo/pandora-metabase 0.0.1-alpha.7 → 0.0.1-alpha.8
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 +45 -41
- package/lib/es/index.js.map +1 -1
- package/lib/es/store/index.d.ts +12 -5
- package/lib/es/store/types.d.ts +1 -0
- package/lib/es/types.d.ts +4 -1
- package/package.json +1 -1
package/lib/es/store/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ToolbarType } from './types';
|
|
3
|
-
import type { MetaListType, TableColumnsMapType, initColumnsType, TableType, MetaData_ColumnsType, PopupData } from './types';
|
|
2
|
+
import { ToolbarType, MetaJoin_TalbeType } from './types';
|
|
3
|
+
import type { MetaListType, TableColumnsMapType, initColumnsType, TableType, MetaData_TableType, MetaData_ColumnsType, PopupData } from './types';
|
|
4
4
|
import type { DatasourceType } from '../types';
|
|
5
5
|
export { observer } from 'mobx-react';
|
|
6
6
|
export declare const SummarizeAlias = "source";
|
|
@@ -25,11 +25,17 @@ declare class SqlVisionStore {
|
|
|
25
25
|
get showMainColumn(): boolean;
|
|
26
26
|
showToolbar(name: ToolbarType): boolean;
|
|
27
27
|
fetchDatasetFn: (id: string) => Promise<any>;
|
|
28
|
-
fetchColumnsFn: (
|
|
28
|
+
fetchColumnsFn: (table: {
|
|
29
|
+
name: string;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}, id: string) => Promise<any>;
|
|
29
32
|
setFetchDatasetFn(fn: (id: string) => Promise<any>): void;
|
|
30
|
-
setFetchColumnsFn(fn: (
|
|
33
|
+
setFetchColumnsFn(fn: (table: {
|
|
34
|
+
name: string;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}, id: string) => Promise<any>): void;
|
|
31
37
|
fetchDataset(datasourceId: string): Promise<any>;
|
|
32
|
-
fetchColumns(
|
|
38
|
+
fetchColumns(table: MetaJoin_TalbeType | MetaData_TableType, datasourceId: string, callback: (record: MetaData_ColumnsType[]) => void): Promise<any>;
|
|
33
39
|
setPreData(data: MetaListType[]): Promise<void>;
|
|
34
40
|
setSourceList(list: DatasourceType[]): void;
|
|
35
41
|
addMeta(type: string, index: number): void;
|
|
@@ -45,6 +51,7 @@ declare class SqlVisionStore {
|
|
|
45
51
|
setToolbar(toolbar: ToolbarType[]): void;
|
|
46
52
|
setFieldNameTpl(tpl: string): void;
|
|
47
53
|
setTableNameTpl(tpl: string): void;
|
|
54
|
+
reset(): void;
|
|
48
55
|
}
|
|
49
56
|
export declare const sqlVisionStore: SqlVisionStore;
|
|
50
57
|
export declare const Store: React.Context<SqlVisionStore>;
|
package/lib/es/store/types.d.ts
CHANGED
package/lib/es/types.d.ts
CHANGED
|
@@ -5,7 +5,10 @@ export interface MetabaseProps {
|
|
|
5
5
|
showFields?: boolean;
|
|
6
6
|
readonly?: boolean;
|
|
7
7
|
getTables: (datasourceId: string) => Promise<any>;
|
|
8
|
-
getColumns: (table:
|
|
8
|
+
getColumns: (table: {
|
|
9
|
+
name: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}, datasourceId: string) => Promise<any>;
|
|
9
12
|
toolbar?: ToolbarType[] | false;
|
|
10
13
|
tableNameTpl?: string;
|
|
11
14
|
fieldNameTpl?: string;
|