@steedos-widgets/amis-lib 6.10.1-beta.8 → 6.10.2-beta.1

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.
Files changed (38) hide show
  1. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  2. package/dist/index.cjs.js +3698 -407
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +3698 -409
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.umd.js +440 -305
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/types/config/index.d.ts +3 -3
  9. package/dist/types/i18n.d.ts +2 -1
  10. package/dist/types/i18n_amis.d.ts +1 -0
  11. package/dist/types/index.d.ts +1 -0
  12. package/dist/types/lib/converter/amis/calendar.d.ts +4 -4
  13. package/dist/types/lib/converter/amis/fields/lookup.d.ts +2 -5
  14. package/dist/types/lib/converter/amis/fields_filter.d.ts +6 -18
  15. package/dist/types/lib/converter/amis/header.d.ts +37 -16
  16. package/dist/types/lib/converter/amis/toolbar.d.ts +5 -18
  17. package/dist/types/lib/converter/amis/toolbars/setting_listview/columns.d.ts +1 -4
  18. package/dist/types/lib/converter/amis/toolbars/setting_listview/copy.d.ts +7 -2
  19. package/dist/types/lib/converter/amis/toolbars/setting_listview/delete.d.ts +7 -0
  20. package/dist/types/lib/converter/amis/toolbars/setting_listview/filters.d.ts +1 -5
  21. package/dist/types/lib/converter/amis/toolbars/setting_listview/new.d.ts +7 -2
  22. package/dist/types/lib/converter/amis/toolbars/setting_listview/rename.d.ts +7 -2
  23. package/dist/types/lib/converter/amis/toolbars/setting_listview/sort.d.ts +1 -4
  24. package/dist/types/lib/converter/amis/toolbars/setting_listview.d.ts +31 -19
  25. package/dist/types/lib/objects.d.ts +6 -2
  26. package/dist/types/lib/objectsRelated.d.ts +3 -0
  27. package/dist/types/lib/router.d.ts +0 -22
  28. package/dist/types/schema/standard_delete.amis.d.ts +23 -0
  29. package/dist/types/schema/standard_edit.amis.d.ts +1 -0
  30. package/dist/types/schema/standard_new.amis.d.ts +2 -1
  31. package/dist/types/standard/button.d.ts +26 -1
  32. package/dist/types/workflow/approve.d.ts +55 -96
  33. package/dist/types/workflow/attachment.d.ts +9 -13
  34. package/dist/types/workflow/flow.d.ts +131 -130
  35. package/dist/types/workflow/history.d.ts +1 -1
  36. package/dist/types/workflow/instance.d.ts +2 -16
  37. package/dist/types/workflow/related.d.ts +2 -6
  38. package/package.json +3 -3
@@ -1,8 +1,8 @@
1
1
  export function getListViewColumns(listView: any, formFactor: any): any;
2
2
  export function getListViewSort(listView: any): string;
3
3
  export function getListViewFilter(listView: any): any;
4
- export function getUISchema(objectName: any, force: any): Promise<any>;
5
- export function getUISchemaSync(objectName: any, force: any): any;
4
+ export function getUISchema(objectName: any, force: any, retry?: boolean): Promise<any>;
5
+ export function getUISchemaSync(objectName: any, force: any, retry?: boolean): any;
6
6
  export function getField(objectName: any, fieldName: any): Promise<any>;
7
7
  export function getFormSchema(objectName: any, ctx: any): Promise<{
8
8
  uiSchema: any;
@@ -97,6 +97,7 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
97
97
  headerToolbarItems: any;
98
98
  filterVisible: any;
99
99
  rowClassNameExpr: any;
100
+ crud: any;
100
101
  crudDataFilter: any;
101
102
  onCrudDataFilter: any;
102
103
  };
@@ -252,6 +253,7 @@ export function getRecordDetailSchema(objectName: any, appId: any, props?: {}):
252
253
  objectApiName: string;
253
254
  recordId: string;
254
255
  appId: any;
256
+ _reloadKey: any;
255
257
  }[];
256
258
  }[];
