@steedos-widgets/sortable 3.6.4-beta.1 → 3.6.4-beta.2
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 +40 -7
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +40 -7
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +40 -7
- package/package.json +3 -3
package/dist/sortable.umd.js
CHANGED
|
@@ -20446,7 +20446,7 @@
|
|
|
20446
20446
|
if(ctx && ctx.isLookup){
|
|
20447
20447
|
linkTarget = "target='_blank'";
|
|
20448
20448
|
}
|
|
20449
|
-
if(ctx.isRelated){
|
|
20449
|
+
if(ctx.isRelated && window.innerWidth >= 768){
|
|
20450
20450
|
return `<a href="${href}" ${linkTarget} onclick="return false;">\${${field.name} | raw}</a>`
|
|
20451
20451
|
}else {
|
|
20452
20452
|
return `<a href="${href}" ${linkTarget}>\${${field.name} | raw}</a>`
|
|
@@ -20504,7 +20504,7 @@
|
|
|
20504
20504
|
const href = Router.getObjectDetailPath({
|
|
20505
20505
|
formFactor: ctx.formFactor, appId: "${appId}", objectName: `${objectNameTpl}`, recordId: `${recordIdTpl}`
|
|
20506
20506
|
});
|
|
20507
|
-
if(ctx.isRelated){
|
|
20507
|
+
if(ctx.isRelated && window.innerWidth >= 768){
|
|
20508
20508
|
labelTpl = `<a href="${href}" ${linkTarget} onclick="return false;">${labelTpl}</a>`;
|
|
20509
20509
|
}else {
|
|
20510
20510
|
labelTpl = `<a href="${href}" ${linkTarget}>${labelTpl}</a>`;
|
|
@@ -21929,7 +21929,7 @@
|
|
|
21929
21929
|
columnItem.defaultColor = null;
|
|
21930
21930
|
}
|
|
21931
21931
|
|
|
21932
|
-
if(((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){
|
|
21932
|
+
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){
|
|
21933
21933
|
|
|
21934
21934
|
const drawerRecordDetailSchema = {
|
|
21935
21935
|
"type": "steedos-record-detail",
|
|
@@ -21957,16 +21957,17 @@
|
|
|
21957
21957
|
"drawer": {
|
|
21958
21958
|
"type": "drawer",
|
|
21959
21959
|
"title": " ",
|
|
21960
|
-
"headerClassName": "",
|
|
21960
|
+
"headerClassName": "hidden",
|
|
21961
21961
|
"size": "lg",
|
|
21962
|
-
"bodyClassName": "p-0 m-0
|
|
21962
|
+
"bodyClassName": "p-0 m-0",
|
|
21963
21963
|
"closeOnEsc": true,
|
|
21964
|
+
"closeOnOutside": true,
|
|
21964
21965
|
"resizable": true,
|
|
21965
21966
|
"actions": [],
|
|
21966
21967
|
"body": [
|
|
21967
21968
|
drawerRecordDetailSchema
|
|
21968
21969
|
],
|
|
21969
|
-
"className": "app-popover",
|
|
21970
|
+
"className": "steedos-record-detail-drawer app-popover",
|
|
21970
21971
|
"id": "u:fc5f055afa8c"
|
|
21971
21972
|
},
|
|
21972
21973
|
"preventDefault": true
|
|
@@ -22024,7 +22025,7 @@
|
|
|
22024
22025
|
let isNewLine = false;
|
|
22025
22026
|
let isLeft = true;
|
|
22026
22027
|
let lineChildrenClassName = "";
|
|
22027
|
-
let lineClassName = "flex items-center justify-between";
|
|
22028
|
+
let lineClassName = "flex items-center justify-between mb-1";
|
|
22028
22029
|
tpls.forEach(function(item){
|
|
22029
22030
|
if(isNewLine && lines.length < maxLineCount){
|
|
22030
22031
|
lines.push({
|
|
@@ -26447,6 +26448,33 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26447
26448
|
}
|
|
26448
26449
|
}
|
|
26449
26450
|
|
|
26451
|
+
async function getAutoFill(field, refObject) {
|
|
26452
|
+
let autoFillMapping = field.auto_fill_mapping;
|
|
26453
|
+
if (autoFillMapping && autoFillMapping.length) {
|
|
26454
|
+
let fillMapping = {};
|
|
26455
|
+
let fieldsForApi = [];
|
|
26456
|
+
autoFillMapping.forEach(function (item) {
|
|
26457
|
+
fillMapping[item.to] = `\${${item.from}}`;
|
|
26458
|
+
fieldsForApi.push(item.from);
|
|
26459
|
+
});
|
|
26460
|
+
// let api = {
|
|
26461
|
+
// // "url": "/amis/api/mock2/form/autoUpdate?browser=${browser}&version=${version}",
|
|
26462
|
+
// "url": `/api/v1/${refObject.name}/\${${field.name}}?fields=${JSON.stringify(fieldsForApi)}`,
|
|
26463
|
+
// // "responseData": {
|
|
26464
|
+
// // "name": "${name}"
|
|
26465
|
+
// // },
|
|
26466
|
+
// "silent": false
|
|
26467
|
+
// }
|
|
26468
|
+
// return {
|
|
26469
|
+
// fillMapping,
|
|
26470
|
+
// // api
|
|
26471
|
+
// }
|
|
26472
|
+
// 因为autoFill中配置了api的话,在表单初始化(比如新建记录)时并不会触发执行autoFill,所以只能暂时不用api
|
|
26473
|
+
// 给amis报过问题了,见:https://github.com/baidu/amis/issues/9631
|
|
26474
|
+
return fillMapping;
|
|
26475
|
+
}
|
|
26476
|
+
}
|
|
26477
|
+
|
|
26450
26478
|
async function lookupToAmis(field, readonly, ctx){
|
|
26451
26479
|
if(!ctx){
|
|
26452
26480
|
ctx = {};
|
|
@@ -26530,6 +26558,10 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26530
26558
|
amisSchema = lodash.exports.defaultsDeep({}, pageAmisSchema, amisSchema);
|
|
26531
26559
|
}
|
|
26532
26560
|
}
|
|
26561
|
+
const autoFill = await getAutoFill(field);
|
|
26562
|
+
if(autoFill){
|
|
26563
|
+
amisSchema.autoFill = autoFill;
|
|
26564
|
+
}
|
|
26533
26565
|
return amisSchema;
|
|
26534
26566
|
}
|
|
26535
26567
|
|
|
@@ -26701,6 +26733,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26701
26733
|
{
|
|
26702
26734
|
"type": "editor",
|
|
26703
26735
|
"name": field.name,
|
|
26736
|
+
"labelClassName": "none",
|
|
26704
26737
|
"language": "markdown",
|
|
26705
26738
|
}
|
|
26706
26739
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/sortable",
|
|
3
|
-
"version": "3.6.4-beta.
|
|
3
|
+
"version": "3.6.4-beta.2",
|
|
4
4
|
"main": "dist/sortable.cjs.js",
|
|
5
5
|
"module": "dist/sortable.esm.js",
|
|
6
6
|
"unpkg": "dist/sortable.umd.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@dnd-kit/core": "^6.0.5",
|
|
47
47
|
"@dnd-kit/sortable": "^7.0.1",
|
|
48
|
-
"@steedos-widgets/amis-lib": "3.6.4-beta.
|
|
48
|
+
"@steedos-widgets/amis-lib": "3.6.4-beta.2"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "74e7975b7f134d1192dea186f90e0a1c6c11275c"
|
|
51
51
|
}
|