@steedos-widgets/amis-lib 1.2.6-beta.9 → 1.2.7

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.
@@ -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
+ };
@@ -77,6 +77,23 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, ctx: any): Pro
77
77
  }[];
78
78
  };
79
79
  };
80
+ name?: undefined;
81
+ id?: undefined;
82
+ level?: undefined;
83
+ } | {
84
+ type: string;
85
+ label: string;
86
+ name: string;
87
+ visibleOn: string;
88
+ onEvent: {
89
+ click: {
90
+ actions: {
91
+ actionType: string;
92
+ script: string;
93
+ }[];
94
+ };
95
+ };
96
+ icon?: undefined;
80
97
  id?: undefined;
81
98
  level?: undefined;
82
99
  } | {
@@ -188,6 +205,7 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, ctx: any): Pro
188
205
  level: string;
189
206
  icon?: undefined;
190
207
  visibleOn?: undefined;
208
+ name?: undefined;
191
209
  })[];
192
210
  size: string;
193
211
  className: 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;
@@ -176,6 +210,23 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
176
210
  }[];
177
211
  };
178
212
  };
213
+ name?: undefined;
214
+ id?: undefined;
215
+ level?: undefined;
216
+ } | {
217
+ type: string;
218
+ label: string;
219
+ name: string;
220
+ visibleOn: string;
221
+ onEvent: {
222
+ click: {
223
+ actions: {
224
+ actionType: string;
225
+ script: string;
226
+ }[];
227
+ };
228
+ };
229
+ icon?: undefined;
179
230
  id?: undefined;
180
231
  level?: undefined;
181
232
  } | {
@@ -287,6 +338,7 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
287
338
  level: string;
288
339
  icon?: undefined;
289
340
  visibleOn?: undefined;
341
+ name?: undefined;
290
342
  })[];
291
343
  size: string;
292
344
  className: string;
@@ -369,7 +421,46 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
369
421
  objectName: any;
370
422
  visibleOn: any;
371
423
  className: string;
372
- }[];
424
+ }[] | {
425
+ type: string;
426
+ icon: string;
427
+ onEvent: {
428
+ click: {
429
+ actions: {
430
+ actionType: string;
431
+ drawer: {
432
+ type: string;
433
+ title: string;
434
+ body: {
435
+ type: string;
436
+ id: string;
437
+ vertical: boolean;
438
+ tiled: boolean;
439
+ buttons: {
440
+ type: string;
441
+ name: any;
442
+ objectName: any;
443
+ visibleOn: any;
444
+ className: string;
445
+ }[];
446
+ btnLevel: string;
447
+ className: string;
448
+ btnClassName: string;
449
+ size: string;
450
+ }[];
451
+ id: string;
452
+ position: string;
453
+ closeOnOutside: boolean;
454
+ resizable: boolean;
455
+ className: string;
456
+ bodyClassName: string;
457
+ actions: any[];
458
+ };
459
+ }[];
460
+ };
461
+ };
462
+ id: string;
463
+ };
373
464
  };
374
465
  md: string;
375
466
  valign: string;
@@ -437,7 +528,45 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
437
528
  objectName: any;
438
529
  visibleOn: any;
439
530
  className: string;
440
- }[];
531
+ }[] | {
532
+ type: string;
533
+ icon: string;
534
+ onEvent: {
535
+ click: {
536
+ actions: {
537
+ actionType: string;
538
+ drawer: {
539
+ type: string;
540
+ title: string;
541
+ body: {
542
+ type: string;
543
+ id: string;
544
+ vertical: boolean;
545
+ tiled: boolean;
546
+ buttons: {
547
+ type: string;
548
+ name: any;
549
+ objectName: any;
550
+ visibleOn: any;
551
+ }[];
552
+ btnLevel: string;
553
+ className: string;
554
+ btnClassName: string;
555
+ size: string;
556
+ }[];
557
+ id: string;
558
+ position: string;
559
+ closeOnOutside: boolean;
560
+ resizable: boolean;
561
+ className: string;
562
+ bodyClassName: string;
563
+ actions: any[];
564
+ };
565
+ }[];
566
+ };
567
+ };
568
+ id: string;
569
+ };
441
570
  };
442
571
  md: string;
443
572
  })[];
@@ -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
  })[];
@@ -56,6 +56,23 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
56
56
  }[];
57
57
  };
58
58
  };
59
+ name?: undefined;
60
+ id?: undefined;
61
+ level?: undefined;
62
+ } | {
63
+ type: string;
64
+ label: string;
65
+ name: string;
66
+ visibleOn: string;
67
+ onEvent: {
68
+ click: {
69
+ actions: {
70
+ actionType: string;
71
+ script: string;
72
+ }[];
73
+ };
74
+ };
75
+ icon?: undefined;
59
76
  id?: undefined;
60
77
  level?: undefined;
61
78
  } | {
@@ -167,6 +184,7 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
167
184
  level: string;
168
185
  icon?: undefined;
169
186
  visibleOn?: undefined;
187
+ name?: undefined;
170
188
  })[];
171
189
  size: string;
172
190
  className: string;
@@ -1 +1,2 @@
1
1
  export function getSvgUrl(source: any, name: any): string;
2
+ export function getContrastColor(bgColor: any): "#000000" | "#ffffff";
@@ -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;
@@ -36,6 +36,7 @@ export function getSchema(uiSchema: any, ctx: any): Promise<{
36
36
  data: {
37
37
  isLookup: string;
38
38
  _master: string;
39
+ url: string;
39
40
  };
40
41
  url: string;
41
42
  method: string;
@@ -39,6 +39,7 @@ export namespace StandardButtons {
39
39
  data: {
40
40
  isLookup: string;
41
41
  _master: string;
42
+ url: string;
42
43
  };
43
44
  url: string;
44
45
  method: string;
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-beta.9",
4
+ "version": "1.2.7",
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": "dff134272da630df3bb71cb868b2be4f74adf6e7"
62
+ "gitHead": "eed1facdcebe773ace758fe7ef7ac76aac63562a"
63
63
  }