@flatbiz/antd 4.2.85 → 4.2.87

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.
Files changed (68) hide show
  1. package/esm/button-operate/index.js +2 -1
  2. package/esm/button-operate/index.js.map +1 -1
  3. package/esm/button-wrapper/index.js +2 -1
  4. package/esm/button-wrapper/index.js.map +1 -1
  5. package/esm/card-wrapper/index.css +1 -0
  6. package/esm/card-wrapper/index.js +5 -0
  7. package/esm/card-wrapper/index.js.map +1 -0
  8. package/esm/config-provider-wrapper/index.js +2 -1
  9. package/esm/config-provider-wrapper/index.js.map +1 -1
  10. package/esm/create-drawer-wrapper-model/index.js.map +1 -1
  11. package/esm/create-modal-wrapper-model/index.js.map +1 -1
  12. package/esm/dialog-alert/index.js +2 -1
  13. package/esm/dialog-alert/index.js.map +1 -1
  14. package/esm/dialog-confirm/index.js +2 -1
  15. package/esm/dialog-confirm/index.js.map +1 -1
  16. package/esm/dialog-drawer/index.js +2 -1
  17. package/esm/dialog-drawer/index.js.map +1 -1
  18. package/esm/dialog-drawer-content/index.js +2 -1
  19. package/esm/dialog-drawer-content/index.js.map +1 -1
  20. package/esm/dialog-loading/index.js.map +1 -1
  21. package/esm/dialog-modal/index.js +2 -1
  22. package/esm/dialog-modal/index.js.map +1 -1
  23. package/esm/drawer-wrapper/index.js.map +1 -1
  24. package/esm/dropdown-menu-wrapper/index.js +2 -1
  25. package/esm/dropdown-menu-wrapper/index.js.map +1 -1
  26. package/esm/easy-table/index.js +2 -1
  27. package/esm/easy-table/index.js.map +1 -1
  28. package/esm/editable-table/index.js +10 -1
  29. package/esm/editable-table/index.js.map +1 -1
  30. package/esm/fba-app/index.css +1 -1
  31. package/esm/fba-app/index.js +3 -1
  32. package/esm/fba-app/index.js.map +1 -1
  33. package/esm/fba-hooks/index.js +1 -1
  34. package/esm/fba-hooks/index.js.map +1 -1
  35. package/esm/flex-layout/index.js.map +1 -1
  36. package/esm/index-ac189a77.js +3 -0
  37. package/esm/index-ac189a77.js.map +1 -0
  38. package/esm/index.js +6 -5
  39. package/esm/label-value-layout/index.css +1 -1
  40. package/esm/label-value-layout/index.js +1 -1
  41. package/esm/label-value-layout/index.js.map +1 -1
  42. package/esm/local-loading/index.js.map +1 -1
  43. package/esm/pre-defined-class-name/index.css +1 -1
  44. package/esm/rich-text-editor/index.js +1 -1
  45. package/esm/rich-text-editor/index.js.map +1 -1
  46. package/esm/rule-describe/index.js +1 -1
  47. package/esm/rule-describe/index.js.map +1 -1
  48. package/esm/selector-wrapper/index.js +1 -1
  49. package/esm/selector-wrapper/index.js.map +1 -1
  50. package/esm/simple-layout/index.css +1 -1
  51. package/esm/simple-layout/index.js.map +1 -1
  52. package/esm/table-cell-render/index.js +2 -1
  53. package/esm/table-cell-render/index.js.map +1 -1
  54. package/esm/tag-list-select/index.js +1 -1
  55. package/esm/tag-list-select/index.js.map +1 -1
  56. package/esm/text-css-ellipsis/index.css +1 -1
  57. package/esm/text-css-ellipsis/index.js +1 -1
  58. package/esm/text-css-ellipsis/index.js.map +1 -1
  59. package/esm/text-overflow-render/index.js +2 -1
  60. package/esm/text-overflow-render/index.js.map +1 -1
  61. package/esm/tips-title/index.css +1 -1
  62. package/esm/tree-selector-wrapper/index.js.map +1 -1
  63. package/esm/tree-wrapper/index.css +1 -1
  64. package/esm/tree-wrapper/index.js +2 -1
  65. package/esm/tree-wrapper/index.js.map +1 -1
  66. package/esm/types/index.js.map +1 -1
  67. package/index.d.ts +208 -121
  68. package/package.json +4 -3
package/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import { API, ModelType } from '@dimjs/model';
6
6
  import { PlainObject } from '@dimjs/utils';
7
7
  import { DateFormatType, TAny, TNoopDefine, TPlainObject } from '@flatbiz/utils';
