@steedos-widgets/amis-lib 1.0.13 → 1.0.14
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 +36 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +36 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +76 -62
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/converter/amis/api.d.ts +2 -2
- package/dist/types/lib/converter/amis/fields_filter.d.ts +0 -12
- package/dist/types/lib/converter/amis/graphql.d.ts +2 -2
- package/dist/types/lib/converter/amis/header.d.ts +8 -23
- package/dist/types/lib/converter/amis/toolbar.d.ts +2 -36
- package/dist/types/lib/objects.d.ts +6 -23
- package/dist/types/lib/page_init.d.ts +8 -7
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './lib/public.env';
|
|
|
12
12
|
export * from './lib/record';
|
|
13
13
|
export * from './lib/space_users';
|
|
14
14
|
export * from './lib/steedos.client.js';
|
|
15
|
+
export * as Field from './lib/converter/amis/fields/index';
|
|
15
16
|
export * from './lib/converter/amis/fields/lookup';
|
|
16
17
|
export * from './lib/converter/amis/fields/user';
|
|
17
18
|
export * from './lib/converter/amis/filters';
|
|
@@ -27,9 +27,9 @@ export function getSaveApi(object: any, recordId: any, fields: any, options: any
|
|
|
27
27
|
method: string;
|
|
28
28
|
url: string;
|
|
29
29
|
data: {
|
|
30
|
-
objectName:
|
|
30
|
+
objectName: any;
|
|
31
31
|
$: string;
|
|
32
|
-
recordId:
|
|
32
|
+
recordId: any;
|
|
33
33
|
modalName: string;
|
|
34
34
|
};
|
|
35
35
|
requestAdaptor: string;
|
|
@@ -265,16 +265,4 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
|
|
|
265
265
|
visibleOn: string;
|
|
266
266
|
};
|
|
267
267
|
className: string;
|
|
268
|
-
onEvent: {
|
|
269
|
-
broadcast_toggle_fields_filter: {
|
|
270
|
-
actions: {
|
|
271
|
-
actionType: string;
|
|
272
|
-
args: {
|
|
273
|
-
value: {
|
|
274
|
-
showFieldsFilter: string;
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
}[];
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
268
|
}>;
|
|
@@ -4,9 +4,9 @@ export function getFindOneQuery(object: any, recordId: any, fields: any, options
|
|
|
4
4
|
query: string;
|
|
5
5
|
}>;
|
|
6
6
|
export function getSaveQuery(object: any, recordId: any, fields: any, options: any): {
|
|
7
|
-
objectName:
|
|
7
|
+
objectName: any;
|
|
8
8
|
$: string;
|
|
9
|
-
recordId:
|
|
9
|
+
recordId: any;
|
|
10
10
|
modalName: string;
|
|
11
11
|
};
|
|
12
12
|
export function getScriptForReadonlyFields(fields: any): string;
|
|
@@ -135,6 +135,11 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
|
|
|
135
135
|
type: string;
|
|
136
136
|
data: {};
|
|
137
137
|
id: string;
|
|
138
|
+
/**
|
|
139
|
+
* 列表视图顶部amisSchema
|
|
140
|
+
* @param {*} objectSchema 对象UISchema
|
|
141
|
+
* @returns amisSchema
|
|
142
|
+
*/
|
|
138
143
|
dataProvider: {
|
|
139
144
|
inited: string;
|
|
140
145
|
};
|
|
@@ -345,18 +350,6 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
|
|
|
345
350
|
visibleOn: string;
|
|
346
351
|
};
|
|
347
352
|
className: string;
|
|
348
|
-
onEvent: {
|
|
349
|
-
broadcast_toggle_fields_filter: {
|
|
350
|
-
actions: {
|
|
351
|
-
actionType: string;
|
|
352
|
-
args: {
|
|
353
|
-
value: {
|
|
354
|
-
showFieldsFilter: string;
|
|
355
|
-
};
|
|
356
|
-
};
|
|
357
|
-
}[];
|
|
358
|
-
};
|
|
359
|
-
};
|
|
360
353
|
}>;
|
|
361
354
|
/**
|
|
362
355
|
* 列表视图顶部amisSchema
|
|
@@ -437,18 +430,15 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
|
|
|
437
430
|
* 记录详细界面顶部头amisSchema,也是标题面板组件的amisSchema
|
|
438
431
|
* @param {*} objectSchema 对象UISchema
|
|
439
432
|
* @param {*} recordId 记录id
|
|
433
|
+
* @param {*} optioins: {showRecordTitle: true}
|
|
440
434
|
* @returns amisSchema
|
|
441
435
|
*/
|
|
442
|
-
export function getObjectRecordDetailHeader(objectSchema: any, recordId: any): Promise<{
|
|
436
|
+
export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, options: any): Promise<{
|
|
443
437
|
type: string;
|
|
444
438
|
bodyClassName: string;
|
|
445
439
|
name: string;
|
|
446
440
|
data: {
|
|
447
|
-
|
|
448
|
-
rootUrl: any;
|
|
449
|
-
tenantId: any;
|
|
450
|
-
authToken: any;
|
|
451
|
-
};
|
|
441
|
+
"&": string;
|
|
452
442
|
objectName: any;
|
|
453
443
|
_id: any;
|
|
454
444
|
recordPermissions: any;
|
|
@@ -456,11 +446,6 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any): P
|
|
|
456
446
|
};
|
|
457
447
|
body: {
|
|
458
448
|
type: string;
|
|
459
|
-
data: {
|
|
460
|
-
"&": string;
|
|
461
|
-
record: string;
|
|
462
|
-
recordLoaded: string;
|
|
463
|
-
};
|
|
464
449
|
body: {
|
|
465
450
|
type: string;
|
|
466
451
|
className: string;
|
|
@@ -1,28 +1,8 @@
|
|
|
1
1
|
export function getObjectHeaderToolbar(mainObject: any, formFactor: any): (string | {
|
|
2
|
-
type: string;
|
|
3
|
-
align: string;
|
|
4
|
-
name?: undefined;
|
|
5
|
-
placeholder?: undefined;
|
|
6
|
-
mini?: undefined;
|
|
7
|
-
} | {
|
|
8
|
-
type: string;
|
|
9
|
-
align: string;
|
|
10
|
-
name: string;
|
|
11
|
-
placeholder: string;
|
|
12
|
-
mini: boolean;
|
|
13
|
-
})[] | (string | {
|
|
14
|
-
type: string;
|
|
15
|
-
className: string;
|
|
16
|
-
tpl?: undefined;
|
|
17
|
-
align?: undefined;
|
|
18
|
-
label?: undefined;
|
|
19
|
-
icon?: undefined;
|
|
20
|
-
onEvent?: undefined;
|
|
21
|
-
} | {
|
|
22
2
|
type: string;
|
|
23
3
|
tpl: string;
|
|
24
|
-
className?: undefined;
|
|
25
4
|
align?: undefined;
|
|
5
|
+
className?: undefined;
|
|
26
6
|
label?: undefined;
|
|
27
7
|
icon?: undefined;
|
|
28
8
|
onEvent?: undefined;
|
|
@@ -44,9 +24,7 @@ export function getObjectHeaderToolbar(mainObject: any, formFactor: any): (strin
|
|
|
44
24
|
click: {
|
|
45
25
|
actions: {
|
|
46
26
|
actionType: string;
|
|
47
|
-
|
|
48
|
-
eventName: string;
|
|
49
|
-
};
|
|
27
|
+
script: string;
|
|
50
28
|
}[];
|
|
51
29
|
};
|
|
52
30
|
};
|
|
@@ -273,17 +251,5 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
|
|
|
273
251
|
visibleOn: string;
|
|
274
252
|
};
|
|
275
253
|
className: string;
|
|
276
|
-
onEvent: {
|
|
277
|
-
broadcast_toggle_fields_filter: {
|
|
278
|
-
actions: {
|
|
279
|
-
actionType: string;
|
|
280
|
-
args: {
|
|
281
|
-
value: {
|
|
282
|
-
showFieldsFilter: string;
|
|
283
|
-
};
|
|
284
|
-
};
|
|
285
|
-
}[];
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
254
|
}[];
|
|
289
255
|
}>;
|
|
@@ -305,18 +305,14 @@ export function getCalendarSchema(appName: any, objectName: any, calendarOptions
|
|
|
305
305
|
};
|
|
306
306
|
};
|
|
307
307
|
}>;
|
|
308
|
-
export function getRecordDetailHeaderSchema(objectName: any, recordId: any): Promise<{
|
|
308
|
+
export function getRecordDetailHeaderSchema(objectName: any, recordId: any, options: any): Promise<{
|
|
309
309
|
uiSchema: any;
|
|
310
310
|
amisSchema: {
|
|
311
311
|
type: string;
|
|
312
312
|
bodyClassName: string;
|
|
313
313
|
name: string;
|
|
314
314
|
data: {
|
|
315
|
-
|
|
316
|
-
rootUrl: any;
|
|
317
|
-
tenantId: any;
|
|
318
|
-
authToken: any;
|
|
319
|
-
};
|
|
315
|
+
"&": string;
|
|
320
316
|
objectName: any;
|
|
321
317
|
_id: any;
|
|
322
318
|
recordPermissions: any;
|
|
@@ -324,11 +320,6 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any): Pro
|
|
|
324
320
|
};
|
|
325
321
|
body: {
|
|
326
322
|
type: string;
|
|
327
|
-
data: {
|
|
328
|
-
"&": string;
|
|
329
|
-
record: string;
|
|
330
|
-
recordLoaded: string;
|
|
331
|
-
};
|
|
332
323
|
body: {
|
|
333
324
|
type: string;
|
|
334
325
|
className: string;
|
|
@@ -395,22 +386,14 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
|
|
|
395
386
|
id: string;
|
|
396
387
|
onEvent: {
|
|
397
388
|
recordLoaded: {
|
|
398
|
-
actions:
|
|
389
|
+
actions: {
|
|
399
390
|
actionType: string;
|
|
400
391
|
data: {
|
|
401
392
|
name: string;
|
|
393
|
+
record: string;
|
|
394
|
+
recordLoaded: boolean;
|
|
402
395
|
};
|
|
403
|
-
|
|
404
|
-
} | {
|
|
405
|
-
actionType: string;
|
|
406
|
-
args: {
|
|
407
|
-
value: {
|
|
408
|
-
record: string;
|
|
409
|
-
recordLoaded: boolean;
|
|
410
|
-
};
|
|
411
|
-
};
|
|
412
|
-
data?: undefined;
|
|
413
|
-
})[];
|
|
396
|
+
}[];
|
|
414
397
|
};
|
|
415
398
|
};
|
|
416
399
|
className?: undefined;
|
|
@@ -48,20 +48,21 @@ export function getRecordPageInitSchema(objectApiName: any): Promise<{
|
|
|
48
48
|
onEvent: {
|
|
49
49
|
recordLoaded: {
|
|
50
50
|
actions: ({
|
|
51
|
-
actionType: string;
|
|
52
|
-
data: {
|
|
53
|
-
name: string;
|
|
54
|
-
};
|
|
55
|
-
args?: undefined;
|
|
56
|
-
} | {
|
|
57
51
|
actionType: string;
|
|
58
52
|
args: {
|
|
59
53
|
value: {
|
|
60
|
-
record: string;
|
|
61
54
|
recordLoaded: boolean;
|
|
62
55
|
};
|
|
63
56
|
};
|
|
64
57
|
data?: undefined;
|
|
58
|
+
} | {
|
|
59
|
+
actionType: string;
|
|
60
|
+
data: {
|
|
61
|
+
name: string;
|
|
62
|
+
record: string;
|
|
63
|
+
recordLoaded: boolean;
|
|
64
|
+
};
|
|
65
|
+
args?: undefined;
|
|
65
66
|
})[];
|
|
66
67
|
};
|
|
67
68
|
};
|
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.14",
|
|
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": "ad673af04db47a605a672cfd5601fd96d74c6142"
|
|
62
62
|
}
|