@steedos-widgets/amis-lib 1.2.8 → 1.2.9

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 (25) hide show
  1. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  2. package/dist/index.cjs.js +1228 -753
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +1229 -755
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.umd.js +1228 -753
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/types/lib/buttons.d.ts +44 -1
  9. package/dist/types/lib/converter/amis/fields/index.d.ts +1 -0
  10. package/dist/types/lib/converter/amis/fields_filter.d.ts +3 -1
  11. package/dist/types/lib/converter/amis/header.d.ts +80 -5
  12. package/dist/types/lib/converter/amis/index.d.ts +1 -0
  13. package/dist/types/lib/converter/amis/toolbar.d.ts +3 -1
  14. package/dist/types/lib/converter/amis/toolbars/export_excel.d.ts +32 -0
  15. package/dist/types/lib/converter/amis/toolbars/setting_listview/columns.d.ts +83 -0
  16. package/dist/types/lib/converter/amis/toolbars/setting_listview/copy.d.ts +112 -0
  17. package/dist/types/lib/converter/amis/toolbars/setting_listview/delete.d.ts +43 -0
  18. package/dist/types/lib/converter/amis/toolbars/setting_listview/filters.d.ts +68 -0
  19. package/dist/types/lib/converter/amis/toolbars/setting_listview/new.d.ts +116 -0
  20. package/dist/types/lib/converter/amis/toolbars/setting_listview/rename.d.ts +47 -0
  21. package/dist/types/lib/converter/amis/toolbars/setting_listview/share.d.ts +34 -0
  22. package/dist/types/lib/converter/amis/toolbars/setting_listview/sort.d.ts +69 -0
  23. package/dist/types/lib/converter/amis/toolbars/setting_listview.d.ts +509 -0
  24. package/dist/types/lib/objects.d.ts +36 -2
  25. package/package.json +2 -2
@@ -8,7 +8,7 @@ export function getListViewButtons(uiSchema: any, ctx: any): any[];
8
8
  export function getObjectDetailButtons(uiSchema: any, ctx: any): any[];
9
9
  export function getObjectDetailMoreButtons(uiSchema: any, ctx: any): any[];
10
10
  export function getListViewItemButtons(uiSchema: any, ctx: any): Promise<any[]>;
11
- export function getObjectRelatedListButtons(uiSchema: any, ctx: any): Promise<any[]>;
11
+ export function getObjectRelatedListButtons(uiSchema: any, ctx: any): any[];
12
12
  export function getButton(objectName: any, buttonName: any, ctx: any): Promise<any>;
13
13
  export function execute(button: any, props: any): any;
14
14
  export function executeButton(button: any, props: any): any;
@@ -103,3 +103,46 @@ export function getObjectListViewButtonsSchemas(objectSchema: any, ctx: any): {
103
103
  };
104
104
  id: string;
105
105
  };
106
+ export function getObjectRecordDetailRelatedListButtonsSchemas(objectSchema: any, ctx: any): {
107
+ type: string;
108
+ name: any;
109
+ objectName: any;
110
+ visibleOn: any;
111
+ className: string;
112
+ }[] | {
113
+ type: string;
114
+ icon: string;
115
+ onEvent: {
116
+ click: {
117
+ actions: {
118
+ actionType: string;
119
+ drawer: {
120
+ type: string;
121
+ title: string;
122
+ body: {
123
+ type: string;
124
+ vertical: boolean;
125
+ tiled: boolean;
126
+ buttons: {
127
+ type: string;
128
+ name: any;
129
+ objectName: any;
130
+ visibleOn: any;
131
+ className: string;
132
+ }[];
133
+ btnLevel: string;
134
+ className: string;
135
+ btnClassName: string;
136
+ size: string;
137
+ }[];
138
+ position: string;
139
+ closeOnOutside: boolean;
140
+ resizable: boolean;
141
+ className: string;
142
+ bodyClassName: string;
143
+ actions: any[];
144
+ };
145
+ }[];
146
+ };
147
+ };
148
+ };
@@ -18,5 +18,6 @@ export function getPermissionFields(object: any, userSession: any): any[];
18
18
  export function getSelectFieldOptions(field: any): any[];
19
19
  export function convertSFieldToAmisField(field: any, readonly: any, ctx: any): Promise<any>;
20
20
  export function getFieldSearchable(perField: any, permissionFields: any, ctx: any): Promise<any>;
21
+ export function isFieldTypeSearchable(fieldType: any): boolean;
21
22
  export const OMIT_FIELDS: string[];
