@steedos-widgets/sortable 1.3.21 → 1.3.22-beta.2
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 +55 -17
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +55 -17
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +55 -17
- 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@1.3.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@1.3.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@1.3.22-beta.2/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@1.3.22-beta.2/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@1.3.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@1.3.22-beta.2/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@1.3.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@1.3.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@1.3.22-beta.2/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@1.3.22-beta.2/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -55105,21 +55105,21 @@ async function getQuickEditSchema(field, options){
|
|
|
55105
55105
|
break;
|
|
55106
55106
|
case "avatar":
|
|
55107
55107
|
case "image":
|
|
55108
|
-
|
|
55109
|
-
|
|
55110
|
-
|
|
55111
|
-
|
|
55112
|
-
|
|
55113
|
-
|
|
55114
|
-
|
|
55115
|
-
|
|
55116
|
-
|
|
55117
|
-
|
|
55108
|
+
quickEditSchema.body[0].receiver.adaptor = `
|
|
55109
|
+
const { context } = api.body;
|
|
55110
|
+
var rootUrl = context.rootUrl + "/api/files/${field.type}s/";
|
|
55111
|
+
payload = {
|
|
55112
|
+
status: response.status == 200 ? 0 : response.status,
|
|
55113
|
+
msg: response.statusText,
|
|
55114
|
+
data: {
|
|
55115
|
+
value: rootUrl + payload._id,//为了实现图片crud的回显,需要将value从id改为url,当保存数据数据时,再在发送适配器内重新将id提取出来
|
|
55116
|
+
name: payload.original.name,
|
|
55117
|
+
url: rootUrl + payload._id,
|
|
55118
|
+
}
|
|
55118
55119
|
}
|
|
55119
|
-
|
|
55120
|
-
|
|
55121
|
-
|
|
55122
|
-
break;
|
|
55120
|
+
return payload;
|
|
55121
|
+
`;
|
|
55122
|
+
break;
|
|
55123
55123
|
}
|
|
55124
55124
|
quickEditSchema.body[0].visibleOn = "${quickedit_record_permissions.allowEdit && quickedit_record_permissions_loading == false}";
|
|
55125
55125
|
quickEditSchema.body.push({
|
|
@@ -55326,6 +55326,11 @@ async function getQuickEditSchema(field, options){
|
|
|
55326
55326
|
if(field.type == "location"){
|
|
55327
55327
|
quickEditSchema = false;
|
|
55328
55328
|
}
|
|
55329
|
+
if(field.type == "color"){
|
|
55330
|
+
quickEditSchema = {
|
|
55331
|
+
type: "input-color"
|
|
55332
|
+
};
|
|
55333
|
+
}
|
|
55329
55334
|
}
|
|
55330
55335
|
return quickEditSchema;
|
|
55331
55336
|
}
|
|
@@ -58176,7 +58181,8 @@ function getObjectFooterToolbar(mainObject, formFactor, options) {
|
|
|
58176
58181
|
{
|
|
58177
58182
|
"type": "pagination",
|
|
58178
58183
|
"maxButtons": 5,
|
|
58179
|
-
"showPageInput":
|
|
58184
|
+
"showPageInput": true,
|
|
58185
|
+
"layout": "total,pager,go"
|
|
58180
58186
|
}
|
|
58181
58187
|
]
|
|
58182
58188
|
}
|
|
@@ -59936,6 +59942,19 @@ function getGridFieldSubFields(mainField, fields){
|
|
|
59936
59942
|
return newMainField;
|
|
59937
59943
|
}
|
|
59938
59944
|
|
|
59945
|
+
function getTabledFieldSubFields(mainField, fields){
|
|
59946
|
+
const newMainField = Object.assign({subFields: []}, mainField);
|
|
59947
|
+
const subFields = lodash.exports.filter(fields, function(field){
|
|
59948
|
+
let result = field.name.startsWith(`${mainField.name}.`);
|
|
59949
|
+
if(result){
|
|
59950
|
+
field._prefix = `${mainField.name}.`;
|
|
59951
|
+
}
|
|
59952
|
+
return result;
|
|
59953
|
+
});
|
|
59954
|
+
newMainField.subFields = subFields;
|
|
59955
|
+
return newMainField;
|
|
59956
|
+
}
|
|
59957
|
+
|
|
59939
59958
|
|
|
59940
59959
|
function getSelectFieldOptions(field){
|
|
59941
59960
|
const dataType = field.data_type || 'text';
|
|
@@ -60041,6 +60060,13 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60041
60060
|
};
|
|
60042
60061
|
if(readonly){
|
|
60043
60062
|
convertData.defaultColor = null;
|
|
60063
|
+
}else {
|
|
60064
|
+
convertData.pipeIn = (value, data) => {
|
|
60065
|
+
if(value && value.indexOf('#')<0){
|
|
60066
|
+
return '#'+value;
|
|
60067
|
+
}
|
|
60068
|
+
return value;
|
|
60069
|
+
};
|
|
60044
60070
|
}
|
|
60045
60071
|
break;
|
|
60046
60072
|
case 'boolean':
|
|
@@ -60057,7 +60083,16 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60057
60083
|
format:'YYYY-MM-DDT00:00:00.000[Z]',
|
|
60058
60084
|
tpl: readonly ? getDateTpl(field) : null,
|
|
60059
60085
|
// utc: true,
|
|
60060
|
-
joinValues: false
|
|
60086
|
+
joinValues: false,
|
|
60087
|
+
"shortcuts": [
|
|
60088
|
+
"thismonth",
|
|
60089
|
+
"2monthsago",
|
|
60090
|
+
"3monthslater",
|
|
60091
|
+
"prevquarter",
|
|
60092
|
+
"thisquarter",
|
|
60093
|
+
"thisyear",
|
|
60094
|
+
"lastYear"
|
|
60095
|
+
]
|
|
60061
60096
|
};
|
|
60062
60097
|
break;
|
|
60063
60098
|
case 'date':
|
|
@@ -60468,6 +60503,8 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60468
60503
|
let subFieldName = subField.name.replace(`${field.name}.$.`, '').replace(`${field.name}.`, '');
|
|
60469
60504
|
if(subField.type === 'grid'){
|
|
60470
60505
|
subField = await getGridFieldSubFields(subField, ctx.__formFields);
|
|
60506
|
+
}else if(subField.type === 'table'){
|
|
60507
|
+
subField = await getTabledFieldSubFields(subField, ctx.__formFields);
|
|
60471
60508
|
}else {
|
|
60472
60509
|
if(readonly){
|
|
60473
60510
|
subFieldName = `${field.name}.${subFieldName}`;
|
|
@@ -60584,7 +60621,8 @@ async function getFieldSearchable(perField, permissionFields, ctx){
|
|
|
60584
60621
|
fieldNamePrefix = `${fieldNamePrefix}between__`;
|
|
60585
60622
|
}
|
|
60586
60623
|
if(_field.type === 'datetime'){
|
|
60587
|
-
|
|
60624
|
+
// 特意改为日期范围而不是日期时间范围,因为搜索时一般精确到日期就足够了,需要精确到日期时间范围需要在字段上配置amis属性来实现
|
|
60625
|
+
_field.type = 'input-date-range';
|
|
60588
60626
|
_field.is_wide = true;
|
|
60589
60627
|
fieldNamePrefix = `${fieldNamePrefix}between__`;
|
|
60590
60628
|
}
|