@steedos-widgets/amis-lib 6.3.0-beta.8 → 6.3.0

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.
@@ -27,3 +27,4 @@ export * from './render';
27
27
  export * from './workflow';
28
28
  export * from './lib/router';
29
29
  export * from './i18n';
30
+ export * from './utils/uuid';
@@ -21,129 +21,318 @@ export function getObjectDetailButtonsSchemas(objectSchema: any, recordId: any,
21
21
  }[] | {
22
22
  type: string;
23
23
  icon: string;
24
- visibleOn: string;
25
- onEvent: {
26
- click: {
27
- actions: {
28
- actionType: string;
29
- drawer: {
30
- type: string;
31
- title: string;
32
- id: string;
33
- body: {
34
- type: string;
35
- id: string;
36
- vertical: boolean;
37
- tiled: boolean;
38
- buttons: {
39
- type: string;
40
- name: any;
41
- objectName: any;
42
- visibleOn: any;
43
- }[];
44
- btnLevel: string;
45
- className: string;
46
- btnClassName: string;
47
- size: string;
48
- }[];
49
- position: string;
50
- closeOnOutside: boolean;
51
- resizable: boolean;
52
- className: string;
53
- bodyClassName: string;
54
- actions: any[];
24
+ size: string;
25
+ hideCaret: boolean;
26
+ className: string;
27
+ closeOnClick: boolean;
28
+ menuClassName: string;
29
+ align: string;
30
+ body: ({
31
+ type: string;
32
+ style: {
33
+ "z-index": number;
34
+ background: string;
35
+ height: string;
36
+ width: string;
37
+ padding: string;
38
+ margin: string;
39
+ "border-radius": string;
40
+ position?: undefined;
41
+ bottom?: undefined;
42
+ left?: undefined;
43
+ "box-shadow"?: undefined;
44
+ };
45
+ body?: undefined;
46
+ } | {
47
+ type: string;
48
+ style: {
49
+ position: string;
50
+ bottom: number;
51
+ "z-index": number;
52
+ width: string;
53
+ left: string;
54
+ padding: string;
55
+ background: string;
56
+ "box-shadow": string;
57
+ height?: undefined;
58
+ margin?: undefined;
59
+ "border-radius"?: undefined;
60
+ };
61
+ body: ({
62
+ type: string;
63
+ justify: string;
64
+ items: ({
65
+ type: string;
66
+ tpl: string;
67
+ style: {
68
+ padding: string;
69
+ "align-items": string;
70
+ display: string;
71
+ color?: undefined;
72
+ };
73
+ label?: undefined;
74
+ icon?: undefined;
75
+ level?: undefined;
76
+ } | {
77
+ type: string;
78
+ label: string;
79
+ icon: string;
80
+ level: string;
81
+ style: {
82
+ color: string;
83
+ padding?: undefined;
84
+ "align-items"?: undefined;
85
+ display?: undefined;
55
86
  };
87
+ tpl?: undefined;
88
+ })[];
89
+ style: {
90
+ "padding-top": string;
91
+ "padding-bottom": string;
92
+ "border-bottom": string;
93
+ padding?: undefined;
94
+ overflow?: undefined;
95
+ "max-height"?: undefined;
96
+ };
97
+ body?: undefined;
98
+ } | {
99
+ type: string;
100
+ body: {
101
+ type: string;
102
+ id: string;
103
+ vertical: boolean;
104
+ tiled: boolean;
105
+ buttons: any;
106
+ className: string;
107
+ btnClassName: string;
108
+ size: string;
56
109
  }[];
57
- };
58
- };
110
+ style: {
111
+ padding: string;
112
+ overflow: string;
113
+ "max-height": string;
114
+ "padding-top"?: undefined;
115
+ "padding-bottom"?: undefined;
116
+ "border-bottom"?: undefined;
117
+ };
118
+ justify?: undefined;
119
+ items?: undefined;
120
+ })[];
121
+ })[];
59
122
  }[];
60
123
  export function getObjectListViewButtonsSchemas(objectSchema: any, ctx: any): {
124
+ type: string;
125
+ icon: string;
126
+ size: string;
127
+ hideCaret: boolean;
128
+ className: string;
129
+ closeOnClick: boolean;
130
+ menuClassName: string;
131
+ align: string;
132
+ body: ({
133
+ type: string;
134
+ style: {
135
+ "z-index": number;
136
+ background: string;
137
+ height: string;
138
+ width: string;
139
+ padding: string;
140
+ margin: string;
141
+ "border-radius": string;
142
+ position?: undefined;
143
+ bottom?: undefined;
144
+ left?: undefined;
145
+ "box-shadow"?: undefined;
146
+ };
147
+ body?: undefined;
148
+ } | {
149
+ type: string;
150
+ style: {
151
+ position: string;
152
+ bottom: number;
153
+ "z-index": number;
154
+ width: string;
155
+ left: string;
156
+ padding: string;
157
+ background: string;
158
+ "box-shadow": string;
159
+ height?: undefined;
160
+ margin?: undefined;
161
+ "border-radius"?: undefined;
162
+ };
163
+ body: ({
164
+ type: string;
165
+ justify: string;
166
+ items: ({
167
+ type: string;
168
+ tpl: string;
169
+ style: {
170
+ padding: string;
171
+ "align-items": string;
172
+ display: string;
173
+ color?: undefined;
174
+ };
175
+ label?: undefined;
176
+ icon?: undefined;
177
+ level?: undefined;
178
+ } | {
179
+ type: string;
180
+ label: string;
181
+ icon: string;
182
+ level: string;
183
+ style: {
184
+ color: string;
185
+ padding?: undefined;
186
+ "align-items"?: undefined;
187
+ display?: undefined;
188
+ };
189
+ tpl?: undefined;
190
+ })[];
191
+ style: {
192
+ "padding-top": string;
193
+ "padding-bottom": string;
194
+ "border-bottom": string;
195
+ padding?: undefined;
196
+ overflow?: undefined;
197
+ "max-height"?: undefined;
198
+ };
199
+ body?: undefined;
200
+ } | {
201
+ type: string;
202
+ body: {
203
+ type: string;
204
+ id: string;
205
+ vertical: boolean;
206
+ tiled: boolean;
207
+ buttons: any;
208
+ className: string;
209
+ btnClassName: string;
210
+ size: string;
211
+ }[];
212
+ style: {
213
+ padding: string;
214
+ overflow: string;
215
+ "max-height": string;
216
+ "padding-top"?: undefined;
217
+ "padding-bottom"?: undefined;
218
+ "border-bottom"?: undefined;
219
+ };
220
+ justify?: undefined;
221
+ items?: undefined;
222
+ })[];
223
+ })[];
224
+ } | {
61
225
  type: string;
62
226
  name: any;
63
227
  objectName: any;
64
228
  visibleOn: any;
65
229
  className: string;
66
- }[] | {
230
+ }[];
231
+ export function getObjectRecordDetailRelatedListButtonsSchemas(objectSchema: any, ctx: any): {
67
232
  type: string;
68
233
  icon: string;
234
+ size: string;
235
+ hideCaret: boolean;
69
236
  className: string;
70
- onEvent: {
71
- click: {
72
- actions: {
73
- actionType: string;
74
- drawer: {
75
- type: string;
76
- title: string;
77
- id: string;
78
- body: {
79
- type: string;
80
- id: string;
81
- vertical: boolean;
82
- tiled: boolean;
83
- buttons: {
84
- type: string;
85
- name: any;
86
- objectName: any;
87
- visibleOn: any;
88
- className: string;
89
- }[];
90
- btnLevel: string;
91
- className: string;
92
- btnClassName: string;
93
- size: string;
94
- }[];
95
- position: string;
96
- closeOnOutside: boolean;
97
- resizable: boolean;
98
- className: string;
99
- bodyClassName: string;
100
- actions: any[];
237
+ closeOnClick: boolean;
238
+ menuClassName: string;
239
+ align: string;
240
+ body: ({
241
+ type: string;
242
+ style: {
243
+ "z-index": number;
244
+ background: string;
245
+ height: string;
246
+ width: string;
247
+ padding: string;
248
+ margin: string;
249
+ "border-radius": string;
250
+ position?: undefined;
251
+ bottom?: undefined;
252
+ left?: undefined;
253
+ "box-shadow"?: undefined;
254
+ };
255
+ body?: undefined;
256
+ } | {
257
+ type: string;
258
+ style: {
259
+ position: string;
260
+ bottom: number;
261
+ "z-index": number;
262
+ width: string;
263
+ left: string;
264
+ padding: string;
265
+ background: string;
266
+ "box-shadow": string;
267
+ height?: undefined;
268
+ margin?: undefined;
269
+ "border-radius"?: undefined;
270
+ };
271
+ body: ({
272
+ type: string;
273
+ justify: string;
274
+ items: ({
275
+ type: string;
276
+ tpl: string;
277
+ style: {
278
+ padding: string;
279
+ "align-items": string;
280
+ display: string;
281
+ color?: undefined;
282
+ };
283
+ label?: undefined;
284
+ icon?: undefined;
285
+ level?: undefined;
286
+ } | {
287
+ type: string;
288
+ label: string;
289
+ icon: string;
290
+ level: string;
291
+ style: {
292
+ color: string;
293
+ padding?: undefined;
294
+ "align-items"?: undefined;
295
+ display?: undefined;
101
296
  };
297
+ tpl?: undefined;
298
+ })[];
299
+ style: {
300
+ "padding-top": string;
301
+ "padding-bottom": string;
302
+ "border-bottom": string;
303
+ padding?: undefined;
304
+ overflow?: undefined;
305
+ "max-height"?: undefined;
306
+ };
307
+ body?: undefined;
308
+ } | {
309
+ type: string;
310
+ body: {
311
+ type: string;
312
+ id: string;
313
+ vertical: boolean;
314
+ tiled: boolean;
315
+ buttons: any;
316
+ className: string;
317
+ btnClassName: string;
318
+ size: string;
102
319
  }[];
103
- };
104
- };
105
- };
106
- export function getObjectRecordDetailRelatedListButtonsSchemas(objectSchema: any, ctx: any): {
320
+ style: {
321
+ padding: string;
322
+ overflow: string;
323
+ "max-height": string;
324
+ "padding-top"?: undefined;
325
+ "padding-bottom"?: undefined;
326
+ "border-bottom"?: undefined;
327
+ };
328
+ justify?: undefined;
329
+ items?: undefined;
330
+ })[];
331
+ })[];
332
+ }[] | {
107
333
  type: string;
108
334
  name: any;
109
335
  objectName: any;
110
336
  visibleOn: any;
111
337
  className: string;
112
- }[] | {
113
- type: string;
114
- icon: string;
115
- onEvent: {
116
- click: {
117
- actions: {
118
- actionType: string;
119
- drawer: {
120
- type: string;
121
- title: string;
122
- id: string;
123
- body: {
124
- type: string;
125
- vertical: boolean;
126
- tiled: boolean;
127
- buttons: {
128
- type: string;
129
- name: any;
130
- objectName: any;
131
- visibleOn: any;
132
- className: string;
133
- }[];
134
- btnLevel: string;
135
- className: string;
136
- btnClassName: string;
137
- size: string;
138
- }[];
139
- position: string;
140
- closeOnOutside: boolean;
141
- resizable: boolean;
142
- className: string;
143
- bodyClassName: string;
144
- actions: any[];
145
- };
146
- }[];
147
- };
148
- };
149
- };
338
+ }[];
@@ -24,6 +24,7 @@ export function getMarkdownFieldSchema(field: any, readonly: any, ctx: any): {
24
24
  name: any;
25
25
  labelClassName: string;
26
26
  language: string;
27
+ options: any;
27
28
  }[];
28
29
  } | {
29
30
  title: string;
@@ -1,10 +1,9 @@
1
- export function getAmisFileReadonlySchema(steedosField: any): {
1
+ export function getAmisFileReadonlySchema(steedosField: any, ctx?: {}): Promise<{
2
2
  type: any;
3
3
  defaultImage: string;
4
4
  enlargeAble: boolean;
5
5
  showToolbar: boolean;
6
6
  body?: undefined;
7
- tpl?: undefined;
8
7
  } | {
9
8
  type: string;
10
9
  body: {
@@ -23,20 +22,55 @@ export function getAmisFileReadonlySchema(steedosField: any): {
23
22
  weight: number;
24
23
  };
25
24
  };
25
+ labelClassName?: undefined;
26
+ label?: undefined;
26
27
  };
28
+ placeholder?: undefined;
29
+ source?: undefined;
27
30
  };
28
31
  defaultImage?: undefined;
29
32
  enlargeAble?: undefined;
30
33
  showToolbar?: undefined;
31
- tpl?: undefined;
32
34
  } | {
33
- type: any;
34
- tpl: string;
35
+ type: string;
36
+ body: {
37
+ type: string;
38
+ placeholder: string;
39
+ source: string;
40
+ items: {
41
+ type: string;
42
+ labelClassName: string;
43
+ label: boolean;
44
+ className: string;
45
+ tpl: string;
46
+ onEvent: {
47
+ click: {
48
+ actions: {
49
+ actionType: string;
50
+ drawer: {
51
+ type: string;
52
+ title: string;
53
+ headerClassName: string;
54
+ size: string;
55
+ bodyClassName: string;
56
+ closeOnEsc: boolean;
57
+ closeOnOutside: boolean;
58
+ resizable: boolean;
59
+ actions: any[];
60
+ body: any[];
61
+ className: string;
62
+ };
63
+ preventDefault: boolean;
64
+ }[];
65
+ };
66
+ };
67
+ };
68
+ name?: undefined;
69
+ };
35
70
  defaultImage?: undefined;
36
71
  enlargeAble?: undefined;
37
72
  showToolbar?: undefined;
38
- body?: undefined;
39
- };
73
+ }>;
40
74
  export function getAmisFileEditSchema(steedosField: any): {
41
75
  type: any;
42
76
  useChunk: boolean;
@@ -51,13 +85,12 @@ export function getAmisFileEditSchema(steedosField: any): {
51
85
  };
52
86
  };
53
87
  };
