@flatbiz/antd 2.3.20 → 2.3.21

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
@@ -55,6 +55,7 @@ export declare type DateRangePickerWrapperProps = {
55
55
  /**
56
56
  * DatePicker.RangePicker包装组件
57
57
  * ```
58
+ * TODO: 引用DatePicker.RangePicker TS有问题,待解决
58
59
  * 1. value类型为 [string, string]
59
60
  * 2. onChange返回类型 [string, string]
60
61
  * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss
@@ -90,7 +91,7 @@ export interface DrawerOperationOldProps {
90
91
  okButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
91
92
  cancelButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
92
93
  }
93
- export declare type DrawerFormProps = {
94
+ export declare type DrawerFormOldProps = {
94
95
  className?: string;
95
96
  /**
96
97
  * 整个drawer页面级的spinning <Page loading />
@@ -105,7 +106,7 @@ export declare type DrawerFormProps = {
105
106
  * 2. 默认 forceRender = false
106
107
  * ```
107
108
  */
108
- export declare const DrawerWraper: FC<DrawerFormProps>;
109
+ export declare const DrawerWraper: FC<DrawerFormOldProps>;
109
110
  /**
110
111
  * drawer弹窗模型
111
112
  * @param key 唯一值必传
@@ -145,7 +146,7 @@ export interface DrawerOperationProps {
145
146
  okButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
146
147
  cancelButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
147
148
  }
148
- export declare type DrawerWrapperProps = {
149
+ export declare type DrawerFormProps = {
149
150
  className?: string;
150
151
  /**
151
152
  * 整个drawer页面级的spinning <Page loading />
@@ -160,7 +161,7 @@ export declare type DrawerWrapperProps = {
160
161
  * 2. 默认 forceRender = false
161
162
  * ```
162
163
  */
163
- export declare const DrawerWrapper: FC<DrawerWrapperProps>;
164
+ export declare const DrawerWrapper: FC<DrawerFormProps>;
164
165
  /**
165
166
  * drawer弹窗模型
166
167
  * @param key 唯一值必传
@@ -172,48 +173,6 @@ export declare const DrawerWrapper: FC<DrawerWrapperProps>;
172
173
  * ```
173
174
  */
174
175
  export declare const createDrawerWrapperModel: (key: string) => API<ModelType<DrawerStateType, DrawerActionsParamType, any>>;
175
- export declare type FileUploadItem = {
176
- fileKey: string;
177
- fileName: string;
178
- };
179
- export declare type FileUploadProps = {
180
- onChange?: (value?: FileUploadItem[]) => void;
181
- onUploadError?: (message?: string) => void;
182
- value?: FileUploadItem[];
183
- onPreview?: (item: FileUploadItem) => void;
184
- onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;
185
- /**
186
- * 属性映射
187
- */
188
- fieldNames?: {
189
- fileKey?: string;
190
- fileName?: string;
191
- };
192
- } & Omit<UploadProps, "onChange" | "fileList" | "onPreview">;
193
- /**
194
- * 文件上传,结合Form使用最佳
195
- * ```
196
- * 接口返回结构:
197
- * formData上传接口必须返回fileKey值
198
- * {
199
- * code: '0000',
200
- * data: {
201
- * fileKey: '预览文件对应的fileKey'
202
- * }
203
- * }
204
- * 可通过fieldNames配置接口返回值属性名称映射
205
- * ```
206
- * ```
207
- * 最佳使用方式:
208
- * <Form.Item name="attachmentList" label="附件">
209
- * <FileUpload action={uploadUrl} onPreview={onPreviewFile}>
210
- * <Button type="primary">选择文件导入</Button>
211
- * </FileUpload>
212
- * </Form.Item>
213
- * ```
214
- *
215
- */
216
- export declare const FileUpload: FC<FileUploadProps>;
217
176
  export declare type LabelValueItem<T extends string | number = string | number> = {
218
177
  value: T;
219
178
  label: string;
@@ -338,6 +297,52 @@ export declare const SelectorWrapper: import("react").ForwardRefExoticComponent<
338
297
  operateType?: "search" | "filter" | undefined;
339
298
  searchFieldName?: string | undefined;
340
299
  } & import("react").RefAttributes<SelectorWrapperRefApi>>;
300
+ export declare type UploadWrapperFileItem = {
301
+ uid: string;
302
+ name: string;
303
+ url: string;
304
+ };
305
+ export declare type UploadWrapperProps<T extends TPlainObject = TPlainObject> = {
306
+ value?: T[];
307
+ onChange?: (value?: T[]) => void;
308
+ onUploadError?: (message?: string) => void;
309
+ onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;
310
+ /**
311
+ * 属性映射
312
+ */
313
+ fieldNames?: {
314
+ uid: string;
315
+ name: string;
316
+ url: string;
317
+ };
318
+ /**
319
+ * 接口响应数据适配器,如果配置了fieldNames,适配器返回值会再进过fieldNames转换
320
+ */
321
+ onRequestResultAdapter?: (respData: any) => TPlainObject;
322
+ } & Omit<UploadProps, "onChange" | "fileList">;
323
+ /**
324
+ * 文件上传
325
+ * ```
326
+ * 1. 可通过配置children替换默认上传触发布局
327
+ * 2. 接口返回结构:
328
+ * formData上传接口返回值
329
+ * {
330
+ * code: '0000',
331
+ * data: {
332
+ * uid: '唯一值,可使用fileKey值'
333
+ * name: '文件名称'
334
+ * url: '预览地址'
335
+ * }
336
+ * }
337
+ * 可通过fieldNames配置接口返回值属性名称映射
338
+ * 3. 最佳使用方式,与Form结合使用
339
+ * <Form.Item name="attachmentList" label="附件">
340
+ * <UploadWrapper action={uploadUrl} onPreview={onPreviewFile} />
341
+ * </Form.Item>
342
+ * ```
343
+ *
344
+ */
345
+ export declare const UploadWrapper: FC<UploadWrapperProps>;
341
346
  export declare type EditableTableRecordType = FormListFieldData & {
342
347
  operation: FormListOperation;
343
348
  };
@@ -374,8 +379,8 @@ export declare type EditableTextareaConfig = {
374
379
  editableComptProps: TextAreaProps;
375
380
  };
376
381
  export declare type EditableFileUploadConfig = {
377
- type: "fileUpload";
378
- editableComptProps: FileUploadProps;
382
+ type: "uploadWrapper";
383
+ editableComptProps: UploadWrapperProps;
379
384
  };
380
385
  /**
381
386
  * 自定义编辑组件
@@ -447,7 +452,7 @@ export declare type FormListConfig = {
447
452
  * antd 默认render功能此处不能使用
448
453
  */
449
454
  export declare type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
450
- dataIndex: string;
455
+ dataIndex?: string;
451
456
  fieldConfig?: FieldSingleConfig | FormListConfig;
452
457
  /**
453
458
  * 配置操作功能处理后,fieldConfig配置将失效
@@ -483,8 +488,8 @@ export declare type EditableTableProps = {
483
488
  };
484
489
  export declare const EditableTable: (props: EditableTableProps) => JSX.Element;
485
490
  export declare type FileImportProps = {
486
- onImportFinish: (data?: any[]) => void;
487
- } & Pick<UploadProps, "accept" | "action" | "beforeUpload" | "disabled" | "maxCount" | "method" | "name">;
491
+ onImportFinish: (data?: any) => void;
492
+ } & Omit<UploadProps, "fileList" | "showUploadList" | "itemRender" | "listType" | "multiple" | "previewFile" | "progress" | "onChange" | "onDownload" | "onRemove" | "onPreview" | "directory" | "customRequest" | "defaultFileList" | "iconRender">;
488
493
  /**
489
494
  * 文件导入
490
495
  * ```
@@ -494,6 +499,48 @@ export declare type FileImportProps = {
494
499
  * ```
495
500
  */
496
501
  export declare const FileImport: FC<FileImportProps>;
502
+ export declare type FileUploadItem = {
503
+ fileKey: string;
504
+ fileName: string;
505
+ };
506
+ export declare type FileUploadProps = {
507
+ onChange?: (value?: FileUploadItem[]) => void;
508
+ onUploadError?: (message?: string) => void;
509
+ value?: FileUploadItem[];
510
+ onPreview?: (item: FileUploadItem) => void;
511
+ onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;
512
+ /**
513
+ * 属性映射
514
+ */
515
+ fieldNames?: {
516
+ fileKey?: string;
517
+ fileName?: string;
518
+ };
519
+ } & Omit<UploadProps, "onChange" | "fileList" | "onPreview">;
520
+ /**
521
+ * 文件上传,结合Form使用最佳
522
+ * ```
523
+ * 接口返回结构:
524
+ * formData上传接口必须返回fileKey值
525
+ * {
526
+ * code: '0000',
527
+ * data: {
528
+ * fileKey: '预览文件对应的fileKey'
529
+ * }
530
+ * }
531
+ * 可通过fieldNames配置接口返回值属性名称映射
532
+ * ```
533
+ * ```
534
+ * 最佳使用方式:
535
+ * <Form.Item name="attachmentList" label="附件">
536
+ * <FileUpload action={uploadUrl} onPreview={onPreviewFile}>
537
+ * <Button type="primary">选择文件导入</Button>
538
+ * </FileUpload>
539
+ * </Form.Item>
540
+ * ```
541
+ *
542
+ */
543
+ export declare const FileUpload: FC<FileUploadProps>;
497
544
  export declare type FlexLayoutProps = {
498
545
  className?: string;
499
546
  fullIndex?: number | number[];
@@ -543,7 +590,7 @@ export interface ModalActionsParamType {
543
590
  closeModal: void;
544
591
  setModalItemData: Record<string, unknown>;
545
592
  }
546
- export interface ModalOperationProps {
593
+ export interface ModalOperationOldProps {
547
594
  loading?: boolean;
548
595
  okText?: string;
549
596
  cancelText?: string;
@@ -556,7 +603,7 @@ export interface ModalOperationProps {
556
603
  export declare type ModalFormProps = {
557
604
  className?: string;
558
605
  pageLoading?: boolean;
559
- operationProps?: ModalOperationProps;
606
+ operationProps?: ModalOperationOldProps;
560
607
  footer?: null | React.ReactNode;
561
608
  } & Omit<ModalProps, "footer" | "onOk" | "okText" | "cancelText" | "okButtonProps" | "cancelButtonProps" | "okType" | "confirmLoading">;
562
609
  /**
@@ -596,7 +643,7 @@ export interface ModalActionsParamType {
596
643
  closeModal: void;
597
644
  setModalItemData: Record<string, unknown>;
598
645
  }
599
- export interface ModalOperationOldProps {
646
+ export interface ModalOperationProps {
600
647
  loading?: boolean;
601
648
  okText?: string;
602
649
  cancelText?: string;
@@ -606,10 +653,10 @@ export interface ModalOperationOldProps {
606
653
  okButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
607
654
  cancelButtonProps?: Omit<ButtonProps, "onClick" | "loading" | "className">;
608
655
  }
609
- export declare type ModalWrapperProps = {
656
+ export declare type ModalFormOldProps = {
610
657
  className?: string;
611
658
  pageLoading?: boolean;
612
- operationProps?: ModalOperationOldProps;
659
+ operationProps?: ModalOperationProps;
613
660
  footer?: null | React.ReactNode;
614
661
  } & Omit<ModalProps, "footer" | "onOk" | "okText" | "cancelText" | "okButtonProps" | "cancelButtonProps" | "okType" | "confirmLoading">;
615
662
  /**
@@ -619,7 +666,7 @@ export declare type ModalWrapperProps = {
619
666
  * 2. 默认 forceRender = false
620
667
  * ```
621
668
  */
622
- export declare const ModalWrapper: FC<ModalWrapperProps>;
669
+ export declare const ModalWrapper: FC<ModalFormOldProps>;
623
670
  /**
624
671
  * modal弹窗模型
625
672
  * @param key 唯一值必传
@@ -850,51 +897,5 @@ export declare const TreeWrapper: import("react").ForwardRefExoticComponent<Omit
850
897
  */
851
898
  filterLabel?: string | undefined;
852
899
  } & import("react").RefAttributes<TreeWrapperRefApi>>;
853
- export declare type UploadWrapperFileItem = {
854
- uid: string;
855
- name: string;
856
- url: string;
857
- };
858
- export declare type UploadWrapperProps<T extends TPlainObject = TPlainObject> = {
859
- value?: T[];
860
- onChange?: (value?: T[]) => void;
861
- onUploadError?: (message?: string) => void;
862
- onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;
863
- /**
864
- * 属性映射
865
- */
866
- fieldNames?: {
867
- uid: string;
868
- name: string;
869
- url: string;
870
- };
871
- /**
872
- * 接口响应数据适配器,如果配置了fieldNames,适配器返回值会再进过fieldNames转换
873
- */
874
- onRequestResultAdapter?: (respData: any) => TPlainObject;
875
- } & Omit<UploadProps, "onChange" | "fileList">;
876
- /**
877
- * 文件上传
878
- * ```
879
- * 1. 可通过配置children替换默认上传触发布局
880
- * 2. 接口返回结构:
881
- * formData上传接口返回值
882
- * {
883
- * code: '0000',
884
- * data: {
885
- * uid: '唯一值,可使用fileKey值'
886
- * name: '文件名称'
887
- * url: '预览地址'
888
- * }
889
- * }
890
- * 可通过fieldNames配置接口返回值属性名称映射
891
- * 3. 最佳使用方式,与Form结合使用
892
- * <Form.Item name="attachmentList" label="附件">
893
- * <UploadWrapper action={uploadUrl} onPreview={onPreviewFile} />
894
- * </Form.Item>
895
- * ```
896
- *
897
- */
898
- export declare const UploadWrapper: FC<UploadWrapperProps>;
899
900
 
900
901
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "2.3.20",
3
+ "version": "2.3.21",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -25,12 +25,6 @@
25
25
  "engines": {
26
26
  "node": ">=13.8.0"
27
27
  },
28
- "devDependencies": {
29
- "antd": "^4.20.0",
30
- "moment": "^2.29.3",
31
- "react": "^17.0.2",
32
- "react-dom": "^17.0.2"
33
- },
34
28
  "peerDependencies": {
35
29
  "@ant-design/icons": "^4.7.0",
36
30
  "@dimjs/lang": "^1.2.9",
@@ -40,5 +34,20 @@
40
34
  "@flatbiz/utils": "^2.3.15",
41
35
  "@wove/react": "^1.2.10"
42
36
  },
43
- "gitHead": "832728aa5971b953283f06598f0fe5cf8a7b32fa"
37
+ "devDependencies": {
38
+ "@ant-design/icons": "^4.7.0",
39
+ "@dimjs/lang": "^1.2.9",
40
+ "@dimjs/model": "^1.1.3",
41
+ "@dimjs/model-react": "^1.1.4",
42
+ "@dimjs/utils": "^1.2.9",
43
+ "@flatbiz/utils": "^2.3.21",
44
+ "@wove/react": "^1.2.10",
45
+ "antd": "^4.20.0",
46
+ "moment": "^2.29.3",
47
+ "react": "^17.0.2",
48
+ "react-dom": "^17.0.2",
49
+ "react-router": "^6.3.0",
50
+ "react-router-dom": "^6.3.0"
51
+ },
52
+ "gitHead": "06589677717004192b67a37a1e8e0d579c71dd91"
44
53
  }