@steedos-widgets/sortable 6.3.0-beta.11 → 6.3.0-beta.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/assets.json +5 -5
- package/dist/sortable.cjs.js +96 -82
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +96 -82
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +96 -82
- 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.12/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.12/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.12/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.12/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.12/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -54130,9 +54130,9 @@ function getSelectMap(selectOptions){
|
|
|
54130
54130
|
}
|
|
54131
54131
|
|
|
54132
54132
|
function getNameTplUrl(field, ctx){
|
|
54133
|
-
if(ctx.objectName === 'cms_files'){
|
|
54134
|
-
|
|
54135
|
-
}
|
|
54133
|
+
// if(ctx.objectName === 'cms_files'){
|
|
54134
|
+
// return "${(versions[0] && versions[0].url) ? versions[0].url+'?download=true' : context.rootUrl+'/api/files/files/'+versions[0]+'?download=true'}"
|
|
54135
|
+
// }
|
|
54136
54136
|
const href = Router.getObjectDetailPath({
|
|
54137
54137
|
...ctx, formFactor: ctx.formFactor, appId: "${appId}", objectName: ctx.objectName || "${objectName}", recordId: `\${${ctx.idFieldName}}`
|
|
54138
54138
|
});
|
|
@@ -54322,12 +54322,15 @@ async function getFieldTpl (field, options){
|
|
|
54322
54322
|
}
|
|
54323
54323
|
}
|
|
54324
54324
|
|
|
54325
|
-
async function getFieldsTemplate(fields, display){
|
|
54325
|
+
async function getFieldsTemplate(object, fields, display){
|
|
54326
54326
|
let expandFields = [];
|
|
54327
54327
|
if(display != false){
|
|
54328
54328
|
display = true;
|
|
54329
54329
|
}
|
|
54330
|
-
let fieldsName = ['_id'
|
|
54330
|
+
let fieldsName = ['_id'];
|
|
54331
|
+
if(!object.datasource || object.datasource === 'default' || object.datasource === 'meteor'){
|
|
54332
|
+
fieldsName.push('space');
|
|
54333
|
+
}
|
|
54331
54334
|
let displayFields = [];
|
|
54332
54335
|
let fieldsArr = [];
|
|
54333
54336
|
if(lodash.exports.isArray(fields)){
|
|
@@ -54413,7 +54416,7 @@ async function getFindQuery(object, recordId, fields, options){
|
|
|
54413
54416
|
// return item.replace(/^{/,"").replace(/}$/,"");
|
|
54414
54417
|
// }).join(",")) : "";
|
|
54415
54418
|
|
|
54416
|
-
const fieldsTemplate = `${await getFieldsTemplate(fields, options.expand)}${treeFields}${cfsFields}`;
|
|
54419
|
+
const fieldsTemplate = `${await getFieldsTemplate(object, fields, options.expand)}${treeFields}${cfsFields}`;
|
|
54417
54420
|
|
|
54418
54421
|
return {
|
|
54419
54422
|
orderBy: "${orderBy}",
|
|
@@ -55508,6 +55511,59 @@ function getFieldWidth(width){
|
|
|
55508
55511
|
}
|
|
55509
55512
|
}
|
|
55510
55513
|
|
|
55514
|
+
async function getColumnItemOnClick(field, options){
|
|
55515
|
+
const recordPage = await getPage({ type: 'record', appId: options.appId, objectName: options.objectName, formFactor: options.formFactor });
|
|
55516
|
+
const drawerRecordDetailSchema = recordPage ? Object.assign({}, recordPage.schema, {
|
|
55517
|
+
"recordId": `\${${options.idFieldName}}`,
|
|
55518
|
+
"data": {
|
|
55519
|
+
...recordPage.schema.data,
|
|
55520
|
+
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
55521
|
+
"recordLoaded": false, // 重置数据加载状态
|
|
55522
|
+
}
|
|
55523
|
+
}) : {
|
|
55524
|
+
"type": "steedos-record-detail",
|
|
55525
|
+
"objectApiName": "${objectName}",
|
|
55526
|
+
"recordId": `\${${options.idFieldName}}`,
|
|
55527
|
+
"showBackButton": false,
|
|
55528
|
+
"showButtons": true,
|
|
55529
|
+
"data": {
|
|
55530
|
+
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
55531
|
+
"recordLoaded": false, // 重置数据加载状态
|
|
55532
|
+
}
|
|
55533
|
+
};
|
|
55534
|
+
|
|
55535
|
+
if(!(field.is_name || field.name === options.labelFieldName)){
|
|
55536
|
+
drawerRecordDetailSchema.objectApiName = field.reference_to;
|
|
55537
|
+
drawerRecordDetailSchema.recordId = `\${_display.${field.name}.value}`;
|
|
55538
|
+
}
|
|
55539
|
+
return {
|
|
55540
|
+
"click": {
|
|
55541
|
+
"actions": [
|
|
55542
|
+
{
|
|
55543
|
+
"actionType": "drawer",
|
|
55544
|
+
"drawer": {
|
|
55545
|
+
"type": "drawer",
|
|
55546
|
+
"title": " ",
|
|
55547
|
+
"headerClassName": "hidden",
|
|
55548
|
+
"size": "lg",
|
|
55549
|
+
"bodyClassName": "p-0 m-0 bg-gray-100",
|
|
55550
|
+
"closeOnEsc": true,
|
|
55551
|
+
"closeOnOutside": true,
|
|
55552
|
+
"resizable": true,
|
|
55553
|
+
"actions": [],
|
|
55554
|
+
"body": [
|
|
55555
|
+
drawerRecordDetailSchema
|
|
55556
|
+
],
|
|
55557
|
+
"className": "steedos-record-detail-drawer app-popover",
|
|
55558
|
+
"id": "u:fc5f055afa8c"
|
|
55559
|
+
},
|
|
55560
|
+
"preventDefault": true
|
|
55561
|
+
}
|
|
55562
|
+
]
|
|
55563
|
+
}
|
|
55564
|
+
};
|
|
55565
|
+
}
|
|
55566
|
+
|
|
55511
55567
|
async function getTableColumns(object, fields, options){
|
|
55512
55568
|
const columns = [];
|
|
55513
55569
|
if(!options.isLookup && !options.isInputTable){
|
|
@@ -55547,7 +55603,10 @@ async function getTableColumns(object, fields, options){
|
|
|
55547
55603
|
delete fieldAmis?.className;
|
|
55548
55604
|
|
|
55549
55605
|
let columnItem;
|
|
55550
|
-
|
|
55606
|
+
|
|
55607
|
+
// PC客户端点击名称字段直接预览
|
|
55608
|
+
let isNode = !!(window && window.nw && window.nw.require);
|
|
55609
|
+
if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files' && isNode){
|
|
55551
55610
|
const previewFileScript = `
|
|
55552
55611
|
var data = event.data;
|
|
55553
55612
|
var file_name = data.versions ? data.name : "${field.label}";
|
|
@@ -55562,20 +55621,20 @@ async function getTableColumns(object, fields, options){
|
|
|
55562
55621
|
"onEvent": {
|
|
55563
55622
|
"click": {
|
|
55564
55623
|
"actions": [
|
|
55565
|
-
{
|
|
55566
|
-
|
|
55567
|
-
|
|
55568
|
-
|
|
55569
|
-
|
|
55570
|
-
|
|
55571
|
-
|
|
55572
|
-
|
|
55573
|
-
|
|
55574
|
-
|
|
55575
|
-
|
|
55576
|
-
|
|
55577
|
-
|
|
55578
|
-
},
|
|
55624
|
+
// {
|
|
55625
|
+
// "args": {
|
|
55626
|
+
// "api": {
|
|
55627
|
+
// "url": "${(versions[0] && versions[0].url) ? versions[0].url+'?download=true' : context.rootUrl+'/api/files/files/'+versions[0]+'?download=true'}",
|
|
55628
|
+
// "method": "get",
|
|
55629
|
+
// "headers": {
|
|
55630
|
+
// "Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
55631
|
+
// }
|
|
55632
|
+
// }
|
|
55633
|
+
// },
|
|
55634
|
+
// "actionType": "download",
|
|
55635
|
+
// // "expression": "!!!window?.nw?.require"//浏览器上直接下载
|
|
55636
|
+
// "expression": "!!!(window && window.nw && window.nw.require)"//浏览器上直接下载
|
|
55637
|
+
// },
|
|
55579
55638
|
{
|
|
55580
55639
|
"args": {},
|
|
55581
55640
|
"actionType": "custom",
|
|
@@ -55673,57 +55732,7 @@ async function getTableColumns(object, fields, options){
|
|
|
55673
55732
|
}
|
|
55674
55733
|
|
|
55675
55734
|
if(window.innerWidth >= 768 && ((field.is_name || field.name === options.labelFieldName) || ((field.type == 'lookup' || field.type == 'master_detail') && lodash.exports.isString(field.reference_to) && field.multiple != true)) && options.isRelated){
|
|
55676
|
-
|
|
55677
|
-
const drawerRecordDetailSchema = recordPage ? Object.assign({}, recordPage.schema, {
|
|
55678
|
-
"recordId": `\${${options.idFieldName}}`,
|
|
55679
|
-
"data": {
|
|
55680
|
-
...recordPage.schema.data,
|
|
55681
|
-
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
55682
|
-
"recordLoaded": false, // 重置数据加载状态
|
|
55683
|
-
}
|
|
55684
|
-
}) : {
|
|
55685
|
-
"type": "steedos-record-detail",
|
|
55686
|
-
"objectApiName": "${objectName}",
|
|
55687
|
-
"recordId": `\${${options.idFieldName}}`,
|
|
55688
|
-
"showBackButton": false,
|
|
55689
|
-
"showButtons": true,
|
|
55690
|
-
"data": {
|
|
55691
|
-
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
55692
|
-
"recordLoaded": false, // 重置数据加载状态
|
|
55693
|
-
}
|
|
55694
|
-
};
|
|
55695
|
-
|
|
55696
|
-
if(!(field.is_name || field.name === options.labelFieldName)){
|
|
55697
|
-
drawerRecordDetailSchema.objectApiName = field.reference_to;
|
|
55698
|
-
drawerRecordDetailSchema.recordId = `\${_display.${field.name}.value}`;
|
|
55699
|
-
}
|
|
55700
|
-
|
|
55701
|
-
columnItem.onEvent = {
|
|
55702
|
-
"click": {
|
|
55703
|
-
"actions": [
|
|
55704
|
-
{
|
|
55705
|
-
"actionType": "drawer",
|
|
55706
|
-
"drawer": {
|
|
55707
|
-
"type": "drawer",
|
|
55708
|
-
"title": " ",
|
|
55709
|
-
"headerClassName": "hidden",
|
|
55710
|
-
"size": "lg",
|
|
55711
|
-
"bodyClassName": "p-0 m-0 bg-gray-100",
|
|
55712
|
-
"closeOnEsc": true,
|
|
55713
|
-
"closeOnOutside": true,
|
|
55714
|
-
"resizable": true,
|
|
55715
|
-
"actions": [],
|
|
55716
|
-
"body": [
|
|
55717
|
-
drawerRecordDetailSchema
|
|
55718
|
-
],
|
|
55719
|
-
"className": "steedos-record-detail-drawer app-popover",
|
|
55720
|
-
"id": "u:fc5f055afa8c"
|
|
55721
|
-
},
|
|
55722
|
-
"preventDefault": true
|
|
55723
|
-
}
|
|
55724
|
-
]
|
|
55725
|
-
}
|
|
55726
|
-
};
|
|
55735
|
+
columnItem.onEvent = await getColumnItemOnClick(field, options);
|
|
55727
55736
|
}
|
|
55728
55737
|
|
|
55729
55738
|
}
|
|
@@ -55936,17 +55945,23 @@ async function getMobileTableColumns(fields, options){
|
|
|
55936
55945
|
onEvent: {
|
|
55937
55946
|
"click": {
|
|
55938
55947
|
"actions": [
|
|
55948
|
+
// {
|
|
55949
|
+
// "args": {
|
|
55950
|
+
// "api": {
|
|
55951
|
+
// "url": url,
|
|
55952
|
+
// "method": "get",
|
|
55953
|
+
// "headers": {
|
|
55954
|
+
// "Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
55955
|
+
// }
|
|
55956
|
+
// }
|
|
55957
|
+
// },
|
|
55958
|
+
// "actionType": "download"
|
|
55959
|
+
// }
|
|
55939
55960
|
{
|
|
55961
|
+
"actionType": "link",
|
|
55940
55962
|
"args": {
|
|
55941
|
-
"
|
|
55942
|
-
|
|
55943
|
-
"method": "get",
|
|
55944
|
-
"headers": {
|
|
55945
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
55946
|
-
}
|
|
55947
|
-
}
|
|
55948
|
-
},
|
|
55949
|
-
"actionType": "download"
|
|
55963
|
+
"link": url
|
|
55964
|
+
}
|
|
55950
55965
|
}
|
|
55951
55966
|
],
|
|
55952
55967
|
"weight": 0
|
|
@@ -60182,7 +60197,6 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
60182
60197
|
var fieldFilters = ${JSON.stringify(field.filters)};
|
|
60183
60198
|
var currentAmis = amisRequire('amis');
|
|
60184
60199
|
//递归fieldFilters数组,检查每一个元素,判断若是公式,就仅把它解析
|
|
60185
|
-
debugger;
|
|
60186
60200
|
function traverseNestedArray(arr) {
|
|
60187
60201
|
for (let i = 0; i < arr.length; i++) {
|
|
60188
60202
|
if (Array.isArray(arr[i])) {
|