@steedos-widgets/sortable 3.6.11-beta.4 → 3.6.11-beta.6
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 +105 -74
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +105 -74
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +106 -75
- 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.11-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@3.6.11-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.11-beta.6/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.11-beta.6/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.11-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@3.6.11-beta.6/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.11-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.11-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.11-beta.6/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.11-beta.6/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -58302,6 +58302,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
58302
58302
|
}
|
|
58303
58303
|
|
|
58304
58304
|
const onChangeScript = `
|
|
58305
|
+
// console.log("==search=onChangeScript===");
|
|
58305
58306
|
const scope = event.context.scoped;
|
|
58306
58307
|
let crud = SteedosUI.getClosestAmisComponentByType(scope, "crud");
|
|
58307
58308
|
// let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service");
|
|
@@ -58317,14 +58318,14 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
58317
58318
|
}
|
|
58318
58319
|
`;
|
|
58319
58320
|
|
|
58320
|
-
// onSearchScript中加上了onChangeScript中的脚本,是因为amis 3.2不能用change事件执行onChangeScript
|
|
58321
|
+
// 之前onSearchScript中加上了onChangeScript中的脚本,是因为amis 3.2不能用change事件执行onChangeScript
|
|
58321
58322
|
// 而点击回车按键又不会触发blur事件,所以只能每次回车事件中额外再执行一次onChangeScript
|
|
58322
58323
|
// 等升级到amis 3.4+,blur事件换成change事件执行onChangeScript,就可以不用在onSearchScript中执行onChangeScript了
|
|
58324
|
+
// 基于amis3.6,已经不再用blur事件触发onChangeScript,所以这里把之前加上的onChangeScript去掉了,如果以后还要换blur来触发onChangeScript脚本的话,这里又要加回onChangeScript脚本
|
|
58323
58325
|
const onSearchScript = `
|
|
58324
|
-
|
|
58325
|
-
|
|
58326
|
+
// console.log("==search=onSearchScript===");
|
|
58326
58327
|
// 下面的脚本只为解决点击搜索表单取消按钮,再重新在其中输入过滤条件但是不点击搜索按钮或回车按键触发搜索,此时在快速搜索框输入过滤条件按回车按键会把搜索表单中的过滤条件清空的问题
|
|
58327
|
-
|
|
58328
|
+
const scope = event.context.scoped;
|
|
58328
58329
|
// 如果点击过顶部搜索栏表单的取消按钮,会把此处event.data.__super.__super.__super中的搜索表单项的所有字段设置为null
|
|
58329
58330
|
// 点击取消按钮后继续在表单项中输入过滤条件且最后没有点击回车按键或点击表单项搜索按钮的话,在快速搜索中点击回车按钮提交搜索会所顶部搜索表单中的字段值清空
|
|
58330
58331
|
let isLookup = event.data.isLookup;
|
|
@@ -58343,6 +58344,14 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
58343
58344
|
}, 500);
|
|
58344
58345
|
`;
|
|
58345
58346
|
|
|
58347
|
+
const onBlurScript = `
|
|
58348
|
+
// console.log("==search=onBlurScript===");
|
|
58349
|
+
// 失去焦点事件触发搜索
|
|
58350
|
+
const scope = event.context.scoped;
|
|
58351
|
+
const sb = SteedosUI.getClosestAmisComponentByType(scope, "search-box");
|
|
58352
|
+
sb.handleSearch();
|
|
58353
|
+
`;
|
|
58354
|
+
|
|
58346
58355
|
return {
|
|
58347
58356
|
"type": "tooltip-wrapper",
|
|
58348
58357
|
"id": "steedos_crud_toolbar_quick_search",
|
|
@@ -58360,7 +58369,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
58360
58369
|
"name": keywordsSearchBoxName,
|
|
58361
58370
|
"placeholder": "快捷搜索",
|
|
58362
58371
|
"value": crudKeywords,
|
|
58363
|
-
|
|
58372
|
+
"clearable": true,//因为清除并不会触发失去焦点事件,只有禁用,但是它会触发change事件,所以等升级到amis 3.4+后可以重新放开
|
|
58364
58373
|
"clearAndSubmit": true,
|
|
58365
58374
|
"searchImediately": false,
|
|
58366
58375
|
"onEvent": {
|
|
@@ -58372,13 +58381,21 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
58372
58381
|
}
|
|
58373
58382
|
]
|
|
58374
58383
|
},
|
|
58375
|
-
"
|
|
58384
|
+
"change": { //amis 3.2change事件中setData会卡,升级到amis 3.4+应该不会再卡了,所以这里换回change事件,如果还是会卡就要考虑重新换成blur事件
|
|
58376
58385
|
"actions": [
|
|
58377
58386
|
{
|
|
58378
58387
|
"actionType": "custom",
|
|
58379
58388
|
"script": onChangeScript
|
|
58380
58389
|
},
|
|
58381
58390
|
]
|
|
58391
|
+
},
|
|
58392
|
+
"blur": {
|
|
58393
|
+
"actions": [
|
|
58394
|
+
{
|
|
58395
|
+
"actionType": "custom",
|
|
58396
|
+
"script": onBlurScript
|
|
58397
|
+
},
|
|
58398
|
+
]
|
|
58382
58399
|
}
|
|
58383
58400
|
}
|
|
58384
58401
|
}
|
|
@@ -58404,59 +58421,67 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
58404
58421
|
};
|
|
58405
58422
|
}
|
|
58406
58423
|
let toolbarReloadButton;
|
|
58407
|
-
|
|
58408
|
-
// const
|
|
58409
|
-
//
|
|
58410
|
-
//
|
|
58411
|
-
//
|
|
58412
|
-
//
|
|
58413
|
-
// listView.handleChangePage(1);
|
|
58414
|
-
// `;
|
|
58415
|
-
// toolbarReloadButton = {
|
|
58416
|
-
// // "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页,这在加载更多按钮的翻页模式下会有问题
|
|
58417
|
-
// "type": "button",
|
|
58418
|
-
// "align": "right",
|
|
58419
|
-
// //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
58420
|
-
// // "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
58421
|
-
// "tooltipPlacement": "top",
|
|
58422
|
-
// "className": "bg-white p-2 rounded text-gray-500",
|
|
58423
|
-
// "label": "",
|
|
58424
|
-
// "icon": "fa fa-sync",
|
|
58425
|
-
// "visibleOn": "${!showFieldsFilter}",
|
|
58426
|
-
// "onEvent": {
|
|
58427
|
-
// "click": {
|
|
58428
|
-
// "actions": [
|
|
58429
|
-
// {
|
|
58430
|
-
// "actionType": "custom",
|
|
58431
|
-
// "script": onReloadScript
|
|
58432
|
-
// }
|
|
58433
|
-
// ]
|
|
58434
|
-
// }
|
|
58435
|
-
// },
|
|
58436
|
-
// };
|
|
58424
|
+
const onReloadScript = `
|
|
58425
|
+
// const scope = event.context.scoped;
|
|
58426
|
+
// var listView = scope.parent.getComponents().find(function(n){
|
|
58427
|
+
// return n.props.type === "crud";
|
|
58428
|
+
// });
|
|
58429
|
+
// listView.handleChangePage(1);
|
|
58437
58430
|
|
|
58438
|
-
|
|
58439
|
-
|
|
58440
|
-
|
|
58441
|
-
|
|
58442
|
-
|
|
58443
|
-
|
|
58444
|
-
|
|
58445
|
-
|
|
58446
|
-
|
|
58447
|
-
|
|
58448
|
-
|
|
58449
|
-
|
|
58450
|
-
|
|
58451
|
-
|
|
58452
|
-
|
|
58453
|
-
|
|
58454
|
-
|
|
58455
|
-
|
|
58456
|
-
|
|
58457
|
-
|
|
58458
|
-
|
|
58459
|
-
|
|
58431
|
+
|
|
58432
|
+
// 触发搜索,而不是reload,因为快速搜索输入框失去焦点已经会触发搜索了,这里用reload的话,会有bug
|
|
58433
|
+
// 不加setTimeout的话,快速搜索输入框失去焦点再触发此脚本还是有问题
|
|
58434
|
+
setTimeout(function(){
|
|
58435
|
+
const scope = event.context.scoped;
|
|
58436
|
+
const sb = SteedosUI.getClosestAmisComponentByType(scope, "search-box");
|
|
58437
|
+
sb.handleSearch();
|
|
58438
|
+
}, 500);
|
|
58439
|
+
`;
|
|
58440
|
+
toolbarReloadButton = {
|
|
58441
|
+
// "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页,这在加载更多按钮的翻页模式下会有问题
|
|
58442
|
+
"type": "button",
|
|
58443
|
+
"align": "right",
|
|
58444
|
+
//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
58445
|
+
// "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
58446
|
+
"tooltipPlacement": "top",
|
|
58447
|
+
"className": "bg-white p-2 rounded text-gray-500",
|
|
58448
|
+
"label": "",
|
|
58449
|
+
"icon": "fa fa-sync",
|
|
58450
|
+
// "visibleOn": "${!showFieldsFilter}",
|
|
58451
|
+
"onEvent": {
|
|
58452
|
+
"click": {
|
|
58453
|
+
"actions": [
|
|
58454
|
+
{
|
|
58455
|
+
"actionType": "custom",
|
|
58456
|
+
"script": onReloadScript
|
|
58457
|
+
}
|
|
58458
|
+
]
|
|
58459
|
+
}
|
|
58460
|
+
},
|
|
58461
|
+
};
|
|
58462
|
+
// if(formFactor === 'SMALL'){
|
|
58463
|
+
// // 后续如果换成加载更多按钮的翻页模式的话,不可以直接使用下面的reload,需要换成上面的自定义脚本模式
|
|
58464
|
+
// toolbarReloadButton = {
|
|
58465
|
+
// "type": "reload",
|
|
58466
|
+
// "align": "right",
|
|
58467
|
+
// //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
58468
|
+
// // "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
58469
|
+
// "tooltip":"",
|
|
58470
|
+
// "tooltipPlacement": "top",
|
|
58471
|
+
// "className": "bg-white p-2 rounded text-gray-500"
|
|
58472
|
+
// };
|
|
58473
|
+
// }
|
|
58474
|
+
// else{
|
|
58475
|
+
// toolbarReloadButton = {
|
|
58476
|
+
// "type": "reload",
|
|
58477
|
+
// "align": "right",
|
|
58478
|
+
// //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
58479
|
+
// // "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
58480
|
+
// "tooltip":"",
|
|
58481
|
+
// "tooltipPlacement": "top",
|
|
58482
|
+
// "className": "bg-white p-2 rounded text-gray-500"
|
|
58483
|
+
// };
|
|
58484
|
+
// }
|
|
58460
58485
|
let toolbarFilter;
|
|
58461
58486
|
if(filterVisible){
|
|
58462
58487
|
toolbarFilter ={
|
|
@@ -59587,6 +59612,11 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59587
59612
|
}
|
|
59588
59613
|
}
|
|
59589
59614
|
|
|
59615
|
+
// amis@3.6.3和6.3.0如果不配置 trackExpression监听当前字段值变化,那么当前lookup字段(比如T)作为其它lookup字段(比如F)autoFill自动填充的目标字段的话,
|
|
59616
|
+
// F字段值变更后,虽然会自动填充值到T字段中,但是并不会触发T字段的source接口重新请求,这会造成T字段被填充后,可能会显示为字段id而不是label了,见issue:https://github.com/steedos/steedos-platform/issues/6601
|
|
59617
|
+
// amis@6.2.2不需要配置trackExpression不会有#6601所示问题,但是更高版本6.3.0也会有,所以这里只能加上trackExpression避开相关bug。
|
|
59618
|
+
source.trackExpression = `\${${field.name}}`;
|
|
59619
|
+
|
|
59590
59620
|
source.data.$term = "$term";
|
|
59591
59621
|
source.data.$self = "$$";
|
|
59592
59622
|
|
|
@@ -60471,8 +60501,8 @@ if(typeof window != 'undefined'){
|
|
|
60471
60501
|
/*
|
|
60472
60502
|
* @Author: baozhoutao@steedos.com
|
|
60473
60503
|
* @Date: 2023-01-13 17:27:54
|
|
60474
|
-
* @LastEditors:
|
|
60475
|
-
* @LastEditTime: 2024-
|
|
60504
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
60505
|
+
* @LastEditTime: 2024-04-11 14:14:43
|
|
60476
60506
|
* @Description:
|
|
60477
60507
|
*/
|
|
60478
60508
|
|
|
@@ -60548,12 +60578,12 @@ const getHtmlFieldSchema = (field, readonly, ctx)=>{
|
|
|
60548
60578
|
"receiver": "${context.rootUrl}/s3/images",
|
|
60549
60579
|
"name": field.name,
|
|
60550
60580
|
"options": {
|
|
60551
|
-
"menu": {
|
|
60552
|
-
|
|
60553
|
-
|
|
60554
|
-
|
|
60555
|
-
|
|
60556
|
-
},
|
|
60581
|
+
// "menu": {
|
|
60582
|
+
// "insert": {
|
|
60583
|
+
// "title": "Insert",
|
|
60584
|
+
// "items": "image link media addcomment pageembed codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents | insertdatetime"
|
|
60585
|
+
// }
|
|
60586
|
+
// },
|
|
60557
60587
|
"plugins": [
|
|
60558
60588
|
"autoresize"
|
|
60559
60589
|
],
|
|
@@ -60569,13 +60599,14 @@ const getHtmlFieldSchema = (field, readonly, ctx)=>{
|
|
|
60569
60599
|
"type": "input-rich-text",
|
|
60570
60600
|
"receiver": "${context.rootUrl}/s3/images",
|
|
60571
60601
|
"options":{
|
|
60572
|
-
"menu": {
|
|
60573
|
-
|
|
60574
|
-
|
|
60575
|
-
|
|
60576
|
-
|
|
60577
|
-
},
|
|
60578
|
-
"statusbar": false
|
|
60602
|
+
// "menu": {
|
|
60603
|
+
// "insert": {
|
|
60604
|
+
// "title": "Insert",
|
|
60605
|
+
// "items": "image link media addcomment pageembed codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents | insertdatetime"
|
|
60606
|
+
// }
|
|
60607
|
+
// },
|
|
60608
|
+
"statusbar": false,
|
|
60609
|
+
"menubar": false
|
|
60579
60610
|
},
|
|
60580
60611
|
"name": field.name
|
|
60581
60612
|
}
|
|
@@ -60664,7 +60695,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60664
60695
|
if(lodash.exports.includes(OMIT_FIELDS, field.name) && ctx.showSystemFields != true){
|
|
60665
60696
|
return;
|
|
60666
60697
|
}
|
|
60667
|
-
const baseData = {name: ctx.fieldNamePrefix ? `${ctx.fieldNamePrefix}${field.name}` : field.name, label: field.label, labelRemark: field.inlineHelpText, required: lodash.exports.has(ctx, 'required') ? ctx.required : field.required};
|
|
60698
|
+
const baseData = {name: ctx.fieldNamePrefix ? `${ctx.fieldNamePrefix}${field.name}` : field.name, label: field.label, labelRemark: field.inlineHelpText, description: field.description, required: lodash.exports.has(ctx, 'required') ? ctx.required : field.required};
|
|
60668
60699
|
let convertData = {
|
|
60669
60700
|
};
|
|
60670
60701
|
// if(_.includes(OMIT_FIELDS, field.name)){
|