257
259
  } | {
@@ -262,6 +264,7 @@ export function getRecordDetailSchema(objectName: any, appId: any, props?: {}):
262
264
  id: string;
263
265
  showButtons: any;
264
266
  showBackButton: any;
267
+ _reloadKey: any;
265
268
  })[];
266
269
  objectApiName: string;
267
270
  recordId: string;
@@ -399,6 +402,7 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
399
402
  headerToolbarItems: any;
400
403
  filterVisible: any;
401
404
  rowClassNameExpr: any;
405
+ crud: any;
402
406
  crudDataFilter: any;
403
407
  onCrudDataFilter: any;
404
408
  };
@@ -38,6 +38,9 @@ export function getRecordDetailRelatedListSchema(objectName: any, recordId: any,
38
38
  relatedKey: any;
39
39
  listViewId: string;
40
40
  _isRelated: boolean;
41
+ record: {
42
+ recordPermissions: any;
43
+ };
41
44
  };
42
45
  body: {
43
46
  type: string;
@@ -1,24 +1,11 @@
1
1
  export namespace Router {
2
2
  function getTabDisplayAs(tab_id: any, defaultEnableSplit: any): string;
3
- function getTabDisplayAs(tab_id: any, defaultEnableSplit: any): string;
4
- function setTabDisplayAs(tab_id: any, displayAs: any): void;
5
3
  function setTabDisplayAs(tab_id: any, displayAs: any): void;
6
4
  function getAppPath({ formFactor, appId }: {
7
5
  formFactor: any;
8
6
  appId: any;
9
7
  }): string;
10
- function getAppPath({ formFactor, appId }: {
11
- formFactor: any;
12
- appId: any;
13
- }): string;
14
8
  function getPagePath(): void;
15
- function getPagePath(): void;
16
- function getObjectListViewPath({ formFactor, appId, objectName, listViewName }: {
17
- formFactor: any;
18
- appId: any;
19
- objectName: any;
20
- listViewName: any;
21
- }): string;
22
9
  function getObjectListViewPath({ formFactor, appId, objectName, listViewName }: {
23
10
  formFactor: any;
24
11
  appId: any;
@@ -26,15 +13,6 @@ export namespace Router {
26
13
  listViewName: any;
27
14
  }): string;
28
15
  function getObjectDetailPath(props: any): string;
29
- function getObjectDetailPath(props: any): string;
30
- function getObjectRelatedViewPath({ formFactor, appId, masterObjectName, masterRecordId, objectName, foreignKey }: {
31
- formFactor: any;
32
- appId: any;
33
- masterObjectName: any;
34
- masterRecordId: any;
35
- objectName: any;
36
- foreignKey: any;
37
- }): string;
38
16
  function getObjectRelatedViewPath({ formFactor, appId, masterObjectName, masterRecordId, objectName, foreignKey }: {
39
17
  formFactor: any;
40
18
  appId: any;
@@ -26,6 +26,13 @@ export function getSchema(uiSchema: any): {
26
26
  eventName?: undefined;
27
27
  };
28
28
  actionType: string;
29
+ script?: undefined;
30
+ data?: undefined;
31
+ expression?: undefined;
32
+ } | {
33
+ actionType: string;
34
+ script: string;
35
+ args?: undefined;
29
36
  data?: undefined;
30
37
  expression?: undefined;
31
38
  } | {
@@ -40,6 +47,7 @@ export function getSchema(uiSchema: any): {
40
47
  _inDrawer: string;
41
48
  _isRelated?: undefined;
42
49
  };
50
+ script?: undefined;
43
51
  expression?: undefined;
44
52
  } | {
45
53
  actionType: string;
@@ -54,6 +62,21 @@ export function getSchema(uiSchema: any): {
54
62
  _inDrawer?: undefined;
55
63
  };
56
64
  expression: string;
65
+ script?: undefined;
66
+ } | {
67
+ actionType: string;
68
+ args: {
69
+ eventName: string;
70
+ api?: undefined;
71
+ };
72
+ data: {
73
+ objectName: string;
74
+ __deletedRecord?: undefined;
75
+ _inDrawer?: undefined;
76
+ _isRelated?: undefined;
77
+ };
78
+ expression: string;
79
+ script?: undefined;
57
80
  })[];
58
81
  };
59
82
  };
@@ -29,6 +29,7 @@ export function getSchema(uiSchema: any, ctx: any): Promise<{
29
29
  _master: string;
30
30
  "_master._isRelated": string;
31
31
  "_master.relatedKey": string;
32
+ _lookupObjectName: string;
32
33
  };
33
34
  size: string;
34
35
  actions: ({
@@ -2,9 +2,9 @@ export function getSchema(uiSchema: any, ctx: any): Promise<{
2
2
  type: string;
3
3
  body: {
4
4
  type: string;
5
+ level: string;
5
6
  label: string;
6
7
  id: string;
7
- level: string;
8
8
  onEvent: {
9
9
  click: {
10
10
  weight: number;
@@ -46,6 +46,7 @@ export function getSchema(uiSchema: any, ctx: any): Promise<{
46
46
  isLookup: string;
47
47
  listName: string;
48
48
  selectedRowResponseResult: string;
49
+ _lookupObjectName: string;
49
50
  };
50
51
  title: string;
51
52
  body: {
@@ -5,9 +5,9 @@ export namespace StandardButtons {
5
5
  type: string;
6
6
  body: {
7
7
  type: string;
8
+ level: string;
8
9
  label: string;
9
10
  id: string;
10
- level: string;
11
11
  onEvent: {
12
12
  click: {
13
13
  weight: number;
@@ -49,6 +49,7 @@ export namespace StandardButtons {
49
49
  isLookup: string;
50
50
  listName: string;
51
51
  selectedRowResponseResult: string;
52
+ _lookupObjectName: string;
52
53
  };
53
54
  title: string;
54
55
  body: {
@@ -149,6 +150,7 @@ export namespace StandardButtons {
149
150
  _master: string;
150
151
  "_master._isRelated": string;
151
152
  "_master.relatedKey": string;
153
+ _lookupObjectName: string;
152
154
  };
153
155
  size: string;
154
156
  actions: ({
@@ -203,6 +205,13 @@ export namespace StandardButtons {
203
205
  eventName?: undefined;
204
206
  };
205
207
  actionType: string;
208
+ script?: undefined;
209
+ data?: undefined;
210
+ expression?: undefined;
211
+ } | {
212
+ actionType: string;
213
+ script: string;
214
+ args?: undefined;
206
215
  data?: undefined;
207
216
  expression?: undefined;
208
217
  } | {
@@ -217,6 +226,7 @@ export namespace StandardButtons {
217
226
  _inDrawer: string;
218
227
  _isRelated?: undefined;
219
228
  };
229
+ script?: undefined;
220
230
  expression?: undefined;
221
231
  } | {
222
232
  actionType: string;
@@ -231,6 +241,21 @@ export namespace StandardButtons {
231
241
  _inDrawer?: undefined;
232
242
  };
233
243
  expression: string;
244
+ script?: undefined;
245
+ } | {
246
+ actionType: string;
247
+ args: {
248
+ eventName: string;
249
+ api?: undefined;
250
+ };
251
+ data: {
252
+ objectName: string;
253
+ __deletedRecord?: undefined;
254
+ _inDrawer?: undefined;
255
+ _isRelated?: undefined;
256
+ };
257
+ expression: string;
258
+ script?: undefined;
234
259
  })[];
235
260
  };
236
261
  };
@@ -1,4 +1,4 @@
1
- export function getApprovalDrawerSchema(instance: any): Promise<{
1
+ export function getApprovalDrawerSchema(instance: any, submitEvents: any): Promise<{
2
2
  type: string;
3
3
  overlay: boolean;
4
4
  resizable: boolean;
@@ -10,7 +10,7 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
10
10
  headerClassName: string;
11
11
  bodyClassName: string;
12
12
  footerClassName: string;
13
- drawerContainer: () => any;
13
+ drawerContainer: () => HTMLElement;
14
14
  body: {
15
15
  type: string;
16
16
  debug: boolean;
@@ -24,7 +24,7 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
24
24
  name: string;
25
25
  value: string;
26
26
  options: {
27
- label: string;
27
+ label: any;
28
28
  value: string;
29
29
  }[];
30
30
  id: string;
@@ -59,7 +59,7 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
59
59
  columns: ({
60
60
  body: {
61
61
  type: string;
62
- tpl: string;
62
+ tpl: any;
63
63
  inline: boolean;
64
64
  wrapperComponent: string;
65
65
  id: string;
@@ -107,7 +107,7 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
107
107
  columns: ({
108
108
  body: {
109
109
  type: string;
110
- tpl: string;
110
+ tpl: any;
111
111
  inline: boolean;
112
112
  wrapperComponent: string;
113
113
  id: string;
@@ -116,41 +116,64 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
116
116
  md: string;
117
117
  valign: string;
118
118
  } | {
119
- body: (({
119
+ body: ({
120
120
  type: string;
121
- } & {
121
+ label: string;
122
122
  name: string;
123
123
  hiddenOn: string;
124
124
  required: boolean;
125
- }) | {
125
+ multiple?: undefined;
126
+ id?: undefined;
127
+ source?: undefined;
128
+ labelField?: undefined;
129
+ valueField?: undefined;
130
+ value?: undefined;
131
+ joinValues?: undefined;
132
+ extractValue?: undefined;
133
+ } | {
134
+ type: string;
135
+ label: string;
136
+ name: string;
137
+ hiddenOn: string;
138
+ required: boolean;
139
+ multiple: boolean;
140
+ id?: undefined;
141
+ source?: undefined;
142
+ labelField?: undefined;
143
+ valueField?: undefined;
144
+ value?: undefined;
145
+ joinValues?: undefined;
146
+ extractValue?: undefined;
147
+ } | {
126
148
  type: string;
127
149
  label: string;
128
150
  name: string;
129
151
  id: string;
130
152
  required: boolean;
131
153
  hiddenOn: string;
132
- amis: {
133
- multiple: string;
134
- source: {
135
- url: string;
136
- method: string;
137
- sendOn: string;
138
- headers: {
139
- Authorization: string;
140
- };
141
- messages: {};
142
- requestAdaptor: string;
143
- adaptor: string;
144
- data: {
145
- "&": string;
146
- $scopeId: string;
147
- context: string;
148
- next_step: string;
149
- };
154
+ multiple: boolean;
155
+ source: {
156
+ url: string;
157
+ method: string;
158
+ sendOn: string;
159
+ headers: {
160
+ Authorization: string;
161
+ };
162
+ messages: {};
163
+ requestAdaptor: string;
164
+ adaptor: string;
165
+ data: {
166
+ "&": string;
167
+ $scopeId: string;
168
+ context: string;
169
+ next_step: string;
150
170
  };
151
- labelField: string;
152
- valueField: string;
153
171
  };
172
+ labelField: string;
173
+ valueField: string;
174
+ value: string;
175
+ joinValues: boolean;
176
+ extractValue: boolean;
154
177
  })[];
155
178
  id: string;
156
179
  md?: undefined;
@@ -176,7 +199,7 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
176
199
  id: string;
177
200
  minRows: number;
178
201
  maxRows: number;
179
- placeholder: string;
202
+ placeholder: any;
180
203
  requiredOn: string;
181
204
  })[];
182
205
  onEvent: {
@@ -196,8 +219,8 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
196
219
  position: string;
197
220
  closeButton: boolean;
198
221
  showIcon: boolean;
199
- title: string;
200
- msg: string;
222
+ title: any;
223
+ msg: any;
201
224
  };
202
225
  actionType: string;
203
226
  }[];
@@ -211,71 +234,7 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
211
234
  label: string;
212
235
  onEvent: {
213
236
  click: {
214
- actions: ({
215
- componentId: string;
216
- args: {
217
- api?: undefined;
218
- messages?: undefined;
219
- blank?: undefined;
220
- url?: undefined;
221
- };
222
- actionType: string;
223
- script: string;
224
- expression?: undefined;
225
- } | {
226
- componentId: string;
227
- args: {
228
- api?: undefined;
229
- messages?: undefined;
230
- blank?: undefined;
231
- url?: undefined;
232
- };
233
- actionType: string;
234
- script: string;
235
- expression: string;
236
- } | {
237
- componentId: string;
238
- args: {
239
- api: {
240
- url: string;
241
- method: string;
242
- dataType: string;
243
- data: {
244
- "&": string;
245
- $scopeId: string;
246
- };
247
- headers: {
248
- Authorization: string;
249
- };
250
- requestAdaptor: string;
251
- };
252
- messages: {
253
- success: string;
254
- };
255
- blank?: undefined;
256
- url?: undefined;
257
- };
258
- actionType: string;
259
- expression: string;
260
- script?: undefined;
261
- } | {
262
- componentId: string;
263
- args: {
264
- blank: boolean;
265
- url: any;
266
- api?: undefined;
267
- messages?: undefined;
268
- };
269
- actionType: string;
270
- expression: string;
271
- script?: undefined;
272
- } | {
273
- actionType: string;
274
- expression: string;
275
- componentId?: undefined;
276
- args?: undefined;
277
- script?: undefined;
278
- })[];
237
+ actions: any[];
279
238
  };
280
239
  };
281
240
  id: string;
@@ -5,7 +5,7 @@ export function getAttachments(instance: any): Promise<{
5
5
  bodyClassName: string;
6
6
  title: ({
7
7
  type: string;
8
- tpl: string;
8
+ tpl: any;
9
9
  title?: undefined;
10
10
  body?: undefined;
11
11
  id?: undefined;
@@ -17,11 +17,11 @@ export function getAttachments(instance: any): Promise<{
17
17
  type: string;
18
18
  labelClassName: string;
19
19
  className: string;
20
- label: string;
20
+ label: any;
21
21
  mode: string;
22
22
  name: string;
23
23
  id: string;
24
- btnLabel: string;
24
+ btnLabel: any;
25
25
  btnClassName: string;
26
26
  multiple: boolean;
27
27
  maxLength: number;
@@ -64,7 +64,7 @@ export function getAttachments(instance: any): Promise<{
64
64
  position: string;
65
65
  closeButton: boolean;
66
66
  showIcon: boolean;
67
- msg: string;
67
+ msg: any;
68
68
  };
69
69
  actionType: string;
70
70
  })[];
@@ -97,11 +97,7 @@ export function getAttachments(instance: any): Promise<{
97
97
  inline: boolean;
98
98
  tpl: string;
99
99
  }[];
100
- actions: {
101
- icon: string;
102
- type: string;
103
- id: string;
104
- }[];
100
+ actions: any[];
105
101
  id: string;
106
102
  };
107
103
  id: string;
@@ -110,7 +106,7 @@ export function getAttachments(instance: any): Promise<{
110
106
  }>;
111
107
  export function getAttachmentUploadInput(instance: any): Promise<{
112
108
  type: string;
113
- tpl: string;
109
+ tpl: any;
114
110
  title?: undefined;
115
111
  body?: undefined;
116
112
  id?: undefined;
@@ -122,11 +118,11 @@ export function getAttachmentUploadInput(instance: any): Promise<{
122
118
  type: string;
123
119
  labelClassName: string;
124
120
  className: string;
125
- label: string;
121
+ label: any;
126
122
  mode: string;
127
123
  name: string;
128
124
  id: string;
129
- btnLabel: string;
125
+ btnLabel: any;
130
126
  btnClassName: string;
131
127
  multiple: boolean;
132
128
  maxLength: number;
@@ -169,7 +165,7 @@ export function getAttachmentUploadInput(instance: any): Promise<{
169
165
  position: string;
170
166
  closeButton: boolean;
171
167
  showIcon: boolean;
172
- msg: string;
168
+ msg: any;
173
169
  };
174
170
  actionType: string;
175
171
  })[];