@steedos-widgets/amis-lib 1.0.15 → 1.0.17
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 +102 -49
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +102 -49
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +126 -73
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/fields/index.d.ts +1 -1
- package/dist/types/lib/converter/amis/fields/lookup.d.ts +23 -0
- package/dist/types/lib/converter/amis/fields/table.d.ts +23 -0
- package/dist/types/lib/converter/amis/fields_filter.d.ts +3 -35
- package/dist/types/lib/converter/amis/header.d.ts +3 -32
- package/dist/types/lib/converter/amis/toolbar.d.ts +3 -27
- package/dist/types/lib/converter/amis/tpl.d.ts +2 -0
- package/dist/types/lib/objects.d.ts +13 -9
- package/dist/types/lib/objectsRelated.d.ts +1 -0
- package/package.json +2 -2
|
@@ -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" | "
|
|
9
|
+
export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "text" | "password" | "textarea" | "picker" | "table" | "markdown" | "email" | "html" | "checkbox";
|
|
10
10
|
export function getObjectFieldSubFields(mainField: any, fields: any): any;
|
|
11
11
|
export function getGridFieldSubFields(mainField: any, fields: any): any;
|
|
12
12
|
/**
|
|
@@ -58,6 +58,29 @@ export function lookupToAmisPicker(field: any, readonly: any, ctx: any): Promise
|
|
|
58
58
|
perPage: any;
|
|
59
59
|
};
|
|
60
60
|
columns: {
|
|
61
|
+
name: any;
|
|
62
|
+
label: any;
|
|
63
|
+
sortable: any;
|
|
64
|
+
type: string;
|
|
65
|
+
blank: boolean;
|
|
66
|
+
href: string;
|
|
67
|
+
className: string;
|
|
68
|
+
body: {
|
|
69
|
+
type: string;
|
|
70
|
+
body: {
|
|
71
|
+
type: string;
|
|
72
|
+
body: {
|
|
73
|
+
type: string;
|
|
74
|
+
tpl: any;
|
|
75
|
+
className: string;
|
|
76
|
+
}[];
|
|
77
|
+
size: string;
|
|
78
|
+
className: string;
|
|
79
|
+
}[];
|
|
80
|
+
size: string;
|
|
81
|
+
className: string;
|
|
82
|
+
};
|
|
83
|
+
}[] | {
|
|
61
84
|
name: string;
|
|
62
85
|
type: string;
|
|
63
86
|
width: number;
|
|
@@ -8,6 +8,29 @@ export function getTableSchema(fields: any, options: any): Promise<{
|
|
|
8
8
|
perPage: any;
|
|
9
9
|
};
|
|
10
10
|
columns: {
|
|
11
|
+
name: any;
|
|
12
|
+
label: any;
|
|
13
|
+
sortable: any;
|
|
14
|
+
type: string;
|
|
15
|
+
blank: boolean;
|
|
16
|
+
href: string;
|
|
17
|
+
className: string;
|
|
18
|
+
body: {
|
|
19
|
+
type: string;
|
|
20
|
+
body: {
|
|
21
|
+
type: string;
|
|
22
|
+
body: {
|
|
23
|
+
type: string;
|
|
24
|
+
tpl: any;
|
|
25
|
+
className: string;
|
|
26
|
+
}[];
|
|
27
|
+
size: string;
|
|
28
|
+
className: string;
|
|
29
|
+
}[];
|
|
30
|
+
size: string;
|
|
31
|
+
className: string;
|
|
32
|
+
};
|
|
33
|
+
}[] | {
|
|
11
34
|
name: string;
|
|
12
35
|
type: string;
|
|
13
36
|
width: number;
|
|
@@ -33,17 +33,10 @@ export function getObjectFieldsFilterFormSchema(objectSchema: any, fields: any,
|
|
|
33
33
|
quickEdit: boolean;
|
|
34
34
|
visibleOn: string;
|
|
35
35
|
}[];
|
|
36
|
-
onEvent: {
|
|
37
|
-
broadcastSearchableFieldsChange: {
|
|
38
|
-
actions: {
|
|
39
|
-
actionType: string;
|
|
40
|
-
script: string;
|
|
41
|
-
}[];
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
36
|
}>;
|
|
45
37
|
export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, ctx: any): Promise<{
|
|
46
38
|
type: string;
|
|
39
|
+
name: string;
|
|
47
40
|
data: {};
|
|
48
41
|
id: string;
|
|
49
42
|
dataProvider: {
|
|
@@ -74,14 +67,6 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
|
|
|
74
67
|
quickEdit: boolean;
|
|
75
68
|
visibleOn: string;
|
|
76
69
|
}[];
|
|
77
|
-
onEvent: {
|
|
78
|
-
broadcastSearchableFieldsChange: {
|
|
79
|
-
actions: {
|
|
80
|
-
actionType: string;
|
|
81
|
-
script: string;
|
|
82
|
-
}[];
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
70
|
}[];
|
|
86
71
|
size: string;
|
|
87
72
|
visibleOn: string;
|
|
@@ -180,30 +165,13 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
|
|
|
180
165
|
actions: ({
|
|
181
166
|
actionType: string;
|
|
182
167
|
script: string;
|
|
183
|
-
eventName?: undefined;
|
|
184
|
-
args?: undefined;
|
|
185
|
-
data?: undefined;
|
|
186
|
-
componentId?: undefined;
|
|
187
|
-
} | {
|
|
188
|
-
actionType: string;
|
|
189
|
-
eventName: string;
|
|
190
|
-
args: {
|
|
191
|
-
eventName: string;
|
|
192
|
-
};
|
|
193
|
-
data: {
|
|
194
|
-
fields: string;
|
|
195
|
-
};
|
|
196
|
-
script?: undefined;
|
|
197
168
|
componentId?: undefined;
|
|
169
|
+
args?: undefined;
|
|
198
170
|
} | {
|
|
199
171
|
componentId: string;
|
|
200
|
-
args: {
|
|
201
|
-
eventName?: undefined;
|
|
202
|
-
};
|
|
172
|
+
args: {};
|
|
203
173
|
actionType: string;
|
|
204
174
|
script?: undefined;
|
|
205
|
-
eventName?: undefined;
|
|
206
|
-
data?: undefined;
|
|
207
175
|
})[];
|
|
208
176
|
};
|
|
209
177
|
};
|
|
@@ -133,13 +133,9 @@ export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: a
|
|
|
133
133
|
*/
|
|
134
134
|
export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewName: any, ctx: any): Promise<{
|
|
135
135
|
type: string;
|
|
136
|
+
name: string;
|
|
136
137
|
data: {};
|
|
137
138
|
id: string;
|
|
138
|
-
/**
|
|
139
|
-
* 列表视图顶部amisSchema
|
|
140
|
-
* @param {*} objectSchema 对象UISchema
|
|
141
|
-
* @returns amisSchema
|
|
142
|
-
*/
|
|
143
139
|
dataProvider: {
|
|
144
140
|
inited: string;
|
|
145
141
|
};
|
|
@@ -168,14 +164,6 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
|
|
|
168
164
|
quickEdit: boolean;
|
|
169
165
|
visibleOn: string;
|
|
170
166
|
}[];
|
|
171
|
-
onEvent: {
|
|
172
|
-
broadcastSearchableFieldsChange: {
|
|
173
|
-
actions: {
|
|
174
|
-
actionType: string;
|
|
175
|
-
script: string;
|
|
176
|
-
}[];
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
167
|
}[];
|
|
180
168
|
size: string;
|
|
181
169
|
visibleOn: string;
|
|
@@ -274,30 +262,13 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
|
|
|
274
262
|
actions: ({
|
|
275
263
|
actionType: string;
|
|
276
264
|
script: string;
|
|
277
|
-
eventName?: undefined;
|
|
278
|
-
args?: undefined;
|
|
279
|
-
data?: undefined;
|
|
280
|
-
componentId?: undefined;
|
|
281
|
-
} | {
|
|
282
|
-
actionType: string;
|
|
283
|
-
eventName: string;
|
|
284
|
-
args: {
|
|
285
|
-
eventName: string;
|
|
286
|
-
};
|
|
287
|
-
data: {
|
|
288
|
-
fields: string;
|
|
289
|
-
};
|
|
290
|
-
script?: undefined;
|
|
291
265
|
componentId?: undefined;
|
|
266
|
+
args?: undefined;
|
|
292
267
|
} | {
|
|
293
268
|
componentId: string;
|
|
294
|
-
args: {
|
|
295
|
-
eventName?: undefined;
|
|
296
|
-
};
|
|
269
|
+
args: {};
|
|
297
270
|
actionType: string;
|
|
298
271
|
script?: undefined;
|
|
299
|
-
eventName?: undefined;
|
|
300
|
-
data?: undefined;
|
|
301
272
|
})[];
|
|
302
273
|
};
|
|
303
274
|
};
|
|
@@ -47,6 +47,7 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
|
|
|
47
47
|
wrapWithPanel: boolean;
|
|
48
48
|
body: {
|
|
49
49
|
type: string;
|
|
50
|
+
name: string;
|
|
50
51
|
data: {};
|
|
51
52
|
id: string;
|
|
52
53
|
dataProvider: {
|
|
@@ -77,14 +78,6 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
|
|
|
77
78
|
quickEdit: boolean;
|
|
78
79
|
visibleOn: string;
|
|
79
80
|
}[];
|
|
80
|
-
onEvent: {
|
|
81
|
-
broadcastSearchableFieldsChange: {
|
|
82
|
-
actions: {
|
|
83
|
-
actionType: string;
|
|
84
|
-
script: string;
|
|
85
|
-
}[];
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
81
|
}[];
|
|
89
82
|
size: string;
|
|
90
83
|
visibleOn: string;
|
|
@@ -183,30 +176,13 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
|
|
|
183
176
|
actions: ({
|
|
184
177
|
actionType: string;
|
|
185
178
|
script: string;
|
|
186
|
-
eventName?: undefined;
|
|
187
|
-
args?: undefined;
|
|
188
|
-
data?: undefined;
|
|
189
|
-
componentId?: undefined;
|
|
190
|
-
} | {
|
|
191
|
-
actionType: string;
|
|
192
|
-
eventName: string;
|
|
193
|
-
args: {
|
|
194
|
-
eventName: string;
|
|
195
|
-
};
|
|
196
|
-
data: {
|
|
197
|
-
fields: string;
|
|
198
|
-
};
|
|
199
|
-
script?: undefined;
|
|
200
179
|
componentId?: undefined;
|
|
180
|
+
args?: undefined;
|
|
201
181
|
} | {
|
|
202
182
|
componentId: string;
|
|
203
|
-
args: {
|
|
204
|
-
eventName?: undefined;
|
|
205
|
-
};
|
|
183
|
+
args: {};
|
|
206
184
|
actionType: string;
|
|
207
185
|
script?: undefined;
|
|
208
|
-
eventName?: undefined;
|
|
209
|
-
data?: undefined;
|
|
210
186
|
})[];
|
|
211
187
|
};
|
|
212
188
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export function getCreatedInfoTpl(formFactor: any): string;
|
|
2
2
|
export function getModifiedInfoTpl(formFactor: any): string;
|
|
3
3
|
export function getNumberTpl(field: any): string;
|
|
4
|
+
export function getTextTpl(field: any): string;
|
|
4
5
|
export function getTimeTpl(field: any): string;
|
|
5
6
|
export function getDateTpl(field: any): string;
|
|
6
7
|
export function getDateTimeTpl(field: any): string;
|
|
@@ -8,6 +9,7 @@ export function getUiFieldTpl(field: any): string;
|
|
|
8
9
|
export function getUiFileSizeTpl(field: any): string;
|
|
9
10
|
export function getRefObjectNameFieldName(field: any): Promise<any>;
|
|
10
11
|
export function getSelectTpl(field: any): string;
|
|
12
|
+
export function getNameTplUrl(field: any, ctx: any): string;
|
|
11
13
|
export function getNameTpl(field: any, ctx: any): string;
|
|
12
14
|
export function getRelatedFieldTpl(field: any, ctx: any): string;
|
|
13
15
|
export function getLookupTpl(field: any, ctx: any): Promise<string>;
|
|
@@ -141,6 +141,7 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
|
|
|
141
141
|
columns: any;
|
|
142
142
|
extraColumns: any;
|
|
143
143
|
filters: any;
|
|
144
|
+
filtersFunction: any;
|
|
144
145
|
sort: string;
|
|
145
146
|
ctx: {};
|
|
146
147
|
};
|
|
@@ -259,7 +260,16 @@ export function getCalendarSchema(appName: any, objectName: any, calendarOptions
|
|
|
259
260
|
objectName: string;
|
|
260
261
|
$: {};
|
|
261
262
|
$self: string;
|
|
262
|
-
};
|
|
263
|
+
}; /**
|
|
264
|
+
* localListViewProps规范来自crud请求api中api.data.$self参数值的。
|
|
265
|
+
* 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
|
|
266
|
+
* __searchable__...:顶部放大镜搜索条件
|
|
267
|
+
* filter:右侧过滤器
|
|
268
|
+
* perPage:每页条数
|
|
269
|
+
* page:当前页码
|
|
270
|
+
* orderBy:排序字段
|
|
271
|
+
* orderDir:排序方向
|
|
272
|
+
*/
|
|
263
273
|
requestAdaptor: string;
|
|
264
274
|
adaptor: string;
|
|
265
275
|
headers: {
|
|
@@ -464,6 +474,7 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
|
|
|
464
474
|
columns: any;
|
|
465
475
|
extraColumns: any;
|
|
466
476
|
filters: any;
|
|
477
|
+
filtersFunction: any;
|
|
467
478
|
sort: string;
|
|
468
479
|
ctx: {};
|
|
469
480
|
};
|
|
@@ -506,6 +517,7 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
|
|
|
506
517
|
columns: any;
|
|
507
518
|
extraColumns: any;
|
|
508
519
|
filters: any;
|
|
520
|
+
filtersFunction: any;
|
|
509
521
|
sort: string;
|
|
510
522
|
ctx: {};
|
|
511
523
|
};
|
|
@@ -534,13 +546,5 @@ export function getSearchableFieldsFilterSchema(objectSchema: any, fields: any,
|
|
|
534
546
|
quickEdit: boolean;
|
|
535
547
|
visibleOn: string;
|
|
536
548
|
}[];
|
|
537
|
-
onEvent: {
|
|
538
|
-
broadcastSearchableFieldsChange: {
|
|
539
|
-
actions: {
|
|
540
|
-
actionType: string;
|
|
541
|
-
script: string;
|
|
542
|
-
}[];
|
|
543
|
-
};
|
|
544
|
-
};
|
|
545
549
|
}>;
|
|
546
550
|
export function setUISchemaFunction(fun: any): 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.17",
|
|
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": "229ae20aea4ebb20c4d1ccc946902441e839f4b6"
|
|
62
62
|
}
|