@flatbiz/antd 2.3.21 → 2.3.25

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
@@ -91,7 +91,7 @@ export interface DrawerOperationOldProps {
91
91
  okButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
92
92
  cancelButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
93
93
  }
94
- export declare type DrawerFormOldProps = {
94
+ export declare type DrawerFormProps = {
95
95
  className?: string;
96
96
  /**
97
97
  * 整个drawer页面级的spinning <Page loading />
@@ -106,7 +106,7 @@ export declare type DrawerFormOldProps = {
106
106
  * 2. 默认 forceRender = false
107
107
  * ```
108
108
  */
109
- export declare const DrawerWraper: FC<DrawerFormOldProps>;
109
+ export declare const DrawerWraper: FC<DrawerFormProps>;
110
110
  /**
111
111
  * drawer弹窗模型
112
112
  * @param key 唯一值必传
@@ -146,14 +146,21 @@ export interface DrawerOperationProps {
146
146
  okButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
147
147
  cancelButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
148
148
  }
149
- export declare type DrawerFormProps = {
149
+ export declare type DrawerWrapperStaticMethods = {
150
+ Content: typeof DrawerWrapperContent;
151
+ Footer: typeof DrawerWrapperFooter;
152
+ };
153
+ export declare type DrawerWrapperProps = {
150
154
  className?: string;
151
155
  /**
152
156
  * 整个drawer页面级的spinning <Page loading />
153
157
  */
154
158
  pageLoading?: boolean;
159
+ } & Omit<DrawerProps, "footer">;
160
+ declare const DrawerWrapperContent: FC<{
155
161
  operationProps?: DrawerOperationProps;
156
- } & DrawerProps;
162
+ }>;
163
+ declare const DrawerWrapperFooter: (props: any) => JSX.Element;
157
164
  /**
158
165
  * 弹窗机制
159
166
  * ```
@@ -161,7 +168,7 @@ export declare type DrawerFormProps = {
161
168
  * 2. 默认 forceRender = false
162
169
  * ```
163
170
  */
164
- export declare const DrawerWrapper: FC<DrawerFormProps>;
171
+ export declare const DrawerWrapper: FC<DrawerWrapperProps> & DrawerWrapperStaticMethods;
165
172
  /**
166
173
  * drawer弹窗模型
167
174
  * @param key 唯一值必传
@@ -232,6 +239,7 @@ export declare type SelectorWrapperProps = Omit<SelectProps, "filterOption" | "o
232
239
  */
233
240
  operateType?: "search" | "filter";
234
241
  searchFieldName?: string;
242
+ onLabelRenderAdapter?: (dataItem: LabelValueItem) => string | ReactElement;
235
243
  };
236
244
  export declare type SelectorWrapperRefApi = {
237
245
  onClearSelectorList: () => void;
@@ -296,11 +304,12 @@ export declare const SelectorWrapper: import("react").ForwardRefExoticComponent<
296
304
  */
297
305
  operateType?: "search" | "filter" | undefined;
298
306
  searchFieldName?: string | undefined;
307
+ onLabelRenderAdapter?: ((dataItem: LabelValueItem) => string | ReactElement) | undefined;
299
308
  } & import("react").RefAttributes<SelectorWrapperRefApi>>;
300
309
  export declare type UploadWrapperFileItem = {
301
310
  uid: string;
302
311
  name: string;
303
- url: string;
312
+ url?: string;
304
313
  };
