zy-react-library 1.3.9 → 1.3.10

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.
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicCascaderProps } from "../Basic";
3
3
 
4
- interface Data {
4
+ export interface AreaCascaderItem {
5
5
  value: string;
6
6
  label: string;
7
- children: Data[];
7
+ children: AreaCascaderItem[];
8
8
  }
9
9
 
10
10
  /**
@@ -12,9 +12,9 @@ interface Data {
12
12
  */
13
13
  export interface AreaCascaderProps extends Omit<BasicCascaderProps, "options" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
14
14
  /** 获取父级节点 */
15
- onGetNodePaths?: (nodes: Data[]) => void;
15
+ onGetNodePaths?: (nodes: AreaCascaderItem[]) => void;
16
16
  /** 获取数据 */
17
- onGetData?: (data: Data[], processedData: Data[]) => void;
17
+ onGetData?: (data: AreaCascaderItem[], processedData: AreaCascaderItem[]) => void;
18
18
  }
19
19
 
20
20
  /**
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicCascaderProps } from "../Basic";
3
3
 
4
- interface Data {
4
+ export interface DictionaryCascaderItem {
5
5
  dictValue: string;
6
6
  dictLabel: string;
7
- children: Data[];
7
+ children: DictionaryCascaderItem[];
8
8
  [key: string]: any;
9
9
  }
10
10
 
@@ -21,9 +21,9 @@ export interface DictionaryCascaderProps extends Omit<BasicCascaderProps, "optio
21
21
  /** 树形数据 value 字段,默认 dictValue */
22
22
  idKey?: string;
23
23
  /** 获取父级节点 */
24
- onGetNodePaths?: (nodes: Data[]) => void;
24
+ onGetNodePaths?: (nodes: DictionaryCascaderItem[]) => void;
25
25
  /** 获取数据 */
26
- onGetData?: (data: Data[], processedData: Data[]) => void;
26
+ onGetData?: (data: DictionaryCascaderItem[], processedData: DictionaryCascaderItem[]) => void;
27
27
  }
28
28
 
29
29
  /**
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicCascaderProps } from "../Basic";
3
3
 
4
- interface Data {
4
+ export interface IndustryCascaderItem {
5
5
  dict_value: string;
6
6
  dict_label: string;
7
- childrenList: Data[];
7
+ childrenList: IndustryCascaderItem[];
8
8
  }
9
9
 
10
10
  /**
@@ -12,9 +12,9 @@ interface Data {
12
12
  */
13
13
  export interface IndustryCascaderProps extends Omit<BasicCascaderProps, "options" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
14
14
  /** 获取父级节点 */
15
- onGetNodePaths?: (nodes: Data[]) => void;
15
+ onGetNodePaths?: (nodes: IndustryCascaderItem[]) => void;
16
16
  /** 获取数据 */
17
- onGetData?: (data: Data[], processedData: Data[]) => void;
17
+ onGetData?: (data: IndustryCascaderItem[], processedData: IndustryCascaderItem[]) => void;
18
18
  }
19
19
 
20
20
  /**
@@ -7,7 +7,14 @@ import type { ReactElement, ReactNode } from "react";
7
7
  import type { FORM_ITEM_RENDER_TYPE_MAP } from "../../enum/formItemRender";
8
8
  import type { DeepPartial } from "./FormBuilder";
9
9
 
10
+ /**
11
+ * Form.List name 类型
12
+ */
10
13
  export type FormListOptionName<Values> = [number, NamePath<Values>];
14
+
15
+ /**
16
+ * Form.List 依赖项类型
17
+ */
11
18
  export type FormListOptionDependencies<Values> = Array<(NamePath<Values> | number)[]> | NamePath<Values>;
12
19
 
13
20
  /**
@@ -72,12 +79,12 @@ export interface FormListUniqueProps<Values = any, AllValues = Values> {
72
79
  /**
73
80
  * 条件类型辅助工具
74
81
  */
75
- type WhenTrue<Condition extends boolean, T> = Condition extends true ? never : T;
82
+ export type WhenTrue<Condition extends boolean, T> = Condition extends true ? never : T;
76
83
 
77
84
  /**
78
85
  * 表单配置项属性类型辅助工具
79
86
  */
80
- type FormOptionProperty<IsOnlyForLabel extends boolean, IsCustomizeRender extends boolean, T> = WhenTrue<IsOnlyForLabel, WhenTrue<IsCustomizeRender, T>>;
87
+ export type FormOptionProperty<IsOnlyForLabel extends boolean, IsCustomizeRender extends boolean, T> = WhenTrue<IsOnlyForLabel, WhenTrue<IsCustomizeRender, T>>;
81
88
 
