@steedos-widgets/amis-lib 0.0.3 → 0.0.5

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 +194 -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
@@ -9,248 +9,121 @@ export function getObjectList(objectSchema: any, fields: any, options: any): Pro
9
9
  authToken: any;
10
10
  };
11
11
  };
12
- body: ({
13
- mode: string;
14
- name: string;
15
- draggable: boolean;
16
- headerToolbar: string[];
17
- defaultParams: {
18
- perPage: any;
19
- };
20
- syncLocation: boolean;
21
- keepItemSelectionOnPageChange: boolean;
22
- checkOnItemClick: boolean;
23
- labelTpl: string;
24
- card: {
25
- type: string;
26
- header: {
27
- title: string;
28
- };
29
- body: any[];
30
- };
31
- } & {
32
- type: string;
33
- primaryField: string;
34
- id: string;
35
- name: string;
36
- keepItemSelectionOnPageChange: boolean;
37
- api: {
38
- method: string;
39
- url: string;
40
- data: {
41
- orderBy: string;
42
- orderDir: string;
43
- pageNo: string;
44
- pageSize: string;
45
- query: string;
46
- };
47
- headers: {
48
- Authorization: string;
49
- };
50
- };
51
- } & {
52
- toolbar: any[];
53
- footerToolbar: string[];
54
- headerToolbar: (string | {
55
- type: string;
56
- align: string;
57
- name?: undefined;
58
- placeholder?: undefined;
59
- mini?: undefined;
60
- } | {
61
- type: string;
62
- align: string;
63
- name: string;
64
- placeholder: string;
65
- mini: boolean;
66
- })[];
67
- bulkActions: {
68
- type: string;
69
- level: string;
70
- label: string;
71
- actionType: string;
72
- confirmText: string;
73
- id: string;
74
- api: {
75
- method: string;
76
- url: string;
77
- requestAdaptor: string;
78
- data: {
79
- ids: string;
80
- };
81
- headers: {
82
- Authorization: string;
83
- };
84
- };
85
- }[];
86
- bodyClassName: string;
87
- }) | ({
88
- mode: string;
89
- name: string;
90
- draggable: boolean;
91
- headerToolbar: string[];
92
- defaultParams: {
93
- perPage: any;
94
- };
95
- columns: {
96
- name: string;
97
- type: string;
98
- width: number;
99
- placeholder: string;
100
- }[];
101
- syncLocation: boolean;
102
- keepItemSelectionOnPageChange: boolean;
103
- checkOnItemClick: boolean;
104
- labelTpl: string;
105
- autoFillHeight: boolean;
106
- } & {
107
- type: string;
108
- primaryField: string;
109
- id: string;
110
- name: string;
111
- keepItemSelectionOnPageChange: boolean;
112
- api: {
113
- method: string;
114
- url: string;
115
- data: {
116
- orderBy: string;
117
- orderDir: string;
118
- pageNo: string;
119
- pageSize: string;
120
- query: string;
121
- };
122
- headers: {
123
- Authorization: string;
124
- };
125
- };
126
- } & {
127
- toolbar: any[];
128
- footerToolbar: string[];
129
- headerToolbar: (string | {
130
- type: string;
131
- align: string;
132
- name?: undefined;
133
- placeholder?: undefined;
134
- mini?: undefined;
135
- } | {
136
- type: string;
137
- align: string;
138
- name: string;
139
- placeholder: string;
140
- mini: boolean;
141
- })[];
142
- bulkActions: {
143
- type: string;
144
- level: string;
145
- label: string;
146
- actionType: string;
147
- confirmText: string;
148
- id: string;
149
- api: {
150
- method: string;
151
- url: string;
152
- requestAdaptor: string;
153
- data: {
154
- ids: string;
155
- };
156
- headers: {
157
- Authorization: string;
158
- };
159
- };
160
- }[];
161
- bodyClassName: string;
162
- });
12
+ body: {};
163
13
  }>;
