@steedos-widgets/amis-lib 1.0.18 → 1.0.20
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/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +64 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +64 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +194 -152
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/fields/index.d.ts +1 -1
- package/dist/types/lib/converter/amis/fields/lookup.d.ts +1 -0
- package/dist/types/lib/converter/amis/fields/table.d.ts +1 -0
- package/dist/types/lib/converter/amis/header.d.ts +46 -43
- package/dist/types/lib/converter/amis/toolbar.d.ts +24 -1
- package/dist/types/lib/objects.d.ts +47 -112
- package/dist/types/lib/objectsRelated.d.ts +48 -51
- package/dist/types/lib/page_init.d.ts +1 -0
- package/dist/types/schema/standard_import_data.amis.d.ts +1 -1
- package/dist/types/standard/button.d.ts +1 -1
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@ export function getBaseFields(readonly: any): {
|
|
|
6
6
|
className: string;
|
|
7
7
|
tpl: string;
|
|
8
8
|
}[];
|
|
9
|
-
export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "textarea" | "picker" | "table" | "
|
|
9
|
+
export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "textarea" | "picker" | "table" | "email" | "html" | "markdown" | "checkbox";
|
|
10
10
|
export function getObjectFieldSubFields(mainField: any, fields: any): any;
|
|
11
11
|
export function getGridFieldSubFields(mainField: any, fields: any): any;
|
|
12
12
|
/**
|
|
@@ -405,62 +405,65 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
|
|
|
405
405
|
_id: any;
|
|
406
406
|
recordPermissions: any;
|
|
407
407
|
uiSchema: any;
|
|
408
|
+
record: string;
|
|
408
409
|
};
|
|
409
410
|
body: {
|
|
410
411
|
type: string;
|
|
412
|
+
data: {
|
|
413
|
+
"&": string;
|
|
414
|
+
objectName: any;
|
|
415
|
+
_id: any;
|
|
416
|
+
recordPermissions: string;
|
|
417
|
+
uiSchema: any;
|
|
418
|
+
};
|
|
411
419
|
body: {
|
|
412
420
|
type: string;
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
columns: ({
|
|
420
|
-
body: {
|
|
421
|
-
type: string;
|
|
422
|
-
className: string;
|
|
423
|
-
tpl: string;
|
|
424
|
-
};
|
|
425
|
-
md: string;
|
|
421
|
+
columns: ({
|
|
422
|
+
body: {
|
|
423
|
+
type: string;
|
|
424
|
+
columns: ({
|
|
425
|
+
body: {
|
|
426
|
+
type: string;
|
|
426
427
|
className: string;
|
|
427
|
-
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
type: string;
|
|
431
|
-
tpl: string;
|
|
432
|
-
inline: boolean;
|
|
433
|
-
wrapperComponent: string;
|
|
434
|
-
className: string;
|
|
435
|
-
}[];
|
|
436
|
-
columnClassName: string;
|
|
437
|
-
md?: undefined;
|
|
438
|
-
className?: undefined;
|
|
439
|
-
})[];
|
|
428
|
+
tpl: string;
|
|
429
|
+
};
|
|
430
|
+
md: string;
|
|
440
431
|
className: string;
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
} | {
|
|
445
|
-
body: {
|
|
446
|
-
type: string;
|
|
447
|
-
items: {
|
|
432
|
+
columnClassName: string;
|
|
433
|
+
} | {
|
|
434
|
+
body: {
|
|
448
435
|
type: string;
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
436
|
+
tpl: string;
|
|
437
|
+
inline: boolean;
|
|
438
|
+
wrapperComponent: string;
|
|
452
439
|
className: string;
|
|
453
440
|
}[];
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
441
|
+
columnClassName: string;
|
|
442
|
+
md?: undefined;
|
|
443
|
+
className?: undefined;
|
|
444
|
+
})[];
|
|
445
|
+
className: string;
|
|
446
|
+
}[];
|
|
447
|
+
md: string;
|
|
448
|
+
} | {
|
|
449
|
+
body: {
|
|
450
|
+
type: string;
|
|
451
|
+
items: {
|
|
452
|
+
type: string;
|
|
453
|
+
name: any;
|
|
454
|
+
objectName: any;
|
|
455
|
+
visibleOn: any;
|
|
456
|
+
className: string;
|
|
457
|
+
}[];
|
|
458
|
+
};
|
|
459
|
+
md: string;
|
|
460
|
+
})[];
|
|
461
|
+
className: string;
|
|
461
462
|
}[];
|
|
462
463
|
messages: {};
|
|
464
|
+
hiddenOn: string;
|
|
463
465
|
}[];
|
|
466
|
+
className: string;
|
|
464
467
|
}>;
|
|
465
468
|
/**
|
|
466
469
|
* 记录详细界面中相关表顶部头amisSchema
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
export function getObjectHeaderToolbar(mainObject: any, formFactor: any
|
|
1
|
+
export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showDisplayAs }?: {
|
|
2
|
+
showDisplayAs?: boolean;
|
|
3
|
+
}): (string | {
|
|
4
|
+
type: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
btnClassName: string;
|
|
7
|
+
align: string;
|
|
8
|
+
buttons: {
|
|
9
|
+
label: string;
|
|
10
|
+
children: {
|
|
11
|
+
type: string;
|
|
12
|
+
label: string;
|
|
13
|
+
onClick: string;
|
|
14
|
+
}[];
|
|
15
|
+
}[];
|
|
16
|
+
} | {
|
|
2
17
|
type: string;
|
|
3
18
|
className: string;
|
|
4
19
|
tpl?: undefined;
|
|
@@ -37,6 +52,14 @@ export function getObjectHeaderToolbar(mainObject: any, formFactor: any): (strin
|
|
|
37
52
|
};
|
|
38
53
|
};
|
|
39
54
|
tpl?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
type?: undefined;
|
|
57
|
+
className?: undefined;
|
|
58
|
+
tpl?: undefined;
|
|
59
|
+
align?: undefined;
|
|
60
|
+
label?: undefined;
|
|
61
|
+
icon?: undefined;
|
|
62
|
+
onEvent?: undefined;
|
|
40
63
|
})[];
|
|
41
64
|
export function getObjectFooterToolbar(mainObject: any, formFactor: any): string[];
|
|
42
65
|
export function getObjectFilter(objectSchema: any, fields: any, options: any): Promise<{
|
|
@@ -260,16 +260,7 @@ export function getCalendarSchema(appName: any, objectName: any, calendarOptions
|
|
|
260
260
|
objectName: string;
|
|
261
261
|
$: {};
|
|
262
262
|
$self: string;
|
|
263
|
-
};
|
|
264
|
-
* localListViewProps规范来自crud请求api中api.data.$self参数值的。
|
|
265
|
-
* 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
|
|
266
|
-
* __searchable__...:顶部放大镜搜索条件
|
|
267
|
-
* filter:右侧过滤器
|
|
268
|
-
* perPage:每页条数
|
|
269
|
-
* page:当前页码
|
|
270
|
-
* orderBy:排序字段
|
|
271
|
-
* orderDir:排序方向
|
|
272
|
-
*/
|
|
263
|
+
};
|
|
273
264
|
requestAdaptor: string;
|
|
274
265
|
adaptor: string;
|
|
275
266
|
headers: {
|
|
@@ -319,62 +310,65 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any, opti
|
|
|
319
310
|
_id: any;
|
|
320
311
|
recordPermissions: any;
|
|
321
312
|
uiSchema: any;
|
|
313
|
+
record: string;
|
|
322
314
|
};
|
|
323
315
|
body: {
|
|
324
316
|
type: string;
|
|
317
|
+
data: {
|
|
318
|
+
"&": string;
|
|
319
|
+
objectName: any;
|
|
320
|
+
_id: any;
|
|
321
|
+
recordPermissions: string;
|
|
322
|
+
uiSchema: any;
|
|
323
|
+
};
|
|
325
324
|
body: {
|
|
326
325
|
type: string;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
columns: ({
|
|
334
|
-
body: {
|
|
335
|
-
type: string;
|
|
336
|
-
className: string;
|
|
337
|
-
tpl: string;
|
|
338
|
-
};
|
|
339
|
-
md: string;
|
|
326
|
+
columns: ({
|
|
327
|
+
body: {
|
|
328
|
+
type: string;
|
|
329
|
+
columns: ({
|
|
330
|
+
body: {
|
|
331
|
+
type: string;
|
|
340
332
|
className: string;
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
type: string;
|
|
345
|
-
tpl: string;
|
|
346
|
-
inline: boolean;
|
|
347
|
-
wrapperComponent: string;
|
|
348
|
-
className: string;
|
|
349
|
-
}[];
|
|
350
|
-
columnClassName: string;
|
|
351
|
-
md?: undefined;
|
|
352
|
-
className?: undefined;
|
|
353
|
-
})[];
|
|
333
|
+
tpl: string;
|
|
334
|
+
};
|
|
335
|
+
md: string;
|
|
354
336
|
className: string;
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
} | {
|
|
359
|
-
body: {
|
|
360
|
-
type: string;
|
|
361
|
-
items: {
|
|
337
|
+
columnClassName: string;
|
|
338
|
+
} | {
|
|
339
|
+
body: {
|
|
362
340
|
type: string;
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
341
|
+
tpl: string;
|
|
342
|
+
inline: boolean;
|
|
343
|
+
wrapperComponent: string;
|
|
366
344
|
className: string;
|
|
367
345
|
}[];
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
346
|
+
columnClassName: string;
|
|
347
|
+
md?: undefined;
|
|
348
|
+
className?: undefined;
|
|
349
|
+
})[];
|
|
350
|
+
className: string;
|
|
351
|
+
}[];
|
|
352
|
+
md: string;
|
|
353
|
+
} | {
|
|
354
|
+
body: {
|
|
355
|
+
type: string;
|
|
356
|
+
items: {
|
|
357
|
+
type: string;
|
|
358
|
+
name: any;
|
|
359
|
+
objectName: any;
|
|
360
|
+
visibleOn: any;
|
|
361
|
+
className: string;
|
|
362
|
+
}[];
|
|
363
|
+
};
|
|
364
|
+
md: string;
|
|
365
|
+
})[];
|
|
366
|
+
className: string;
|
|
375
367
|
}[];
|
|
376
368
|
messages: {};
|
|
369
|
+
hiddenOn: string;
|
|
377
370
|
}[];
|
|
371
|
+
className: string;
|
|
378
372
|
};
|
|
379
373
|
}>;
|
|
380
374
|
export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
|
|
@@ -425,65 +419,6 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
|
|
|
425
419
|
})[];
|
|
426
420
|
};
|
|
427
421
|
}>;
|
|
428
|
-
export function getObjectRelatedList(appName: any, objectName: any, recordId: any, formFactor: any): Promise<({
|
|
429
|
-
masterObjectName: any;
|
|
430
|
-
object_name: any;
|
|
431
|
-
foreign_key: any;
|
|
432
|
-
label: any;
|
|
433
|
-
schema: {
|
|
434
|
-
uiSchema: any;
|
|
435
|
-
amisSchema: {
|
|
436
|
-
type: string;
|
|
437
|
-
className: string;
|
|
438
|
-
id: string;
|
|
439
|
-
name: string;
|
|
440
|
-
data: {
|
|
441
|
-
$master: string;
|
|
442
|
-
objectName: any;
|
|
443
|
-
_id: any;
|
|
444
|
-
recordPermissions: any;
|
|
445
|
-
uiSchema: any;
|
|
446
|
-
loaded: boolean;
|
|
447
|
-
};
|
|
448
|
-
body: {};
|
|
449
|
-
};
|
|
450
|
-
};
|
|
451
|
-
} | {
|
|
452
|
-
masterObjectName: any;
|
|
453
|
-
object_name: any;
|
|
454
|
-
foreign_key: any;
|
|
455
|
-
schema: {
|
|
456
|
-
uiSchema: any;
|
|
457
|
-
isCustomAmisSchema?: undefined;
|
|
458
|
-
amisSchema?: undefined;
|
|
459
|
-
isCalendar?: undefined;
|
|
460
|
-
} | {
|
|
461
|
-
uiSchema: any;
|
|
462
|
-
isCustomAmisSchema: boolean;
|
|
463
|
-
amisSchema: any;
|
|
464
|
-
isCalendar?: undefined;
|
|
465
|
-
} | {
|
|
466
|
-
uiSchema: any;
|
|
467
|
-
isCalendar: boolean;
|
|
468
|
-
amisSchema: any;
|
|
469
|
-
isCustomAmisSchema?: undefined;
|
|
470
|
-
} | {
|
|
471
|
-
uiSchema: any;
|
|
472
|
-
amisSchema: {
|
|
473
|
-
type: string;
|
|
474
|
-
objectApiName: any;
|
|
475
|
-
columns: any;
|
|
476
|
-
extraColumns: any;
|
|
477
|
-
filters: any;
|
|
478
|
-
filtersFunction: any;
|
|
479
|
-
sort: string;
|
|
480
|
-
ctx: {};
|
|
481
|
-
};
|
|
482
|
-
isCustomAmisSchema?: undefined;
|
|
483
|
-
isCalendar?: undefined;
|
|
484
|
-
};
|
|
485
|
-
label?: undefined;
|
|
486
|
-
})[]>;
|
|
487
422
|
export function getObjectRelated({ appName, masterObjectName, objectName, relatedFieldName, recordId, formFactor }: {
|
|
488
423
|
appName: any;
|
|
489
424
|
masterObjectName: any;
|
|
@@ -1,61 +1,25 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function getObjectRelatedList(appName: any, objectName: any, recordId: any, formFactor: any): Promise<({
|
|
2
2
|
masterObjectName: any;
|
|
3
3
|
object_name: any;
|
|
4
4
|
foreign_key: any;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
data: {
|
|
13
|
-
$master: string;
|
|
14
|
-
objectName: any;
|
|
15
|
-
_id: any;
|
|
16
|
-
recordPermissions: any;
|
|
17
|
-
uiSchema: any;
|
|
18
|
-
loaded: boolean;
|
|
19
|
-
};
|
|
20
|
-
body: {};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
5
|
+
label: any;
|
|
6
|
+
columns: any;
|
|
7
|
+
sort: any;
|
|
8
|
+
filters: any;
|
|
9
|
+
visible_on: any;
|
|
10
|
+
page_size: any;
|
|
23
11
|
} | {
|
|
24
12
|
masterObjectName: any;
|
|
25
13
|
object_name: any;
|
|
26
14
|
foreign_key: any;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
uiSchema: any;
|
|
34
|
-
isCustomAmisSchema: boolean;
|
|
35
|
-
amisSchema: any;
|
|
36
|
-
isCalendar?: undefined;
|
|
37
|
-
} | {
|
|
38
|
-
uiSchema: any;
|
|
39
|
-
isCalendar: boolean;
|
|
40
|
-
amisSchema: any;
|
|
41
|
-
isCustomAmisSchema?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
uiSchema: any;
|
|
44
|
-
amisSchema: {
|
|
45
|
-
type: string;
|
|
46
|
-
objectApiName: any;
|
|
47
|
-
columns: any;
|
|
48
|
-
extraColumns: any;
|
|
49
|
-
filters: any;
|
|
50
|
-
filtersFunction: any;
|
|
51
|
-
sort: string;
|
|
52
|
-
ctx: {};
|
|
53
|
-
};
|
|
54
|
-
isCustomAmisSchema?: undefined;
|
|
55
|
-
isCalendar?: undefined;
|
|
56
|
-
};
|
|
15
|
+
label?: undefined;
|
|
16
|
+
columns?: undefined;
|
|
17
|
+
sort?: undefined;
|
|
18
|
+
filters?: undefined;
|
|
19
|
+
visible_on?: undefined;
|
|
20
|
+
page_size?: undefined;
|
|
57
21
|
})[]>;
|
|
58
|
-
export function getRecordDetailRelatedListSchema(objectName: any, recordId: any, relatedObjectName: any, relatedKey: any,
|
|
22
|
+
export function getRecordDetailRelatedListSchema(objectName: any, recordId: any, relatedObjectName: any, relatedKey: any, ctx: any): Promise<{
|
|
59
23
|
uiSchema: any;
|
|
60
24
|
amisSchema: {
|
|
61
25
|
type: string;
|
|
@@ -71,7 +35,40 @@ export function getRecordDetailRelatedListSchema(objectName: any, recordId: any,
|
|
|
71
35
|
objectName: any;
|
|
72
36
|
listViewId: string;
|
|
73
37
|
};
|
|
74
|
-
body:
|
|
38
|
+
body: {
|
|
39
|
+
data: {
|
|
40
|
+
"&": string;
|
|
41
|
+
appId: string;
|
|
42
|
+
app_id: string;
|
|
43
|
+
relatedKey: any;
|
|
44
|
+
objectName: string;
|
|
45
|
+
recordId: string;
|
|
46
|
+
defaultData: {
|
|
47
|
+
[x: number]: any;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
type: string;
|
|
51
|
+
objectApiName: any;
|
|
52
|
+
columns: any;
|
|
53
|
+
extraColumns: any;
|
|
54
|
+
filters: any;
|
|
55
|
+
filtersFunction: any;
|
|
56
|
+
sort: string;
|
|
57
|
+
ctx: {};
|
|
58
|
+
}[];
|
|
59
|
+
};
|
|
60
|
+
}>;
|
|
61
|
+
export function getRelatedListSchema(appName: any, objectName: any, listViewName: any, ctx?: {}): Promise<{
|
|
62
|
+
uiSchema: any;
|
|
63
|
+
amisSchema: {
|
|
64
|
+
type: string;
|
|
65
|
+
objectApiName: any;
|
|
66
|
+
columns: any;
|
|
67
|
+
extraColumns: any;
|
|
68
|
+
filters: any;
|
|
69
|
+
filtersFunction: any;
|
|
70
|
+
sort: string;
|
|
71
|
+
ctx: {};
|
|
75
72
|
};
|
|
76
73
|
}>;
|
|
77
74
|
export function getRelatedFieldValue(masterObjectName: any, record_id: any, uiSchema: any, foreign_key: any): any;
|
|
@@ -33,6 +33,7 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
|
|
|
33
33
|
objectApiName: any;
|
|
34
34
|
columnsTogglable: boolean;
|
|
35
35
|
showHeader: boolean;
|
|
36
|
+
className: string;
|
|
36
37
|
}[];
|
|
37
38
|
}>;
|
|
38
39
|
export function getRecordPageInitSchema(objectApiName: any): Promise<{
|
|
@@ -144,10 +144,10 @@ export function getSchema(uiSchema: any): {
|
|
|
144
144
|
label: string;
|
|
145
145
|
type: string;
|
|
146
146
|
className: string;
|
|
147
|
-
html: boolean;
|
|
148
147
|
width?: undefined;
|
|
149
148
|
placeholder?: undefined;
|
|
150
149
|
tpl?: undefined;
|
|
150
|
+
html?: undefined;
|
|
151
151
|
})[];
|
|
152
152
|
syncLocation: boolean;
|
|
153
153
|
keepItemSelectionOnPageChange: boolean;
|
|
@@ -301,10 +301,10 @@ export namespace StandardButtons {
|
|
|
301
301
|
label: string;
|
|
302
302
|
type: string;
|
|
303
303
|
className: string;
|
|
304
|
-
html: boolean;
|
|
305
304
|
width?: undefined;
|
|
306
305
|
placeholder?: undefined;
|
|
307
306
|
tpl?: undefined;
|
|
307
|
+
html?: undefined;
|
|
308
308
|
})[];
|
|
309
309
|
syncLocation: boolean;
|
|
310
310
|
keepItemSelectionOnPageChange: boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/amis-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.20",
|
|
5
5
|
"unpkg": "./dist/index.umd.js",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.esm.js",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"lodash": "^4.17.21"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "acf7c60bb6a47c4aa1a7b19dae65ccfe788b8557"
|
|
62
62
|
}
|