@regenbio/regenbio-components-react 1.2.11 → 1.2.12
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/build/components/DragTable/index.d.ts +9 -0
- package/build/components/DragTable/type.d.ts +22 -0
- package/build/components/UserSelector/index.d.ts +8 -0
- package/build/components/UserSelector/locales/en-US.d.ts +5 -0
- package/build/components/UserSelector/locales/zh-CN.d.ts +5 -0
- package/build/components/UserSelector/type.d.ts +60 -0
- package/build/index.d.ts +14 -5
- package/build/index.js +13 -2
- package/build/locales/en-US.d.ts +2 -0
- package/build/locales/zh-CN.d.ts +2 -0
- package/package.json +1 -1
- package/build/components/PageContainer/index.d.ts +0 -10
- package/build/components/PageContainer/type.d.ts +0 -16
- /package/build/{components/DataTable/constant.d.ts → services/constants/dbConstant.d.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ProTableProps } from "@ant-design/pro-table";
|
|
2
|
+
import { Ref } from "react";
|
|
3
|
+
import { RbActionType } from "../DataTable/type";
|
|
4
|
+
/**
|
|
5
|
+
* 拖动表格属性
|
|
6
|
+
*/
|
|
7
|
+
export type RbDragTableProps<DataSource, U, ValueType = 'text'> = {
|
|
8
|
+
/**
|
|
9
|
+
* Table action 的引用,便于自定义触发
|
|
10
|
+
*/
|
|
11
|
+
actionRef?: Ref<RbActionType | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* 响应式状态
|
|
14
|
+
*/
|
|
15
|
+
responsive?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 等待状态改变监听
|
|
18
|
+
*
|
|
19
|
+
* @param loading 等待状态
|
|
20
|
+
*/
|
|
21
|
+
loadChange?: (loading: boolean) => void;
|
|
22
|
+
} & ProTableProps<DataSource, U, ValueType>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BaseOptionType } from 'antd/lib/cascader';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { RbUserSelectorProps } from "./type";
|
|
4
|
+
declare const ProFormSearchSelect: <T, OptionType extends BaseOptionType = any>(props: RbUserSelectorProps<T, OptionType>) => React.ReactElement;
|
|
5
|
+
declare const RbUserSelector: (<T, OptionType extends BaseOptionType = any>(props: RbUserSelectorProps<T, OptionType>) => React.ReactElement) & {
|
|
6
|
+
SearchSelect: typeof ProFormSearchSelect;
|
|
7
|
+
};
|
|
8
|
+
export default RbUserSelector;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BaseOptionType } from "antd/lib/cascader";
|
|
3
|
+
import { ProFormFieldItemProps, ProFormFieldRemoteProps } from "@ant-design/pro-form/es/typing";
|
|
4
|
+
import type { SelectProps } from "antd";
|
|
5
|
+
import type { RefSelectProps } from "antd/lib/select";
|
|
6
|
+
/**
|
|
7
|
+
* 用户选择器属性
|
|
8
|
+
*/
|
|
9
|
+
export type RbUserSelectorProps<ValueType = any, OptionType extends BaseOptionType = any> = ProFormFieldItemProps<SelectProps<ValueType, OptionType> & {
|
|
10
|
+
/**
|
|
11
|
+
* 是否在输入框聚焦时触发搜索
|
|
12
|
+
*
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
searchOnFocus?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 选择完一个之后是否清空搜索项重新搜索
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
resetAfterSelect?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 当搜索关键词发生变化时是否请求远程数据
|
|
24
|
+
*
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
fetchDataOnSearch?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 自定义选项渲染
|
|
30
|
+
*/
|
|
31
|
+
optionItemRender?: (item: ValueType) => React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* 宽度控制
|
|
34
|
+
*/
|
|
35
|
+
widthControl?: boolean;
|
|
36
|
+
}, RefSelectProps> & {
|
|
37
|
+
options?: SelectProps<ValueType, OptionType>['options'] | string[];
|
|
38
|
+
mode?: SelectProps<ValueType, OptionType>['mode'] | 'single';
|
|
39
|
+
showSearch?: SelectProps<ValueType, OptionType>['showSearch'];
|
|
40
|
+
readonly?: boolean;
|
|
41
|
+
onChange?: SelectProps<ValueType, OptionType>['onChange'];
|
|
42
|
+
widthControl?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 请求远程方法
|
|
45
|
+
*
|
|
46
|
+
* @param param 参数
|
|
47
|
+
* @param guidList 已选中的用户主键ID列表
|
|
48
|
+
*/
|
|
49
|
+
request: (param: string, guidList: string[]) => Promise<any>;
|
|
50
|
+
/**
|
|
51
|
+
* 头像预览方法
|
|
52
|
+
*
|
|
53
|
+
* @param guid 图片主键ID
|
|
54
|
+
*/
|
|
55
|
+
avatarPreview: (guid: any) => null | string;
|
|
56
|
+
/**
|
|
57
|
+
* 国际化
|
|
58
|
+
*/
|
|
59
|
+
intl: any;
|
|
60
|
+
} & ProFormFieldRemoteProps;
|
package/build/index.d.ts
CHANGED
|
@@ -15,8 +15,10 @@ import RbIconRender from "./components/IconRender";
|
|
|
15
15
|
import { RbIconRenderProps } from "./components/IconRender/type";
|
|
16
16
|
import RbHtmlRender from "./components/HtmlRender";
|
|
17
17
|
import { RbHtmlRenderProps } from "./components/HtmlRender/type";
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
18
|
+
import RbDragTable from "./components/DragTable";
|
|
19
|
+
import { RbDragTableProps } from "./components/DragTable/type";
|
|
20
|
+
import RbUserSelector from "./components/UserSelector";
|
|
21
|
+
import { RbUserSelectorProps } from "./components/UserSelector/type";
|
|
20
22
|
import DbUtil from "./services/utils/dbUtil";
|
|
21
23
|
import ObjectUtil from "./services/utils/objectUtil";
|
|
22
24
|
import EventUtil from "./services/utils/eventUtil";
|
|
@@ -27,6 +29,7 @@ import EventEnum from "./services/enums/eventEnum";
|
|
|
27
29
|
import StorageEnum from "./services/enums/storageEnum";
|
|
28
30
|
import CommonConstant from "./services/constants/commonConstant";
|
|
29
31
|
import IconConstant from "./services/constants/iconConstant";
|
|
32
|
+
import DbConstant from "./services/constants/dbConstant";
|
|
30
33
|
import { RespDTO, ConstantListItem } from "./services/types/commonType";
|
|
31
34
|
import zhCN from "./locales/zh-CN";
|
|
32
35
|
import enUS from "./locales/en-US";
|
|
@@ -47,11 +50,13 @@ export { RbIconRender };
|
|
|
47
50
|
export type { RbIconRenderProps };
|
|
48
51
|
export { RbHtmlRender };
|
|
49
52
|
export type { RbHtmlRenderProps };
|
|
50
|
-
export {
|
|
51
|
-
export type {
|
|
53
|
+
export { RbDragTable };
|
|
54
|
+
export type { RbDragTableProps };
|
|
55
|
+
export { RbUserSelector };
|
|
56
|
+
export type { RbUserSelectorProps };
|
|
52
57
|
export { DbUtil, ObjectUtil, EventUtil, StorageUtil, ResourceUtil, RenderUtil };
|
|
53
58
|
export { EventEnum, StorageEnum };
|
|
54
|
-
export { CommonConstant, IconConstant };
|
|
59
|
+
export { CommonConstant, IconConstant, DbConstant };
|
|
55
60
|
export { RespDTO, ConstantListItem };
|
|
56
61
|
export { zhCN, enUS };
|
|
57
62
|
declare const _default: {
|
|
@@ -65,5 +70,9 @@ declare const _default: {
|
|
|
65
70
|
RbUserCard: React.FC<RbUserCardProps>;
|
|
66
71
|
RbIconRender: React.FC<RbIconRenderProps>;
|
|
67
72
|
RbHtmlRender: React.FC<RbHtmlRenderProps>;
|
|
73
|
+
RbDragTable: <DataSource, U, ValueType = "text">(props: RbDragTableProps<DataSource, U, ValueType>) => any;
|
|
74
|
+
RbUserSelector: (<T, OptionType extends import("rc-cascader").BaseOptionType = any>(props: RbUserSelectorProps<T, OptionType>) => React.ReactElement) & {
|
|
75
|
+
SearchSelect: <T, OptionType extends import("rc-cascader").BaseOptionType = any>(props: RbUserSelectorProps<T, OptionType>) => React.ReactElement;
|
|
76
|
+
};
|
|
68
77
|
};
|
|
69
78
|
export default _default;
|