@steedos-widgets/amis-lib 1.0.19 → 1.0.21

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.
@@ -18,7 +18,7 @@ export * from './lib/converter/amis/fields/user';
18
18
  export * from './lib/converter/amis/filters';
19
19
  export * from './lib/converter/amis/header';
20
20
  export * from './lib/converter/amis/fields_filter';
21
- export * from './lib/workflow/flow';
22
21
  export * from './lib/assets';
23
22
  export * from './utils/object';
24
23
  export * from './render';
24
+ export * from './workflow';
@@ -13,8 +13,8 @@ export function getReadonlyFormInitApi(object: any, recordId: any, fields: any,
13
13
  export function getEditFormInitApi(object: any, recordId: any, fields: any): Promise<{
14
14
  method: string;
15
15
  url: string;
16
- sendOn: string;
17
16
  cache: number;
17
+ requestAdaptor: string;
18
18
  adaptor: string;
19
19
  data: {
20
20
  query: string;
@@ -405,9 +405,17 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
405
405
  _id: any;
406
406
  recordPermissions: any;
407
407
  uiSchema: any;
408
+ record: string;
408
409
  };
409
410
  body: {
410
411
  type: string;
412
+ data: {
413
+ "&": string;
414
+ objectName: any;
415
+ _id: any;
416
+ recordPermissions: string;
417
+ uiSchema: any;
418
+ };
411
419
  body: {
412
420
  type: string;
413
421
  columns: ({
@@ -437,7 +445,6 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
437
445
  className: string;
438
446
  }[];
439
447
  md: string;
440
- hiddenOn?: undefined;
441
448
  } | {
442
449
  body: {
443
450
  type: string;
@@ -450,11 +457,11 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
450
457
  }[];
451
458
  };
452
459
  md: string;
453
- hiddenOn: string;
454
460
  })[];
455
461
  className: string;
456
462
  }[];
457
463
  messages: {};
464
+ hiddenOn: string;
458
465
  }[];
459
466
  className: string;
460
467
  }>;
@@ -20,8 +20,8 @@ export function getObjectForm(objectSchema: any, ctx: any): Promise<{
20
20
  api: {
21
21
  method: string;
22
22
  url: string;
23
- sendOn: string;
24
23
  cache: number;
24
+ requestAdaptor: string;
25
25
  adaptor: string;
26
26
  data: {
27
27
  query: string;
@@ -41,7 +41,7 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
41
41
  data: {
42
42
  global: {
43
43
  mode: any;
44
- user: {};
44
+ user: any;
45
45
  spaceId: any;
46
46
  userId: any;
47
47
  };
@@ -1,4 +1,19 @@
1
- export function getObjectHeaderToolbar(mainObject: any, formFactor: any): (string | {
1
+ export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showDisplayAs }?: {
2
+ showDisplayAs?: boolean;
3
+ }): (string | {
4
+ type: string;
5
+ icon: string;
6
+ btnClassName: string;
7
+ align: string;
8
+ buttons: {
9
+ label: string;
10
+ children: {
11
+ type: string;
12
+ label: string;
13
+ onClick: string;
14
+ }[];
15
+ }[];
16
+ } | {
2
17
  type: string;
3
18
  className: string;
4
19
  tpl?: undefined;
@@ -37,6 +52,14 @@ export function getObjectHeaderToolbar(mainObject: any, formFactor: any): (strin
37
52
  };
38
53
  };
39
54
  tpl?: undefined;
55
+ } | {
56
+ type?: undefined;
57
+ className?: undefined;
58
+ tpl?: undefined;
59
+ align?: undefined;
60
+ label?: undefined;
61
+ icon?: undefined;
62
+ onEvent?: undefined;
40
63
  })[];
41
64
  export function getObjectFooterToolbar(mainObject: any, formFactor: any): string[];
42
65
  export function getObjectFilter(objectSchema: any, fields: any, options: any): Promise<{
@@ -7,13 +7,22 @@ export function getFormSchema(objectName: any, ctx: any): Promise<{
7
7
  uiSchema: any;
8
8
  amisSchema: {
9
9
  type: string;
10
- className: string;
10
+ className: string; /**
11
+ * localListViewProps规范来自crud请求api中api.data.$self参数值的。
12
+ * 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
13
+ * __searchable__...:顶部放大镜搜索条件
14
+ * filter:右侧过滤器
15
+ * perPage:每页条数
16
+ * page:当前页码
17
+ * orderBy:排序字段
18
+ * orderDir:排序方向
19
+ */
11
20
  name: string;
12
21
  api: {
13
22
  method: string;
14
23
  url: string;
15
- sendOn: string;
16
24
  cache: number;
25
+ requestAdaptor: string;
17
26
  adaptor: string;
18
27
  data: {
19
28
  query: string;
@@ -36,7 +45,7 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
36
45
  data: {
37
46
  global: {
38
47
  mode: any;
39
- user: {};
48
+ user: any;
40
49
  spaceId: any;
41
50
  userId: any;
42
51
  };
@@ -144,6 +153,8 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
144
153
  filtersFunction: any;
145
154
  sort: string;
146
155
  ctx: {};
156
+ requestAdaptor: any;
157
+ adaptor: any;
147
158
  };
148
159
  isCustomAmisSchema?: undefined;
149
160
  isCalendar?: undefined;
@@ -310,9 +321,17 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any, opti
310
321
  _id: any;
311
322
  recordPermissions: any;
312
323
  uiSchema: any;
324
+ record: string;
313
325
  };
314
326
  body: {
315
327
  type: string;
328
+ data: {
329
+ "&": string;
330
+ objectName: any;
331
+ _id: any;
332
+ recordPermissions: string;
333
+ uiSchema: any;
334
+ };
316
335
  body: {
317
336
  type: string;
318
337
  columns: ({
@@ -342,7 +361,6 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any, opti
342
361
  className: string;
343
362
  }[];
344
363
  md: string;
345
- hiddenOn?: undefined;
346
364
  } | {
347
365
  body: {
348
366
  type: string;
@@ -355,11 +373,11 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any, opti
355
373
  }[];
356
374
  };
357
375
  md: string;
358
- hiddenOn: string;
359
376
  })[];
360
377
  className: string;
361
378
  }[];
362
379
  messages: {};
380
+ hiddenOn: string;
363
381
  }[];
364
382
  className: string;
365
383
  };
@@ -412,65 +430,6 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
412
430
  })[];
413
431
  };
414
432
  }>;