54
- export function getAmisFileSchema(steedosField: any, readonly: any): {
88
+ export function getAmisFileSchema(steedosField: any, readonly: any, ctx: any): Promise<{
55
89
  type: any;
56
90
  defaultImage: string;
57
91
  enlargeAble: boolean;
58
92
  showToolbar: boolean;
59
93
  body?: undefined;
60
- tpl?: undefined;
61
94
  } | {
62
95
  type: string;
63
96
  body: {
@@ -76,19 +109,54 @@ export function getAmisFileSchema(steedosField: any, readonly: any): {
76
109
  weight: number;
77
110
  };
78
111
  };
112
+ labelClassName?: undefined;
113
+ label?: undefined;
79
114
  };
115
+ placeholder?: undefined;
116
+ source?: undefined;
80
117
  };
81
118
  defaultImage?: undefined;
82
119
  enlargeAble?: undefined;
83
120
  showToolbar?: undefined;
84
- tpl?: undefined;
85
121
  } | {
86
- type: any;
87
- tpl: string;
122
+ type: string;
123
+ body: {
124
+ type: string;
125
+ placeholder: string;
126
+ source: string;
127
+ items: {
128
+ type: string;
129
+ labelClassName: string;
130
+ label: boolean;
131
+ className: string;
132
+ tpl: string;
133
+ onEvent: {
134
+ click: {
135
+ actions: {
136
+ actionType: string;
137
+ drawer: {
138
+ type: string;
139
+ title: string;
140
+ headerClassName: string;
141
+ size: string;
142
+ bodyClassName: string;
143
+ closeOnEsc: boolean;
144
+ closeOnOutside: boolean;
145
+ resizable: boolean;
146
+ actions: any[];
147
+ body: any[];
148
+ className: string;
149
+ };
150
+ preventDefault: boolean;
151
+ }[];
152
+ };
153
+ };
154
+ };
155
+ name?: undefined;
156
+ };
88
157
  defaultImage?: undefined;
89
158
  enlargeAble?: undefined;
90
159
  showToolbar?: undefined;
91
- body?: undefined;
92
160
  } | {
93
161
  type: any;
94
162
  useChunk: boolean;
@@ -102,4 +170,4 @@ export function getAmisFileSchema(steedosField: any, readonly: any): {
102
170
  Authorization: string;
103
171
  };
104
172
  };
105
- };
173
+ }>;
@@ -1,4 +1,4 @@
1
- export function getFieldsTemplate(fields: any, display: any): Promise<string>;
1
+ export function getFieldsTemplate(object: any, fields: any, display: any): Promise<string>;
2
2
  export function getRecordPermissionsTemplate(): string;
3
3
  export function getFindOneQuery(object: any, recordId: any, fields: any, options: any): Promise<{
4
4
  query: string;