@flatbiz/antd 4.4.14 → 4.4.15

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
@@ -418,6 +418,14 @@ export type ButtonWrapperProps = Omit<ButtonProps, "onClick"> & {
418
418
  */
419
419
  export declare const ButtonWrapper: (props: ButtonWrapperProps) => import("react/jsx-runtime").JSX.Element | null;
420
420
  export type DialogModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContainer" | "open" | "open" | "okButtonProps" | "cancelButtonProps" | "footer"> & {
421
+ /**
422
+ * 内置尺寸,根据比例固定高度、宽度,默认:middle
423
+ * ```
424
+ * 1. 如果自定义了width、styles.body.height属性,size中的height、width将对应失效
425
+ * 2. 可传 null 值,取消内置尺寸
426
+ * ```
427
+ */
428
+ size?: "small" | "middle" | "large" | null;
421
429
  onOk?: (form: FormInstance, e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
422
430
  onCancel?: (form: FormInstance, e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
423
431
  content: string | ReactElement | ((form: FormInstance, operate: {
@@ -430,6 +438,7 @@ export type DialogModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContai
430
438
  cancelButtonProps?: Omit<ButtonWrapperProps, "hidden" | "children" | "onClick">;
431
439
  /**
432
440
  * 设置modal body height 为当前窗口height的百分比,例如:30
441
+ * @deprecated 已失效,可通过size属性设置
433
442
  * ```
434
443
  * 1. 最大值:80
435
444
  * 1. 设置bodyStyle.height 后,bodyHeightPercent失效
@@ -450,6 +459,7 @@ export type DialogModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContai
450
459
  * 3. 需要修改默认主题风格的场景,请使用
451
460
  * const { appDialogModal } = FbaApp.useDialogModal();
452
461
  * appDialogModal.open({})
462
+ * 4. 配置size属性可使用预设的弹窗尺寸
453
463
  * ```
454
464
  */
455
465
  export declare const dialogModal: {
@@ -1135,7 +1145,8 @@ export type DialogDrawerContentProps = {
1135
1145
  /**
1136
1146
  * 当dialogDrawer底部操作按钮在业务content内部时,使用
1137
1147
  * ```
1138
- * 1. 设置 footer 后,okHidden、cancelHidden、okButtonExtraProps、cancelButtonExtraProps、okText、cancelText、onOk、onCancel全部失效
1148
+ * 1. 只能与 dialogDrawer 配合使用;与 FbaApp.useDialogDrawer 配合使用无效
1149
+ * 2. 设置 footer 后,okHidden、cancelHidden、okButtonExtraProps、cancelButtonExtraProps、okText、cancelText、onOk、onCancel全部失效
1139
1150
  * ```
1140
1151
  */
1141
1152
  export declare const DialogDrawerContent: (props: DialogDrawerContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1778,6 +1789,35 @@ export declare const DragEditableTable: import("react").ForwardRefExoticComponen
1778
1789
  overIndex: number;
1779
1790
  }) => void) | undefined;
1780
1791
  } & import("react").RefAttributes<EditableTableRefApi>>;
1792
+ export type FormItemHorizontalUnionProps = {
1793
+ className?: string;
1794
+ style?: CSSProperties;
1795
+ label?: string | ReactElement;
1796
+ /** 水平布局元素 */
1797
+ groupConfigList: {
1798
+ hidden?: boolean;
1799
+ before?: ReactElement | string;
1800
+ /**
1801
+ * 设置宽度
1802
+ * ```
1803
+ * 1. 自适应可设置:auto
1804
+ * 2. 可设置具体数值
1805
+ * 3. 不设置会在铺满flex剩余空间
1806
+ * 4. 多个未设置会等分铺满剩余空间
1807
+ * ```
1808
+ */
1809
+ width?: number | string;
1810
+ mainItem: ReactElement;
1811
+ after?: ReactElement | string;
1812
+ }[];
1813
+ /** 水平布局原始之间的间距 */
1814
+ gap?: number;
1815
+ flexLayoutStyle?: CSSProperties;
1816
+ flexLayoutClassName?: string;
1817
+ hidden?: boolean;
1818
+ required?: boolean;
1819
+ colon?: boolean;
1820
+ };
1781
1821
  export type DragFormListContentProps = {
1782
1822
  /** Form.List item fieldData */
1783
1823
  formListFieldData: FormListFieldData;
@@ -1857,14 +1897,14 @@ export type DragFormListProps = {
1857
1897
  required?: boolean;
1858
1898
  width?: number;
1859
1899
  }[];
1860
- formListItemTitleClassName?: string;
1861
- formListItemTitleStyle?: CSSProperties;
1900
+ /** formListItemTitle HorizontalUnionProps 配置 */
1901
+ formListItemTitleHorizontalUnionProps?: Omit<FormItemHorizontalUnionProps, "groupConfigList">;
1862
1902
  };
1863
1903
  /**
1864
1904
  * 可拖拽FormList
1865
1905
  * ```
1906
+ * Demo: https://fex.qa.tcshuke.com/docs/admin/main/form/list
1866
1907
  * 1. FormList数组中必须要有唯一值字段,默认值字段名称uid,可通过uidFieldName自定义设置
1867
- * 2. Demo: https://fex.qa.tcshuke.com/docs/admin/main/form/list
1868
1908
  * ```
1869
1909
  */
1870
1910
  export declare const DragFormList: (props: DragFormListProps) => import("react/jsx-runtime").JSX.Element;
@@ -2033,17 +2073,14 @@ export type EasyFormProps = Omit<FormWrapperProps, "children"> & {
2033
2073
 
2034
2074
  * 例如
2035
2075
  * <EasyForm column={3}>
2036
- * <Form.Item name="field1" label="条件1">
2037
- * <Input placeholder="请输入" allowClear={true} />
2038
- * </Form.Item>
2039
- * <Form.Item name="field2" label="条件2">
2076
+ * <FormItemWrapper name="field1" label="条件1">
2040
2077
  * <Input placeholder="请输入" allowClear={true} />
2041
- * </Form.Item>
2078
+ * </FormItemWrapper>
2042
2079
  * <!-- !!自定义栅格占位格数第一种方式:可通过使用 BoxGrid.Col 包裹元素来自定义网格占比 -->
2043
2080
  * <BoxGrid.Col span={24}>
2044
- * <Form.Item name="field5" label="条件5">
2081
+ * <FormItemWrapper name="field5" label="条件5">
2045
2082
  * <Input placeholder="请输入" allowClear={true} />
2046
- * </Form.Item>
2083
+ * </FormItemWrapper>
2047
2084
  * </BoxGrid.Col>
2048
2085
  * <!-- !!自定义栅格占位格数第二种方式:如果为FormItemWrapper组件,可设置span属性 -->
2049
2086
  * <FormItemWrapper name="field6" label="条件6" span={24}>
@@ -2511,6 +2548,14 @@ export type FbaAppDrawerProps = Omit<DrawerProps, "onOk" | "onCancel" | "getCont
2511
2548
  extra?: ReactNode | ((form: FormInstance) => ReactElement);
2512
2549
  };
2513
2550
  export type FbaAppModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContainer" | "okButtonProps" | "cancelButtonProps" | "footer"> & {
2551
+ /**
2552
+ * 内置尺寸,根据比例固定高度、宽度,默认:middle
2553
+ * ```
2554
+ * 1. 如果自定义了width、styles.body.height属性,size中的height、width将对应失效
2555
+ * 2. 可传 null 值,取消内置尺寸
2556
+ * ```
2557
+ */
2558
+ size?: "small" | "middle" | "large" | null;
2514
2559
  onOk?: (form: FormInstance, e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
2515
2560
  onCancel?: (form: FormInstance, e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
2516
2561
  onClose?: () => void;
@@ -2523,6 +2568,7 @@ export type FbaAppModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContai
2523
2568
  cancelButtonProps?: Omit<ButtonWrapperProps, "hidden" | "children" | "onClick">;
2524
2569
  /**
2525
2570
  * 设置modal body height 为当前窗口height的百分比,例如:30
2571
+ * @deprecated 已失效,可通过size属性设置
2526
2572
  * ```
2527
2573
  * 1. 最大值:80
2528
2574
  * 1. 设置bodyStyle.height 后,bodyHeightPercent失效
@@ -2821,33 +2867,6 @@ export declare const FormGrid: {
2821
2867
  domTypeName: string;
2822
2868
  };
2823
2869
  };
2824
- export type FormItemHorizontalUnionProps = {
2825
- className?: string;
2826
- style?: CSSProperties;
2827
- label?: string | ReactElement;
2828
- groupConfigList: {
2829
- hidden?: boolean;
2830
- before?: ReactElement | string;
2831
- /**
2832
- * 设置宽度
2833
- * ```
2834
- * 1. 自适应可设置:auto
2835
- * 2. 可设置具体数值
2836
- * 3. 不设置会在铺满flex剩余空间
2837
- * 4. 多个未设置会等分铺满剩余空间
2838
- * ```
2839
- */
2840
- width?: number | string;
2841
- mainItem: ReactElement;
2842
- after?: ReactElement | string;
2843
- }[];
2844
- gap?: number;
2845
- flexLayoutStyle?: CSSProperties;
2846
- flexLayoutClassName?: string;
2847
- hidden?: boolean;
2848
- required?: boolean;
2849
- colon?: boolean;
2850
- };
2851
2870
  export type FormItemCardProps = {
2852
2871
  title?: string | ReactElement;
2853
2872
  children: ReactElement | ReactElement[];
@@ -3005,14 +3024,14 @@ export type FormListWrapperProps = {
3005
3024
  required?: boolean;
3006
3025
  width?: number;
3007
3026
  }[];
3008
- formListItemTitleClassName?: string;
3009
- formListItemTitleStyle?: CSSProperties;
3027
+ /** formListItemTitle HorizontalUnionProps 配置 */
3028
+ formListItemTitleHorizontalUnionProps?: Omit<FormItemHorizontalUnionProps, "groupConfigList">;
3010
3029
  };
3011
3030
  /**
3012
- * FormList
3031
+ * Form.List 包装组件,使用更简单
3013
3032
  * ```
3033
+ * Demo: https://fex.qa.tcshuke.com/docs/admin/main/form/list
3014
3034
  * 1. FormList数组中必须要有唯一值字段,默认值字段名称uid,可通过uidFieldName自定义设置
3015
- * 2. Demo: https://fex.qa.tcshuke.com/docs/admin/main/form/list
3016
3035
  * ```
3017
3036
  */
3018
3037
  export declare const FormListWrapper: (props: FormListWrapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -3552,10 +3571,11 @@ export type TRelationTreeOperate = {
3552
3571
  };
3553
3572
  export declare const RelationTree: (props: RelationTreeProps) => import("react/jsx-runtime").JSX.Element;
3554
3573
  export interface RichTextEditorProps extends Omit<IAllProps, "onChange" | "init"> {
3574
+ /** 设置高度,默认:500 */
3575
+ height?: number;
3555
3576
  onChange?: (data?: string) => void;
3556
3577
  /** 上传图片服务 */
3557
3578
  onUploadImage?: (file: File) => Promise<string>;
3558
- className?: string;
3559
3579
  /** 图片点击预览 */
3560
3580
  imgPreview?: boolean;
3561
3581
  init?: IAllProps["init"] & {
@@ -3588,22 +3608,22 @@ export interface RichTextEditorProps extends Omit<IAllProps, "onChange" | "init"
3588
3608
  };
3589
3609
  /** 点击全屏按钮回调 */
3590
3610
  onFullScreenChange?: (state?: boolean) => void;
3611
+ className?: string;
3591
3612
  }
3592
3613
  /**
3593
3614
  * 富文本编辑器,配置参考tinymce https://www.tiny.cloud/docs/tinymce/6
3594
3615
  * @param props
3595
3616
  * @returns
3596
3617
  * ```
3597
- * 1. 修改高度 init={{ height: 300 }}
3598
- * 2. 如果需要粘贴上传图片服务,需要提供 onUploadImage 上传图片接口
3599
- * 3. 获取富文本实例,通过onInit(_, editor)函数获取
3600
- * 4. 预览富文本数据,使用 RichTextViewer 组件
3601
- * 5. 添加其他插件使用方式,配置 init.plugins_append、init.toolbar_append
3618
+ * 1. 如果需要粘贴上传图片服务,需要提供 onUploadImage 上传图片接口
3619
+ * 2. 获取富文本实例,通过onInit(_, editor)函数获取
3620
+ * 3. 预览富文本数据,使用 RichTextViewer 组件
3621
+ * 4. 添加其他插件使用方式,配置 init.plugins_append、init.toolbar_append
3602
3622
  * <RichTextEditor init={{ plugins_append: 'codesample', toolbar_append: 'codesample' }} />
3603
- * 6. 可通过设置 init.plugins、init.toolbar 完全自定义插件、工具栏
3604
- * 7. 其他插件
3623
+ * 5. 可通过设置 init.plugins、init.toolbar 完全自定义插件、工具栏
3624
+ * 6. 其他插件
3605
3625
  * emoticons 表情插件
3606
- * 8. 可通过设置 init.img_ratio 设置通过粘贴上传的图片压缩显示比例
3626
+ * 7. 可通过设置 init.img_ratio 设置通过粘贴上传的图片压缩显示比例
3607
3627
  * 默认比例:[{ min: 0, max: 1000, ratio: 0.5 }, { min: 1000, ratio: 0.3 }]
3608
3628
  * ```
3609
3629
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.4.14",
3
+ "version": "4.4.15",
4
4
  "description": "flat-biz ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",