@mxmweb/xviewer 1.0.12 → 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/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.12",
8
+ "version": "1.0.16",
9
9
  "author": "hanfeng_Zhang",
10
10
  "type": "module",
11
11
  "scripts": {
@@ -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?: string;
11
- tableName?: string;
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: ({ dbType, id, dbId, name, }: {
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;
@@ -20,3 +20,16 @@ export declare const statusArr: {
20
20
  status: number;
21
21
  }[];
22
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,5 +1,6 @@
1
1
  import { Styles } from '@mxmweb/zui';
2
2
  import { CustomComponents } from '../../core/types';
3
+ import { OPT_BTN } from './const';
3
4
  interface ModelManageViewProps {
4
5
  url?: string;
5
6
  token?: string;
@@ -7,6 +8,7 @@ interface ModelManageViewProps {
7
8
  styles?: Styles;
8
9
  CustomComponents?: CustomComponents;
9
10
  eventsEmit?: (name: string, data: any) => void;
11
+ getBtnDisabled?: (type: OPT_BTN, permission: number) => boolean;
10
12
  }
11
13
  export default function ModelManageView(props: ModelManageViewProps): import("react/jsx-runtime").JSX.Element;
12
14
  export {};
@@ -13,6 +13,7 @@ export interface DynamicTableColumn {
13
13
  id: string;
14
14
  title: string;
15
15
  type: string;
16
+ helpText?: string;
16
17
  [key: string]: any;
17
18
  }
18
19
  export interface DynamicTableCell {
@@ -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?: {
@@ -3,6 +3,7 @@ export interface TableColumnConfig {
3
3
  id: string;
4
4
  title: string;
5
5
  type: string;
6
+ helpText?: string;
6
7
  [key: string]: any;
7
8
  }
8
9
  export interface TableCellConfig {