@mxmweb/xviewer 1.0.1 → 1.0.7
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/assets/style.css +1 -1
- package/{index-CgFHm4CL-O5tUkbrp-DVVAm6ku-DGiFKv0h-B3lf_1ne.js → index-CgFHm4CL-O5tUkbrp-DVVAm6ku-DGiFKv0h-Bnx-WG9b-CUArzJQ3-C3Ju91D9-CZ4OAcic-KH9F2it6.js} +2025 -2025
- package/index.js +205813 -84526
- package/package.json +1 -1
- package/src/adopters/DatabaseIdView/index.d.ts +2 -2
- package/src/adopters/DatabaseIdView/server.d.ts +1 -0
- package/src/adopters/DatabaseTableView/index.d.ts +5 -3
- package/src/adopters/DatabaseView/index.d.ts +2 -0
- package/src/adopters/ModelManageView/ConfigDrawer.d.ts +9 -0
- package/src/adopters/ModelManageView/const.d.ts +22 -0
- package/src/adopters/ModelManageView/index.d.ts +12 -0
- package/src/adopters/ModelManageView/server.d.ts +13 -0
- package/src/core/DynamicTable.d.ts +10 -1
- package/src/core/hooks/useDynamicForm.d.ts +16 -7
- package/src/examples/FormView/index.d.ts +1 -0
- package/src/examples/TableView/index.d.ts +1 -0
- package/src/index.d.ts +2 -1
- package/src/lib_enter.d.ts +2 -1
- package/src/main.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Styles } from '@mxmweb/zui';
|
|
3
|
+
import { CustomComponents } from '../../core/types';
|
|
3
4
|
interface DatabaseViewAdopterProps {
|
|
4
5
|
url?: string;
|
|
5
6
|
token?: string;
|
|
6
7
|
role?: string;
|
|
7
8
|
id: string;
|
|
8
|
-
dbName?: string;
|
|
9
|
-
dbDesc?: string;
|
|
10
9
|
styles?: Styles;
|
|
11
10
|
dbType: 'DataTable' | 'DirectDB';
|
|
11
|
+
CustomComponents?: CustomComponents;
|
|
12
12
|
eventsEmit?: (name: string, data: any) => void;
|
|
13
13
|
}
|
|
14
14
|
declare const DatabaseViewAdopter: React.FC<DatabaseViewAdopterProps>;
|
|
@@ -8,6 +8,7 @@ interface DatabaseApiProps {
|
|
|
8
8
|
declare const AxiosInstance: ({ url, token, role, eventsEmit }: DatabaseApiProps) => {
|
|
9
9
|
getTableList: (id: string | number) => Promise<any>;
|
|
10
10
|
getTableTreeList: (id: string | number) => Promise<any>;
|
|
11
|
+
getDBDetailById: (id: string | number, type: IDataSourceType) => Promise<any>;
|
|
11
12
|
delTableById: (id: string | number, type: IDataSourceType) => Promise<any>;
|
|
12
13
|
delFileById: (fileId: any) => Promise<any>;
|
|
13
14
|
parseFiles: ({ fileIds, isGenDescription, tableDescriptionMap }: any) => Promise<any>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import { CustomComponents } from '../../core/types';
|
|
1
2
|
import { Styles } from '@mxmweb/zui';
|
|
2
3
|
interface DatabaseTableViewProps {
|
|
3
4
|
url?: string;
|
|
4
5
|
token?: string;
|
|
5
6
|
role?: string;
|
|
6
7
|
dbType: 'DataTable' | 'DirectDB';
|
|
7
|
-
|
|
8
|
+
fileId: string;
|
|
8
9
|
tableId: string;
|
|
9
10
|
dbId?: string;
|
|
10
|
-
tableName
|
|
11
|
+
tableName?: string;
|
|
11
12
|
styles?: Styles;
|
|
13
|
+
CustomComponents?: CustomComponents;
|
|
12
14
|
eventsEmit?: (name: string, data: any) => void;
|
|
13
15
|
}
|
|
14
|
-
export default function DatabaseTableView({ url, token,
|
|
16
|
+
export default function DatabaseTableView({ url, token, fileId, role, dbType, dbId, tableId, tableName, CustomComponents, eventsEmit, }: DatabaseTableViewProps): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Styles } from '@mxmweb/zui';
|
|
3
|
+
import { CustomComponents } from '../../core/types';
|
|
3
4
|
interface DatabaseViewAdopterProps {
|
|
4
5
|
url?: string;
|
|
5
6
|
token?: string;
|
|
6
7
|
role?: string;
|
|
7
8
|
styles?: Styles;
|
|
9
|
+
CustomComponents?: CustomComponents;
|
|
8
10
|
eventsEmit?: (name: string, data: any) => void;
|
|
9
11
|
}
|
|
10
12
|
declare const DatabaseViewAdopter: React.FC<DatabaseViewAdopterProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface UploadDrawerProps {
|
|
2
|
+
drawerTitle: string;
|
|
3
|
+
drawerVisible: boolean;
|
|
4
|
+
handleDrawerClose: () => void;
|
|
5
|
+
modelInfo?: any;
|
|
6
|
+
eventsEmit: (name: string, data: any, appFn?: any) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ConfigDrawer: ({ drawerTitle, drawerVisible, modelInfo, handleDrawerClose, eventsEmit, }: UploadDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ConfigDrawer;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const MODEL_TYPE_OPTIONS: {
|
|
2
|
+
value: number;
|
|
3
|
+
label: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const MODEL_USE_TYPE_OPTIONS: {
|
|
6
|
+
value: number;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const statusColorMap: {
|
|
10
|
+
success: string;
|
|
11
|
+
error: string;
|
|
12
|
+
warning: string;
|
|
13
|
+
processing: string;
|
|
14
|
+
info: string;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const statusArr: {
|
|
18
|
+
statusType: string;
|
|
19
|
+
value: string;
|
|
20
|
+
status: number;
|
|
21
|
+
}[];
|
|
22
|
+
export declare const getStatusColor: (statusType: unknown) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Styles } from '@mxmweb/zui';
|
|
2
|
+
import { CustomComponents } from '../../core/types';
|
|
3
|
+
interface ModelManageViewProps {
|
|
4
|
+
url?: string;
|
|
5
|
+
token?: string;
|
|
6
|
+
role?: string;
|
|
7
|
+
styles?: Styles;
|
|
8
|
+
CustomComponents?: CustomComponents;
|
|
9
|
+
eventsEmit?: (name: string, data: any) => void;
|
|
10
|
+
}
|
|
11
|
+
export default function ModelManageView(props: ModelManageViewProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface DatabaseApiProps {
|
|
2
|
+
url?: string;
|
|
3
|
+
token?: string;
|
|
4
|
+
role?: string;
|
|
5
|
+
eventsEmit?: (name: string, data: any) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const AxiosInstance: ({ url, token, role, eventsEmit }: DatabaseApiProps) => {
|
|
8
|
+
getModelList: (params: any) => Promise<any>;
|
|
9
|
+
delModelById: (id: string | number) => Promise<any>;
|
|
10
|
+
createModel: (params: any) => Promise<any>;
|
|
11
|
+
updateModelById: (params: any) => Promise<any>;
|
|
12
|
+
};
|
|
13
|
+
export default AxiosInstance;
|
|
@@ -53,9 +53,18 @@ export interface DynamicTableProps {
|
|
|
53
53
|
addingIds?: string[];
|
|
54
54
|
onRowAddAnimationComplete?: (rowId: string) => void;
|
|
55
55
|
subTableConfig?: {
|
|
56
|
-
columns
|
|
56
|
+
columns?: DynamicTableColumn[];
|
|
57
57
|
allowMultiSelect?: boolean;
|
|
58
58
|
toolbar?: any[];
|
|
59
|
+
default?: {
|
|
60
|
+
columns: DynamicTableColumn[];
|
|
61
|
+
allowMultiSelect?: boolean;
|
|
62
|
+
viewBehavior?: 'scroll' | 'pagination';
|
|
63
|
+
viewPageSize?: number;
|
|
64
|
+
total?: number;
|
|
65
|
+
requestPagesize?: number;
|
|
66
|
+
};
|
|
67
|
+
[key: string]: any;
|
|
59
68
|
};
|
|
60
69
|
level?: number;
|
|
61
70
|
isSubTable?: boolean;
|
|
@@ -92,13 +92,22 @@ export interface FormItemProps {
|
|
|
92
92
|
audio?: React.ReactNode;
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
|
+
buttons?: Array<{
|
|
96
|
+
label: string;
|
|
97
|
+
mode?: 'primary' | 'default' | 'error' | 'text';
|
|
98
|
+
icon?: React.ReactNode;
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
onClick: () => void;
|
|
101
|
+
}>;
|
|
102
|
+
placeholder?: React.ReactNode;
|
|
103
|
+
listName?: string;
|
|
104
|
+
errorMessages?: {
|
|
105
|
+
noUrl?: string;
|
|
106
|
+
uploadFailed?: string;
|
|
107
|
+
fileTooLarge?: string;
|
|
108
|
+
invalidFileType?: string;
|
|
109
|
+
};
|
|
110
|
+
onRef?: (methods: any) => void;
|
|
95
111
|
};
|
|
96
|
-
buttons?: Array<{
|
|
97
|
-
label: string;
|
|
98
|
-
mode?: 'primary' | 'default' | 'error' | 'text';
|
|
99
|
-
icon?: React.ReactNode;
|
|
100
|
-
disabled?: boolean;
|
|
101
|
-
onClick: () => void;
|
|
102
|
-
}>;
|
|
103
112
|
}
|
|
104
113
|
export declare function useDynamicFormItems(config?: FormItemProps[], styles?: any, initialValues?: Record<string, any>, size?: 'sm' | 'md'): (import("react/jsx-runtime").JSX.Element | null)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FormView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TableView(): import("react/jsx-runtime").JSX.Element;
|
package/src/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ import { default as DatabaseIdView } from './adopters/DatabaseIdView';
|
|
|
2
2
|
import { default as DatabaseTableView } from './adopters/DatabaseTableView';
|
|
3
3
|
import { default as DatabaseView } from './adopters/DatabaseView';
|
|
4
4
|
import { default as SensitivityView } from './adopters/SensitiveView';
|
|
5
|
-
|
|
5
|
+
import { default as ModelManageView } from './adopters/ModelManageView';
|
|
6
|
+
export { DatabaseIdView, DatabaseTableView, DatabaseView, SensitivityView, ModelManageView };
|
package/src/lib_enter.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ import { useDynamicTableColumns as useDynamicTable } from './core/hooks/useDynam
|
|
|
8
8
|
import { default as DatabaseIdView } from './adopters/DatabaseIdView';
|
|
9
9
|
import { default as DatabaseTableView } from './adopters/DatabaseTableView';
|
|
10
10
|
import { default as DatabaseView } from './adopters/DatabaseView';
|
|
11
|
-
|
|
11
|
+
import { default as ModelManageView } from './adopters/ModelManageView';
|
|
12
|
+
export { CoreXviwer, FormXviwer, TableXviwer, CardXviwer, useDynamicCards, useDynamicForm, useDynamicTable, DatabaseIdView, DatabaseTableView, DatabaseView, ModelManageView, };
|
|
12
13
|
export type { FormItemProps };
|
package/src/main.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|