@steedos-widgets/sortable 3.6.2-beta.7 → 3.6.2-beta.8
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 +30 -18
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +30 -18
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +30 -18
- package/package.json +3 -3
package/dist/sortable.umd.js
CHANGED
|
@@ -20407,7 +20407,7 @@
|
|
|
20407
20407
|
|
|
20408
20408
|
function getNameTplUrl(field, ctx){
|
|
20409
20409
|
if(ctx.objectName === 'cms_files'){
|
|
20410
|
-
return
|
|
20410
|
+
return "${(versions[0] && versions[0].url) ? versions[0].url+'?download=true' : context.rootUrl+'/api/files/files/'+versions[0]+'?download=true'}"
|
|
20411
20411
|
}
|
|
20412
20412
|
const href = Router.getObjectDetailPath({
|
|
20413
20413
|
...ctx, formFactor: ctx.formFactor, appId: "${appId}", objectName: ctx.objectName || "${objectName}", recordId: `\${${ctx.idFieldName}}`
|
|
@@ -21903,7 +21903,7 @@
|
|
|
21903
21903
|
}
|
|
21904
21904
|
if(isLeft){
|
|
21905
21905
|
// 左侧半行
|
|
21906
|
-
lineChildrenClassName = "steedos-listview-item-left truncate";
|
|
21906
|
+
lineChildrenClassName = "steedos-listview-item-left truncate h-5";
|
|
21907
21907
|
if(item.field.is_wide){
|
|
21908
21908
|
// 左侧全行样式可以单独写,如果需要配置两行省略号效果,可以加样式类 two-lines-truncate
|
|
21909
21909
|
lineChildrenClassName = "steedos-listview-item-wide";
|
|
@@ -21915,7 +21915,7 @@
|
|
|
21915
21915
|
}
|
|
21916
21916
|
else {
|
|
21917
21917
|
// 右侧半行,这里加样式类 flex flex-shrink-0,是为了省略号只显示在左半行,右半行文字一般比较短,如果也加省略号效果的话,左侧文字多的话,右侧没几个字就显示省略号了
|
|
21918
|
-
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0";
|
|
21918
|
+
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0 h-5";
|
|
21919
21919
|
}
|
|
21920
21920
|
//支持字段amis属性配置classname,识别classname的类型,与原样式合并
|
|
21921
21921
|
var className;
|
|
@@ -22026,7 +22026,15 @@
|
|
|
22026
22026
|
"actions": [
|
|
22027
22027
|
{
|
|
22028
22028
|
"script": `
|
|
22029
|
-
let cms_url =
|
|
22029
|
+
let cms_url = '';
|
|
22030
|
+
let value = event.data.versions[0];
|
|
22031
|
+
if(value){
|
|
22032
|
+
if(value.url){
|
|
22033
|
+
cms_url = value.url;
|
|
22034
|
+
}else{
|
|
22035
|
+
cms_url = "/api/files/files/"+value+"?download=true"
|
|
22036
|
+
}
|
|
22037
|
+
}
|
|
22030
22038
|
Steedos.cordovaDownload(encodeURI(Steedos.absoluteUrl(cms_url)), event.data.name);
|
|
22031
22039
|
`,
|
|
22032
22040
|
"actionType": "custom"
|
|
@@ -22398,7 +22406,7 @@
|
|
|
22398
22406
|
|
|
22399
22407
|
function getDefaultParams(options){
|
|
22400
22408
|
return {
|
|
22401
|
-
perPage: options.top || options.perPage ||
|
|
22409
|
+
perPage: options.top || options.perPage || 20
|
|
22402
22410
|
}
|
|
22403
22411
|
}
|
|
22404
22412
|
|
|
@@ -22452,7 +22460,6 @@
|
|
|
22452
22460
|
"objectApiName": "\${objectName}",
|
|
22453
22461
|
"recordId": "",
|
|
22454
22462
|
"mode": "edit",
|
|
22455
|
-
"layout": "normal"
|
|
22456
22463
|
};
|
|
22457
22464
|
|
|
22458
22465
|
if (payload && payload.schema) {
|
|
@@ -25896,8 +25903,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
25896
25903
|
labelField: referenceTo.labelField.name,
|
|
25897
25904
|
valueField: referenceTo.valueField.name,
|
|
25898
25905
|
// disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段,多选字段可以编辑。
|
|
25899
|
-
disabledOn: `${readonly}`,
|
|
25900
|
-
hiddenOn: `( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
25906
|
+
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
25901
25907
|
modalMode: 'dialog', //TODO 设置 dialog 或者 drawer,用来配置弹出方式
|
|
25902
25908
|
source: source,
|
|
25903
25909
|
size: "lg",
|
|
@@ -26140,16 +26146,18 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26140
26146
|
}
|
|
26141
26147
|
// console.log(`lookupToAmis====`, field, readonly, ctx)
|
|
26142
26148
|
if(readonly){
|
|
26143
|
-
|
|
26144
|
-
|
|
26145
|
-
|
|
26146
|
-
|
|
26149
|
+
if(field.reference_to){
|
|
26150
|
+
return {
|
|
26151
|
+
type: 'steedos-field',
|
|
26152
|
+
config: field,
|
|
26153
|
+
static: true
|
|
26154
|
+
}
|
|
26155
|
+
}else {
|
|
26156
|
+
return {
|
|
26157
|
+
type: getAmisStaticFieldType('picker', readonly),
|
|
26158
|
+
tpl: getRelatedFieldTpl(field, ctx)
|
|
26159
|
+
}
|
|
26147
26160
|
}
|
|
26148
|
-
|
|
26149
|
-
// return {
|
|
26150
|
-
// type: Field.getAmisStaticFieldType('picker', readonly),
|
|
26151
|
-
// tpl: Tpl.getRelatedFieldTpl(field, ctx)
|
|
26152
|
-
// }
|
|
26153
26161
|
}
|
|
26154
26162
|
if(field.reference_to && !lodash.exports.isString(field.reference_to) && !readonly){
|
|
26155
26163
|
return {
|
|
@@ -27085,7 +27093,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
27085
27093
|
if(field.is_wide || convertData.type === 'group'){
|
|
27086
27094
|
convertData.className = 'col-span-2 m-0';
|
|
27087
27095
|
}else {
|
|
27088
|
-
convertData.className = 'm-
|
|
27096
|
+
convertData.className = 'm-0';
|
|
27089
27097
|
}
|
|
27090
27098
|
if(readonly){
|
|
27091
27099
|
convertData.className = `${convertData.className} border-b`;
|
|
@@ -27110,6 +27118,10 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
27110
27118
|
}
|
|
27111
27119
|
}
|
|
27112
27120
|
|
|
27121
|
+
if(ctx.amisData && ctx.amisData._master && ctx.amisData._master.relatedKey === field.name){
|
|
27122
|
+
convertData.className = `${convertData.className || ''} hidden`;
|
|
27123
|
+
}
|
|
27124
|
+
|
|
27113
27125
|
if(lodash.exports.isString(baseData.required)){
|
|
27114
27126
|
if(baseData.required.startsWith("{{")){
|
|
27115
27127
|
baseData.requiredOn = `${baseData.required.substring(2, baseData.required.length -2).replace(/formData./g, 'data.')}`;
|
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.8",
|
|
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.8"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "3818ac08a518bbed4fb8090165c713c09229dd47"
|
|
51
51
|
}
|