82
89
  /**
83
90
  * 表单配置项公共字段
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicLeftTreeProps } from "../Basic";
3
3
 
4
- interface Data {
4
+ export interface AreaLeftTreeItem {
5
5
  value: string;
6
6
  label: string;
7
- children: Data[];
7
+ children: AreaLeftTreeItem[];
8
8
  [key: string]: any;
9
9
  }
10
10
 
@@ -13,9 +13,9 @@ interface Data {
13
13
  */
14
14
  export interface AreaLeftTreeProps extends Omit<BasicLeftTreeProps, "treeData" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
15
15
  /** 获取父级节点 */
16
- onGetNodePaths?: (nodes: Data[]) => void;
16
+ onGetNodePaths?: (nodes: AreaLeftTreeItem[]) => void;
17
17
  /** 获取数据 */
18
- onGetData?: (data: Data[], processedData: Data[]) => void;
18
+ onGetData?: (data: AreaLeftTreeItem[], processedData: AreaLeftTreeItem[]) => void;
19
19
  }
20
20
 
21
21
  /**
@@ -2,10 +2,10 @@ import type { FC } from "react";
2
2
  import type { DepartmentSelectTreeProps } from "../../../SelectTree/Department/Gwj";
3
3
  import type { BasicLeftTreeProps } from "../../Basic";
4
4
 
5
- interface Data {
5
+ export interface DepartmentLeftTreeItem {
6
6
  id: string;
7
7
  name: string;
8
- childrenList: Data[];
8
+ childrenList: DepartmentLeftTreeItem[];
9
9
  [key: string]: any;
10
10
  }
11
11
 
@@ -18,9 +18,9 @@ export interface DepartmentLeftTreeProps extends Omit<BasicLeftTreeProps, "treeD
18
18
  /** 查询的企业类型 */
19
19
  searchType?: DepartmentSelectTreeProps["searchType"];
20
20
  /** 获取父级节点 */
21
- onGetNodePaths?: (nodes: Data[]) => void;
21
+ onGetNodePaths?: (nodes: DepartmentLeftTreeItem[]) => void;
22
22
  /** 获取数据 */
23
- onGetData?: (data: Data[], processedData: Data[]) => void;
23
+ onGetData?: (data: DepartmentLeftTreeItem[], processedData: DepartmentLeftTreeItem[]) => void;
24
24
  }
25
25
 
26
26
  /**
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicLeftTreeProps } from "../Basic";
3
3
 
4
- interface Data {
4
+ export interface DictionaryLeftTreeItem {
5
5
  dictValue: string;
6
6
  dictLabel: string;
7
- children: Data[];
7
+ children: DictionaryLeftTreeItem[];
8
8
  [key: string]: any;
9
9
  }
10
10
 
@@ -21,9 +21,9 @@ export interface DictionaryLeftTreeProps extends Omit<BasicLeftTreeProps, "treeD
21
21
  /** 树形数据 value 字段,默认 dictValue */
22
22
  idKey?: string;
23
23
  /** 获取父级节点 */
24
- onGetNodePaths?: (nodes: Data[]) => void;
24
+ onGetNodePaths?: (nodes: DictionaryLeftTreeItem[]) => void;
25
25
  /** 获取数据 */
26
- onGetData?: (data: Data[], processedData: Data[]) => void;
26
+ onGetData?: (data: DictionaryLeftTreeItem[], processedData: DictionaryLeftTreeItem[]) => void;
27
27
  }
28
28
 
29
29
  /**
@@ -1,7 +1,7 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicSelectProps } from "../Basic";
3
3
 
4
- interface Data {
4
+ export interface DictionarySelectItem {
5
5
  dictValue: string;
6
6
  dictLabel: string;
7
7
  [key: string]: any;
@@ -20,9 +20,9 @@ export interface DictionarySelectProps extends Omit<BasicSelectProps, "data" | "
20
20
  /** 树形数据 value 字段,默认 dictValue */
21
21
  idKey?: string;
22
22
  /** 获取选中的项 */
23
- onGetOption?: (option: Data | Data[]) => void;
23
+ onGetOption?: (option: DictionarySelectItem | DictionarySelectItem[]) => void;
24
24
  /** 获取数据 */
25
- onGetData?: (data: Data[]) => void;
25
+ onGetData?: (data: DictionarySelectItem[]) => void;
26
26
  }
27
27
 
