@mxmweb/xviewer 1.0.1 → 1.0.5

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/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.0.1",
8
+ "version": "1.0.5",
9
9
  "author": "hanfeng_Zhang",
10
10
  "type": "module",
11
11
  "scripts": {
@@ -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
- id: string;
8
+ fileId: string;
8
9
  tableId: string;
9
10
  dbId?: string;
10
- tableName: string;
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, id, role, dbType, dbId, tableId, tableName, eventsEmit, }: DatabaseTableViewProps): import("react/jsx-runtime").JSX.Element;
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 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ interface ModelManageViewProps {
2
+ url?: string;
3
+ token?: string;
4
+ role?: string;
5
+ eventsEmit?: (name: string, data: any) => void;
6
+ }
7
+ export default function ModelManageView({}: ModelManageViewProps): void;
8
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -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/main.d.ts CHANGED
@@ -0,0 +1 @@
1
+ export {};