@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/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,
|
|
@@ -55916,6 +55932,14 @@ async function getTableSchema$1(fields, options){
|
|
|
55916
55932
|
|
|
55917
55933
|
}
|
|
55918
55934
|
|
|
55935
|
+
const treeConfig = {};
|
|
55936
|
+
|
|
55937
|
+
if(options.enable_tree){
|
|
55938
|
+
treeConfig.expandConfig = {
|
|
55939
|
+
expand: 'first'
|
|
55940
|
+
};
|
|
55941
|
+
}
|
|
55942
|
+
|
|
55919
55943
|
return {
|
|
55920
55944
|
mode: "table",
|
|
55921
55945
|
perPageAvailable: [5, 10, 20, 50, 100, 500],
|
|
@@ -55931,6 +55955,7 @@ async function getTableSchema$1(fields, options){
|
|
|
55931
55955
|
labelTpl: `\${${options.labelFieldName}}`,
|
|
55932
55956
|
autoFillHeight: false, // 自动高度效果不理想,先关闭
|
|
55933
55957
|
columnsTogglable: false,
|
|
55958
|
+
...treeConfig
|
|
55934
55959
|
}
|
|
55935
55960
|
}
|
|
55936
55961
|
|
|
@@ -56395,12 +56420,16 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
56395
56420
|
// }
|
|
56396
56421
|
// listView.handleFilterSubmit(Object.assign({}, removedValues, filterFormValues));
|
|
56397
56422
|
// 点击搜索的时候自动收起搜索栏
|
|
56398
|
-
|
|
56399
|
-
|
|
56400
|
-
|
|
56401
|
-
|
|
56402
|
-
|
|
56403
|
-
|
|
56423
|
+
//触发amis crud 高度重算
|
|
56424
|
+
doAction({
|
|
56425
|
+
"actionType": "broadcast",
|
|
56426
|
+
"args": {
|
|
56427
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
56428
|
+
},
|
|
56429
|
+
"data": {
|
|
56430
|
+
"timeOut": 500
|
|
56431
|
+
}
|
|
56432
|
+
});
|
|
56404
56433
|
const filterService = filterForm.context.getComponents().find(function(n){
|
|
56405
56434
|
return n.props.type === "service";
|
|
56406
56435
|
});
|
|
@@ -56502,9 +56531,16 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
56502
56531
|
let filterFormService = SteedosUI.getClosestAmisComponentByType(filterForm.context, "service");
|
|
56503
56532
|
filterFormService.setData({showFieldsFilter: !!!filterFormService.props.data.showFieldsFilter});
|
|
56504
56533
|
//触发amis crud 高度重算
|
|
56505
|
-
|
|
56506
|
-
|
|
56507
|
-
|
|
56534
|
+
doAction({
|
|
56535
|
+
"actionType": "broadcast",
|
|
56536
|
+
"args": {
|
|
56537
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
56538
|
+
},
|
|
56539
|
+
"data": {
|
|
56540
|
+
"timeOut": 100
|
|
56541
|
+
}
|
|
56542
|
+
});
|
|
56543
|
+
|
|
56508
56544
|
// 移除搜索按钮上的红点
|
|
56509
56545
|
// let crudService = scope.getComponentById("service_listview_" + event.data.objectName);
|
|
56510
56546
|
let crudService = crud && SteedosUI.getClosestAmisComponentByType(crud.context, "service");
|
|
@@ -56661,9 +56697,15 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
56661
56697
|
sessionStorage.setItem(listViewPropsStoreKey, JSON.stringify(localListViewProps));
|
|
56662
56698
|
}
|
|
56663
56699
|
//触发amis crud 高度重算
|
|
56664
|
-
|
|
56665
|
-
|
|
56666
|
-
|
|
56700
|
+
doAction({
|
|
56701
|
+
"actionType": "broadcast",
|
|
56702
|
+
"args": {
|
|
56703
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
56704
|
+
},
|
|
56705
|
+
"data": {
|
|
56706
|
+
"timeOut": 100
|
|
56707
|
+
}
|
|
56708
|
+
});
|
|
56667
56709
|
// ===END===
|
|
56668
56710
|
`;
|
|
56669
56711
|
return {
|
|
@@ -57905,13 +57947,16 @@ const filterService = filterForm.context.getComponents().find(function(n){
|
|
|
57905
57947
|
});
|
|
57906
57948
|
let toShowFieldsFilter = !!!filterService.props.data.showFieldsFilter;
|
|
57907
57949
|
filterService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
57908
|
-
|
|
57909
|
-
|
|
57910
|
-
|
|
57911
|
-
|
|
57912
|
-
|
|
57913
|
-
}
|
|
57914
|
-
|
|
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
|
+
});
|
|
57915
57960
|
// 手机端在显示搜索栏时隐藏crud上的刷新按钮,因为点击后crud高度显示有问题
|
|
57916
57961
|
let crudService = scope.getComponentById("service_listview_" + event.data.objectName);
|
|
57917
57962
|
crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
@@ -58275,12 +58320,16 @@ async function getObjectFilter(objectSchema, fields, options) {
|
|
|
58275
58320
|
return;
|
|
58276
58321
|
}
|
|
58277
58322
|
// 列表搜索栏字段值变更后立刻触发提交表单执行crud搜索,所以这里需要额外重算crud高度及筛选按钮红色星号图标显示隐藏
|
|
58278
|
-
|
|
58279
|
-
|
|
58280
|
-
|
|
58281
|
-
|
|
58282
|
-
|
|
58283
|
-
|
|
58323
|
+
//触发amis crud 高度重算
|
|
58324
|
+
doAction({
|
|
58325
|
+
"actionType": "broadcast",
|
|
58326
|
+
"args": {
|
|
58327
|
+
"eventName": "@height.changed.${objectSchema.name}"
|
|
58328
|
+
},
|
|
58329
|
+
"data": {
|
|
58330
|
+
"timeOut": 1000
|
|
58331
|
+
}
|
|
58332
|
+
});
|
|
58284
58333
|
resizeWindow();
|
|
58285
58334
|
const scope = event.context.scoped;
|
|
58286
58335
|
// let filterFormValues = event.data;
|
|
@@ -59342,14 +59391,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59342
59391
|
}
|
|
59343
59392
|
});
|
|
59344
59393
|
payload.data.rows = treeRecords;
|
|
59345
|
-
try{
|
|
59346
|
-
setTimeout(() => {
|
|
59347
|
-
$('.amis-dialog-widget.antd-Modal .antd-Table-content .antd-Table-table thead .antd-Table-expandBtn')[0]?.click();
|
|
59348
|
-
}, 600);
|
|
59349
|
-
}
|
|
59350
|
-
catch(ex){
|
|
59351
|
-
console.error("tree数据格式展开异常:", ex);
|
|
59352
|
-
}
|
|
59353
59394
|
}
|
|
59354
59395
|
return payload;
|
|
59355
59396
|
`;
|
|
@@ -59376,6 +59417,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59376
59417
|
labelFieldName,
|
|
59377
59418
|
top: top,
|
|
59378
59419
|
isLookup: true,
|
|
59420
|
+
enable_tree: refObjectConfig.enable_tree,
|
|
59379
59421
|
...ctx
|
|
59380
59422
|
});
|
|
59381
59423
|
|
|
@@ -59794,18 +59836,28 @@ async function lookupToAmis(field, readonly, ctx){
|
|
|
59794
59836
|
enableEnhancedLookup = true;
|
|
59795
59837
|
}
|
|
59796
59838
|
}
|
|
59839
|
+
let amisSchema;
|
|
59797
59840
|
// 默认使用下拉框模式显示lookup选项,只能配置了enable_enhanced_lookup才使用弹出增强模式
|
|
59798
59841
|
if(enableEnhancedLookup == true){
|
|
59799
|
-
|
|
59842
|
+
amisSchema = await lookupToAmisPicker(field, readonly, ctx);
|
|
59800
59843
|
}else if(refObject.enable_tree) {
|
|
59801
|
-
|
|
59844
|
+
amisSchema = await lookupToAmisTreeSelect(field, readonly, Object.assign({}, ctx, {
|
|
59802
59845
|
labelField: referenceTo.labelField?.name || 'name',
|
|
59803
59846
|
valueField: referenceTo.valueField?.name || '_id',
|
|
59804
59847
|
objectName: referenceTo.objectName
|
|
59805
59848
|
}));
|
|
59806
59849
|
}else {
|
|
59807
|
-
|
|
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);
|
|
59808
59859
|
}
|
|
59860
|
+
return amisSchema;
|
|
59809
59861
|
}
|
|
59810
59862
|
|
|
59811
59863
|
async function lookupToAmisIdsPicker(field, readonly, ctx){
|