@flatbiz/antd 3.1.0 → 3.1.2
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 +13 -12
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +105 -1
- package/package.json +3 -4
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="scheduler" />
|
|
3
3
|
|
|
4
4
|
import { API, ModelType } from '@dimjs/model';
|
|
5
|
-
import { ButtonProps, CascaderProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, InputNumberProps, InputProps, ModalProps, PopconfirmProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, TableProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
|
|
5
|
+
import { ButtonProps, CascaderProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, InputNumberProps, InputProps, ModalProps, PopconfirmProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, SwitchProps, TableProps, TimePickerProps, TimeRangePickerProps, TooltipProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
|
|
6
6
|
import { CheckboxGroupProps } from 'antd/lib/checkbox';
|
|
7
7
|
import { ConfigProviderProps } from 'antd/lib/config-provider';
|
|
8
8
|
import { PickerDateProps, RangePickerDateProps } from 'antd/lib/date-picker/generatePicker';
|
|
@@ -937,6 +937,8 @@ export declare type FormItemHorizontalUnionProps = {
|
|
|
937
937
|
}[];
|
|
938
938
|
gap?: number;
|
|
939
939
|
flexLayoutStyle?: CSSProperties;
|
|
940
|
+
hidden?: boolean;
|
|
941
|
+
required?: boolean;
|
|
940
942
|
};
|
|
941
943
|
export declare type FormItemCardProps = {
|
|
942
944
|
title?: string | ReactElement;
|
|
@@ -978,6 +980,7 @@ export declare type IconWrapperProps = {
|
|
|
978
980
|
className?: string;
|
|
979
981
|
size?: "small" | "middle" | "large";
|
|
980
982
|
onClick?: (event: any) => void;
|
|
983
|
+
hideHoverBgColor?: boolean;
|
|
981
984
|
};
|
|
982
985
|
export declare const IconWrapper: (props: IconWrapperProps) => JSX.Element;
|
|
983
986
|
export declare type InputWrapperProps = Omit<InputProps, "defaultValue">;
|
|
@@ -1289,6 +1292,29 @@ export interface SmsCountDownProps {
|
|
|
1289
1292
|
className?: string;
|
|
1290
1293
|
}
|
|
1291
1294
|
export declare const SmsCountDown: FC<SmsCountDownProps>;
|
|
1295
|
+
export declare type SwitchWrapperValue = string | number | boolean;
|
|
1296
|
+
export declare type SwitchWrapperProps = Omit<SwitchProps, "checked" | "defaultChecked" | "onChange"> & {
|
|
1297
|
+
value?: SwitchWrapperValue;
|
|
1298
|
+
checkedValue: SwitchWrapperValue;
|
|
1299
|
+
unCheckedValue: SwitchWrapperValue;
|
|
1300
|
+
onChange?: (value: SwitchWrapperValue) => void;
|
|
1301
|
+
tooltipProps?: Omit<TooltipProps, "title">;
|
|
1302
|
+
tooltipTitle?: string | ((value?: SwitchWrapperValue) => string | undefined);
|
|
1303
|
+
};
|
|
1304
|
+
/**
|
|
1305
|
+
* 解决Switch 和 Form.Item 使用只能接收boolean的限制
|
|
1306
|
+
* ```
|
|
1307
|
+
* 1. value 为状态值,不局限于boolean,可以为 [string | number | boolean]
|
|
1308
|
+
* 2. checkedValue 选中值
|
|
1309
|
+
* 3. unCheckedValue 未选中值
|
|
1310
|
+
* 4. 与 Form.Item 组合使用最佳
|
|
1311
|
+
* <Form.Item name="fieldName" >
|
|
1312
|
+
* <SwitchWrapper checkedValue={2} unCheckedValue={1} />
|
|
1313
|
+
* </Form.Item>
|
|
1314
|
+
* 5. 可设置tooltip效果数据显示
|
|
1315
|
+
* ```
|
|
1316
|
+
*/
|
|
1317
|
+
export declare const SwitchWrapper: (props: SwitchWrapperProps) => JSX.Element;
|
|
1292
1318
|
export declare type TTagItem = {
|
|
1293
1319
|
label: string;
|
|
1294
1320
|
value: string | number | boolean;
|
|
@@ -1386,6 +1412,84 @@ export declare const tableCellRender: {
|
|
|
1386
1412
|
*/
|
|
1387
1413
|
objectCell: (key: string) => (value?: TPlainObject) => any;
|
|
1388
1414
|
};
|
|
1415
|
+
export declare type TimePickerWrapperProps = Omit<TimePickerProps, "value" | "onChange"> & {
|
|
1416
|
+
value?: string;
|
|
1417
|
+
onChange?: (value?: string) => void;
|
|
1418
|
+
/**
|
|
1419
|
+
* minDate、maxDate设置格式
|
|
1420
|
+
*/
|
|
1421
|
+
disabledDateConfig?: {
|
|
1422
|
+
minDate?: string;
|
|
1423
|
+
maxDate?: string;
|
|
1424
|
+
};
|
|
1425
|
+
};
|
|
1426
|
+
/**
|
|
1427
|
+
* TimePicker组件包装
|
|
1428
|
+
* ```
|
|
1429
|
+
* 1. value类型为 string
|
|
1430
|
+
* 2. onChange返回类型 string
|
|
1431
|
+
* 3. 默认格式化类型 HH:mm:ss
|
|
1432
|
+
* 4. 其他格式化类型自定义format
|
|
1433
|
+
* 5. 设置disabledTime后,disabledDateConfig配置将失效
|
|
1434
|
+
* ```
|
|
1435
|
+
*/
|
|
1436
|
+
export declare const TimePickerWrapper: (props: TimePickerWrapperProps) => JSX.Element;
|
|
1437
|
+
export declare type TimeRangePickerWrapperProps = Omit<TimeRangePickerProps, "value" | "onChange"> & {
|
|
1438
|
+
value?: [
|
|
1439
|
+
string,
|
|
1440
|
+
string
|
|
1441
|
+
];
|
|
1442
|
+
onChange?: (value?: [
|
|
1443
|
+
string,
|
|
1444
|
+
string
|
|
1445
|
+
]) => void;
|
|
1446
|
+
/**
|
|
1447
|
+
* minDate、maxDate设置格式
|
|
1448
|
+
*/
|
|
1449
|
+
disabledDateConfig?: {
|
|
1450
|
+
minDate?: string;
|
|
1451
|
+
maxDate?: string;
|
|
1452
|
+
};
|
|
1453
|
+
};
|
|
1454
|
+
export declare type EventValue<DateType> = DateType | null;
|
|
1455
|
+
export declare type RangeValue<DateType> = [
|
|
1456
|
+
EventValue<DateType>,
|
|
1457
|
+
EventValue<DateType>
|
|
1458
|
+
] | null;
|
|
1459
|
+
/**
|
|
1460
|
+
* TimePicker组件包装
|
|
1461
|
+
* ```
|
|
1462
|
+
* 1. value类型为 [string, string]
|
|
1463
|
+
* 2. onChange返回类型 [string, string]
|
|
1464
|
+
* 3. 默认格式化类型 HH:mm:ss
|
|
1465
|
+
* 4. 其他格式化类型自定义format
|
|
1466
|
+
* 5. 设置disabledTime后,disabledDateConfig配置将失效
|
|
1467
|
+
* ```
|
|
1468
|
+
*/
|
|
1469
|
+
export declare const TimeRangePickerWrapper: (props: TimeRangePickerWrapperProps) => JSX.Element;
|
|
1470
|
+
export declare type TimeRangePickerWrapperFormItemProps = Omit<FormItemProps, "name"> & {
|
|
1471
|
+
/**
|
|
1472
|
+
* 开始的时间name
|
|
1473
|
+
*/
|
|
1474
|
+
startName: FormItemNamePath;
|
|
1475
|
+
/**
|
|
1476
|
+
* 结束的时间name
|
|
1477
|
+
*/
|
|
1478
|
+
endName: FormItemNamePath;
|
|
1479
|
+
/**
|
|
1480
|
+
* 如果 TimeRangePickerWrapperFormItem 在Form.List场景下 必传
|
|
1481
|
+
*/
|
|
1482
|
+
formListName?: FormItemNamePath;
|
|
1483
|
+
timeRangePickerWrapperProps?: Omit<TimeRangePickerWrapperProps, "onChange">;
|
|
1484
|
+
};
|
|
1485
|
+
/**
|
|
1486
|
+
* 包含了Form.Item组件的时间区间选择组件
|
|
1487
|
+
* ```
|
|
1488
|
+
* 1. 时间区间组件可以定义成两个字段操作,不用再通过数组处理
|
|
1489
|
+
* 2. 会在form中产生一个 `__#invalid_time_xxxx_xxxx` 的无效字段,可以直接忽略
|
|
1490
|
+
* ```
|
|
1491
|
+
*/
|
|
1492
|
+
export declare const TimeRangePickerWrapperFormItem: (props: TimeRangePickerWrapperFormItemProps) => JSX.Element;
|
|
1389
1493
|
export declare type TreeSelectorWrapperValue = string | number | Array<string | number> | TPlainObject<string | number> | Array<TPlainObject<string | number>>;
|
|
1390
1494
|
export declare type TreeSelectorServiceConfig = {
|
|
1391
1495
|
params?: TPlainObject;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "flat-biz oss ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"@flatbiz/utils": ">=3.0.15",
|
|
35
35
|
"@wove/react": ">=1.2.22",
|
|
36
36
|
"antd": ">=4.22.2",
|
|
37
|
-
"dequal": ">=2.0.3",
|
|
38
37
|
"moment": ">=2.29.4",
|
|
39
38
|
"react": ">=18.2.0",
|
|
40
39
|
"react-dom": ">=18.2.0"
|
|
@@ -45,7 +44,7 @@
|
|
|
45
44
|
"@dimjs/model": "^1.1.8",
|
|
46
45
|
"@dimjs/model-react": "^1.1.8",
|
|
47
46
|
"@dimjs/utils": "^1.2.23",
|
|
48
|
-
"@flatbiz/utils": "^3.
|
|
47
|
+
"@flatbiz/utils": "^3.1.1",
|
|
49
48
|
"@wove/react": "^1.2.21",
|
|
50
49
|
"antd": "4.22.2",
|
|
51
50
|
"dequal": "^2.0.3",
|
|
@@ -53,5 +52,5 @@
|
|
|
53
52
|
"react": "18.2.0",
|
|
54
53
|
"react-dom": "18.2.0"
|
|
55
54
|
},
|
|
56
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "3ba157a9207cf0ba865885b304db6f033fbb2c79"
|
|
57
56
|
}
|