@steedos-widgets/sortable 3.6.2-beta.13 → 3.6.2-beta.15
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 +55 -21
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +55 -21
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +55 -21
- 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.2-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.15/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.15/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.2-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.15/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.15/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.15/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -53986,8 +53986,8 @@ const Router = {
|
|
|
53986
53986
|
/*
|
|
53987
53987
|
* @Author: baozhoutao@steedos.com
|
|
53988
53988
|
* @Date: 2022-07-20 16:29:22
|
|
53989
|
-
* @LastEditors:
|
|
53990
|
-
* @LastEditTime:
|
|
53989
|
+
* @LastEditors: liaodaxue
|
|
53990
|
+
* @LastEditTime: 2024-01-25 14:44:17
|
|
53991
53991
|
* @Description:
|
|
53992
53992
|
*/
|
|
53993
53993
|
|
|
@@ -54059,6 +54059,25 @@ function getComparableAmisVersion() {
|
|
|
54059
54059
|
}
|
|
54060
54060
|
}
|
|
54061
54061
|
|
|
54062
|
+
/**
|
|
54063
|
+
* 判断浏览器类型
|
|
54064
|
+
* @returns 按需返回浏览器类型;
|
|
54065
|
+
*/
|
|
54066
|
+
function getBowserType() {
|
|
54067
|
+
const userAgent = navigator.userAgent;
|
|
54068
|
+
if (userAgent.indexOf("Chrome")!== -1 && userAgent.indexOf("Safari") !== -1 && userAgent.indexOf("Edg") === -1) {
|
|
54069
|
+
return "Chrome";
|
|
54070
|
+
} else if (userAgent.indexOf("Firefox") !== -1) {
|
|
54071
|
+
return "Firefox";
|
|
54072
|
+
} else if (userAgent.indexOf("Safari") !== -1 && userAgent.indexOf("Chrome") === -1 && userAgent.indexOf("Edge") === -1) {
|
|
54073
|
+
return "Safari";
|
|
54074
|
+
} else if (userAgent.indexOf("Edg") !== -1) {
|
|
54075
|
+
return "Edge";
|
|
54076
|
+
} else {
|
|
54077
|
+
return "Unknown browser"; // 其他浏览器...(可根据自己需要确定是否新增其他浏览器的判断)
|
|
54078
|
+
}
|
|
54079
|
+
}
|
|
54080
|
+
|
|
54062
54081
|
function getNumberTpl(field){
|
|
54063
54082
|
return `<span>\${_display.${field.name}}</span>`
|
|
54064
54083
|
}
|
|
@@ -55208,7 +55227,8 @@ async function getQuickEditSchema(field, options){
|
|
|
55208
55227
|
"failed": "失败了呢。。"
|
|
55209
55228
|
}
|
|
55210
55229
|
}
|
|
55211
|
-
}
|
|
55230
|
+
},
|
|
55231
|
+
"expression": "${!recordPermissions.modifyAllRecords}"
|
|
55212
55232
|
},
|
|
55213
55233
|
{
|
|
55214
55234
|
"actionType": "setValue",
|
|
@@ -55224,7 +55244,7 @@ async function getQuickEditSchema(field, options){
|
|
|
55224
55244
|
"componentId": quickEditId,
|
|
55225
55245
|
"args": {
|
|
55226
55246
|
"value":{
|
|
55227
|
-
"quickedit_record_permissions": "${event.data}"
|
|
55247
|
+
"quickedit_record_permissions": "${recordPermissions.modifyAllRecords ? {'allowEdit': true} : event.data}"
|
|
55228
55248
|
}
|
|
55229
55249
|
}
|
|
55230
55250
|
}
|
|
@@ -55288,7 +55308,7 @@ async function getQuickEditSchema(field, options){
|
|
|
55288
55308
|
`
|
|
55289
55309
|
}
|
|
55290
55310
|
},
|
|
55291
|
-
"expression":"${event.data.value}"
|
|
55311
|
+
"expression":"${event.data.value && !recordPermissions.modifyAllRecords}"
|
|
55292
55312
|
},
|
|
55293
55313
|
{
|
|
55294
55314
|
"actionType": "setValue",
|
|
@@ -55319,10 +55339,20 @@ async function getQuickEditSchema(field, options){
|
|
|
55319
55339
|
"script": `
|
|
55320
55340
|
const noPermission = event.data.noPermission;
|
|
55321
55341
|
const crudComponent = event.context.scoped.getComponentById("${options.crudId}");
|
|
55322
|
-
|
|
55342
|
+
let selectedItems = crudComponent && crudComponent.props.store.selectedItems.concat();
|
|
55323
55343
|
noPermission.forEach(function (item) {
|
|
55324
55344
|
crudComponent && crudComponent.unSelectItem(_.find(selectedItems,{_id:item}));
|
|
55345
|
+
_.remove(selectedItems, (selected) => selected._id === item);
|
|
55325
55346
|
})
|
|
55347
|
+
doAction({
|
|
55348
|
+
"componentId": "${quickEditId}",
|
|
55349
|
+
"actionType": "setValue",
|
|
55350
|
+
"args": {
|
|
55351
|
+
"value": {
|
|
55352
|
+
selectedItems
|
|
55353
|
+
}
|
|
55354
|
+
}
|
|
55355
|
+
});
|
|
55326
55356
|
`
|
|
55327
55357
|
},
|
|
55328
55358
|
{
|
|
@@ -55413,7 +55443,8 @@ async function getTableColumns(fields, options){
|
|
|
55413
55443
|
//增加quickEdit属性,实现快速编辑
|
|
55414
55444
|
const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
|
|
55415
55445
|
let className = "";
|
|
55416
|
-
|
|
55446
|
+
const bowserType = getBowserType();
|
|
55447
|
+
if(bowserType === "Safari"){
|
|
55417
55448
|
className += " whitespace-nowrap ";
|
|
55418
55449
|
}else {
|
|
55419
55450
|
if(field.wrap != true){
|
|
@@ -55422,6 +55453,18 @@ async function getTableColumns(fields, options){
|
|
|
55422
55453
|
className += " break-words ";
|
|
55423
55454
|
}
|
|
55424
55455
|
}
|
|
55456
|
+
|
|
55457
|
+
if (typeof field.amis?.className == "object") {
|
|
55458
|
+
className = {
|
|
55459
|
+
[className]: "true",
|
|
55460
|
+
...field.amis.className
|
|
55461
|
+
};
|
|
55462
|
+
} else if (typeof field.amis?.className == "string") {
|
|
55463
|
+
className = `${className} ${field.amis.className} `;
|
|
55464
|
+
}
|
|
55465
|
+
let fieldAmis = lodash.exports.clone(field.amis);
|
|
55466
|
+
delete fieldAmis?.className;
|
|
55467
|
+
|
|
55425
55468
|
let columnItem;
|
|
55426
55469
|
if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files'){
|
|
55427
55470
|
const previewFileScript = `
|
|
@@ -55472,7 +55515,7 @@ async function getTableColumns(fields, options){
|
|
|
55472
55515
|
toggled: field.toggled,
|
|
55473
55516
|
static: true,
|
|
55474
55517
|
className,
|
|
55475
|
-
},
|
|
55518
|
+
}, fieldAmis, {name: field.name});
|
|
55476
55519
|
}else if(field.type === 'avatar' || field.type === 'image' || field.type === 'file'){
|
|
55477
55520
|
columnItem = Object.assign({}, {
|
|
55478
55521
|
type: "switch",
|
|
@@ -55483,7 +55526,7 @@ async function getTableColumns(fields, options){
|
|
|
55483
55526
|
static: true,
|
|
55484
55527
|
className,
|
|
55485
55528
|
...getAmisFileReadonlySchema(field)
|
|
55486
|
-
},
|
|
55529
|
+
}, fieldAmis, {name: field.name});
|
|
55487
55530
|
}
|
|
55488
55531
|
else if(field.type === 'select'){
|
|
55489
55532
|
const map = getSelectMap(field.options);
|
|
@@ -55498,7 +55541,7 @@ async function getTableColumns(fields, options){
|
|
|
55498
55541
|
className,
|
|
55499
55542
|
inputClassName: "inline",
|
|
55500
55543
|
static: true,
|
|
55501
|
-
},
|
|
55544
|
+
}, fieldAmis, {name: field.name});
|
|
55502
55545
|
}
|
|
55503
55546
|
else {
|
|
55504
55547
|
const tpl = await getFieldTpl(field, options);
|
|
@@ -55525,15 +55568,6 @@ async function getTableColumns(fields, options){
|
|
|
55525
55568
|
// }
|
|
55526
55569
|
|
|
55527
55570
|
//field上的amis属性里的clssname需要单独判断类型合并
|
|
55528
|
-
if (typeof field.amis?.className == "object") {
|
|
55529
|
-
className = {
|
|
55530
|
-
[className]: "true",
|
|
55531
|
-
...field.amis.className
|
|
55532
|
-
};
|
|
55533
|
-
} else if (typeof field.amis?.className == "string") {
|
|
55534
|
-
className = `${className} ${field.amis.className} `;
|
|
55535
|
-
}
|
|
55536
|
-
delete field.amis?.className;
|
|
55537
55571
|
|
|
55538
55572
|
if(!field.hidden && !field.extra){
|
|
55539
55573
|
columnItem = Object.assign({}, {
|
|
@@ -55550,7 +55584,7 @@ async function getTableColumns(fields, options){
|
|
|
55550
55584
|
static: true,
|
|
55551
55585
|
options: field.type === 'html' ? {html: true} : null
|
|
55552
55586
|
// toggled: true
|
|
55553
|
-
},
|
|
55587
|
+
}, fieldAmis, {name: field.name});
|
|
55554
55588
|
|
|
55555
55589
|
if(field.type === 'color'){
|
|
55556
55590
|
columnItem.type = 'color';
|
|
@@ -60465,7 +60499,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60465
60499
|
convertData = {
|
|
60466
60500
|
type: getAmisStaticFieldType('datetime', readonly),
|
|
60467
60501
|
inputFormat: 'YYYY-MM-DD HH:mm',
|
|
60468
|
-
format: 'YYYY-MM-DDTHH:mm:
|
|
60502
|
+
format: 'YYYY-MM-DDTHH:mm:00.000Z',
|
|
60469
60503
|
tpl: readonly ? getDateTimeTpl(field) : null,
|
|
60470
60504
|
utc: true,
|
|
60471
60505
|
};
|