@flatbiz/antd 4.2.81 → 4.2.83
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/README.md +16 -0
- package/esm/easy-table/index.js +2 -1
- package/esm/easy-table/index.js.map +1 -1
- package/esm/editable-table/index.js +1 -1
- package/esm/editable-table/index.js.map +1 -1
- package/esm/form-grid/index.js.map +1 -1
- package/esm/index.js +3 -1
- package/esm/label-value-layout/index.js +1 -1
- package/esm/label-value-layout/index.js.map +1 -1
- package/esm/search-menu/index.css +0 -0
- package/esm/search-menu/index.js +7 -0
- package/esm/search-menu/index.js.map +1 -0
- package/esm/table-title-tooltip/index.js.map +1 -1
- package/esm/tips-wrapper/index.css +0 -0
- package/esm/tips-wrapper/index.js +5 -0
- package/esm/tips-wrapper/index.js.map +1 -0
- package/esm/use-responsive-point-21b8c601.js.map +1 -1
- package/index.d.ts +123 -14
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
/// <reference types="scheduler" />
|
|
4
4
|
|
|
5
5
|
import { API, ModelType } from '@dimjs/model';
|
|
6
|
+
import { PlainObject } from '@dimjs/utils';
|
|
6
7
|
import { DateFormatType, TAny, TNoopDefine, TPlainObject } from '@flatbiz/utils';
|
|
7
8
|
import { IAllProps } from '@tinymce/tinymce-react';
|
|
8
|
-
import { ButtonProps, CascaderProps, CheckboxProps, CollapseProps, ColorPickerProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, FormListFieldData, FormListOperation, InputNumberProps, InputProps, ModalProps, PaginationProps, PopconfirmProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, SwitchProps, TableProps, TabsProps, TagProps, TimePickerProps, TimeRangePickerProps, TooltipProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
|
|
9
|
+
import { ButtonProps, CascaderProps, CheckboxProps, CollapseProps, ColorPickerProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, FormListFieldData, FormListOperation, InputNumberProps, InputProps, ModalProps, PaginationProps, PopconfirmProps, PopoverProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, SwitchProps, TableProps, TabsProps, TagProps, TimePickerProps, TimeRangePickerProps, TooltipProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
|
|
9
10
|
import { ConfigProviderProps } from 'antd/es/config-provider';
|
|
10
11
|
import { PickerDateProps, RangePickerDateProps } from 'antd/es/date-picker/generatePicker';
|
|
11
12
|
import { FormListProps } from 'antd/es/form';
|
|
@@ -1012,11 +1013,11 @@ export type EasyTableFilterProps = {
|
|
|
1012
1013
|
/** 是否为纯净模式(查询条件布局是否自定义), */
|
|
1013
1014
|
isPure?: boolean;
|
|
1014
1015
|
/** 查询按钮配置 */
|
|
1015
|
-
queryButtonProps?: Omit<
|
|
1016
|
+
queryButtonProps?: Omit<ButtonWrapperProps, "onClick"> & {
|
|
1016
1017
|
text?: string;
|
|
1017
1018
|
};
|
|
1018
1019
|
/** 重置按钮配置 */
|
|
1019
|
-
resetButtonProps?: Omit<
|
|
1020
|
+
resetButtonProps?: Omit<ButtonWrapperProps, "onClick"> & {
|
|
1020
1021
|
text?: string;
|
|
1021
1022
|
};
|
|
1022
1023
|
/**
|
|
@@ -1032,11 +1033,58 @@ export type EasyTableFilterProps = {
|
|
|
1032
1033
|
filterWrapperStyle?: CSSProperties;
|
|
1033
1034
|
/** filter Form 外层 SimpleLayout className */
|
|
1034
1035
|
filterWrapperClassName?: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* 自定义 filterOperate.rightList 后 默认【查询、重置】按钮处理逻辑
|
|
1038
|
+
* 1. cover:覆盖内部查询重置按钮(默认值)
|
|
1039
|
+
* 2. beforeAppend:添加到【查询重置】按钮前面
|
|
1040
|
+
* 3. afterAppend:添加到【查询重置】按钮后面
|
|
1041
|
+
*
|
|
1042
|
+
* 如果想隐藏【查询、重置】按钮中的某一个,可设置 queryButtonProps.hidden、resetButtonProps.hidden
|
|
1043
|
+
*/
|
|
1044
|
+
rightOperateAreaAppendType?: "cover" | "beforeAppend" | "afterAppend";
|
|
1045
|
+
};
|
|
1046
|
+
export type TipsWrapperProps = {
|
|
1047
|
+
gap?: number;
|
|
1048
|
+
className?: string;
|
|
1049
|
+
style?: CSSProperties;
|
|
1050
|
+
children?: ReactNode;
|
|
1051
|
+
icon?: ReactElement;
|
|
1052
|
+
/** Icon添加点击事件,设置hoverTips后失效 */
|
|
1053
|
+
onClick?: (event: any) => void;
|
|
1054
|
+
/**
|
|
1055
|
+
* 提示效果类型
|
|
1056
|
+
* ```
|
|
1057
|
+
* 1. popover 气泡卡片,内容通过popoverProps设置
|
|
1058
|
+
* 2. tooltip 文字提示,内容通过tooltipProps设置
|
|
1059
|
+
* ```
|
|
1060
|
+
*/
|
|
1061
|
+
tipType?: "popover" | "tooltip";
|
|
1062
|
+
popoverProps?: PopoverProps;
|
|
1063
|
+
tooltipProps?: TooltipProps;
|
|
1064
|
+
trigger?: "icon" | "all";
|
|
1035
1065
|
};
|
|
1066
|
+
/**
|
|
1067
|
+
* 为目标元素右侧添加Icon
|
|
1068
|
+
* ```
|
|
1069
|
+
* Icon有两种交互行为
|
|
1070
|
+
* 1. 鼠标悬浮显示提示效果;
|
|
1071
|
+
* 2. 为Icon添加点击事件
|
|
1072
|
+
*
|
|
1073
|
+
* 例如:
|
|
1074
|
+
* 1.
|
|
1075
|
+
* <TipsWrapper tipType="tooltip" tooltipProps={{ title:'说明文案' }}>ABC</TipsWrapper>
|
|
1076
|
+
* 2.
|
|
1077
|
+
* <TipsWrapper tipType="popover" popoverProps={{ title:'说明标题', content:'说明内容' }}>ABC</TipsWrapper>
|
|
1078
|
+
* 3.
|
|
1079
|
+
* <TipsWrapper onClick={noop}>ABC</TipsWrapper>
|
|
1080
|
+
* ```
|
|
1081
|
+
*/
|
|
1082
|
+
export declare const TipsWrapper: (props: TipsWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
1036
1083
|
export type TEasyTableTableColumn<T> = ColumnsType<T>[0] & {
|
|
1037
1084
|
/**
|
|
1038
|
-
*
|
|
1085
|
+
* @description 请使用 tipsWrapperProps 属性配置
|
|
1039
1086
|
* ```
|
|
1087
|
+
* 会在 title 之后展示一个 icon,hover 之后提示一些信息
|
|
1040
1088
|
* 1. title为string类型有效
|
|
1041
1089
|
* 2. hoverArea 默认值:icon
|
|
1042
1090
|
* ```
|
|
@@ -1047,6 +1095,15 @@ export type TEasyTableTableColumn<T> = ColumnsType<T>[0] & {
|
|
|
1047
1095
|
hoverArea?: "icon" | "all";
|
|
1048
1096
|
};
|
|
1049
1097
|
dataIndex?: keyof T | (string & {});
|
|
1098
|
+
/**
|
|
1099
|
+
* 会在 title 之后展示一个 icon
|
|
1100
|
+
* ```
|
|
1101
|
+
* 1. title为string类型有效
|
|
1102
|
+
* 2. 可为icon添加提示效果
|
|
1103
|
+
* 3. 可为icon添加点击事件
|
|
1104
|
+
* ```
|
|
1105
|
+
*/
|
|
1106
|
+
tipsWrapperProps?: string | TipsWrapperProps;
|
|
1050
1107
|
};
|
|
1051
1108
|
export type EasyTableTableProps<T> = Omit<TableProps<TAny>, "dataSource" | "loading" | "rowKey" | "columns"> & {
|
|
1052
1109
|
children?: ReactElement | ReactElement[];
|
|
@@ -1112,6 +1169,7 @@ export declare const EasyTable: import("react").ForwardRefExoticComponent<EasyTa
|
|
|
1112
1169
|
*3. EasyTable.Filter中内置了 Form 标签,当children为函数时,可获取form实例
|
|
1113
1170
|
*4. 默认布局下,可通过设置 filterOperate 设置操作按钮
|
|
1114
1171
|
*5. Filter 子节点包含 hidden = true 会被忽略
|
|
1172
|
+
*6. 如果想隐藏【查询、重置】按钮中的某一个,可设置 queryButtonProps.hidden、resetButtonProps.hidden
|
|
1115
1173
|
*```
|
|
1116
1174
|
*/
|
|
1117
1175
|
Filter: (props: EasyTableFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1127,7 +1185,9 @@ export declare const EasyTable: import("react").ForwardRefExoticComponent<EasyTa
|
|
|
1127
1185
|
/**
|
|
1128
1186
|
* @deprecated 已过时 4.3.0版本移除,请使用 useEasyTable
|
|
1129
1187
|
*/
|
|
1130
|
-
useEasyTablRef: () =>
|
|
1188
|
+
useEasyTablRef: () => {
|
|
1189
|
+
current: EasyTableRefApi;
|
|
1190
|
+
};
|
|
1131
1191
|
/** 在 EasyTable子组件内才可使用 */
|
|
1132
1192
|
useEasyTable: () => EasyTableRefApi;
|
|
1133
1193
|
};
|
|
@@ -1454,8 +1514,9 @@ export type fieldConfigFunctionParams = {
|
|
|
1454
1514
|
*/
|
|
1455
1515
|
export type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
|
|
1456
1516
|
/**
|
|
1457
|
-
*
|
|
1517
|
+
* @description 请使用 tipsWrapperProps 属性配置
|
|
1458
1518
|
* ```
|
|
1519
|
+
* 会在 title 之后展示一个 icon,hover 之后提示一些信息
|
|
1459
1520
|
* 1. title为string类型、ReactElement有效
|
|
1460
1521
|
* 2. hoverArea 默认值:icon
|
|
1461
1522
|
* ```
|
|
@@ -1465,6 +1526,15 @@ export type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
|
|
|
1465
1526
|
icon?: ReactElement;
|
|
1466
1527
|
hoverArea?: "icon" | "all";
|
|
1467
1528
|
};
|
|
1529
|
+
/**
|
|
1530
|
+
* 会在 title 之后展示一个 icon
|
|
1531
|
+
* ```
|
|
1532
|
+
* 1. title为string类型有效
|
|
1533
|
+
* 2. 可为icon添加提示效果
|
|
1534
|
+
* 3. 可为icon添加点击事件
|
|
1535
|
+
* ```
|
|
1536
|
+
*/
|
|
1537
|
+
tipsWrapperProps?: string | TipsWrapperProps;
|
|
1468
1538
|
dataIndex?: string;
|
|
1469
1539
|
fieldConfig?: FieldSingleConfig | FormListConfig | ((data: fieldConfigFunctionParams) => FieldSingleConfig | FormListConfig);
|
|
1470
1540
|
/** 隐藏域字段 */
|
|
@@ -1488,7 +1558,7 @@ export type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
|
|
|
1488
1558
|
index: number;
|
|
1489
1559
|
}) => ReactElement | null;
|
|
1490
1560
|
/** table datasource children column 自定义渲染 */
|
|
1491
|
-
tableChildrenColumnRender?: (value:
|
|
1561
|
+
tableChildrenColumnRender?: (value: TAny, record: TPlainObject, index: number) => ReactElement | null;
|
|
1492
1562
|
};
|
|
1493
1563
|
export type EditableTableProps = {
|
|
1494
1564
|
name: EditableTableName;
|
|
@@ -1513,6 +1583,10 @@ export type EditableTableProps = {
|
|
|
1513
1583
|
/** 新增行默认值,自定义onTableAfterRender后失效 */
|
|
1514
1584
|
getAddRowDefaultValues?: () => TPlainObject;
|
|
1515
1585
|
};
|
|
1586
|
+
export type EditableTableRefApi = {
|
|
1587
|
+
/** 可用于表格行选择操作时,获取操作列数据 */
|
|
1588
|
+
getTableItemDataByFormListItemKey: (key: number) => TPlainObject;
|
|
1589
|
+
};
|
|
1516
1590
|
/**
|
|
1517
1591
|
* 可编辑表格
|
|
1518
1592
|
* demo:https://fex.qa.tcshuke.com/docs/admin/main/table/row-editable1
|
|
@@ -1521,9 +1595,10 @@ export type EditableTableProps = {
|
|
|
1521
1595
|
* 1. table children column 不可编辑
|
|
1522
1596
|
* 2. 当存在折叠children数据时,组件会在children中内置_isChildrenItem字段
|
|
1523
1597
|
* 3. 可通过tableChildrenColumnRender自定义渲染 table children column 显示
|
|
1598
|
+
* 4. 设置 rowSelection 后,rowSelection.onChange 通过 ref 的 getTableItemDataByFormListItemKey获取数据
|
|
1524
1599
|
* ```
|
|
1525
1600
|
*/
|
|
1526
|
-
export declare const EditableTable: (
|
|
1601
|
+
export declare const EditableTable: import("react").ForwardRefExoticComponent<EditableTableProps & import("react").RefAttributes<EditableTableRefApi>>;
|
|
1527
1602
|
export type EditorWrapperProps = {
|
|
1528
1603
|
onChange?: (data?: string) => void;
|
|
1529
1604
|
value?: string;
|
|
@@ -1753,14 +1828,14 @@ export declare const FormGrid: {
|
|
|
1753
1828
|
* FormItem网格响应式布局
|
|
1754
1829
|
*```
|
|
1755
1830
|
* 1. 应用场景:Form条件布局
|
|
1756
|
-
* 2. 子元素只能是
|
|
1757
|
-
* 3. 所有子元素中只能存在一个
|
|
1831
|
+
* 2. 子元素只能是 FormGrid.Col、FormGrid.OperateCol,其他会被忽略
|
|
1832
|
+
* 3. 所有子元素中只能存在一个 FormGrid.OperateCol
|
|
1758
1833
|
*/
|
|
1759
1834
|
Row: (props: FormRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
1760
1835
|
/**
|
|
1761
1836
|
* 网格响应式布局,默认值:{ xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 6 }
|
|
1762
1837
|
*```
|
|
1763
|
-
* 1. 设置 span
|
|
1838
|
+
* 1. 设置 span 栅格占位格数,替换lg、xl、xxl默认数据,不替换xs、sm布局数据
|
|
1764
1839
|
* 2. grid 自定义响应式网格布局
|
|
1765
1840
|
* xs: 屏幕 < 576px
|
|
1766
1841
|
* sm: 屏幕 ≥ 576px
|
|
@@ -2005,6 +2080,7 @@ export type LabelValueLayoutProps = {
|
|
|
2005
2080
|
column?: number;
|
|
2006
2081
|
bordered?: boolean;
|
|
2007
2082
|
className?: string;
|
|
2083
|
+
style?: CSSProperties;
|
|
2008
2084
|
};
|
|
2009
2085
|
/**
|
|
2010
2086
|
* options[].span 是 Description.Item 的数量。 span={2} 会占用两个 DescriptionItem 的宽度
|
|
@@ -2370,6 +2446,40 @@ export type RuleDescribeProps = {
|
|
|
2370
2446
|
ruleItemDescStyle?: CSSProperties;
|
|
2371
2447
|
};
|
|
2372
2448
|
export declare const RuleDescribe: (props: RuleDescribeProps) => import("react/jsx-runtime").JSX.Element;
|
|
2449
|
+
export interface ISearchMenuProps {
|
|
2450
|
+
/**
|
|
2451
|
+
* 如果传了value,就变成受控组件
|
|
2452
|
+
* 目前只支持单选
|
|
2453
|
+
*/
|
|
2454
|
+
value?: string;
|
|
2455
|
+
onChange?: (key: string, keyPath: string[], targetItem?: PlainObject) => void;
|
|
2456
|
+
/** 树型源数据 */
|
|
2457
|
+
dataSource: TPlainObject[];
|
|
2458
|
+
/** 惰性搜索 */
|
|
2459
|
+
lazySearch?: boolean;
|
|
2460
|
+
/** 搜索目标字段 */
|
|
2461
|
+
searchKeyList?: string[];
|
|
2462
|
+
/** 格式化参数 */
|
|
2463
|
+
fieldNames?: {
|
|
2464
|
+
label?: string;
|
|
2465
|
+
key?: string;
|
|
2466
|
+
children?: string;
|
|
2467
|
+
};
|
|
2468
|
+
/** 自定义渲染条目 */
|
|
2469
|
+
renderItem?: FC<TAny>;
|
|
2470
|
+
/** 搜索框参数 */
|
|
2471
|
+
inputProps?: InputSearchWrapperProps;
|
|
2472
|
+
placeholder?: string;
|
|
2473
|
+
className?: string;
|
|
2474
|
+
wrapStyle?: React.CSSProperties;
|
|
2475
|
+
style?: React.CSSProperties;
|
|
2476
|
+
}
|
|
2477
|
+
/**
|
|
2478
|
+
* 列表搜索
|
|
2479
|
+
* @param props
|
|
2480
|
+
* @returns
|
|
2481
|
+
*/
|
|
2482
|
+
export declare function SearchMenu(props: ISearchMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
2373
2483
|
export type SelectorWrapperSearchServiceConfig = {
|
|
2374
2484
|
params?: TPlainObject;
|
|
2375
2485
|
onRequest: (params?: TAny) => TAny;
|
|
@@ -2848,7 +2958,7 @@ export type TableTitleTooltipProps = {
|
|
|
2848
2958
|
title: string | ReactElement;
|
|
2849
2959
|
tooltip: string | {
|
|
2850
2960
|
icon?: ReactElement;
|
|
2851
|
-
content
|
|
2961
|
+
content: string;
|
|
2852
2962
|
hoverArea?: "icon" | "all";
|
|
2853
2963
|
};
|
|
2854
2964
|
gap?: number;
|
|
@@ -2857,8 +2967,7 @@ export type TableTitleTooltipProps = {
|
|
|
2857
2967
|
};
|
|
2858
2968
|
/**
|
|
2859
2969
|
* title + tooltip
|
|
2860
|
-
* @
|
|
2861
|
-
* @returns
|
|
2970
|
+
* @deprecated 已过期,请使用 TipsWrapper 组件
|
|
2862
2971
|
*/
|
|
2863
2972
|
export declare const TableTitleTooltip: (props: TableTitleTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
2864
2973
|
export type TabsWrapperProps = TabsProps & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.83",
|
|
4
4
|
"description": "flat-biz ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@dimjs/model": ">=1.1.8",
|
|
32
32
|
"@dimjs/model-react": ">=1.1.8",
|
|
33
33
|
"@dimjs/utils": ">=1.3.2",
|
|
34
|
-
"@flatbiz/utils": ">=4.0.
|
|
34
|
+
"@flatbiz/utils": ">=4.0.15",
|
|
35
35
|
"@wove/react": ">=1.2.23",
|
|
36
36
|
"antd": ">=5.5.1",
|
|
37
37
|
"dayjs": ">=1.11.9",
|