@steedos-widgets/amis-lib 1.0.26 → 1.0.28
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 +23 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/dist/index.esm.js +38 -52
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +23 -37
- package/dist/index.umd.js.map +1 -1
- package/dist/render.d.ts +15 -0
- package/dist/types/lib/converter/amis/header.d.ts +11 -2
- package/dist/types/lib/converter/amis/index.d.ts +45 -23
- package/dist/types/lib/objects.d.ts +57 -25
- package/dist/types/schema/standard_delete.amis.d.ts +8 -14
- package/dist/types/schema/standard_new.amis.d.ts +37 -3
- package/dist/types/standard/button.d.ts +45 -17
- package/dist/utils/object.d.ts +14 -0
- package/package.json +2 -2
package/dist/render.d.ts
ADDED
|
@@ -25,7 +25,11 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
|
|
|
25
25
|
inline: boolean;
|
|
26
26
|
wrapperComponent: string;
|
|
27
27
|
className: string;
|
|
28
|
-
label?: undefined;
|
|
28
|
+
label?: undefined; /**
|
|
29
|
+
* 记录详细界面中相关表顶部头amisSchema
|
|
30
|
+
* @param {*} relatedObjectSchema 相关对象UISchema
|
|
31
|
+
* @returns amisSchema
|
|
32
|
+
*/
|
|
29
33
|
rightIcon?: undefined;
|
|
30
34
|
size?: undefined;
|
|
31
35
|
hideCaret?: undefined;
|
|
@@ -341,7 +345,11 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
341
345
|
inline: boolean;
|
|
342
346
|
wrapperComponent: string;
|
|
343
347
|
className: string;
|
|
344
|
-
label?: undefined;
|
|
348
|
+
label?: undefined; /**
|
|
349
|
+
* 记录详细界面中相关表顶部头amisSchema
|
|
350
|
+
* @param {*} relatedObjectSchema 相关对象UISchema
|
|
351
|
+
* @returns amisSchema
|
|
352
|
+
*/
|
|
345
353
|
rightIcon?: undefined;
|
|
346
354
|
size?: undefined;
|
|
347
355
|
hideCaret?: undefined;
|
|
@@ -408,6 +416,7 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
|
|
|
408
416
|
};
|
|
409
417
|
body: {
|
|
410
418
|
type: string;
|
|
419
|
+
id: string;
|
|
411
420
|
data: {
|
|
412
421
|
"&": string;
|
|
413
422
|
objectName: any;
|
|
@@ -68,34 +68,56 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
|
|
|
68
68
|
};
|
|
69
69
|
body: {
|
|
70
70
|
type: string;
|
|
71
|
-
|
|
72
|
-
labelAlign: any;
|
|
73
|
-
persistData: boolean;
|
|
74
|
-
promptPageLeave: boolean;
|
|
75
|
-
name: string;
|
|
76
|
-
debug: boolean;
|
|
77
|
-
title: string;
|
|
78
|
-
data: {
|
|
79
|
-
formData: string;
|
|
80
|
-
};
|
|
81
|
-
wrapWithPanel: boolean;
|
|
71
|
+
hiddenOn: string;
|
|
82
72
|
body: {
|
|
83
73
|
type: string;
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
mode: any;
|
|
75
|
+
labelAlign: any;
|
|
76
|
+
persistData: boolean;
|
|
77
|
+
promptPageLeave: boolean;
|
|
78
|
+
name: string;
|
|
79
|
+
debug: boolean;
|
|
80
|
+
title: string;
|
|
81
|
+
data: {
|
|
82
|
+
formData: string;
|
|
83
|
+
};
|
|
84
|
+
wrapWithPanel: boolean;
|
|
86
85
|
body: {
|
|
87
|
-
type:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
type: string;
|
|
87
|
+
title: any;
|
|
88
|
+
collapsable: boolean;
|
|
89
|
+
body: {
|
|
90
|
+
type: any;
|
|
91
|
+
tpl: string;
|
|
92
|
+
multiple: boolean;
|
|
93
|
+
extractValue: boolean;
|
|
94
|
+
className: any;
|
|
95
|
+
quickEdit: boolean;
|
|
96
|
+
visibleOn: string;
|
|
97
|
+
}[];
|
|
94
98
|
}[];
|
|
95
|
-
|
|
99
|
+
className: string;
|
|
100
|
+
actions: any[];
|
|
101
|
+
onEvent: {
|
|
102
|
+
[x: string]: {
|
|
103
|
+
actions: ({
|
|
104
|
+
actionType: string;
|
|
105
|
+
componentId: string;
|
|
106
|
+
expression: string;
|
|
107
|
+
args?: undefined;
|
|
108
|
+
} | {
|
|
109
|
+
args: {
|
|
110
|
+
url: string;
|
|
111
|
+
blank: boolean;
|
|
112
|
+
};
|
|
113
|
+
actionType: string;
|
|
114
|
+
expression: string;
|
|
115
|
+
componentId?: undefined;
|
|
116
|
+
})[];
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
96
120
|
className: string;
|
|
97
|
-
actions: any[];
|
|
98
|
-
hiddenOn: string;
|
|
99
121
|
}[];
|
|
100
122
|
onEvent: {
|
|
101
123
|
fetchInited: {
|
|
@@ -64,34 +64,56 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
|
|
|
64
64
|
};
|
|
65
65
|
body: {
|
|
66
66
|
type: string;
|
|
67
|
-
|
|
68
|
-
labelAlign: any;
|
|
69
|
-
persistData: boolean;
|
|
70
|
-
promptPageLeave: boolean;
|
|
71
|
-
name: string;
|
|
72
|
-
debug: boolean;
|
|
73
|
-
title: string;
|
|
74
|
-
data: {
|
|
75
|
-
formData: string;
|
|
76
|
-
};
|
|
77
|
-
wrapWithPanel: boolean;
|
|
67
|
+
hiddenOn: string;
|
|
78
68
|
body: {
|
|
79
69
|
type: string;
|
|
80
|
-
|
|
81
|
-
|
|
70
|
+
mode: any;
|
|
71
|
+
labelAlign: any;
|
|
72
|
+
persistData: boolean;
|
|
73
|
+
promptPageLeave: boolean;
|
|
74
|
+
name: string;
|
|
75
|
+
debug: boolean;
|
|
76
|
+
title: string;
|
|
77
|
+
data: {
|
|
78
|
+
formData: string;
|
|
79
|
+
};
|
|
80
|
+
wrapWithPanel: boolean;
|
|
82
81
|
body: {
|
|
83
|
-
type:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
type: string;
|
|
83
|
+
title: any;
|
|
84
|
+
collapsable: boolean;
|
|
85
|
+
body: {
|
|
86
|
+
type: any;
|
|
87
|
+
tpl: string;
|
|
88
|
+
multiple: boolean;
|
|
89
|
+
extractValue: boolean;
|
|
90
|
+
className: any;
|
|
91
|
+
quickEdit: boolean;
|
|
92
|
+
visibleOn: string;
|
|
93
|
+
}[];
|
|
90
94
|
}[];
|
|
91
|
-
|
|
95
|
+
className: string;
|
|
96
|
+
actions: any[];
|
|
97
|
+
onEvent: {
|
|
98
|
+
[x: string]: {
|
|
99
|
+
actions: ({
|
|
100
|
+
actionType: string;
|
|
101
|
+
componentId: string;
|
|
102
|
+
expression: string;
|
|
103
|
+
args?: undefined;
|
|
104
|
+
} | {
|
|
105
|
+
args: {
|
|
106
|
+
url: string;
|
|
107
|
+
blank: boolean;
|
|
108
|
+
};
|
|
109
|
+
actionType: string;
|
|
110
|
+
expression: string;
|
|
111
|
+
componentId?: undefined;
|
|
112
|
+
})[];
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
92
116
|
className: string;
|
|
93
|
-
actions: any[];
|
|
94
|
-
hiddenOn: string;
|
|
95
117
|
}[];
|
|
96
118
|
onEvent: {
|
|
97
119
|
fetchInited: {
|
|
@@ -319,6 +341,7 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any, opti
|
|
|
319
341
|
};
|
|
320
342
|
body: {
|
|
321
343
|
type: string;
|
|
344
|
+
id: string;
|
|
322
345
|
data: {
|
|
323
346
|
"&": string;
|
|
324
347
|
objectName: any;
|
|
@@ -405,14 +428,23 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
|
|
|
405
428
|
id: string;
|
|
406
429
|
onEvent: {
|
|
407
430
|
recordLoaded: {
|
|
408
|
-
actions: {
|
|
431
|
+
actions: ({
|
|
409
432
|
actionType: string;
|
|
410
433
|
data: {
|
|
411
434
|
name: string;
|
|
412
435
|
record: string;
|
|
413
436
|
recordLoaded: boolean;
|
|
414
437
|
};
|
|
415
|
-
|
|
438
|
+
componentId?: undefined;
|
|
439
|
+
} | {
|
|
440
|
+
actionType: string;
|
|
441
|
+
componentId: string;
|
|
442
|
+
data: {
|
|
443
|
+
name: string;
|
|
444
|
+
record: string;
|
|
445
|
+
recordLoaded: boolean;
|
|
446
|
+
};
|
|
447
|
+
})[];
|
|
416
448
|
};
|
|
417
449
|
};
|
|
418
450
|
})[];
|
|
@@ -27,27 +27,21 @@ export function getSchema(uiSchema: any): {
|
|
|
27
27
|
success: string;
|
|
28
28
|
failed: string;
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
blank?: undefined;
|
|
30
|
+
eventName?: undefined;
|
|
32
31
|
};
|
|
33
32
|
actionType: string;
|
|
34
|
-
|
|
35
|
-
expression?: undefined;
|
|
33
|
+
data?: undefined;
|
|
36
34
|
} | {
|
|
37
|
-
|
|
35
|
+
actionType: string;
|
|
38
36
|
args: {
|
|
39
|
-
|
|
40
|
-
blank: boolean;
|
|
37
|
+
eventName: string;
|
|
41
38
|
api?: undefined;
|
|
42
39
|
messages?: undefined;
|
|
43
40
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
actionType: string;
|
|
49
|
-
expression: string;
|
|
50
|
-
args?: undefined;
|
|
41
|
+
data: {
|
|
42
|
+
objectName: string;
|
|
43
|
+
__deletedRecord: boolean;
|
|
44
|
+
};
|
|
51
45
|
})[];
|
|
52
46
|
};
|
|
53
47
|
};
|
|
@@ -7,14 +7,48 @@ export function getSchema(uiSchema: any, ctx: any): Promise<{
|
|
|
7
7
|
level: string;
|
|
8
8
|
onEvent: {
|
|
9
9
|
click: {
|
|
10
|
+
weight: number;
|
|
10
11
|
actions: {
|
|
11
12
|
actionType: string;
|
|
12
|
-
|
|
13
|
+
dialog: {
|
|
14
|
+
type: string;
|
|
15
|
+
data: {
|
|
16
|
+
$master: string;
|
|
17
|
+
defaultData: string;
|
|
18
|
+
appId: string;
|
|
19
|
+
objectName: string;
|
|
20
|
+
context: string;
|
|
21
|
+
global: string;
|
|
22
|
+
listViewId: string;
|
|
23
|
+
uiSchema: string;
|
|
24
|
+
isLookup: string;
|
|
25
|
+
listName: string;
|
|
26
|
+
};
|
|
27
|
+
title: string;
|
|
28
|
+
body: {
|
|
29
|
+
type: string;
|
|
30
|
+
id: string;
|
|
31
|
+
messages: {};
|
|
32
|
+
schemaApi: {
|
|
33
|
+
data: {
|
|
34
|
+
isLookup: string;
|
|
35
|
+
};
|
|
36
|
+
url: string;
|
|
37
|
+
method: string;
|
|
38
|
+
messages: {};
|
|
39
|
+
requestAdaptor: string;
|
|
40
|
+
adaptor: string;
|
|
41
|
+
};
|
|
42
|
+
}[];
|
|
43
|
+
showCloseButton: boolean;
|
|
44
|
+
id: string;
|
|
45
|
+
closeOnEsc: boolean;
|
|
46
|
+
closeOnOutside: boolean;
|
|
47
|
+
size: string;
|
|
48
|
+
};
|
|
13
49
|
}[];
|
|
14
|
-
weight: number;
|
|
15
50
|
};
|
|
16
51
|
};
|
|
17
|
-
className: string;
|
|
18
52
|
}[];
|
|
19
53
|
regions: string[];
|
|
20
54
|
className: string;
|
|
@@ -10,14 +10,48 @@ export namespace StandardButtons {
|
|
|
10
10
|
level: string;
|
|
11
11
|
onEvent: {
|
|
12
12
|
click: {
|
|
13
|
+
weight: number;
|
|
13
14
|
actions: {
|
|
14
15
|
actionType: string;
|
|
15
|
-
|
|
16
|
+
dialog: {
|
|
17
|
+
type: string;
|
|
18
|
+
data: {
|
|
19
|
+
$master: string;
|
|
20
|
+
defaultData: string;
|
|
21
|
+
appId: string;
|
|
22
|
+
objectName: string;
|
|
23
|
+
context: string;
|
|
24
|
+
global: string;
|
|
25
|
+
listViewId: string;
|
|
26
|
+
uiSchema: string;
|
|
27
|
+
isLookup: string;
|
|
28
|
+
listName: string;
|
|
29
|
+
};
|
|
30
|
+
title: string;
|
|
31
|
+
body: {
|
|
32
|
+
type: string;
|
|
33
|
+
id: string;
|
|
34
|
+
messages: {};
|
|
35
|
+
schemaApi: {
|
|
36
|
+
data: {
|
|
37
|
+
isLookup: string;
|
|
38
|
+
};
|
|
39
|
+
url: string;
|
|
40
|
+
method: string;
|
|
41
|
+
messages: {};
|
|
42
|
+
requestAdaptor: string;
|
|
43
|
+
adaptor: string;
|
|
44
|
+
};
|
|
45
|
+
}[];
|
|
46
|
+
showCloseButton: boolean;
|
|
47
|
+
id: string;
|
|
48
|
+
closeOnEsc: boolean;
|
|
49
|
+
closeOnOutside: boolean;
|
|
50
|
+
size: string;
|
|
51
|
+
};
|
|
16
52
|
}[];
|
|
17
|
-
weight: number;
|
|
18
53
|
};
|
|
19
54
|
};
|
|
20
|
-
className: string;
|
|
21
55
|
}[];
|
|
22
56
|
regions: string[];
|
|
23
57
|
className: string;
|
|
@@ -95,27 +129,21 @@ export namespace StandardButtons {
|
|
|
95
129
|
success: string;
|
|
96
130
|
failed: string;
|
|
97
131
|
};
|
|
98
|
-
|
|
99
|
-
blank?: undefined;
|
|
132
|
+
eventName?: undefined;
|
|
100
133
|
};
|
|
101
134
|
actionType: string;
|
|
102
|
-
|
|
103
|
-
expression?: undefined;
|
|
135
|
+
data?: undefined;
|
|
104
136
|
} | {
|
|
105
|
-
|
|
137
|
+
actionType: string;
|
|
106
138
|
args: {
|
|
107
|
-
|
|
108
|
-
blank: boolean;
|
|
139
|
+
eventName: string;
|
|
109
140
|
api?: undefined;
|
|
110
141
|
messages?: undefined;
|
|
111
142
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
actionType: string;
|
|
117
|
-
expression: string;
|
|
118
|
-
args?: undefined;
|
|
143
|
+
data: {
|
|
144
|
+
objectName: string;
|
|
145
|
+
__deletedRecord: boolean;
|
|
146
|
+
};
|
|
119
147
|
})[];
|
|
120
148
|
};
|
|
121
149
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function createObject(superProps?: {
|
|
2
|
+
[propName: string]: any;
|
|
3
|
+
}, props?: {
|
|
4
|
+
[propName: string]: any;
|
|
5
|
+
}, properties?: any): object;
|
|
6
|
+
export declare function cloneObject(target: any, persistOwnProps?: boolean): any;
|
|
7
|
+
export declare function extendObject(target: any, src?: any, persistOwnProps?: boolean): any;
|
|
8
|
+
export declare function isObject(obj: any): boolean;
|
|
9
|
+
export declare function setVariable(data: {
|
|
10
|
+
[propName: string]: any;
|
|
11
|
+
}, key: string, value: any, convertKeyToPath?: boolean): void;
|
|
12
|
+
export declare function deleteVariable(data: {
|
|
13
|
+
[propName: string]: any;
|
|
14
|
+
}, key: string): void;
|
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.
|
|
4
|
+
"version": "1.0.28",
|
|
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": "
|
|
61
|
+
"gitHead": "6d36f71035c0352b742b460254d38cceee1ddfdb"
|
|
62
62
|
}
|