@steedos-widgets/amis-lib 0.0.6 → 0.0.8
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.
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +55 -44
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +55 -44
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +72 -60
- package/dist/index.umd.js.map +1 -0
- package/dist/index.umd.min.js +71 -60
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lib/buttons.d.ts +1 -0
- package/dist/types/lib/converter/amis/header.d.ts +281 -0
- package/dist/types/lib/converter/amis/index.d.ts +6 -93
- package/dist/types/lib/converter/amis/tpl.d.ts +1 -0
- package/dist/types/lib/objects.d.ts +78 -94
- package/dist/types/lib/objectsRelated.d.ts +51 -0
- package/dist/types/lib/page.d.ts +2 -1
- package/dist/types/lib/page_init.d.ts +150 -0
- package/dist/types/schema/standard_delete.amis.d.ts +2 -2
- package/dist/types/schema/standard_edit.amis.d.ts +3 -3
- package/dist/types/schema/standard_import_data.amis.d.ts +1 -1
- package/dist/types/schema/standard_new.amis.d.ts +3 -3
- package/dist/types/schema/standard_open_view.amis.d.ts +23 -0
- package/dist/types/standard/button.d.ts +41 -15
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export function getAmisObjectRelatedList(appName: any, objectName: any, recordId: any, formFactor: any): Promise<({
|
|
2
|
+
masterObjectName: any;
|
|
3
|
+
object_name: any;
|
|
4
|
+
foreign_key: any;
|
|
5
|
+
schema: {
|
|
6
|
+
uiSchema: any;
|
|
7
|
+
amisSchema: {
|
|
8
|
+
type: string;
|
|
9
|
+
className: string;
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
data: {
|
|
13
|
+
context: {
|
|
14
|
+
rootUrl: any;
|
|
15
|
+
tenantId: any;
|
|
16
|
+
authToken: any;
|
|
17
|
+
};
|
|
18
|
+
objectName: any;
|
|
19
|
+
_id: any;
|
|
20
|
+
recordPermissions: any;
|
|
21
|
+
uiSchema: any;
|
|
22
|
+
};
|
|
23
|
+
body: {};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
} | {
|
|
27
|
+
masterObjectName: any;
|
|
28
|
+
object_name: any;
|
|
29
|
+
foreign_key: any;
|
|
30
|
+
schema: {
|
|
31
|
+
uiSchema: any;
|
|
32
|
+
isCustom?: undefined;
|
|
33
|
+
amisSchema?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
uiSchema: any;
|
|
36
|
+
isCustom: boolean;
|
|
37
|
+
amisSchema: any;
|
|
38
|
+
} | {
|
|
39
|
+
uiSchema: any;
|
|
40
|
+
amisSchema: {
|
|
41
|
+
type: string;
|
|
42
|
+
objectApiName: any;
|
|
43
|
+
columns: any;
|
|
44
|
+
extraColumns: any;
|
|
45
|
+
filters: any;
|
|
46
|
+
sort: string;
|
|
47
|
+
ctx: {};
|
|
48
|
+
};
|
|
49
|
+
isCustom?: undefined;
|
|
50
|
+
};
|
|
51
|
+
})[]>;
|
package/dist/types/lib/page.d.ts
CHANGED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
export function getFormPageInitSchema(objectApiName: any): Promise<{
|
|
2
|
+
type: string;
|
|
3
|
+
bodyClassName: string;
|
|
4
|
+
regions: string[];
|
|
5
|
+
body: {
|
|
6
|
+
type: string;
|
|
7
|
+
className: string;
|
|
8
|
+
name: string;
|
|
9
|
+
api: {
|
|
10
|
+
method: string;
|
|
11
|
+
url: string;
|
|
12
|
+
sendOn: string;
|
|
13
|
+
cache: number;
|
|
14
|
+
adaptor: string;
|
|
15
|
+
data: {
|
|
16
|
+
query: string;
|
|
17
|
+
};
|
|
18
|
+
headers: {
|
|
19
|
+
Authorization: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
initApi: any;
|
|
23
|
+
initFetch: any;
|
|
24
|
+
body: {}[];
|
|
25
|
+
}[];
|
|
26
|
+
}>;
|
|
27
|
+
export function getListPageInitSchema(objectApiName: any, formFactor: any, userSession: any): Promise<{
|
|
28
|
+
type: string;
|
|
29
|
+
bodyClassName: string;
|
|
30
|
+
regions: string[];
|
|
31
|
+
body: {
|
|
32
|
+
type: string;
|
|
33
|
+
objectApiName: any;
|
|
34
|
+
columnsTogglable: boolean;
|
|
35
|
+
showHeader: boolean;
|
|
36
|
+
headerSchema: {
|
|
37
|
+
type: string;
|
|
38
|
+
body: ({
|
|
39
|
+
type: string;
|
|
40
|
+
columns: ({
|
|
41
|
+
body: {
|
|
42
|
+
type: string;
|
|
43
|
+
columns: ({
|
|
44
|
+
body: {
|
|
45
|
+
type: string;
|
|
46
|
+
className: string;
|
|
47
|
+
tpl: string;
|
|
48
|
+
};
|
|
49
|
+
md: string;
|
|
50
|
+
className: string;
|
|
51
|
+
columnClassName: string;
|
|
52
|
+
valign?: undefined;
|
|
53
|
+
} | {
|
|
54
|
+
body: ({
|
|
55
|
+
type: string;
|
|
56
|
+
tpl: string;
|
|
57
|
+
inline: boolean;
|
|
58
|
+
wrapperComponent: string;
|
|
59
|
+
className: string;
|
|
60
|
+
style: {
|
|
61
|
+
fontFamily: string;
|
|
62
|
+
fontSize: number;
|
|
63
|
+
fontWeight: string;
|
|
64
|
+
};
|
|
65
|
+
label?: undefined;
|
|
66
|
+
rightIcon?: undefined;
|
|
67
|
+
hideCaret?: undefined;
|
|
68
|
+
btnClassName?: undefined;
|
|
69
|
+
buttons?: undefined;
|
|
70
|
+
} | {
|
|
71
|
+
type: string;
|
|
72
|
+
className: string;
|
|
73
|
+
label: string;
|
|
74
|
+
rightIcon: string;
|
|
75
|
+
hideCaret: boolean;
|
|
76
|
+
btnClassName: string;
|
|
77
|
+
buttons: any[];
|
|
78
|
+
tpl?: undefined;
|
|
79
|
+
inline?: undefined;
|
|
80
|
+
wrapperComponent?: undefined;
|
|
81
|
+
style?: undefined;
|
|
82
|
+
})[];
|
|
83
|
+
md: string;
|
|
84
|
+
valign: string;
|
|
85
|
+
columnClassName: string;
|
|
86
|
+
className?: undefined;
|
|
87
|
+
})[];
|
|
88
|
+
}[];
|
|
89
|
+
md: string;
|
|
90
|
+
} | {
|
|
91
|
+
body: {
|
|
92
|
+
type: string;
|
|
93
|
+
name: any;
|
|
94
|
+
objectName: any;
|
|
95
|
+
visibleOn: any;
|
|
96
|
+
className: string;
|
|
97
|
+
}[];
|
|
98
|
+
md: string;
|
|
99
|
+
})[];
|
|
100
|
+
align: string;
|
|
101
|
+
} | {
|
|
102
|
+
type: string;
|
|
103
|
+
align: string;
|
|
104
|
+
columns: {
|
|
105
|
+
body: ({
|
|
106
|
+
type: string;
|
|
107
|
+
label: string;
|
|
108
|
+
icon: string;
|
|
109
|
+
actionType: string;
|
|
110
|
+
target: string;
|
|
111
|
+
className: string;
|
|
112
|
+
id?: undefined;
|
|
113
|
+
onEvent?: undefined;
|
|
114
|
+
} | {
|
|
115
|
+
type: string;
|
|
116
|
+
label: string;
|
|
117
|
+
icon: string;
|
|
118
|
+
actionType: string;
|
|
119
|
+
className: string;
|
|
120
|
+
id: string;
|
|
121
|
+
onEvent: {
|
|
122
|
+
click: {
|
|
123
|
+
actions: {
|
|
124
|
+
actionType: string;
|
|
125
|
+
script: string;
|
|
126
|
+
}[];
|
|
127
|
+
weight: number;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
target?: undefined;
|
|
131
|
+
})[];
|
|
132
|
+
md: string;
|
|
133
|
+
}[];
|
|
134
|
+
})[];
|
|
135
|
+
size: string;
|
|
136
|
+
className: string;
|
|
137
|
+
};
|
|
138
|
+
}[];
|
|
139
|
+
}>;
|
|
140
|
+
export function getRecordPageInitSchema(objectApiName: any): Promise<{
|
|
141
|
+
type: string;
|
|
142
|
+
bodyClassName: string;
|
|
143
|
+
regions: string[];
|
|
144
|
+
body: {
|
|
145
|
+
type: string;
|
|
146
|
+
label: string;
|
|
147
|
+
objectApiName: string;
|
|
148
|
+
recordId: string;
|
|
149
|
+
}[];
|
|
150
|
+
}>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export function getSchema(uiSchema: any): {
|
|
2
2
|
type: string;
|
|
3
|
-
|
|
3
|
+
className: string;
|
|
4
4
|
body: {
|
|
5
5
|
type: string;
|
|
6
6
|
label: string;
|
|
7
7
|
confirmText: string;
|
|
8
|
-
className: string;
|
|
9
8
|
onEvent: {
|
|
10
9
|
click: {
|
|
11
10
|
actions: ({
|
|
@@ -22,6 +21,7 @@ export function getSchema(uiSchema: any): {
|
|
|
22
21
|
headers: {
|
|
23
22
|
Authorization: string;
|
|
24
23
|
};
|
|
24
|
+
adaptor: string;
|
|
25
25
|
};
|
|
26
26
|
messages: {
|
|
27
27
|
success: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getSchema(uiSchema: any): {
|
|
1
|
+
export function getSchema(uiSchema: any, ctx: any): Promise<{
|
|
2
2
|
type: string;
|
|
3
3
|
body: {
|
|
4
4
|
type: string;
|
|
@@ -32,6 +32,6 @@ export function getSchema(uiSchema: any): {
|
|
|
32
32
|
};
|
|
33
33
|
}[];
|
|
34
34
|
regions: string[];
|
|
35
|
-
|
|
35
|
+
className: string;
|
|
36
36
|
id: string;
|
|
37
|
-
}
|
|
37
|
+
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getSchema(uiSchema: any): {
|
|
1
|
+
export function getSchema(uiSchema: any, ctx: any): Promise<{
|
|
2
2
|
type: string;
|
|
3
3
|
body: {
|
|
4
4
|
type: string;
|
|
@@ -34,6 +34,6 @@ export function getSchema(uiSchema: any): {
|
|
|
34
34
|
};
|
|
35
35
|
}[];
|
|
36
36
|
regions: string[];
|
|
37
|
-
|
|
37
|
+
className: string;
|
|
38
38
|
id: string;
|
|
39
|
-
}
|
|
39
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function getSchema(uiSchema: any): {
|
|
2
|
+
type: string;
|
|
3
|
+
className: string;
|
|
4
|
+
body: {
|
|
5
|
+
type: string;
|
|
6
|
+
label: string;
|
|
7
|
+
className: string;
|
|
8
|
+
onEvent: {
|
|
9
|
+
click: {
|
|
10
|
+
actions: {
|
|
11
|
+
componentId: string;
|
|
12
|
+
args: {
|
|
13
|
+
blank: boolean;
|
|
14
|
+
url: string;
|
|
15
|
+
};
|
|
16
|
+
actionType: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
id: string;
|
|
21
|
+
}[];
|
|
22
|
+
regions: string[];
|
|
23
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export namespace StandardButtons {
|
|
2
|
-
function getStandardNew(uiSchema: any): {
|
|
2
|
+
function getStandardNew(uiSchema: any, ctx: any): Promise<{
|
|
3
3
|
type: string;
|
|
4
4
|
amis_schema: {
|
|
5
5
|
type: string;
|
|
@@ -37,11 +37,11 @@ export namespace StandardButtons {
|
|
|
37
37
|
};
|
|
38
38
|
}[];
|
|
39
39
|
regions: string[];
|
|
40
|
-
|
|
40
|
+
className: string;
|
|
41
41
|
id: string;
|
|
42
42
|
};
|
|
43
|
-
}
|
|
44
|
-
function getStandardEdit(uiSchema: any): {
|
|
43
|
+
}>;
|
|
44
|
+
function getStandardEdit(uiSchema: any, ctx: any): Promise<{
|
|
45
45
|
type: string;
|
|
46
46
|
amis_schema: {
|
|
47
47
|
type: string;
|
|
@@ -77,20 +77,19 @@ export namespace StandardButtons {
|
|
|
77
77
|
};
|
|
78
78
|
}[];
|
|
79
79
|
regions: string[];
|
|
80
|
-
|
|
80
|
+
className: string;
|
|
81
81
|
id: string;
|
|
82
82
|
};
|
|
83
|
-
}
|
|
84
|
-
function getStandardDelete(uiSchema: any): {
|
|
83
|
+
}>;
|
|
84
|
+
function getStandardDelete(uiSchema: any, ctx: any): Promise<{
|
|
85
85
|
type: string;
|
|
86
86
|
amis_schema: {
|
|
87
87
|
type: string;
|
|
88
|
-
|
|
88
|
+
className: string;
|
|
89
89
|
body: {
|
|
90
90
|
type: string;
|
|
91
91
|
label: string;
|
|
92
92
|
confirmText: string;
|
|
93
|
-
className: string;
|
|
94
93
|
onEvent: {
|
|
95
94
|
click: {
|
|
96
95
|
actions: ({
|
|
@@ -107,6 +106,7 @@ export namespace StandardButtons {
|
|
|
107
106
|
headers: {
|
|
108
107
|
Authorization: string;
|
|
109
108
|
};
|
|
109
|
+
adaptor: string;
|
|
110
110
|
};
|
|
111
111
|
messages: {
|
|
112
112
|
success: string;
|
|
@@ -139,11 +139,11 @@ export namespace StandardButtons {
|
|
|
139
139
|
}[];
|
|
140
140
|
regions: string[];
|
|
141
141
|
};
|
|
142
|
-
}
|
|
143
|
-
function getStandardDeleteMany(uiSchema: any): {
|
|
142
|
+
}>;
|
|
143
|
+
function getStandardDeleteMany(uiSchema: any, ctx: any): Promise<{
|
|
144
144
|
type: string;
|
|
145
|
-
}
|
|
146
|
-
function getStandardImportData(uiSchema: any): {
|
|
145
|
+
}>;
|
|
146
|
+
function getStandardImportData(uiSchema: any, ctx: any): Promise<{
|
|
147
147
|
type: string;
|
|
148
148
|
amis_schema: {
|
|
149
149
|
type: string;
|
|
@@ -393,8 +393,34 @@ export namespace StandardButtons {
|
|
|
393
393
|
level: string;
|
|
394
394
|
}[];
|
|
395
395
|
regions: string[];
|
|
396
|
-
|
|
396
|
+
className: string;
|
|
397
397
|
id: string;
|
|
398
398
|
};
|
|
399
|
-
}
|
|
399
|
+
}>;
|
|
400
|
+
function getStandardOpenView(uiSchema: any, ctx: any): Promise<{
|
|
401
|
+
type: string;
|
|
402
|
+
amis_schema: {
|
|
403
|
+
type: string;
|
|
404
|
+
className: string;
|
|
405
|
+
body: {
|
|
406
|
+
type: string;
|
|
407
|
+
label: string;
|
|
408
|
+
className: string;
|
|
409
|
+
onEvent: {
|
|
410
|
+
click: {
|
|
411
|
+
actions: {
|
|
412
|
+
componentId: string;
|
|
413
|
+
args: {
|
|
414
|
+
blank: boolean;
|
|
415
|
+
url: string;
|
|
416
|
+
};
|
|
417
|
+
actionType: string;
|
|
418
|
+
}[];
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
id: string;
|
|
422
|
+
}[];
|
|
423
|
+
regions: string[];
|
|
424
|
+
};
|
|
425
|
+
}>;
|
|
400
426
|
}
|