@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/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@3.6.4-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@3.6.4-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.4-beta.2/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.4-beta.2/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@3.6.4-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@3.6.4-beta.2/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.4-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.4-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.4-beta.2/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.4-beta.2/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -54145,7 +54145,7 @@ function getNameTpl(field, ctx){
|
|
|
54145
54145
|
if(ctx && ctx.isLookup){
|
|
54146
54146
|
linkTarget = "target='_blank'";
|
|
54147
54147
|
}
|
|
54148
|
-
if(ctx.isRelated){
|
|
54148
|
+
if(ctx.isRelated && window.innerWidth >= 768){
|
|
54149
54149
|
return `<a href="${href}" ${linkTarget} onclick="return false;">\${${field.name} | raw}</a>`
|
|
54150
54150
|
}else {
|
|
54151
54151
|
return `<a href="${href}" ${linkTarget}>\${${field.name} | raw}</a>`
|
|
@@ -54203,7 +54203,7 @@ function getRelatedFieldTpl(field, ctx){
|
|
|
54203
54203
|
const href = Router.getObjectDetailPath({
|
|
54204
54204
|
formFactor: ctx.formFactor, appId: "${appId}", objectName: `${objectNameTpl}`, recordId: `${recordIdTpl}`
|
|
54205
54205
|
});
|
|
54206
|
-
if(ctx.isRelated){
|
|
54206
|
+
if(ctx.isRelated && window.innerWidth >= 768){
|
|
54207
54207
|
labelTpl = `<a href="${href}" ${linkTarget} onclick="return false;">${labelTpl}</a>`;
|
|
54208
54208
|
}else {
|
|
54209
54209
|
labelTpl = `<a href="${href}" ${linkTarget}>${labelTpl}</a>`;
|
|
@@ -55628,7 +55628,7 @@ async function getTableColumns(fields, options){
|
|
|
55628
55628
|
columnItem.defaultColor = null;
|
|
55629
55629
|
}
|
|
55630
55630
|
|
|
55631
|
-
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){
|
|
55631
|
+
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){
|
|
55632
55632
|
|
|
55633
55633
|
const drawerRecordDetailSchema = {
|
|
55634
55634
|
"type": "steedos-record-detail",
|
|
@@ -55656,16 +55656,17 @@ async function getTableColumns(fields, options){
|
|
|
55656
55656
|
"drawer": {
|
|
55657
55657
|
"type": "drawer",
|
|
55658
55658
|
"title": " ",
|
|
55659
|
-
"headerClassName": "",
|
|
55659
|
+
"headerClassName": "hidden",
|
|
55660
55660
|
"size": "lg",
|
|
55661
|
-
"bodyClassName": "p-0 m-0
|
|
55661
|
+
"bodyClassName": "p-0 m-0",
|
|
55662
55662
|
"closeOnEsc": true,
|
|
55663
|
+
"closeOnOutside": true,
|
|
55663
55664
|
"resizable": true,
|
|
55664
55665
|
"actions": [],
|
|
55665
55666
|
"body": [
|
|
55666
55667
|
drawerRecordDetailSchema
|
|
55667
55668
|
],
|
|
55668
|
-
"className": "app-popover",
|
|
55669
|
+
"className": "steedos-record-detail-drawer app-popover",
|
|
55669
55670
|
"id": "u:fc5f055afa8c"
|
|
55670
55671
|
},
|
|
55671
55672
|
"preventDefault": true
|
|
@@ -55723,7 +55724,7 @@ function getMobileLines(tpls){
|
|
|
55723
55724
|
let isNewLine = false;
|
|
55724
55725
|
let isLeft = true;
|
|
55725
55726
|
let lineChildrenClassName = "";
|
|
55726
|
-
let lineClassName = "flex items-center justify-between";
|
|
55727
|
+
let lineClassName = "flex items-center justify-between mb-1";
|
|
55727
55728
|
tpls.forEach(function(item){
|
|
55728
55729
|
if(isNewLine && lines.length < maxLineCount){
|
|
55729
55730
|
lines.push({
|
|
@@ -60146,6 +60147,33 @@ async function getApi(object, recordId, fields, options){
|
|
|
60146
60147
|
}
|
|
60147
60148
|
}
|
|
60148
60149
|
|
|
60150
|
+
async function getAutoFill(field, refObject) {
|
|
60151
|
+
let autoFillMapping = field.auto_fill_mapping;
|
|
60152
|
+
if (autoFillMapping && autoFillMapping.length) {
|
|
60153
|
+
let fillMapping = {};
|
|
60154
|
+
let fieldsForApi = [];
|
|
60155
|
+
autoFillMapping.forEach(function (item) {
|
|
60156
|
+
fillMapping[item.to] = `\${${item.from}}`;
|
|
60157
|
+
fieldsForApi.push(item.from);
|
|
60158
|
+
});
|
|
60159
|
+
// let api = {
|
|
60160
|
+
// // "url": "/amis/api/mock2/form/autoUpdate?browser=${browser}&version=${version}",
|
|
60161
|
+
// "url": `/api/v1/${refObject.name}/\${${field.name}}?fields=${JSON.stringify(fieldsForApi)}`,
|
|
60162
|
+
// // "responseData": {
|
|
60163
|
+
// // "name": "${name}"
|
|
60164
|
+
// // },
|
|
60165
|
+
// "silent": false
|
|
60166
|
+
// }
|
|
60167
|
+
// return {
|
|
60168
|
+
// fillMapping,
|
|
60169
|
+
// // api
|
|
60170
|
+
// }
|
|
60171
|
+
// 因为autoFill中配置了api的话,在表单初始化(比如新建记录)时并不会触发执行autoFill,所以只能暂时不用api
|
|
60172
|
+
// 给amis报过问题了,见:https://github.com/baidu/amis/issues/9631
|
|
60173
|
+
return fillMapping;
|
|
60174
|
+
}
|
|
60175
|
+
}
|
|
60176
|
+
|
|
60149
60177
|
async function lookupToAmis(field, readonly, ctx){
|
|
60150
60178
|
if(!ctx){
|
|
60151
60179
|
ctx = {};
|
|
@@ -60229,6 +60257,10 @@ async function lookupToAmis(field, readonly, ctx){
|
|
|
60229
60257
|
amisSchema = lodash.exports.defaultsDeep({}, pageAmisSchema, amisSchema);
|
|
60230
60258
|
}
|
|
60231
60259
|
}
|
|
60260
|
+
const autoFill = await getAutoFill(field);
|
|
60261
|
+
if(autoFill){
|
|
60262
|
+
amisSchema.autoFill = autoFill;
|
|
60263
|
+
}
|
|
60232
60264
|
return amisSchema;
|
|
60233
60265
|
}
|
|
60234
60266
|
|
|
@@ -60400,6 +60432,7 @@ const getMarkdownFieldSchema = (field, readonly, ctx)=>{
|
|
|
60400
60432
|
{
|
|
60401
60433
|
"type": "editor",
|
|
60402
60434
|
"name": field.name,
|
|
60435
|
+
"labelClassName": "none",
|
|
60403
60436
|
"language": "markdown",
|
|
60404
60437
|
}
|
|
60405
60438
|
]
|