@flatbiz/antd 4.0.22 → 4.0.24
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/cjs/index.css +16 -0
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +59 -42
- package/package.json +5 -4
package/index.d.ts
CHANGED
|
@@ -280,7 +280,7 @@ export type DateRangePickerWrapperFormItemProps = Omit<FormItemProps, "name"> &
|
|
|
280
280
|
* 如果 DateRangePickerWrapperFormItem 在Form.List场景下 必传
|
|
281
281
|
*/
|
|
282
282
|
formListName?: FormItemNamePath;
|
|
283
|
-
dateRangePickerWrapperProps?:
|
|
283
|
+
dateRangePickerWrapperProps?: DateRangePickerWrapperProps;
|
|
284
284
|
};
|
|
285
285
|
/**
|
|
286
286
|
* 包含了Form.Item组件的时间区间选择组件
|
|
@@ -733,8 +733,8 @@ export type SelectorServiceConfig = {
|
|
|
733
733
|
*/
|
|
734
734
|
onRequestResultAdapter?: (respData: TAny) => TPlainObject[];
|
|
735
735
|
};
|
|
736
|
-
export type SelectorWrapperProps = Omit<SelectProps, "
|
|
737
|
-
/** 不支持 tags 模式,tags模式请使用
|
|
736
|
+
export type SelectorWrapperProps = Omit<SelectProps, "onSearch" | "notFoundContent" | "options" | "fieldNames" | "onChange" | "value" | "loading" | "mode"> & {
|
|
737
|
+
/** 不支持 tags 模式,tags模式请使用 SelectorWrapperSimple 组件 */
|
|
738
738
|
mode?: "multiple";
|
|
739
739
|
modelKey: string;
|
|
740
740
|
fieldNames?: {
|
|
@@ -755,10 +755,10 @@ export type SelectorWrapperProps = Omit<SelectProps, "filterOption" | "onSearch"
|
|
|
755
755
|
*/
|
|
756
756
|
selectorList?: TPlainObject[];
|
|
757
757
|
/**
|
|
758
|
-
*
|
|
758
|
+
* select 数据源发生变更时触发,第一次不调用
|
|
759
759
|
*/
|
|
760
760
|
onSelectorListChange?: (dataList: TPlainObject[]) => void;
|
|
761
|
-
/**
|
|
761
|
+
/** select 数据源发生变更时触发,每次都会调用 */
|
|
762
762
|
onSelectorListAllChange?: (dataList: TPlainObject[]) => void;
|
|
763
763
|
/**
|
|
764
764
|
* 通过服务获取数据异常回调
|
|
@@ -772,55 +772,27 @@ export type SelectorWrapperProps = Omit<SelectProps, "filterOption" | "onSearch"
|
|
|
772
772
|
* ```
|
|
773
773
|
*/
|
|
774
774
|
showAllOption?: true | TPlainObject<string | number>;
|
|
775
|
-
/**
|
|
776
|
-
* 输入操作类型,默认值:filter
|
|
777
|
-
* ```
|
|
778
|
-
* 1. search:根据输入项去服务端查询,如设置selectorList配置失效
|
|
779
|
-
* 2. filter:初始化已查询数据,根据输入内容筛选
|
|
780
|
-
* ```
|
|
781
|
-
*/
|
|
782
|
-
operateType?: "search" | "filter";
|
|
783
|
-
searchFieldName?: string;
|
|
784
|
-
/**
|
|
785
|
-
* search模式下,回填value查询接口字段名称,默认值:searchId
|
|
786
|
-
* ```
|
|
787
|
-
* search模式下,外部传递 value 数据用于回填Select,会在查询接口中默认添加searchId字段(searchId的值为回填的value,类型有:string | number | Array<string | number>)
|
|
788
|
-
* ```
|
|
789
|
-
*/
|
|
790
|
-
searchIdFieldName?: string;
|
|
791
775
|
onLabelRenderAdapter?: (dataItem: TPlainObject) => string | ReactElement;
|
|
792
776
|
onChange?: (value?: SelectorWrapperValue, selectedList?: TPlainObject[] | TPlainObject) => void;
|
|
793
777
|
showIcon?: boolean;
|
|
794
|
-
|
|
778
|
+
/** select option添加图标;与showIcon组合使用 */
|
|
779
|
+
icon?: (data: TPlainObject, index: number) => ReactElement;
|
|
795
780
|
requestMessageConfig?: RequestStatusRenderProps["messageConfig"];
|
|
796
781
|
/**
|
|
797
782
|
* value格式
|
|
798
783
|
*```
|
|
799
784
|
* 1. string 、number
|
|
800
785
|
* 2. Array<string | number>
|
|
801
|
-
* 3. lableInValue = true,根据
|
|
802
|
-
* 4. lableInValue = true,Array<
|
|
786
|
+
* 3. lableInValue = true,根据fieldNames配置格式
|
|
787
|
+
* 4. lableInValue = true,Array<fieldNames配置>
|
|
803
788
|
* ```
|
|
804
789
|
*/
|
|
805
790
|
value?: SelectorWrapperValue;
|
|
806
|
-
/**
|
|
807
|
-
* ```
|
|
808
|
-
* lableInValue = true,onChange输出数据字段名称,默认:{ label: string; value: string|number }
|
|
809
|
-
* ```
|
|
810
|
-
*/
|
|
811
|
-
labelInValueFieldNames?: {
|
|
812
|
-
label: string;
|
|
813
|
-
value: string;
|
|
814
|
-
};
|
|
815
791
|
};
|
|
816
792
|
/**
|
|
817
793
|
* 选择器包装组件
|
|
818
|
-
* @param props
|
|
819
|
-
* @returns
|
|
820
794
|
* ```
|
|
821
|
-
* 1.
|
|
822
|
-
* 2. 设置 labelInValue 后,onChange 返回数据item:labelInValueFieldNames配置格式
|
|
823
|
-
* 2. operateType=search状态下,外部传递 selectorValueList 回填数据查询接口时,会在接口中默认添加searchId字段(searchId的值为回填的selectorValueList,类型有:string | number | Array<string | number>)
|
|
795
|
+
* 1. 不支持搜索 + 调用服务模式
|
|
824
796
|
* ```
|
|
825
797
|
*/
|
|
826
798
|
export declare const SelectorWrapper: (props: SelectorWrapperProps) => JSX.Element;
|
|
@@ -1113,6 +1085,10 @@ export declare const FormItemGroup: {
|
|
|
1113
1085
|
};
|
|
1114
1086
|
export interface FormItemWrapperProps extends FormItemProps {
|
|
1115
1087
|
wrapper?: (children: ReactNode) => ReactElement;
|
|
1088
|
+
/** 设置wrapper后,before、after失效 */
|
|
1089
|
+
before?: ReactNode;
|
|
1090
|
+
/** 设置wrapper后,before、after失效 */
|
|
1091
|
+
after?: ReactNode;
|
|
1116
1092
|
}
|
|
1117
1093
|
/**
|
|
1118
1094
|
* 对 Form.Item 的 children 增加 before、after
|
|
@@ -1220,7 +1196,7 @@ export interface LocalLoadingProps {
|
|
|
1220
1196
|
/** 接口数据配置 */
|
|
1221
1197
|
serviceConfig: LocalLoadingServiceConfig;
|
|
1222
1198
|
/** children 为函数,参数【respData】为接口返回数据 */
|
|
1223
|
-
children
|
|
1199
|
+
children: (respData?: TAny) => ReactElement;
|
|
1224
1200
|
/**
|
|
1225
1201
|
* 是否异步,默认:false
|
|
1226
1202
|
* ```
|
|
@@ -1229,8 +1205,6 @@ export interface LocalLoadingProps {
|
|
|
1229
1205
|
* ```
|
|
1230
1206
|
*/
|
|
1231
1207
|
isAsync?: boolean;
|
|
1232
|
-
/** 最小高度 */
|
|
1233
|
-
minHeight?: number;
|
|
1234
1208
|
/** 自定义异常渲染处理 */
|
|
1235
1209
|
errorRender?: (error?: TAny) => ReactElement;
|
|
1236
1210
|
}
|
|
@@ -1491,6 +1465,49 @@ export type RuleDescribeProps = {
|
|
|
1491
1465
|
ruleItemDescStyle?: CSSProperties;
|
|
1492
1466
|
};
|
|
1493
1467
|
export declare const RuleDescribe: (props: RuleDescribeProps) => JSX.Element;
|
|
1468
|
+
export type SelectorWrapperSearchServiceConfig = {
|
|
1469
|
+
params?: TPlainObject;
|
|
1470
|
+
onRequest: (params?: TAny) => TAny;
|
|
1471
|
+
onRequestResultAdapter?: (respData: TAny) => TPlainObject[];
|
|
1472
|
+
};
|
|
1473
|
+
export type SelectorWrapperSearchProps = Omit<SelectProps, "onSearch" | "notFoundContent" | "options" | "fieldNames" | "loading"> & {
|
|
1474
|
+
fieldNames?: {
|
|
1475
|
+
label: string;
|
|
1476
|
+
value: string;
|
|
1477
|
+
disabled?: string;
|
|
1478
|
+
searchKeyword?: string;
|
|
1479
|
+
};
|
|
1480
|
+
/**
|
|
1481
|
+
* 请求服务需求的数据
|
|
1482
|
+
*/
|
|
1483
|
+
serviceConfig: SelectorWrapperSearchServiceConfig;
|
|
1484
|
+
/**
|
|
1485
|
+
* 添加全部选项
|
|
1486
|
+
* ```
|
|
1487
|
+
* 1. 默认值label="全部",value=""
|
|
1488
|
+
* 2. 可配置label、value
|
|
1489
|
+
* ```
|
|
1490
|
+
*/
|
|
1491
|
+
showAllOption?: true | TPlainObject<string | number>;
|
|
1492
|
+
/** selectorList发生变更时触发,每次都会调用 */
|
|
1493
|
+
onSelectorListChange?: (dataList: TPlainObject[]) => void;
|
|
1494
|
+
/**
|
|
1495
|
+
* 通过服务获取数据异常回调
|
|
1496
|
+
*/
|
|
1497
|
+
onSelectorRequestError?: (error: Error) => void;
|
|
1498
|
+
requestMessageConfig?: RequestStatusRenderProps["messageConfig"];
|
|
1499
|
+
};
|
|
1500
|
+
/**
|
|
1501
|
+
* 选择器简单包装组件
|
|
1502
|
+
* @param props
|
|
1503
|
+
* @returns
|
|
1504
|
+
* ```
|
|
1505
|
+
* 1. 只支持 search + 服务 功能
|
|
1506
|
+
* 2. 不会缓存接口数据
|
|
1507
|
+
* 3. 不会对value、onChange做任何处理
|
|
1508
|
+
* ```
|
|
1509
|
+
*/
|
|
1510
|
+
export declare const SelectorWrapperSearch: (props: SelectorWrapperSearchProps) => JSX.Element;
|
|
1494
1511
|
export type SelectorWrapperSimpleServiceConfig = {
|
|
1495
1512
|
params?: TPlainObject;
|
|
1496
1513
|
onRequest: (params?: TAny) => TAny;
|
|
@@ -2081,7 +2098,7 @@ export type TreeWrapperRefApi = {
|
|
|
2081
2098
|
* 5. 设置loadDataFlag=true,会动态获取children,当treeNode中包含isLeaf=true字段,表示为叶子节点,没有children了
|
|
2082
2099
|
* ```
|
|
2083
2100
|
*/
|
|
2084
|
-
export declare const TreeWrapper: import("react").ForwardRefExoticComponent<Omit<TreeProps<import("antd").TreeDataNode>, "multiple" | "icon" | "onSelect" | "
|
|
2101
|
+
export declare const TreeWrapper: import("react").ForwardRefExoticComponent<Omit<TreeProps<import("antd").TreeDataNode>, "multiple" | "icon" | "onSelect" | "onExpand" | "checkedKeys" | "fieldNames" | "defaultSelectedKeys" | "selectedKeys" | "loadData" | "expandedKeys" | "treeData" | "defaultCheckedKeys" | "onCheck"> & {
|
|
2085
2102
|
modelKey: string;
|
|
2086
2103
|
/**
|
|
2087
2104
|
* useEffect依赖项数组,用于重新发起获取接口数据
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.24",
|
|
4
4
|
"description": "flat-biz oss ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@dimjs/utils": ">=1.2.23",
|
|
34
34
|
"@flatbiz/utils": ">=4.0.2",
|
|
35
35
|
"@wove/react": ">=1.2.22",
|
|
36
|
-
"antd": ">=5.1.
|
|
36
|
+
"antd": ">=5.1.3",
|
|
37
37
|
"dayjs": ">=1.11.7",
|
|
38
38
|
"react": ">=18.2.0",
|
|
39
39
|
"react-dom": ">=18.2.0"
|
|
@@ -46,11 +46,12 @@
|
|
|
46
46
|
"@dimjs/utils": "^1.2.23",
|
|
47
47
|
"@flatbiz/utils": "^4.0.2",
|
|
48
48
|
"@wove/react": "^1.2.22",
|
|
49
|
-
"antd": "^5.1.
|
|
49
|
+
"antd": "^5.1.3",
|
|
50
50
|
"dayjs": "1.11.7",
|
|
51
51
|
"dequal": "^2.0.3",
|
|
52
52
|
"react": "18.2.0",
|
|
53
|
-
"react-dom": "18.2.0"
|
|
53
|
+
"react-dom": "18.2.0",
|
|
54
|
+
"pubsub-js": "^1.9.4"
|
|
54
55
|
},
|
|
55
56
|
"dependencies": {
|
|
56
57
|
"dequal": "^2.0.3"
|