@steedos-widgets/sortable 6.3.0-beta.16 → 6.3.0-beta.18
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/assets.json +5 -5
- package/dist/sortable.cjs.js +134 -47
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +134 -47
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +134 -47
- package/package.json +3 -3
package/dist/assets.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
{
|
|
4
4
|
"package": "@steedos-widgets/sortable",
|
|
5
5
|
"urls": [
|
|
6
|
-
"https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.18/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.18/dist/sortable.umd.css"
|
|
8
8
|
],
|
|
9
9
|
"library": "BuilderSortable"
|
|
10
10
|
}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"npm": {
|
|
16
16
|
"package": "@steedos-widgets/sortable"
|
|
17
17
|
},
|
|
18
|
-
"url": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.18/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.18/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.18/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -54499,6 +54499,29 @@ function getAmisStaticFieldType(type, readonly, options){
|
|
|
54499
54499
|
}
|
|
54500
54500
|
}
|
|
54501
54501
|
|
|
54502
|
+
/*
|
|
54503
|
+
* @Author: baozhoutao@steedos.com
|
|
54504
|
+
* @Date: 2022-07-13 15:18:03
|
|
54505
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
54506
|
+
* @LastEditTime: 2023-04-11 10:34:26
|
|
54507
|
+
* @Description:
|
|
54508
|
+
*/
|
|
54509
|
+
|
|
54510
|
+
async function getPage({type, pageId = '', appId, objectName = '', recordId = '', formFactor = 'LARGE'}){
|
|
54511
|
+
const api = `/api/pageSchema/${type}?app=${appId}&objectApiName=${objectName}&recordId=${recordId}&pageId=${pageId}&formFactor=${formFactor}`;
|
|
54512
|
+
const page = await fetchAPI(api);
|
|
54513
|
+
if (page && page.schema) {
|
|
54514
|
+
page.schema = JSON.parse(page.schema);
|
|
54515
|
+
if(page.schema.data){
|
|
54516
|
+
delete page.schema.data.recordId;
|
|
54517
|
+
delete page.schema.data.objectName;
|
|
54518
|
+
delete page.schema.data.context;
|
|
54519
|
+
delete page.schema.data.global;
|
|
54520
|
+
}
|
|
54521
|
+
return page;
|
|
54522
|
+
}
|
|
54523
|
+
}
|
|
54524
|
+
|
|
54502
54525
|
/*
|
|
54503
54526
|
* @Author: baozhoutao@steedos.com
|
|
54504
54527
|
* @Date: 2022-10-28 14:15:09
|
|
@@ -54522,9 +54545,74 @@ const getAmisFieldType$1 = (steedosField, readonly)=>{
|
|
|
54522
54545
|
return getAmisStaticFieldType(steedosField.type === 'avatar' ? 'image' : steedosField.type, readonly, {multiple: steedosField.multiple});
|
|
54523
54546
|
};
|
|
54524
54547
|
|
|
54525
|
-
|
|
54548
|
+
async function getLookupLinkOnClick(field, options) {
|
|
54549
|
+
const recordPage = await getPage({ type: 'record', appId: options.appId, objectName: options.objectName, formFactor: options.formFactor });
|
|
54550
|
+
|
|
54551
|
+
const drawerRecordDetailSchema = recordPage ? Object.assign({}, recordPage.schema, {
|
|
54552
|
+
"recordId": "${value}",
|
|
54553
|
+
"data": {
|
|
54554
|
+
...recordPage.schema.data,
|
|
54555
|
+
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
54556
|
+
"recordLoaded": false, // 重置数据加载状态
|
|
54557
|
+
"objectName": options.objectName,
|
|
54558
|
+
}
|
|
54559
|
+
}) : {
|
|
54560
|
+
"type": "steedos-record-detail",
|
|
54561
|
+
"objectApiName": options.objectName,
|
|
54562
|
+
"recordId": "${value}",
|
|
54563
|
+
"showBackButton": false,
|
|
54564
|
+
"showButtons": true,
|
|
54565
|
+
"data": {
|
|
54566
|
+
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
54567
|
+
"recordLoaded": false, // 重置数据加载状态
|
|
54568
|
+
}
|
|
54569
|
+
};
|
|
54570
|
+
return {
|
|
54571
|
+
"click": {
|
|
54572
|
+
"actions": [
|
|
54573
|
+
// {
|
|
54574
|
+
// "type": "custom",
|
|
54575
|
+
// "script": `
|
|
54576
|
+
// let fileRecordId = url.match(${regFileRecordId})[2];
|
|
54577
|
+
// console.log('fileRecordId:',fileRecordId);
|
|
54578
|
+
// event.data.recordId = fileRecordId;
|
|
54579
|
+
// `,
|
|
54580
|
+
// },
|
|
54581
|
+
{
|
|
54582
|
+
"actionType": "drawer",
|
|
54583
|
+
"drawer": {
|
|
54584
|
+
"type": "drawer",
|
|
54585
|
+
"title": " ",
|
|
54586
|
+
"headerClassName": "hidden",
|
|
54587
|
+
"size": "lg",
|
|
54588
|
+
"bodyClassName": "p-0 m-0 bg-gray-100",
|
|
54589
|
+
"closeOnEsc": true,
|
|
54590
|
+
"closeOnOutside": true,
|
|
54591
|
+
"resizable": true,
|
|
54592
|
+
"actions": [],
|
|
54593
|
+
"body": [
|
|
54594
|
+
drawerRecordDetailSchema
|
|
54595
|
+
],
|
|
54596
|
+
"className": "steedos-record-detail-drawer app-popover"
|
|
54597
|
+
},
|
|
54598
|
+
"preventDefault": true
|
|
54599
|
+
}
|
|
54600
|
+
]
|
|
54601
|
+
}
|
|
54602
|
+
}
|
|
54603
|
+
}
|
|
54604
|
+
|
|
54605
|
+
const getAmisFileReadonlySchema = async (steedosField,ctx)=>{
|
|
54526
54606
|
const type = steedosField.type;
|
|
54607
|
+
const { appId, formFactor } = ctx.amisData || {};
|
|
54527
54608
|
const amisFieldType = getAmisFieldType$1(steedosField, true);
|
|
54609
|
+
|
|
54610
|
+
let lookupATagClick = 'onclick="return false;"';
|
|
54611
|
+
|
|
54612
|
+
if(window.innerWidth < 768){
|
|
54613
|
+
lookupATagClick = "";
|
|
54614
|
+
}
|
|
54615
|
+
|
|
54528
54616
|
if(_.includes(['avatar','image'], type)){
|
|
54529
54617
|
return {
|
|
54530
54618
|
type: amisFieldType,
|
|
@@ -54559,13 +54647,34 @@ const getAmisFileReadonlySchema = (steedosField)=>{
|
|
|
54559
54647
|
}
|
|
54560
54648
|
}
|
|
54561
54649
|
} : {
|
|
54562
|
-
type: amisFieldType,
|
|
54563
|
-
tpl: `
|
|
54564
|
-
|
|
54565
|
-
|
|
54566
|
-
|
|
54567
|
-
|
|
54568
|
-
|
|
54650
|
+
// type: amisFieldType,
|
|
54651
|
+
// tpl: `
|
|
54652
|
+
// <% let fileData = data._display.${steedosField.name}; if (fileData) { %>
|
|
54653
|
+
// <% if(!Array.isArray(fileData)){ fileData = [fileData]} %>
|
|
54654
|
+
// <% fileData.forEach(function(item) { %>
|
|
54655
|
+
// <a href='<%= item.url %>' target='_self' class='block'><%= item.name %></a>
|
|
54656
|
+
// <% });} %>`
|
|
54657
|
+
"type": "control",
|
|
54658
|
+
"body": {
|
|
54659
|
+
type: 'each',
|
|
54660
|
+
placeholder: "",
|
|
54661
|
+
// className: `steedos-field-lookup-each flex flex-wrap gap-2`,
|
|
54662
|
+
source: `\${_display.${steedosField.name}|asArray}`,
|
|
54663
|
+
items: {
|
|
54664
|
+
type: 'static',
|
|
54665
|
+
labelClassName: "hidden",
|
|
54666
|
+
label: false,
|
|
54667
|
+
className: 'm-0',
|
|
54668
|
+
tpl: `<a href="/app/-/cfs_files_filerecord/view/\${value}" ${lookupATagClick}>\${name}</a>`,
|
|
54669
|
+
// tpl: "<%= item.name >",
|
|
54670
|
+
// onEvent: window.innerWidth < 768 ? null : REFERENCE_VALUE_ITEM_ONCLICK
|
|
54671
|
+
onEvent: window.innerWidth < 768 ? null : await getLookupLinkOnClick(steedosField, {
|
|
54672
|
+
appId,
|
|
54673
|
+
objectName: "cfs_files_filerecord",
|
|
54674
|
+
formFactor
|
|
54675
|
+
})
|
|
54676
|
+
}
|
|
54677
|
+
}
|
|
54569
54678
|
}
|
|
54570
54679
|
}
|
|
54571
54680
|
};
|
|
@@ -54627,8 +54736,8 @@ const getAmisFileEditSchema = (steedosField)=>{
|
|
|
54627
54736
|
return convertData;
|
|
54628
54737
|
};
|
|
54629
54738
|
|
|
54630
|
-
const getAmisFileSchema = (steedosField, readonly)=>{
|
|
54631
|
-
return readonly ? getAmisFileReadonlySchema(steedosField) : getAmisFileEditSchema(steedosField);
|
|
54739
|
+
const getAmisFileSchema = async (steedosField, readonly, ctx)=>{
|
|
54740
|
+
return readonly ? await getAmisFileReadonlySchema(steedosField,ctx) : getAmisFileEditSchema(steedosField);
|
|
54632
54741
|
};
|
|
54633
54742
|
|
|
54634
54743
|
var frontend_field_group_generalization$1 = "General";
|
|
@@ -55023,29 +55132,6 @@ instance
|
|
|
55023
55132
|
}
|
|
55024
55133
|
});
|
|
55025
55134
|
|
|
55026
|
-
/*
|
|
55027
|
-
* @Author: baozhoutao@steedos.com
|
|
55028
|
-
* @Date: 2022-07-13 15:18:03
|
|
55029
|
-
* @LastEditors: baozhoutao@steedos.com
|
|
55030
|
-
* @LastEditTime: 2023-04-11 10:34:26
|
|
55031
|
-
* @Description:
|
|
55032
|
-
*/
|
|
55033
|
-
|
|
55034
|
-
async function getPage({type, pageId = '', appId, objectName = '', recordId = '', formFactor = 'LARGE'}){
|
|
55035
|
-
const api = `/api/pageSchema/${type}?app=${appId}&objectApiName=${objectName}&recordId=${recordId}&pageId=${pageId}&formFactor=${formFactor}`;
|
|
55036
|
-
const page = await fetchAPI(api);
|
|
55037
|
-
if (page && page.schema) {
|
|
55038
|
-
page.schema = JSON.parse(page.schema);
|
|
55039
|
-
if(page.schema.data){
|
|
55040
|
-
delete page.schema.data.recordId;
|
|
55041
|
-
delete page.schema.data.objectName;
|
|
55042
|
-
delete page.schema.data.context;
|
|
55043
|
-
delete page.schema.data.global;
|
|
55044
|
-
}
|
|
55045
|
-
return page;
|
|
55046
|
-
}
|
|
55047
|
-
}
|
|
55048
|
-
|
|
55049
55135
|
async function getQuickEditSchema(object, columnField, options){
|
|
55050
55136
|
let field = object.fields[columnField.name];
|
|
55051
55137
|
//判断在amis3.2以上环境下,放开批量编辑与lookup的单元格编辑
|
|
@@ -57194,21 +57280,11 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
57194
57280
|
};
|
|
57195
57281
|
}
|
|
57196
57282
|
|
|
57197
|
-
|
|
57198
|
-
/**
|
|
57199
|
-
* 列表视图顶部放大镜过滤条件栏amisSchema
|
|
57200
|
-
* @param {*} objectSchema 对象UISchema
|
|
57201
|
-
* @returns amisSchema
|
|
57202
|
-
*/
|
|
57203
|
-
async function getObjectListHeaderFieldsFilterBar(objectSchema, listViewName, ctx) {
|
|
57204
|
-
const fieldsFilterBarSchema = await getObjectFieldsFilterBarSchema(objectSchema, ctx);
|
|
57205
|
-
return fieldsFilterBarSchema;
|
|
57206
|
-
}
|
|
57207
|
-
|
|
57208
57283
|
const getNewListviewButtonSchema = ()=>{
|
|
57209
57284
|
return {
|
|
57210
57285
|
"type": "button",
|
|
57211
57286
|
"label": instance.t('frontend_listview_control_new_label'),
|
|
57287
|
+
"className": "steedos-listview-new-button",
|
|
57212
57288
|
"onEvent": {
|
|
57213
57289
|
"click": {
|
|
57214
57290
|
"weight": 0,
|
|
@@ -57415,6 +57491,17 @@ function fieldsExtend$5(){
|
|
|
57415
57491
|
}
|
|
57416
57492
|
}
|
|
57417
57493
|
|
|
57494
|
+
|
|
57495
|
+
/**
|
|
57496
|
+
* 列表视图顶部放大镜过滤条件栏amisSchema
|
|
57497
|
+
* @param {*} objectSchema 对象UISchema
|
|
57498
|
+
* @returns amisSchema
|
|
57499
|
+
*/
|
|
57500
|
+
async function getObjectListHeaderFieldsFilterBar(objectSchema, listViewName, ctx) {
|
|
57501
|
+
const fieldsFilterBarSchema = await getObjectFieldsFilterBarSchema(objectSchema, ctx);
|
|
57502
|
+
return fieldsFilterBarSchema;
|
|
57503
|
+
}
|
|
57504
|
+
|
|
57418
57505
|
const getCopyListviewButtonSchema = ()=>{
|
|
57419
57506
|
return {
|
|
57420
57507
|
"type": "button",
|
|
@@ -61273,13 +61360,13 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
61273
61360
|
};
|
|
61274
61361
|
break;
|
|
61275
61362
|
case 'avatar':
|
|
61276
|
-
convertData = getAmisFileSchema(field, readonly);
|
|
61363
|
+
convertData = await getAmisFileSchema(field, readonly, ctx);
|
|
61277
61364
|
break;
|
|
61278
61365
|
case 'image':
|
|
61279
|
-
convertData = getAmisFileSchema(field, readonly);
|
|
61366
|
+
convertData = await getAmisFileSchema(field, readonly, ctx);
|
|
61280
61367
|
break;
|
|
61281
61368
|
case 'file':
|
|
61282
|
-
convertData = getAmisFileSchema(field, readonly);
|
|
61369
|
+
convertData = await getAmisFileSchema(field, readonly, ctx);
|
|
61283
61370
|
break;
|
|
61284
61371
|
case 'formula':
|
|
61285
61372
|
if(readonly){
|