@steedos-widgets/sortable 3.6.2-beta.11 → 3.6.2-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 +18 -19
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +18 -19
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +18 -19
- package/package.json +3 -3
package/dist/sortable.esm.js
CHANGED
|
@@ -53947,6 +53947,9 @@ const Router = {
|
|
|
53947
53947
|
if(uiSchema.enable_split){
|
|
53948
53948
|
defaultDisplay = "split";
|
|
53949
53949
|
}
|
|
53950
|
+
if(window.innerWidth <= 768){
|
|
53951
|
+
return "grid";
|
|
53952
|
+
}
|
|
53950
53953
|
return value ? value : defaultDisplay;
|
|
53951
53954
|
},
|
|
53952
53955
|
|
|
@@ -55376,7 +55379,7 @@ async function getQuickEditSchema(field, options){
|
|
|
55376
55379
|
}
|
|
55377
55380
|
|
|
55378
55381
|
function getFieldWidth(width){
|
|
55379
|
-
const defaultWidth =
|
|
55382
|
+
const defaultWidth = null;
|
|
55380
55383
|
if(typeof width == 'string'){
|
|
55381
55384
|
if(isNaN(width)){
|
|
55382
55385
|
return width || defaultWidth;
|
|
@@ -55406,14 +55409,14 @@ async function getTableColumns(fields, options){
|
|
|
55406
55409
|
//增加quickEdit属性,实现快速编辑
|
|
55407
55410
|
const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
|
|
55408
55411
|
let className = "";
|
|
55409
|
-
if(
|
|
55410
|
-
|
|
55411
|
-
|
|
55412
|
-
|
|
55412
|
+
if(/Safari/.test(navigator.userAgent)){
|
|
55413
|
+
className += " whitespace-nowrap ";
|
|
55414
|
+
}else {
|
|
55415
|
+
if(field.wrap != true){
|
|
55413
55416
|
className += " whitespace-nowrap ";
|
|
55417
|
+
}else {
|
|
55418
|
+
className += " break-words ";
|
|
55414
55419
|
}
|
|
55415
|
-
}else {
|
|
55416
|
-
className += " break-words ";
|
|
55417
55420
|
}
|
|
55418
55421
|
let columnItem;
|
|
55419
55422
|
if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files'){
|
|
@@ -59022,17 +59025,13 @@ function getReferenceToSync(field) {
|
|
|
59022
59025
|
|
|
59023
59026
|
function getLookupSapceUserTreeSchema(isMobile){
|
|
59024
59027
|
let apiAdaptor = `
|
|
59025
|
-
// console.log("===getLookupSapceUserTreeSchema===", JSON.stringify(payload));
|
|
59026
59028
|
const records = payload.data.options;
|
|
59027
|
-
let isTreeOptionsComputed = false;
|
|
59028
|
-
if(records.length === 1 && records[0].children){
|
|
59029
|
-
isTreeOptionsComputed = true;
|
|
59030
|
-
}
|
|
59031
|
-
if(isTreeOptionsComputed){
|
|
59032
|
-
return payload;
|
|
59033
|
-
}
|
|
59034
59029
|
const treeRecords = [];
|
|
59035
|
-
const getChildren = (records, childrenIds) => {
|
|
59030
|
+
const getChildren = (currentRecord, records, childrenIds) => {
|
|
59031
|
+
if (currentRecord.children && typeof currentRecord.children[0] === "object") {
|
|
59032
|
+
// 考虑api配置了cache缓存的话,不会请求接口但是会重新进这个接收适配器脚本且payload.data.options返回的会是上一次计算结果,这里直接返回计算过的children
|
|
59033
|
+
return currentRecord.children;
|
|
59034
|
+
}
|
|
59036
59035
|
if (!childrenIds) {
|
|
59037
59036
|
return;
|
|
59038
59037
|
}
|
|
@@ -59041,7 +59040,7 @@ function getLookupSapceUserTreeSchema(isMobile){
|
|
|
59041
59040
|
});
|
|
59042
59041
|
_.each(children, (item) => {
|
|
59043
59042
|
if (item.children) {
|
|
59044
|
-
item.children = getChildren(records, item.children)
|
|
59043
|
+
item.children = getChildren(item, records, item.children)
|
|
59045
59044
|
}else{
|
|
59046
59045
|
item.children = [];
|
|
59047
59046
|
}
|
|
@@ -59067,7 +59066,7 @@ function getLookupSapceUserTreeSchema(isMobile){
|
|
|
59067
59066
|
|
|
59068
59067
|
_.each(records, (record) => {
|
|
59069
59068
|
if (record.noParent == 1) {
|
|
59070
|
-
treeRecords.push(Object.assign({}, record, { children: getChildren(records, record.children) }));
|
|
59069
|
+
treeRecords.push(Object.assign({}, record, { children: getChildren(record, records, record.children) }));
|
|
59071
59070
|
}
|
|
59072
59071
|
});
|
|
59073
59072
|
console.log(treeRecords)
|
|
@@ -60802,7 +60801,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60802
60801
|
}else {
|
|
60803
60802
|
convertData.className = 'm-0';
|
|
60804
60803
|
}
|
|
60805
|
-
if(readonly){
|
|
60804
|
+
if(readonly && ctx.mode !== 'edit'){
|
|
60806
60805
|
convertData.className = `${convertData.className} border-b`;
|
|
60807
60806
|
}
|
|
60808
60807
|
if(readonly){
|