22
23
  export { getAmisStaticFieldType } from "./type";
@@ -122,7 +122,9 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, ctx: any): Pro
122
122
  headers: {
123
123
  Authorization: string;
124
124
  };
125
- data: any;
125
+ data: {
126
+ $self: string;
127
+ };
126
128
  requestAdaptor: string;
127
129
  adaptor: string;
128
130
  };
@@ -29,6 +29,7 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
29
29
  rightIcon?: undefined;
30
30
  size?: undefined;
31
31
  hideCaret?: undefined;
32
+ closeOnClick?: undefined;
32
33
  btnClassName?: undefined;
33
34
  buttons?: undefined;
34
35
  } | {
@@ -38,6 +39,7 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
38
39
  rightIcon: string;
39
40
  size: string;
40
41
  hideCaret: boolean;
42
+ closeOnClick: boolean;
41
43
  btnClassName: string;
42
44
  buttons: any[];
43
45
  tpl?: undefined;
@@ -255,7 +257,9 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
255
257
  headers: {
256
258
  Authorization: string;
257
259
  };
258
- data: any;
260
+ data: {
261
+ $self: string;
262
+ };
259
263
  requestAdaptor: string;
260
264
  adaptor: string;
261
265
  };
@@ -388,6 +392,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
388
392
  rightIcon?: undefined;
389
393
  size?: undefined;
390
394
  hideCaret?: undefined;
395
+ closeOnClick?: undefined;
391
396
  btnClassName?: undefined;
392
397
  buttons?: undefined;
393
398
  } | {
@@ -397,6 +402,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
397
402
  rightIcon: string;
398
403
  size: string;
399
404
  hideCaret: boolean;
405
+ closeOnClick: boolean;
400
406
  btnClassName: string;
401
407
  buttons: any[];
402
408
  tpl?: undefined;
@@ -496,11 +502,44 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
496
502
  body: {
497
503
  type: string;
498
504
  columns: ({
499
- body: {
505
+ body: ({
506
+ type: string;
507
+ onEvent: {
508
+ "@history_paths.changed": {
509
+ actions: {
510
+ actionType: string;
511
+ }[];
512
+ };
513
+ };
514
+ body: {
515
+ type: string;
516
+ visibleOn: string;
517
+ className: string;
518
+ onEvent: {
519
+ click: {
520
+ actions: {
521
+ actionType: string;
522
+ script: string;
523
+ }[];
524
+ };
525
+ };
526
+ body: {
527
+ type: string;
528
+ category: string;
529
+ name: string;
530
+ colorVariant: string;
531
+ className: string;
532
+ }[];
533
+ }[];
534
+ className?: undefined;
535
+ tpl?: undefined;
536
+ } | {
500
537
  type: string;
501
538
  className: string;
502
539
  tpl: string;
503
- };
540
+ onEvent?: undefined;
541
+ body?: undefined;
542
+ })[];
504
543
  md: string;
505
544
  className: string;
506
545
  columnClassName: string;
@@ -581,7 +620,7 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
581
620
  * @param {*} relatedObjectSchema 相关对象UISchema
582
621
  * @returns amisSchema
583
622
  */
584
- export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any, relatedLabel: any): Promise<{
623
+ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any, relatedLabel: any, ctx: any): Promise<{
585
624
  type: string;
586
625
  body: {
587
626
  type: string;
@@ -625,7 +664,43 @@ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any,
625
664
  objectName: any;
626
665
  visibleOn: any;
627
666
  className: string;
628
- }[];
667
+ }[] | {
668
+ type: string;
669
+ icon: string;
670
+ onEvent: {
671
+ click: {
672
+ actions: {
673
+ actionType: string;
674
+ drawer: {
675
+ type: string;
676
+ title: string;
677
+ body: {
678
+ type: string;
679
+ vertical: boolean;
680
+ tiled: boolean;
681
+ buttons: {
682
+ type: string;
683
+ name: any;
684
+ objectName: any;
685
+ visibleOn: any;
686
+ className: string;
687
+ }[];
688
+ btnLevel: string;
689
+ className: string;
690
+ btnClassName: string;
691
+ size: string;
692
+ }[];
693
+ position: string;
694
+ closeOnOutside: boolean;
695
+ resizable: boolean;
696
+ className: string;
697
+ bodyClassName: string;
698
+ actions: any[];
699
+ };
700
+ }[];
701
+ };
702
+ };
703
+ };
629
704
  };
630
705
  md: string;
631
706
  })[];
