@gingkoo/pandora-metabase 0.0.1-alpha.2 → 0.0.1-alpha.3
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 +2 -2
- package/lib/es/common/Loading/index.d.ts +6 -0
- package/lib/es/common/SplitView/index.d.ts +17 -0
- package/lib/es/{metaBase/components → components}/dialog/const.d.ts +1 -1
- package/lib/es/{metaBase/components → components}/dialog/custom-column/dialog/select-list.d.ts +0 -1
- package/lib/es/components/dialog/custom-column/expression-editor.d.ts +9 -0
- package/lib/es/{metaBase/components → components}/dialog/custom-column/expressions/suggest.d.ts +1 -1
- package/lib/es/{metaBase/components → components}/dialog/custom-column/index.d.ts +2 -4
- package/lib/es/components/dialog/custom-column/tokenizedI-input.d.ts +16 -0
- package/lib/es/components/dialog/index.d.ts +8 -0
- package/lib/es/{metaBase/components → components}/dialog/select-column/index.d.ts +1 -2
- package/lib/es/{metaBase/components → components}/dialog/select-join/index.d.ts +1 -1
- package/lib/es/{metaBase/components → components}/dialog/select-join-column/index.d.ts +14 -10
- package/lib/es/components/dialog/select-permission-table/index.d.ts +15 -0
- package/lib/es/{metaBase/components → components}/dialog/select-summarize/index.d.ts +2 -3
- package/lib/es/components/dialog/select-table/index.d.ts +17 -0
- package/lib/es/{metaBase/components → components}/icons.d.ts +2 -0
- package/lib/es/components/metabase/index.d.ts +4 -0
- package/lib/es/components/modules/components/meta-icon.d.ts +6 -0
- package/lib/es/components/modules/custom-column.d.ts +7 -0
- package/lib/es/components/modules/filter.d.ts +6 -0
- package/lib/es/components/modules/index.d.ts +4 -0
- package/lib/es/components/modules/join-data.d.ts +6 -0
- package/lib/es/components/modules/permission-table.d.ts +6 -0
- package/lib/es/components/modules/row-limit.d.ts +6 -0
- package/lib/es/components/modules/sort.d.ts +6 -0
- package/lib/es/components/modules/summarize/group-by.d.ts +11 -0
- package/lib/es/components/modules/summarize/index.d.ts +7 -0
- package/lib/es/components/modules/summarize/select-index.d.ts +7 -0
- package/lib/es/components/modules/table-data.d.ts +6 -0
- package/lib/es/constants/enum.d.ts +15 -0
- package/lib/es/constants/index.d.ts +1 -0
- package/lib/es/constants/storageKey.d.ts +1 -0
- package/lib/es/hooks/winsize.d.ts +4 -0
- package/lib/es/index.d.ts +4 -2
- package/lib/es/index.js +1878 -979
- package/lib/es/index.js.map +1 -1
- package/lib/es/locale/en.d.ts +2 -0
- package/lib/es/locale/index.d.ts +3 -0
- package/lib/es/locale/zh.d.ts +2 -0
- package/lib/es/metabase.d.ts +6 -0
- package/lib/es/store/{metabase/enum.d.ts → enum.d.ts} +1 -4
- package/lib/es/store/index.d.ts +47 -0
- package/lib/es/store/{metabase/types.d.ts → types.d.ts} +27 -25
- package/lib/es/types.d.ts +11 -37
- package/lib/es/utils/cookies.d.ts +1 -0
- package/lib/es/utils/helper.d.ts +1 -11
- package/lib/es/utils/keydown.d.ts +21 -0
- package/lib/es/utils/platform.d.ts +12 -0
- package/lib/es/utils/storage.d.ts +22 -0
- package/lib/es/{metaBase/utils.d.ts → utils.d.ts} +2 -2
- package/package.json +8 -20
- package/lib/es/constant.d.ts +0 -1
- package/lib/es/enum.d.ts +0 -17
- package/lib/es/helper.d.ts +0 -16
- package/lib/es/icons.d.ts +0 -2
- package/lib/es/metaBase/components/dialog/custom-column/expression-editor.d.ts +0 -11
- package/lib/es/metaBase/components/dialog/custom-column/tokenizedI-input.d.ts +0 -3
- package/lib/es/metaBase/components/dialog/index.d.ts +0 -7
- package/lib/es/metaBase/components/dialog/select-table/index.d.ts +0 -17
- package/lib/es/metaBase/components/modules/components/meta-icon.d.ts +0 -3
- package/lib/es/metaBase/components/modules/custom-column.d.ts +0 -3
- package/lib/es/metaBase/components/modules/filter.d.ts +0 -3
- package/lib/es/metaBase/components/modules/index.d.ts +0 -3
- package/lib/es/metaBase/components/modules/join-data.d.ts +0 -3
- package/lib/es/metaBase/components/modules/row-limit.d.ts +0 -3
- package/lib/es/metaBase/components/modules/sort.d.ts +0 -3
- package/lib/es/metaBase/components/modules/summarize/group-by.d.ts +0 -8
- package/lib/es/metaBase/components/modules/summarize/index.d.ts +0 -3
- package/lib/es/metaBase/components/modules/summarize/select-index.d.ts +0 -3
- package/lib/es/metaBase/components/modules/table-data.d.ts +0 -3
- package/lib/es/metaBase/enum.d.ts +0 -54
- package/lib/es/metaBase/index.d.ts +0 -7
- package/lib/es/metaBase/interface.d.ts +0 -11
- package/lib/es/metaBase/locale.d.ts +0 -1
- package/lib/es/request.d.ts +0 -23
- package/lib/es/store/metabase/index.d.ts +0 -51
- /package/lib/es/{components → common}/Portal/index.d.ts +0 -0
- /package/lib/es/{metaBase/components → components}/dialog/custom-column/config.d.ts +0 -0
- /package/lib/es/{metaBase/components → components}/dialog/custom-column/dialog/function-tip.d.ts +0 -0
- /package/lib/es/{metaBase/components → components}/dialog/custom-column/expressions/tokenizer.d.ts +0 -0
- /package/lib/es/{metaBase/components → components}/dialog/custom-column/keyboard.d.ts +0 -0
- /package/lib/es/{metaBase/components → components}/dialog/custom-column/tokenized-expression.d.ts +0 -0
- /package/lib/es/{metaBase/components → components}/dialog/select-filter/index.d.ts +0 -0
- /package/lib/es/{metaBase/components/modules/components/wrapper.d.ts → components/modules/components/Wrapper.d.ts} +0 -0
- /package/lib/es/{metaBase/components → components}/modules/components/header.d.ts +0 -0
- /package/lib/es/{metaBase/components → components}/popup.d.ts +0 -0
- /package/lib/es/{metaBase/sql-formula.d.ts → sql-formula.d.ts} +0 -0
- /package/lib/es/store/{metabase/helper.d.ts → helper.d.ts} +0 -0
|
@@ -5,6 +5,7 @@ export declare enum SortEnum {
|
|
|
5
5
|
export declare enum TypeEnum {
|
|
6
6
|
data = "data",
|
|
7
7
|
joinData = "joinData",
|
|
8
|
+
permissionTable = "permissionTable",// 权限表
|
|
8
9
|
customColumn = "customColumn",
|
|
9
10
|
filter = "filter",
|
|
10
11
|
summarize = "summarize",
|
|
@@ -48,7 +49,3 @@ export declare enum EleComponentEnum {
|
|
|
48
49
|
text = "text",// 文本框
|
|
49
50
|
select = "select"
|
|
50
51
|
}
|
|
51
|
-
export declare enum TabEnum {
|
|
52
|
-
RESULT = "RESULT",
|
|
53
|
-
FIELD = "FIELD"
|
|
54
|
-
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MetaListType, TableColumnsMapType, initColumnsType, TableType, MetaData_ColumnsType, PopupData } from './types';
|
|
3
|
+
import type { DatasourceType } from '../types';
|
|
4
|
+
export { observer } from 'mobx-react';
|
|
5
|
+
export declare const SummarizeAlias = "source";
|
|
6
|
+
export interface TableFieldsType {
|
|
7
|
+
dataId: string;
|
|
8
|
+
[name: string]: any;
|
|
9
|
+
}
|
|
10
|
+
declare class SqlVisionStore {
|
|
11
|
+
constructor();
|
|
12
|
+
showPermissionTable: boolean;
|
|
13
|
+
sourceList: DatasourceType[];
|
|
14
|
+
_cacheSource2TableMap: {
|
|
15
|
+
[datasourceId: string]: TableType[];
|
|
16
|
+
};
|
|
17
|
+
_cacheColumnsMap: TableColumnsMapType;
|
|
18
|
+
metaList: MetaListType[];
|
|
19
|
+
popupData: PopupData;
|
|
20
|
+
popupClosable: boolean;
|
|
21
|
+
get showMainColumn(): boolean;
|
|
22
|
+
fetchDatasetFn: (id: string) => Promise<any>;
|
|
23
|
+
fetchColumnsFn: (tableName: string, id: string) => Promise<any>;
|
|
24
|
+
setFetchDatasetFn(fn: (id: string) => Promise<any>): void;
|
|
25
|
+
setFetchColumnsFn(fn: (tableName: string, id: string) => Promise<any>): void;
|
|
26
|
+
fetchDataset(datasourceId: string): Promise<any>;
|
|
27
|
+
fetchColumns(tableName: string, datasourceId: string, callback: (record: MetaData_ColumnsType[]) => void): Promise<any>;
|
|
28
|
+
setPreData(data: MetaListType[]): Promise<void>;
|
|
29
|
+
setSourceList(list: DatasourceType[]): void;
|
|
30
|
+
addMeta(type: string, index: number): void;
|
|
31
|
+
delMeta(meta: any): void;
|
|
32
|
+
setMeta(payload: any): void;
|
|
33
|
+
setColumns(tableId: string, columns: initColumnsType[]): void;
|
|
34
|
+
getColumns(tableId: string): MetaData_ColumnsType[];
|
|
35
|
+
setDataset(datasourceId: string, tables: TableType[]): void;
|
|
36
|
+
getDataset(datasourceId: string): TableType[];
|
|
37
|
+
setPopup(payload: PopupData): void;
|
|
38
|
+
setClosable(payload: boolean): void;
|
|
39
|
+
setShowPermissionTable(show: boolean): void;
|
|
40
|
+
}
|
|
41
|
+
export declare const sqlVisionStore: SqlVisionStore;
|
|
42
|
+
export declare const Store: React.Context<SqlVisionStore>;
|
|
43
|
+
declare const StoreProvide: React.FC<{
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
}>;
|
|
46
|
+
export default StoreProvide;
|
|
47
|
+
export declare const useStore: () => SqlVisionStore;
|
|
@@ -1,37 +1,21 @@
|
|
|
1
|
+
import type { DatasourceType } from '../types';
|
|
1
2
|
import { TypeEnum, SpecialType, JoinEnum, SQL_COLUMN_TYPE, SortEnum } from './enum';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
node?: any;
|
|
5
|
-
content?: any;
|
|
6
|
-
}
|
|
7
|
-
export interface ModulesPropsType<T extends MetaListType = MetaListType> {
|
|
8
|
-
meta: T;
|
|
9
|
-
fetchColumns: (tableName: string, fn: Function) => void;
|
|
10
|
-
popupData: PopupData;
|
|
11
|
-
setPopupData: Function;
|
|
12
|
-
tableData: MetaData_TableType[];
|
|
13
|
-
metaList: MetaListType[];
|
|
14
|
-
addMeta: (type: string, index: number) => void;
|
|
15
|
-
delMeta: (meta: any) => void;
|
|
16
|
-
onChangeValue: (value: MetaListType[]) => void;
|
|
17
|
-
popupClosable: boolean;
|
|
18
|
-
setPopupClosable?: (val: boolean) => void;
|
|
19
|
-
showMainColumn?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export type MetaListType = MetaData | MetaJoin | MetaCustom | MetaFilter | MetaSummarize | MetaSort | MetaLimit;
|
|
22
|
-
export type initColumnsType = Omit<MetaData_ColumnsType, 'select'>;
|
|
3
|
+
export type MetaListType = MetaData | MetaJoin | MetaJoin | MetaCustom | MetaFilter | MetaSummarize | MetaSort | MetaLimit | MetaPermissionTable;
|
|
4
|
+
export type initColumnsType = MetaData_ColumnsType;
|
|
23
5
|
export interface TableColumnsMapType {
|
|
24
6
|
[tableName: string]: initColumnsType[];
|
|
25
7
|
}
|
|
26
|
-
export interface
|
|
8
|
+
export interface TableType {
|
|
27
9
|
name: string;
|
|
28
10
|
alias: string;
|
|
29
11
|
}
|
|
12
|
+
export type MetaData_TableType = TableType & DatasourceType;
|
|
30
13
|
export interface MetaData_ColumnsType {
|
|
31
14
|
name: string;
|
|
32
15
|
name_zh: string;
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
realName?: string;
|
|
17
|
+
database_type: SQL_COLUMN_TYPE | '';
|
|
18
|
+
special_type: SpecialType | '';
|
|
35
19
|
select: boolean;
|
|
36
20
|
}
|
|
37
21
|
export interface MetaData {
|
|
@@ -43,6 +27,8 @@ export interface MetaData {
|
|
|
43
27
|
export interface MetaJoin_TalbeType {
|
|
44
28
|
name: string;
|
|
45
29
|
alias: string;
|
|
30
|
+
datasourceName: string;
|
|
31
|
+
datasourceId: string;
|
|
46
32
|
column: string;
|
|
47
33
|
groupSql?: string;
|
|
48
34
|
}
|
|
@@ -68,7 +54,7 @@ export interface MetaFilter_Item {
|
|
|
68
54
|
alias: string;
|
|
69
55
|
name: string;
|
|
70
56
|
groupSql?: string;
|
|
71
|
-
database_type: SQL_COLUMN_TYPE |
|
|
57
|
+
database_type: SQL_COLUMN_TYPE | '';
|
|
72
58
|
val: string[];
|
|
73
59
|
condition: string;
|
|
74
60
|
quotes: string;
|
|
@@ -82,6 +68,7 @@ export interface MetaSummarize_Group {
|
|
|
82
68
|
table?: string;
|
|
83
69
|
alias?: string;
|
|
84
70
|
name?: string;
|
|
71
|
+
realName?: string;
|
|
85
72
|
database_type?: SQL_COLUMN_TYPE | '';
|
|
86
73
|
sql: string;
|
|
87
74
|
condition: string;
|
|
@@ -91,6 +78,7 @@ export interface MetaSummarize_By {
|
|
|
91
78
|
table: string;
|
|
92
79
|
alias: string;
|
|
93
80
|
name: string;
|
|
81
|
+
realName?: string;
|
|
94
82
|
sql: string;
|
|
95
83
|
database_type: SQL_COLUMN_TYPE | '';
|
|
96
84
|
condition: string;
|
|
@@ -120,9 +108,15 @@ export interface MetaLimit {
|
|
|
120
108
|
type: TypeEnum.rowLimit;
|
|
121
109
|
limit: string;
|
|
122
110
|
}
|
|
111
|
+
export interface MetaPermissionTable {
|
|
112
|
+
metaKey: number;
|
|
113
|
+
type: TypeEnum.permissionTable;
|
|
114
|
+
table: MetaData_TableType;
|
|
115
|
+
}
|
|
123
116
|
export interface LooseObject {
|
|
124
117
|
[TypeEnum.data]?: MetaData;
|
|
125
118
|
[TypeEnum.joinData]?: MetaJoin[];
|
|
119
|
+
[TypeEnum.permissionTable]?: MetaPermissionTable;
|
|
126
120
|
[TypeEnum.customColumn]?: MetaCustom;
|
|
127
121
|
[TypeEnum.filter]?: MetaFilter;
|
|
128
122
|
[TypeEnum.summarize]?: MetaSummarize;
|
|
@@ -140,10 +134,12 @@ interface ParamsJoinTables {
|
|
|
140
134
|
joinType: string;
|
|
141
135
|
queryColumns: string[];
|
|
142
136
|
tableName: string;
|
|
137
|
+
datasourceId?: string;
|
|
143
138
|
}
|
|
144
139
|
export interface ParamsStruct {
|
|
145
140
|
alias?: string;
|
|
146
141
|
tableName?: string;
|
|
142
|
+
datasourceId?: string;
|
|
147
143
|
queryColumns?: string[];
|
|
148
144
|
customColumns?: ParamsCustomColumns[];
|
|
149
145
|
filters?: string;
|
|
@@ -154,6 +150,7 @@ export interface ParamsStruct {
|
|
|
154
150
|
joinTables?: ParamsJoinTables[];
|
|
155
151
|
limit?: number;
|
|
156
152
|
orderInfos?: string;
|
|
153
|
+
privilegeTable?: string;
|
|
157
154
|
hasInnerSql: boolean;
|
|
158
155
|
innerSqlStruct: ParamsStruct | null;
|
|
159
156
|
}
|
|
@@ -161,6 +158,11 @@ export interface ParamsType {
|
|
|
161
158
|
id: string;
|
|
162
159
|
code: string;
|
|
163
160
|
}
|
|
161
|
+
export interface PopupData {
|
|
162
|
+
visible: boolean;
|
|
163
|
+
node?: any;
|
|
164
|
+
content?: any;
|
|
165
|
+
}
|
|
164
166
|
export {};
|
|
165
167
|
/**
|
|
166
168
|
let a = {
|
package/lib/es/types.d.ts
CHANGED
|
@@ -1,38 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
headers?: any;
|
|
13
|
-
noCode?: any;
|
|
14
|
-
isRaw?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface RequestConfig {
|
|
17
|
-
url: string;
|
|
18
|
-
method: MethodEnum;
|
|
19
|
-
params: RequestConfigItem[];
|
|
20
|
-
headers: RequestConfigItem[];
|
|
21
|
-
body: {
|
|
22
|
-
select: ContentTypeEnum;
|
|
23
|
-
none: [];
|
|
24
|
-
'form-data': RequestConfigItem[];
|
|
25
|
-
'x-www-form-urlencoded': RequestConfigItem[];
|
|
26
|
-
raw: string;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export interface PostmanProps {
|
|
30
|
-
requestConfig?: RequestConfig;
|
|
31
|
-
autoSend?: boolean;
|
|
32
|
-
height?: number;
|
|
33
|
-
baseUrl?: string;
|
|
34
|
-
onBeforeSend?: (res: any) => boolean;
|
|
35
|
-
onSend?: (res: any) => void;
|
|
36
|
-
onSuccess?: (res: any) => void;
|
|
37
|
-
onError?: (res: any) => void;
|
|
1
|
+
export interface MetabaseProps {
|
|
2
|
+
loading?: boolean;
|
|
3
|
+
btnText?: string;
|
|
4
|
+
showPermissionTable?: boolean;
|
|
5
|
+
getTables: (datasourceId: string) => Promise<any>;
|
|
6
|
+
getColumns: (table: string, datasourceId: string) => Promise<any>;
|
|
7
|
+
onOk: (params: any) => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export interface DatasourceType {
|
|
10
|
+
datasourceId: string;
|
|
11
|
+
datasourceName: string;
|
|
38
12
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCookie(name: string): string | null;
|
package/lib/es/utils/helper.d.ts
CHANGED
|
@@ -7,17 +7,7 @@ export type ScreenType = {
|
|
|
7
7
|
export declare const getScreenInfo: () => ScreenType;
|
|
8
8
|
export declare const fullScreen: () => void;
|
|
9
9
|
export declare const exitFullscreen: () => void;
|
|
10
|
-
export declare const getUrlParams: (
|
|
10
|
+
export declare const getUrlParams: () => any;
|
|
11
11
|
export declare const sleep: (wait?: number) => Promise<unknown>;
|
|
12
12
|
export declare const flatArray: (arr: any[]) => any[];
|
|
13
13
|
export declare const mobx2Object: (mobxObj: any, defaultType?: any) => any;
|
|
14
|
-
export declare const getKey: (length?: number) => string;
|
|
15
|
-
export declare const getTextWidth: (text: string, font?: string) => any;
|
|
16
|
-
export declare const isNull: (str: any) => boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 切换主题
|
|
19
|
-
* @param {string} theme * 主题
|
|
20
|
-
* @param {function} successFn 切换成功的回调
|
|
21
|
-
* @param {function} errorFn 切换失败的回调
|
|
22
|
-
*/
|
|
23
|
-
export declare const changeTheme: (theme: string, successFn?: Function, errorFn?: Function) => false | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface SubscribeData {
|
|
2
|
+
type: KeydownEnum;
|
|
3
|
+
fn: Function;
|
|
4
|
+
}
|
|
5
|
+
interface FnsType {
|
|
6
|
+
[propsName: number]: SubscribeData;
|
|
7
|
+
}
|
|
8
|
+
export declare enum KeydownEnum {
|
|
9
|
+
save = "save",
|
|
10
|
+
entry = "entry"
|
|
11
|
+
}
|
|
12
|
+
declare class Keydown {
|
|
13
|
+
fns: FnsType;
|
|
14
|
+
constructor();
|
|
15
|
+
subscribe(data: SubscribeData): number;
|
|
16
|
+
remove(id: number): void;
|
|
17
|
+
handleEvent(type: KeydownEnum): void;
|
|
18
|
+
init(): void;
|
|
19
|
+
}
|
|
20
|
+
export declare const winKeydown: Keydown;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** 缓存方法集合 **/
|
|
2
|
+
export declare class Cache {
|
|
3
|
+
storage: any;
|
|
4
|
+
key: string;
|
|
5
|
+
constructor(storageKey: 'localStorage' | 'sessionStorage', key: string);
|
|
6
|
+
get(): string;
|
|
7
|
+
set(item: any): void;
|
|
8
|
+
clear(): void;
|
|
9
|
+
}
|
|
10
|
+
interface StorageType {
|
|
11
|
+
theme?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 便捷操作 localStorage & sessionStorage
|
|
15
|
+
* e.g.
|
|
16
|
+
* import storage from '@/utils/storage'
|
|
17
|
+
* storage.token =>> localStorage.getItem(APP_TOKEN)
|
|
18
|
+
* storage.token = 1 =>> localStorage.setItem(APP_TOKEN, 1)
|
|
19
|
+
* storage.token = '' =>> localStorage.clearItem(APP_TOKEN)
|
|
20
|
+
*/
|
|
21
|
+
declare const storage: StorageType;
|
|
22
|
+
export default storage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TypeEnum } from '
|
|
2
|
-
import { MetaListType, MetaSummarize } from '
|
|
1
|
+
import { TypeEnum } from './store/enum';
|
|
2
|
+
import { MetaListType, MetaSummarize } from './store/types';
|
|
3
3
|
export declare const findIndex: <T>(arr: T[], item: T) => number;
|
|
4
4
|
interface HelperResultType {
|
|
5
5
|
ExistAboveGroupBy: boolean;
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gingkoo/pandora-metabase",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/es/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
7
7
|
"types": "lib/es/index.d.ts",
|
|
8
8
|
"unpkg": "lib/umd/index.min.js",
|
|
9
9
|
"scripts": {
|
|
10
|
+
"clean": "rimraf lib",
|
|
10
11
|
"dev": "cd example && yarn dev",
|
|
11
12
|
"build": "yarn clean && cross-env BABEL_ENV=esm rollup -c --bundleConfigAsCjs",
|
|
12
|
-
"clean": "rimraf lib",
|
|
13
13
|
"prettier": "prettier --write .",
|
|
14
14
|
"prepublishOnly": "npm run build"
|
|
15
15
|
},
|
|
@@ -25,27 +25,18 @@
|
|
|
25
25
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@emoji-mart/data": "^1.1.2",
|
|
29
|
-
"@emoji-mart/react": "^1.1.0",
|
|
30
28
|
"@gingkoo/pandora": "^1.0.0-alpha.71",
|
|
31
29
|
"@gingkoo/pandora-icons": "^0.0.1-alpha.28",
|
|
32
30
|
"@gingkoo/pandora-hooks": "^1.0.5",
|
|
33
|
-
"@types/react-scroll": "^1.8.10",
|
|
34
|
-
"@types/underscore": "^1.11.15",
|
|
35
|
-
"codemirror": "^5.63.3",
|
|
36
|
-
"date-fns": "^3.6.0",
|
|
37
31
|
"dayjs": "^1.11.11",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
32
|
+
"@ant-design/icons": "^4.8.0",
|
|
33
|
+
"lodash": "^4.17.21",
|
|
34
|
+
"antd": "^5.0.7",
|
|
40
35
|
"mobx": "^6.7.0",
|
|
41
36
|
"mobx-react": "^7.6.0",
|
|
42
|
-
"react-codemirror2": "^7.3.0",
|
|
43
37
|
"react-scroll": "^1.9.0",
|
|
44
|
-
"slate": "0.100.0",
|
|
45
|
-
"slate-history": "0.66.0",
|
|
46
|
-
"slate-react": "0.100.0",
|
|
47
38
|
"styled-components": "^5.3.6",
|
|
48
|
-
"underscore": "^1.13.
|
|
39
|
+
"underscore": "^1.13.6"
|
|
49
40
|
},
|
|
50
41
|
"devDependencies": {
|
|
51
42
|
"@babel/core": "^7.23.9",
|
|
@@ -53,28 +44,25 @@
|
|
|
53
44
|
"@babel/preset-modules": "^0.1.6",
|
|
54
45
|
"@babel/preset-react": "^7.23.3",
|
|
55
46
|
"@babel/preset-typescript": "^7.23.3",
|
|
56
|
-
"@emotion/css": "^11.11.2",
|
|
57
47
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
58
48
|
"@rollup/plugin-image": "^3.0.3",
|
|
59
49
|
"@rollup/plugin-json": "^6.1.0",
|
|
60
50
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
61
51
|
"@rollup/plugin-replace": "^5.0.5",
|
|
62
52
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
63
|
-
"@types/
|
|
53
|
+
"@types/underscore": "^1.11.4",
|
|
64
54
|
"@types/lodash": "^4.14.202",
|
|
65
|
-
"@types/nprogress": "^0.2.3",
|
|
66
55
|
"@types/react": "^18.2.49",
|
|
67
56
|
"@types/react-dom": "^18.2.18",
|
|
68
|
-
"@types/react-transition-group": "^4.4.10",
|
|
69
57
|
"@types/styled-components": "^5.1.12",
|
|
70
58
|
"babel-plugin-dev-expression": "^0.2.3",
|
|
71
59
|
"cross-env": "^7.0.2",
|
|
72
60
|
"fs-extra": "^11.2.0",
|
|
73
61
|
"less": "^4.2.0",
|
|
74
|
-
"lodash": "^4.17.21",
|
|
75
62
|
"postcss": "^8.4.33",
|
|
76
63
|
"postcss-url": "^10.1.3",
|
|
77
64
|
"prettier": "^3.2.4",
|
|
65
|
+
"@emotion/css": "^11.11.2",
|
|
78
66
|
"react": "^18.2.0",
|
|
79
67
|
"react-dom": "^18.2.0",
|
|
80
68
|
"rimraf": "^5.0.5",
|
package/lib/es/constant.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const IMGS: never[];
|
package/lib/es/enum.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare enum MethodEnum {
|
|
2
|
-
get = "GET",
|
|
3
|
-
post = "POST"
|
|
4
|
-
}
|
|
5
|
-
export declare enum ContentTypeEnum {
|
|
6
|
-
'none' = "none",
|
|
7
|
-
'form-data' = "form-data",
|
|
8
|
-
'x-www-form-urlencoded' = "x-www-form-urlencoded",
|
|
9
|
-
'raw' = "raw"
|
|
10
|
-
}
|
|
11
|
-
export declare enum ApiStatus {
|
|
12
|
-
FIRST_OPEN = "first_open",
|
|
13
|
-
LOADING = "loading",
|
|
14
|
-
ERROR = "error",
|
|
15
|
-
NO_DATA = "no_data",
|
|
16
|
-
SUCCESS = "success"
|
|
17
|
-
}
|
package/lib/es/helper.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const throttle: (fn: Function, wait?: number) => Function;
|
|
2
|
-
export declare const debounce: (fn: Function, wait?: number) => (() => void);
|
|
3
|
-
export declare const convertBytesToSize: (bytes?: number) => string;
|
|
4
|
-
export declare const dateFormatTime: (dateStr: string, _len?: number) => string;
|
|
5
|
-
export declare const dateFormat: (date?: Date | number | string, formatStr?: string) => string;
|
|
6
|
-
export declare const downloadFile: (filePath: string, filename?: string) => undefined;
|
|
7
|
-
/**
|
|
8
|
-
* 平滑滚动到指定位置的 Promise
|
|
9
|
-
* @param element 滚动容器
|
|
10
|
-
* @param targetY 目标滚动位置
|
|
11
|
-
* @param duration 滚动持续时间(毫秒)
|
|
12
|
-
* @returns Promise,滚动结束时解析
|
|
13
|
-
*/
|
|
14
|
-
export declare function smoothScrollToPromise(element: HTMLElement, targetY: number, duration: number): Promise<void>;
|
|
15
|
-
export declare const mobx2Object: (mobxObj: any, defaultType?: any) => any;
|
|
16
|
-
export declare const getKey: (length?: number) => string;
|
package/lib/es/icons.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MetaData_ColumnsType } from '../../../../store/metabase/types';
|
|
2
|
-
interface PropsType {
|
|
3
|
-
store?: any;
|
|
4
|
-
data: MetaData_ColumnsType[];
|
|
5
|
-
expression: string;
|
|
6
|
-
onChange: (formula: string) => void;
|
|
7
|
-
popupClosable: boolean;
|
|
8
|
-
setPopupClosable: Function;
|
|
9
|
-
}
|
|
10
|
-
declare const ExpressionEditor: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default ExpressionEditor;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { default as CustomColumnPopup } from '../../../metaBase/components/dialog/custom-column/index';
|
|
2
|
-
export { default as SelectColumn } from '../../../metaBase/components/dialog/select-column/index';
|
|
3
|
-
export { default as SelectJoinColumn } from '../../../metaBase/components/dialog/select-join-column/index';
|
|
4
|
-
export { default as SelectFilter } from '../../../metaBase/components/dialog/select-filter/index';
|
|
5
|
-
export { default as SelectSummarize } from '../../../metaBase/components/dialog/select-summarize/index';
|
|
6
|
-
export { default as SelectJoin } from '../../../metaBase/components/dialog/select-join/index';
|
|
7
|
-
export { default as SelectTable } from '../../../metaBase/components/dialog/select-table/index';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 选择表弹框
|
|
3
|
-
* 谁在用?
|
|
4
|
-
* 1、数据模块
|
|
5
|
-
* 2、关联模块
|
|
6
|
-
*/
|
|
7
|
-
import './index.less';
|
|
8
|
-
import { MetaData_TableType } from '../../../../store/metabase/types';
|
|
9
|
-
interface PropsType {
|
|
10
|
-
data: MetaData_TableType[];
|
|
11
|
-
value: MetaData_TableType;
|
|
12
|
-
onChange: (reocrd: MetaData_TableType) => void;
|
|
13
|
-
didUpdate?: Function;
|
|
14
|
-
setPopupClosable?: Function;
|
|
15
|
-
}
|
|
16
|
-
declare const SelectTable: ({ data, value, onChange, didUpdate }: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export default SelectTable;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { TypeEnum } from '../../../store/metabase/enum';
|
|
2
|
-
declare const _default: Map<TypeEnum, (props: import("../../../store/metabase/types").ModulesPropsType<import("../../../store/metabase/types").MetaData>) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MetaSummarize, ModulesPropsType } from '../../../../store/metabase/types';
|
|
2
|
-
import { ColumnType } from '../../dialog/select-join-column';
|
|
3
|
-
export type ValueType = ColumnType & {
|
|
4
|
-
condition: string;
|
|
5
|
-
quotes: string;
|
|
6
|
-
};
|
|
7
|
-
declare const GroupBy: (props: ModulesPropsType<MetaSummarize>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default GroupBy;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export declare enum SortEnum {
|
|
2
|
-
desc = "DESC",
|
|
3
|
-
asc = "ASC"
|
|
4
|
-
}
|
|
5
|
-
export declare enum TypeEnum {
|
|
6
|
-
data = "data",
|
|
7
|
-
joinData = "joinData",
|
|
8
|
-
customColumn = "customColumn",
|
|
9
|
-
filter = "filter",
|
|
10
|
-
summarize = "summarize",
|
|
11
|
-
sort = "sort",
|
|
12
|
-
rowLimit = "rowLimit"
|
|
13
|
-
}
|
|
14
|
-
export declare enum JoinEnum {
|
|
15
|
-
left = "LEFT JOIN",
|
|
16
|
-
right = "RIGHT JOIN",
|
|
17
|
-
inner = "INNER JOIN"
|
|
18
|
-
}
|
|
19
|
-
export declare enum ColumnsPopupThemeEnum {
|
|
20
|
-
skyBlue = "skyBlue",
|
|
21
|
-
greenGrass = "greenGrass",
|
|
22
|
-
purple = "purple"
|
|
23
|
-
}
|
|
24
|
-
export declare enum SpecialType {
|
|
25
|
-
PK = "pk",
|
|
26
|
-
FK = "fk"
|
|
27
|
-
}
|
|
28
|
-
export declare enum SQL_COLUMN_TYPE {
|
|
29
|
-
STRING = "STRING",
|
|
30
|
-
DATE = "DATE",
|
|
31
|
-
FLOAT = "FLOAT",
|
|
32
|
-
LONG = "LONG",
|
|
33
|
-
CURRENCY = "CURRENCY"
|
|
34
|
-
}
|
|
35
|
-
export declare enum SQL_GROUP_TYPE {
|
|
36
|
-
NUMBER = "number",
|
|
37
|
-
STRING = "string",
|
|
38
|
-
DATE = "date"
|
|
39
|
-
}
|
|
40
|
-
export declare enum DataTypeEnum {
|
|
41
|
-
float = "float",// 小数
|
|
42
|
-
string = "string",// 字符
|
|
43
|
-
date = "date",// 日期
|
|
44
|
-
long = "long",// 整数
|
|
45
|
-
currency = "currency"
|
|
46
|
-
}
|
|
47
|
-
export declare enum EleComponentEnum {
|
|
48
|
-
text = "text",// 文本框
|
|
49
|
-
select = "select"
|
|
50
|
-
}
|
|
51
|
-
export declare enum TabEnum {
|
|
52
|
-
RESULT = "RESULT",
|
|
53
|
-
FIELD = "FIELD"
|
|
54
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import './index.less';
|
|
2
|
-
import type { MetaBaseProps } from '../metaBase/interface';
|
|
3
|
-
import { MetaData_ColumnsType } from '../store/metabase/types';
|
|
4
|
-
export declare const SummarizeAlias = "source";
|
|
5
|
-
declare const MetaBase: (props: MetaBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default MetaBase;
|
|
7
|
-
export { MetaBaseProps, type MetaData_ColumnsType };
|