@flatbiz/antd 4.0.8 → 4.0.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.
- package/cjs/index.css +8 -12
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +48 -13
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -44,8 +44,12 @@ export interface ButtonOperateProps {
|
|
|
44
44
|
split?: boolean;
|
|
45
45
|
}
|
|
46
46
|
export declare const ButtonOperate: FC<ButtonOperateProps>;
|
|
47
|
+
export type TAny = any;
|
|
48
|
+
export type TPlainObject<T = TAny> = Record<string, T>;
|
|
49
|
+
export type TNoopDefine = () => void;
|
|
50
|
+
export type DateFormatType = "YYYY-MM" | "YYYY-MM-DD" | "YYYY-MM-DD hh:mm" | "YYYY-MM-DD hh:mm:ss" | "MM-DD" | "YYYY/MM" | "YYYY/MM/DD" | "YYYY/MM/DD hh:mm" | "YYYY/MM/DD hh:mm:ss" | "MM/DD" | "YYYY.MM" | "YYYY.MM.DD" | "YYYY.MM.DD hh:mm" | "YYYY.MM.DD hh:mm:ss" | "MM.DD" | "YYYY\u5E74MM\u6708" | "YYYY\u5E74MM\u6708DD\u65E5" | "YYYY\u5E74MM\u6708DD\u65E5 hh:mm" | "YYYY\u5E74MM\u6708DD\u65E5 hh:mm:ss" | "MM\u6708DD\u65E5" | "hh:mm" | "hh:mm:ss" | "YYYYMM" | "YYYYMMDD" | "YYYYMMDD hh:mm" | "YYYYMMDD hh:mm:ss";
|
|
47
51
|
export type ButtonWrapperProps = Omit<ButtonProps, "onClick" | "loading"> & {
|
|
48
|
-
onClick?: (e: React.MouseEvent<HTMLElement>) => Promise<
|
|
52
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => Promise<TAny> | void;
|
|
49
53
|
debounceDuration?: number;
|
|
50
54
|
permission?: string;
|
|
51
55
|
hidden?: boolean;
|
|
@@ -58,10 +62,6 @@ export type ButtonWrapperProps = Omit<ButtonProps, "onClick" | "loading"> & {
|
|
|
58
62
|
* @returns
|
|
59
63
|
*/
|
|
60
64
|
export declare const ButtonWrapper: (props: ButtonWrapperProps) => JSX.Element | null;
|
|
61
|
-
export declare type TAny = any;
|
|
62
|
-
export declare type TPlainObject<T = TAny> = Record<string, T>;
|
|
63
|
-
export declare type TNoopDefine = () => void;
|
|
64
|
-
export declare type DateFormatType = "YYYY-MM" | "YYYY-MM-DD" | "YYYY-MM-DD hh:mm" | "YYYY-MM-DD hh:mm:ss" | "MM-DD" | "YYYY/MM" | "YYYY/MM/DD" | "YYYY/MM/DD hh:mm" | "YYYY/MM/DD hh:mm:ss" | "MM/DD" | "YYYY.MM" | "YYYY.MM.DD" | "YYYY.MM.DD hh:mm" | "YYYY.MM.DD hh:mm:ss" | "MM.DD" | "YYYY\u5E74MM\u6708" | "YYYY\u5E74MM\u6708DD\u65E5" | "YYYY\u5E74MM\u6708DD\u65E5 hh:mm" | "YYYY\u5E74MM\u6708DD\u65E5 hh:mm:ss" | "MM\u6708DD\u65E5" | "hh:mm" | "hh:mm:ss" | "YYYYMM" | "YYYYMMDD" | "YYYYMMDD hh:mm" | "YYYYMMDD hh:mm:ss";
|
|
65
65
|
export type RequestStatus = "request-init" | "request-progress" | "request-success" | "request-error" | "no-dependencies-params";
|
|
66
66
|
export type RequestStatusRenderProps = {
|
|
67
67
|
status?: RequestStatus;
|
|
@@ -85,12 +85,13 @@ export type CascaderWrapperProps = Omit<CascaderProps<any>, "loading" | "notFoun
|
|
|
85
85
|
*/
|
|
86
86
|
serviceConfig?: CascaderWrapperServiceConfig;
|
|
87
87
|
onLabelRenderAdapter?: (dataItem: TPlainObject) => string | ReactElement;
|
|
88
|
+
onSelectorListChange?: (dataList: TPlainObject[]) => void;
|
|
88
89
|
/**
|
|
89
90
|
* 是否动态加载选项
|
|
90
91
|
*/
|
|
91
92
|
isDynamicLoad?: boolean;
|
|
92
93
|
value?: string | number;
|
|
93
|
-
onChange?: (value
|
|
94
|
+
onChange?: (value?: string | number, selectedList?: TPlainObject[]) => void;
|
|
94
95
|
requestMessageConfig?: RequestStatusRenderProps["messageConfig"];
|
|
95
96
|
};
|
|
96
97
|
export type CascaderWrapperRefApi = {
|
|
@@ -105,6 +106,7 @@ export type CascaderWrapperRefApi = {
|
|
|
105
106
|
* 2. 不支持多选
|
|
106
107
|
* 3. modelKey的配置是为了缓存数据,只缓存初始化数据,如果isDynamicLoad=true,动态获取的数据不再缓存
|
|
107
108
|
* 4. onChange操作第一个参数返回叶子节点value,第二个参数返回选中的多级数据
|
|
109
|
+
* 5. isDynamicLoad=true 会在请求中添加当前选中option的fieldNames.value为key的数据
|
|
108
110
|
* ```
|
|
109
111
|
*/
|
|
110
112
|
export declare const CascaderWrapper: import("react").ForwardRefExoticComponent<Omit<CascaderProps<any>, "value" | "loading" | "multiple" | "options" | "onChange" | "notFoundContent"> & {
|
|
@@ -114,12 +116,13 @@ export declare const CascaderWrapper: import("react").ForwardRefExoticComponent<
|
|
|
114
116
|
*/
|
|
115
117
|
serviceConfig?: CascaderWrapperServiceConfig | undefined;
|
|
116
118
|
onLabelRenderAdapter?: ((dataItem: TPlainObject) => string | ReactElement) | undefined;
|
|
119
|
+
onSelectorListChange?: ((dataList: TPlainObject[]) => void) | undefined;
|
|
117
120
|
/**
|
|
118
121
|
* 是否动态加载选项
|
|
119
122
|
*/
|
|
120
123
|
isDynamicLoad?: boolean | undefined;
|
|
121
124
|
value?: string | number | undefined;
|
|
122
|
-
onChange?: ((value
|
|
125
|
+
onChange?: ((value?: string | number, selectedList?: TPlainObject[]) => void) | undefined;
|
|
123
126
|
requestMessageConfig?: RequestStatusRenderProps["messageConfig"];
|
|
124
127
|
} & import("react").RefAttributes<CascaderWrapperRefApi>>;
|
|
125
128
|
export type ConfigProviderWrapperProps = Omit<ConfigProviderProps, "locale"> & {
|
|
@@ -958,6 +961,7 @@ export declare const useSafeState: <S extends unknown>(initialState?: S | (() =>
|
|
|
958
961
|
S,
|
|
959
962
|
Dispatch<SetStateAction<S>>
|
|
960
963
|
];
|
|
964
|
+
export declare const useThemeToken: () => import("antd/es/theme/interface").GlobalToken;
|
|
961
965
|
export type IconWrapperProps = {
|
|
962
966
|
hoverTips?: string | React.ReactElement;
|
|
963
967
|
icon?: React.ReactNode;
|
|
@@ -1150,6 +1154,27 @@ export declare const preDefinedClassName: {
|
|
|
1150
1154
|
label_value_vertical: string;
|
|
1151
1155
|
};
|
|
1152
1156
|
};
|
|
1157
|
+
export type RadioGroupWrapperValue<T extends string | number> = T;
|
|
1158
|
+
export type RadioGroupWrapperOptionItem = {
|
|
1159
|
+
label: string | ReactElement;
|
|
1160
|
+
value: string | number;
|
|
1161
|
+
disabled?: boolean;
|
|
1162
|
+
};
|
|
1163
|
+
export type CustomRadioGroupProps = {
|
|
1164
|
+
value?: RadioGroupWrapperValue<string | number>;
|
|
1165
|
+
onChange?: (value?: RadioGroupWrapperValue<string | number>) => void;
|
|
1166
|
+
onPreChange?: (value?: RadioGroupWrapperValue<string | number>) => Promise<void>;
|
|
1167
|
+
options: RadioGroupWrapperOptionItem[];
|
|
1168
|
+
/** 是否可取消选中,默认:false */
|
|
1169
|
+
isCancel?: boolean;
|
|
1170
|
+
disabled?: boolean;
|
|
1171
|
+
};
|
|
1172
|
+
/**
|
|
1173
|
+
* RadioGroupWrapper 为了解决 RadioGroup 组件不能取消选中问题
|
|
1174
|
+
* @param props
|
|
1175
|
+
* @returns
|
|
1176
|
+
*/
|
|
1177
|
+
export declare const RadioGroupWrapper: (props: CustomRadioGroupProps) => JSX.Element;
|
|
1153
1178
|
export type RelationProps = {
|
|
1154
1179
|
/** 左侧Tag+线占用宽度 */
|
|
1155
1180
|
tagLineWidth?: number;
|
|
@@ -1204,14 +1229,17 @@ export type TRelationTreeOperate = {
|
|
|
1204
1229
|
};
|
|
1205
1230
|
export declare const RelationTree: (props: RelationTreeProps) => JSX.Element;
|
|
1206
1231
|
export type RuleDataItem = {
|
|
1207
|
-
title
|
|
1208
|
-
desc
|
|
1232
|
+
title?: string | ReactElement;
|
|
1233
|
+
desc?: string | ReactElement;
|
|
1209
1234
|
};
|
|
1210
1235
|
export type RuleDescribeProps = {
|
|
1211
1236
|
title?: string;
|
|
1212
1237
|
showTitleIndex?: boolean;
|
|
1213
1238
|
ruleDataList: RuleDataItem[];
|
|
1214
1239
|
titleSign?: boolean;
|
|
1240
|
+
className?: string;
|
|
1241
|
+
ruleItemTitleStyle?: CSSProperties;
|
|
1242
|
+
ruleItemDescStyle?: CSSProperties;
|
|
1215
1243
|
};
|
|
1216
1244
|
export declare const RuleDescribe: (props: RuleDescribeProps) => JSX.Element;
|
|
1217
1245
|
export type SelectorWrapperSimpleServiceConfig = {
|
|
@@ -1237,8 +1265,8 @@ export type SelectorWrapperSimpleProps = Omit<SelectProps, "filterOption" | "onS
|
|
|
1237
1265
|
* ```
|
|
1238
1266
|
*/
|
|
1239
1267
|
showAllOption?: true | TPlainObject<string | number>;
|
|
1240
|
-
/**
|
|
1241
|
-
|
|
1268
|
+
/** selectorList发生变更时触发,每次都会调用 */
|
|
1269
|
+
onSelectorListChange?: (dataList: TPlainObject[]) => void;
|
|
1242
1270
|
/**
|
|
1243
1271
|
* 通过服务获取数据异常回调
|
|
1244
1272
|
*/
|
|
@@ -1462,14 +1490,21 @@ export type TableTitleTooltipProps = {
|
|
|
1462
1490
|
};
|
|
1463
1491
|
export declare const TableTitleTooltip: (props: TableTitleTooltipProps) => JSX.Element;
|
|
1464
1492
|
export type TabsWrapperProps = TabsProps & {
|
|
1465
|
-
/** Tabs Header 提供 Sticky
|
|
1493
|
+
/** Tabs Header 提供 Sticky 效果,默认值:true */
|
|
1466
1494
|
isSticky?: boolean;
|
|
1495
|
+
/** 是否取消 active 缓存 */
|
|
1496
|
+
cancelActiveCache?: boolean;
|
|
1497
|
+
activeCacheKey?: string;
|
|
1467
1498
|
};
|
|
1468
1499
|
/**
|
|
1469
1500
|
* Tabs 包装组件
|
|
1470
1501
|
* ```
|
|
1471
|
-
* 1. Tabs Header 提供 Sticky
|
|
1502
|
+
* 1. Tabs Header 提供 Sticky 效果,默认值:true
|
|
1472
1503
|
* 2. 使用时,父级必须要有高度,可置于Flex布局中
|
|
1504
|
+
* 3. 默认缓存激活的tab item(activeKey受控操作下缓存无效)
|
|
1505
|
+
* 当未设置activeKey,非受控操作时,组件内部会会话缓存activeKey,在刷新时,会显示上次的激活的tab item
|
|
1506
|
+
* 缓存Key:如果未设置 activeCacheKey,则使用默认的 cache key(tabs-wrapper-activeKey)
|
|
1507
|
+
* 缓存模式:会话缓存,在浏览器关闭后,会清除
|
|
1473
1508
|
* ```
|
|
1474
1509
|
*/
|
|
1475
1510
|
export declare const TabsWrapper: (props: TabsWrapperProps) => JSX.Element;
|