164
- export function getObjectForm(objectSchema: any, ctx: any): Promise<{
14
+ export function getRecordDetailHeaderAmisSchema(objectSchema: any, recordId: any): Promise<{
165
15
  type: string;
166
16
  bodyClassName: string;
167
- regions: string[];
168
17
  name: string;
169
18
  data: {
170
- global: {
171
- mode: any;
172
- user: {};
173
- spaceId: any;
174
- userId: any;
175
- };
176
- recordId: any;
177
- objectName: any;
178
19
  context: {
179
20
  rootUrl: any;
180
21
  tenantId: any;
181
22
  authToken: any;
182
23
  };
183
24
  };
184
- initApi: any;
185
- initFetch: any;
186
25
  body: {
187
26
  type: string;
188
- mode: string;
189
- persistData: boolean;
190
- promptPageLeave: boolean;
191
- name: string;
192
- debug: boolean;
193
- title: string;
194
- submitText: string;
27
+ body: {
28
+ type: string;
29
+ title: string;
30
+ body: any[];
31
+ header: {
32
+ type: string;
33
+ body: {
34
+ type: string;
35
+ columns: ({
36
+ body: {
37
+ type: string;
38
+ columns: ({
39
+ body: {
40
+ type: string;
41
+ className: string;
42
+ tpl: string;
43
+ };
44
+ md: string;
45
+ className: string;
46
+ columnClassName: string;
47
+ } | {
48
+ body: ({
49
+ type: string;
50
+ tpl: string;
51
+ inline: boolean;
52
+ wrapperComponent: string;
53
+ style: {
54
+ fontFamily: string;
55
+ fontSize: number;
56
+ fontWeight?: undefined;
57
+ textAlign?: undefined;
58
+ };
59
+ className: string;
60
+ } | {
61
+ type: string;
62
+ tpl: string;
63
+ inline: boolean;
64
+ wrapperComponent: string;
65
+ style: {
66
+ fontFamily: string;
67
+ fontSize: number;
68
+ fontWeight: string;
69
+ textAlign: string;
70
+ };
71
+ className: string;
72
+ })[];
73
+ md?: undefined;
74
+ className?: undefined;
75
+ columnClassName?: undefined;
76
+ })[];
77
+ }[];
78
+ md: number;
79
+ } | {
80
+ body: any[];
81
+ md?: undefined;
82
+ })[];
83
+ }[];
84
+ size: string;
85
+ };
86
+ affixFooter: boolean;
87
+ headerClassName: string;
88
+ bodyClassName: string;
89
+ }[];
90
+ messages: {};
195
91
  api: {
196
92
  method: string;
197
93
  url: string;
198
- data: {
199
- objectName: string;
200
- $: string;
201
- recordId: string;
202
- modalName: string;
203
- };
204
- requestAdaptor: string;
205
- responseData: {
206
- recordId: string;
207
- };
208
- adaptor: string;
209
94
  headers: {
210
95
  Authorization: string;
211
96
  };
212
- };
213
- initApi: {
214
- method: string;
215
- url: string;
216
- sendOn: string;
217
- cache: number;
218
- adaptor: string;
219
97
  data: {
220
98
  query: string;
221
99
  };
222
- headers: {
223
- Authorization: string;
224
- };
100
+ sendOn: string;
101
+ requestAdaptor: string;
102
+ adaptor: string;
225
103
  };
226
- initFetch: boolean;
227
- body: {
228
- type: string;
229
- title: any;
230
- collapsable: boolean;
231
- body: ({
232
- name: any;
233
- label: any;
234
- labelRemark: any;
235
- required: any;
236
- } & {
237
- type: any;
238
- tpl: string;
239
- value: string | number | boolean;
240
- multiple: boolean;
241
- extractValue: boolean;
242
- joinValues: boolean;
243
- className: any;
244
- labelClassName: string;
245
- quickEdit: boolean;
246
- visibleOn: string;
247
- })[];
248
- }[];
249
- panelClassName: string;
250
- bodyClassName: string;
251
- className: string;
252
104
  }[];
253
105
  }>;
106
+ export function getObjectForm(objectSchema: any, ctx: any): Promise<{
107
+ type: string;
108
+ className: string;
109
+ name: string;
110
+ api: {
111
+ method: string;
112
+ url: string;
113
+ sendOn: string;
114
+ cache: number;
115
+ adaptor: string;
116
+ data: {
117
+ query: string;
118
+ };
119
+ headers: {
120
+ Authorization: string;
121
+ };
122
+ };
123
+ initApi: any;
124
+ initFetch: any;
125
+ body: {}[];
126
+ }>;
254
127
  export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Promise<{
255
128
  type: string;
256
129
  name: string;
@@ -282,7 +155,8 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
282
155
  };
283
156
  body: {
284
157
  type: string;
285
- mode: string;
158
+ mode: any;
159
+ labelAlign: any;
286
160
  persistData: boolean;
287
161
  promptPageLeave: boolean;
288
162
  name: string;
@@ -307,11 +181,12 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
307
181
  value: string | number | boolean;
308
182
  multiple: boolean;
309
183
  extractValue: boolean;
310
- joinValues: boolean;
311
184
  className: any;
312
185
  labelClassName: string;
313
186
  quickEdit: boolean;
314
187
  visibleOn: string;
188
+ } & {
189
+ clearValueOnHidden: boolean;
315
190
  })[];
316
191
  }[];
317
192
  className: string;
@@ -1,11 +1,14 @@
1
1
  export function getCreatedInfoTpl(formFactor: any): string;
2
2
  export function getModifiedInfoTpl(formFactor: any): string;
3
+ export function getNumberTpl(field: any): string;
4
+ export function getTimeTpl(field: any): string;
3
5
  export function getDateTpl(field: any): string;
4
6
  export function getDateTimeTpl(field: any): string;
5
- export function getRefObjectNameFieldName(field: any): string;
7
+ export function getRefObjectNameFieldName(field: any): Promise<any>;
6
8
  export function getSelectTpl(field: any): string;
7
9
  export function getNameTpl(field: any, ctx: any): string;
8
- export function getLookupTpl(field: any, ctx: any): string;
10
+ export function getRelatedFieldTpl(field: any, ctx: any): string;
11
+ export function getLookupTpl(field: any, ctx: any): Promise<string>;
9
12
  export function getSwitchTpl(field: any): string;
10
13
  export function getPasswordTpl(field: any): string;
11
- export function getFieldTpl(field: any, options: any): string;
14
+ export function getFieldTpl(field: any, options: any): Promise<string>;
@@ -0,0 +1 @@
1
+ export function defaultsDeep(...args: any[]): {};