@steedos-widgets/amis-lib 1.2.6-beta.9 → 1.2.6
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 +377 -108
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +376 -109
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +377 -108
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/buttons.d.ts +91 -0
- package/dist/types/lib/converter/amis/fields_filter.d.ts +15 -0
- package/dist/types/lib/converter/amis/header.d.ts +134 -8
- package/dist/types/lib/converter/amis/index.d.ts +2 -0
- package/dist/types/lib/converter/amis/toolbar.d.ts +15 -0
- package/dist/types/lib/objects.d.ts +51 -1
- package/dist/types/schema/standard_new.amis.d.ts +1 -0
- package/dist/types/standard/button.d.ts +1 -0
- package/package.json +2 -2
|
@@ -12,3 +12,94 @@ export function getObjectRelatedListButtons(uiSchema: any, ctx: any): Promise<an
|
|
|
12
12
|
export function getButton(objectName: any, buttonName: any, ctx: any): Promise<any>;
|
|
13
13
|
export function execute(button: any, props: any): any;
|
|
14
14
|
export function executeButton(button: any, props: any): any;
|
|
15
|
+
export function getObjectDetailButtonsSchemas(objectSchema: any, recordId: any, ctx: any): {
|
|
16
|
+
type: string;
|
|
17
|
+
name: any;
|
|
18
|
+
objectName: any;
|
|
19
|
+
visibleOn: any;
|
|
20
|
+
className: string;
|
|
21
|
+
}[] | {
|
|
22
|
+
type: string;
|
|
23
|
+
icon: string;
|
|
24
|
+
onEvent: {
|
|
25
|
+
click: {
|
|
26
|
+
actions: {
|
|
27
|
+
actionType: string;
|
|
28
|
+
drawer: {
|
|
29
|
+
type: string;
|
|
30
|
+
title: string;
|
|
31
|
+
body: {
|
|
32
|
+
type: string;
|
|
33
|
+
id: string;
|
|
34
|
+
vertical: boolean;
|
|
35
|
+
tiled: boolean;
|
|
36
|
+
buttons: {
|
|
37
|
+
type: string;
|
|
38
|
+
name: any;
|
|
39
|
+
objectName: any;
|
|
40
|
+
visibleOn: any;
|
|
41
|
+
}[];
|
|
42
|
+
btnLevel: string;
|
|
43
|
+
className: string;
|
|
44
|
+
btnClassName: string;
|
|
45
|
+
size: string;
|
|
46
|
+
}[];
|
|
47
|
+
id: string;
|
|
48
|
+
position: string;
|
|
49
|
+
closeOnOutside: boolean;
|
|
50
|
+
resizable: boolean;
|
|
51
|
+
className: string;
|
|
52
|
+
bodyClassName: string;
|
|
53
|
+
actions: any[];
|
|
54
|
+
};
|
|
55
|
+
}[];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
id: string;
|
|
59
|
+
};
|
|
60
|
+
export function getObjectListViewButtonsSchemas(objectSchema: any, ctx: any): {
|
|
61
|
+
type: string;
|
|
62
|
+
name: any;
|
|
63
|
+
objectName: any;
|
|
64
|
+
visibleOn: any;
|
|
65
|
+
className: string;
|
|
66
|
+
}[] | {
|
|
67
|
+
type: string;
|
|
68
|
+
icon: string;
|
|
69
|
+
onEvent: {
|
|
70
|
+
click: {
|
|
71
|
+
actions: {
|
|
72
|
+
actionType: string;
|
|
73
|
+
drawer: {
|
|
74
|
+
type: string;
|
|
75
|
+
title: string;
|
|
76
|
+
body: {
|
|
77
|
+
type: string;
|
|
78
|
+
id: string;
|
|
79
|
+
vertical: boolean;
|
|
80
|
+
tiled: boolean;
|
|
81
|
+
buttons: {
|
|
82
|
+
type: string;
|
|
83
|
+
name: any;
|
|
84
|
+
objectName: any;
|
|
85
|
+
visibleOn: any;
|
|
86
|
+
className: string;
|
|
87
|
+
}[];
|
|
88
|
+
btnLevel: string;
|
|
89
|
+
className: string;
|
|
90
|
+
btnClassName: string;
|
|
91
|
+
size: string;
|
|
92
|
+
}[];
|
|
93
|
+
id: string;
|
|
94
|
+
position: string;
|
|
95
|
+
closeOnOutside: boolean;
|
|
96
|
+
resizable: boolean;
|
|
97
|
+
className: string;
|
|
98
|
+
bodyClassName: string;
|
|
99
|
+
actions: any[];
|
|
100
|
+
};
|
|
101
|
+
}[];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
id: string;
|
|
105
|
+
};
|
|
@@ -79,6 +79,21 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, ctx: any): Pro
|
|
|
79
79
|
};
|
|
80
80
|
id?: undefined;
|
|
81
81
|
level?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
type: string;
|
|
84
|
+
label: string;
|
|
85
|
+
visibleOn: string;
|
|
86
|
+
onEvent: {
|
|
87
|
+
click: {
|
|
88
|
+
actions: {
|
|
89
|
+
actionType: string;
|
|
90
|
+
script: string;
|
|
91
|
+
}[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
icon?: undefined;
|
|
95
|
+
id?: undefined;
|
|
96
|
+
level?: undefined;
|
|
82
97
|
} | {
|
|
83
98
|
type: string;
|
|
84
99
|
label: string;
|
|
@@ -62,7 +62,46 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
|
|
|
62
62
|
objectName: any;
|
|
63
63
|
visibleOn: any;
|
|
64
64
|
className: string;
|
|
65
|
-
}[]
|
|
65
|
+
}[] | {
|
|
66
|
+
type: string;
|
|
67
|
+
icon: string;
|
|
68
|
+
onEvent: {
|
|
69
|
+
click: {
|
|
70
|
+
actions: {
|
|
71
|
+
actionType: string;
|
|
72
|
+
drawer: {
|
|
73
|
+
type: string;
|
|
74
|
+
title: string;
|
|
75
|
+
body: {
|
|
76
|
+
type: string;
|
|
77
|
+
id: string;
|
|
78
|
+
vertical: boolean;
|
|
79
|
+
tiled: boolean;
|
|
80
|
+
buttons: {
|
|
81
|
+
type: string;
|
|
82
|
+
name: any;
|
|
83
|
+
objectName: any;
|
|
84
|
+
visibleOn: any;
|
|
85
|
+
className: string;
|
|
86
|
+
}[];
|
|
87
|
+
btnLevel: string;
|
|
88
|
+
className: string;
|
|
89
|
+
btnClassName: string;
|
|
90
|
+
size: string;
|
|
91
|
+
}[];
|
|
92
|
+
id: string;
|
|
93
|
+
position: string;
|
|
94
|
+
closeOnOutside: boolean;
|
|
95
|
+
resizable: boolean;
|
|
96
|
+
className: string;
|
|
97
|
+
bodyClassName: string;
|
|
98
|
+
actions: any[];
|
|
99
|
+
};
|
|
100
|
+
}[];
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
id: string;
|
|
104
|
+
};
|
|
66
105
|
};
|
|
67
106
|
md: string;
|
|
68
107
|
valign: string;
|
|
@@ -99,11 +138,6 @@ export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: a
|
|
|
99
138
|
icon: string;
|
|
100
139
|
className: string;
|
|
101
140
|
onEvent: {
|
|
102
|
-
/**
|
|
103
|
-
* 列表视图顶部第一行amisSchema
|
|
104
|
-
* @param {*} objectSchema 对象UISchema
|
|
105
|
-
* @returns amisSchema
|
|
106
|
-
*/
|
|
107
141
|
click: {
|
|
108
142
|
actions: {
|
|
109
143
|
actionType: string;
|
|
@@ -178,6 +212,21 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
|
|
|
178
212
|
};
|
|
179
213
|
id?: undefined;
|
|
180
214
|
level?: undefined;
|
|
215
|
+
} | {
|
|
216
|
+
type: string;
|
|
217
|
+
label: string;
|
|
218
|
+
visibleOn: string;
|
|
219
|
+
onEvent: {
|
|
220
|
+
click: {
|
|
221
|
+
actions: {
|
|
222
|
+
actionType: string;
|
|
223
|
+
script: string;
|
|
224
|
+
}[];
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
icon?: undefined;
|
|
228
|
+
id?: undefined;
|
|
229
|
+
level?: undefined;
|
|
181
230
|
} | {
|
|
182
231
|
type: string;
|
|
183
232
|
label: string;
|
|
@@ -369,7 +418,46 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
369
418
|
objectName: any;
|
|
370
419
|
visibleOn: any;
|
|
371
420
|
className: string;
|
|
372
|
-
}[]
|
|
421
|
+
}[] | {
|
|
422
|
+
type: string;
|
|
423
|
+
icon: string;
|
|
424
|
+
onEvent: {
|
|
425
|
+
click: {
|
|
426
|
+
actions: {
|
|
427
|
+
actionType: string;
|
|
428
|
+
drawer: {
|
|
429
|
+
type: string;
|
|
430
|
+
title: string;
|
|
431
|
+
body: {
|
|
432
|
+
type: string;
|
|
433
|
+
id: string;
|
|
434
|
+
vertical: boolean;
|
|
435
|
+
tiled: boolean;
|
|
436
|
+
buttons: {
|
|
437
|
+
type: string;
|
|
438
|
+
name: any;
|
|
439
|
+
objectName: any;
|
|
440
|
+
visibleOn: any;
|
|
441
|
+
className: string;
|
|
442
|
+
}[];
|
|
443
|
+
btnLevel: string;
|
|
444
|
+
className: string;
|
|
445
|
+
btnClassName: string;
|
|
446
|
+
size: string;
|
|
447
|
+
}[];
|
|
448
|
+
id: string;
|
|
449
|
+
position: string;
|
|
450
|
+
closeOnOutside: boolean;
|
|
451
|
+
resizable: boolean;
|
|
452
|
+
className: string;
|
|
453
|
+
bodyClassName: string;
|
|
454
|
+
actions: any[];
|
|
455
|
+
};
|
|
456
|
+
}[];
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
id: string;
|
|
460
|
+
};
|
|
373
461
|
};
|
|
374
462
|
md: string;
|
|
375
463
|
valign: string;
|
|
@@ -437,7 +525,45 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
|
|
|
437
525
|
objectName: any;
|
|
438
526
|
visibleOn: any;
|
|
439
527
|
className: string;
|
|
440
|
-
}[]
|
|
528
|
+
}[] | {
|
|
529
|
+
type: string;
|
|
530
|
+
icon: string;
|
|
531
|
+
onEvent: {
|
|
532
|
+
click: {
|
|
533
|
+
actions: {
|
|
534
|
+
actionType: string;
|
|
535
|
+
drawer: {
|
|
536
|
+
type: string;
|
|
537
|
+
title: string;
|
|
538
|
+
body: {
|
|
539
|
+
type: string;
|
|
540
|
+
id: string;
|
|
541
|
+
vertical: boolean;
|
|
542
|
+
tiled: boolean;
|
|
543
|
+
buttons: {
|
|
544
|
+
type: string;
|
|
545
|
+
name: any;
|
|
546
|
+
objectName: any;
|
|
547
|
+
visibleOn: any;
|
|
548
|
+
}[];
|
|
549
|
+
btnLevel: string;
|
|
550
|
+
className: string;
|
|
551
|
+
btnClassName: string;
|
|
552
|
+
size: string;
|
|
553
|
+
}[];
|
|
554
|
+
id: string;
|
|
555
|
+
position: string;
|
|
556
|
+
closeOnOutside: boolean;
|
|
557
|
+
resizable: boolean;
|
|
558
|
+
className: string;
|
|
559
|
+
bodyClassName: string;
|
|
560
|
+
actions: any[];
|
|
561
|
+
};
|
|
562
|
+
}[];
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
id: string;
|
|
566
|
+
};
|
|
441
567
|
};
|
|
442
568
|
md: string;
|
|
443
569
|
})[];
|
|
@@ -125,6 +125,7 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
|
|
|
125
125
|
objectName: string;
|
|
126
126
|
record: string;
|
|
127
127
|
};
|
|
128
|
+
expression: string;
|
|
128
129
|
} | {
|
|
129
130
|
actionType: string;
|
|
130
131
|
args: {
|
|
@@ -133,6 +134,7 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
|
|
|
133
134
|
};
|
|
134
135
|
eventName?: undefined;
|
|
135
136
|
};
|
|
137
|
+
expression: string;
|
|
136
138
|
eventName?: undefined;
|
|
137
139
|
data?: undefined;
|
|
138
140
|
})[];
|
|
@@ -58,6 +58,21 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
|
|
|
58
58
|
};
|
|
59
59
|
id?: undefined;
|
|
60
60
|
level?: undefined;
|
|
61
|
+
} | {
|
|
62
|
+
type: string;
|
|
63
|
+
label: string;
|
|
64
|
+
visibleOn: string;
|
|
65
|
+
onEvent: {
|
|
66
|
+
click: {
|
|
67
|
+
actions: {
|
|
68
|
+
actionType: string;
|
|
69
|
+
script: string;
|
|
70
|
+
}[];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
icon?: undefined;
|
|
74
|
+
id?: undefined;
|
|
75
|
+
level?: undefined;
|
|
61
76
|
} | {
|
|
62
77
|
type: string;
|
|
63
78
|
label: string;
|
|
@@ -125,6 +125,7 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
|
|
|
125
125
|
objectName: string;
|
|
126
126
|
record: string;
|
|
127
127
|
};
|
|
128
|
+
expression: string;
|
|
128
129
|
} | {
|
|
129
130
|
actionType: string;
|
|
130
131
|
args: {
|
|
@@ -133,6 +134,7 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
|
|
|
133
134
|
};
|
|
134
135
|
eventName?: undefined;
|
|
135
136
|
};
|
|
137
|
+
expression: string;
|
|
136
138
|
eventName?: undefined;
|
|
137
139
|
data?: undefined;
|
|
138
140
|
})[];
|
|
@@ -141,6 +143,11 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
|
|
|
141
143
|
};
|
|
142
144
|
}>;
|
|
143
145
|
export function getListSchema(appName: any, objectName: any, listViewName: any, ctx?: {}): Promise<{
|
|
146
|
+
uiSchema?: undefined;
|
|
147
|
+
isCustomAmisSchema?: undefined;
|
|
148
|
+
amisSchema?: undefined;
|
|
149
|
+
isCalendar?: undefined;
|
|
150
|
+
} | {
|
|
144
151
|
uiSchema: any;
|
|
145
152
|
isCustomAmisSchema?: undefined;
|
|
146
153
|
amisSchema?: undefined;
|
|
@@ -246,7 +253,45 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any, opti
|
|
|
246
253
|
objectName: any;
|
|
247
254
|
visibleOn: any;
|
|
248
255
|
className: string;
|
|
249
|
-
}[]
|
|
256
|
+
}[] | {
|
|
257
|
+
type: string;
|
|
258
|
+
icon: string;
|
|
259
|
+
onEvent: {
|
|
260
|
+
click: {
|
|
261
|
+
actions: {
|
|
262
|
+
actionType: string;
|
|
263
|
+
drawer: {
|
|
264
|
+
type: string;
|
|
265
|
+
title: string;
|
|
266
|
+
body: {
|
|
267
|
+
type: string;
|
|
268
|
+
id: string;
|
|
269
|
+
vertical: boolean;
|
|
270
|
+
tiled: boolean;
|
|
271
|
+
buttons: {
|
|
272
|
+
type: string;
|
|
273
|
+
name: any;
|
|
274
|
+
objectName: any;
|
|
275
|
+
visibleOn: any;
|
|
276
|
+
}[];
|
|
277
|
+
btnLevel: string;
|
|
278
|
+
className: string;
|
|
279
|
+
btnClassName: string;
|
|
280
|
+
size: string;
|
|
281
|
+
}[];
|
|
282
|
+
id: string;
|
|
283
|
+
position: string;
|
|
284
|
+
closeOnOutside: boolean;
|
|
285
|
+
resizable: boolean;
|
|
286
|
+
className: string;
|
|
287
|
+
bodyClassName: string;
|
|
288
|
+
actions: any[];
|
|
289
|
+
};
|
|
290
|
+
}[];
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
id: string;
|
|
294
|
+
};
|
|
250
295
|
};
|
|
251
296
|
md: string;
|
|
252
297
|
})[];
|
|
@@ -317,6 +362,11 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
|
|
|
317
362
|
object_name: any;
|
|
318
363
|
foreign_key: any;
|
|
319
364
|
schema: {
|
|
365
|
+
uiSchema?: undefined;
|
|
366
|
+
isCustomAmisSchema?: undefined;
|
|
367
|
+
amisSchema?: undefined;
|
|
368
|
+
isCalendar?: undefined;
|
|
369
|
+
} | {
|
|
320
370
|
uiSchema: any;
|
|
321
371
|
isCustomAmisSchema?: undefined;
|
|
322
372
|
amisSchema?: undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/amis-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.6
|
|
4
|
+
"version": "1.2.6",
|
|
5
5
|
"unpkg": "./dist/index.umd.js",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.esm.js",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"lodash": "^4.17.21"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "9160181a3c19e2c689d552b474b04bdefb5d1831"
|
|
63
63
|
}
|