@steedos-widgets/amis-lib 1.0.7 → 1.0.9
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 +255 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +250 -17
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +273 -40
- package/dist/index.umd.js.map +1 -1
- package/dist/render.d.ts +15 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/converter/amis/calendar.d.ts +109 -10
- package/dist/types/lib/converter/amis/fields/index.d.ts +1 -1
- package/dist/types/lib/converter/amis/fields/table.d.ts +24 -0
- package/dist/types/lib/converter/amis/graphql.d.ts +3 -0
- package/dist/types/lib/converter/amis/header.d.ts +68 -90
- package/dist/types/lib/objects.d.ts +293 -94
- package/dist/types/lib/objectsRelated.d.ts +68 -9
- package/dist/types/render.d.ts +15 -0
- package/package.json +4 -4
- package/dist/index.umd.min.js +0 -686
package/dist/render.d.ts
ADDED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,19 +1,57 @@
|
|
|
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
|
+
}>;
|
|
15
|
+
export function getCalendarRecordPermissionsApi(mainObject: any, recordId: any): {
|
|
16
|
+
method: string;
|
|
17
|
+
url: string;
|
|
18
|
+
data: {
|
|
19
|
+
query: string;
|
|
20
|
+
};
|
|
21
|
+
headers: {
|
|
22
|
+
Authorization: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export function getCalendarRecordSaveApi(object: any, calendarOptions: any): {
|
|
26
|
+
method: string;
|
|
27
|
+
url: string;
|
|
28
|
+
data: {
|
|
29
|
+
objectName: string;
|
|
30
|
+
$: {
|
|
31
|
+
_id: string;
|
|
32
|
+
};
|
|
33
|
+
$self: string;
|
|
34
|
+
};
|
|
35
|
+
requestAdaptor: string;
|
|
36
|
+
adaptor: string;
|
|
37
|
+
headers: {
|
|
38
|
+
Authorization: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
1
41
|
/**
|
|
2
42
|
* 列表视图Calendar amisSchema
|
|
3
43
|
* @param {*} objectSchema 对象UISchema
|
|
4
44
|
* @returns amisSchema
|
|
5
45
|
*/
|
|
6
|
-
export function getObjectCalendar(objectSchema: any, listView: any,
|
|
46
|
+
export function getObjectCalendar(objectSchema: any, listView: any, options: any): Promise<{
|
|
7
47
|
type: string;
|
|
8
48
|
label: string;
|
|
9
49
|
name: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
start: string;
|
|
14
|
-
}[];
|
|
50
|
+
editable: any;
|
|
51
|
+
selectable: any;
|
|
52
|
+
selectMirror: any;
|
|
15
53
|
onEvent: {
|
|
16
|
-
|
|
54
|
+
getEvents: {
|
|
17
55
|
weight: number;
|
|
18
56
|
actions: {
|
|
19
57
|
componentId: string;
|
|
@@ -22,7 +60,7 @@ export function getObjectCalendar(objectSchema: any, listView: any, ctx: any): P
|
|
|
22
60
|
script: string;
|
|
23
61
|
}[];
|
|
24
62
|
};
|
|
25
|
-
|
|
63
|
+
select: {
|
|
26
64
|
weight: number;
|
|
27
65
|
actions: {
|
|
28
66
|
componentId: string;
|
|
@@ -31,7 +69,7 @@ export function getObjectCalendar(objectSchema: any, listView: any, ctx: any): P
|
|
|
31
69
|
script: string;
|
|
32
70
|
}[];
|
|
33
71
|
};
|
|
34
|
-
|
|
72
|
+
eventClick: {
|
|
35
73
|
weight: number;
|
|
36
74
|
actions: {
|
|
37
75
|
componentId: string;
|
|
@@ -40,7 +78,7 @@ export function getObjectCalendar(objectSchema: any, listView: any, ctx: any): P
|
|
|
40
78
|
script: string;
|
|
41
79
|
}[];
|
|
42
80
|
};
|
|
43
|
-
|
|
81
|
+
eventAdd: {
|
|
44
82
|
weight: number;
|
|
45
83
|
actions: {
|
|
46
84
|
componentId: string;
|
|
@@ -49,6 +87,67 @@ export function getObjectCalendar(objectSchema: any, listView: any, ctx: any): P
|
|
|
49
87
|
script: string;
|
|
50
88
|
}[];
|
|
51
89
|
};
|
|
90
|
+
eventChange: {
|
|
91
|
+
weight: number;
|
|
92
|
+
actions: ({
|
|
93
|
+
actionType: string;
|
|
94
|
+
args: {
|
|
95
|
+
api: {
|
|
96
|
+
method: string;
|
|
97
|
+
url: string;
|
|
98
|
+
data: {
|
|
99
|
+
query: string;
|
|
100
|
+
};
|
|
101
|
+
headers: {
|
|
102
|
+
Authorization: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
msgType?: undefined;
|
|
106
|
+
msg?: undefined;
|
|
107
|
+
position?: undefined;
|
|
108
|
+
messages?: undefined;
|
|
109
|
+
};
|
|
110
|
+
expression?: undefined;
|
|
111
|
+
} | {
|
|
112
|
+
actionType: string;
|
|
113
|
+
expression: string;
|
|
114
|
+
args: {
|
|
115
|
+
msgType: string;
|
|
116
|
+
msg: string;
|
|
117
|
+
position: string;
|
|
118
|
+
api?: undefined;
|
|
119
|
+
messages?: undefined;
|
|
120
|
+
};
|
|
121
|
+
} | {
|
|
122
|
+
actionType: string;
|
|
123
|
+
expression: string;
|
|
124
|
+
args: {
|
|
125
|
+
api: {
|
|
126
|
+
method: string;
|
|
127
|
+
url: string;
|
|
128
|
+
data: {
|
|
129
|
+
objectName: string;
|
|
130
|
+
$: {
|
|
131
|
+
_id: string;
|
|
132
|
+
};
|
|
133
|
+
$self: string;
|
|
134
|
+
};
|
|
135
|
+
requestAdaptor: string;
|
|
136
|
+
adaptor: string;
|
|
137
|
+
headers: {
|
|
138
|
+
Authorization: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
messages: {
|
|
142
|
+
success: string;
|
|
143
|
+
failed: string;
|
|
144
|
+
};
|
|
145
|
+
msgType?: undefined;
|
|
146
|
+
msg?: undefined;
|
|
147
|
+
position?: undefined;
|
|
148
|
+
};
|
|
149
|
+
})[];
|
|
150
|
+
};
|
|
52
151
|
eventRemove: {
|
|
53
152
|
weight: number;
|
|
54
153
|
actions: {
|
|
@@ -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" | "
|
|
9
|
+
export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "textarea" | "table" | "email" | "html" | "picker" | "checkbox";
|
|
10
10
|
export function getObjectFieldSubFields(mainField: any, fields: any): any;
|
|
11
11
|
export function getGridFieldSubFields(mainField: any, fields: any): any;
|
|
12
12
|
/**
|
|
@@ -32,3 +32,27 @@ 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
|
+
}>;
|
|
49
|
+
export function getRecordPermissionsApi(object: any, recordId: any, options: any): {
|
|
50
|
+
method: string;
|
|
51
|
+
url: string;
|
|
52
|
+
data: {
|
|
53
|
+
query: string;
|
|
54
|
+
};
|
|
55
|
+
headers: {
|
|
56
|
+
Authorization: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -21,4 +21,7 @@ export function getFindQuery(object: any, recordId: any, fields: any, options: a
|
|
|
21
21
|
pageSize: string;
|
|
22
22
|
query: string;
|
|
23
23
|
}>;
|
|
24
|
+
export function getRecordPermissionsQuery(object: any, recordId: any, options: any): {
|
|
25
|
+
query: string;
|
|
26
|
+
};
|
|
24
27
|
export function getApi(isMobile: any): string;
|
|
@@ -17,7 +17,7 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
|
|
|
17
17
|
md: string;
|
|
18
18
|
className: string;
|
|
19
19
|
columnClassName: string;
|
|
20
|
-
valign
|
|
20
|
+
valign: string;
|
|
21
21
|
} | {
|
|
22
22
|
body: ({
|
|
23
23
|
type: string;
|
|
@@ -45,12 +45,14 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
|
|
|
45
45
|
wrapperComponent?: undefined;
|
|
46
46
|
})[];
|
|
47
47
|
md: string;
|
|
48
|
-
valign: string;
|
|
49
48
|
columnClassName: string;
|
|
50
49
|
className?: undefined;
|
|
50
|
+
valign?: undefined;
|
|
51
51
|
})[];
|
|
52
|
+
className: string;
|
|
52
53
|
}[];
|
|
53
54
|
md: string;
|
|
55
|
+
valign?: undefined;
|
|
54
56
|
} | {
|
|
55
57
|
body: {
|
|
56
58
|
type: string;
|
|
@@ -63,8 +65,9 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
|
|
|
63
65
|
}[];
|
|
64
66
|
};
|
|
65
67
|
md: string;
|
|
68
|
+
valign: string;
|
|
66
69
|
})[];
|
|
67
|
-
|
|
70
|
+
className: string;
|
|
68
71
|
};
|
|
69
72
|
/**
|
|
70
73
|
* 列表视图顶部第二行amisSchema
|
|
@@ -73,7 +76,6 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
|
|
|
73
76
|
*/
|
|
74
77
|
export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: any, ctx: any): Promise<{
|
|
75
78
|
type: string;
|
|
76
|
-
align: string;
|
|
77
79
|
columns: ({
|
|
78
80
|
body: {
|
|
79
81
|
type: string;
|
|
@@ -89,7 +91,7 @@ export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: a
|
|
|
89
91
|
id: string;
|
|
90
92
|
}[];
|
|
91
93
|
md: string;
|
|
92
|
-
|
|
94
|
+
columnClassName: string;
|
|
93
95
|
} | {
|
|
94
96
|
body: ({
|
|
95
97
|
type: string;
|
|
@@ -118,7 +120,7 @@ export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: a
|
|
|
118
120
|
className: string;
|
|
119
121
|
})[];
|
|
120
122
|
md: string;
|
|
121
|
-
|
|
123
|
+
columnClassName?: undefined;
|
|
122
124
|
})[];
|
|
123
125
|
className: string;
|
|
124
126
|
}>;
|
|
@@ -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;
|
|
@@ -367,7 +364,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
367
364
|
md: string;
|
|
368
365
|
className: string;
|
|
369
366
|
columnClassName: string;
|
|
370
|
-
valign
|
|
367
|
+
valign: string;
|
|
371
368
|
} | {
|
|
372
369
|
body: ({
|
|
373
370
|
type: string;
|
|
@@ -395,12 +392,14 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
395
392
|
wrapperComponent?: undefined;
|
|
396
393
|
})[];
|
|
397
394
|
md: string;
|
|
398
|
-
valign: string;
|
|
399
395
|
columnClassName: string;
|
|
400
396
|
className?: undefined;
|
|
397
|
+
valign?: undefined;
|
|
401
398
|
})[];
|
|
399
|
+
className: string;
|
|
402
400
|
}[];
|
|
403
401
|
md: string;
|
|
402
|
+
valign?: undefined;
|
|
404
403
|
} | {
|
|
405
404
|
body: {
|
|
406
405
|
type: string;
|
|
@@ -413,11 +412,11 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
413
412
|
}[];
|
|
414
413
|
};
|
|
415
414
|
md: string;
|
|
415
|
+
valign: string;
|
|
416
416
|
})[];
|
|
417
|
-
|
|
417
|
+
className: string;
|
|
418
418
|
} | {
|
|
419
419
|
type: string;
|
|
420
|
-
align: string;
|
|
421
420
|
columns: ({
|
|
422
421
|
body: {
|
|
423
422
|
type: string;
|
|
@@ -433,7 +432,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
433
432
|
id: string;
|
|
434
433
|
}[];
|
|
435
434
|
md: string;
|
|
436
|
-
|
|
435
|
+
columnClassName: string;
|
|
437
436
|
} | {
|
|
438
437
|
body: ({
|
|
439
438
|
type: string;
|
|
@@ -462,7 +461,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
462
461
|
className: string;
|
|
463
462
|
})[];
|
|
464
463
|
md: string;
|
|
465
|
-
|
|
464
|
+
columnClassName?: undefined;
|
|
466
465
|
})[];
|
|
467
466
|
className: string;
|
|
468
467
|
})[];
|
|
@@ -491,80 +490,62 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any): P
|
|
|
491
490
|
};
|
|
492
491
|
body: {
|
|
493
492
|
type: string;
|
|
493
|
+
data: {
|
|
494
|
+
"&": string;
|
|
495
|
+
record: string;
|
|
496
|
+
recordLoaded: string;
|
|
497
|
+
};
|
|
494
498
|
body: {
|
|
495
499
|
type: string;
|
|
496
|
-
|
|
497
|
-
body:
|
|
498
|
-
header: {
|
|
500
|
+
className: string;
|
|
501
|
+
body: {
|
|
499
502
|
type: string;
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
body: {
|
|
507
|
-
type: string;
|
|
508
|
-
className: string;
|
|
509
|
-
tpl: string;
|
|
510
|
-
};
|
|
511
|
-
md: string;
|
|
503
|
+
columns: ({
|
|
504
|
+
body: {
|
|
505
|
+
type: string;
|
|
506
|
+
columns: ({
|
|
507
|
+
body: {
|
|
508
|
+
type: string;
|
|
512
509
|
className: string;
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
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: {
|
|
510
|
+
tpl: string;
|
|
511
|
+
};
|
|
512
|
+
md: string;
|
|
513
|
+
className: string;
|
|
514
|
+
columnClassName: string;
|
|
515
|
+
} | {
|
|
516
|
+
body: {
|
|
550
517
|
type: string;
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
518
|
+
tpl: string;
|
|
519
|
+
inline: boolean;
|
|
520
|
+
wrapperComponent: string;
|
|
554
521
|
className: string;
|
|
555
522
|
}[];
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
523
|
+
columnClassName: string;
|
|
524
|
+
md?: undefined;
|
|
525
|
+
className?: undefined;
|
|
526
|
+
})[];
|
|
527
|
+
className: string;
|
|
528
|
+
}[];
|
|
529
|
+
md: string;
|
|
530
|
+
} | {
|
|
531
|
+
body: {
|
|
532
|
+
type: string;
|
|
533
|
+
items: {
|
|
534
|
+
type: string;
|
|
535
|
+
name: any;
|
|
536
|
+
objectName: any;
|
|
537
|
+
visibleOn: any;
|
|
538
|
+
className: string;
|
|
539
|
+
}[];
|
|
540
|
+
};
|
|
541
|
+
md: string;
|
|
542
|
+
})[];
|
|
543
|
+
className: string;
|
|
544
|
+
}[];
|
|
545
|
+
size: string;
|
|
566
546
|
}[];
|
|
567
547
|
messages: {};
|
|
548
|
+
hiddenOn: string;
|
|
568
549
|
}[];
|
|
569
550
|
}>;
|
|
570
551
|
/**
|
|
@@ -576,9 +557,12 @@ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any)
|
|
|
576
557
|
type: string;
|
|
577
558
|
body: {
|
|
578
559
|
type: string;
|
|
560
|
+
valign: string;
|
|
579
561
|
columns: ({
|
|
580
562
|
body: {
|
|
581
563
|
type: string;
|
|
564
|
+
valign: string;
|
|
565
|
+
className: string;
|
|
582
566
|
columns: ({
|
|
583
567
|
body: {
|
|
584
568
|
type: string;
|
|
@@ -596,11 +580,6 @@ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any)
|
|
|
596
580
|
inline: boolean;
|
|
597
581
|
wrapperComponent: string;
|
|
598
582
|
className: string;
|
|
599
|
-
style: {
|
|
600
|
-
fontFamily: string;
|
|
601
|
-
fontSize: number;
|
|
602
|
-
fontWeight: string;
|
|
603
|
-
};
|
|
604
583
|
}[];
|
|
605
584
|
md: string;
|
|
606
585
|
valign: string;
|
|
@@ -622,9 +601,8 @@ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any)
|
|
|
622
601
|
};
|
|
623
602
|
md: string;
|
|
624
603
|
})[];
|
|
625
|
-
|
|
604
|
+
className: string;
|
|
626
605
|
}[];
|
|
627
|
-
size: string;
|
|
628
606
|
className: string;
|
|
629
607
|
}>;
|
|
630
608
|
/**
|