28
28
  /**
@@ -1,7 +1,7 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicSelectProps } from "../../Basic";
3
3
 
4
- interface Data {
4
+ export interface PersonnelSelectItem {
5
5
  id: string;
6
6
  name: string;
7
7
  corpinfoId: string;
@@ -59,9 +59,9 @@ export interface PersonnelSelectProps extends Omit<BasicSelectProps, "data" | "p
59
59
  /** 额外请求参数 */
60
60
  extraParams?: ExtraParams;
61
61
  /** 获取选中的项 */
62
- onGetOption?: (option: Data | Data[]) => void;
62
+ onGetOption?: (option: PersonnelSelectItem | PersonnelSelectItem[]) => void;
63
63
  /** 获取数据 */
64
- onGetData?: (data: Data[]) => void;
64
+ onGetData?: (data: PersonnelSelectItem[]) => void;
65
65
  }
66
66
 
67
67
  /**
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicSelectTreeProps } from "../Basic";
3
3
 
4
- interface Data {
4
+ export interface AreaSelectTreeItem {
5
5
  value: string;
6
6
  label: string;
7
- children: Data[];
7
+ children: AreaSelectTreeItem[];
8
8
  }
9
9
 
10
10
  /**
@@ -12,9 +12,9 @@ interface Data {
12
12
  */
13
13
  export interface AreaSelectTreeProps extends Omit<BasicSelectTreeProps, "treeData" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
14
14
  /** 获取父级节点 */
15
- onGetNodePaths?: (nodes: Data[]) => void;
15
+ onGetNodePaths?: (nodes: AreaSelectTreeItem[]) => void;
16
16
  /** 获取数据 */
17
- onGetData?: (data: Data[], processedData: Data[]) => void;
17
+ onGetData?: (data: AreaSelectTreeItem[], processedData: AreaSelectTreeItem[]) => void;
18
18
  }
19
19
 
20
20
  /**
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicSelectTreeProps } from "../../Basic";
3
3
 
4
- interface Data {
4
+ export interface DepartmentSelectTreeItem {
5
5
  id: string;
6
6
  name: string;
7
- childrenList: Data[];
7
+ childrenList: DepartmentSelectTreeItem[];
8
8
  [key: string]: any;
9
9
  }
10
10
 
@@ -47,9 +47,9 @@ export interface DepartmentSelectTreeProps extends Omit<BasicSelectTreeProps, "t
47
47
  /** 查询的企业类型,默认current,current 接收 eqCorpinfoId 或者 eqParentId,all 不接受任何参数,inType 接收 inType 或者 enterpriseType */
48
48
  searchType?: "current" | "all" | "inType";
49
49
  /** 获取父级节点 */
50
- onGetNodePaths?: (nodes: Data[]) => void;
50
+ onGetNodePaths?: (nodes: DepartmentSelectTreeItem[]) => void;
51
51
  /** 获取数据 */
52
- onGetData?: (data: Data[], processedData: Data[]) => void;
52
+ onGetData?: (data: DepartmentSelectTreeItem[], processedData: DepartmentSelectTreeItem[]) => void;
53
53
  }
54
54
 
55
55
  /**
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicSelectTreeProps } from "../Basic";
3
3
 
4
- interface Data {
4
+ export interface DictionarySelectTreeItem {
5
5
  dictValue: string;
6
6
  dictLabel: string;
7
- children: Data[];
7
+ children: DictionarySelectTreeItem[];
8
8
  [key: string]: any;
9
9
  }
10
10
 
@@ -21,9 +21,9 @@ export interface DictionarySelectTreeProps extends Omit<BasicSelectTreeProps, "t
21
21
  /** 树形数据 value 字段,默认 dictValue */
22
22
  idKey?: string;
23
23
  /** 获取父级节点 */
24
- onGetNodePaths?: (nodes: Data[]) => void;
24
+ onGetNodePaths?: (nodes: DictionarySelectTreeItem[]) => void;
25
25
  /** 获取数据 */
26
- onGetData?: (data: Data[], processedData: Data[]) => void;
26
+ onGetData?: (data: DictionarySelectTreeItem[], processedData: DictionarySelectTreeItem[]) => void;
27
27
  }
28
28
 
29
29
  /**
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicSelectTreeProps } from "../../Basic";
3
3
 
4
- interface Data {
4
+ export interface HiddenLevelSelectTreeItem {
5
5
  dictValue: string;
6
6
  dictLabel: string;
7
- children: Data[];
7
+ children: HiddenLevelSelectTreeItem[];
8
8
  [key: string]: any;
9
9
  }
10
10
 
@@ -19,9 +19,9 @@ export interface HiddenLevelSelectTreeProps extends Omit<BasicSelectTreeProps, "
19
19
  /** 是否显示重大隐患,默认 true */
