@steedos-widgets/amis-lib 0.0.2 → 0.0.4

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 (43) hide show
  1. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  2. package/dist/index.cjs.js +248 -54
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.d.ts +9 -0
  5. package/dist/index.esm.js +248 -54
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.umd.js +508 -0
  8. package/dist/index.umd.min.js +508 -0
  9. package/dist/types/index.d.ts +9 -0
  10. package/dist/types/lib/assets.d.ts +1 -0
  11. package/dist/types/lib/buttons.d.ts +6 -4
  12. package/dist/types/lib/converter/amis/api.d.ts +1 -1
  13. package/dist/types/lib/converter/amis/fields/file.d.ts +57 -0
  14. package/dist/types/lib/converter/amis/fields/index.d.ts +6 -4
  15. package/dist/types/lib/converter/amis/fields/list.d.ts +22 -6
  16. package/dist/types/lib/converter/amis/fields/lookup.d.ts +11 -95
  17. package/dist/types/lib/converter/amis/fields/sections.d.ts +2 -1
  18. package/dist/types/lib/converter/amis/fields/table.d.ts +2 -2
  19. package/dist/types/lib/converter/amis/fields/type.d.ts +1 -0
  20. package/dist/types/lib/converter/amis/fields/user.d.ts +1 -0
  21. package/dist/types/lib/converter/amis/filters.d.ts +5 -0
  22. package/dist/types/lib/converter/amis/form.d.ts +2 -1
  23. package/dist/types/lib/converter/amis/graphql.d.ts +1 -0
  24. package/dist/types/lib/converter/amis/index.d.ts +94 -219
  25. package/dist/types/lib/converter/amis/tpl.d.ts +6 -3
  26. package/dist/types/lib/defaultsDeep.d.ts +1 -0
  27. package/dist/types/lib/objects.d.ts +193 -524
  28. package/dist/types/lib/page.d.ts +7 -1
  29. package/dist/types/lib/router.d.ts +4 -2
  30. package/dist/types/lib/space_users.d.ts +137 -0
  31. package/dist/types/lib/workflow/flow.d.ts +31 -0
  32. package/dist/types/schema/standard_delete.amis.d.ts +56 -0
  33. package/dist/types/schema/standard_edit.amis.d.ts +37 -0
  34. package/dist/types/schema/standard_import_data.amis.d.ts +251 -0
  35. package/dist/types/schema/standard_new.amis.d.ts +39 -0
  36. package/dist/types/standard/button.d.ts +400 -0
  37. package/dist/types/utils/keyToPath.d.ts +6 -0
  38. package/dist/types/utils/object.d.ts +14 -0
  39. package/dist/utils/keyToPath.d.ts +6 -0
  40. package/dist/utils/object.d.ts +14 -0
  41. package/package.json +3 -4
  42. package/dist/amis-lib.umd.js +0 -314
  43. package/dist/amis-lib.umd.min.js +0 -314
@@ -1 +1,7 @@
1
- export function getPage(pageId: any, appId: any, objectName: string, recordId: any, formFactor?: string): Promise<any>;
1
+ export function getPage({ pageId, appId, objectName, recordId, formFactor }: {
2
+ pageId: any;
3
+ appId: any;
4
+ objectName?: string;
5
+ recordId: any;
6
+ formFactor?: string;
7
+ }): Promise<any>;
@@ -21,17 +21,19 @@ export namespace Router {
21
21
  objectName: any;
22
22
  listViewName: any;
23
23
  }): string;
