@flatbiz/antd 4.0.7 → 4.0.9

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/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 declare type TAny = any;
48
+ export declare type TPlainObject<T = TAny> = Record<string, T>;
49
+ export declare type TNoopDefine = () => void;
50
+ 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";
47
51
  export type ButtonWrapperProps = Omit<ButtonProps, "onClick" | "loading"> & {
48
- onClick?: (e: React.MouseEvent<HTMLElement>) => Promise<void> | void;
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 type TAny = any;
62
- export type TPlainObject<T = TAny> = Record<string, T>;
63
- export type TNoopDefine = () => void;
64
- 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";
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: string | number, selectedList: TPlainObject[]) => void;
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: string | number, selectedList: TPlainObject[]) => void) | undefined;
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;
@@ -1204,14 +1208,17 @@ export type TRelationTreeOperate = {
1204
1208
  };
1205
1209
  export declare const RelationTree: (props: RelationTreeProps) => JSX.Element;
1206
1210
  export type RuleDataItem = {
1207
- title: string | ReactElement;
1208
- desc: string | ReactElement;
1211
+ title?: string | ReactElement;
1212
+ desc?: string | ReactElement;
1209
1213
  };
1210
1214
  export type RuleDescribeProps = {
1211
1215
  title?: string;
1212
1216
  showTitleIndex?: boolean;
1213
1217
  ruleDataList: RuleDataItem[];
1214
1218
  titleSign?: boolean;
1219
+ className?: string;
1220
+ ruleItemTitleStyle?: CSSProperties;
1221
+ ruleItemDescStyle?: CSSProperties;
1215
1222
  };
1216
1223
  export declare const RuleDescribe: (props: RuleDescribeProps) => JSX.Element;
1217
1224
  export type SelectorWrapperSimpleServiceConfig = {
@@ -1237,8 +1244,8 @@ export type SelectorWrapperSimpleProps = Omit<SelectProps, "filterOption" | "onS
1237
1244
  * ```
1238
1245
  */
1239
1246
  showAllOption?: true | TPlainObject<string | number>;
1240
- /** electorList发生变更时触发,每次都会调用 */
1241
- onSelectorListAllChange?: (dataList: TPlainObject[]) => void;
1247
+ /** selectorList发生变更时触发,每次都会调用 */
1248
+ onSelectorListChange?: (dataList: TPlainObject[]) => void;
1242
1249
  /**
1243
1250
  * 通过服务获取数据异常回调
1244
1251
  */
@@ -1389,7 +1396,7 @@ export declare const tableCellRender: {
1389
1396
  * 4. showMaxNumber 显示最大长度,作用于原单元格字符串数据
1390
1397
  * ```
1391
1398
  */
1392
- extraContentRender: (options: TableColumnIconRenderProps) => (value?: TAny) => JSX.Element;
1399
+ extraContentRender: (handle: (item: TPlainObject) => TableColumnIconRenderProps) => (value: TAny, item: TPlainObject) => JSX.Element;
1393
1400
  /**
1394
1401
  * table 索引展示,如果存在pageSize、pageNo参数可分页展示索引,否则每页都从1开始
1395
1402
  */
@@ -1448,7 +1455,7 @@ export declare const tableCellRender: {
1448
1455
  * tableCellRender.objectCell('a.b.c')
1449
1456
  * ```
1450
1457
  */
1451
- objectCell: (key: string) => (value?: TPlainObject) => any;
1458
+ objectCell: (key: string, defaultValue?: string) => (value?: TPlainObject) => any;
1452
1459
  };
1453
1460
  export type TableTitleTooltipProps = {
1454
1461
  title: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.0.7",
3
+ "version": "4.0.9",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",