@mxmweb/xviewer 1.1.42 → 1.1.45
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_enter.d.ts +151 -4
- package/package.json +3 -2
- package/Preview.d.ts +0 -1
- package/adopters/DatabaseIdView/CustomCom.d.ts +0 -29
- package/adopters/DatabaseIdView/EditConfig.d.ts +0 -10
- package/adopters/DatabaseIdView/UploadDrawer.d.ts +0 -12
- package/adopters/DatabaseIdView/index.d.ts +0 -17
- package/adopters/DatabaseIdView/server.d.ts +0 -22
- package/adopters/DatabaseTableView/EditRowDrawer.d.ts +0 -8
- package/adopters/DatabaseTableView/index.d.ts +0 -31
- package/adopters/DatabaseTableView/server.d.ts +0 -17
- package/adopters/DatabaseView/CreateModal.d.ts +0 -11
- package/adopters/DatabaseView/index.d.ts +0 -27
- package/adopters/DatabaseView/server.d.ts +0 -15
- package/adopters/ModelManageView/ConfigDrawer.d.ts +0 -17
- package/adopters/ModelManageView/const.d.ts +0 -35
- package/adopters/ModelManageView/index.d.ts +0 -14
- package/adopters/ModelManageView/server.d.ts +0 -15
- package/adopters/SensitiveView/index.d.ts +0 -17
- package/adopters/SensitiveView/server.d.ts +0 -11
- package/adopters/SensitiveView/size-test.d.ts +0 -7
- package/adopters/shared/statusMap.d.ts +0 -37
- package/core/DynamicCards.d.ts +0 -28
- package/core/DynamicDashDataCore.d.ts +0 -11
- package/core/components/DefaultComponents.d.ts +0 -11
- package/core/components/DropdownMenu.d.ts +0 -16
- package/core/components/SharedPagination.d.ts +0 -32
- package/core/components/StyledComponents.d.ts +0 -6
- package/core/components/TreeComponent.d.ts +0 -13
- package/core/components/cardUI/DatabaseCard.d.ts +0 -22
- package/core/components/cardUI/DefaultCard.d.ts +0 -13
- package/core/components/cardUI/DesignCard.d.ts +0 -16
- package/core/components/cardUI/KnowledgebaseCard.d.ts +0 -28
- package/core/components/cardUI/PrototypeCard.d.ts +0 -16
- package/core/components/cardUI/RepositoryCard.d.ts +0 -16
- package/core/components/cardUI/common.d.ts +0 -40
- package/core/components/cardUI/index.d.ts +0 -13
- package/core/components/dataDisplayer/DigitalClockDate.d.ts +0 -6
- package/core/components/dataDisplayer/MobileLockDate.d.ts +0 -6
- package/core/hooks/animes/useRowAnimation.d.ts +0 -19
- package/core/hooks/animes/useStaggerAnimation.d.ts +0 -12
- package/core/hooks/useAppFunctions.d.ts +0 -2
- package/core/hooks/useAppState.d.ts +0 -14
- package/core/hooks/useCardStaggerAnimation.d.ts +0 -18
- package/core/hooks/useDynamicCards.d.ts +0 -48
- package/core/hooks/useFuzzySearch.d.ts +0 -43
- package/core/renderers/ContentRenderer.d.ts +0 -30
- package/core/renderers/TabsRenderer.d.ts +0 -10
- package/core/renderers/ToolbarRenderer.d.ts +0 -11
- package/core/shared/types.d.ts +0 -1
- package/core/types/index.d.ts +0 -176
- package/core/utils/dataUtils.d.ts +0 -3
- package/core/utils/viewUtils.d.ts +0 -5
- package/examples/CardView/index.d.ts +0 -5
- package/examples/FormView/index.d.ts +0 -9
- package/examples/TableView/index.d.ts +0 -23
- package/examples/TableView/mockdata.d.ts +0 -33
- package/examples/TabsView/index.d.ts +0 -3
- package/examples/TreeView/index.d.ts +0 -3
- package/index.d.ts +0 -6
- package/main.d.ts +0 -1
package/lib_enter.d.ts
CHANGED
|
@@ -1,4 +1,151 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { Styles } from '@mxmweb/zui';
|
|
3
|
+
|
|
4
|
+
declare type AppFn = {
|
|
5
|
+
addItem: (item: any, options?: {
|
|
6
|
+
animate?: boolean;
|
|
7
|
+
position?: 'start' | 'end' | number;
|
|
8
|
+
tableId?: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
removeItem: (id?: string, tableId?: string) => void;
|
|
11
|
+
removeItems: (ids: string[], tableId?: string) => void;
|
|
12
|
+
updateItem: (patch: any, id?: string, tableId?: string) => void;
|
|
13
|
+
scrollToItem: (id?: string) => void;
|
|
14
|
+
addPending: (id: string) => void;
|
|
15
|
+
removePending: (id: string) => void;
|
|
16
|
+
isPending: (id: string) => boolean;
|
|
17
|
+
addAdding: (id: string) => void;
|
|
18
|
+
removeAdding: (id: string) => void;
|
|
19
|
+
isAdding: (id: string) => boolean;
|
|
20
|
+
syncSourceData: (data: any | any[], tableId?: string) => void;
|
|
21
|
+
tablePending: (tableId: string) => void;
|
|
22
|
+
removeTablePending: (tableId: string) => void;
|
|
23
|
+
addSubTable: (parentId: string) => void;
|
|
24
|
+
deleteSubTable: (parentId: string) => void;
|
|
25
|
+
removeSubTableRow: (id: string, tableId: string) => void;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
declare interface AppStatusManager {
|
|
29
|
+
app: 'ready' | 'initializing' | 'error';
|
|
30
|
+
container: 'ready' | 'loading' | 'error' | 'processing' | 'uploading';
|
|
31
|
+
content?: 'ready' | 'loading' | 'error' | 'processing' | 'uploading';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare interface CardDataItem {
|
|
35
|
+
id: string;
|
|
36
|
+
title?: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
actions?: Array<{
|
|
40
|
+
key: string;
|
|
41
|
+
label: string;
|
|
42
|
+
icon?: default_2.ReactNode;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}>;
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export declare interface CustomComponents {
|
|
50
|
+
AppLoading?: default_2.ComponentType<any>;
|
|
51
|
+
AppError?: default_2.ComponentType<any>;
|
|
52
|
+
ContainerLoading?: default_2.ComponentType<any>;
|
|
53
|
+
ContainerError?: default_2.ComponentType<any>;
|
|
54
|
+
ContentLoading?: default_2.ComponentType<any>;
|
|
55
|
+
ContentError?: default_2.ComponentType<any>;
|
|
56
|
+
EmptyData?: default_2.ComponentType<any>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare type DataSource = TableDataItem[] | CardDataItem[] | FormDataItem[] | default_2.ReactElement | undefined;
|
|
60
|
+
|
|
61
|
+
declare interface DynamicDashDataCoreRef {
|
|
62
|
+
appFn: AppFn;
|
|
63
|
+
getActiveNode: () => ViewType | null;
|
|
64
|
+
getCurrentData: () => any[];
|
|
65
|
+
setCurrentData: (data: any[]) => void;
|
|
66
|
+
getCurrentStatus: () => AppStatusManager;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare type DynamicDashView = {
|
|
70
|
+
label?: string;
|
|
71
|
+
key?: string;
|
|
72
|
+
ref?: default_2.RefObject<any>;
|
|
73
|
+
defaultActiveId: string;
|
|
74
|
+
model?: 'tree' | 'tabs' | 'hero' | null;
|
|
75
|
+
modelStyle?: TreeModelStyle | TabsModelStyle;
|
|
76
|
+
activable_parentNode?: boolean;
|
|
77
|
+
views: ViewType[];
|
|
78
|
+
dataSource?: DataSource;
|
|
79
|
+
eventsEmit?: (name: string, data?: any, appFn?: any) => any;
|
|
80
|
+
styles?: Styles;
|
|
81
|
+
status?: AppStatusManager;
|
|
82
|
+
CustomComponents?: CustomComponents;
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
declare interface FormDataItem {
|
|
87
|
+
id: string;
|
|
88
|
+
[key: string]: any;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare interface TableDataItem {
|
|
92
|
+
id: string;
|
|
93
|
+
[key: string]: any;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare enum TabsModelStyle {
|
|
97
|
+
DEFAULT = "default",
|
|
98
|
+
TAG = "tag"
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare type ToolbarItem = {
|
|
102
|
+
type: 'button' | 'fuzzy_search' | 'customized';
|
|
103
|
+
label?: string;
|
|
104
|
+
key: string;
|
|
105
|
+
render?: () => default_2.ReactNode;
|
|
106
|
+
component?: default_2.ComponentType<{
|
|
107
|
+
onAction: (action: string, data: any) => void;
|
|
108
|
+
[key: string]: any;
|
|
109
|
+
}>;
|
|
110
|
+
searchKeys?: (string | string[])[];
|
|
111
|
+
btnType?: 'primary' | 'default' | 'error' | 'text';
|
|
112
|
+
disabled?: boolean;
|
|
113
|
+
icon?: default_2.ReactNode;
|
|
114
|
+
position?: 'left' | 'right';
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
declare enum TreeModelStyle {
|
|
118
|
+
FLAT = "files",
|
|
119
|
+
NAV = "nav"
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare interface ViewType {
|
|
123
|
+
label: string;
|
|
124
|
+
icon?: default_2.ReactNode;
|
|
125
|
+
id: string;
|
|
126
|
+
type?: 'table' | 'form' | 'card' | 'customized' | 'timeline' | 'column' | string;
|
|
127
|
+
columns?: Array<{
|
|
128
|
+
title: string;
|
|
129
|
+
id: string;
|
|
130
|
+
type: string;
|
|
131
|
+
[key: string]: any;
|
|
132
|
+
}>;
|
|
133
|
+
children?: ViewType[] | {
|
|
134
|
+
[key: string]: ViewType;
|
|
135
|
+
};
|
|
136
|
+
cardType?: string;
|
|
137
|
+
viewBehavior?: 'pagination' | 'scroll';
|
|
138
|
+
rowHeight?: number;
|
|
139
|
+
formConfig?: any;
|
|
140
|
+
formWidth?: string;
|
|
141
|
+
toolbar?: ToolbarItem[];
|
|
142
|
+
allowMultiSelect?: boolean;
|
|
143
|
+
size?: 'sm' | 'md';
|
|
144
|
+
total?: number;
|
|
145
|
+
requestPagesize?: number;
|
|
146
|
+
viewPageSize?: number;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export declare const Xviwer: default_2.ForwardRefExoticComponent<Omit<DynamicDashView, "ref"> & default_2.RefAttributes<DynamicDashDataCoreRef>>;
|
|
150
|
+
|
|
151
|
+
export { }
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"style": "assets/style.css",
|
|
6
6
|
"types": "lib_enter.d.ts",
|
|
7
7
|
"private": false,
|
|
8
|
-
"version": "1.1.
|
|
8
|
+
"version": "1.1.45",
|
|
9
9
|
"author": "hanfeng_Zhang",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"peerDependencies": {
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./lib_enter.d.ts",
|
|
25
|
-
"import": "./index.js"
|
|
25
|
+
"import": "./index.js",
|
|
26
|
+
"default": "./index.js"
|
|
26
27
|
},
|
|
27
28
|
"./style.css": "./assets/style.css"
|
|
28
29
|
}
|
package/Preview.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function Preview(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare enum OPT_BTN {
|
|
2
|
-
DATE = 0,
|
|
3
|
-
VIEW = 1,
|
|
4
|
-
ERROR = 2,
|
|
5
|
-
AUTHORIZE = 3,
|
|
6
|
-
DELETE = 4,
|
|
7
|
-
ANALYSIS_OR_EXTRACT = 5,
|
|
8
|
-
DOWNLOAD = 6,
|
|
9
|
-
EDIT = 7,
|
|
10
|
-
ADD = 8,
|
|
11
|
-
ANALYSIS_CONFIG = 9,
|
|
12
|
-
AUTHORIZE_CONFIG = 10
|
|
13
|
-
}
|
|
14
|
-
declare enum DescStatus {
|
|
15
|
-
GENERATING = "generating",
|
|
16
|
-
SUCCESS = "success",
|
|
17
|
-
FAIL = "fail"
|
|
18
|
-
}
|
|
19
|
-
declare const StatusComponent: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
declare const statusArr: {
|
|
21
|
-
statusType: string;
|
|
22
|
-
value: string;
|
|
23
|
-
status: string;
|
|
24
|
-
}[];
|
|
25
|
-
declare const TableMetaDescriptionCom: (info: any) => import("react/jsx-runtime").JSX.Element | "-";
|
|
26
|
-
declare const EmptyData: React.FC<{
|
|
27
|
-
dbType: 'DataTable' | 'DirectDB';
|
|
28
|
-
}>;
|
|
29
|
-
export { StatusComponent, TableMetaDescriptionCom, statusArr, EmptyData, OPT_BTN, DescStatus };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface UploadDrawerProps {
|
|
2
|
-
drawerTitle: string;
|
|
3
|
-
drawerVisible: boolean;
|
|
4
|
-
handleDrawerClose: () => void;
|
|
5
|
-
optimizeDesc: (tableId: string | number) => Promise<any>;
|
|
6
|
-
tableInfo?: any;
|
|
7
|
-
eventsEmit: (name: string, data: any, appFn?: any) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const EditConfig: ({ drawerTitle, drawerVisible, tableInfo, handleDrawerClose, optimizeDesc, eventsEmit, }: UploadDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default EditConfig;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface UploadDrawerProps {
|
|
2
|
-
drawerTitle: string;
|
|
3
|
-
drawerVisible: boolean;
|
|
4
|
-
handleDrawerClose: (type?: 'refresh') => void;
|
|
5
|
-
dbId: string | number;
|
|
6
|
-
tableInfo: any;
|
|
7
|
-
url?: string;
|
|
8
|
-
role?: string;
|
|
9
|
-
token?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const UploadDrawer: ({ drawerTitle, drawerVisible, handleDrawerClose, dbId, tableInfo, token, url, role, }: UploadDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default UploadDrawer;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { Styles } from '@mxmweb/zui';
|
|
3
|
-
import { CustomComponents } from '../../core/types';
|
|
4
|
-
import { OPT_BTN } from './CustomCom';
|
|
5
|
-
interface DatabaseViewAdopterProps {
|
|
6
|
-
url?: string;
|
|
7
|
-
token?: string;
|
|
8
|
-
role?: string;
|
|
9
|
-
id: string;
|
|
10
|
-
styles?: Styles;
|
|
11
|
-
dbType: 'DataTable' | 'DirectDB';
|
|
12
|
-
CustomComponents?: CustomComponents;
|
|
13
|
-
eventsEmit?: (name: string, data: any) => void;
|
|
14
|
-
getBtnDisabled?: (type: OPT_BTN, permission: number) => boolean;
|
|
15
|
-
}
|
|
16
|
-
declare const DatabaseViewAdopter: React.FC<DatabaseViewAdopterProps>;
|
|
17
|
-
export default DatabaseViewAdopter;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
type IDataSourceType = 'DataTable' | 'DirectDB';
|
|
2
|
-
interface DatabaseApiProps {
|
|
3
|
-
url?: string;
|
|
4
|
-
token?: string;
|
|
5
|
-
role?: string;
|
|
6
|
-
eventsEmit?: (name: string, data: any) => void;
|
|
7
|
-
}
|
|
8
|
-
declare const AxiosInstance: ({ url, token, role, eventsEmit }: DatabaseApiProps) => {
|
|
9
|
-
getTableList: (id: string | number) => Promise<any>;
|
|
10
|
-
getTableTreeList: (id: string | number) => Promise<any>;
|
|
11
|
-
getDBDetailById: (id: string | number, type: IDataSourceType) => Promise<any>;
|
|
12
|
-
delTableById: (id: string | number, type: IDataSourceType) => Promise<any>;
|
|
13
|
-
delFileById: (fileId: any) => Promise<any>;
|
|
14
|
-
parseFiles: ({ fileIds, isGenDescription, tableDescriptionMap }: any) => Promise<any>;
|
|
15
|
-
reParseFile: (fileId: number | string) => Promise<any>;
|
|
16
|
-
parseAppendFile: ({ fileIds, tableId }: any) => Promise<any>;
|
|
17
|
-
deleteUploadedFiles: (fileIds: string[] | number[]) => Promise<any>;
|
|
18
|
-
getTableInfoById: (id: string | number) => Promise<any>;
|
|
19
|
-
updateTableInfo: ({ tableId, description, businessName }: any) => Promise<any>;
|
|
20
|
-
optimizeDesc: (tableId: string | number) => Promise<any>;
|
|
21
|
-
};
|
|
22
|
-
export default AxiosInstance;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface EditRowDrawerProps {
|
|
2
|
-
drawerVisible: boolean;
|
|
3
|
-
rowData: any;
|
|
4
|
-
handleDrawerClose: (type: 'confirm' | 'cancel', data?: any) => void;
|
|
5
|
-
tableId?: string | number;
|
|
6
|
-
}
|
|
7
|
-
declare const EditRowDrawer: ({ drawerVisible, handleDrawerClose, rowData }: EditRowDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default EditRowDrawer;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { CustomComponents } from '../../core/types';
|
|
2
|
-
import { Styles } from '@mxmweb/zui';
|
|
3
|
-
declare enum OPT_BTN {
|
|
4
|
-
DATE = 0,
|
|
5
|
-
VIEW = 1,
|
|
6
|
-
ERROR = 2,
|
|
7
|
-
AUTHORIZE = 3,
|
|
8
|
-
DELETE = 4,
|
|
9
|
-
ANALYSIS_OR_EXTRACT = 5,
|
|
10
|
-
DOWNLOAD = 6,
|
|
11
|
-
EDIT = 7,
|
|
12
|
-
ADD = 8,
|
|
13
|
-
ANALYSIS_CONFIG = 9,
|
|
14
|
-
AUTHORIZE_CONFIG = 10
|
|
15
|
-
}
|
|
16
|
-
interface DatabaseTableViewProps {
|
|
17
|
-
url?: string;
|
|
18
|
-
token?: string;
|
|
19
|
-
role?: string;
|
|
20
|
-
dbType: 'DataTable' | 'DirectDB';
|
|
21
|
-
fileId: string;
|
|
22
|
-
tableId: string;
|
|
23
|
-
dbId: string;
|
|
24
|
-
tableName: string;
|
|
25
|
-
styles?: Styles;
|
|
26
|
-
CustomComponents?: CustomComponents;
|
|
27
|
-
eventsEmit?: (name: string, data: any) => void;
|
|
28
|
-
getBtnDisabled?: (type: OPT_BTN, permission: number) => boolean;
|
|
29
|
-
}
|
|
30
|
-
export default function DatabaseTableView({ url, token, fileId, role, dbType, dbId, tableId, tableName, CustomComponents, eventsEmit, getBtnDisabled, }: DatabaseTableViewProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
getTableDataList: ({ dbId, name, params, }: {
|
|
9
|
-
dbId?: string | number;
|
|
10
|
-
name?: string;
|
|
11
|
-
params?: any;
|
|
12
|
-
}) => Promise<any>;
|
|
13
|
-
updateTableData: (tableId: string | number, params: any) => Promise<any>;
|
|
14
|
-
delTableDataById: ({ tableId, rowId }: any) => Promise<any>;
|
|
15
|
-
getFileDataList: ({ fileId, params }: any) => Promise<any>;
|
|
16
|
-
};
|
|
17
|
-
export default AxiosInstance;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface CreateModalProps {
|
|
2
|
-
drawerTitle: string;
|
|
3
|
-
drawerVisible: boolean;
|
|
4
|
-
isConnectSuccess: boolean;
|
|
5
|
-
handleDrawerClose: () => void;
|
|
6
|
-
dbInfo: any;
|
|
7
|
-
dbType: 'DataTable' | 'DirectDB';
|
|
8
|
-
eventsEmit: (name: string, data: any, appFn?: any) => Promise<any>;
|
|
9
|
-
}
|
|
10
|
-
declare const CreateModal: ({ drawerTitle, drawerVisible, isConnectSuccess, handleDrawerClose, dbInfo, dbType, eventsEmit, }: CreateModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default CreateModal;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { Styles } from '@mxmweb/zui';
|
|
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
|
-
}
|
|
17
|
-
interface DatabaseViewAdopterProps {
|
|
18
|
-
url?: string;
|
|
19
|
-
token?: string;
|
|
20
|
-
role?: string;
|
|
21
|
-
styles?: Styles;
|
|
22
|
-
CustomComponents?: CustomComponents;
|
|
23
|
-
eventsEmit?: (name: string, data: any) => void;
|
|
24
|
-
getBtnDisabled?: (type: OPT_BTN, permission: number) => void;
|
|
25
|
-
}
|
|
26
|
-
declare const DatabaseViewAdopter: React.FC<DatabaseViewAdopterProps>;
|
|
27
|
-
export default DatabaseViewAdopter;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type IDataSourceType = 'DataTable' | 'DirectDB';
|
|
2
|
-
interface DatabaseApiProps {
|
|
3
|
-
url?: string;
|
|
4
|
-
token?: string;
|
|
5
|
-
role?: string;
|
|
6
|
-
eventsEmit?: (name: string, data: any) => void;
|
|
7
|
-
}
|
|
8
|
-
declare const AxiosInstance: ({ url, token, role, eventsEmit }: DatabaseApiProps) => {
|
|
9
|
-
getDatabaseList: (params: any) => Promise<any>;
|
|
10
|
-
getShareDatabaseList: (params: any) => Promise<any>;
|
|
11
|
-
delDatabaseById: (id: string | number, type: IDataSourceType) => Promise<any>;
|
|
12
|
-
saveDatabase: (params: any, type: IDataSourceType) => Promise<any>;
|
|
13
|
-
testConnection: (params: any) => Promise<any>;
|
|
14
|
-
};
|
|
15
|
-
export default AxiosInstance;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
interface UploadDrawerProps {
|
|
2
|
-
drawerTitle: string;
|
|
3
|
-
drawerVisible: boolean;
|
|
4
|
-
handleDrawerClose: () => void;
|
|
5
|
-
modelInfo?: any;
|
|
6
|
-
modelUseTypeOpt: {
|
|
7
|
-
label: string;
|
|
8
|
-
value: string;
|
|
9
|
-
}[];
|
|
10
|
-
modelProtocolsOpt: {
|
|
11
|
-
label: string;
|
|
12
|
-
value: string;
|
|
13
|
-
}[];
|
|
14
|
-
eventsEmit: (name: string, data: any, appFn?: any) => void;
|
|
15
|
-
}
|
|
16
|
-
declare const ConfigDrawer: ({ drawerTitle, drawerVisible, modelInfo, handleDrawerClose, modelUseTypeOpt, modelProtocolsOpt, eventsEmit, }: UploadDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export default ConfigDrawer;
|
|
@@ -1,35 +0,0 @@
|
|
|
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;
|
|
23
|
-
export declare enum OPT_BTN {
|
|
24
|
-
DATE = 0,
|
|
25
|
-
VIEW = 1,
|
|
26
|
-
ERROR = 2,
|
|
27
|
-
AUTHORIZE = 3,
|
|
28
|
-
DELETE = 4,
|
|
29
|
-
ANALYSIS_OR_EXTRACT = 5,
|
|
30
|
-
DOWNLOAD = 6,
|
|
31
|
-
EDIT = 7,
|
|
32
|
-
ADD = 8,
|
|
33
|
-
ANALYSIS_CONFIG = 9,
|
|
34
|
-
AUTHORIZE_CONFIG = 10
|
|
35
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Styles } from '@mxmweb/zui';
|
|
2
|
-
import { CustomComponents } from '../../core/types';
|
|
3
|
-
import { OPT_BTN } from './const';
|
|
4
|
-
interface ModelManageViewProps {
|
|
5
|
-
url?: string;
|
|
6
|
-
token?: string;
|
|
7
|
-
role?: string;
|
|
8
|
-
styles?: Styles;
|
|
9
|
-
CustomComponents?: CustomComponents;
|
|
10
|
-
eventsEmit?: (name: string, data: any) => void;
|
|
11
|
-
getBtnDisabled?: (type: OPT_BTN, permission: number) => boolean;
|
|
12
|
-
}
|
|
13
|
-
export default function ModelManageView(props: ModelManageViewProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
getUseTypeList: () => Promise<any>;
|
|
13
|
-
getModelProtocolsList: () => Promise<any>;
|
|
14
|
-
};
|
|
15
|
-
export default AxiosInstance;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { AppTheme } from '../../theme_guideline';
|
|
3
|
-
/**
|
|
4
|
-
* 敏感词配置业务层组件
|
|
5
|
-
* 使用 DynamicDashDataCore 的 table 功能实现敏感词库管理
|
|
6
|
-
* @param props 组件属性
|
|
7
|
-
*/
|
|
8
|
-
declare const SensitiveView: React.FC<{
|
|
9
|
-
url?: string;
|
|
10
|
-
token?: string;
|
|
11
|
-
role?: string;
|
|
12
|
-
styles?: {
|
|
13
|
-
theme?: AppTheme;
|
|
14
|
-
};
|
|
15
|
-
eventsEmit?: (eventName: string, data: any) => void;
|
|
16
|
-
}>;
|
|
17
|
-
export default SensitiveView;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface SensitiveApiProps {
|
|
2
|
-
url?: string;
|
|
3
|
-
token?: string;
|
|
4
|
-
role?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const AxiosInstance: ({ url, token, role }: SensitiveApiProps) => {
|
|
7
|
-
getLibraryList: (params: any) => Promise<any>;
|
|
8
|
-
createLibrary: (params: any) => Promise<any>;
|
|
9
|
-
deleteLibrary: (id: any) => Promise<any>;
|
|
10
|
-
};
|
|
11
|
-
export default AxiosInstance;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare enum StatusType {
|
|
2
|
-
success = "success",
|
|
3
|
-
error = "error",
|
|
4
|
-
warning = "warning",
|
|
5
|
-
processing = "processing",
|
|
6
|
-
info = "info",
|
|
7
|
-
default = "default"
|
|
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 statusTextMap: Record<string, StatusType>;
|
|
18
|
-
/**
|
|
19
|
-
* 状态转换函数
|
|
20
|
-
* 将业务状态文本转换为StatusType
|
|
21
|
-
* @param statusText 状态文本
|
|
22
|
-
* @returns StatusType
|
|
23
|
-
*/
|
|
24
|
-
export declare function getStatusType(statusText: string): StatusType;
|
|
25
|
-
/**
|
|
26
|
-
* 状态渲染组件
|
|
27
|
-
* @param statusText 状态文本
|
|
28
|
-
* @returns JSX.Element
|
|
29
|
-
*/
|
|
30
|
-
export declare function renderStatus(statusText: string): JSX.Element;
|
|
31
|
-
/**
|
|
32
|
-
* 状态渲染组件(带自定义状态类型)
|
|
33
|
-
* @param statusText 状态文本
|
|
34
|
-
* @param statusType 自定义状态类型
|
|
35
|
-
* @returns JSX.Element
|
|
36
|
-
*/
|
|
37
|
-
export declare function renderStatusWithType(statusText: string, statusType?: StatusType): JSX.Element;
|
package/core/DynamicCards.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { CardConfig, UseDynamicCardsOptions } from './hooks/useDynamicCards';
|
|
3
|
-
export interface DynamicCardsProps {
|
|
4
|
-
cards: CardConfig[];
|
|
5
|
-
options?: UseDynamicCardsOptions;
|
|
6
|
-
styles?: React.CSSProperties;
|
|
7
|
-
minCardWidth?: number;
|
|
8
|
-
minCardHeight?: number;
|
|
9
|
-
rowHeight?: number;
|
|
10
|
-
viewBehavior?: 'pagination' | 'scroll';
|
|
11
|
-
cardType?: string;
|
|
12
|
-
allowMultiSelect?: boolean;
|
|
13
|
-
selectedIds?: string[];
|
|
14
|
-
onSelectChange?: (id: string, checked: boolean) => void;
|
|
15
|
-
onRemoveCard?: (id: string) => void;
|
|
16
|
-
onRemoveCards?: (ids: string[]) => void;
|
|
17
|
-
onCardAnimationComplete?: (id: string | string[]) => void;
|
|
18
|
-
pendingIds?: string[];
|
|
19
|
-
addingIds?: string[];
|
|
20
|
-
onCardAddAnimationComplete?: (id: string) => void;
|
|
21
|
-
viewId?: string;
|
|
22
|
-
total?: number;
|
|
23
|
-
requestPagesize?: number;
|
|
24
|
-
eventsEmit?: (name: string, data: any, appFn?: any) => void;
|
|
25
|
-
viewPageSize?: number;
|
|
26
|
-
}
|
|
27
|
-
declare const DynamicCards: React.FC<DynamicCardsProps>;
|
|
28
|
-
export default DynamicCards;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { DynamicDashView, ViewType, AppFn, AppStatusManager } from './types';
|
|
3
|
-
interface DynamicDashDataCoreRef {
|
|
4
|
-
appFn: AppFn;
|
|
5
|
-
getActiveNode: () => ViewType | null;
|
|
6
|
-
getCurrentData: () => any[];
|
|
7
|
-
setCurrentData: (data: any[]) => void;
|
|
8
|
-
getCurrentStatus: () => AppStatusManager;
|
|
9
|
-
}
|
|
10
|
-
declare const DynamicDashDataCore: React.ForwardRefExoticComponent<Omit<DynamicDashView, "ref"> & React.RefAttributes<DynamicDashDataCoreRef>>;
|
|
11
|
-
export default DynamicDashDataCore;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export declare const DefaultAppLoading: React.FC;
|
|
3
|
-
export declare const DefaultAppError: React.FC;
|
|
4
|
-
export declare const DefaultContainerLoading: React.FC;
|
|
5
|
-
export declare const DefaultContainerError: React.FC;
|
|
6
|
-
export declare const DefaultContentLoading: React.FC;
|
|
7
|
-
export declare const DefaultContentError: React.FC;
|
|
8
|
-
export declare const DefaultEmptyData: React.FC<{
|
|
9
|
-
viewType?: string;
|
|
10
|
-
cardType?: string;
|
|
11
|
-
}>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface DropdownMenuAction {
|
|
3
|
-
key: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
type?: 'divider' | 'action';
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
}
|
|
9
|
-
interface DropdownMenuProps {
|
|
10
|
-
actions: DropdownMenuAction[];
|
|
11
|
-
onAction: (key: string) => void;
|
|
12
|
-
direction?: 'top' | 'bottom';
|
|
13
|
-
styles?: any;
|
|
14
|
-
}
|
|
15
|
-
declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
16
|
-
export default DropdownMenu;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* 统一的分页组件
|
|
4
|
-
* 供DynamicTable和DynamicCards共同使用
|
|
5
|
-
* 支持页码跳转、省略号显示、主题样式等
|
|
6
|
-
*/
|
|
7
|
-
export interface SharedPaginationProps {
|
|
8
|
-
current: number;
|
|
9
|
-
pageSize: number;
|
|
10
|
-
total: number;
|
|
11
|
-
onChange: (page: number) => void;
|
|
12
|
-
showSizeChanger?: boolean;
|
|
13
|
-
pageSizeOptions?: number[];
|
|
14
|
-
onPageSizeChange?: (pageSize: number) => void;
|
|
15
|
-
theme?: {
|
|
16
|
-
colors?: {
|
|
17
|
-
background?: string;
|
|
18
|
-
text?: string;
|
|
19
|
-
border?: string;
|
|
20
|
-
disabledBackground?: string;
|
|
21
|
-
primary?: string;
|
|
22
|
-
};
|
|
23
|
-
space?: {
|
|
24
|
-
radius?: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
size?: 'sm' | 'md';
|
|
28
|
-
showPageInfo?: boolean;
|
|
29
|
-
showPageNumbers?: boolean;
|
|
30
|
-
}
|
|
31
|
-
declare const SharedPagination: React.FC<SharedPaginationProps>;
|
|
32
|
-
export default SharedPagination;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const FuzzySearchInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
-
export declare const SearchInput: React.FC<{
|
|
3
|
-
value: string;
|
|
4
|
-
onChange: (value: string) => void;
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
}>;
|