@steedos-widgets/amis-lib 1.0.7 → 1.0.8
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 +126 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +119 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +141 -25
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +141 -25
- package/dist/types/lib/converter/amis/calendar.d.ts +23 -5
- package/dist/types/lib/converter/amis/fields/table.d.ts +14 -0
- package/dist/types/lib/converter/amis/header.d.ts +62 -70
- package/dist/types/lib/objects.d.ts +84 -79
- package/dist/types/lib/objectsRelated.d.ts +9 -5
- package/package.json +2 -2
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
export function getCalendarApi(mainObject: any, fields: any, options: any): Promise<{
|
|
2
|
+
method: string;
|
|
3
|
+
url: string;
|
|
4
|
+
data: {
|
|
5
|
+
orderBy: string;
|
|
6
|
+
orderDir: string;
|
|
7
|
+
pageNo: string;
|
|
8
|
+
pageSize: string;
|
|
9
|
+
query: string;
|
|
10
|
+
};
|
|
11
|
+
headers: {
|
|
12
|
+
Authorization: string;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
1
15
|
/**
|
|
2
16
|
* 列表视图Calendar amisSchema
|
|
3
17
|
* @param {*} objectSchema 对象UISchema
|
|
@@ -7,12 +21,16 @@ export function getObjectCalendar(objectSchema: any, listView: any, ctx: any): P
|
|
|
7
21
|
type: string;
|
|
8
22
|
label: string;
|
|
9
23
|
name: string;
|
|
10
|
-
initialEvents: {
|
|
11
|
-
id: string;
|
|
12
|
-
title: string;
|
|
13
|
-
start: string;
|
|
14
|
-
}[];
|
|
15
24
|
onEvent: {
|
|
25
|
+
getEvents: {
|
|
26
|
+
weight: number;
|
|
27
|
+
actions: {
|
|
28
|
+
componentId: string;
|
|
29
|
+
args: {};
|
|
30
|
+
actionType: string;
|
|
31
|
+
script: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
16
34
|
select: {
|
|
17
35
|
weight: number;
|
|
18
36
|
actions: {
|
|
@@ -32,3 +32,17 @@ export function getTableApi(mainObject: any, fields: any, options: any): Promise
|
|
|
32
32
|
Authorization: string;
|
|
33
33
|
};
|
|
34
34
|
}>;
|
|
35
|
+
export function getApi(object: any, recordId: any, fields: any, options: any): Promise<{
|
|
36
|
+
method: string;
|
|
37
|
+
url: string;
|
|
38
|
+
data: {
|
|
39
|
+
orderBy: string;
|
|
40
|
+
orderDir: string;
|
|
41
|
+
pageNo: string;
|
|
42
|
+
pageSize: string;
|
|
43
|
+
query: string;
|
|
44
|
+
};
|
|
45
|
+
headers: {
|
|
46
|
+
Authorization: string;
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
@@ -51,6 +51,7 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
|
|
|
51
51
|
})[];
|
|
52
52
|
}[];
|
|
53
53
|
md: string;
|
|
54
|
+
valign?: undefined;
|
|
54
55
|
} | {
|
|
55
56
|
body: {
|
|
56
57
|
type: string;
|
|
@@ -63,6 +64,7 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
|
|
|
63
64
|
}[];
|
|
64
65
|
};
|
|
65
66
|
md: string;
|
|
67
|
+
valign: string;
|
|
66
68
|
})[];
|
|
67
69
|
align: string;
|
|
68
70
|
};
|
|
@@ -222,12 +224,7 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
|
|
|
222
224
|
id: string;
|
|
223
225
|
source: {
|
|
224
226
|
method: string;
|
|
225
|
-
url: string;
|
|
226
|
-
* 记录详细界面顶部头amisSchema,也是标题面板组件的amisSchema
|
|
227
|
-
* @param {*} objectSchema 对象UISchema
|
|
228
|
-
* @param {*} recordId 记录id
|
|
229
|
-
* @returns amisSchema
|
|
230
|
-
*/
|
|
227
|
+
url: string;
|
|
231
228
|
dataType: string;
|
|
232
229
|
headers: {
|
|
233
230
|
Authorization: string;
|
|
@@ -401,6 +398,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
401
398
|
})[];
|
|
402
399
|
}[];
|
|
403
400
|
md: string;
|
|
401
|
+
valign?: undefined;
|
|
404
402
|
} | {
|
|
405
403
|
body: {
|
|
406
404
|
type: string;
|
|
@@ -413,6 +411,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
413
411
|
}[];
|
|
414
412
|
};
|
|
415
413
|
md: string;
|
|
414
|
+
valign: string;
|
|
416
415
|
})[];
|
|
417
416
|
align: string;
|
|
418
417
|
} | {
|
|
@@ -493,76 +492,69 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any): P
|
|
|
493
492
|
type: string;
|
|
494
493
|
body: {
|
|
495
494
|
type: string;
|
|
496
|
-
|
|
497
|
-
body:
|
|
498
|
-
header: {
|
|
495
|
+
className: string;
|
|
496
|
+
body: {
|
|
499
497
|
type: string;
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
498
|
+
columns: ({
|
|
499
|
+
body: {
|
|
500
|
+
type: string;
|
|
501
|
+
columns: ({
|
|
502
|
+
body: {
|
|
503
|
+
type: string;
|
|
504
|
+
className: string;
|
|
505
|
+
tpl: string;
|
|
506
|
+
};
|
|
507
|
+
md: string;
|
|
508
|
+
className: string;
|
|
509
|
+
columnClassName: string;
|
|
510
|
+
} | {
|
|
511
|
+
body: ({
|
|
512
|
+
type: string;
|
|
513
|
+
tpl: string;
|
|
514
|
+
inline: boolean;
|
|
515
|
+
wrapperComponent: string;
|
|
516
|
+
style: {
|
|
517
|
+
fontFamily: string;
|
|
518
|
+
fontSize: number;
|
|
519
|
+
fontWeight?: undefined;
|
|
520
|
+
textAlign?: undefined;
|
|
510
521
|
};
|
|
511
|
-
md: string;
|
|
512
522
|
className: string;
|
|
513
|
-
columnClassName: string;
|
|
514
523
|
} | {
|
|
515
|
-
body: ({
|
|
516
|
-
type: string;
|
|
517
|
-
tpl: string;
|
|
518
|
-
inline: boolean;
|
|
519
|
-
wrapperComponent: string;
|
|
520
|
-
style: {
|
|
521
|
-
fontFamily: string;
|
|
522
|
-
fontSize: number;
|
|
523
|
-
fontWeight?: undefined;
|
|
524
|
-
textAlign?: undefined;
|
|
525
|
-
};
|
|
526
|
-
className: string;
|
|
527
|
-
} | {
|
|
528
|
-
type: string;
|
|
529
|
-
tpl: string;
|
|
530
|
-
inline: boolean;
|
|
531
|
-
wrapperComponent: string;
|
|
532
|
-
style: {
|
|
533
|
-
fontFamily: string;
|
|
534
|
-
fontSize: number;
|
|
535
|
-
fontWeight: string;
|
|
536
|
-
textAlign: string;
|
|
537
|
-
};
|
|
538
|
-
className: string;
|
|
539
|
-
})[];
|
|
540
|
-
md?: undefined;
|
|
541
|
-
className?: undefined;
|
|
542
|
-
columnClassName?: undefined;
|
|
543
|
-
})[];
|
|
544
|
-
}[];
|
|
545
|
-
md: string;
|
|
546
|
-
} | {
|
|
547
|
-
body: {
|
|
548
|
-
type: string;
|
|
549
|
-
items: {
|
|
550
524
|
type: string;
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
525
|
+
tpl: string;
|
|
526
|
+
inline: boolean;
|
|
527
|
+
wrapperComponent: string;
|
|
528
|
+
style: {
|
|
529
|
+
fontFamily: string;
|
|
530
|
+
fontSize: number;
|
|
531
|
+
fontWeight: string;
|
|
532
|
+
textAlign: string;
|
|
533
|
+
};
|
|
554
534
|
className: string;
|
|
555
|
-
}[];
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
535
|
+
})[];
|
|
536
|
+
md?: undefined;
|
|
537
|
+
className?: undefined;
|
|
538
|
+
columnClassName?: undefined;
|
|
539
|
+
})[];
|
|
540
|
+
}[];
|
|
541
|
+
md: string;
|
|
542
|
+
} | {
|
|
543
|
+
body: {
|
|
544
|
+
type: string;
|
|
545
|
+
items: {
|
|
546
|
+
type: string;
|
|
547
|
+
name: any;
|
|
548
|
+
objectName: any;
|
|
549
|
+
visibleOn: any;
|
|
550
|
+
className: string;
|
|
551
|
+
}[];
|
|
552
|
+
};
|
|
553
|
+
md: string;
|
|
554
|
+
})[];
|
|
555
|
+
align: string;
|
|
556
|
+
}[];
|
|
557
|
+
size: string;
|
|
566
558
|
}[];
|
|
567
559
|
messages: {};
|
|
568
560
|
}[];
|
|
@@ -131,12 +131,16 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
|
|
|
131
131
|
type: string;
|
|
132
132
|
label: string;
|
|
133
133
|
name: string;
|
|
134
|
-
initialEvents: {
|
|
135
|
-
id: string;
|
|
136
|
-
title: string;
|
|
137
|
-
start: string;
|
|
138
|
-
}[];
|
|
139
134
|
onEvent: {
|
|
135
|
+
getEvents: {
|
|
136
|
+
weight: number;
|
|
137
|
+
actions: {
|
|
138
|
+
componentId: string;
|
|
139
|
+
args: {};
|
|
140
|
+
actionType: string;
|
|
141
|
+
script: string;
|
|
142
|
+
}[];
|
|
143
|
+
};
|
|
140
144
|
select: {
|
|
141
145
|
weight: number;
|
|
142
146
|
actions: {
|
|
@@ -247,76 +251,69 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any): Pro
|
|
|
247
251
|
type: string;
|
|
248
252
|
body: {
|
|
249
253
|
type: string;
|
|
250
|
-
|
|
251
|
-
body:
|
|
252
|
-
header: {
|
|
254
|
+
className: string;
|
|
255
|
+
body: {
|
|
253
256
|
type: string;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
257
|
+
columns: ({
|
|
258
|
+
body: {
|
|
259
|
+
type: string;
|
|
260
|
+
columns: ({
|
|
261
|
+
body: {
|
|
262
|
+
type: string;
|
|
263
|
+
className: string;
|
|
264
|
+
tpl: string;
|
|
265
|
+
};
|
|
266
|
+
md: string;
|
|
267
|
+
className: string;
|
|
268
|
+
columnClassName: string;
|
|
269
|
+
} | {
|
|
270
|
+
body: ({
|
|
271
|
+
type: string;
|
|
272
|
+
tpl: string;
|
|
273
|
+
inline: boolean;
|
|
274
|
+
wrapperComponent: string;
|
|
275
|
+
style: {
|
|
276
|
+
fontFamily: string;
|
|
277
|
+
fontSize: number;
|
|
278
|
+
fontWeight?: undefined;
|
|
279
|
+
textAlign?: undefined;
|
|
264
280
|
};
|
|
265
|
-
md: string;
|
|
266
281
|
className: string;
|
|
267
|
-
columnClassName: string;
|
|
268
282
|
} | {
|
|
269
|
-
body: ({
|
|
270
|
-
type: string;
|
|
271
|
-
tpl: string;
|
|
272
|
-
inline: boolean;
|
|
273
|
-
wrapperComponent: string;
|
|
274
|
-
style: {
|
|
275
|
-
fontFamily: string;
|
|
276
|
-
fontSize: number;
|
|
277
|
-
fontWeight?: undefined;
|
|
278
|
-
textAlign?: undefined;
|
|
279
|
-
};
|
|
280
|
-
className: string;
|
|
281
|
-
} | {
|
|
282
|
-
type: string;
|
|
283
|
-
tpl: string;
|
|
284
|
-
inline: boolean;
|
|
285
|
-
wrapperComponent: string;
|
|
286
|
-
style: {
|
|
287
|
-
fontFamily: string;
|
|
288
|
-
fontSize: number;
|
|
289
|
-
fontWeight: string;
|
|
290
|
-
textAlign: string;
|
|
291
|
-
};
|
|
292
|
-
className: string;
|
|
293
|
-
})[];
|
|
294
|
-
md?: undefined;
|
|
295
|
-
className?: undefined;
|
|
296
|
-
columnClassName?: undefined;
|
|
297
|
-
})[];
|
|
298
|
-
}[];
|
|
299
|
-
md: string;
|
|
300
|
-
} | {
|
|
301
|
-
body: {
|
|
302
|
-
type: string;
|
|
303
|
-
items: {
|
|
304
283
|
type: string;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
284
|
+
tpl: string;
|
|
285
|
+
inline: boolean;
|
|
286
|
+
wrapperComponent: string;
|
|
287
|
+
style: {
|
|
288
|
+
fontFamily: string;
|
|
289
|
+
fontSize: number;
|
|
290
|
+
fontWeight: string;
|
|
291
|
+
textAlign: string;
|
|
292
|
+
};
|
|
308
293
|
className: string;
|
|
309
|
-
}[];
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
294
|
+
})[];
|
|
295
|
+
md?: undefined;
|
|
296
|
+
className?: undefined;
|
|
297
|
+
columnClassName?: undefined;
|
|
298
|
+
})[];
|
|
299
|
+
}[];
|
|
300
|
+
md: string;
|
|
301
|
+
} | {
|
|
302
|
+
body: {
|
|
303
|
+
type: string;
|
|
304
|
+
items: {
|
|
305
|
+
type: string;
|
|
306
|
+
name: any;
|
|
307
|
+
objectName: any;
|
|
308
|
+
visibleOn: any;
|
|
309
|
+
className: string;
|
|
310
|
+
}[];
|
|
311
|
+
};
|
|
312
|
+
md: string;
|
|
313
|
+
})[];
|
|
314
|
+
align: string;
|
|
315
|
+
}[];
|
|
316
|
+
size: string;
|
|
320
317
|
}[];
|
|
321
318
|
messages: {};
|
|
322
319
|
}[];
|
|
@@ -408,12 +405,16 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
|
|
|
408
405
|
type: string;
|
|
409
406
|
label: string;
|
|
410
407
|
name: string;
|
|
411
|
-
initialEvents: {
|
|
412
|
-
id: string;
|
|
413
|
-
title: string;
|
|
414
|
-
start: string;
|
|
415
|
-
}[];
|
|
416
408
|
onEvent: {
|
|
409
|
+
getEvents: {
|
|
410
|
+
weight: number;
|
|
411
|
+
actions: {
|
|
412
|
+
componentId: string;
|
|
413
|
+
args: {};
|
|
414
|
+
actionType: string;
|
|
415
|
+
script: string;
|
|
416
|
+
}[];
|
|
417
|
+
};
|
|
417
418
|
select: {
|
|
418
419
|
weight: number;
|
|
419
420
|
actions: {
|
|
@@ -514,12 +515,16 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
|
|
|
514
515
|
type: string;
|
|
515
516
|
label: string;
|
|
516
517
|
name: string;
|
|
517
|
-
initialEvents: {
|
|
518
|
-
id: string;
|
|
519
|
-
title: string;
|
|
520
|
-
start: string;
|
|
521
|
-
}[];
|
|
522
518
|
onEvent: {
|
|
519
|
+
getEvents: {
|
|
520
|
+
weight: number;
|
|
521
|
+
actions: {
|
|
522
|
+
componentId: string;
|
|
523
|
+
args: {};
|
|
524
|
+
actionType: string;
|
|
525
|
+
script: string;
|
|
526
|
+
}[];
|
|
527
|
+
};
|
|
523
528
|
select: {
|
|
524
529
|
weight: number;
|
|
525
530
|
actions: {
|
|
@@ -41,12 +41,16 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
|
|
|
41
41
|
type: string;
|
|
42
42
|
label: string;
|
|
43
43
|
name: string;
|
|
44
|
-
initialEvents: {
|
|
45
|
-
id: string;
|
|
46
|
-
title: string;
|
|
47
|
-
start: string;
|
|
48
|
-
}[];
|
|
49
44
|
onEvent: {
|
|
45
|
+
getEvents: {
|
|
46
|
+
weight: number;
|
|
47
|
+
actions: {
|
|
48
|
+
componentId: string;
|
|
49
|
+
args: {};
|
|
50
|
+
actionType: string;
|
|
51
|
+
script: string;
|
|
52
|
+
}[];
|
|
53
|
+
};
|
|
50
54
|
select: {
|
|
51
55
|
weight: number;
|
|
52
56
|
actions: {
|
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.8",
|
|
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": "806cd820c21cacc1c1d949efbe018d325d4b5a6e"
|
|
62
62
|
}
|