@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.esm.js
CHANGED
|
@@ -54141,7 +54141,7 @@ function getNameTpl(field, ctx){
|
|
|
54141
54141
|
if(ctx && ctx.isLookup){
|
|
54142
54142
|
linkTarget = "target='_blank'";
|
|
54143
54143
|
}
|
|
54144
|
-
if(ctx.isRelated){
|
|
54144
|
+
if(ctx.isRelated && window.innerWidth >= 768){
|
|
54145
54145
|
return `<a href="${href}" ${linkTarget} onclick="return false;">\${${field.name} | raw}</a>`
|
|
54146
54146
|
}else {
|
|
54147
54147
|
return `<a href="${href}" ${linkTarget}>\${${field.name} | raw}</a>`
|
|
@@ -54199,7 +54199,7 @@ function getRelatedFieldTpl(field, ctx){
|
|
|
54199
54199
|
const href = Router.getObjectDetailPath({
|
|
54200
54200
|
formFactor: ctx.formFactor, appId: "${appId}", objectName: `${objectNameTpl}`, recordId: `${recordIdTpl}`
|
|
54201
54201
|
});
|
|
54202
|
-
if(ctx.isRelated){
|
|
54202
|
+
if(ctx.isRelated && window.innerWidth >= 768){
|
|
54203
54203
|
labelTpl = `<a href="${href}" ${linkTarget} onclick="return false;">${labelTpl}</a>`;
|
|
54204
54204
|
}else {
|
|
54205
54205
|
labelTpl = `<a href="${href}" ${linkTarget}>${labelTpl}</a>`;
|
|
@@ -55624,7 +55624,7 @@ async function getTableColumns(fields, options){
|
|
|
55624
55624
|
columnItem.defaultColor = null;
|
|
55625
55625
|
}
|
|
55626
55626
|
|
|
55627
|
-
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){
|
|
55627
|
+
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){
|
|
55628
55628
|
|
|
55629
55629
|
const drawerRecordDetailSchema = {
|
|
55630
55630
|
"type": "steedos-record-detail",
|
|
@@ -55652,16 +55652,17 @@ async function getTableColumns(fields, options){
|
|
|
55652
55652
|
"drawer": {
|
|
55653
55653
|
"type": "drawer",
|
|
55654
55654
|
"title": " ",
|
|
55655
|
-
"headerClassName": "",
|
|
55655
|
+
"headerClassName": "hidden",
|
|
55656
55656
|
"size": "lg",
|
|
55657
|
-
"bodyClassName": "p-0 m-0
|
|
55657
|
+
"bodyClassName": "p-0 m-0",
|
|
55658
55658
|
"closeOnEsc": true,
|
|
55659
|
+
"closeOnOutside": true,
|
|
55659
55660
|
"resizable": true,
|
|
55660
55661
|
"actions": [],
|
|
55661
55662
|
"body": [
|
|
55662
55663
|
drawerRecordDetailSchema
|
|
55663
55664
|
],
|
|
55664
|
-
"className": "app-popover",
|
|
55665
|
+
"className": "steedos-record-detail-drawer app-popover",
|
|
55665
55666
|
"id": "u:fc5f055afa8c"
|
|
55666
55667
|
},
|
|
55667
55668
|
"preventDefault": true
|
|
@@ -55719,7 +55720,7 @@ function getMobileLines(tpls){
|
|
|
55719
55720
|
let isNewLine = false;
|
|
55720
55721
|
let isLeft = true;
|
|
55721
55722
|
let lineChildrenClassName = "";
|
|
55722
|
-
let lineClassName = "flex items-center justify-between";
|
|
55723
|
+
let lineClassName = "flex items-center justify-between mb-1";
|
|
55723
55724
|
tpls.forEach(function(item){
|
|
55724
55725
|
if(isNewLine && lines.length < maxLineCount){
|
|
55725
55726
|
lines.push({
|
|
@@ -60142,6 +60143,33 @@ async function getApi(object, recordId, fields, options){
|
|
|
60142
60143
|
}
|
|
60143
60144
|
}
|
|
60144
60145
|
|
|
60146
|
+
async function getAutoFill(field, refObject) {
|
|
60147
|
+
let autoFillMapping = field.auto_fill_mapping;
|
|
60148
|
+
if (autoFillMapping && autoFillMapping.length) {
|
|
60149
|
+
let fillMapping = {};
|
|
60150
|
+
let fieldsForApi = [];
|
|
60151
|
+
autoFillMapping.forEach(function (item) {
|
|
60152
|
+
fillMapping[item.to] = `\${${item.from}}`;
|
|
60153
|
+
fieldsForApi.push(item.from);
|
|
60154
|
+
});
|
|
60155
|
+
// let api = {
|
|
60156
|
+
// // "url": "/amis/api/mock2/form/autoUpdate?browser=${browser}&version=${version}",
|
|
60157
|
+
// "url": `/api/v1/${refObject.name}/\${${field.name}}?fields=${JSON.stringify(fieldsForApi)}`,
|
|
60158
|
+
// // "responseData": {
|
|
60159
|
+
// // "name": "${name}"
|
|
60160
|
+
// // },
|
|
60161
|
+
// "silent": false
|
|
60162
|
+
// }
|
|
60163
|
+
// return {
|
|
60164
|
+
// fillMapping,
|
|
60165
|
+
// // api
|
|
60166
|
+
// }
|
|
60167
|
+
// 因为autoFill中配置了api的话,在表单初始化(比如新建记录)时并不会触发执行autoFill,所以只能暂时不用api
|
|
60168
|
+
// 给amis报过问题了,见:https://github.com/baidu/amis/issues/9631
|
|
60169
|
+
return fillMapping;
|
|
60170
|
+
}
|
|
60171
|
+
}
|
|
60172
|
+
|
|
60145
60173
|
async function lookupToAmis(field, readonly, ctx){
|
|
60146
60174
|
if(!ctx){
|
|
60147
60175
|
ctx = {};
|
|
@@ -60225,6 +60253,10 @@ async function lookupToAmis(field, readonly, ctx){
|
|
|
60225
60253
|
amisSchema = lodash.exports.defaultsDeep({}, pageAmisSchema, amisSchema);
|
|
60226
60254
|
}
|
|
60227
60255
|
}
|
|
60256
|
+
const autoFill = await getAutoFill(field);
|
|
60257
|
+
if(autoFill){
|
|
60258
|
+
amisSchema.autoFill = autoFill;
|
|
60259
|
+
}
|
|
60228
60260
|
return amisSchema;
|
|
60229
60261
|
}
|
|
60230
60262
|
|
|
@@ -60396,6 +60428,7 @@ const getMarkdownFieldSchema = (field, readonly, ctx)=>{
|
|
|
60396
60428
|
{
|
|
60397
60429
|
"type": "editor",
|
|
60398
60430
|
"name": field.name,
|
|
60431
|
+
"labelClassName": "none",
|
|
60399
60432
|
"language": "markdown",
|
|
60400
60433
|
}
|
|
60401
60434
|
]
|