20
20
  isShowMajor?: boolean;
21
21
  /** 获取父级节点 */
22
- onGetNodePaths?: (nodes: Data[]) => void;
22
+ onGetNodePaths?: (nodes: HiddenLevelSelectTreeItem[]) => void;
23
23
  /** 获取数据 */
24
- onGetData?: (data: Data[], processedData: Data[]) => void;
24
+ onGetData?: (data: HiddenLevelSelectTreeItem[], processedData: HiddenLevelSelectTreeItem[]) => void;
25
25
  }
26
26
 
27
27
  /**
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicSelectTreeProps } from "../../Basic";
3
3
 
4
- interface Data {
4
+ export interface HiddenPartSelectTreeItem {
5
5
  hiddenregionId: string;
6
6
  hiddenregion: string;
7
- children: Data[];
7
+ children: HiddenPartSelectTreeItem[];
8
8
  [key: string]: any;
9
9
  }
10
10
 
@@ -25,9 +25,9 @@ export interface HiddenPartSelectTreeProps extends Omit<BasicSelectTreeProps, "t
25
25
  /** 是否需要企业id,默认 false */
26
26
  isNeedCorpInfoId?: boolean;
27
27
  /** 获取父级节点 */
28
- onGetNodePaths?: (nodes: Data[]) => void;
28
+ onGetNodePaths?: (nodes: HiddenPartSelectTreeItem[]) => void;
29
29
  /** 获取数据 */
30
- onGetData?: (data: Data[], processedData: Data[]) => void;
30
+ onGetData?: (data: HiddenPartSelectTreeItem[], processedData: HiddenPartSelectTreeItem[]) => void;
31
31
  }
32
32
 
33
33
  /**
@@ -1,10 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import type { BasicSelectTreeProps } from "../Basic";
3
3
 
4
- interface Data {
4
+ export interface IndustrySelectTreeItem {
5
5
  dict_value: string;
6
6
  dict_label: string;
7
- childrenList: Data[];
7
+ childrenList: IndustrySelectTreeItem[];
8
8
  }
9
9
 
10
10
  /**
@@ -12,9 +12,9 @@ interface Data {
12
12
  */
13
13
  export interface IndustrySelectTreeProps extends Omit<BasicSelectTreeProps, "treeData" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
14
14
  /** 获取父级节点 */
15
- onGetNodePaths?: (nodes: Data[]) => void;
15
+ onGetNodePaths?: (nodes: IndustrySelectTreeItem[]) => void;
16
16
  /** 获取数据 */
17
- onGetData?: (data: Data[], processedData: Data[]) => void;
17
+ onGetData?: (data: IndustrySelectTreeItem[], processedData: IndustrySelectTreeItem[]) => void;
18
18
  }
19
19
 
20
20
  /**
@@ -1,4 +1,4 @@
1
- export interface FileItem {
1
+ export interface GetFileItem {
2
2
  /** 文件路径 */
3
3
  filePath: string;
4
4
  /** 文件名称 */
@@ -33,9 +33,9 @@ export interface MultipleGetFileOptions extends BaseParams {
33
33
  dataSource: Record<string, any>[];
34
34
  }
35
35
 
36
- export type SingleFileResponse = FileItem[];
36
+ export type SingleFileResponse = GetFileItem[];
37
37
 
38
- export type MultipleFileResponse = Array<Record<string, any> & { files: FileItem[] }>;
38
+ export type MultipleFileResponse = Array<Record<string, any> & { files: GetFileItem[] }>;
39
39
 
40
40
  export interface GetFileFunction {
41
41
  (options: SingleGetFileOptions): Promise<SingleFileResponse>;
@@ -1,4 +1,4 @@
1
- interface Data {
1
+ interface UserInfoData {
2
2
  corpinfoId: string;
3
3
  corpinfoName: string;
4
4
  departmentId: string;
@@ -12,7 +12,7 @@ interface Data {
12
12
  [key: string]: any;
13
13
  }
14
14
 
15
- export type getUserInfoFunction = () => Promise<Data>;
15
+ export type getUserInfoFunction = () => Promise<UserInfoData>;
16
16
 
17
17
  /**
18
18
  * 获取用户信息
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.3.9",
4
+ "version": "1.3.10",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",