@steedos-widgets/amis-lib 1.0.12 → 1.0.13

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.
@@ -6,7 +6,7 @@ export function getBaseFields(readonly: any): {
6
6
  className: string;
7
7
  tpl: string;
8
8
  }[];
9
- export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "textarea" | "table" | "email" | "html" | "picker" | "checkbox";
9
+ export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "textarea" | "picker" | "table" | "email" | "html" | "checkbox";
10
10
  export function getObjectFieldSubFields(mainField: any, fields: any): any;
11
11
  export function getGridFieldSubFields(mainField: any, fields: any): any;
12
12
  /**
@@ -51,8 +51,9 @@ export function lookupToAmisPicker(field: any, readonly: any, ctx: any): Promise
51
51
  } | {
52
52
  mode: string;
53
53
  name: string;
54
+ headerToolbarClassName: string;
55
+ className: string;
54
56
  draggable: boolean;
55
- headerToolbar: string[];
56
57
  defaultParams: {
57
58
  perPage: any;
58
59
  };
@@ -1,8 +1,9 @@
1
1
  export function getTableSchema(fields: any, options: any): Promise<{
2
2
  mode: string;
3
3
  name: string;
4
+ headerToolbarClassName: string;
5
+ className: string;
4
6
  draggable: boolean;
5
- headerToolbar: string[];
6
7
  defaultParams: {
7
8
  perPage: any;
8
9
  };
@@ -53,9 +53,7 @@ export function getObjectFieldsFilterFormSchema(objectSchema: any, fields: any,
53
53
  }>;
54
54
  export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, ctx: any): Promise<{
55
55
  type: string;
56
- data: {
57
- listViewId: string;
58
- };
56
+ data: {};
59
57
  id: string;
60
58
  dataProvider: {
61
59
  inited: string;
@@ -237,6 +235,9 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
237
235
  "&": string;
238
236
  objectName: string;
239
237
  listName: string;
238
+ listViewId: string;
239
+ uiSchema: string;
240
+ isLookup: string;
240
241
  context: string;
241
242
  fields: string;
242
243
  };
@@ -277,4 +278,3 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
277
278
  };
278
279
  };
279
280
  }>;
280
- export function resetLocalListViewPropsWithSearchableFields(listViewId: any, searchableFields: any): void;
@@ -99,6 +99,11 @@ export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: a
99
99
  icon: string;
100
100
  className: string;
101
101
  onEvent: {
102
+ /**
103
+ * 列表视图顶部第一行amisSchema
104
+ * @param {*} objectSchema 对象UISchema
105
+ * @returns amisSchema
106
+ */
102
107
  click: {
103
108
  actions: {
104
109
  actionType: string;
@@ -128,9 +133,7 @@ export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: a
128
133
  */
129
134
  export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewName: any, ctx: any): Promise<{
130
135
  type: string;
131
- data: {
132
- listViewId: string;
133
- };
136
+ data: {};
134
137
  id: string;
135
138
  dataProvider: {
136
139
  inited: string;
@@ -312,6 +315,9 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
312
315
  "&": string;
313
316
  objectName: string;
314
317
  listName: string;
318
+ listViewId: string;
319
+ uiSchema: string;
320
+ isLookup: string;
315
321
  context: string;
316
322
  fields: string;
317
323
  };
@@ -359,7 +365,7 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
359
365
  */
360
366
  export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: any): Promise<{
361
367
  type: string;
362
- body: ({
368
+ body: {
363
369
  type: string;
364
370
  columns: ({
365
371
  body: {
@@ -424,53 +430,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
424
430
  valign: string;
425
431
  })[];
426
432
  className: string;
427
- } | {
428
- type: string;
429
- columns: ({
430
- body: {
431
- type: string;
432
- tpl: string;
433
- visibleOn: string;
434
- inline: boolean;
435
- wrapperComponent: string;
436
- className: string;
437
- style: {
438
- fontFamily: string;
439
- fontSize: number;
440
- };
441
- id: string;
442
- }[];
443
- md: string;
444
- columnClassName: string;
445
- } | {
446
- body: ({
447
- type: string;
448
- label: string;
449
- icon: string;
450
- className: string;
451
- onEvent: {
452
- click: {
453
- actions: {
454
- actionType: string;
455
- args: {
456
- eventName: string;
457
- };
458
- }[];
459
- };
460
- };
461
- } | {
462
- type: string;
463
- label: string;
464
- icon: string;
465
- actionType: string;
466
- target: string;
467
- className: string;
468
- })[];
469
- md: string;
470
- columnClassName?: undefined;
471
- })[];
472
- className: string;
473
- })[];
433
+ }[];
474
434
  className: string;
475
435
  }[]>;
476
436
  /**
@@ -0,0 +1,289 @@
1
+ export function getObjectHeaderToolbar(mainObject: any, formFactor: any): (string | {
2
+ type: string;
3
+ align: string;
4
+ name?: undefined;
5
+ placeholder?: undefined;
6
+ mini?: undefined;
7
+ } | {
8
+ type: string;
9
+ align: string;
10
+ name: string;
11
+ placeholder: string;
12
+ mini: boolean;
13
+ })[] | (string | {
14
+ type: string;
15
+ className: string;
16
+ tpl?: undefined;
17
+ align?: undefined;
18
+ label?: undefined;
19
+ icon?: undefined;
20
+ onEvent?: undefined;
21
+ } | {
22
+ type: string;
23
+ tpl: string;
24
+ className?: undefined;
25
+ align?: undefined;
26
+ label?: undefined;
27
+ icon?: undefined;
28
+ onEvent?: undefined;
29
+ } | {
30
+ type: string;
31
+ align: string;
32
+ className: string;
33
+ tpl?: undefined;
34
+ label?: undefined;
35
+ icon?: undefined;
36
+ onEvent?: undefined;
37
+ } | {
38
+ label: string;
39
+ icon: string;
40
+ type: string;
41
+ align: string;
42
+ className: string;
43
+ onEvent: {
44
+ click: {
45
+ actions: {
46
+ actionType: string;
47
+ args: {
48
+ eventName: string;
49
+ };
50
+ }[];
51
+ };
52
+ };
53
+ tpl?: undefined;
54
+ })[];
55
+ export function getObjectFooterToolbar(): string[];
56
+ export function getObjectFilter(objectSchema: any, fields: any, options: any): Promise<{
57
+ title: string;
58
+ submitText: string;
59
+ className: string;
60
+ mode: string;
61
+ wrapWithPanel: boolean;
62
+ body: {
63
+ type: string;
64
+ data: {};
65
+ id: string;
66
+ dataProvider: {
67
+ inited: string;
68
+ };
69
+ body: {
70
+ type: string;
71
+ body: {
72
+ type: string;
73
+ body: ({
74
+ type: string;
75
+ body: {
76
+ title: string;
77
+ type: string;
78
+ name: string;
79
+ id: string;
80
+ mode: string;
81
+ wrapWithPanel: boolean;
82
+ className: string;
83
+ data: any;
84
+ body: ({
85
+ name: any;
86
+ label: any;
87
+ labelRemark: any;
88
+ required: any;
89
+ } & {
90
+ type: any;
91
+ tpl: string;
92
+ value: string | number | boolean;
93
+ multiple: boolean;
94
+ extractValue: boolean;
95
+ className: any;
96
+ labelClassName: string;
97
+ quickEdit: boolean;
98
+ visibleOn: string;
99
+ } & {
100
+ clearValueOnHidden: boolean;
101
+ fieldName: any;
102
+ })[];
103
+ onEvent: {
104
+ broadcastSearchableFieldsChange: {
105
+ actions: {
106
+ actionType: string;
107
+ script: string;
108
+ }[];
109
+ };
110
+ };
111
+ }[];
112
+ size: string;
113
+ visibleOn: string;
114
+ className: string;
115
+ } | {
116
+ type: string;
117
+ body: {
118
+ type: string;
119
+ body: ({
120
+ type: string;
121
+ label: string;
122
+ icon: string;
123
+ visibleOn: string;
124
+ onEvent: {
125
+ click: {
126
+ actions: {
127
+ actionType: string;
128
+ script: string;
129
+ }[];
130
+ };
131
+ };
132
+ id?: undefined;
133
+ level?: undefined;
134
+ } | {
135
+ type: string;
136
+ label: string;
137
+ onEvent: {
138
+ click: {
139
+ actions: {
140
+ actionType: string;
141
+ dialog: {
142
+ type: string;
143
+ size: string;
144
+ title: string;
145
+ body: {
146
+ type: string;
147
+ title: string;
148
+ body: {
149
+ label: string;
150
+ type: string;
151
+ name: string;
152
+ id: string;
153
+ source: {
154
+ method: string;
155
+ url: string;
156
+ dataType: string;
157
+ headers: {
158
+ Authorization: string;
159
+ };
160
+ data: any;
161
+ requestAdaptor: string;
162
+ adaptor: string;
163
+ };
164
+ options: any[];
165
+ required: boolean;
166
+ placeholder: string;
167
+ className: string;
168
+ checkAll: boolean;
169
+ searchable: boolean;
170
+ sortable: boolean;
171
+ joinValues: boolean;
172
+ extractValue: boolean;
173
+ multiple: boolean;
174
+ }[];
175
+ id: string;
176
+ mode: string;
177
+ persistData: boolean;
178
+ promptPageLeave: boolean;
179
+ name: string;
180
+ debug: boolean;
181
+ actions: any[];
182
+ panelClassName: string;
183
+ bodyClassName: string;
184
+ className: string;
185
+ }[];
186
+ id: string;
187
+ actions: ({
188
+ type: string;
189
+ label: string;
190
+ onEvent: {
191
+ click: {
192
+ actions: {
193
+ componentId: string;
194
+ args: {};
195
+ actionType: string;
196
+ }[];
197
+ };
198
+ };
199
+ id: string;
200
+ level?: undefined;
201
+ } | {
202
+ type: string;
203
+ label: string;
204
+ onEvent: {
205
+ click: {
206
+ actions: ({
207
+ actionType: string;
208
+ script: string;
209
+ eventName?: undefined;
210
+ args?: undefined;
211
+ data?: undefined;
212
+ componentId?: undefined;
213
+ } | {
214
+ actionType: string;
215
+ eventName: string;
216
+ args: {
217
+ eventName: string;
218
+ };
219
+ data: {
220
+ fields: string;
221
+ };
222
+ script?: undefined;
223
+ componentId?: undefined;
224
+ } | {
225
+ componentId: string;
226
+ args: {
227
+ eventName?: undefined;
228
+ };
229
+ actionType: string;
230
+ script?: undefined;
231
+ eventName?: undefined;
232
+ data?: undefined;
233
+ })[];
234
+ };
235
+ };
236
+ id: string;
237
+ level: string;
238
+ })[];
239
+ closeOnEsc: boolean;
240
+ closeOnOutside: boolean;
241
+ showCloseButton: boolean;
242
+ data: {
243
+ "&": string;
244
+ objectName: string;
245
+ listName: string;
246
+ listViewId: string;
247
+ uiSchema: string;
248
+ isLookup: string;
249
+ context: string;
250
+ fields: string;
251
+ };
252
+ };
253
+ }[];
254
+ };
255
+ };
256
+ id: string;
257
+ level: string;
258
+ icon?: undefined;
259
+ visibleOn?: undefined;
260
+ })[];
261
+ size: string;
262
+ className: string;
263
+ };
264
+ size: string;
265
+ className: string;
266
+ visibleOn?: undefined;
267
+ })[];
268
+ size: string;
269
+ className: string;
270
+ };
271
+ size: string;
272
+ className: string;
273
+ visibleOn: string;
274
+ };
275
+ className: string;
276
+ onEvent: {
277
+ broadcast_toggle_fields_filter: {
278
+ actions: {
279
+ actionType: string;
280
+ args: {
281
+ value: {
282
+ showFieldsFilter: string;
283
+ };
284
+ };
285
+ }[];
286
+ };
287
+ };
288
+ }[];
289
+ }>;
@@ -47,12 +47,22 @@ export function getRecordPageInitSchema(objectApiName: any): Promise<{
47
47
  recordId: string;
48
48
  onEvent: {
49
49
  recordLoaded: {
50
- actions: {
50
+ actions: ({
51
51
  actionType: string;
52
52
  data: {
53
53
  name: string;
54
54
  };
55
- }[];
55
+ args?: undefined;
56
+ } | {
57
+ actionType: string;
58
+ args: {
59
+ value: {
60
+ record: string;
61
+ recordLoaded: boolean;
62
+ };
63
+ };
64
+ data?: undefined;
65
+ })[];
56
66
  };
57
67
  };
58
68
  }[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@steedos-widgets/amis-lib",
3
3
  "private": false,
4
- "version": "1.0.12",
4
+ "version": "1.0.13",
5
5
  "unpkg": "./dist/index.umd.js",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",
@@ -58,5 +58,5 @@
58
58
  "dependencies": {
59
59
  "lodash": "^4.17.21"
60
60
  },
61
- "gitHead": "74590cccd4cad3a13c0a87256980bb00f95dadad"
61
+ "gitHead": "5f34d26253773fbc70e82a8d9539f556e6afc08c"
62
62
  }