@steedos-widgets/amis-lib 1.0.21 → 1.0.23

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,9 @@ 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/router';
21
22
  export * from './lib/assets';
22
23
  export * from './utils/object';
23
24
  export * from './render';
24
25
  export * from './workflow';
26
+ export * from './lib/router';
@@ -15,6 +15,15 @@ export function getObjectFieldsFilterButtonSchema(objectSchema: any): Promise<{
15
15
  };
16
16
  }>;
17
17
  export function getObjectFieldsFilterFormSchema(objectSchema: any, fields: any, ctx: any): Promise<{
18
+ type: any;
19
+ tpl: string;
20
+ value: string | number | boolean;
21
+ multiple: boolean;
22
+ extractValue: boolean;
23
+ className: any;
24
+ quickEdit: boolean;
25
+ visibleOn: string;
26
+ }[] | {
18
27
  title: string;
19
28
  type: string;
20
29
  name: string;
@@ -23,16 +32,7 @@ export function getObjectFieldsFilterFormSchema(objectSchema: any, fields: any,
23
32
  wrapWithPanel: boolean;
24
33
  className: string;
25
34
  data: any;
26
- body: {
27
- type: any;
28
- tpl: string;
29
- value: string | number | boolean;
30
- multiple: boolean;
31
- extractValue: boolean;
32
- className: any;
33
- quickEdit: boolean;
34
- visibleOn: string;
35
- }[];
35
+ body: any[];
36
36
  }>;
37
37
  export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, ctx: any): Promise<{
38
38
  type: string;
@@ -48,7 +48,16 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
48
48
  type: string;
49
49
  body: ({
50
50
  type: string;
51
- body: {
51
+ body: ({
52
+ type: any;
53
+ tpl: string;
54
+ value: string | number | boolean;
55
+ multiple: boolean;
56
+ extractValue: boolean;
57
+ className: any;
58
+ quickEdit: boolean;
59
+ visibleOn: string;
60
+ }[] | {
52
61
  title: string;
53
62
  type: string;
54
63
  name: string;
@@ -57,17 +66,8 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
57
66
  wrapWithPanel: boolean;
58
67
  className: string;
59
68
  data: any;
60
- body: {
61
- type: any;
62
- tpl: string;
63
- value: string | number | boolean;
64
- multiple: boolean;
65
- extractValue: boolean;
66
- className: any;
67
- quickEdit: boolean;
68
- visibleOn: string;
69
- }[];
70
- }[];
69
+ body: any[];
70
+ })[];
71
71
  size: string;
72
72
  visibleOn: string;
73
73
  className: string;
@@ -145,7 +145,16 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
145
145
  type: string;
146
146
  body: ({
147
147
  type: string;
148
- body: {
148
+ body: ({
149
+ type: any;
150
+ tpl: string;
151
+ value: string | number | boolean;
152
+ multiple: boolean;
153
+ extractValue: boolean;
154
+ className: any;
155
+ quickEdit: boolean;
156
+ visibleOn: string;
157
+ }[] | {
149
158
  title: string;
150
159
  type: string;
151
160
  name: string;
@@ -154,17 +163,8 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
154
163
  wrapWithPanel: boolean;
155
164
  className: string;
156
165
  data: any;
157
- body: {
158
- type: any;
159
- tpl: string;
160
- value: string | number | boolean;
161
- multiple: boolean;
162
- extractValue: boolean;
163
- className: any;
164
- quickEdit: boolean;
165
- visibleOn: string;
166
- }[];
167
- }[];
166
+ body: any[];
167
+ })[];
168
168
  size: string;
169
169
  visibleOn: string;
170
170
  className: string;
@@ -1,4 +1,4 @@
1
- export function getObjectList(objectSchema: any, fields: any, options: any): Promise<{
1
+ export function getObjectCRUD(objectSchema: any, fields: any, options: any): Promise<{
2
2
  type: string;
3
3
  className: string;
4
4
  id: string;
@@ -82,7 +82,16 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
82
82
  type: string;
83
83
  body: ({
84
84
  type: string;
85
- body: {
85
+ body: ({
86
+ type: any;
87
+ tpl: string;
88
+ value: string | number | boolean;
89
+ multiple: boolean;
90
+ extractValue: boolean;
91
+ className: any;
92
+ quickEdit: boolean;
93
+ visibleOn: string;
94
+ }[] | {
86
95
  title: string;
87
96
  type: string;
88
97
  name: string;
@@ -91,17 +100,8 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
91
100
  wrapWithPanel: boolean;
92
101
  className: string;
93
102
  data: any;
94
- body: {
95
- type: any;
96
- tpl: string;
97
- value: string | number | boolean;
98
- multiple: boolean;
99
- extractValue: boolean;
100
- className: any;
101
- quickEdit: boolean;
102
- visibleOn: string;
103
- }[];
104
- }[];
103
+ body: any[];
104
+ })[];
105
105
  size: string;
106
106
  visibleOn: string;
107
107
  className: string;
@@ -7,16 +7,7 @@ export function getFormSchema(objectName: any, ctx: any): Promise<{
7
7
  uiSchema: any;
8
8
  amisSchema: {
9
9
  type: 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
- */
10
+ className: string;
20
11
  name: string;
21
12
  api: {
22
13
  method: string;
@@ -387,6 +378,23 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
387
378
  amisSchema: {
388
379
  type: string;
389
380
  body: ({
381
+ type: string;
382
+ className: string;
383
+ tabs: {
384
+ title: string;
385
+ className: string;
386
+ body: {
387
+ type: string;
388
+ label: string;
389
+ objectApiName: string;
390
+ recordId: string;
391
+ id: string;
392
+ appId: any;
393
+ }[];
394
+ id: string;
395
+ }[];
396
+ id: string;
397
+ } | {
390
398
  type: string;
391
399
  label: string;
392
400
  objectApiName: string;
@@ -404,29 +412,6 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
404
412
  }[];
405
413
  };
406
414
  };
407
- className?: undefined;
408
- tabs?: undefined;
409
- } | {
410
- type: string;
411
- className: string;
412
- tabs: {
413
- title: string;
414
- className: string;
415
- body: {
416
- type: string;
417
- label: string;
418
- objectApiName: string;
419
- recordId: string;
420
- id: string;
421
- appId: any;
422
- }[];
423
- id: string;
424
- }[];
425
- id: string;
426
- label?: undefined;
427
- objectApiName?: undefined;
428
- recordId?: undefined;
429
- onEvent?: undefined;
430
415
  })[];
431
416
  };
432
417
  }>;
@@ -477,6 +462,15 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
477
462
  masterObjectUISchema: any;
478
463
  }>;
479
464
  export function getSearchableFieldsFilterSchema(objectSchema: any, fields: any, ctx: any): Promise<{
465
+ type: any;
466
+ tpl: string;
467
+ value: string | number | boolean;
468
+ multiple: boolean;
469
+ extractValue: boolean;
470
+ className: any;
471
+ quickEdit: boolean;
472
+ visibleOn: string;
473
+ }[] | {
480
474
  title: string;
481
475
  type: string;
482
476
  name: string;
@@ -485,15 +479,6 @@ export function getSearchableFieldsFilterSchema(objectSchema: any, fields: any,
485
479
  wrapWithPanel: boolean;
486
480
  className: string;
487
481
  data: any;
488
- body: {
489
- type: any;
490
- tpl: string;
491
- value: string | number | boolean;
492
- multiple: boolean;
493
- extractValue: boolean;
494
- className: any;
495
- quickEdit: boolean;
496
- visibleOn: string;
497
- }[];
482
+ body: any[];
498
483
  }>;
499
484
  export function setUISchemaFunction(fun: any): void;
@@ -1,4 +1,4 @@
1
- export function getObjectRelatedList(appName: any, objectName: any, recordId: any, formFactor: any): Promise<({
1
+ export function getObjectRelatedList(objectName: any, recordId: any, formFactor: any): Promise<({
2
2
  masterObjectName: any;
3
3
  object_name: any;
4
4
  foreign_key: any;
@@ -20,6 +20,17 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
20
20
  page_size?: undefined;
21
21
  })[]>;
22
22
  export function getRecordDetailRelatedListSchema(objectName: any, recordId: any, relatedObjectName: any, relatedKey: any, ctx: any): Promise<{
23
+ uiSchema: any;
24
+ amisSchema: {
25
+ type: string;
26
+ body: string;
27
+ level: string;
28
+ showIcon: boolean;
29
+ className: string;
30
+ id?: undefined;
31
+ data?: undefined;
32
+ };
33
+ } | {
23
34
  uiSchema: any;
24
35
  amisSchema: {
25
36
  type: string;
@@ -56,9 +67,11 @@ export function getRecordDetailRelatedListSchema(objectName: any, recordId: any,
56
67
  sort: string;
57
68
  ctx: any;
58
69
  }[];
70
+ level?: undefined;
71
+ showIcon?: undefined;
59
72
  };
60
73
  }>;
61
- export function getRelatedListSchema(appName: any, objectName: any, listViewName: any, ctx: any): Promise<{
74
+ export function getRelatedListSchema(objectName: any, listViewName: any, ctx: any): Promise<{
62
75
  uiSchema: any;
63
76
  amisSchema: {
64
77
  type: string;
@@ -1,4 +1,8 @@
1
1
  export namespace Router {
2
+ function getTabDisplayAs(tab_id: any): string;
3
+ function getTabDisplayAs(tab_id: any): string;
4
+ function setTabDisplayAs(tab_id: any, displayAs: any): void;
5
+ function setTabDisplayAs(tab_id: any, displayAs: any): void;
2
6
  function getAppPath({ formFactor, appId }: {
3
7
  formFactor: any;
4
8
  appId: any;
@@ -145,7 +145,7 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
145
145
  minRows: number;
146
146
  maxRows: number;
147
147
  placeholder: string;
148
- required: string;
148
+ requiredOn: string;
149
149
  })[];
150
150
  onEvent: {
151
151
  approve_judge_change: {
@@ -208,6 +208,10 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
208
208
  url: string;
209
209
  method: string;
210
210
  dataType: string;
211
+ data: {
212
+ "&": string;
213
+ $scopeId: string;
214
+ };
211
215
  headers: {
212
216
  Authorization: string;
213
217
  };
@@ -226,13 +230,19 @@ export function getApprovalDrawerSchema(instance: any): Promise<{
226
230
  componentId: string;
227
231
  args: {
228
232
  blank: boolean;
229
- url: string;
233
+ url: any;
230
234
  api?: undefined;
231
235
  messages?: undefined;
232
236
  };
233
237
  actionType: string;
234
238
  expression: string;
235
239
  script?: undefined;
240
+ } | {
241
+ actionType: string;
242
+ expression: string;
243
+ componentId?: undefined;
244
+ args?: undefined;
245
+ script?: undefined;
236
246
  })[];
237
247
  };
238
248
  };
@@ -9,7 +9,6 @@ export function getFlowFormSchema(instance: any, box: any): Promise<{
9
9
  recordId: any;
10
10
  id: string;
11
11
  showRecordTitle: boolean;
12
- recordLoaded: boolean;
13
12
  className: string;
14
13
  };
15
14
  css: {
@@ -342,7 +341,7 @@ export function getFlowFormSchema(instance: any, box: any): Promise<{
342
341
  minRows: number;
343
342
  maxRows: number;
344
343
  placeholder: string;
345
- required: string;
344
+ requiredOn: string;
346
345
  })[];
347
346
  onEvent: {
348
347
  approve_judge_change: {
@@ -405,6 +404,10 @@ export function getFlowFormSchema(instance: any, box: any): Promise<{
405
404
  url: string;
406
405
  method: string;
407
406
  dataType: string;
407
+ data: {
408
+ "&": string;
409
+ $scopeId: string;
410
+ };
408
411
  headers: {
409
412
  Authorization: string;
410
413
  };
@@ -423,13 +426,19 @@ export function getFlowFormSchema(instance: any, box: any): Promise<{
423
426
  componentId: string;
424
427
  args: {
425
428
  blank: boolean;
426
- url: string;
429
+ url: any;
427
430
  api?: undefined;
428
431
  messages?: undefined;
429
432
  };
430
433
  actionType: string;
431
434
  expression: string;
432
435
  script?: undefined;
436
+ } | {
437
+ actionType: string;
438
+ expression: string;
439
+ componentId?: undefined;
440
+ args?: undefined;
441
+ script?: undefined;
433
442
  })[];
434
443
  };
435
444
  };
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.21",
4
+ "version": "1.0.23",
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": "538aecea229da62cc88855d2092acfd8afae8204"
61
+ "gitHead": "7e677e42f62ee3e69343c7738110117897f50a54"
62
62
  }