@mxmweb/xviewer 1.0.14 → 1.0.16
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/index.js +47086 -46871
- package/package.json +1 -1
- package/src/adopters/DatabaseIdView/index.d.ts +14 -0
- package/src/adopters/DatabaseTableView/index.d.ts +2 -2
- package/src/adopters/DatabaseTableView/server.d.ts +2 -4
- package/src/adopters/DatabaseView/index.d.ts +14 -0
- package/src/core/DynamicTable.d.ts +1 -0
- package/src/core/hooks/useDynamicForm.d.ts +4 -1
- package/src/core/hooks/useDynamicTable.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Styles } from '@mxmweb/zui';
|
|
3
3
|
import { CustomComponents } from '../../core/types';
|
|
4
|
+
declare enum OPT_BTN {
|
|
5
|
+
DATE = 0,
|
|
6
|
+
VIEW = 1,
|
|
7
|
+
ERROR = 2,
|
|
8
|
+
AUTHORIZE = 3,
|
|
9
|
+
DELETE = 4,
|
|
10
|
+
ANALYSIS_OR_EXTRACT = 5,
|
|
11
|
+
DOWNLOAD = 6,
|
|
12
|
+
EDIT = 7,
|
|
13
|
+
ADD = 8,
|
|
14
|
+
ANALYSIS_CONFIG = 9,
|
|
15
|
+
AUTHORIZE_CONFIG = 10
|
|
16
|
+
}
|
|
4
17
|
interface DatabaseViewAdopterProps {
|
|
5
18
|
url?: string;
|
|
6
19
|
token?: string;
|
|
@@ -10,6 +23,7 @@ interface DatabaseViewAdopterProps {
|
|
|
10
23
|
dbType: 'DataTable' | 'DirectDB';
|
|
11
24
|
CustomComponents?: CustomComponents;
|
|
12
25
|
eventsEmit?: (name: string, data: any) => void;
|
|
26
|
+
getBtnDisabled?: (type: OPT_BTN, permission: number) => void;
|
|
13
27
|
}
|
|
14
28
|
declare const DatabaseViewAdopter: React.FC<DatabaseViewAdopterProps>;
|
|
15
29
|
export default DatabaseViewAdopter;
|
|
@@ -7,8 +7,8 @@ interface DatabaseTableViewProps {
|
|
|
7
7
|
dbType: 'DataTable' | 'DirectDB';
|
|
8
8
|
fileId: string;
|
|
9
9
|
tableId: string;
|
|
10
|
-
dbId
|
|
11
|
-
tableName
|
|
10
|
+
dbId: string;
|
|
11
|
+
tableName: string;
|
|
12
12
|
styles?: Styles;
|
|
13
13
|
CustomComponents?: CustomComponents;
|
|
14
14
|
eventsEmit?: (name: string, data: any) => void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
type IDataSourceType = 'DataTable' | 'DirectDB';
|
|
2
1
|
interface DatabaseApiProps {
|
|
3
2
|
url?: string;
|
|
4
3
|
token?: string;
|
|
@@ -6,11 +5,10 @@ interface DatabaseApiProps {
|
|
|
6
5
|
eventsEmit?: (name: string, data: any) => void;
|
|
7
6
|
}
|
|
8
7
|
declare const AxiosInstance: ({ url, token, role, eventsEmit }: DatabaseApiProps) => {
|
|
9
|
-
getTableDataList: ({
|
|
10
|
-
dbType: IDataSourceType;
|
|
11
|
-
id?: string | number;
|
|
8
|
+
getTableDataList: ({ dbId, name, params, }: {
|
|
12
9
|
dbId?: string | number;
|
|
13
10
|
name?: string;
|
|
11
|
+
params?: any;
|
|
14
12
|
}) => Promise<any>;
|
|
15
13
|
updateTableData: (tableId: string | number, params: any) => Promise<any>;
|
|
16
14
|
delTableDataById: ({ tableId, rowId }: any) => Promise<any>;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Styles } from '@mxmweb/zui';
|
|
3
3
|
import { CustomComponents } from '../../core/types';
|
|
4
|
+
declare enum OPT_BTN {
|
|
5
|
+
DATE = 0,
|
|
6
|
+
VIEW = 1,
|
|
7
|
+
ERROR = 2,
|
|
8
|
+
AUTHORIZE = 3,
|
|
9
|
+
DELETE = 4,
|
|
10
|
+
ANALYSIS_OR_EXTRACT = 5,
|
|
11
|
+
DOWNLOAD = 6,
|
|
12
|
+
EDIT = 7,
|
|
13
|
+
ADD = 8,
|
|
14
|
+
ANALYSIS_CONFIG = 9,
|
|
15
|
+
AUTHORIZE_CONFIG = 10
|
|
16
|
+
}
|
|
4
17
|
interface DatabaseViewAdopterProps {
|
|
5
18
|
url?: string;
|
|
6
19
|
token?: string;
|
|
@@ -8,6 +21,7 @@ interface DatabaseViewAdopterProps {
|
|
|
8
21
|
styles?: Styles;
|
|
9
22
|
CustomComponents?: CustomComponents;
|
|
10
23
|
eventsEmit?: (name: string, data: any) => void;
|
|
24
|
+
getBtnDisabled?: (type: OPT_BTN, permission: number) => void;
|
|
11
25
|
}
|
|
12
26
|
declare const DatabaseViewAdopter: React.FC<DatabaseViewAdopterProps>;
|
|
13
27
|
export default DatabaseViewAdopter;
|
|
@@ -34,8 +34,11 @@ export interface FormItemProps {
|
|
|
34
34
|
type: 'input' | 'select' | 'number' | 'slider' | 'switch' | 'date' | 'time' | 'datetime' | 'radio' | 'checkbox' | 'textarea' | 'divider' | 'password' | 'email' | 'col' | 'title' | 'uploader' | 'file' | 'color' | 'json' | 'markdown';
|
|
35
35
|
label?: string;
|
|
36
36
|
description?: string;
|
|
37
|
+
helpText?: string;
|
|
37
38
|
control?: string[];
|
|
38
|
-
controlledItems?: string[]
|
|
39
|
+
controlledItems?: string[] | {
|
|
40
|
+
[key: string]: string[];
|
|
41
|
+
};
|
|
39
42
|
name?: string;
|
|
40
43
|
defaultValue?: any;
|
|
41
44
|
options?: {
|