@@ -4,6 +4,7 @@ export function getObjectCRUD(objectSchema: any, fields: any, options: any): Pro
4
4
  id: string;
5
5
  name: string;
6
6
  data: {
7
+ objectName: any;
7
8
  recordPermissions: any;
8
9
  uiSchema: any;
9
10
  };
@@ -101,7 +101,9 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
101
101
  headers: {
102
102
  Authorization: string;
103
103
  };
104
- data: any;
104
+ data: {
105
+ $self: string;
106
+ };
105
107
  requestAdaptor: string;
106
108
  adaptor: string;
107
109
  };
@@ -0,0 +1,32 @@
1
+ export function getExportExcelToolbarButtonSchema(): {
2
+ type: string;
3
+ icon: string;
4
+ align: string;
5
+ className: string;
6
+ tooltipPlacement: string;
7
+ visibleOn: string;
8
+ tooltip: string;
9
+ onEvent: {
10
+ click: {
11
+ weight: number;
12
+ actions: {
13
+ args: {
14
+ api: {
15
+ url: string;
16
+ method: string;
17
+ messages: {};
18
+ requestAdaptor: string;
19
+ data: {
20
+ uiSchema: string;
21
+ listName: string;
22
+ };
23
+ headers: {
24
+ Authorization: string;
25
+ };
26
+ };
27
+ };
28
+ actionType: string;
29
+ }[];
30
+ };
31
+ };
32
+ };
@@ -0,0 +1,83 @@
1
+ export function getSetListviewColumnsButtonSchema(): {
2
+ type: string;
3
+ label: string;
4
+ disabledOn: string;
5
+ onEvent: {
6
+ click: {
7
+ weight: number;
8
+ actions: {
9
+ args: {};
10
+ dialog: {
11
+ type: string;
12
+ title: string;
13
+ data: {
14
+ "&": string;
15
+ targetObjectName: string;
16
+ recordId: string;
17
+ listName: string;
18
+ appId: string;
19
+ };
20
+ body: {
21
+ type: string;
22
+ label: string;
23
+ objectApiName: string;
24
+ recordId: string;
25
+ mode: string;
26
+ fieldsExtend: {
27
+ columns: {
28
+ amis: {
29
+ type: string;
30
+ sortable: boolean;
31
+ searchable: boolean;
32
+ source: {
33
+ method: string;
34
+ url: string;
35
+ headers: {
36
+ Authorization: string;
37
+ };
38
+ };
39
+ };
40
+ };
41
+ mobile_columns: {
42
+ group: string;
43
+ amis: {
44
+ type: string;
45
+ sortable: boolean;
46
+ searchable: boolean;
47
+ source: {
48
+ method: string;
49
+ url: string;
50
+ headers: {
51
+ Authorization: string;
52
+ };
53
+ };
54
+ };
55
+ };
56
+ };
57
+ initApiAdaptor: string;
58
+ apiRequestAdaptor: string;
59
+ fields: string[];
60
+ onEvent: {
61
+ submitSucc: {
62
+ weight: number;
63
+ actions: {
64
+ args: {
65
+ url: string;
66
+ blank: boolean;
67
+ };
68
+ actionType: string;
69
+ }[];
70
+ };
71
+ };
72
+ }[];
73
+ searchable: boolean;
74
+ showCloseButton: boolean;
75
+ showErrorMsg: boolean;
76
+ showLoading: boolean;
77
+ size: string;
78
+ };
79
+ actionType: string;
80
+ }[];
81
+ };
82
+ };
83
+ };
@@ -0,0 +1,112 @@
1
+ export function getCopyListviewButtonSchema(): {
2
+ type: string;
3
+ label: string;
4
+ onEvent: {
5
+ click: {
6
+ weight: number;
7
+ actions: {
8
+ dialog: {
9
+ type: string;
10
+ title: string;
11
+ data: {
12
+ "&": string;
13
+ listName: string;
14
+ targetObjectName: string;
15
+ list_view: string;
16
+ appId: string;
17
+ global: string;
18
+ };
19
+ body: {
20
+ type: string;
21
+ label: string;
22
+ objectApiName: string;
23
+ recordId: string;
24
+ mode: string;
25
+ defaultData: {
26
+ "&": string;
27
+ name: string;
28
+ label: string;
29
+ shared: boolean;
30
+ };
31
+ fieldsExtend: {
32
+ label: {
33
+ is_wide: boolean;
34
+ };
35
+ name: {
36
+ is_wide: boolean;
37
+ amis: {
38
+ hidden: boolean;
39
+ };
40
+ };
41
+ object_name: {
42
+ amis: {
43
+ hidden: boolean;
44
+ };
45
+ };
46
+ filter_scope: {
47
+ amis: {
48
+ hidden: boolean;
49
+ };
50
+ };
51
+ columns: {
52
+ amis: {
53
+ hidden: boolean;
54
+ };
55
+ };
56
+ filter_fields: {
57
+ amis: {
58
+ hidden: boolean;
59
+ };
60
+ };
61
+ scrolling_mode: {
62
+ amis: {
63
+ hidden: boolean;
64
+ };
65
+ };
66
+ sort: {
67
+ amis: {
68
+ hidden: boolean;
69
+ };
70
+ };
71
+ show_count: {
72
+ amis: {
73
+ hidden: boolean;
74
+ };
75
+ };
76
+ type: {
77
+ amis: {
78
+ hidden: boolean;
79
+ };
80
+ };
81
+ shared: {
82
+ amis: {
83
+ visibleOn: string;
84
+ };
85
+ };
86
+ };
87
+ fields: string[];
88
+ onEvent: {
89
+ submitSucc: {
90
+ weight: number;
91
+ actions: {
92
+ args: {
93
+ url: string;
94
+ blank: boolean;
95
+ };
96
+ actionType: string;
97
+ }[];
98
+ };
99
+ };
100
+ }[];
101
+ showCloseButton: boolean;
102
+ showErrorMsg: boolean;
103
+ showLoading: boolean;
104
+ closeOnEsc: boolean;
105
+ dataMapSwitch: boolean;
106
+ size: string;
107
+ };
108
+ actionType: string;
109
+ }[];
110
+ };
111
+ };
112
+ };
@@ -0,0 +1,43 @@
1
+ export function getDeleteListviewButtonSchema(): {
2
+ type: string;
3
+ label: string;
4
+ disabledOn: string;
5
+ confirmText: string;
6
+ onEvent: {
7
+ click: {
8
+ actions: ({
9
+ actionType: string;
10
+ args: {
11
+ api: {
12
+ url: string;
13
+ method: string;
14
+ headers: {
15
+ Authorization: string;
16
+ };
17
+ data: {
18
+ "&": string;
19
+ uiSchema: string;
20
+ recordId: string;
21
+ };
22
+ messages: {
23
+ success: string;
24
+ };
25
+ requestAdaptor: string;
26
+ adaptor: string;
27
+ };
28
+ url?: undefined;
29
+ blank?: undefined;
30
+ };
31
+ expression?: undefined;
32
+ } | {
33
+ actionType: string;
34
+ args: {
35
+ url: string;
36
+ blank: boolean;
37
+ api?: undefined;
38
+ };
39
+ expression: string;
40
+ })[];
41
+ };
42
+ };
43
+ };
@@ -0,0 +1,68 @@
1
+ export function getSetListviewFiltersButtonSchema(): {
2
+ type: string;
3
+ label: string;
4
+ disabledOn: string;
5
+ onEvent: {
6
+ click: {
7
+ weight: number;
8
+ actions: {
9
+ dialog: {
10
+ type: string;
11
+ title: string;
12
+ data: {
13
+ targetObjectName: string;
14
+ recordId: string;
15
+ listName: string;
16
+ appId: string;
17
+ };
18
+ body: {
19
+ type: string;
20
+ label: string;
21
+ objectApiName: string;
22
+ recordId: string;
23
+ mode: string;
24
+ fields: string[];
25
+ initApiAdaptor: string;
26
+ apiRequestAdaptor: string;
27
+ fieldsExtend: {
28
+ filters: {
29
+ visible_on: string;
30
+ amis: {
31
+ type: string;
32
+ label: string;
33
+ source: {
34
+ method: string;
35
+ url: string;
36
+ dataType: string;
37
+ headers: {
38
+ Authorization: string;
39
+ };
40
+ };
41
+ };
42
+ };
43
+ };
44
+ onEvent: {
45
+ submitSucc: {
46
+ weight: number;
47
+ actions: {
48
+ args: {
49
+ url: string;
50
+ blank: boolean;
51
+ };
52
+ actionType: string;
53
+ }[];
54
+ };
55
+ };
56
+ }[];
57
+ showCloseButton: boolean;
58
+ showErrorMsg: boolean;
59
+ showLoading: boolean;
60
+ closeOnEsc: boolean;
61
+ dataMapSwitch: boolean;
62
+ size: string;
63
+ };
64
+ actionType: string;
65
+ }[];
66
+ };
67
+ };
68
+ };