8
8
  import { IAllProps } from '@tinymce/tinymce-react';
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
+ import { ButtonProps, CardProps, 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';
10
10
  import { ConfigProviderProps } from 'antd/es/config-provider';
11
11
  import { PickerDateProps, RangePickerDateProps } from 'antd/es/date-picker/generatePicker';
12
12
  import { FormListProps } from 'antd/es/form';
@@ -73,8 +73,21 @@ export type ButtonWrapperProps = Omit<ButtonProps, "onClick"> & {
73
73
  * @returns
74
74
  */
75
75
  export declare const ButtonWrapper: (props: ButtonWrapperProps) => import("react/jsx-runtime").JSX.Element | null;
76
+ export type FormItemNamePath = string | number | Array<string | number>;
77
+ export type TLocale = "en" | "zh-cn";
78
+ export type TFbaLocale = {
79
+ TreeWrapper?: {
80
+ /** 数据加载异常默认文案 */
81
+ requestError?: string;
82
+ };
83
+ FbaDialogModal?: {
84
+ cancelText?: string;
85
+ };
86
+ };
76
87
  export type ConfigProviderWrapperProps = Omit<ConfigProviderProps, "locale"> & {
77
- locale?: "en" | "zh-cn";
88
+ locale?: TLocale;
89
+ /** 自定义国际化数据 */
90
+ customLocaleMessage?: Partial<TFbaLocale>;
78
91
  };
79
92
  export declare const ConfigProviderWrapper: (props: ConfigProviderWrapperProps) => import("react/jsx-runtime").JSX.Element;
80
93
  export type DialogModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContainer" | "open" | "open" | "okButtonProps" | "cancelButtonProps"> & {
@@ -99,33 +112,16 @@ export type DialogModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContai
99
112
  titleExtra?: ReactElement;
100
113
  };
101
114
  /**
102
- * 函数式调用弹框;初始化后,内容无法更新
103
- *```
104
- * 1. 基础使用方式
105
- * dialogModal.open({
106
- * title: '我是弹框',
107
- * content: <div>我是内容</div>,
108
- * });
109
- * ```
110
- * ```
111
- * ***************************
112
- * 2. 结合内置form使用,可在onOK、onCancel获取form对象
113
- * dialogModal.open({
114
- * title: '我是弹框',
115
- * content: (form, operate) => {
116
- * return (
117
- * <Form form={form}>
118
- * <Form.Item name="useName">
119
- * <Input placeholder="请输入" />
120
- * </Form.Item>
121
- * </Form>
122
- * );
123
- * },
124
- * onOK: (form) => {
125
- * console.log('content form数据', form.getFieldsValue());
126
- * return Promise.resolve();
127
- * },
128
- * });
115
+ *
116
+ * @deprecated 已过期
117
+ * ```
118
+ * 1. 为什么过期
119
+ * dialogModal.open 打开的内容无法适配兼容自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
120
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
121
+ * 2. 请使用
122
+ * const { appDialogModal } = FbaApp.useDialogModal();
123
+ * appDialogModal.open({})
124
+ *
129
125
  * ```
130
126
  */
131
127
  export declare const dialogModal: {
@@ -217,6 +213,14 @@ export declare const ButtonOperateItemContent: (props: Pick<ButtonOperateItem, "
217
213
  * ```
218
214
  */
219
215
  export declare const ButtonOperate: FC<ButtonOperateProps>;
216
+ /**
217
+ * ```
218
+ * 主要为了解决,标题固定,内容滚动
219
+ * ```
220
+ * @param props
221
+ * @returns
222
+ */
223
+ export declare const CardWrapper: (props: CardProps) => import("react/jsx-runtime").JSX.Element;
220
224
  export type TRequestStatus = "request-init" | "request-progress" | "request-success" | "request-error" | "no-dependencies-params";
221
225
  export type TRequestStatusProps = {
222
226
  status?: TRequestStatus;
@@ -365,7 +369,7 @@ export interface DrawerActionsParamType {
365
369
  * drawer弹窗模型
366
370
  * @param key 唯一值必传
367
371
  * @returns
368
- * @deprecated 废弃 DrawerWrapper 4.3.0版本移除, 请使用 dialogDrawer
372
+ * @deprecated 废弃 DrawerWrapper 4.3.0版本移除, 请使用 const { appDialogModal } = FbaApp.useDialogModal();
369
373
  */
370
374
  export declare const createDrawerWrapperModel: (key: string) => API<ModelType<DrawerStateType, DrawerActionsParamType, any>>;
371
375
  export interface ModalStateType {
@@ -389,7 +393,7 @@ export interface ModalActionsParamType {
389
393
  /**
390
394
  * modal弹窗模型
391
395
  * @param key 唯一值必传
392
- * @deprecated 废弃 ModalWrapper 4.3.0版本移除,请使用 dialogModal
396
+ * @deprecated 废弃 ModalWrapper 4.3.0版本移除,请使用 const { appDialogModal } = FbaApp.useDialogModal();
393
397
  */
394
398
  export declare const createModalWrapperModel: (key: string) => API<ModelType<ModalStateType, ModalActionsParamType, any>>;
395
399
  export type CssHoverProps = {
@@ -503,7 +507,6 @@ export type DateRangePickerWrapperProps = Omit<RangePickerDateProps<TAny>, "valu
503
507
  * ```
504
508
  */
505
509
  export declare const DateRangePickerWrapper: (props: DateRangePickerWrapperProps) => import("react/jsx-runtime").JSX.Element;
506
- export type FormItemNamePath = string | number | Array<string | number>;
507
510
  export type DateRangePickerWrapperFormItemProps = Omit<FormItemProps, "name"> & {
508
511
  /**
509
512
  * 开始的时间name
@@ -530,11 +533,33 @@ export declare const DateRangePickerWrapperFormItem: (props: DateRangePickerWrap
530
533
  export type DialogAlertProps = Omit<DialogModalProps, "onOk" | "cancelHidden" | "cancelButtonProps" | "onCancel" | "onClick"> & {
531
534
  onClick?: (e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
532
535
  };
536
+ /**
537
+ * @deprecated 已过期
538
+ * ```
539
+ * 1. 为什么过期
540
+ * dialogAlert.open 打开的内容无法配兼自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
541
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
542
+ * 2. 请使用
543
+ * const { appDialogModal } = FbaApp.useDialogModal();
544
+ * appDialogModal.open({})
545
+ * ```
546
+ */
533
547
  export declare const dialogAlert: {
534
548
  open: (props: DialogAlertProps) => {
535
549
  close: () => void;
536
550
  };
537
551
  };
552
+ /**
553
+ * @deprecated 已过期
554
+ * ```
555
+ * 1. 为什么过期
556
+ * dialogConfirm.open 打开的内容无法配兼自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
557
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
558
+ * 2. 请使用
559
+ * const { appDialogModal } = FbaApp.useDialogModal();
560
+ * appDialogModal.open({})
561
+ * ```
562
+ */
538
563
  export declare const dialogConfirm: {
539
564
  open: (props: DialogModalProps) => {
540
565
  close: () => void;
@@ -558,36 +583,16 @@ export type DialogDrawerProps = Omit<DrawerProps, "onOk" | "onCancel" | "getCont
558
583
  extra?: ReactNode | ((form: FormInstance) => ReactElement);
559
584
  };
560
585
  /**
561
- * 函数式调用弹框;初始化后,内容无法更新
562
- *```
563
- * 1. 基础使用方式
564
- * dialogDrawer.open({
565
- * title: '我是标题',
566
- * content: <div>我是内容</div>,
567
- * });
568
- * ```
569
- * ```
570
- * ***************************
571
- * 2. 结合内置form使用,可在onOK、onCancel获取form对象
572
- * dialogDrawer.open({
573
- * title: '我是标题',
574
- * content: (form, operate) => {
575
- * return (
576
- * <Form form={form}>
577
- * <Form.Item name="useName">
578
- * <Input placeholder="请输入" />
579
- * </Form.Item>
580
- * </Form>
581
- * );
582
- * },
583
- * onOk: (form) => {
584
- * console.log('content form数据', form.getFieldsValue());
585
- * return Promise.resolve();
586
- * },
587
- * });
588
586
  *
589
- * 注意:
590
- * 1. 设置operateRender后,需要自定义操作按钮,onOk、onCancel、okText、cancelText、okButtonExtraProps、cancelButtonExtraProps配置失效
587
+ * @deprecated 已过期
588
+ * ```
589
+ * 1. 为什么过期
590
+ * dialogConfirm.open 打开的内容无法配兼自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
591
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
592
+ * 2. 请使用
593
+ * const { appDialogModal } = FbaApp.useDialogModal();
594
+ * appDialogModal.open({})
595
+ *
591
596
  * ```
592
597
  */
593
598
  export declare const dialogDrawer: {
@@ -629,6 +634,19 @@ export type DialogLoadingProps = {
629
634
  message?: string;
630
635
  mask?: boolean;
631
636
  };
637
+ /**
638
+ *
639
+ * @deprecated 已过期
640
+ * ```
641
+ * 1. 为什么过期
642
+ * dialogLoading.open 打开的内容无法配兼自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
643
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
644
+ * 2. 请使用
645
+ * const { appDialogModal } = FbaApp.useDialogModal();
646
+ * appDialogModal.open({})
647
+ *
648
+ * ```
649
+ */
632
650
  export declare const dialogLoading: {
633
651
  open: (props?: DialogLoadingProps) => {
634
652
  close: () => void;
@@ -871,7 +889,7 @@ declare const DrawerWrapperContent: (props: {
871
889
  declare const DrawerWrapperFooter: (props: any) => import("react/jsx-runtime").JSX.Element;
872
890
  /**
873
891
  * 弹窗机制
874
- * @deprecated 已过时 4.3.0版本移除;请使用 dialogDrawer.open
892
+ * @deprecated 已过时 4.3.0版本移除;请使用 const { appDialogModal } = FbaApp.useDialogModal();
875
893
  * ```
876
894
  * 1. 默认 destroyOnClose = true
877
895
  * 2. 默认 forceRender = false
@@ -1300,15 +1318,17 @@ export type SelectorWrapperProps = Omit<SelectProps, "onSearch" | "notFoundConte
1300
1318
  /**
1301
1319
  * 参数Key映射
1302
1320
  * ```
1303
- * 1. list 为 onRequest 返回数据中列表key值,可多级取值,例如: 'a.b.c'
1304
- * 2. 配置 serviceConfig.onRequestResultAdapter后,fieldNames.list配置失效
1321
+ * 1. 默认值:value=value、label=label、disabled=disabled
1322
+ * 2. list 为 onRequest 返回数据中列表key值,可多级取值,例如: 'a.b.c'
1323
+ * 3. 配置 serviceConfig.onRequestResultAdapter后,fieldNames.list配置失效
1324
+ * 4. 如果没有配置list,可说明接口返回为数组
1305
1325
  * ```
1306
1326
  */
1307
1327
  fieldNames?: {
1308
- label: string;
1309
- value: string;
1310
- disabled?: string;
1311
1328
  list?: string;
1329
+ label?: string;
1330
+ value?: string;
1331
+ disabled?: string;
1312
1332
  };
1313
1333
  /**
1314
1334
  * 请求服务需求的数据
@@ -1339,7 +1359,10 @@ export type SelectorWrapperProps = Omit<SelectProps, "onSearch" | "notFoundConte
1339
1359
  * 2. 可配置label、value
1340
1360
  * ```
1341
1361
  */
1342
- showAllOption?: true | TPlainObject<string | number>;
1362
+ showAllOption?: true | {
1363
+ label: string;
1364
+ value: string | number;
1365
+ };
1343
1366
  onLabelRenderAdapter?: (dataItem: TPlainObject) => string | ReactElement;
1344
1367
  onChange?: (value?: SelectorWrapperValue, selectedList?: TPlainObject[] | TPlainObject) => void;
1345
1368
  showIcon?: boolean;
@@ -1373,6 +1396,37 @@ export type SelectorWrapperProps = Omit<SelectProps, "onSearch" | "notFoundConte
1373
1396
  * ```
1374
1397
  */
1375
1398
  export declare const SelectorWrapper: (props: SelectorWrapperProps) => import("react/jsx-runtime").JSX.Element;
1399
+ export type SwitchWrapperValue = string | number | boolean;
1400
+ export type SwitchWrapperProps = Omit<SwitchProps, "checked" | "defaultChecked" | "onChange"> & {
1401
+ value?: SwitchWrapperValue;
1402
+ checkedValue: SwitchWrapperValue;
1403
+ unCheckedValue: SwitchWrapperValue;
1404
+ onChange?: (value: SwitchWrapperValue) => void;
1405
+ tooltipProps?: Omit<TooltipProps, "title">;
1406
+ tooltipTitle?: string | ((value?: SwitchWrapperValue) => string | undefined);
1407
+ serviceConfig?: {
1408
+ onRequest: (value: SwitchWrapperValue) => TAny;
1409
+ message?: {
1410
+ success?: string;
1411
+ defaultError?: string;
1412
+ };
1413
+ };
1414
+ };
1415
+ /**
1416
+ * 解决Switch只能接收boolean的限制,与Form.Item结合使用最佳
1417
+ * ```
1418
+ * 1. value 为状态值,不局限于boolean,可以为 [string | number | boolean]
1419
+ * 2. checkedValue 选中值
1420
+ * 3. unCheckedValue 未选中值
1421
+ * 4. 与 Form.Item 结合使用,不再需要配置 valuePropName
1422
+ * <Form.Item name="fieldName">
1423
+ * <SwitchWrapper checkedValue={2} unCheckedValue={1} />
1424
+ * </Form.Item>
1425
+ * 5. 可设置tooltip效果数据显示
1426
+ * 6. 可设置 serviceConfig 配置服务调用交互
1427
+ * ```
1428
+ */
1429
+ export declare const SwitchWrapper: (props: SwitchWrapperProps) => import("react/jsx-runtime").JSX.Element;
1376
1430
  export type UploadWrapperFileItem = {
1377
1431
  uid: string;
1378
1432
  name: string;
@@ -1464,6 +1518,10 @@ export type EditableFileUploadConfig = {
1464
1518
  type: "uploadWrapper";
1465
1519
  editableComptProps: UploadWrapperProps;
1466
1520
  };
1521
+ export type EditableSwitchWrapperConfig = {
1522
+ type: "switchWrapper";
1523
+ editableComptProps: SwitchWrapperProps;
1524
+ };
1467
1525
  /**
1468
1526
  * 自定义编辑组件
1469
1527
  * ```
@@ -1490,7 +1548,7 @@ export type EditableCustomConfig = {
1490
1548
  tableRowIndex: number;
1491
1549
  }) => ReactElement;
1492
1550
  };
1493
- export type EditableTypeConfig = EditableCustomConfig | EditableInputConfig | EditableSelectWrapperConfig | EditableDatePickerWrapperConfig | EditableDateRangePickerWrapperConfig | EditableCheckboxGroupConfig | EditableTextareaConfig | EditableInputNumberConfig | EditableRadioGroupConfig | EditableFileUploadConfig;
1551
+ export type EditableTypeConfig = EditableCustomConfig | EditableInputConfig | EditableSelectWrapperConfig | EditableDatePickerWrapperConfig | EditableDateRangePickerWrapperConfig | EditableCheckboxGroupConfig | EditableTextareaConfig | EditableInputNumberConfig | EditableRadioGroupConfig | EditableFileUploadConfig | EditableSwitchWrapperConfig;
1494
1552
  export type FieldSingleConfig = {
1495
1553
  editable?: boolean | ((data: {
1496
1554
  tableRowIndex: number;
@@ -1692,6 +1750,7 @@ export type FbaAppModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContai
1692
1750
  * ```
1693
1751
  */
1694
1752
  bodyHeightPercent?: number;
1753
+ titleExtra?: ReactElement;
1695
1754
  };
1696
1755
  export type FbaAppAlertProps = Omit<FbaAppModalProps, "onOk" | "cancelHidden" | "cancelButtonProps" | "onCancel" | "onClick"> & {
1697
1756
  onClick?: (e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
@@ -1767,6 +1826,7 @@ export declare const fbaHooks: {
1767
1826
  S,
1768
1827
  import("react").Dispatch<import("react").SetStateAction<S>>
1769
1828
  ];
1829
+ useMemoCustom: <T_1>(fn: () => T_1, deps?: import("react").DependencyList | undefined) => T_1;
1770
1830
  };
1771
1831
  declare function attachPropertiesToComponent<C, P extends Record<string, unknown>>(component: C, properties: P): C & P;
1772
1832
  export declare const fbaUtils: {
@@ -1816,21 +1876,21 @@ export type FileSelectProps = {
1816
1876
  export declare const FileSelect: (props: FileSelectProps) => import("react/jsx-runtime").JSX.Element;
1817
1877
  export type FlexLayoutProps = {
1818
1878
  className?: string;
1819
- fullIndex?: number | number[];
1879
+ /** 子组件铺满的索引值,从0开始 */
1880
+ fullIndex: number | number[];
1881
+ /**方向,默认值vertical */
1820
1882
  direction?: "vertical" | "horizontal";
1821
1883
  onClick?: () => void;
1822
1884
  style?: CSSProperties;
1885
+ /** 间隙尺寸 */
1823
1886
  gap?: number;
1824
1887
  children?: ReactNode | null | Array<ReactNode | null>;
1825
1888
  };
1826
1889
  /**
1827
- * flex布局
1828
- * 1. direction:默认值vertical
1829
- * 2. gap间隙距离
1830
- * 3. fullIndex:指定children数组索引值对象flex=1
1831
- * 4. 为children添加key属性
1832
- * @param props
1833
- * @returns
1890
+ * flex布局,主要用于Flex结构性布局
1891
+ * ```
1892
+ * 4.2.87版本中将fullIndex改为了必填属性,如果在升级中遇到问题,不确定怎么写,可设置 fullIndex=[] 保持原样
1893
+ * ```
1834
1894
  */
1835
1895
  export declare const FlexLayout: (props: FlexLayoutProps) => import("react/jsx-runtime").JSX.Element;
1836
1896
  export type FormColProps = {
@@ -2100,14 +2160,14 @@ export type InputWrapperProps = Omit<InputProps, "defaultValue"> & {
2100
2160
  export declare const InputWrapper: (props: InputWrapperProps) => import("react/jsx-runtime").JSX.Element;
2101
2161
  export type LabelValueLayoutProps = {
2102
2162
  options: {
2103
- key?: string | number;
2104
2163
  label: string | ReactElement;
2105
- value?: string | number | ReactElement;
2164
+ value?: string | number | ReactElement | null;
2106
2165
  span?: number;
2107
2166
  hidden?: boolean;
2108
2167
  }[];
2109
2168
  labelWidth?: number | "auto";
2110
2169
  column?: number;
2170
+ /** 添加边框 */
2111
2171
  bordered?: boolean;
2112
2172
  className?: string;
2113
2173
  style?: CSSProperties;
@@ -2118,7 +2178,7 @@ export type LabelValueLayoutProps = {
2118
2178
  */
2119
2179
  export declare const LabelValueLayout: (props: LabelValueLayoutProps) => import("react/jsx-runtime").JSX.Element;
2120
2180
  export type LocalLoadingServiceConfig = {
2121
- onRequest: (params?: TAny) => Promise<TPlainObject>;
2181
+ onRequest: (params?: TAny) => Promise<TAny>;
2122
2182
  params?: TPlainObject;
2123
2183
  /** 标记serviceConfig.params中无效参数,被设置的params key 不传入服务接口入参 */
2124
2184
  invalidParamKey?: string[];
@@ -2398,6 +2458,8 @@ export interface RichTextEditorProps extends Omit<IAllProps, "onChange" | "init"
2398
2458
  /** 工具栏添加;自定义toolbar后失效 */
2399
2459
  toolbar_append?: string;
2400
2460
  };
2461
+ /** 点击全屏按钮回调 */
2462
+ onFullScreenChange?: (state?: boolean) => void;
2401
2463
  }
2402
2464
  /**
2403
2465
  * 富文本编辑器,配置参考tinymce https://www.tiny.cloud/docs/tinymce/6
@@ -2617,6 +2679,9 @@ export type SimpleLayoutProps = {
2617
2679
  style?: CSSProperties;
2618
2680
  title?: string | ReactElement;
2619
2681
  desc?: string | ReactElement | string[] | ReactElement[];
2682
+ /**
2683
+ * @deprecated 已过期,请使用form className 属性 preDefinedClassName.form.xxx
2684
+ */
2620
2685
  formLabelAlign?: "left" | "right";
2621
2686
  /**
2622
2687
  * layoutType 布局类型
@@ -2750,37 +2815,6 @@ export type SwitchConfirmWrapperProps = Omit<SwitchProps, "defaultChecked" | "on
2750
2815
  * ```
2751
2816
  */
2752
2817
  export declare const SwitchConfirmWrapper: (props: SwitchConfirmWrapperProps) => import("react/jsx-runtime").JSX.Element;
2753
- export type SwitchWrapperValue = string | number | boolean;
2754
- export type SwitchWrapperProps = Omit<SwitchProps, "checked" | "defaultChecked" | "onChange"> & {
2755
- value?: SwitchWrapperValue;
2756
- checkedValue: SwitchWrapperValue;
2757
- unCheckedValue: SwitchWrapperValue;
2758
- onChange?: (value: SwitchWrapperValue) => void;
2759
- tooltipProps?: Omit<TooltipProps, "title">;
2760
- tooltipTitle?: string | ((value?: SwitchWrapperValue) => string | undefined);
2761
- serviceConfig?: {
2762
- onRequest: (value: SwitchWrapperValue) => TAny;
2763
- message?: {
2764
- success?: string;
2765
- defaultError?: string;
2766
- };
2767
- };
2768
- };
2769
- /**
2770
- * 解决Switch只能接收boolean的限制,与Form.Item结合使用最佳
2771
- * ```
2772
- * 1. value 为状态值,不局限于boolean,可以为 [string | number | boolean]
2773
- * 2. checkedValue 选中值
2774
- * 3. unCheckedValue 未选中值
2775
- * 4. 与 Form.Item 结合使用,不再需要配置 valuePropName
2776
- * <Form.Item name="fieldName">
2777
- * <SwitchWrapper checkedValue={2} unCheckedValue={1} />
2778
- * </Form.Item>
2779
- * 5. 可设置tooltip效果数据显示
2780
- * 6. 可设置 serviceConfig 配置服务调用交互
2781
- * ```
2782
- */
2783
- export declare const SwitchWrapper: (props: SwitchWrapperProps) => import("react/jsx-runtime").JSX.Element;
2784
2818
  export type TagListSelectValue = string | number | boolean;
2785
2819
  export type TagListSelectDataItem = {
2786
2820
  label: string;
@@ -2791,7 +2825,7 @@ export type TagListSelectProps = {
2791
2825
  dataList: TagListSelectDataItem[];
2792
2826
  /** 颜色配置数据,例如:{ 1:'red', 2: 'blue'} key值与 dataList中value相同 */
2793
2827
  colorMap?: Record<string | number, string>;
2794
- value?: TagListSelectValue;
2828
+ value?: TagListSelectValue | TagListSelectValue[];
2795
2829
  /** 是否强制匹配,默认值false */
2796
2830
  forceMatch?: boolean;
2797
2831
  };
@@ -2911,9 +2945,11 @@ export declare const tableCellRender: {
2911
2945
  * render: (value) => {
2912
2946
  * return tableCellRender.selectorCell([{ label: '已开启', value: 1 ])(value)
2913
2947
  * }
2948
+ *
2949
+ * 其中value值可以是单个值或者数组;例如:'1' 或者 ['1', '2']
2914
2950
  * ```
2915
2951
  */
2916
- selectorCell: (selectorList: TagListSelectProps["dataList"], colorMap?: TagListSelectProps["colorMap"]) => (value: string | number) => import("react/jsx-runtime").JSX.Element;
2952
+ selectorCell: (selectorList: TagListSelectProps["dataList"], colorMap?: TagListSelectProps["colorMap"]) => (value?: TAny) => import("react/jsx-runtime").JSX.Element | null;
2917
2953
  /**
2918
2954
  * 单元格对象数据处理,支持多级处理
2919
2955
  * ```
@@ -2963,7 +2999,7 @@ export declare const tableCellRender: {
2963
2999
  label: string;
2964
3000
  value: TagListSelectValue;
2965
3001
  color?: string;
2966
- }[], colorMap?: Record<string | string, string>) => (value: string | number) => string | number | import("react/jsx-runtime").JSX.Element;
3002
+ }[], colorMap?: Record<string | string, string>) => (value?: TAny) => any;
2967
3003
  };
2968
3004
  export type TableScrollProps = {
2969
3005
  children: React.ReactNode;
@@ -3055,13 +3091,21 @@ export type TagWrapperProps = Omit<TagProps, "onClick"> & {
3055
3091
  */
3056
3092
  export declare const TagWrapper: (props: TagWrapperProps) => import("react/jsx-runtime").JSX.Element;
3057
3093
  export type CssTextEllipsisProps = {
3058
- text?: string;
3059
- width: number;
3094
+ text: string;
3095
+ width?: number;
3096
+ /** 隐藏tips */
3097
+ hideTips?: boolean;
3060
3098
  };
3061
3099
  /**
3062
- * 根据配置宽度显示数据,内容超过宽度截取,并在尾部添加...,被截取的添加Tooltip显示完整数据
3063
- * @param props
3064
- * @returns
3100
+ * 内容超过宽度截取,并在尾部添加...,被截取的添加Tooltip显示完整数据
3101
+ * ```
3102
+ * 1. 如果配置 width,则使用文本长度与width进行比较
3103
+ * 2. 如果没有配置 width,则使用文本长度与当前节点父节点宽度进行比较
3104
+ *
3105
+ * 注意:
3106
+ * 1. 当前节点父节点可能需要添加 overflow-x: hidden;
3107
+ * 2. 如果父节点设置flex-shrink会有影响,可复写flex-shrink: initial;
3108
+ * ```
3065
3109
  */
3066
3110
  export declare const TextCssEllipsis: (props: CssTextEllipsisProps) => import("react/jsx-runtime").JSX.Element;
3067
3111
  export type TextOverflowRenderProps = {
@@ -3260,7 +3304,17 @@ export type TreeSelectorWrapperProps = Omit<TreeSelectProps, "treeExpandedKeys"
3260
3304
  */
3261
3305
  onChange?: (selectedValue?: TreeSelectorWrapperValue, selectedData?: TPlainObject[] | TPlainObject, triggerInfo?: TPlainObject) => void;
3262
3306
  /**
3263
- * tree item 数据适配器
3307
+ * tree item 数据适配器,返回的数据会通过fieldNames配置取数据
3308
+ * ```
3309
+ * 1. 可用于设置disabled状态
3310
+ * onTreeItemDataAdapter: (dataItem) => {
3311
+ * if(dataItem.xx === xx){
3312
+ * dataItem['disabled] = true;
3313
+ * }
3314
+ * return dataItem;
3315
+ * }
3316
+ * 2. 可设置label数据显示
3317
+ * ```
3264
3318
  */
3265
3319
  onTreeItemDataAdapter?: (dataItem: TPlainObject) => TPlainObject;
3266
3320
  /** 自定义异常提示文案 */
@@ -3330,11 +3384,25 @@ export type TreeWrapperMenuItem = {
3330
3384
  icon?: ReactElement;
3331
3385
  };
3332
3386
  export type TreeWrapperProps = Omit<TreeProps, "treeData" | "onExpand" | "selectedKeys" | "checkedKeys" | "onCheck" | "onSelect" | "fieldNames" | "multiple" | "loadData" | "icon" | "defaultCheckedKeys" | "defaultExpandParent" | "defaultSelectedKeys"> & {
3387
+ /** 唯一值,用于缓存数据 */
3333
3388
  modelKey: string;
3389
+ /**
3390
+ * 字段映射
3391
+ * ```
3392
+ * 默认值:
3393
+ * label = 'label'
3394
+ * value = 'value'
3395
+ * children = 'children'
3396
+ *
3397
+ * 如果未设置list,则说明接口返回数据为数组
3398
+ * 如果返回数据存在多级,可通过设置 list='a.b.list'
3399
+ * ```
3400
+ */
3334
3401
  fieldNames?: {
3335
3402
  label?: string;
3336
3403
  value?: string;
3337
3404
  children?: string;
3405
+ list?: string;
3338
3406
  };
3339
3407
  /**
3340
3408
  * useEffect依赖项数组,用于重新发起获取接口数据
@@ -3348,7 +3416,13 @@ export type TreeWrapperProps = Omit<TreeProps, "treeData" | "onExpand" | "select
3348
3416
  * 是否开启异步加载
3349
3417
  */
3350
3418
  loadDataFlag?: boolean;
3351
- /** 异步加载数据配置 */
3419
+ /**
3420
+ * 异步加载数据配置
3421
+ * ```
3422
+ * 1. 会通过fieldNames配置label、value、children进行转义
3423
+ * 2. fieldNames.list 配置在此处无效
3424
+ * ```
3425
+ */
3352
3426
  loadDataServiceConfig?: TreeLoadDataServiceConfig;
3353
3427
  /**
3354
3428
  * 当设置selectorTreeList后,serviceConfig将失效
@@ -3418,10 +3492,14 @@ export type TreeWrapperProps = Omit<TreeProps, "treeData" | "onExpand" | "select
3418
3492
  icon?: (data: {
3419
3493
  isParent: boolean;
3420
3494
  isLeaf: boolean;
3495
+ [key: string]: TAny;
3421
3496
  }) => ReactElement;
3422
3497
  /**
3423
3498
  * 是否必选,最后一个不能取消
3424
3499
  */
3500
+ /**
3501
+ * 状态文案配置
3502
+ */
3425
3503
  requestMessageConfig?: TRequestStatusProps["messageConfig"];
3426
3504
  /**
3427
3505
  * value格式
@@ -3433,9 +3511,16 @@ export type TreeWrapperProps = Omit<TreeProps, "treeData" | "onExpand" | "select
3433
3511
  * ```
3434
3512
  */
3435
3513
  value?: TreeWrapperValue;
3514
+ /**
3515
+ * 选择的节点数据,是否包含label信息
3516
+ * ```
3517
+ * 默认选择的节点只有value数据
3518
+ * ```
3519
+ */
3436
3520
  labelInValue?: boolean;
3437
3521
  /**
3438
3522
  * ```
3523
+ * @deprecated 废弃
3439
3524
  * lableInValue = true,onChange输出数据字段名称,默认:{ label: string; value: string|number }
3440
3525
  * ```
3441
3526
  */
@@ -3515,6 +3600,7 @@ export declare const TreeWrapper: import("react").ForwardRefExoticComponent<Omit
3515
3600
  label?: string | undefined;
3516
3601
  value?: string | undefined;
3517
3602
  children?: string | undefined;
3603
+ list?: string | undefined;
3518
3604
  } | undefined;
3519
3605
  effectDependencyList?: import("react").DependencyList | undefined;
3520
3606
  serviceConfig?: {
@@ -3548,6 +3634,7 @@ export declare const TreeWrapper: import("react").ForwardRefExoticComponent<Omit
3548
3634
  searchPlaceholder?: string | undefined;
3549
3635
  searchStyle?: import("react").CSSProperties | undefined;
3550
3636
  icon?: ((data: {
3637
+ [key: string]: any;
3551
3638
  isParent: boolean;
3552
3639
  isLeaf: boolean;
3553
3640
  }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.2.85",
3
+ "version": "4.2.87",
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.2.1",
32
32
  "@dimjs/model-react": ">=1.2.1",
33
33
  "@dimjs/utils": ">=1.4.4",
34
- "@flatbiz/utils": ">=4.0.16",
34
+ "@flatbiz/utils": ">=4.0.17",
35
35
  "@wove/react": ">=1.2.23",
36
36
  "antd": ">=5.5.1",
37
37
  "dayjs": ">=1.11.9",
@@ -62,7 +62,8 @@
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
- "@dnd-kit/utilities": "^3.2.1"
65
+ "@dnd-kit/utilities": "^3.2.1",
66
+ "use-intl": "3.0.0-rc.6"
66
67
  },
67
68
  "gitHead": "4378d433b73ee28fd7cb4c64bed8571f993eb5a9"
68
69
  }