fat-design 0.0.2-beta.20251111003037 → 0.0.2-beta.20251115205053
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.browser.js +22 -22
- package/index.js +7715 -7323
- package/index.umd.cjs +21 -21
- package/index.umd.js +21 -21
- package/package.json +2 -2
- package/style.css +1 -1
- package/types/0buildTypes/previews/renderFileImage.d.ts +2 -0
- package/types/dialog/index.d.ts +79 -0
- package/types/upload/index.d.ts +17 -4
|
@@ -3,11 +3,13 @@ import './renderFileImage.scss';
|
|
|
3
3
|
interface IRenderProps {
|
|
4
4
|
value: any;
|
|
5
5
|
prefix?: string;
|
|
6
|
+
isList?: boolean;
|
|
6
7
|
}
|
|
7
8
|
interface IRenderCfg {
|
|
8
9
|
deep: number;
|
|
9
10
|
index: number;
|
|
10
11
|
prefix: string;
|
|
12
|
+
isList?: boolean;
|
|
11
13
|
}
|
|
12
14
|
interface IRenderLinkFnProps extends IRenderCfg {
|
|
13
15
|
downloadURL: string;
|
package/types/dialog/index.d.ts
CHANGED
|
@@ -263,6 +263,83 @@ export interface IShowBatchInputCfg extends QuickShowConfig {
|
|
|
263
263
|
topTips?: any;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
+
|
|
267
|
+
export interface IShowImportFieldMapping {
|
|
268
|
+
source: string, // Excel字段名
|
|
269
|
+
target: string, // 映射成json的字段名
|
|
270
|
+
type: 'string'| 'date' | 'origin', // 数据类型
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
export interface IBatchProcessElementResultList {
|
|
275
|
+
element: any;
|
|
276
|
+
index: number;
|
|
277
|
+
result?: any;
|
|
278
|
+
errorMsg?: string;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// onBatchProcessDone({errorCount, successCount, elementResultList }
|
|
282
|
+
|
|
283
|
+
export interface ITypeOnBatchProcessDoneParam {
|
|
284
|
+
errorCount?: number;
|
|
285
|
+
successCount?: number;
|
|
286
|
+
elementResultList: IBatchProcessElementResultList[]
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export interface IHandleProcessElementResult {
|
|
290
|
+
success: boolean;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* 函数:批量导入完成事件
|
|
295
|
+
*/
|
|
296
|
+
export type TypeOnBatchProcessDone = (param: ITypeOnBatchProcessDoneParam)=> Promise<void>;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* 函数:执行单个导入
|
|
300
|
+
*/
|
|
301
|
+
export type TypeHandleProcessElement = (elementObj: any)=> Promise<IHandleProcessElementResult>;
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Excel导入对话框的配置
|
|
306
|
+
*/
|
|
307
|
+
export interface IShowBatchByExcelCfg extends QuickShowConfig {
|
|
308
|
+
excelTemplateName: string, //字符串:excel导入模板的模板名称。 不能为空
|
|
309
|
+
excelTemplateUrl: string, //字符串:excel导入模板的模板的下载地址URL。 不能为空
|
|
310
|
+
fieldMappingList: IShowImportFieldMapping[], // 字段映射:表格中的表头和我们需要的结构化字段的映射关系
|
|
311
|
+
|
|
312
|
+
loadExcelScript: ()=> Promise<void>, //函数:加载window.XLSX使用的脚本文件, 不能为空
|
|
313
|
+
preprocessTableData: (tableData: any[])=> Promise<void>, //函数:导入前校验数据完整性,也可以对数据设置一些字段
|
|
314
|
+
|
|
315
|
+
onBatchProcessDone?: TypeOnBatchProcessDone, // 函数:批量处理完成事件
|
|
316
|
+
handleProcessElement: TypeHandleProcessElement, // 函数:执行单个数据处理
|
|
317
|
+
notifyOnError?: boolean, // 出现错误时,是否使用Notification.error直接显示出来。默认为false
|
|
318
|
+
elementDisplayKey?: string, // 出现错误时,用于标识某一条数据的key
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* 批处理的一些文案
|
|
323
|
+
*/
|
|
324
|
+
export interface IShowBatchProcessMsgCfg {
|
|
325
|
+
confirmMsg?: string; // 确认提示文案。
|
|
326
|
+
processMsg?: string; // 处理中的提示文案
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* 批量数据数对话框的配置
|
|
331
|
+
*/
|
|
332
|
+
export interface IShowBatchProcessCfg extends QuickShowConfig {
|
|
333
|
+
elementList: any[], // 需要被处理的元素列表
|
|
334
|
+
msgCfg?: IShowBatchProcessMsgCfg,
|
|
335
|
+
|
|
336
|
+
onBatchProcessDone?: TypeOnBatchProcessDone, // 函数:批量导入完成事件
|
|
337
|
+
handleProcessElement: TypeHandleProcessElement, // 函数:执行单个导入
|
|
338
|
+
notifyOnError?: boolean, // 出现错误时,是否使用Notification.error直接显示出来。默认为false
|
|
339
|
+
elementDisplayKey?: string, // 出现错误时,用于标识某一条数据的key
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
|
|
266
343
|
export interface IShowCompCfg extends QuickShowConfig {
|
|
267
344
|
component: any,
|
|
268
345
|
xProps: any,
|
|
@@ -323,6 +400,8 @@ export default class Dialog extends React.Component<DialogProps, any> {
|
|
|
323
400
|
static showAudit(config: IShowInputCfg): QuickShowRet;
|
|
324
401
|
static showTable(config: IShowTableCfg): QuickShowRet;
|
|
325
402
|
static showBatchInput(config: IShowBatchInputCfg): QuickShowRet;
|
|
403
|
+
static showBatchByExcel(config: IShowBatchByExcelCfg): QuickShowRet;
|
|
404
|
+
static showBatchProcess(config: IShowBatchProcessCfg): QuickShowRet;
|
|
326
405
|
static confirmPromise(config: QuickShowConfig): Promise<boolean>;
|
|
327
406
|
static show(config: QuickShowConfig): QuickShowRet;
|
|
328
407
|
static alert(config: QuickShowConfig): QuickShowRet;
|
package/types/upload/index.d.ts
CHANGED
|
@@ -82,7 +82,14 @@ export interface ObjectFile extends CommonModifiedFile {
|
|
|
82
82
|
alt?: string;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
export interface IFileValueObject {
|
|
86
|
+
name?: string;
|
|
87
|
+
state?: string;
|
|
88
|
+
url?: string;
|
|
89
|
+
downloadURL?: string;
|
|
90
|
+
imgURL?: string;
|
|
91
|
+
size?: number;
|
|
92
|
+
}
|
|
86
93
|
|
|
87
94
|
export interface CardProps extends HTMLAttributesWeak, CommonProps {
|
|
88
95
|
/**
|
|
@@ -336,10 +343,16 @@ export interface SimpleJSONUploadProps extends UploadProps, CardProps {
|
|
|
336
343
|
* 在Preview模式下,如何显示 预览效果
|
|
337
344
|
* 默认:default
|
|
338
345
|
*/
|
|
339
|
-
previewMode?: 'default' | 'auto' | 'image' | 'download' | 'weboffice';
|
|
346
|
+
previewMode?: 'default' | 'auto' | 'image' | 'download' | 'weboffice' | 'auto-list';
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* 可以是标准的value数组,也可以是字符串
|
|
350
|
+
*/
|
|
351
|
+
value?: IFileValueObject | IFileValueObject[] | string;
|
|
340
352
|
}
|
|
341
353
|
|
|
342
354
|
|
|
355
|
+
|
|
343
356
|
export class SimpleJSONUpload extends React.Component<SimpleJSONUploadProps, any> {} {
|
|
344
357
|
|
|
345
358
|
}
|
|
@@ -541,12 +554,12 @@ export interface UploadProps extends HTMLAttributesWeak, CommonProps {
|
|
|
541
554
|
/**
|
|
542
555
|
* 文件列表
|
|
543
556
|
*/
|
|
544
|
-
value?:
|
|
557
|
+
value?: IFileValueObject[];
|
|
545
558
|
|
|
546
559
|
/**
|
|
547
560
|
* 默认文件列表
|
|
548
561
|
*/
|
|
549
|
-
defaultValue?:
|
|
562
|
+
defaultValue?: IFileValueObject[];
|
|
550
563
|
|
|
551
564
|
/**
|
|
552
565
|
* 上传按钮形状
|