@steedos-widgets/amis-lib 1.0.20 → 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;
@@ -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
  };
@@ -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;
@@ -456,6 +467,8 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
456
467
  filtersFunction: any;
457
468
  sort: string;
458
469
  ctx: {};
470
+ requestAdaptor: any;
471
+ adaptor: any;
459
472
  };
460
473
  isCustomAmisSchema?: undefined;
461
474
  isCalendar?: undefined;
@@ -54,11 +54,11 @@ export function getRecordDetailRelatedListSchema(objectName: any, recordId: any,
54
54
  filters: any;
55
55
  filtersFunction: any;
56
56
  sort: string;
57
- ctx: {};
57
+ ctx: any;
58
58
  }[];
59
59
  };
60
60
  }>;
61
- export function getRelatedListSchema(appName: any, objectName: any, listViewName: any, ctx?: {}): Promise<{
61
+ export function getRelatedListSchema(appName: any, objectName: any, listViewName: any, ctx: any): Promise<{
62
62
  uiSchema: any;
63
63
  amisSchema: {
64
64
  type: string;
@@ -68,7 +68,7 @@ export function getRelatedListSchema(appName: any, objectName: any, listViewName
68
68
  filters: any;
69
69
  filtersFunction: any;
70
70
  sort: string;
71
- ctx: {};
71
+ ctx: any;
72
72
  };
73
73
  }>;
74
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: {
@@ -39,6 +41,7 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
39
41
  export function getRecordPageInitSchema(objectApiName: any): Promise<{
40
42
  type: string;
41
43
  id: string;
44
+ name: string;
42
45
  bodyClassName: string;
43
46
  regions: string[];
44
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
+ }>;
@@ -0,0 +1,182 @@
1
+ export function getAttachments(instance: any): Promise<{
2
+ type: string;
3
+ className: string;
4
+ headerClassName: string;
5
+ bodyClassName: string;
6
+ title: ({
7
+ type: string;
8
+ tpl: string;
9
+ title?: undefined;
10
+ body?: undefined;
11
+ id?: undefined;
12
+ wrapWithPanel?: undefined;
13
+ } | {
14
+ type: string;
15
+ title: string;
16
+ body: {
17
+ type: string;
18
+ labelClassName: string;
19
+ className: string;
20
+ label: string;
21
+ mode: string;
22
+ name: string;
23
+ id: string;
24
+ btnLabel: string;
25
+ btnClassName: string;
26
+ multiple: boolean;
27
+ maxLength: number;
28
+ submitType: string;
29
+ uploadType: string;
30
+ proxy: boolean;
31
+ drag: boolean;
32
+ autoUpload: boolean;
33
+ useChunk: boolean;
34
+ joinValues: boolean;
35
+ extractValue: boolean;
36
+ valueField: string;
37
+ receiver: {
38
+ url: string;
39
+ headers: {
40
+ Authorization: string;
41
+ };
42
+ method: string;
43
+ messages: {};
44
+ dataType: string;
45
+ requestAdaptor: string;
46
+ };
47
+ onEvent: {
48
+ success: {
49
+ weight: number;
50
+ actions: ({
51
+ componentId: string;
52
+ args: {
53
+ msgType?: undefined;
54
+ position?: undefined;
55
+ closeButton?: undefined;
56
+ showIcon?: undefined;
57
+ msg?: undefined;
58
+ };
59
+ actionType: string;
60
+ } | {
61
+ componentId: string;
62
+ args: {
63
+ msgType: string;
64
+ position: string;
65
+ closeButton: boolean;
66
+ showIcon: boolean;
67
+ msg: string;
68
+ };
69
+ actionType: string;
70
+ })[];
71
+ };
72
+ };
73
+ }[];
74
+ id: string;
75
+ wrapWithPanel: boolean;
76
+ tpl?: undefined;
77
+ })[];
78
+ body: {
79
+ type: string;
80
+ id: string;
81
+ api: {
82
+ method: string;
83
+ url: string;
84
+ dataType: string;
85
+ headers: {
86
+ Authorization: string;
87
+ };
88
+ requestAdaptor: string;
89
+ };
90
+ body: {
91
+ type: string;
92
+ source: string;
93
+ title: boolean;
94
+ listItem: {
95
+ body: {
96
+ type: string;
97
+ inline: boolean;
98
+ tpl: string;
99
+ }[];
100
+ actions: {
101
+ icon: string;
102
+ type: string;
103
+ id: string;
104
+ }[];
105
+ id: string;
106
+ };
107
+ id: string;
108
+ }[];
109
+ }[];
110
+ }>;
111
+ export function getAttachmentUploadInput(instance: any): Promise<{
112
+ type: string;
113
+ tpl: string;
114
+ title?: undefined;
115
+ body?: undefined;
116
+ id?: undefined;
117
+ wrapWithPanel?: undefined;
118
+ } | {
119
+ type: string;
120
+ title: string;
121
+ body: {
122
+ type: string;
123
+ labelClassName: string;
124
+ className: string;
125
+ label: string;
126
+ mode: string;
127
+ name: string;
128
+ id: string;
129
+ btnLabel: string;
130
+ btnClassName: string;
131
+ multiple: boolean;
132
+ maxLength: number;
133
+ submitType: string;
134
+ uploadType: string;
135
+ proxy: boolean;
136
+ drag: boolean;
137
+ autoUpload: boolean;
138
+ useChunk: boolean;
139
+ joinValues: boolean;
140
+ extractValue: boolean;
141
+ valueField: string;
142
+ receiver: {
143
+ url: string;
144
+ headers: {
145
+ Authorization: string;
146
+ };
147
+ method: string;
148
+ messages: {};
149
+ dataType: string;
150
+ requestAdaptor: string;
151
+ };
152
+ onEvent: {
153
+ success: {
154
+ weight: number;
155
+ actions: ({
156
+ componentId: string;
157
+ args: {
158
+ msgType?: undefined;
159
+ position?: undefined;
160
+ closeButton?: undefined;
161
+ showIcon?: undefined;
162
+ msg?: undefined;
163
+ };
164
+ actionType: string;
165
+ } | {
166
+ componentId: string;
167
+ args: {
168
+ msgType: string;
169
+ position: string;
170
+ closeButton: boolean;
171
+ showIcon: boolean;
172
+ msg: string;
173
+ };
174
+ actionType: string;
175
+ })[];
176
+ };
177
+ };
178
+ }[];
179
+ id: string;
180
+ wrapWithPanel: boolean;
181
+ tpl?: undefined;
182
+ }>;