@steedos-widgets/amis-object 0.0.6 → 0.0.7
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/amis/AmisObjectForm.d.ts +0 -1
- package/dist/amis/AmisObjectTable.d.ts +13 -0
- package/dist/amis/index.d.ts +1 -0
- package/dist/amis-object.cjs.js +202 -20130
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.js +179 -20131
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.js +84 -34
- package/dist/assets-dev.json +5 -5
- package/dist/assets.json +5 -5
- package/dist/meta.js +193 -30
- package/dist/metas/AmisObjectTable.d.ts +2 -0
- package/package.json +1 -1
package/dist/meta.js
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* @LastEditTime: 2022-09-02 09:04:33
|
|
38
38
|
* @Description:
|
|
39
39
|
*/
|
|
40
|
-
var config$
|
|
40
|
+
var config$7 = {
|
|
41
41
|
componentType: 'amisSchema',
|
|
42
42
|
group: "华炎魔方",
|
|
43
43
|
componentName: "AmisObjectForm",
|
|
@@ -95,38 +95,38 @@
|
|
|
95
95
|
icon: "fa-fw fa fa-list-alt"
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
var AmisObjectForm = __assign(__assign({}, config$
|
|
98
|
+
var AmisObjectForm = __assign(__assign({}, config$7), { snippets: [
|
|
99
99
|
{
|
|
100
|
-
title: config$
|
|
100
|
+
title: config$7.title,
|
|
101
101
|
screenshot: "",
|
|
102
102
|
schema: {
|
|
103
|
-
componentName: config$
|
|
104
|
-
props: config$
|
|
103
|
+
componentName: config$7.componentName,
|
|
104
|
+
props: config$7.preview
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
], amis: {
|
|
108
108
|
render: {
|
|
109
|
-
type: config$
|
|
109
|
+
type: config$7.amis.name,
|
|
110
110
|
usage: "renderer",
|
|
111
111
|
weight: 1,
|
|
112
112
|
framework: "react"
|
|
113
113
|
},
|
|
114
114
|
plugin: {
|
|
115
|
-
rendererName: config$
|
|
115
|
+
rendererName: config$7.amis.name,
|
|
116
116
|
$schema: '/schemas/UnkownSchema.json',
|
|
117
|
-
name: config$
|
|
118
|
-
description: config$
|
|
119
|
-
tags: [config$
|
|
117
|
+
name: config$7.title,
|
|
118
|
+
description: config$7.title,
|
|
119
|
+
tags: [config$7.group],
|
|
120
120
|
order: -9999,
|
|
121
|
-
icon: config$
|
|
121
|
+
icon: config$7.amis.icon,
|
|
122
122
|
scaffold: {
|
|
123
|
-
type: config$
|
|
124
|
-
label: config$
|
|
123
|
+
type: config$7.amis.name,
|
|
124
|
+
label: config$7.title,
|
|
125
125
|
objectApiName: "${objectName}",
|
|
126
126
|
recordId: "${recordId}"
|
|
127
127
|
},
|
|
128
128
|
previewSchema: {
|
|
129
|
-
type: config$
|
|
129
|
+
type: config$7.amis.name,
|
|
130
130
|
objectApiName: 'space_users'
|
|
131
131
|
},
|
|
132
132
|
panelTitle: "设置",
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
* @LastEditTime: 2022-09-15 10:40:37
|
|
222
222
|
* @Description:
|
|
223
223
|
*/
|
|
224
|
-
var config$
|
|
224
|
+
var config$6 = {
|
|
225
225
|
componentType: 'amisSchema',
|
|
226
226
|
group: "华炎魔方",
|
|
227
227
|
componentName: "AmisObjectListView",
|
|
@@ -257,38 +257,38 @@
|
|
|
257
257
|
icon: "fa-fw fa fa-list-alt"
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
|
-
var AmisObjectListview = __assign(__assign({}, config$
|
|
260
|
+
var AmisObjectListview = __assign(__assign({}, config$6), { snippets: [
|
|
261
261
|
{
|
|
262
|
-
title: config$
|
|
262
|
+
title: config$6.title,
|
|
263
263
|
screenshot: "",
|
|
264
264
|
schema: {
|
|
265
|
-
componentName: config$
|
|
266
|
-
props: config$
|
|
265
|
+
componentName: config$6.componentName,
|
|
266
|
+
props: config$6.preview
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
], amis: {
|
|
270
270
|
render: {
|
|
271
|
-
type: config$
|
|
271
|
+
type: config$6.amis.name,
|
|
272
272
|
usage: "renderer",
|
|
273
273
|
weight: 1,
|
|
274
274
|
framework: "react"
|
|
275
275
|
},
|
|
276
276
|
plugin: {
|
|
277
|
-
rendererName: config$
|
|
277
|
+
rendererName: config$6.amis.name,
|
|
278
278
|
$schema: '/schemas/UnkownSchema.json',
|
|
279
|
-
name: config$
|
|
280
|
-
description: config$
|
|
281
|
-
tags: [config$
|
|
279
|
+
name: config$6.title,
|
|
280
|
+
description: config$6.title,
|
|
281
|
+
tags: [config$6.group],
|
|
282
282
|
order: -9999,
|
|
283
|
-
icon: config$
|
|
283
|
+
icon: config$6.amis.icon,
|
|
284
284
|
scaffold: {
|
|
285
|
-
type: config$
|
|
286
|
-
label: config$
|
|
285
|
+
type: config$6.amis.name,
|
|
286
|
+
label: config$6.title,
|
|
287
287
|
objectApiName: "${objectName}",
|
|
288
288
|
listName: "all"
|
|
289
289
|
},
|
|
290
290
|
previewSchema: {
|
|
291
|
-
type: config$
|
|
291
|
+
type: config$6.amis.name,
|
|
292
292
|
objectApiName: 'space_users',
|
|
293
293
|
listName: "all"
|
|
294
294
|
},
|
|
@@ -348,6 +348,167 @@
|
|
|
348
348
|
}
|
|
349
349
|
} });
|
|
350
350
|
|
|
351
|
+
/*
|
|
352
|
+
* @Author: baozhoutao@steedos.com
|
|
353
|
+
* @Date: 2022-08-31 16:32:35
|
|
354
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
355
|
+
* @LastEditTime: 2022-09-15 10:40:37
|
|
356
|
+
* @Description:
|
|
357
|
+
*/
|
|
358
|
+
var config$5 = {
|
|
359
|
+
componentType: 'amisSchema',
|
|
360
|
+
group: "华炎魔方",
|
|
361
|
+
componentName: "AmisObjectTable",
|
|
362
|
+
title: "对象表格",
|
|
363
|
+
docUrl: "",
|
|
364
|
+
screenshot: "",
|
|
365
|
+
npm: {
|
|
366
|
+
package: "@steedos-widgets/amis-object",
|
|
367
|
+
version: "{{version}}",
|
|
368
|
+
exportName: "AmisObjectTable",
|
|
369
|
+
main: "",
|
|
370
|
+
destructuring: true,
|
|
371
|
+
subName: ""
|
|
372
|
+
},
|
|
373
|
+
props: [
|
|
374
|
+
{
|
|
375
|
+
name: "objectApiName",
|
|
376
|
+
propType: "string",
|
|
377
|
+
description: '对象名称',
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: "columns",
|
|
381
|
+
propType: "array",
|
|
382
|
+
description: '显示列',
|
|
383
|
+
}
|
|
384
|
+
],
|
|
385
|
+
preview: {},
|
|
386
|
+
targets: ["steedos__RecordPage", "steedos__AppPage", "steedos__HomePage"],
|
|
387
|
+
engines: ["amis"],
|
|
388
|
+
// settings for amis.
|
|
389
|
+
amis: {
|
|
390
|
+
name: 'steedos-object-table',
|
|
391
|
+
icon: "fa-fw fa fa-list-alt"
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
var AmisObjectTable = __assign(__assign({}, config$5), { snippets: [
|
|
395
|
+
{
|
|
396
|
+
title: config$5.title,
|
|
397
|
+
screenshot: "",
|
|
398
|
+
schema: {
|
|
399
|
+
componentName: config$5.componentName,
|
|
400
|
+
props: config$5.preview
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
], amis: {
|
|
404
|
+
render: {
|
|
405
|
+
type: config$5.amis.name,
|
|
406
|
+
usage: "renderer",
|
|
407
|
+
weight: 1,
|
|
408
|
+
framework: "react"
|
|
409
|
+
},
|
|
410
|
+
plugin: {
|
|
411
|
+
rendererName: config$5.amis.name,
|
|
412
|
+
$schema: '/schemas/UnkownSchema.json',
|
|
413
|
+
name: config$5.title,
|
|
414
|
+
description: config$5.title,
|
|
415
|
+
tags: [config$5.group],
|
|
416
|
+
order: -9999,
|
|
417
|
+
icon: config$5.amis.icon,
|
|
418
|
+
scaffold: {
|
|
419
|
+
type: config$5.amis.name,
|
|
420
|
+
label: config$5.title,
|
|
421
|
+
objectApiName: "${objectName}",
|
|
422
|
+
columns: [{ "field": "name" }]
|
|
423
|
+
},
|
|
424
|
+
previewSchema: {
|
|
425
|
+
type: config$5.amis.name,
|
|
426
|
+
objectApiName: 'space_users',
|
|
427
|
+
columns: [{ "field": "name" }]
|
|
428
|
+
},
|
|
429
|
+
panelTitle: "设置",
|
|
430
|
+
panelControls: [
|
|
431
|
+
{
|
|
432
|
+
"type": "select",
|
|
433
|
+
"label": "对象",
|
|
434
|
+
"name": "objectApiName",
|
|
435
|
+
"searchable": true,
|
|
436
|
+
"multiple": false,
|
|
437
|
+
"source": {
|
|
438
|
+
"method": "get",
|
|
439
|
+
"url": "/service/api/amis-design/objects",
|
|
440
|
+
"requestAdaptor": "api.url = Builder.settings.rootUrl + api.url; if(!api.headers){api.headers = {}};api.headers.Authorization='Bearer ' + Builder.settings.tenantId + ',' + Builder.settings.authToken ;return api;",
|
|
441
|
+
"adaptor": "\n let data = payload.data;\n payload.unshift({\n label: \"${objectName}\",\n name: \"${objectName}\"\n });\n return payload;\n "
|
|
442
|
+
},
|
|
443
|
+
"labelField": "label",
|
|
444
|
+
"valueField": "name",
|
|
445
|
+
"menuTpl": ""
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"type": "combo",
|
|
449
|
+
"name": "columns",
|
|
450
|
+
"label": "显示列",
|
|
451
|
+
"multiLine": true,
|
|
452
|
+
"multiple": true,
|
|
453
|
+
"draggable": true,
|
|
454
|
+
"items": [
|
|
455
|
+
{
|
|
456
|
+
"name": "field",
|
|
457
|
+
"type": "input-text",
|
|
458
|
+
"placeholder": "字段"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"name": "width",
|
|
462
|
+
"type": "input-text",
|
|
463
|
+
"placeholder": "宽度"
|
|
464
|
+
},
|
|
465
|
+
// {
|
|
466
|
+
// "name": "wrap",
|
|
467
|
+
// "type": "checkbox",
|
|
468
|
+
// "option": "换行"
|
|
469
|
+
// }
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
// {
|
|
473
|
+
// "type": "condition-builder",
|
|
474
|
+
// "name": "filters",
|
|
475
|
+
// "label": "过滤条件",
|
|
476
|
+
// "source": {
|
|
477
|
+
// "method": "get",
|
|
478
|
+
// "url": "/service/api/amis-metadata-listviews/getFilterFields?objectName=${objectApiName === '${objectName}' ? 'space_users' : objectApiName}",
|
|
479
|
+
// "requestAdaptor": "api.url = Builder.settings.rootUrl + api.url; if(!api.headers){api.headers = {}};api.headers.Authorization='Bearer ' + Builder.settings.tenantId + ',' + Builder.settings.authToken ;return api;",
|
|
480
|
+
// "dataType": "json"
|
|
481
|
+
// },
|
|
482
|
+
// "en-US": {
|
|
483
|
+
// "label": "Filters Conditions"
|
|
484
|
+
// }
|
|
485
|
+
// },
|
|
486
|
+
{
|
|
487
|
+
"type": "input-text",
|
|
488
|
+
"name": "sortField",
|
|
489
|
+
"label": "排序字段"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"type": "select",
|
|
493
|
+
"name": "sortOrder",
|
|
494
|
+
"label": "排序顺序",
|
|
495
|
+
"options": [{
|
|
496
|
+
"label": "升级",
|
|
497
|
+
"value": "asc"
|
|
498
|
+
}, {
|
|
499
|
+
"label": "倒序",
|
|
500
|
+
"value": "desc"
|
|
501
|
+
}]
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"type": "number",
|
|
505
|
+
"name": "top",
|
|
506
|
+
"label": "显示的记录数量",
|
|
507
|
+
}
|
|
508
|
+
]
|
|
509
|
+
}
|
|
510
|
+
} });
|
|
511
|
+
|
|
351
512
|
/*
|
|
352
513
|
* @Author: baozhoutao@steedos.com
|
|
353
514
|
* @Date: 2022-08-31 16:32:35
|
|
@@ -833,12 +994,14 @@
|
|
|
833
994
|
* @Description:
|
|
834
995
|
*/
|
|
835
996
|
// import Hello from './metas/Hello';
|
|
836
|
-
var components = [AmisObjectForm, AmisObjectListview,
|
|
997
|
+
var components = [AmisObjectForm, AmisObjectListview, AmisObjectTable, AmisRecordDetailRelatedList,
|
|
998
|
+
AmisRecordDetailHeader, AmisProvider, AmisSelectUser, AmisObjectFieldLookup];
|
|
837
999
|
var componentList = [
|
|
838
1000
|
{
|
|
839
1001
|
title: "华炎魔方",
|
|
840
1002
|
icon: "",
|
|
841
|
-
children: [AmisObjectForm, AmisObjectListview,
|
|
1003
|
+
children: [AmisObjectForm, AmisObjectListview, AmisObjectTable, AmisRecordDetailRelatedList,
|
|
1004
|
+
AmisRecordDetailHeader, AmisProvider, AmisSelectUser, AmisObjectFieldLookup]
|
|
842
1005
|
}
|
|
843
1006
|
];
|
|
844
1007
|
var meta = {
|