@flatbiz/antd 4.2.97 → 4.2.99

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
@@ -9,14 +9,14 @@ import { AlertProps, ButtonProps, CardProps, CascaderProps, CheckboxProps, Colla
9
9
  import { ConfigProviderProps } from 'antd/es/config-provider';
10
10
  import { PickerDateProps, RangePickerDateProps } from 'antd/es/date-picker/generatePicker';
11
11
  import { FormListProps } from 'antd/es/form';
12
+ import { ColumnsType } from 'antd/es/table';
12
13
  import { RcFile } from 'antd/es/upload';
13
14
  import { CheckboxGroupProps } from 'antd/lib/checkbox';
14
15
  import { SearchProps, TextAreaProps } from 'antd/lib/input';
15
- import { ColumnsType } from 'antd/lib/table';
16
16
  import { UploadChangeParam } from 'antd/lib/upload';
17
17
  import { UploadFile } from 'antd/lib/upload/interface';
18
18
  import * as React from 'react';
19
- import { CSSProperties, DependencyList, FC, ReactElement, ReactNode } from 'react';
19
+ import { CSSProperties, DependencyList, FC, ForwardRefExoticComponent, ReactElement, ReactNode, RefAttributes } from 'react';
20
20
  import { SplitProps } from 'react-split';
21
21
  import { Editor as TinyMCEEditor } from 'tinymce';
22
22
 
@@ -440,6 +440,7 @@ export type CssHoverProps = {
440
440
  } & Pick<CommonPropsWithChildren<{
441
441
  "--v-css-hover-bgcolor": CSSProperties["backgroundColor"];
442
442
  "--v-css-hover-opacity": CSSProperties["opacity"];
443
+ "--v-css-hover-border-radius": CSSProperties["borderRadius"];
443
444
  }>, "style" | "children">;
444
445
  /**
445
446
  * css hover 效果
@@ -988,6 +989,68 @@ export declare const dynamicNode: {
988
989
  };
989
990
  remove: (elementId?: string) => void;
990
991
  };
992
+ export type TipsWrapperProps = {
993
+ gap?: number;
994
+ className?: string;
995
+ style?: CSSProperties;
996
+ children?: ReactNode;
997
+ icon?: ReactElement;
998
+ /** Icon添加点击事件,设置hoverTips后失效 */
999
+ onClick?: (event: any) => void;
1000
+ /**
1001
+ * 提示效果类型
1002
+ * ```
1003
+ * 1. popover 气泡卡片,内容通过popoverProps设置
1004
+ * 2. tooltip 文字提示,内容通过tooltipProps设置
1005
+ * ```
1006
+ */
1007
+ tipType?: "popover" | "tooltip";
1008
+ popoverProps?: PopoverProps;
1009
+ tooltipProps?: TooltipProps;
1010
+ trigger?: "icon" | "all";
1011
+ };
1012
+ /**
1013
+ * 为目标元素右侧添加Icon
1014
+ * ```
1015
+ * Icon有两种交互行为
1016
+ * 1. 鼠标悬浮显示提示效果;
1017
+ * 2. 为Icon添加点击事件
1018
+ *
1019
+ * 例如:
1020
+ * 1.
1021
+ * <TipsWrapper tipType="tooltip" tooltipProps={{ title:'说明文案' }}>ABC</TipsWrapper>
1022
+ * 2.
1023
+ * <TipsWrapper tipType="popover" popoverProps={{ title:'说明标题', content:'说明内容' }}>ABC</TipsWrapper>
1024
+ * 3.
1025
+ * <TipsWrapper onClick={noop}>ABC</TipsWrapper>
1026
+ * ```
1027
+ */
1028
+ export declare const TipsWrapper: (props: TipsWrapperProps) => import("react/jsx-runtime").JSX.Element;
1029
+ export type TEasyTableTableColumn<T> = ColumnsType<T>[0] & {
1030
+ /**
1031
+ * @description 请使用 tipsWrapperProps 属性配置
1032
+ * ```
1033
+ * 会在 title 之后展示一个 icon,hover 之后提示一些信息
1034
+ * 1. title为string类型有效
1035
+ * 2. hoverArea 默认值:icon
1036
+ * ```
1037
+ */
1038
+ tooltip?: string | {
1039
+ content: string;
1040
+ icon?: ReactElement;
1041
+ hoverArea?: "icon" | "all";
1042
+ };
1043
+ dataIndex?: keyof T | (string & {});
1044
+ /**
1045
+ * 会在 title 之后展示一个 icon
1046
+ * ```
1047
+ * 1. title为string类型有效
1048
+ * 2. 可为icon添加提示效果
1049
+ * 3. 可为icon添加点击事件
1050
+ * ```
1051
+ */
1052
+ tipsWrapperProps?: string | TipsWrapperProps;
1053
+ };
991
1054
  export type EasyTableRefApi = {
992
1055
  /** 外部发起请求服务 */
993
1056
  onRequest: (params?: TPlainObject) => void;
@@ -1037,6 +1100,15 @@ export type EasyTableServiceConfig = {
1037
1100
  * ```
1038
1101
  */
1039
1102
  requestResultAdapter?: (params: TAny) => TPlainObject;
1103
+ /**
1104
+ * 动态列自定义渲染
1105
+ * ```
1106
+ * 1. respData: 接口返回数据
1107
+ * 2. columns: Table columns配置项
1108
+ * ```
1109
+ *
1110
+ */
1111
+ dynamicColumsAdapter?: (respData?: TAny, columns?: TEasyTableTableColumn<TPlainObject>[]) => TEasyTableTableColumn<TPlainObject>[] | undefined;
1040
1112
  };
1041
1113
  export type EasyTableProps = {
1042
1114
  className?: string;
@@ -1177,68 +1249,6 @@ export type EasyTableFilterProps = {
1177
1249
  /** 默认重启按钮触发请求,默认值:true */
1178
1250
  defaultResetButtonTriggerRequest?: boolean;
1179
1251
  };
1180
- export type TipsWrapperProps = {
1181
- gap?: number;
1182
- className?: string;
1183
- style?: CSSProperties;
1184
- children?: ReactNode;
1185
- icon?: ReactElement;
1186
- /** Icon添加点击事件,设置hoverTips后失效 */
1187
- onClick?: (event: any) => void;
1188
- /**
1189
- * 提示效果类型
1190
- * ```
1191
- * 1. popover 气泡卡片,内容通过popoverProps设置
1192
- * 2. tooltip 文字提示,内容通过tooltipProps设置
1193
- * ```
1194
- */
1195
- tipType?: "popover" | "tooltip";
1196
- popoverProps?: PopoverProps;
1197
- tooltipProps?: TooltipProps;
1198
- trigger?: "icon" | "all";
1199
- };
1200
- /**
1201
- * 为目标元素右侧添加Icon
1202
- * ```
1203
- * Icon有两种交互行为
1204
- * 1. 鼠标悬浮显示提示效果;
1205
- * 2. 为Icon添加点击事件
1206
- *
1207
- * 例如:
1208
- * 1.
1209
- * <TipsWrapper tipType="tooltip" tooltipProps={{ title:'说明文案' }}>ABC</TipsWrapper>
1210
- * 2.
1211
- * <TipsWrapper tipType="popover" popoverProps={{ title:'说明标题', content:'说明内容' }}>ABC</TipsWrapper>
1212
- * 3.
1213
- * <TipsWrapper onClick={noop}>ABC</TipsWrapper>
1214
- * ```
1215
- */
1216
- export declare const TipsWrapper: (props: TipsWrapperProps) => import("react/jsx-runtime").JSX.Element;
1217
- export type TEasyTableTableColumn<T> = ColumnsType<T>[0] & {
1218
- /**
1219
- * @description 请使用 tipsWrapperProps 属性配置
1220
- * ```
1221
- * 会在 title 之后展示一个 icon,hover 之后提示一些信息
1222
- * 1. title为string类型有效
1223
- * 2. hoverArea 默认值:icon
1224
- * ```
1225
- */
1226
- tooltip?: string | {
1227
- content: string;
1228
- icon?: ReactElement;
1229
- hoverArea?: "icon" | "all";
1230
- };
1231
- dataIndex?: keyof T | (string & {});
1232
- /**
1233
- * 会在 title 之后展示一个 icon
1234
- * ```
1235
- * 1. title为string类型有效
1236
- * 2. 可为icon添加提示效果
1237
- * 3. 可为icon添加点击事件
1238
- * ```
1239
- */
1240
- tipsWrapperProps?: string | TipsWrapperProps;
1241
- };
1242
1252
  export type EasyTableTableProps<T> = Omit<TableProps<TAny>, "dataSource" | "loading" | "rowKey" | "columns"> & {
1243
1253
  children?: ReactElement | ReactElement[];
1244
1254
  /**
@@ -1682,6 +1692,7 @@ export type fieldConfigFunctionParams = {
1682
1692
  tableRowIndex: number;
1683
1693
  name: EditableTableName;
1684
1694
  tableRowName: EditableTableName;
1695
+ getTableRowData: () => TPlainObject;
1685
1696
  };
1686
1697
  /**
1687
1698
  * antd 默认render功能此处不能使用
@@ -1878,6 +1889,7 @@ export type FbaAppLoadingProps = {
1878
1889
  export declare const FbaApp: ((props: {
1879
1890
  children: import("react").ReactNode;
1880
1891
  }) => import("react/jsx-runtime").JSX.Element) & {
1892
+ /** 不支持多次弹框,第二个弹框可使用useDialogDrawer2 */
1881
1893
  useDialogDrawer: () => {
1882
1894
  appDialogDrawer: {
1883
1895
  open: (data: FbaAppDrawerProps) => {
@@ -1894,6 +1906,7 @@ export declare const FbaApp: ((props: {
1894
1906
  close: () => void;
1895
1907
  };
1896
1908
  };
1909
+ /** 不支持多次弹框,第二个弹框可使用useDialogModal2 */
1897
1910
  useDialogModal: () => {
1898
1911
  appDialogModal: {
1899
1912
  open: (data: FbaAppModalProps) => {
@@ -1910,6 +1923,7 @@ export declare const FbaApp: ((props: {
1910
1923
  close: () => void;
1911
1924
  };
1912
1925
  };
1926
+ /** 不支持多次弹框 */
1913
1927
  useDialogConfirm: () => {
1914
1928
  appDialogConfirm: {
1915
1929
  open: (data: FbaAppModalProps) => {
@@ -1918,6 +1932,7 @@ export declare const FbaApp: ((props: {
1918
1932
  close: () => void;
1919
1933
  };
1920
1934
  };
1935
+ /** 不支持多次弹框 */
1921
1936
  useDialogAlert: () => {
1922
1937
  appDialogAlert: {
1923
1938
  open: (data: FbaAppAlertProps) => {
@@ -1926,6 +1941,7 @@ export declare const FbaApp: ((props: {
1926
1941
  close: () => void;
1927
1942
  };
1928
1943
  };
1944
+ /** 不支持多次弹框 */
1929
1945
  useDialogLoading: () => {
1930
1946
  appDialogLoading: {
1931
1947
  open: (data?: FbaAppLoadingProps | undefined) => {
@@ -2345,6 +2361,8 @@ export type LabelValueLayoutProps = {
2345
2361
  bordered?: boolean;
2346
2362
  className?: string;
2347
2363
  style?: CSSProperties;
2364
+ /** 边框 row 内边距 */
2365
+ borderedRowPadding?: CSSProperties["padding"];
2348
2366
  };
2349
2367
  /**
2350
2368
  * options[].span 是 Description.Item 的数量。 span={2} 会占用两个 DescriptionItem 的宽度
@@ -3462,6 +3480,7 @@ export type TipsTitleProps = {
3462
3480
  /** 配置 helpIcon 后,此参数失效 */
3463
3481
  onHelp?: () => void;
3464
3482
  hidden?: boolean;
3483
+ borderColor?: string;
3465
3484
  };
3466
3485
  export declare const TipsTitle: (props: TipsTitleProps) => import("react/jsx-runtime").JSX.Element | null;
3467
3486
  export type TreeSelectorWrapperValue = string | number | Array<string | number> | TPlainObject<string | number> | Array<TPlainObject<string | number>>;
@@ -3800,6 +3819,10 @@ export type TreeWrapperProps = Omit<TreeProps, "treeData" | "onExpand" | "select
3800
3819
  * ```
3801
3820
  */
3802
3821
  labelRender?: (nodeData: TPlainObject) => ReactElement;
3822
+ /**
3823
+ * 自定义搜索规则
3824
+ */
3825
+ customSearchRule?: (nodeData: TPlainObject, searchValue?: string) => boolean;
3803
3826
  };
3804
3827
  export type TreeWrapperRefApi = {
3805
3828
  onClearSelectorList: () => void;
@@ -3822,77 +3845,8 @@ export type TreeWrapperRefApi = {
3822
3845
  * 6. 内置 onDrop 事件已处理数组排序,通过 onDropNodeHandle 事件可获取操作节点排序数据;自定义onDrop后,内置onDrop失效
3823
3846
  * ```
3824
3847
  */
3825
- export declare const TreeWrapper: import("react").ForwardRefExoticComponent<Omit<import("antd").TreeProps<import("antd").TreeDataNode>, "multiple" | "icon" | "onSelect" | "onExpand" | "checkedKeys" | "fieldNames" | "defaultSelectedKeys" | "selectedKeys" | "loadData" | "treeData" | "defaultExpandParent" | "defaultCheckedKeys" | "onCheck"> & {
3826
- modelKey: string;
3827
- fieldNames?: {
3828
- label?: string | undefined;
3829
- value?: string | undefined;
3830
- children?: string | undefined;
3831
- list?: string | undefined;
3832
- } | undefined;
3833
- effectDependencyList?: import("react").DependencyList | undefined;
3834
- serviceConfig?: {
3835
- params?: import("@flatbiz/utils").TPlainObject | undefined;
3836
- requiredParamsKeys?: string[] | undefined;
3837
- onRequest?: ((params?: any) => any) | undefined;
3838
- onRequestResultAdapter?: ((respData: any) => import("@flatbiz/utils").TPlainObject[]) | undefined;
3839
- } | undefined;
3840
- loadDataFlag?: boolean | undefined;
3841
- loadDataServiceConfig?: {
3842
- getParams?: ((dataItem: import("@flatbiz/utils").TPlainObject) => import("@flatbiz/utils").TPlainObject) | undefined;
3843
- onRequest: (params: import("@flatbiz/utils").TPlainObject) => any;
3844
- onRequestResultAdapter?: ((respData: any) => import("@flatbiz/utils").TPlainObject[]) | undefined;
3845
- } | undefined;
3846
- selectorTreeList?: import("@flatbiz/utils").TPlainObject[] | undefined;
3847
- onSelectorTreeListChange?: ((dataList: import("@flatbiz/utils").TPlainObject[]) => void) | undefined;
3848
- onRequestResponseChange?: ((data: any) => void) | undefined;
3849
- onChange?: ((selectedKey?: (string | number | (string | number)[] | import("@flatbiz/utils").TPlainObject<string | number> | import("@flatbiz/utils").TPlainObject<string | number>[]) | undefined, operateNodeData?: import("@flatbiz/utils").TPlainObject | import("@flatbiz/utils").TPlainObject[] | undefined, operateAllNodeDataList?: import("@flatbiz/utils").TPlainObject[] | undefined, extraData?: import("@flatbiz/utils").TPlainObject | undefined) => void) | undefined;
3850
- searchValue?: string | undefined;
3851
- checkableResponseParentNode?: boolean | undefined;
3852
- menuLayoutType?: "tile" | "fold" | undefined;
3853
- getMenuOptions?: ((dataItem: import("@flatbiz/utils").TPlainObject) => DropdownMenuItem[] | ButtonOperateItem[]) | undefined;
3854
- menuOptions?: {
3855
- tile?: ((dataItem: import("@flatbiz/utils").TPlainObject) => ButtonOperateProps) | undefined;
3856
- fold?: ((dataItem: import("@flatbiz/utils").TPlainObject) => DropdownMenuItem[]) | undefined;
3857
- } | undefined;
3858
- menuTriggerType?: "click" | "hover" | undefined;
3859
- menus?: ((dataItem: any) => ButtonOperateProps) | undefined;
3860
- showSearch?: boolean | undefined;
3861
- onSearchValueChange?: ((searchValue?: string | undefined) => void) | undefined;
3862
- searchPlaceholder?: string | undefined;
3863
- searchStyle?: import("react").CSSProperties | undefined;
3864
- icon?: ((data: {
3865
- [key: string]: any;
3866
- isParent: boolean;
3867
- isLeaf: boolean;
3868
- }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) | undefined;
3869
- requestMessageConfig?: Partial<Record<TRequestStatus, string>> | undefined;
3870
- value?: (string | number | (string | number)[] | import("@flatbiz/utils").TPlainObject<string | number> | import("@flatbiz/utils").TPlainObject<string | number>[]) | undefined;
3871
- labelInValue?: boolean | undefined;
3872
- labelInValueFieldNames?: {
3873
- label: string;
3874
- value: string;
3875
- } | undefined;
3876
- disabledCanUse?: boolean | undefined;
3877
- treeItemDataAdapter?: ((dataItem: import("@flatbiz/utils").TPlainObject) => import("@flatbiz/utils").TPlainObject) | undefined;
3878
- searchExtraElement?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
3879
- initRootExpand?: boolean | undefined;
3880
- searchResultType?: "filter" | "highlight" | undefined;
3881
- onDropNodeHandle?: ((result: {
3882
- parentId?: string | number | undefined;
3883
- id: string | number;
3884
- index: number;
3885
- }) => void) | undefined;
3886
- onDropPrev?: ((info: any) => boolean) | undefined;
3887
- labelRender?: ((nodeData: import("@flatbiz/utils").TPlainObject) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) | undefined;
3888
- } & import("react").RefAttributes<TreeWrapperRefApi>> & {
3889
- /**
3890
- * 获取树形原数据
3891
- * ```
3892
- * 参数 modelKey 与 TreeWrapper属性 modelKey相同,才能获取数据
3893
- * ```
3894
- */
3895
- getTreeDataList: (modelKey: string) => import("@flatbiz/utils").TPlainObject[];
3848
+ export declare const TreeWrapper: ForwardRefExoticComponent<TreeWrapperProps & RefAttributes<TreeWrapperRefApi>> & {
3849
+ getTreeDataList: (modelKey: string) => TPlainObject[];
3896
3850
  };
3897
3851
 
3898
3852
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.2.97",
3
+ "version": "4.2.99",
4
4
  "description": "flat-biz ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -49,22 +49,23 @@
49
49
  "@wove/react": "^1.2.23",
50
50
  "antd": "5.5.1",
51
51
  "dayjs": "1.11.9",
52
- "dequal": "^2.0.3",
52
+ "dequal": "2.0.3",
53
53
  "react": "18.2.0",
54
54
  "react-dom": "18.2.0",
55
55
  "ahooks": "^3.7.5",
56
56
  "react-is": "^18.2.0"
57
57
  },
58
58
  "dependencies": {
59
- "dequal": "^2.0.3",
60
- "pubsub-js": "^1.9.4",
61
- "@tinymce/tinymce-react": "^4.3.0",
59
+ "dequal": "2.0.3",
60
+ "pubsub-js": "1.9.4",
61
+ "@tinymce/tinymce-react": "4.3.0",
62
62
  "@dnd-kit/core": "^6.0.8",
63
63
  "@dnd-kit/modifiers": "^6.0.1",
64
64
  "@dnd-kit/sortable": "^7.0.2",
65
65
  "@dnd-kit/utilities": "^3.2.1",
66
66
  "use-intl": "3.0.0-rc.6",
67
- "react-split": "2.0.14"
67
+ "react-split": "2.0.14",
68
+ "react-is": "^18.2.0"
68
69
  },
69
70
  "gitHead": "4378d433b73ee28fd7cb4c64bed8571f993eb5a9"
70
71
  }