@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.
@@ -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: (tableName: string, id: string) => Promise<any>;
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: (tableName: string, id: string) => Promise<any>): void;
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(tableName: string, datasourceId: string, callback: (record: MetaData_ColumnsType[]) => void): Promise<any>;
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>;
@@ -32,6 +32,7 @@ export interface MetaJoin_TalbeType {
32
32
  datasourceId: string;
33
33
  column: string;
34
34
  groupSql?: string;
35
+ [name: string]: any;
35
36
  }
36
37
  export interface MetaJoin {
37
38
  metaKey: number;
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: string, datasourceId: string) => Promise<any>;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/pandora-metabase",
3
- "version": "0.0.1-alpha.7",
3
+ "version": "0.0.1-alpha.8",
4
4
  "description": "",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",