305
314
  export declare type UploadWrapperProps<T extends TPlainObject = TPlainObject> = {
306
315
  value?: T[];
@@ -311,9 +320,9 @@ export declare type UploadWrapperProps<T extends TPlainObject = TPlainObject> =
311
320
  * 属性映射
312
321
  */
313
322
  fieldNames?: {
314
- uid: string;
315
- name: string;
316
- url: string;
323
+ uid?: string;
324
+ name?: string;
325
+ url?: string;
317
326
  };
318
327
  /**
319
328
  * 接口响应数据适配器,如果配置了fieldNames,适配器返回值会再进过fieldNames转换
@@ -325,19 +334,20 @@ export declare type UploadWrapperProps<T extends TPlainObject = TPlainObject> =
325
334
  * ```
326
335
  * 1. 可通过配置children替换默认上传触发布局
327
336
  * 2. 接口返回结构:
328
- * formData上传接口返回值
329
- * {
330
- * code: '0000',
331
- * data: {
332
- * uid: '唯一值,可使用fileKey值'
333
- * name: '文件名称'
334
- * url: '预览地址'
335
- * }
336
- * }
337
- * 可通过fieldNames配置接口返回值属性名称映射
338
- * 3. 最佳使用方式,与Form结合使用
337
+ * formData上传接口返回值
338
+ * {
339
+ * code: '0000',
340
+ * data: {
341
+ * uid: '唯一值,可使用fileKey值'
342
+ * name: '文件名称'
343
+ * url: '预览地址'
344
+ * }
345
+ * }
346
+ * 3. 如果接口返回的不是上面的字段名称,可通过fieldNames配置接口返回字段名称映射
347
+ *
348
+ * 4. 最佳使用方式,与Form结合使用
339
349
  * <Form.Item name="attachmentList" label="附件">
340
- * <UploadWrapper action={uploadUrl} onPreview={onPreviewFile} />
350
+ * <UploadWrapper action={uploadUrl} />
341
351
  * </Form.Item>
342
352
  * ```
343
353
  *
@@ -572,6 +582,15 @@ export declare type GapProps = {
572
582
  export declare const Gap: VFC<GapProps>;
573
583
  export declare const useEffectCustom: (fn: EffectCallback, deps: DependencyList) => void;
574
584
  export declare const useEffectCustomAsync: (fn: () => Promise<void>, deps: DependencyList) => void;
585
+ export declare type IconWrapperProps = {
586
+ hoverTips?: string;
587
+ icon?: React.ReactNode;
588
+ style?: CSSProperties;
589
+ text?: string | React.ReactElement;
590
+ className?: string;
591
+ size?: "small" | "middle" | "large";
592
+ };
593
+ export declare const IconWrapper: VFC<IconWrapperProps>;
575
594
  export interface ModalStateType {
576
595
  title?: string;
577
596
  /**
@@ -590,7 +609,7 @@ export interface ModalActionsParamType {
590
609
  closeModal: void;
591
610
  setModalItemData: Record<string, unknown>;
592
611
  }
593
- export interface ModalOperationOldProps {
612
+ export interface ModalOperationProps {
594
613
  loading?: boolean;
595
614
  okText?: string;
596
615
  cancelText?: string;
@@ -603,7 +622,7 @@ export interface ModalOperationOldProps {
603
622
  export declare type ModalFormProps = {
604
623
  className?: string;
605
624
  pageLoading?: boolean;
606
- operationProps?: ModalOperationOldProps;
625
+ operationProps?: ModalOperationProps;
607
626
  footer?: null | React.ReactNode;
608
627
  } & Omit<ModalProps, "footer" | "onOk" | "okText" | "cancelText" | "okButtonProps" | "cancelButtonProps" | "okType" | "confirmLoading">;
609
628
  /**
@@ -643,7 +662,7 @@ export interface ModalActionsParamType {
643
662
  closeModal: void;
644
663
  setModalItemData: Record<string, unknown>;
645
664
  }
646
- export interface ModalOperationProps {
665
+ export interface ModalOperationOldProps {
647
666
  loading?: boolean;
648
667
  okText?: string;
649
668
  cancelText?: string;
@@ -653,12 +672,18 @@ export interface ModalOperationProps {
653
672
  okButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
654
673
  cancelButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
655
674
  }
656
- export declare type ModalFormOldProps = {
675
+ export declare type ModalWrapperStaticMethods = {
676
+ Content: typeof ModalWrapperContent;
677
+ Footer: typeof ModalWrapperFooter;
678
+ };
679
+ export declare type ModalWrapperProps = {
657
680
  className?: string;
658
681
  pageLoading?: boolean;
659
- operationProps?: ModalOperationProps;
660
- footer?: null | React.ReactNode;
661
682
  } & Omit<ModalProps, "footer" | "onOk" | "okText" | "cancelText" | "okButtonProps" | "cancelButtonProps" | "okType" | "confirmLoading">;
683
+ declare const ModalWrapperContent: FC<{
684
+ operationProps?: ModalOperationOldProps;
685
+ }>;
686
+ declare const ModalWrapperFooter: (props: any) => JSX.Element;
662
687
  /**
663
688
  * 弹窗机制
664
689
  * ```
@@ -666,7 +691,7 @@ export declare type ModalFormOldProps = {
666
691
  * 2. 默认 forceRender = false
667
692
  * ```
668
693
  */
669
- export declare const ModalWrapper: FC<ModalFormOldProps>;
694
+ export declare const ModalWrapper: FC<ModalWrapperProps> & ModalWrapperStaticMethods;
670
695
  /**
671
696
  * modal弹窗模型
672
697
  * @param key 唯一值必传
@@ -726,7 +751,18 @@ export declare type SimpleLayoutProps = {
726
751
  desc?: string | ReactElement;
727
752
  formLabelAlign?: "left" | "right";
728
753
  layoutType?: "layer" | "tight";
754
+ titleLeftLine?: boolean;
729
755
  };
756
+ /**
757
+ * 简单布局
758
+ * @param props
759
+ * @returns
760
+ * ```
761
+ * 1. layoutType 布局类型
762
+ * layer:分层布局
763
+ * tight:紧凑布局
764
+ * ```
765
+ */
730
766
  export declare const SimpleLayout: FC<SimpleLayoutProps>;
731
767
  export interface SmsCountDownProps {
732
768
  onSendRequest: () => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "2.3.21",
3
+ "version": "2.3.25",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -40,7 +40,7 @@
40
40
  "@dimjs/model": "^1.1.3",
41
41
  "@dimjs/model-react": "^1.1.4",
42
42
  "@dimjs/utils": "^1.2.9",
43
- "@flatbiz/utils": "^2.3.21",
43
+ "@flatbiz/utils": "^2.3.24",
44
44
  "@wove/react": "^1.2.10",
45
45
  "antd": "^4.20.0",
46
46
  "moment": "^2.29.3",
@@ -49,5 +49,5 @@
49
49
  "react-router": "^6.3.0",
50
50
  "react-router-dom": "^6.3.0"
51
51
  },
52
- "gitHead": "06589677717004192b67a37a1e8e0d579c71dd91"
52
+ "gitHead": "b881f49fccc7a6e11c09f6c1f8de511e704bf774"
53
53
  }