@steedos-widgets/sortable 3.6.2-beta.15 → 3.6.2-beta.17
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 +68 -12
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +68 -12
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +68 -12
- package/package.json +3 -3
package/dist/sortable.umd.js
CHANGED
|
@@ -21772,7 +21772,7 @@
|
|
|
21772
21772
|
var data = event.data;
|
|
21773
21773
|
var file_name = data.versions ? data.name : "${field.label}";
|
|
21774
21774
|
var file_id = data._id;
|
|
21775
|
-
|
|
21775
|
+
window.previewFile && window.previewFile({file_name, file_id});
|
|
21776
21776
|
`;
|
|
21777
21777
|
columnItem = {
|
|
21778
21778
|
"type": "button",
|
|
@@ -21801,7 +21801,7 @@
|
|
|
21801
21801
|
"actionType": "custom",
|
|
21802
21802
|
"script": previewFileScript,
|
|
21803
21803
|
// "expression": "!!window?.nw?.require" //PC客户端预览附件
|
|
21804
|
-
"expression": "
|
|
21804
|
+
"expression": "!!(window && window.nw && window.nw.require)"//PC客户端预览附件
|
|
21805
21805
|
}
|
|
21806
21806
|
]
|
|
21807
21807
|
}
|
|
@@ -22717,7 +22717,7 @@
|
|
|
22717
22717
|
const formSchema = {
|
|
22718
22718
|
"type": "service",
|
|
22719
22719
|
"visibleOn": "this.filterFormSearchableFields && this.filterFormSearchableFields.length",
|
|
22720
|
-
"className": ctx.formFactor === 'SMALL' ? "slds-filters__body p-0 mb-2 overflow-y-auto overflow-x-hidden" : "slds-filters__body p-0 sm:grid sm:gap-
|
|
22720
|
+
"className": ctx.formFactor === 'SMALL' ? "slds-filters__body p-0 mb-2 overflow-y-auto overflow-x-hidden" : "slds-filters__body p-0 sm:grid sm:gap-4 sm:grid-cols-4 p-2",
|
|
22721
22721
|
"style":{
|
|
22722
22722
|
"max-height":ctx.formFactor === 'SMALL'?"30vh":"unset"
|
|
22723
22723
|
},
|
|
@@ -23304,7 +23304,7 @@
|
|
|
23304
23304
|
"className": "slds-filters"
|
|
23305
23305
|
},
|
|
23306
23306
|
"size": "xs",
|
|
23307
|
-
"className": `border-
|
|
23307
|
+
"className": `border-y slds-grid slds-grid_vertical slds-nowrap ${!ctx.isLookup && "mt-2"}`,
|
|
23308
23308
|
"visibleOn": "this.showFieldsFilter",
|
|
23309
23309
|
},
|
|
23310
23310
|
"className": "bg-white"
|
|
@@ -24265,7 +24265,7 @@
|
|
|
24265
24265
|
"icon": "fa fa-cog",
|
|
24266
24266
|
//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
24267
24267
|
// "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
|
|
24268
|
-
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded
|
|
24268
|
+
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
|
|
24269
24269
|
"align": "right",
|
|
24270
24270
|
"visibleOn": "${!isLookup}",
|
|
24271
24271
|
"buttons": [
|
|
@@ -24310,7 +24310,7 @@
|
|
|
24310
24310
|
"icon": "fa fa-table-columns",
|
|
24311
24311
|
//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
24312
24312
|
// "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
|
|
24313
|
-
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded
|
|
24313
|
+
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
|
|
24314
24314
|
"align": "right",
|
|
24315
24315
|
"visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
|
|
24316
24316
|
"buttons": [
|
|
@@ -24503,7 +24503,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
24503
24503
|
// //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
24504
24504
|
// // "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
24505
24505
|
// "tooltipPlacement": "top",
|
|
24506
|
-
// "className": "bg-white p-2 rounded
|
|
24506
|
+
// "className": "bg-white p-2 rounded text-gray-500",
|
|
24507
24507
|
// "label": "",
|
|
24508
24508
|
// "icon": "fa fa-sync",
|
|
24509
24509
|
// "visibleOn": "${!showFieldsFilter}",
|
|
@@ -24527,7 +24527,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
24527
24527
|
// "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
24528
24528
|
"tooltip":"",
|
|
24529
24529
|
"tooltipPlacement": "top",
|
|
24530
|
-
"className": "bg-white p-2 rounded
|
|
24530
|
+
"className": "bg-white p-2 rounded text-gray-500"
|
|
24531
24531
|
};
|
|
24532
24532
|
}
|
|
24533
24533
|
else {
|
|
@@ -24538,7 +24538,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
24538
24538
|
// "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
24539
24539
|
"tooltip":"",
|
|
24540
24540
|
"tooltipPlacement": "top",
|
|
24541
|
-
"className": "bg-white p-2 rounded
|
|
24541
|
+
"className": "bg-white p-2 rounded text-gray-500"
|
|
24542
24542
|
};
|
|
24543
24543
|
}
|
|
24544
24544
|
let toolbarFilter;
|
|
@@ -24560,7 +24560,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
24560
24560
|
"visibleOn": "${isFieldsFilterEmpty == false && isLookup != true}"
|
|
24561
24561
|
},
|
|
24562
24562
|
"align": "right",
|
|
24563
|
-
"className": "bg-white p-2 rounded
|
|
24563
|
+
"className": "bg-white p-2 rounded text-gray-500",
|
|
24564
24564
|
"onEvent": {
|
|
24565
24565
|
"click": {
|
|
24566
24566
|
"actions": [
|
|
@@ -25598,6 +25598,9 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
25598
25598
|
}
|
|
25599
25599
|
});
|
|
25600
25600
|
|
|
25601
|
+
let listviewFilter = getListViewFilter(listView);
|
|
25602
|
+
let listviewFiltersFunction = listView && listView._filters;
|
|
25603
|
+
|
|
25601
25604
|
let sort = "";
|
|
25602
25605
|
if(listView){
|
|
25603
25606
|
sort = getListViewSort(listView);
|
|
@@ -25644,7 +25647,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
25644
25647
|
Object.assign(api.data.$self, __changedSearchBoxValues, __changedFilterFormValues);
|
|
25645
25648
|
}
|
|
25646
25649
|
const selfData = JSON.parse(JSON.stringify(api.data.$self));
|
|
25647
|
-
var filters = [];
|
|
25650
|
+
${listviewFilter && !ctx.inFilterForm ? `var filters = ${JSON.stringify(listviewFilter)};` : 'var filters = [];'}
|
|
25648
25651
|
var pageSize = api.data.pageSize || 10;
|
|
25649
25652
|
var pageNo = api.data.pageNo || 1;
|
|
25650
25653
|
var skip = (pageNo - 1) * pageSize;
|
|
@@ -25706,6 +25709,16 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
25706
25709
|
}
|
|
25707
25710
|
|
|
25708
25711
|
const inFilterForm = ${ctx.inFilterForm};
|
|
25712
|
+
|
|
25713
|
+
const listviewFiltersFunction = ${listviewFiltersFunction};
|
|
25714
|
+
|
|
25715
|
+
if(listviewFiltersFunction && !inFilterForm){
|
|
25716
|
+
const _filters0 = listviewFiltersFunction(filters, api.data.$self.__super);
|
|
25717
|
+
if(_filters0 && _filters0.length){
|
|
25718
|
+
filters.push(_filters0);
|
|
25719
|
+
}
|
|
25720
|
+
}
|
|
25721
|
+
|
|
25709
25722
|
const filtersFunction = ${field.filtersFunction || field._filtersFunction};
|
|
25710
25723
|
|
|
25711
25724
|
if(filtersFunction && !inFilterForm){
|
|
@@ -26018,6 +26031,9 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26018
26031
|
const refObjectConfig = referenceTo && await getUISchema(referenceTo.objectName);
|
|
26019
26032
|
let listView = getLookupListView(refObjectConfig);
|
|
26020
26033
|
|
|
26034
|
+
let listviewFilter = getListViewFilter(listView);
|
|
26035
|
+
let listviewFiltersFunction = listView && listView._filters;
|
|
26036
|
+
|
|
26021
26037
|
let sort = "";
|
|
26022
26038
|
if(listView){
|
|
26023
26039
|
sort = getListViewSort(listView);
|
|
@@ -26047,7 +26063,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26047
26063
|
apiInfo.data['rfield'] = `\${object_name}`;
|
|
26048
26064
|
// [["_id", "=", "$${field.name}._id"],"or",["name", "contains", "$term"]]
|
|
26049
26065
|
apiInfo.requestAdaptor = `
|
|
26050
|
-
var filters = [];
|
|
26066
|
+
${listviewFilter && !ctx.inFilterForm ? `var filters = ${JSON.stringify(listviewFilter)};` : 'var filters = [];'}
|
|
26051
26067
|
var top = 200;
|
|
26052
26068
|
if(api.data.$term){
|
|
26053
26069
|
filters = [["${referenceTo?.NAME_FIELD_KEY || 'name'}", "contains", api.data.$term]];
|
|
@@ -26070,6 +26086,16 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26070
26086
|
}
|
|
26071
26087
|
|
|
26072
26088
|
const inFilterForm = ${ctx.inFilterForm};
|
|
26089
|
+
|
|
26090
|
+
const listviewFiltersFunction = ${listviewFiltersFunction};
|
|
26091
|
+
|
|
26092
|
+
if(listviewFiltersFunction && !inFilterForm){
|
|
26093
|
+
const _filters0 = listviewFiltersFunction(filters, api.data.$);
|
|
26094
|
+
if(_filters0 && _filters0.length){
|
|
26095
|
+
filters.push(_filters0);
|
|
26096
|
+
}
|
|
26097
|
+
}
|
|
26098
|
+
|
|
26073
26099
|
const filtersFunction = ${field.filtersFunction || field._filtersFunction};
|
|
26074
26100
|
|
|
26075
26101
|
if(filtersFunction && !inFilterForm){
|
|
@@ -26931,6 +26957,36 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26931
26957
|
convertData = {
|
|
26932
26958
|
type: 'static-text'
|
|
26933
26959
|
};
|
|
26960
|
+
}else if(field.autonumber_enable_modify){
|
|
26961
|
+
convertData = {
|
|
26962
|
+
"type": "input-group",
|
|
26963
|
+
"body": [
|
|
26964
|
+
{
|
|
26965
|
+
"type": "input-text",
|
|
26966
|
+
"name": field.name
|
|
26967
|
+
},
|
|
26968
|
+
{
|
|
26969
|
+
"type": "button",
|
|
26970
|
+
"label": "自动获取",
|
|
26971
|
+
"actionType": "ajax",
|
|
26972
|
+
"api": {
|
|
26973
|
+
"url": `\${context.rootUrl}/api/autonumber/generator/\${objectName}/${field.name}`,
|
|
26974
|
+
"method": "post",
|
|
26975
|
+
"headers": {
|
|
26976
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
26977
|
+
},
|
|
26978
|
+
"adaptor": `
|
|
26979
|
+
payload.data["${field.name}"] = payload.data && payload.data.autonumber;
|
|
26980
|
+
delete payload.data.autonumber;
|
|
26981
|
+
return payload;
|
|
26982
|
+
`
|
|
26983
|
+
},
|
|
26984
|
+
"messages": {
|
|
26985
|
+
"success": "获取成功"
|
|
26986
|
+
}
|
|
26987
|
+
}
|
|
26988
|
+
]
|
|
26989
|
+
};
|
|
26934
26990
|
}
|
|
26935
26991
|
break;
|
|
26936
26992
|
case 'url':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/sortable",
|
|
3
|
-
"version": "3.6.2-beta.
|
|
3
|
+
"version": "3.6.2-beta.17",
|
|
4
4
|
"main": "dist/sortable.cjs.js",
|
|
5
5
|
"module": "dist/sortable.esm.js",
|
|
6
6
|
"unpkg": "dist/sortable.umd.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@dnd-kit/core": "^6.0.5",
|
|
47
47
|
"@dnd-kit/sortable": "^7.0.1",
|
|
48
|
-
"@steedos-widgets/amis-lib": "3.6.2-beta.
|
|
48
|
+
"@steedos-widgets/amis-lib": "3.6.2-beta.17"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "0fa4e3d9e8edcf048e3d360894dbee2912e2375e"
|
|
51
51
|
}
|