@steedos-widgets/amis-lib 1.2.9-beta.1 → 1.2.10

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.
@@ -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
+ };
@@ -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;
@@ -390,6 +392,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
390
392
  rightIcon?: undefined;
391
393
  size?: undefined;
392
394
  hideCaret?: undefined;
395
+ closeOnClick?: undefined;
393
396
  btnClassName?: undefined;
394
397
  buttons?: undefined;
395
398
  } | {
@@ -399,6 +402,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
399
402
  rightIcon: string;
400
403
  size: string;
401
404
  hideCaret: boolean;
405
+ closeOnClick: boolean;
402
406
  btnClassName: string;
403
407
  buttons: any[];
404
408
  tpl?: undefined;
@@ -498,11 +502,44 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
498
502
  body: {
499
503
  type: string;
500
504
  columns: ({
501
- 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
+ } | {
502
537
  type: string;
503
538
  className: string;
504
539
  tpl: string;
505
- };
540
+ onEvent?: undefined;
541
+ body?: undefined;
542
+ })[];
506
543
  md: string;
507
544
  className: string;
508
545
  columnClassName: string;
@@ -583,7 +620,7 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
583
620
  * @param {*} relatedObjectSchema 相关对象UISchema
584
621
  * @returns amisSchema
585
622
  */
586
- export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any, relatedLabel: any): Promise<{
623
+ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any, relatedLabel: any, ctx: any): Promise<{
587
624
  type: string;
588
625
  body: {
589
626
  type: string;
@@ -627,7 +664,43 @@ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any,
627
664
  objectName: any;
628
665
  visibleOn: any;
629
666
  className: string;
630
- }[];
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
+ };
631
704
  };
632
705
  md: string;
633
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
  };
@@ -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
+ };
@@ -0,0 +1,116 @@
1
+ export function getNewListviewButtonSchema(): {
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
+ all: string;
14
+ list_view: string;
15
+ appId: string;
16
+ global: string;
17
+ targetObjectName: 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
+ filters: string;
30
+ shared: boolean;
31
+ };
32
+ fieldsExtend: {
33
+ label: {
34
+ is_wide: boolean;
35
+ };
36
+ name: {
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
+ messages: {
101
+ success: string;
102
+ failed: string;
103
+ };
104
+ }[];
105
+ showCloseButton: boolean;
106
+ showErrorMsg: boolean;
107
+ showLoading: boolean;
108
+ closeOnEsc: boolean;
109
+ dataMapSwitch: boolean;
110
+ size: string;
111
+ };
112
+ actionType: string;
113
+ }[];
114
+ };
115
+ };
116
+ };