24
- function getObjectDetailPath({ formFactor, appId, objectName, recordId }: {
24
+ function getObjectDetailPath({ formFactor, appId, objectName, recordId, listViewName }: {
25
25
  formFactor: any;
26
26
  appId: any;
27
27
  objectName: any;
28
28
  recordId: any;
29
+ listViewName: any;
29
30
  }): string;
30
- function getObjectDetailPath({ formFactor, appId, objectName, recordId }: {
31
+ function getObjectDetailPath({ formFactor, appId, objectName, recordId, listViewName }: {
31
32
  formFactor: any;
32
33
  appId: any;
33
34
  objectName: any;
34
35
  recordId: any;
36
+ listViewName: any;
35
37
  }): string;
36
38
  function getObjectRelatedViewPath({ formFactor, appId, masterObjectName, masterRecordId, objectName, foreignKey }: {
37
39
  formFactor: any;
@@ -0,0 +1,137 @@
1
+ export function getSpaceUsersPickerAmisSchema(spaceUserSchema: any, name: any, options: any): Promise<{
2
+ type: string;
3
+ label: string;
4
+ name: any;
5
+ id: any;
6
+ modalMode: string;
7
+ joinValues: boolean;
8
+ source: {
9
+ method: string;
10
+ url: string;
11
+ data: {
12
+ orderBy: string;
13
+ orderDir: string;
14
+ pageNo: string;
15
+ pageSize: string;
16
+ query: string;
17
+ $term: string;
18
+ $self: string;
19
+ };
20
+ requestAdaptor: string;
21
+ };
22
+ pickerSchema: {
23
+ mode: string;
24
+ name: string;
25
+ draggable: boolean;
26
+ headerToolbar: string[];
27
+ defaultParams: {
28
+ perPage: number;
29
+ };
30
+ columns: ({
31
+ name: string;
32
+ type: string;
33
+ width: number;
34
+ placeholder: string;
35
+ label?: undefined;
36
+ toggled?: undefined;
37
+ sortable?: undefined;
38
+ searchable?: undefined;
39
+ } | {
40
+ name: string;
41
+ label: string;
42
+ type: string;
43
+ toggled: boolean;
44
+ width?: undefined;
45
+ placeholder?: undefined;
46
+ sortable?: undefined;
47
+ searchable?: undefined;
48
+ } | {
49
+ name: string;
50
+ label: string;
51
+ sortable: boolean;
52
+ searchable: boolean;
53
+ type: string;
54
+ width?: undefined;
55
+ placeholder?: undefined;
56
+ toggled?: undefined;
57
+ })[];
58
+ syncLocation: boolean;
59
+ keepItemSelectionOnPageChange: boolean;
60
+ };
61
+ labelField: string;
62
+ valueField: string;
63
+ size: string;
64
+ extractValue: boolean;
65
+ className: string;
66
+ labelClassName: string;
67
+ }>;
68
+ export function getSpaceUsersPickerSchema(name: any, options: any): Promise<{
69
+ uiSchema: any;
70
+ amisSchema: {
71
+ type: string;
72
+ label: string;
73
+ name: any;
74
+ id: any;
75
+ modalMode: string;
76
+ joinValues: boolean;
77
+ source: {
78
+ method: string;
79
+ url: string;
80
+ data: {
81
+ orderBy: string;
82
+ orderDir: string;
83
+ pageNo: string;
84
+ pageSize: string;
85
+ query: string;
86
+ $term: string;
87
+ $self: string;
88
+ };
89
+ requestAdaptor: string;
90
+ };
91
+ pickerSchema: {
92
+ mode: string;
93
+ name: string;
94
+ draggable: boolean;
95
+ headerToolbar: string[];
96
+ defaultParams: {
97
+ perPage: number;
98
+ };
99
+ columns: ({
100
+ name: string;
101
+ type: string;
102
+ width: number;
103
+ placeholder: string;
104
+ label?: undefined;
105
+ toggled?: undefined;
106
+ sortable?: undefined;
107
+ searchable?: undefined;
108
+ } | {
109
+ name: string;
110
+ label: string;
111
+ type: string;
112
+ toggled: boolean;
113
+ width?: undefined;
114
+ placeholder?: undefined;
115
+ sortable?: undefined;
116
+ searchable?: undefined;
117
+ } | {
118
+ name: string;
119
+ label: string;
120
+ sortable: boolean;
121
+ searchable: boolean;
122
+ type: string;
123
+ width?: undefined;
124
+ placeholder?: undefined;
125
+ toggled?: undefined;
126
+ })[];
127
+ syncLocation: boolean;
128
+ keepItemSelectionOnPageChange: boolean;
129
+ };
130
+ labelField: string;
131
+ valueField: string;
132
+ size: string;
133
+ extractValue: boolean;
134
+ className: string;
135
+ labelClassName: string;
136
+ };
137
+ }>;
@@ -0,0 +1,31 @@
1
+ export function getFlowFormSchema(form: any): {
2
+ type: string;
3
+ body: {
4
+ type: string;
5
+ data: {
6
+ beijing: string;
7
+ tianjing: string;
8
+ };
9
+ body: ({
10
+ type: string;
11
+ trs: any[];
12
+ id: string;
13
+ } | {
14
+ type: string;
15
+ id: string;
16
+ tpl: string;
17
+ inline: boolean;
18
+ wrapperComponent: string;
19
+ style: {
20
+ fontFamily: string;
21
+ fontSize: number;
22
+ textAlign: string;
23
+ };
24
+ })[];
25
+ id: string;
26
+ }[];
27
+ id: string;
28
+ messages: {};
29
+ pullRefresh: {};
30
+ regions: string[];
31
+ };
@@ -0,0 +1,56 @@
1
+ export function getSchema(uiSchema: any): {
2
+ type: string;
3
+ bodyClassName: string;
4
+ body: {
5
+ type: string;
6
+ label: string;
7
+ confirmText: string;
8
+ className: string;
9
+ onEvent: {
10
+ click: {
11
+ actions: ({
12
+ args: {
13
+ api: {
14
+ method: string;
15
+ url: string;
16
+ data: {
17
+ "&": string;
18
+ recordId: string;
19
+ objectName: string;
20
+ };
21
+ requestAdaptor: string;
22
+ headers: {
23
+ Authorization: string;
24
+ };
25
+ };
26
+ messages: {
27
+ success: string;
28
+ failed: string;
29
+ };
30
+ url?: undefined;
31
+ blank?: undefined;
32
+ };
33
+ actionType: string;
34
+ componentId?: undefined;
35
+ expression?: undefined;
36
+ } | {
37
+ componentId: string;
38
+ args: {
39
+ url: string;
40
+ blank: boolean;
41
+ api?: undefined;
42
+ messages?: undefined;
43
+ };
44
+ actionType: string;
45
+ expression: string;
46
+ } | {
47
+ componentId: string;
48
+ actionType: string;
49
+ expression: string;
50
+ args?: undefined;
51
+ })[];
52
+ };
53
+ };
54
+ }[];
55
+ regions: string[];
56
+ };
@@ -0,0 +1,37 @@
1
+ export function getSchema(uiSchema: any): {
2
+ type: string;
3
+ body: {
4
+ type: string;
5
+ label: string;
6
+ id: string;
7
+ onEvent: {
8
+ click: {
9
+ actions: {
10
+ actionType: string;
11
+ dialog: {
12
+ type: string;
13
+ title: string;
14
+ bodyClassName: string;
15
+ body: {
16
+ type: string;
17
+ label: string;
18
+ objectApiName: string;
19
+ recordId: string;
20
+ id: string;
21
+ mode: string;
22
+ }[];
23
+ id: string;
24
+ closeOnEsc: boolean;
25
+ closeOnOutside: boolean;
26
+ showCloseButton: boolean;
27
+ size: string;
28
+ };
29
+ }[];
30
+ weight: number;
31
+ };
32
+ };
33
+ }[];
34
+ regions: string[];
35
+ bodyClassName: string;
36
+ id: string;
37
+ };
@@ -0,0 +1,251 @@
1
+ export function getSchema(uiSchema: any): {
2
+ type: string;
3
+ body: {
4
+ type: string;
5
+ label: string;
6
+ id: string;
7
+ onEvent: {
8
+ click: {
9
+ actions: {
10
+ actionType: string;
11
+ dialog: {
12
+ type: string;
13
+ title: string;
14
+ body: {
15
+ type: string;
16
+ mode: string;
17
+ persistData: boolean;
18
+ promptPageLeave: boolean;
19
+ name: string;
20
+ debug: boolean;
21
+ title: string;
22
+ submitText: string;
23
+ api: {
24
+ method: string;
25
+ url: string;
26
+ data: {
27
+ objectName: string;
28
+ $: string;
29
+ };
30
+ requestAdaptor: string;
31
+ responseData: {
32
+ recordId: string;
33
+ };
34
+ adaptor: string;
35
+ headers: {
36
+ Authorization: string;
37
+ };
38
+ dataType: string;
39
+ };
40
+ initFetch: boolean;
41
+ body: {
42
+ type: string;
43
+ title: string;
44
+ collapsable: boolean;
45
+ body: ({
46
+ name: string;
47
+ label: string;
48
+ required: boolean;
49
+ type: string;
50
+ joinValues: boolean;
51
+ extractValue: boolean;
52
+ autoComplete: {
53
+ method: string;
54
+ url: string;
55
+ data: {
56
+ orderBy: string;
57
+ orderDir: string;
58
+ pageNo: string;
59
+ pageSize: string;
60
+ query: string;
61
+ $term: string;
62
+ $value: string;
63
+ $: string;
64
+ rfield: string;
65
+ };
66
+ headers: {
67
+ Authorization: string;
68
+ };
69
+ requestAdaptor: string;
70
+ };
71
+ className: string;
72
+ labelClassName: string;
73
+ clearValueOnHidden: boolean;
74
+ id: string;
75
+ multiple: boolean;
76
+ hidden: boolean;
77
+ labelField?: undefined;
78
+ valueField?: undefined;
79
+ modalMode?: undefined;
80
+ source?: undefined;
81
+ size?: undefined;
82
+ pickerSchema?: undefined;
83
+ useChunk?: undefined;
84
+ receiver?: undefined;
85
+ } | {
86
+ name: string;
87
+ label: string;
88
+ required: boolean;
89
+ type: string;
90
+ labelField: string;
91
+ valueField: string;
92
+ modalMode: string;
93
+ source: {
94
+ method: string;
95
+ url: string;
96
+ data: {
97
+ orderBy: string;
98
+ orderDir: string;
99
+ pageNo: string;
100
+ pageSize: string;
101
+ query: string;
102
+ $term: string;
103
+ $self: string;
104
+ };
105
+ headers: {
106
+ Authorization: string;
107
+ };
108
+ requestAdaptor: string;
109
+ adaptor: string;
110
+ };
111
+ size: string;
112
+ pickerSchema: {
113
+ mode: string;
114
+ name: string;
115
+ draggable: boolean;
116
+ headerToolbar: string[];
117
+ defaultParams: {
118
+ perPage: number;
119
+ };
120
+ columns: ({
121
+ name: string;
122
+ type: string;
123
+ width: number;
124
+ placeholder: string;
125
+ label?: undefined;
126
+ tpl?: undefined;
127
+ className?: undefined;
128
+ html?: undefined;
129
+ } | {
130
+ name: string;
131
+ label: string;
132
+ type: string;
133
+ tpl: string;
134
+ className: string;
135
+ html: any;
136
+ width?: undefined;
137
+ placeholder?: undefined;
138
+ } | {
139
+ name: string;
140
+ label: string;
141
+ type: string;
142
+ className: string;
143
+ html: boolean;
144
+ width?: undefined;
145
+ placeholder?: undefined;
146
+ tpl?: undefined;
147
+ })[];
148
+ syncLocation: boolean;
149
+ keepItemSelectionOnPageChange: boolean;
150
+ checkOnItemClick: boolean;
151
+ autoFillHeight: boolean;
152
+ };
153
+ joinValues: boolean;
154
+ extractValue: boolean;
155
+ className: string;
156
+ labelClassName: string;
157
+ clearValueOnHidden: boolean;
158
+ id: string;
159
+ autoComplete?: undefined;
160
+ multiple?: undefined;
161
+ hidden?: undefined;
162
+ useChunk?: undefined;
163
+ receiver?: undefined;
164
+ } | {
165
+ name: string;
166
+ label: string;
167
+ required: boolean;
168
+ type: string;
169
+ className: string;
170
+ labelClassName: string;
171
+ clearValueOnHidden: boolean;
172
+ useChunk: boolean;
173
+ receiver: {
174
+ method: string;
175
+ url: string;
176
+ data: {
177
+ $: string;
178
+ context: string;
179
+ };
180
+ adaptor: string;
181
+ headers: {
182
+ Authorization: string;
183
+ };
184
+ };
185
+ id: string;
186
+ joinValues?: undefined;
187
+ extractValue?: undefined;
188
+ autoComplete?: undefined;
189
+ multiple?: undefined;
190
+ hidden?: undefined;
191
+ labelField?: undefined;
192
+ valueField?: undefined;
193
+ modalMode?: undefined;
194
+ source?: undefined;
195
+ size?: undefined;
196
+ pickerSchema?: undefined;
197
+ })[];
198
+ id: string;
199
+ }[];
200
+ panelClassName: string;
201
+ bodyClassName: string;
202
+ className: string;
203
+ label: string;
204
+ objectApiName: string;
205
+ id: string;
206
+ onEvent: {
207
+ submitSucc: {
208
+ weight: number;
209
+ actions: {
210
+ args: {
211
+ api: {
212
+ url: string;
213
+ method: string;
214
+ data: {
215
+ eventData: string;
216
+ };
217
+ dataType: string;
218
+ requestAdaptor: string;
219
+ adaptor: string;
220
+ headers: {
221
+ Authorization: string;
222
+ };
223
+ };
224
+ messages: {
225
+ success: string;
226
+ failed: string;
227
+ };
228
+ };
229
+ actionType: string;
230
+ expression: string;
231
+ }[];
232
+ };
233
+ };
234
+ closeDialogOnSubmit: boolean;
235
+ }[];
236
+ id: string;
237
+ closeOnEsc: boolean;
238
+ closeOnOutside: boolean;
239
+ showCloseButton: boolean;
240
+ size: string;
241
+ };
242
+ }[];
243
+ weight: number;
244
+ };
245
+ };
246
+ level: string;
247
+ }[];
248
+ regions: string[];
249
+ bodyClassName: string;
250
+ id: string;
251
+ };
@@ -0,0 +1,39 @@
1
+ export function getSchema(uiSchema: any): {
2
+ type: string;
3
+ body: {
4
+ type: string;
5
+ label: string;
6
+ id: string;
7
+ level: string;
8
+ onEvent: {
9
+ click: {
10
+ actions: {
11
+ actionType: string;
12
+ dialog: {
13
+ type: string;
14
+ title: string;
15
+ bodyClassName: string;
16
+ body: {
17
+ type: string;
18
+ label: string;
19
+ objectApiName: string;
20
+ recordId: string;
21
+ id: string;
22
+ mode: string;
23
+ layout: string;
24
+ }[];
25
+ id: string;
26
+ closeOnEsc: boolean;
27
+ closeOnOutside: boolean;
28
+ showCloseButton: boolean;
29
+ size: string;
30
+ };
31
+ }[];
32
+ weight: number;
33
+ };
34
+ };
35
+ }[];
36
+ regions: string[];
37
+ bodyClassName: string;
38
+ id: string;
39
+ };