@steedos-widgets/sortable 3.6.0-beta.7 → 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 +79 -29
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +79 -29
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +79 -29
- package/package.json +3 -3
package/dist/sortable.esm.js
CHANGED
|
@@ -54982,7 +54982,6 @@ async function getQuickEditSchema(field, options){
|
|
|
54982
54982
|
{
|
|
54983
54983
|
"actionType": "custom",
|
|
54984
54984
|
"script": `
|
|
54985
|
-
|
|
54986
54985
|
var _display = _.cloneDeep(event.data._display);
|
|
54987
54986
|
${displayField}
|
|
54988
54987
|
doAction({actionType: 'setValue', "args": {"value": {_display}},componentId: "${quickEditId}"});
|
|
@@ -55153,6 +55152,23 @@ async function getQuickEditSchema(field, options){
|
|
|
55153
55152
|
"onEvent":{
|
|
55154
55153
|
"init":{
|
|
55155
55154
|
"actions":[
|
|
55155
|
+
//amis3.6无法从数据域中直接拿到正确的selectitems,需要通过crud组件的getSelected()函数获取
|
|
55156
|
+
{
|
|
55157
|
+
"actionType": "custom",
|
|
55158
|
+
"script": `
|
|
55159
|
+
crudScoped = event.context.scoped.getComponentById('${options.crudId}');
|
|
55160
|
+
const selectedItems = crudScoped && crudScoped.control.getSelected();
|
|
55161
|
+
doAction({
|
|
55162
|
+
"componentId": "${quickEditId}",
|
|
55163
|
+
"actionType": "setValue",
|
|
55164
|
+
"args": {
|
|
55165
|
+
"value": {
|
|
55166
|
+
selectedItems
|
|
55167
|
+
}
|
|
55168
|
+
}
|
|
55169
|
+
});
|
|
55170
|
+
`
|
|
55171
|
+
},
|
|
55156
55172
|
{
|
|
55157
55173
|
"actionType": "setValue",
|
|
55158
55174
|
"componentId": quickEditId,
|
|
@@ -56404,12 +56420,16 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
56404
56420
|
// }
|
|
56405
56421
|
// listView.handleFilterSubmit(Object.assign({}, removedValues, filterFormValues));
|
|
56406
56422
|
// 点击搜索的时候自动收起搜索栏
|
|
56407
|
-
|
|
56408
|
-
|
|
56409
|
-
|
|
56410
|
-
|
|
56411
|
-
|
|
56412
|
-
|
|
56423
|
+
//触发amis crud 高度重算
|
|
56424
|
+
doAction({
|
|
56425
|
+
"actionType": "broadcast",
|
|
56426
|
+
"args": {
|
|
56427
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
56428
|
+
},
|
|
56429
|
+
"data": {
|
|
56430
|
+
"timeOut": 500
|
|
56431
|
+
}
|
|
56432
|
+
});
|
|
56413
56433
|
const filterService = filterForm.context.getComponents().find(function(n){
|
|
56414
56434
|
return n.props.type === "service";
|
|
56415
56435
|
});
|
|
@@ -56511,9 +56531,16 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
56511
56531
|
let filterFormService = SteedosUI.getClosestAmisComponentByType(filterForm.context, "service");
|
|
56512
56532
|
filterFormService.setData({showFieldsFilter: !!!filterFormService.props.data.showFieldsFilter});
|
|
56513
56533
|
//触发amis crud 高度重算
|
|
56514
|
-
|
|
56515
|
-
|
|
56516
|
-
|
|
56534
|
+
doAction({
|
|
56535
|
+
"actionType": "broadcast",
|
|
56536
|
+
"args": {
|
|
56537
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
56538
|
+
},
|
|
56539
|
+
"data": {
|
|
56540
|
+
"timeOut": 100
|
|
56541
|
+
}
|
|
56542
|
+
});
|
|
56543
|
+
|
|
56517
56544
|
// 移除搜索按钮上的红点
|
|
56518
56545
|
// let crudService = scope.getComponentById("service_listview_" + event.data.objectName);
|
|
56519
56546
|
let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service");
|
|
@@ -56670,9 +56697,15 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
56670
56697
|
sessionStorage.setItem(listViewPropsStoreKey, JSON.stringify(localListViewProps));
|
|
56671
56698
|
}
|
|
56672
56699
|
//触发amis crud 高度重算
|
|
56673
|
-
|
|
56674
|
-
|
|
56675
|
-
|
|
56700
|
+
doAction({
|
|
56701
|
+
"actionType": "broadcast",
|
|
56702
|
+
"args": {
|
|
56703
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
56704
|
+
},
|
|
56705
|
+
"data": {
|
|
56706
|
+
"timeOut": 100
|
|
56707
|
+
}
|
|
56708
|
+
});
|
|
56676
56709
|
// ===END===
|
|
56677
56710
|
`;
|
|
56678
56711
|
return {
|
|
@@ -57914,13 +57947,16 @@ const filterService = filterForm.context.getComponents().find(function(n){
|
|
|
57914
57947
|
});
|
|
57915
57948
|
let toShowFieldsFilter = !!!filterService.props.data.showFieldsFilter;
|
|
57916
57949
|
filterService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
57917
|
-
|
|
57918
|
-
|
|
57919
|
-
|
|
57920
|
-
|
|
57921
|
-
|
|
57922
|
-
}
|
|
57923
|
-
|
|
57950
|
+
//触发amis crud 高度重算
|
|
57951
|
+
doAction({
|
|
57952
|
+
"actionType": "broadcast",
|
|
57953
|
+
"args": {
|
|
57954
|
+
"eventName": "@height.changed." + event.data.objectName
|
|
57955
|
+
},
|
|
57956
|
+
"data": {
|
|
57957
|
+
"timeOut": 1000
|
|
57958
|
+
}
|
|
57959
|
+
});
|
|
57924
57960
|
// 手机端在显示搜索栏时隐藏crud上的刷新按钮,因为点击后crud高度显示有问题
|
|
57925
57961
|
let crudService = scope.getComponentById("service_listview_" + event.data.objectName);
|
|
57926
57962
|
crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
@@ -58284,12 +58320,16 @@ async function getObjectFilter(objectSchema, fields, options) {
|
|
|
58284
58320
|
return;
|
|
58285
58321
|
}
|
|
58286
58322
|
// 列表搜索栏字段值变更后立刻触发提交表单执行crud搜索,所以这里需要额外重算crud高度及筛选按钮红色星号图标显示隐藏
|
|
58287
|
-
|
|
58288
|
-
|
|
58289
|
-
|
|
58290
|
-
|
|
58291
|
-
|
|
58292
|
-
|
|
58323
|
+
//触发amis crud 高度重算
|
|
58324
|
+
doAction({
|
|
58325
|
+
"actionType": "broadcast",
|
|
58326
|
+
"args": {
|
|
58327
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
58328
|
+
},
|
|
58329
|
+
"data": {
|
|
58330
|
+
"timeOut": 1000
|
|
58331
|
+
}
|
|
58332
|
+
});
|
|
58293
58333
|
resizeWindow();
|
|
58294
58334
|
const scope = event.context.scoped;
|
|
58295
58335
|
// let filterFormValues = event.data;
|
|
@@ -59796,18 +59836,28 @@ async function lookupToAmis(field, readonly, ctx){
|
|
|
59796
59836
|
enableEnhancedLookup = true;
|
|
59797
59837
|
}
|
|
59798
59838
|
}
|
|
59839
|
+
let amisSchema;
|
|
59799
59840
|
// 默认使用下拉框模式显示lookup选项,只能配置了enable_enhanced_lookup才使用弹出增强模式
|
|
59800
59841
|
if(enableEnhancedLookup == true){
|
|
59801
|
-
|
|
59842
|
+
amisSchema = await lookupToAmisPicker(field, readonly, ctx);
|
|
59802
59843
|
}else if(refObject.enable_tree) {
|
|
59803
|
-
|
|
59844
|
+
amisSchema = await lookupToAmisTreeSelect(field, readonly, Object.assign({}, ctx, {
|
|
59804
59845
|
labelField: referenceTo.labelField?.name || 'name',
|
|
59805
59846
|
valueField: referenceTo.valueField?.name || '_id',
|
|
59806
59847
|
objectName: referenceTo.objectName
|
|
59807
59848
|
}));
|
|
59808
59849
|
}else {
|
|
59809
|
-
|
|
59850
|
+
amisSchema = await lookupToAmisSelect(field, readonly, ctx);
|
|
59851
|
+
}
|
|
59852
|
+
let refLookupPage = refObject.pages && refObject.pages.lookup;
|
|
59853
|
+
if(refLookupPage){
|
|
59854
|
+
if(typeof refLookupPage == 'string'){
|
|
59855
|
+
refLookupPage = JSON.parse(refLookupPage);
|
|
59856
|
+
}
|
|
59857
|
+
// Object.assign(amisSchema, refLookupPage);
|
|
59858
|
+
// amisSchema = _.defaultsDeep({}, refLookupPage, amisSchema);
|
|
59810
59859
|
}
|
|
59860
|
+
return amisSchema;
|
|
59811
59861
|
}
|
|
59812
59862
|
|
|
59813
59863
|
async function lookupToAmisIdsPicker(field, readonly, ctx){
|