@steedos-widgets/sortable 3.6.0-beta.6 → 3.6.0-beta.9
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 +89 -37
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +89 -37
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +89 -37
- 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.0-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.9/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.9/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.0-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.9/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.9/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.9/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -54986,7 +54986,6 @@ async function getQuickEditSchema(field, options){
|
|
|
54986
54986
|
{
|
|
54987
54987
|
"actionType": "custom",
|
|
54988
54988
|
"script": `
|
|
54989
|
-
|
|
54990
54989
|
var _display = _.cloneDeep(event.data._display);
|
|
54991
54990
|
${displayField}
|
|
54992
54991
|
doAction({actionType: 'setValue', "args": {"value": {_display}},componentId: "${quickEditId}"});
|
|
@@ -55157,6 +55156,23 @@ async function getQuickEditSchema(field, options){
|
|
|
55157
55156
|
"onEvent":{
|
|
55158
55157
|
"init":{
|
|
55159
55158
|
"actions":[
|
|
55159
|
+
//amis3.6无法从数据域中直接拿到正确的selectitems,需要通过crud组件的getSelected()函数获取
|
|
55160
|
+
{
|
|
55161
|
+
"actionType": "custom",
|
|
55162
|
+
"script": `
|
|
55163
|
+
crudScoped = event.context.scoped.getComponentById('${options.crudId}');
|
|
55164
|
+
const selectedItems = crudScoped && crudScoped.control.getSelected();
|
|
55165
|
+
doAction({
|
|
55166
|
+
"componentId": "${quickEditId}",
|
|
55167
|
+
"actionType": "setValue",
|
|
55168
|
+
"args": {
|
|
55169
|
+
"value": {
|
|
55170
|
+
selectedItems
|
|
55171
|
+
}
|
|
55172
|
+
}
|
|
55173
|
+
});
|
|
55174
|
+
`
|
|
55175
|
+
},
|
|
55160
55176
|
{
|
|
55161
55177
|
"actionType": "setValue",
|
|
55162
55178
|
"componentId": quickEditId,
|
|
@@ -55920,6 +55936,14 @@ async function getTableSchema$1(fields, options){
|
|
|
55920
55936
|
|
|
55921
55937
|
}
|
|
55922
55938
|
|
|
55939
|
+
const treeConfig = {};
|
|
55940
|
+
|
|
55941
|
+
if(options.enable_tree){
|
|
55942
|
+
treeConfig.expandConfig = {
|
|
55943
|
+
expand: 'first'
|
|
55944
|
+
};
|
|
55945
|
+
}
|
|
55946
|
+
|
|
55923
55947
|
return {
|
|
55924
55948
|
mode: "table",
|
|
55925
55949
|
perPageAvailable: [5, 10, 20, 50, 100, 500],
|
|
@@ -55935,6 +55959,7 @@ async function getTableSchema$1(fields, options){
|
|
|
55935
55959
|
labelTpl: `\${${options.labelFieldName}}`,
|
|
55936
55960
|
autoFillHeight: false, // 自动高度效果不理想,先关闭
|
|
55937
55961
|
columnsTogglable: false,
|
|
55962
|
+
...treeConfig
|
|
55938
55963
|
}
|
|
55939
55964
|
}
|
|
55940
55965
|
|
|
@@ -56399,12 +56424,16 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
56399
56424
|
// }
|
|
56400
56425
|
// listView.handleFilterSubmit(Object.assign({}, removedValues, filterFormValues));
|
|
56401
56426
|
// 点击搜索的时候自动收起搜索栏
|
|
56402
|
-
|
|
56403
|
-
|
|
56404
|
-
|
|
56405
|
-
|
|
56406
|
-
|
|
56407
|
-
|
|
56427
|
+
//触发amis crud 高度重算
|
|
56428
|
+
doAction({
|
|
56429
|
+
"actionType": "broadcast",
|
|
56430
|
+
"args": {
|
|
56431
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
56432
|
+
},
|
|
56433
|
+
"data": {
|
|
56434
|
+
"timeOut": 500
|
|
56435
|
+
}
|
|
56436
|
+
});
|
|
56408
56437
|
const filterService = filterForm.context.getComponents().find(function(n){
|
|
56409
56438
|
return n.props.type === "service";
|
|
56410
56439
|
});
|
|
@@ -56506,9 +56535,16 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
56506
56535
|
let filterFormService = SteedosUI.getClosestAmisComponentByType(filterForm.context, "service");
|
|
56507
56536
|
filterFormService.setData({showFieldsFilter: !!!filterFormService.props.data.showFieldsFilter});
|
|
56508
56537
|
//触发amis crud 高度重算
|
|
56509
|
-
|
|
56510
|
-
|
|
56511
|
-
|
|
56538
|
+
doAction({
|
|
56539
|
+
"actionType": "broadcast",
|
|
56540
|
+
"args": {
|
|
56541
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
56542
|
+
},
|
|
56543
|
+
"data": {
|
|
56544
|
+
"timeOut": 100
|
|
56545
|
+
}
|
|
56546
|
+
});
|
|
56547
|
+
|
|
56512
56548
|
// 移除搜索按钮上的红点
|
|
56513
56549
|
// let crudService = scope.getComponentById("service_listview_" + event.data.objectName);
|
|
56514
56550
|
let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service");
|
|
@@ -56665,9 +56701,15 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
56665
56701
|
sessionStorage.setItem(listViewPropsStoreKey, JSON.stringify(localListViewProps));
|
|
56666
56702
|
}
|
|
56667
56703
|
//触发amis crud 高度重算
|
|
56668
|
-
|
|
56669
|
-
|
|
56670
|
-
|
|
56704
|
+
doAction({
|
|
56705
|
+
"actionType": "broadcast",
|
|
56706
|
+
"args": {
|
|
56707
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
56708
|
+
},
|
|
56709
|
+
"data": {
|
|
56710
|
+
"timeOut": 100
|
|
56711
|
+
}
|
|
56712
|
+
});
|
|
56671
56713
|
// ===END===
|
|
56672
56714
|
`;
|
|
56673
56715
|
return {
|
|
@@ -57909,13 +57951,16 @@ const filterService = filterForm.context.getComponents().find(function(n){
|
|
|
57909
57951
|
});
|
|
57910
57952
|
let toShowFieldsFilter = !!!filterService.props.data.showFieldsFilter;
|
|
57911
57953
|
filterService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
57912
|
-
|
|
57913
|
-
|
|
57914
|
-
|
|
57915
|
-
|
|
57916
|
-
|
|
57917
|
-
}
|
|
57918
|
-
|
|
57954
|
+
//触发amis crud 高度重算
|
|
57955
|
+
doAction({
|
|
57956
|
+
"actionType": "broadcast",
|
|
57957
|
+
"args": {
|
|
57958
|
+
"eventName": "@height.changed." + event.data.objectName
|
|
57959
|
+
},
|
|
57960
|
+
"data": {
|
|
57961
|
+
"timeOut": 1000
|
|
57962
|
+
}
|
|
57963
|
+
});
|
|
57919
57964
|
// 手机端在显示搜索栏时隐藏crud上的刷新按钮,因为点击后crud高度显示有问题
|
|
57920
57965
|
let crudService = scope.getComponentById("service_listview_" + event.data.objectName);
|
|
57921
57966
|
crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
@@ -58279,12 +58324,16 @@ async function getObjectFilter(objectSchema, fields, options) {
|
|
|
58279
58324
|
return;
|
|
58280
58325
|
}
|
|
58281
58326
|
// 列表搜索栏字段值变更后立刻触发提交表单执行crud搜索,所以这里需要额外重算crud高度及筛选按钮红色星号图标显示隐藏
|
|
58282
|
-
|
|
58283
|
-
|
|
58284
|
-
|
|
58285
|
-
|
|
58286
|
-
|
|
58287
|
-
|
|
58327
|
+
//触发amis crud 高度重算
|
|
58328
|
+
doAction({
|
|
58329
|
+
"actionType": "broadcast",
|
|
58330
|
+
"args": {
|
|
58331
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
58332
|
+
},
|
|
58333
|
+
"data": {
|
|
58334
|
+
"timeOut": 1000
|
|
58335
|
+
}
|
|
58336
|
+
});
|
|
58288
58337
|
resizeWindow();
|
|
58289
58338
|
const scope = event.context.scoped;
|
|
58290
58339
|
// let filterFormValues = event.data;
|
|
@@ -59346,14 +59395,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59346
59395
|
}
|
|
59347
59396
|
});
|
|
59348
59397
|
payload.data.rows = treeRecords;
|
|
59349
|
-
try{
|
|
59350
|
-
setTimeout(() => {
|
|
59351
|
-
$('.amis-dialog-widget.antd-Modal .antd-Table-content .antd-Table-table thead .antd-Table-expandBtn')[0]?.click();
|
|
59352
|
-
}, 600);
|
|
59353
|
-
}
|
|
59354
|
-
catch(ex){
|
|
59355
|
-
console.error("tree数据格式展开异常:", ex);
|
|
59356
|
-
}
|
|
59357
59398
|
}
|
|
59358
59399
|
return payload;
|
|
59359
59400
|
`;
|
|
@@ -59380,6 +59421,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59380
59421
|
labelFieldName,
|
|
59381
59422
|
top: top,
|
|
59382
59423
|
isLookup: true,
|
|
59424
|
+
enable_tree: refObjectConfig.enable_tree,
|
|
59383
59425
|
...ctx
|
|
59384
59426
|
});
|
|
59385
59427
|
|
|
@@ -59798,18 +59840,28 @@ async function lookupToAmis(field, readonly, ctx){
|
|
|
59798
59840
|
enableEnhancedLookup = true;
|
|
59799
59841
|
}
|
|
59800
59842
|
}
|
|
59843
|
+
let amisSchema;
|
|
59801
59844
|
// 默认使用下拉框模式显示lookup选项,只能配置了enable_enhanced_lookup才使用弹出增强模式
|
|
59802
59845
|
if(enableEnhancedLookup == true){
|
|
59803
|
-
|
|
59846
|
+
amisSchema = await lookupToAmisPicker(field, readonly, ctx);
|
|
59804
59847
|
}else if(refObject.enable_tree) {
|
|
59805
|
-
|
|
59848
|
+
amisSchema = await lookupToAmisTreeSelect(field, readonly, Object.assign({}, ctx, {
|
|
59806
59849
|
labelField: referenceTo.labelField?.name || 'name',
|
|
59807
59850
|
valueField: referenceTo.valueField?.name || '_id',
|
|
59808
59851
|
objectName: referenceTo.objectName
|
|
59809
59852
|
}));
|
|
59810
59853
|
}else {
|
|
59811
|
-
|
|
59854
|
+
amisSchema = await lookupToAmisSelect(field, readonly, ctx);
|
|
59855
|
+
}
|
|
59856
|
+
let refLookupPage = refObject.pages && refObject.pages.lookup;
|
|
59857
|
+
if(refLookupPage){
|
|
59858
|
+
if(typeof refLookupPage == 'string'){
|
|
59859
|
+
refLookupPage = JSON.parse(refLookupPage);
|
|
59860
|
+
}
|
|
59861
|
+
// Object.assign(amisSchema, refLookupPage);
|
|
59862
|
+
// amisSchema = _.defaultsDeep({}, refLookupPage, amisSchema);
|
|
59812
59863
|
}
|
|
59864
|
+
return amisSchema;
|
|
59813
59865
|
}
|
|
59814
59866
|
|
|
59815
59867
|
async function lookupToAmisIdsPicker(field, readonly, ctx){
|