415
- export function getObjectRelatedList(appName: any, objectName: any, recordId: any, formFactor: any): Promise<({
416
- masterObjectName: any;
417
- object_name: any;
418
- foreign_key: any;
419
- label: any;
420
- schema: {
421
- uiSchema: any;
422
- amisSchema: {
423
- type: string;
424
- className: string;
425
- id: string;
426
- name: string;
427
- data: {
428
- $master: string;
429
- objectName: any;
430
- _id: any;
431
- recordPermissions: any;
432
- uiSchema: any;
433
- loaded: boolean;
434
- };
435
- body: {};
436
- };
437
- };
438
- } | {
439
- masterObjectName: any;
440
- object_name: any;
441
- foreign_key: any;
442
- schema: {
443
- uiSchema: any;
444
- isCustomAmisSchema?: undefined;
445
- amisSchema?: undefined;
446
- isCalendar?: undefined;
447
- } | {
448
- uiSchema: any;
449
- isCustomAmisSchema: boolean;
450
- amisSchema: any;
451
- isCalendar?: undefined;
452
- } | {
453
- uiSchema: any;
454
- isCalendar: boolean;
455
- amisSchema: any;
456
- isCustomAmisSchema?: undefined;
457
- } | {
458
- uiSchema: any;
459
- amisSchema: {
460
- type: string;
461
- objectApiName: any;
462
- columns: any;
463
- extraColumns: any;
464
- filters: any;
465
- filtersFunction: any;
466
- sort: string;
467
- ctx: {};
468
- };
469
- isCustomAmisSchema?: undefined;
470
- isCalendar?: undefined;
471
- };
472
- label?: undefined;
473
- })[]>;
474
433
  export function getObjectRelated({ appName, masterObjectName, objectName, relatedFieldName, recordId, formFactor }: {
475
434
  appName: any;
476
435
  masterObjectName: any;
@@ -508,6 +467,8 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
508
467
  filtersFunction: any;
509
468
  sort: string;
510
469
  ctx: {};
470
+ requestAdaptor: any;
471
+ adaptor: any;
511
472
  };
512
473
  isCustomAmisSchema?: undefined;
513
474
  isCalendar?: undefined;
@@ -1,61 +1,25 @@
1
- export function getAmisObjectRelatedList(appName: any, objectName: any, recordId: any, formFactor: any): Promise<({
1
+ export function getObjectRelatedList(appName: any, objectName: any, recordId: any, formFactor: any): Promise<({
2
2
  masterObjectName: any;
3
3
  object_name: any;
4
4
  foreign_key: any;
5
- schema: {
6
- uiSchema: any;
7
- amisSchema: {
8
- type: string;
9
- className: string;
10
- id: string;
11
- name: string;
12
- data: {
13
- $master: string;
14
- objectName: any;
15
- _id: any;
16
- recordPermissions: any;
17
- uiSchema: any;
18
- loaded: boolean;
19
- };
20
- body: {};
21
- };
22
- };
5
+ label: any;
6
+ columns: any;
7
+ sort: any;
8
+ filters: any;
9
+ visible_on: any;
10
+ page_size: any;
23
11
  } | {
24
12
  masterObjectName: any;
25
13
  object_name: any;
26
14
  foreign_key: any;
27
- schema: {
28
- uiSchema: any;
29
- isCustomAmisSchema?: undefined;
30
- amisSchema?: undefined;
31
- isCalendar?: undefined;
32
- } | {
33
- uiSchema: any;
34
- isCustomAmisSchema: boolean;
35
- amisSchema: any;
36
- isCalendar?: undefined;
37
- } | {
38
- uiSchema: any;
39
- isCalendar: boolean;
40
- amisSchema: any;
41
- isCustomAmisSchema?: undefined;
42
- } | {
43
- uiSchema: any;
44
- amisSchema: {
45
- type: string;
46
- objectApiName: any;
47
- columns: any;
48
- extraColumns: any;
49
- filters: any;
50
- filtersFunction: any;
51
- sort: string;
52
- ctx: {};
53
- };
54
- isCustomAmisSchema?: undefined;
55
- isCalendar?: undefined;
56
- };
15
+ label?: undefined;
16
+ columns?: undefined;
17
+ sort?: undefined;
18
+ filters?: undefined;
19
+ visible_on?: undefined;
20
+ page_size?: undefined;
57
21
  })[]>;
58
- export function getRecordDetailRelatedListSchema(objectName: any, recordId: any, relatedObjectName: any, relatedKey: any, top: any, perPage: any, hiddenEmptyTable: any, appId: any, relatedLabel: any, className: any): Promise<{
22
+ export function getRecordDetailRelatedListSchema(objectName: any, recordId: any, relatedObjectName: any, relatedKey: any, ctx: any): Promise<{
59
23
  uiSchema: any;
60
24
  amisSchema: {
61
25
  type: string;
@@ -71,7 +35,40 @@ export function getRecordDetailRelatedListSchema(objectName: any, recordId: any,
71
35
  objectName: any;
72
36
  listViewId: string;
73
37
  };
74
- body: any[];
38
+ body: {
39
+ data: {
40
+ "&": string;
41
+ appId: string;
42
+ app_id: string;
43
+ relatedKey: any;
44
+ objectName: string;
45
+ recordId: string;
46
+ defaultData: {
47
+ [x: number]: any;
48
+ };
49
+ };
50
+ type: string;
51
+ objectApiName: any;
52
+ columns: any;
53
+ extraColumns: any;
54
+ filters: any;
55
+ filtersFunction: any;
56
+ sort: string;
57
+ ctx: any;
58
+ }[];
59
+ };
60
+ }>;
61
+ export function getRelatedListSchema(appName: any, objectName: any, listViewName: any, ctx: any): Promise<{
62
+ uiSchema: any;
63
+ amisSchema: {
64
+ type: string;
65
+ objectApiName: any;
66
+ columns: any;
67
+ extraColumns: any;
68
+ filters: any;
69
+ filtersFunction: any;
70
+ sort: string;
71
+ ctx: any;
75
72
  };
76
73
  }>;
77
74
  export function getRelatedFieldValue(masterObjectName: any, record_id: any, uiSchema: any, foreign_key: any): any;
@@ -1,5 +1,6 @@
1
1
  export function getFormPageInitSchema(objectApiName: any): Promise<{
2
2
  type: string;
3
+ name: string;
3
4
  bodyClassName: string;
4
5
  regions: string[];
5
6
  body: {
@@ -9,8 +10,8 @@ export function getFormPageInitSchema(objectApiName: any): Promise<{
9
10
  api: {
10
11
  method: string;
11
12
  url: string;
12
- sendOn: string;
13
13
  cache: number;
14
+ requestAdaptor: string;
14
15
  adaptor: string;
15
16
  data: {
16
17
  query: string;
@@ -26,6 +27,7 @@ export function getFormPageInitSchema(objectApiName: any): Promise<{
26
27
  }>;
27
28
  export function getListPageInitSchema(objectApiName: any, formFactor: any, userSession: any): Promise<{
28
29
  type: string;
30
+ name: string;
29
31
  bodyClassName: string;
30
32
  regions: string[];
31
33
  body: {
@@ -33,11 +35,13 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
33
35
  objectApiName: any;
34
36
  columnsTogglable: boolean;
35
37
  showHeader: boolean;
38
+ className: string;
36
39
  }[];
37
40
  }>;
38
41
  export function getRecordPageInitSchema(objectApiName: any): Promise<{
39
42
  type: string;
40
43
  id: string;
44
+ name: string;
41
45
  bodyClassName: string;
42
46
  regions: string[];
43
47
  body: {
@@ -11,4 +11,4 @@ export function absoluteUrl(url: any): string;
11
11
  export function getRootUrl(defaultRootUrl: any): any;
12
12
  export function setRootUrl(rootUrl: any): void;
13
13
  export function setSteedosAuth(steedosSession: any): void;
14
- export function getSteedosAuth(): {};
14
+ export function getSteedosAuth(): any;
@@ -4,12 +4,12 @@ export declare const getDefaultRenderData: () => {
4
4
  userId: any;
5
5
  tenantId: any;
6
6
  authToken: any;
7
- user: {};
7
+ user: any;
8
8
  };
9
9
  global: {
10
10
  userId: any;
11
11
  spaceId: any;
12
- user: {};
12
+ user: any;
13
13
  now: Date;
14
14
  };
15
15
  };
@@ -0,0 +1,256 @@
1
+ export function getApprovalDrawerSchema(instance: any): Promise<{
2
+ type: string;
3
+ overlay: boolean;
4
+ resizable: boolean;
5
+ size: string;
6
+ title: string;
7
+ className: string;
8
+ body: {
9
+ type: string;
10
+ debug: boolean;
11
+ id: string;
12
+ body: ({
13
+ type: string;
14
+ label: boolean;
15
+ name: string;
16
+ value: string;
17
+ options: {
18
+ label: string;
19
+ value: string;
20
+ }[];
21
+ id: string;
22
+ required: boolean;
23
+ onEvent: {
24
+ change: {
25
+ weight: number;
26
+ actions: ({
27
+ componentId: string;
28
+ args: {
29
+ value: {
30
+ new_judge: string;
31
+ new_next_step: any;
32
+ next_step: any;
33
+ };
34
+ judge?: undefined;
35
+ };
36
+ actionType: string;
37
+ eventName?: undefined;
38
+ } | {
39
+ args: {
40
+ judge: string;
41
+ value?: undefined;
42
+ };
43
+ actionType: string;
44
+ eventName: string;
45
+ componentId?: undefined;
46
+ })[];
47
+ };
48
+ };
49
+ } | {
50
+ type: string;
51
+ columns: ({
52
+ body: {
53
+ type: string;
54
+ tpl: string;
55
+ inline: boolean;
56
+ wrapperComponent: string;
57
+ id: string;
58
+ }[];
59
+ id: string;
60
+ md: string;
61
+ valign: string;
62
+ } | {
63
+ body: {
64
+ type: string;
65
+ label: string;
66
+ name: string;
67
+ id: string;
68
+ multiple: boolean;
69
+ required: boolean;
70
+ source: {
71
+ url: string;
72
+ headers: {
73
+ Authorization: string;
74
+ };
75
+ method: string;
76
+ messages: {};
77
+ requestAdaptor: string;
78
+ adaptor: string;
79
+ data: {
80
+ context: string;
81
+ $scopeId: string;
82
+ judge: string;
83
+ };
84
+ };
85
+ onEvent: {
86
+ change: {
87
+ weight: number;
88
+ actions: ({
89
+ componentId: string;
90
+ args: {
91
+ value: {
92
+ new_next_step: string;
93
+ };
94
+ next_step?: undefined;
95
+ };
96
+ actionType: string;
97
+ eventName?: undefined;
98
+ } | {
99
+ args: {
100
+ next_step: string;
101
+ value?: undefined;
102
+ };
103
+ actionType: string;
104
+ eventName: string;
105
+ componentId?: undefined;
106
+ })[];
107
+ };
108
+ };
109
+ }[];
110
+ id: string;
111
+ md?: undefined;
112
+ valign?: undefined;
113
+ })[];
114
+ id: string;
115
+ className: string;
116
+ subFormMode: string;
117
+ } | {
118
+ type: string;
119
+ columns: ({
120
+ body: {
121
+ type: string;
122
+ tpl: string;
123
+ inline: boolean;
124
+ wrapperComponent: string;
125
+ id: string;
126
+ }[];
127
+ id: string;
128
+ md: string;
129
+ valign: string;
130
+ } | {
131
+ body: any[];
132
+ id: string;
133
+ md?: undefined;
134
+ valign?: undefined;
135
+ })[];
136
+ id: string;
137
+ className: string;
138
+ subFormMode: string;
139
+ hiddenOn: string;
140
+ } | {
141
+ type: string;
142
+ label: boolean;
143
+ name: string;
144
+ id: string;
145
+ minRows: number;
146
+ maxRows: number;
147
+ placeholder: string;
148
+ required: string;
149
+ })[];
150
+ onEvent: {
151
+ approve_judge_change: {
152
+ actions: {
153
+ actionType: string;
154
+ componentId: string;
155
+ args: {};
156
+ }[];
157
+ };
158
+ validateError: {
159
+ weight: number;
160
+ actions: {
161
+ componentId: string;
162
+ args: {
163
+ msgType: string;
164
+ position: string;
165
+ closeButton: boolean;
166
+ showIcon: boolean;
167
+ title: string;
168
+ msg: string;
169
+ };
170
+ actionType: string;
171
+ }[];
172
+ };
173
+ };
174
+ }[];
175
+ id: string;
176
+ position: string;
177
+ actions: ({
178
+ type: string;
179
+ label: string;
180
+ onEvent: {
181
+ click: {
182
+ actions: ({
183
+ componentId: string;
184
+ args: {
185
+ api?: undefined;
186
+ messages?: undefined;
187
+ blank?: undefined;
188
+ url?: undefined;
189
+ };
190
+ actionType: string;
191
+ script: string;
192
+ expression?: undefined;
193
+ } | {
194
+ componentId: string;
195
+ args: {
196
+ api?: undefined;
197
+ messages?: undefined;
198
+ blank?: undefined;
199
+ url?: undefined;
200
+ };
201
+ actionType: string;
202
+ script: string;
203
+ expression: string;
204
+ } | {
205
+ componentId: string;
206
+ args: {
207
+ api: {
208
+ url: string;
209
+ method: string;
210
+ dataType: string;
211
+ headers: {
212
+ Authorization: string;
213
+ };
214
+ requestAdaptor: string;
215
+ };
216
+ messages: {
217
+ success: string;
218
+ };
219
+ blank?: undefined;
220
+ url?: undefined;
221
+ };
222
+ actionType: string;
223
+ expression: string;
224
+ script?: undefined;
225
+ } | {
226
+ componentId: string;
227
+ args: {
228
+ blank: boolean;
229
+ url: string;
230
+ api?: undefined;
231
+ messages?: undefined;
232
+ };
233
+ actionType: string;
234
+ expression: string;
235
+ script?: undefined;
236
+ })[];
237
+ };
238
+ };
239
+ id: string;
240
+ level: string;
241
+ } | {
242
+ type: string;
243
+ label: string;
244
+ onEvent: {
245
+ click: {
246
+ actions: {
247
+ componentId: string;
248
+ args: {};
249
+ actionType: string;
250
+ }[];
251
+ };
252
+ };
253
+ id: string;
254
+ level?: undefined;
255
+ })[];
256
+ }>;