@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/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.2-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.17/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.17/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.2-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.17/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.17/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.17/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -55471,7 +55471,7 @@ async function getTableColumns(fields, options){
|
|
|
55471
55471
|
var data = event.data;
|
|
55472
55472
|
var file_name = data.versions ? data.name : "${field.label}";
|
|
55473
55473
|
var file_id = data._id;
|
|
55474
|
-
|
|
55474
|
+
window.previewFile && window.previewFile({file_name, file_id});
|
|
55475
55475
|
`;
|
|
55476
55476
|
columnItem = {
|
|
55477
55477
|
"type": "button",
|
|
@@ -55500,7 +55500,7 @@ async function getTableColumns(fields, options){
|
|
|
55500
55500
|
"actionType": "custom",
|
|
55501
55501
|
"script": previewFileScript,
|
|
55502
55502
|
// "expression": "!!window?.nw?.require" //PC客户端预览附件
|
|
55503
|
-
"expression": "
|
|
55503
|
+
"expression": "!!(window && window.nw && window.nw.require)"//PC客户端预览附件
|
|
55504
55504
|
}
|
|
55505
55505
|
]
|
|
55506
55506
|
}
|
|
@@ -56416,7 +56416,7 @@ async function getObjectFieldsFilterFormSchema(ctx) {
|
|
|
56416
56416
|
const formSchema = {
|
|
56417
56417
|
"type": "service",
|
|
56418
56418
|
"visibleOn": "this.filterFormSearchableFields && this.filterFormSearchableFields.length",
|
|
56419
|
-
"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-
|
|
56419
|
+
"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",
|
|
56420
56420
|
"style":{
|
|
56421
56421
|
"max-height":ctx.formFactor === 'SMALL'?"30vh":"unset"
|
|
56422
56422
|
},
|
|
@@ -57003,7 +57003,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
57003
57003
|
"className": "slds-filters"
|
|
57004
57004
|
},
|
|
57005
57005
|
"size": "xs",
|
|
57006
|
-
"className": `border-
|
|
57006
|
+
"className": `border-y slds-grid slds-grid_vertical slds-nowrap ${!ctx.isLookup && "mt-2"}`,
|
|
57007
57007
|
"visibleOn": "this.showFieldsFilter",
|
|
57008
57008
|
},
|
|
57009
57009
|
"className": "bg-white"
|
|
@@ -57964,7 +57964,7 @@ const getSettingListviewToolbarButtonSchema = ()=>{
|
|
|
57964
57964
|
"icon": "fa fa-cog",
|
|
57965
57965
|
//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
57966
57966
|
// "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
|
|
57967
|
-
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded
|
|
57967
|
+
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
|
|
57968
57968
|
"align": "right",
|
|
57969
57969
|
"visibleOn": "${!isLookup}",
|
|
57970
57970
|
"buttons": [
|
|
@@ -58009,7 +58009,7 @@ const getDisplayAsButton = function(objectName, showDisplayAs){
|
|
|
58009
58009
|
"icon": "fa fa-table-columns",
|
|
58010
58010
|
//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
58011
58011
|
// "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
|
|
58012
|
-
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded
|
|
58012
|
+
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
|
|
58013
58013
|
"align": "right",
|
|
58014
58014
|
"visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
|
|
58015
58015
|
"buttons": [
|
|
@@ -58202,7 +58202,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
58202
58202
|
// //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
58203
58203
|
// // "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
58204
58204
|
// "tooltipPlacement": "top",
|
|
58205
|
-
// "className": "bg-white p-2 rounded
|
|
58205
|
+
// "className": "bg-white p-2 rounded text-gray-500",
|
|
58206
58206
|
// "label": "",
|
|
58207
58207
|
// "icon": "fa fa-sync",
|
|
58208
58208
|
// "visibleOn": "${!showFieldsFilter}",
|
|
@@ -58226,7 +58226,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
58226
58226
|
// "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
58227
58227
|
"tooltip":"",
|
|
58228
58228
|
"tooltipPlacement": "top",
|
|
58229
|
-
"className": "bg-white p-2 rounded
|
|
58229
|
+
"className": "bg-white p-2 rounded text-gray-500"
|
|
58230
58230
|
};
|
|
58231
58231
|
}
|
|
58232
58232
|
else {
|
|
@@ -58237,7 +58237,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
58237
58237
|
// "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
58238
58238
|
"tooltip":"",
|
|
58239
58239
|
"tooltipPlacement": "top",
|
|
58240
|
-
"className": "bg-white p-2 rounded
|
|
58240
|
+
"className": "bg-white p-2 rounded text-gray-500"
|
|
58241
58241
|
};
|
|
58242
58242
|
}
|
|
58243
58243
|
let toolbarFilter;
|
|
@@ -58259,7 +58259,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
58259
58259
|
"visibleOn": "${isFieldsFilterEmpty == false && isLookup != true}"
|
|
58260
58260
|
},
|
|
58261
58261
|
"align": "right",
|
|
58262
|
-
"className": "bg-white p-2 rounded
|
|
58262
|
+
"className": "bg-white p-2 rounded text-gray-500",
|
|
58263
58263
|
"onEvent": {
|
|
58264
58264
|
"click": {
|
|
58265
58265
|
"actions": [
|
|
@@ -59297,6 +59297,9 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59297
59297
|
}
|
|
59298
59298
|
});
|
|
59299
59299
|
|
|
59300
|
+
let listviewFilter = getListViewFilter(listView);
|
|
59301
|
+
let listviewFiltersFunction = listView && listView._filters;
|
|
59302
|
+
|
|
59300
59303
|
let sort = "";
|
|
59301
59304
|
if(listView){
|
|
59302
59305
|
sort = getListViewSort(listView);
|
|
@@ -59343,7 +59346,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59343
59346
|
Object.assign(api.data.$self, __changedSearchBoxValues, __changedFilterFormValues);
|
|
59344
59347
|
}
|
|
59345
59348
|
const selfData = JSON.parse(JSON.stringify(api.data.$self));
|
|
59346
|
-
var filters = [];
|
|
59349
|
+
${listviewFilter && !ctx.inFilterForm ? `var filters = ${JSON.stringify(listviewFilter)};` : 'var filters = [];'}
|
|
59347
59350
|
var pageSize = api.data.pageSize || 10;
|
|
59348
59351
|
var pageNo = api.data.pageNo || 1;
|
|
59349
59352
|
var skip = (pageNo - 1) * pageSize;
|
|
@@ -59405,6 +59408,16 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59405
59408
|
}
|
|
59406
59409
|
|
|
59407
59410
|
const inFilterForm = ${ctx.inFilterForm};
|
|
59411
|
+
|
|
59412
|
+
const listviewFiltersFunction = ${listviewFiltersFunction};
|
|
59413
|
+
|
|
59414
|
+
if(listviewFiltersFunction && !inFilterForm){
|
|
59415
|
+
const _filters0 = listviewFiltersFunction(filters, api.data.$self.__super);
|
|
59416
|
+
if(_filters0 && _filters0.length){
|
|
59417
|
+
filters.push(_filters0);
|
|
59418
|
+
}
|
|
59419
|
+
}
|
|
59420
|
+
|
|
59408
59421
|
const filtersFunction = ${field.filtersFunction || field._filtersFunction};
|
|
59409
59422
|
|
|
59410
59423
|
if(filtersFunction && !inFilterForm){
|
|
@@ -59717,6 +59730,9 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
59717
59730
|
const refObjectConfig = referenceTo && await getUISchema(referenceTo.objectName);
|
|
59718
59731
|
let listView = getLookupListView(refObjectConfig);
|
|
59719
59732
|
|
|
59733
|
+
let listviewFilter = getListViewFilter(listView);
|
|
59734
|
+
let listviewFiltersFunction = listView && listView._filters;
|
|
59735
|
+
|
|
59720
59736
|
let sort = "";
|
|
59721
59737
|
if(listView){
|
|
59722
59738
|
sort = getListViewSort(listView);
|
|
@@ -59746,7 +59762,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
59746
59762
|
apiInfo.data['rfield'] = `\${object_name}`;
|
|
59747
59763
|
// [["_id", "=", "$${field.name}._id"],"or",["name", "contains", "$term"]]
|
|
59748
59764
|
apiInfo.requestAdaptor = `
|
|
59749
|
-
var filters = [];
|
|
59765
|
+
${listviewFilter && !ctx.inFilterForm ? `var filters = ${JSON.stringify(listviewFilter)};` : 'var filters = [];'}
|
|
59750
59766
|
var top = 200;
|
|
59751
59767
|
if(api.data.$term){
|
|
59752
59768
|
filters = [["${referenceTo?.NAME_FIELD_KEY || 'name'}", "contains", api.data.$term]];
|
|
@@ -59769,6 +59785,16 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
59769
59785
|
}
|
|
59770
59786
|
|
|
59771
59787
|
const inFilterForm = ${ctx.inFilterForm};
|
|
59788
|
+
|
|
59789
|
+
const listviewFiltersFunction = ${listviewFiltersFunction};
|
|
59790
|
+
|
|
59791
|
+
if(listviewFiltersFunction && !inFilterForm){
|
|
59792
|
+
const _filters0 = listviewFiltersFunction(filters, api.data.$);
|
|
59793
|
+
if(_filters0 && _filters0.length){
|
|
59794
|
+
filters.push(_filters0);
|
|
59795
|
+
}
|
|
59796
|
+
}
|
|
59797
|
+
|
|
59772
59798
|
const filtersFunction = ${field.filtersFunction || field._filtersFunction};
|
|
59773
59799
|
|
|
59774
59800
|
if(filtersFunction && !inFilterForm){
|
|
@@ -60630,6 +60656,36 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60630
60656
|
convertData = {
|
|
60631
60657
|
type: 'static-text'
|
|
60632
60658
|
};
|
|
60659
|
+
}else if(field.autonumber_enable_modify){
|
|
60660
|
+
convertData = {
|
|
60661
|
+
"type": "input-group",
|
|
60662
|
+
"body": [
|
|
60663
|
+
{
|
|
60664
|
+
"type": "input-text",
|
|
60665
|
+
"name": field.name
|
|
60666
|
+
},
|
|
60667
|
+
{
|
|
60668
|
+
"type": "button",
|
|
60669
|
+
"label": "自动获取",
|
|
60670
|
+
"actionType": "ajax",
|
|
60671
|
+
"api": {
|
|
60672
|
+
"url": `\${context.rootUrl}/api/autonumber/generator/\${objectName}/${field.name}`,
|
|
60673
|
+
"method": "post",
|
|
60674
|
+
"headers": {
|
|
60675
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
60676
|
+
},
|
|
60677
|
+
"adaptor": `
|
|
60678
|
+
payload.data["${field.name}"] = payload.data && payload.data.autonumber;
|
|
60679
|
+
delete payload.data.autonumber;
|
|
60680
|
+
return payload;
|
|
60681
|
+
`
|
|
60682
|
+
},
|
|
60683
|
+
"messages": {
|
|
60684
|
+
"success": "获取成功"
|
|
60685
|
+
}
|
|
60686
|
+
}
|
|
60687
|
+
]
|
|
60688
|
+
};
|
|
60633
60689
|
}
|
|
60634
60690
|
break;
|
|
60635
60691
|
case 'url':
|