@steedos-widgets/amis-lib 0.0.10 → 0.0.12
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 +163 -116
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +163 -116
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +173 -126
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +173 -126
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lib/converter/amis/fields/index.d.ts +3 -1
- package/dist/types/lib/converter/amis/fields/lookup.d.ts +19 -19
- package/dist/types/lib/converter/amis/fields/sections.d.ts +1 -0
- package/dist/types/lib/converter/amis/fields_filter.d.ts +236 -0
- package/dist/types/lib/converter/amis/form.d.ts +1 -0
- package/dist/types/lib/converter/amis/header.d.ts +21 -2
- package/dist/types/lib/converter/amis/index.d.ts +1 -0
- package/dist/types/lib/objects.d.ts +6 -1
- package/dist/types/lib/page_init.d.ts +20 -1
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export * from './lib/steedos.client.js';
|
|
|
15
15
|
export * from './lib/converter/amis/fields/lookup';
|
|
16
16
|
export * from './lib/converter/amis/fields/user';
|
|
17
17
|
export * from './lib/converter/amis/filters';
|
|
18
|
+
export * from './lib/converter/amis/header';
|
|
19
|
+
export * from './lib/converter/amis/fields_filter';
|
|
18
20
|
export * from './lib/workflow/flow';
|
|
19
21
|
export * from './lib/assets';
|
|
20
22
|
export * from './utils/object';
|
|
@@ -6,7 +6,7 @@ export function getBaseFields(readonly: any): {
|
|
|
6
6
|
className: string;
|
|
7
7
|
tpl: string;
|
|
8
8
|
}[];
|
|
9
|
-
export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "
|
|
9
|
+
export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "table" | "email" | "html" | "textarea" | "picker" | "checkbox";
|
|
10
10
|
export function getObjectFieldSubFields(mainField: any, fields: any): any;
|
|
11
11
|
export function getGridFieldSubFields(mainField: any, fields: any): any;
|
|
12
12
|
/**
|
|
@@ -33,6 +33,7 @@ export function convertSFieldToAmisField(field: any, readonly: any, ctx: any): P
|
|
|
33
33
|
visibleOn: string;
|
|
34
34
|
} & {
|
|
35
35
|
clearValueOnHidden: boolean;
|
|
36
|
+
fieldName: any;
|
|
36
37
|
}>;
|
|
37
38
|
export function getFieldSearchable(perField: any, permissionFields: any, ctx: any): Promise<{
|
|
38
39
|
name: any;
|
|
@@ -51,6 +52,7 @@ export function getFieldSearchable(perField: any, permissionFields: any, ctx: an
|
|
|
51
52
|
visibleOn: string;
|
|
52
53
|
} & {
|
|
53
54
|
clearValueOnHidden: boolean;
|
|
55
|
+
fieldName: any;
|
|
54
56
|
}>;
|
|
55
57
|
export const OMIT_FIELDS: string[];
|
|
56
58
|
export { getAmisStaticFieldType } from "./type";
|
|
@@ -19,25 +19,6 @@ export function lookupToAmisPicker(field: any, readonly: any, ctx: any): Promise
|
|
|
19
19
|
};
|
|
20
20
|
size: string;
|
|
21
21
|
pickerSchema: {
|
|
22
|
-
mode: string;
|
|
23
|
-
name: string;
|
|
24
|
-
draggable: boolean;
|
|
25
|
-
headerToolbar: string[];
|
|
26
|
-
defaultParams: {
|
|
27
|
-
perPage: any;
|
|
28
|
-
};
|
|
29
|
-
columns: {
|
|
30
|
-
name: string;
|
|
31
|
-
type: string;
|
|
32
|
-
width: number;
|
|
33
|
-
placeholder: string;
|
|
34
|
-
}[];
|
|
35
|
-
syncLocation: boolean;
|
|
36
|
-
keepItemSelectionOnPageChange: boolean;
|
|
37
|
-
checkOnItemClick: boolean;
|
|
38
|
-
labelTpl: string;
|
|
39
|
-
autoFillHeight: boolean;
|
|
40
|
-
} | {
|
|
41
22
|
mode: string;
|
|
42
23
|
name: string;
|
|
43
24
|
draggable: boolean;
|
|
@@ -67,6 +48,25 @@ export function lookupToAmisPicker(field: any, readonly: any, ctx: any): Promise
|
|
|
67
48
|
link: string;
|
|
68
49
|
}[];
|
|
69
50
|
};
|
|
51
|
+
} | {
|
|
52
|
+
mode: string;
|
|
53
|
+
name: string;
|
|
54
|
+
draggable: boolean;
|
|
55
|
+
headerToolbar: string[];
|
|
56
|
+
defaultParams: {
|
|
57
|
+
perPage: any;
|
|
58
|
+
};
|
|
59
|
+
columns: {
|
|
60
|
+
name: string;
|
|
61
|
+
type: string;
|
|
62
|
+
width: number;
|
|
63
|
+
placeholder: string;
|
|
64
|
+
}[];
|
|
65
|
+
syncLocation: boolean;
|
|
66
|
+
keepItemSelectionOnPageChange: boolean;
|
|
67
|
+
checkOnItemClick: boolean;
|
|
68
|
+
labelTpl: string;
|
|
69
|
+
autoFillHeight: boolean;
|
|
70
70
|
};
|
|
71
71
|
joinValues: boolean;
|
|
72
72
|
extractValue: boolean;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
export function getObjectFieldsFilterButtonSchema(objectSchema: any): Promise<{
|
|
2
|
+
type: string;
|
|
3
|
+
label: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
className: string;
|
|
6
|
+
onEvent: {
|
|
7
|
+
click: {
|
|
8
|
+
actions: {
|
|
9
|
+
actionType: string;
|
|
10
|
+
args: {
|
|
11
|
+
value: {
|
|
12
|
+
showFieldsFilter: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
componentId: string;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
export function getObjectFieldsFilterFormSchema(objectSchema: any, fields: any, ctx: any): Promise<{
|
|
21
|
+
title: string;
|
|
22
|
+
type: string;
|
|
23
|
+
name: string;
|
|
24
|
+
id: string;
|
|
25
|
+
mode: string;
|
|
26
|
+
wrapWithPanel: boolean;
|
|
27
|
+
className: string;
|
|
28
|
+
persistData: string;
|
|
29
|
+
persistDataKeys: any[];
|
|
30
|
+
body: ({
|
|
31
|
+
name: any;
|
|
32
|
+
label: any;
|
|
33
|
+
labelRemark: any;
|
|
34
|
+
required: any;
|
|
35
|
+
} & {
|
|
36
|
+
type: any;
|
|
37
|
+
tpl: string;
|
|
38
|
+
value: string | number | boolean;
|
|
39
|
+
multiple: boolean;
|
|
40
|
+
extractValue: boolean;
|
|
41
|
+
className: any;
|
|
42
|
+
labelClassName: string;
|
|
43
|
+
quickEdit: boolean;
|
|
44
|
+
visibleOn: string;
|
|
45
|
+
} & {
|
|
46
|
+
clearValueOnHidden: boolean;
|
|
47
|
+
fieldName: any;
|
|
48
|
+
})[];
|
|
49
|
+
}>;
|
|
50
|
+
export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, ctx: any): Promise<{
|
|
51
|
+
type: string;
|
|
52
|
+
id: string;
|
|
53
|
+
dataProvider: {
|
|
54
|
+
inited: string;
|
|
55
|
+
};
|
|
56
|
+
body: {
|
|
57
|
+
type: string;
|
|
58
|
+
body: {
|
|
59
|
+
type: string;
|
|
60
|
+
body: ({
|
|
61
|
+
type: string;
|
|
62
|
+
body: {
|
|
63
|
+
title: string;
|
|
64
|
+
type: string;
|
|
65
|
+
name: string;
|
|
66
|
+
id: string;
|
|
67
|
+
mode: string;
|
|
68
|
+
wrapWithPanel: boolean;
|
|
69
|
+
className: string;
|
|
70
|
+
persistData: string;
|
|
71
|
+
persistDataKeys: any[];
|
|
72
|
+
body: ({
|
|
73
|
+
name: any;
|
|
74
|
+
label: any;
|
|
75
|
+
labelRemark: any;
|
|
76
|
+
required: any;
|
|
77
|
+
} & {
|
|
78
|
+
type: any;
|
|
79
|
+
tpl: string;
|
|
80
|
+
value: string | number | boolean;
|
|
81
|
+
multiple: boolean;
|
|
82
|
+
extractValue: boolean;
|
|
83
|
+
className: any;
|
|
84
|
+
labelClassName: string;
|
|
85
|
+
quickEdit: boolean;
|
|
86
|
+
visibleOn: string;
|
|
87
|
+
} & {
|
|
88
|
+
clearValueOnHidden: boolean;
|
|
89
|
+
fieldName: any;
|
|
90
|
+
})[];
|
|
91
|
+
}[];
|
|
92
|
+
size: string;
|
|
93
|
+
visibleOn: string;
|
|
94
|
+
className: string;
|
|
95
|
+
} | {
|
|
96
|
+
type: string;
|
|
97
|
+
body: {
|
|
98
|
+
type: string;
|
|
99
|
+
body: ({
|
|
100
|
+
type: string;
|
|
101
|
+
label: string;
|
|
102
|
+
icon: string;
|
|
103
|
+
visibleOn: string;
|
|
104
|
+
onEvent: {
|
|
105
|
+
click: {
|
|
106
|
+
actions: {
|
|
107
|
+
actionType: string;
|
|
108
|
+
script: string;
|
|
109
|
+
}[];
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
id?: undefined;
|
|
113
|
+
level?: undefined;
|
|
114
|
+
} | {
|
|
115
|
+
type: string;
|
|
116
|
+
label: string;
|
|
117
|
+
onEvent: {
|
|
118
|
+
click: {
|
|
119
|
+
actions: {
|
|
120
|
+
actionType: string;
|
|
121
|
+
dialog: {
|
|
122
|
+
type: string;
|
|
123
|
+
size: string;
|
|
124
|
+
title: string;
|
|
125
|
+
body: {
|
|
126
|
+
type: string;
|
|
127
|
+
title: string;
|
|
128
|
+
body: {
|
|
129
|
+
label: string;
|
|
130
|
+
type: string;
|
|
131
|
+
name: string;
|
|
132
|
+
id: string;
|
|
133
|
+
source: {
|
|
134
|
+
method: string;
|
|
135
|
+
url: string;
|
|
136
|
+
dataType: string;
|
|
137
|
+
headers: {
|
|
138
|
+
Authorization: string;
|
|
139
|
+
};
|
|
140
|
+
data: any;
|
|
141
|
+
requestAdaptor: string;
|
|
142
|
+
adaptor: string;
|
|
143
|
+
};
|
|
144
|
+
options: any[];
|
|
145
|
+
required: boolean;
|
|
146
|
+
placeholder: string;
|
|
147
|
+
className: string;
|
|
148
|
+
checkAll: boolean;
|
|
149
|
+
searchable: boolean;
|
|
150
|
+
sortable: boolean;
|
|
151
|
+
joinValues: boolean;
|
|
152
|
+
extractValue: boolean;
|
|
153
|
+
multiple: boolean;
|
|
154
|
+
}[];
|
|
155
|
+
id: string;
|
|
156
|
+
mode: string;
|
|
157
|
+
persistData: boolean;
|
|
158
|
+
promptPageLeave: boolean;
|
|
159
|
+
name: string;
|
|
160
|
+
debug: boolean;
|
|
161
|
+
actions: any[];
|
|
162
|
+
panelClassName: string;
|
|
163
|
+
bodyClassName: string;
|
|
164
|
+
className: string;
|
|
165
|
+
}[];
|
|
166
|
+
id: string;
|
|
167
|
+
actions: ({
|
|
168
|
+
type: string;
|
|
169
|
+
label: string;
|
|
170
|
+
onEvent: {
|
|
171
|
+
click: {
|
|
172
|
+
actions: {
|
|
173
|
+
componentId: string;
|
|
174
|
+
args: {};
|
|
175
|
+
actionType: string;
|
|
176
|
+
}[];
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
id: string;
|
|
180
|
+
level?: undefined;
|
|
181
|
+
} | {
|
|
182
|
+
type: string;
|
|
183
|
+
label: string;
|
|
184
|
+
onEvent: {
|
|
185
|
+
click: {
|
|
186
|
+
actions: ({
|
|
187
|
+
actionType: string;
|
|
188
|
+
script: string;
|
|
189
|
+
componentId?: undefined;
|
|
190
|
+
args?: undefined;
|
|
191
|
+
} | {
|
|
192
|
+
componentId: string;
|
|
193
|
+
args: {};
|
|
194
|
+
actionType: string;
|
|
195
|
+
script?: undefined;
|
|
196
|
+
})[];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
id: string;
|
|
200
|
+
level: string;
|
|
201
|
+
})[];
|
|
202
|
+
closeOnEsc: boolean;
|
|
203
|
+
closeOnOutside: boolean;
|
|
204
|
+
showCloseButton: boolean;
|
|
205
|
+
data: {
|
|
206
|
+
"&": string;
|
|
207
|
+
objectName: string;
|
|
208
|
+
listName: string;
|
|
209
|
+
context: string;
|
|
210
|
+
fields: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
}[];
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
id: string;
|
|
217
|
+
level: string;
|
|
218
|
+
icon?: undefined;
|
|
219
|
+
visibleOn?: undefined;
|
|
220
|
+
})[];
|
|
221
|
+
size: string;
|
|
222
|
+
className: string;
|
|
223
|
+
};
|
|
224
|
+
size: string;
|
|
225
|
+
className: string;
|
|
226
|
+
visibleOn?: undefined;
|
|
227
|
+
})[];
|
|
228
|
+
size: string;
|
|
229
|
+
className: string;
|
|
230
|
+
};
|
|
231
|
+
size: string;
|
|
232
|
+
className: string;
|
|
233
|
+
};
|
|
234
|
+
visibleOn: string;
|
|
235
|
+
className: string;
|
|
236
|
+
}>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param {*} objectSchema 对象UISchema
|
|
4
4
|
* @returns amisSchema
|
|
5
5
|
*/
|
|
6
|
-
export function getObjectListHeader(objectSchema: any, listViewName: any): Promise<{
|
|
6
|
+
export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: any): Promise<{
|
|
7
7
|
type: string;
|
|
8
8
|
body: ({
|
|
9
9
|
type: string;
|
|
@@ -73,6 +73,24 @@ export function getObjectListHeader(objectSchema: any, listViewName: any): Promi
|
|
|
73
73
|
align: string;
|
|
74
74
|
columns: {
|
|
75
75
|
body: ({
|
|
76
|
+
type: string;
|
|
77
|
+
label: string;
|
|
78
|
+
icon: string;
|
|
79
|
+
className: string;
|
|
80
|
+
onEvent: {
|
|
81
|
+
click: {
|
|
82
|
+
actions: {
|
|
83
|
+
actionType: string;
|
|
84
|
+
args: {
|
|
85
|
+
value: {
|
|
86
|
+
showFieldsFilter: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
componentId: string;
|
|
90
|
+
}[];
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
} | {
|
|
76
94
|
type: string;
|
|
77
95
|
label: string;
|
|
78
96
|
icon: string;
|
|
@@ -101,10 +119,11 @@ export function getObjectListHeader(objectSchema: any, listViewName: any): Promi
|
|
|
101
119
|
})[];
|
|
102
120
|
md: string;
|
|
103
121
|
}[];
|
|
122
|
+
className: string;
|
|
104
123
|
})[];
|
|
105
124
|
size: string;
|
|
106
125
|
className: string;
|
|
107
|
-
}>;
|
|
126
|
+
}[]>;
|
|
108
127
|
/**
|
|
109
128
|
* 记录详细界面顶部头amisSchema,也是标题面板组件的amisSchema
|
|
110
129
|
* @param {*} objectSchema 对象UISchema
|
|
@@ -91,6 +91,7 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
|
|
|
91
91
|
visibleOn: string;
|
|
92
92
|
} & {
|
|
93
93
|
clearValueOnHidden: boolean;
|
|
94
|
+
fieldName: any;
|
|
94
95
|
})[];
|
|
95
96
|
}[];
|
|
96
97
|
className: string;
|
|
@@ -351,13 +352,16 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
|
|
|
351
352
|
record: any;
|
|
352
353
|
masterObjectUISchema: any;
|
|
353
354
|
}>;
|
|
354
|
-
export function getSearchableFieldsFilterSchema(fields: any, cols: any): Promise<{
|
|
355
|
+
export function getSearchableFieldsFilterSchema(objectSchema: any, fields: any, cols: any): Promise<{
|
|
355
356
|
title: string;
|
|
356
357
|
type: string;
|
|
357
358
|
name: string;
|
|
359
|
+
id: string;
|
|
358
360
|
mode: string;
|
|
359
361
|
wrapWithPanel: boolean;
|
|
360
362
|
className: string;
|
|
363
|
+
persistData: string;
|
|
364
|
+
persistDataKeys: any[];
|
|
361
365
|
body: ({
|
|
362
366
|
name: any;
|
|
363
367
|
label: any;
|
|
@@ -375,6 +379,7 @@ export function getSearchableFieldsFilterSchema(fields: any, cols: any): Promise
|
|
|
375
379
|
visibleOn: string;
|
|
376
380
|
} & {
|
|
377
381
|
clearValueOnHidden: boolean;
|
|
382
|
+
fieldName: any;
|
|
378
383
|
})[];
|
|
379
384
|
}>;
|
|
380
385
|
export function setUISchemaFunction(fun: any): void;
|
|
@@ -103,6 +103,24 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
|
|
|
103
103
|
align: string;
|
|
104
104
|
columns: {
|
|
105
105
|
body: ({
|
|
106
|
+
type: string;
|
|
107
|
+
label: string;
|
|
108
|
+
icon: string;
|
|
109
|
+
className: string;
|
|
110
|
+
onEvent: {
|
|
111
|
+
click: {
|
|
112
|
+
actions: {
|
|
113
|
+
actionType: string;
|
|
114
|
+
args: {
|
|
115
|
+
value: {
|
|
116
|
+
showFieldsFilter: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
componentId: string;
|
|
120
|
+
}[];
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
} | {
|
|
106
124
|
type: string;
|
|
107
125
|
label: string;
|
|
108
126
|
icon: string;
|
|
@@ -131,10 +149,11 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
|
|
|
131
149
|
})[];
|
|
132
150
|
md: string;
|
|
133
151
|
}[];
|
|
152
|
+
className: string;
|
|
134
153
|
})[];
|
|
135
154
|
size: string;
|
|
136
155
|
className: string;
|
|
137
|
-
};
|
|
156
|
+
}[];
|
|
138
157
|
}[];
|
|
139
158
|
}>;
|
|
140
159
|
export function getRecordPageInitSchema(objectApiName: any): Promise<{
|