@steedos-widgets/sortable 3.6.2-beta.7 → 3.6.2-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 +51 -31
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +51 -31
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +51 -31
- package/package.json +3 -3
package/dist/sortable.umd.js
CHANGED
|
@@ -20238,22 +20238,26 @@
|
|
|
20238
20238
|
* @Description:
|
|
20239
20239
|
*/
|
|
20240
20240
|
|
|
20241
|
-
|
|
20242
20241
|
const Router = {
|
|
20243
20242
|
getTabDisplayAs(tab_id){
|
|
20243
|
+
const uiSchema = getUISchemaSync$1(tab_id, false);
|
|
20244
20244
|
var urlSearch = new URLSearchParams(document.location.search);
|
|
20245
20245
|
if(urlSearch.has('display')){
|
|
20246
20246
|
return urlSearch.get('display')
|
|
20247
20247
|
}
|
|
20248
20248
|
const key = `tab_${tab_id}_display`;
|
|
20249
20249
|
// const key = `page_display`;
|
|
20250
|
-
const value =
|
|
20251
|
-
|
|
20250
|
+
const value = sessionStorage.getItem(key);
|
|
20251
|
+
let defaultDisplay = "grid";
|
|
20252
|
+
if(uiSchema.enable_split){
|
|
20253
|
+
defaultDisplay = "split";
|
|
20254
|
+
}
|
|
20255
|
+
return value ? value : defaultDisplay;
|
|
20252
20256
|
},
|
|
20253
20257
|
|
|
20254
20258
|
setTabDisplayAs(tab_id, displayAs){
|
|
20255
20259
|
const key = `tab_${tab_id}_display`;
|
|
20256
|
-
|
|
20260
|
+
sessionStorage.setItem(key, displayAs);
|
|
20257
20261
|
},
|
|
20258
20262
|
getAppPath({formFactor, appId}){
|
|
20259
20263
|
return `/app/${appId}`;
|
|
@@ -20407,7 +20411,7 @@
|
|
|
20407
20411
|
|
|
20408
20412
|
function getNameTplUrl(field, ctx){
|
|
20409
20413
|
if(ctx.objectName === 'cms_files'){
|
|
20410
|
-
return
|
|
20414
|
+
return "${(versions[0] && versions[0].url) ? versions[0].url+'?download=true' : context.rootUrl+'/api/files/files/'+versions[0]+'?download=true'}"
|
|
20411
20415
|
}
|
|
20412
20416
|
const href = Router.getObjectDetailPath({
|
|
20413
20417
|
...ctx, formFactor: ctx.formFactor, appId: "${appId}", objectName: ctx.objectName || "${objectName}", recordId: `\${${ctx.idFieldName}}`
|
|
@@ -21704,7 +21708,11 @@
|
|
|
21704
21708
|
const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
|
|
21705
21709
|
let className = "";
|
|
21706
21710
|
if(field.wrap != true){
|
|
21707
|
-
|
|
21711
|
+
if(field.wrap != false && field.is_wide){
|
|
21712
|
+
className += " break-words ";
|
|
21713
|
+
}else {
|
|
21714
|
+
className += " whitespace-nowrap ";
|
|
21715
|
+
}
|
|
21708
21716
|
}else {
|
|
21709
21717
|
className += " break-words ";
|
|
21710
21718
|
}
|
|
@@ -21803,12 +21811,12 @@
|
|
|
21803
21811
|
if(field.type === 'textarea'){
|
|
21804
21812
|
className += 'min-w-56';
|
|
21805
21813
|
}
|
|
21806
|
-
if(field.type === 'date'){
|
|
21807
|
-
|
|
21808
|
-
}
|
|
21809
|
-
if(field.type === 'datetime'){
|
|
21810
|
-
|
|
21811
|
-
}
|
|
21814
|
+
// if(field.type === 'date'){
|
|
21815
|
+
// className += 'date-min-w';
|
|
21816
|
+
// }
|
|
21817
|
+
// if(field.type === 'datetime'){
|
|
21818
|
+
// className += 'datetime-min-w';
|
|
21819
|
+
// }
|
|
21812
21820
|
|
|
21813
21821
|
//field上的amis属性里的clssname需要单独判断类型合并
|
|
21814
21822
|
if (typeof field.amis?.className == "object") {
|
|
@@ -21903,7 +21911,7 @@
|
|
|
21903
21911
|
}
|
|
21904
21912
|
if(isLeft){
|
|
21905
21913
|
// 左侧半行
|
|
21906
|
-
lineChildrenClassName = "steedos-listview-item-left truncate";
|
|
21914
|
+
lineChildrenClassName = "steedos-listview-item-left truncate h-5";
|
|
21907
21915
|
if(item.field.is_wide){
|
|
21908
21916
|
// 左侧全行样式可以单独写,如果需要配置两行省略号效果,可以加样式类 two-lines-truncate
|
|
21909
21917
|
lineChildrenClassName = "steedos-listview-item-wide";
|
|
@@ -21915,7 +21923,7 @@
|
|
|
21915
21923
|
}
|
|
21916
21924
|
else {
|
|
21917
21925
|
// 右侧半行,这里加样式类 flex flex-shrink-0,是为了省略号只显示在左半行,右半行文字一般比较短,如果也加省略号效果的话,左侧文字多的话,右侧没几个字就显示省略号了
|
|
21918
|
-
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0";
|
|
21926
|
+
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0 h-5";
|
|
21919
21927
|
}
|
|
21920
21928
|
//支持字段amis属性配置classname,识别classname的类型,与原样式合并
|
|
21921
21929
|
var className;
|
|
@@ -22026,7 +22034,15 @@
|
|
|
22026
22034
|
"actions": [
|
|
22027
22035
|
{
|
|
22028
22036
|
"script": `
|
|
22029
|
-
let cms_url =
|
|
22037
|
+
let cms_url = '';
|
|
22038
|
+
let value = event.data.versions[0];
|
|
22039
|
+
if(value){
|
|
22040
|
+
if(value.url){
|
|
22041
|
+
cms_url = value.url;
|
|
22042
|
+
}else{
|
|
22043
|
+
cms_url = "/api/files/files/"+value+"?download=true"
|
|
22044
|
+
}
|
|
22045
|
+
}
|
|
22030
22046
|
Steedos.cordovaDownload(encodeURI(Steedos.absoluteUrl(cms_url)), event.data.name);
|
|
22031
22047
|
`,
|
|
22032
22048
|
"actionType": "custom"
|
|
@@ -22398,7 +22414,7 @@
|
|
|
22398
22414
|
|
|
22399
22415
|
function getDefaultParams(options){
|
|
22400
22416
|
return {
|
|
22401
|
-
perPage: options.top || options.perPage ||
|
|
22417
|
+
perPage: options.top || options.perPage || 20
|
|
22402
22418
|
}
|
|
22403
22419
|
}
|
|
22404
22420
|
|
|
@@ -22452,7 +22468,6 @@
|
|
|
22452
22468
|
"objectApiName": "\${objectName}",
|
|
22453
22469
|
"recordId": "",
|
|
22454
22470
|
"mode": "edit",
|
|
22455
|
-
"layout": "normal"
|
|
22456
22471
|
};
|
|
22457
22472
|
|
|
22458
22473
|
if (payload && payload.schema) {
|
|
@@ -24236,14 +24251,14 @@
|
|
|
24236
24251
|
{
|
|
24237
24252
|
"type": "button",
|
|
24238
24253
|
"label": instance.t('frontend_display_type_is_table'),
|
|
24239
|
-
"onClick": "const key = 'tab_"+objectName+"_display';
|
|
24254
|
+
"onClick": "const key = 'tab_"+objectName+"_display';sessionStorage.setItem(key, 'grid');let url = document.location.pathname; var urlSearch = new URLSearchParams(document.location.search); if(urlSearch.get(\"side_object\") && urlSearch.get(\"side_listview_id\")){url=`/app/${props.data.appId}/${urlSearch.get(\"side_object\")}/grid/${urlSearch.get(\"side_listview_id\")}`;}; props.env.jumpTo(url + '?display=grid');",
|
|
24240
24255
|
"rightIcon": displayAs != 'split' ? "fa fa-check" : null,
|
|
24241
24256
|
"rightIconClassName": "m-l-sm"
|
|
24242
24257
|
},
|
|
24243
24258
|
{
|
|
24244
24259
|
"type": "button",
|
|
24245
24260
|
"label": instance.t('frontend_display_type_is_split'),
|
|
24246
|
-
"onClick": "const key = 'tab_"+objectName+"_display';
|
|
24261
|
+
"onClick": "const key = 'tab_"+objectName+"_display';sessionStorage.setItem(key, 'split');const url = document.location.pathname + '?display=split'; props.env.jumpTo(url);",
|
|
24247
24262
|
"rightIcon": displayAs === 'split' ? "fa fa-check" : null,
|
|
24248
24263
|
"rightIconClassName": "m-l-sm"
|
|
24249
24264
|
}
|
|
@@ -25896,8 +25911,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
25896
25911
|
labelField: referenceTo.labelField.name,
|
|
25897
25912
|
valueField: referenceTo.valueField.name,
|
|
25898
25913
|
// disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段,多选字段可以编辑。
|
|
25899
|
-
disabledOn: `${readonly}`,
|
|
25900
|
-
hiddenOn: `( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
25914
|
+
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
25901
25915
|
modalMode: 'dialog', //TODO 设置 dialog 或者 drawer,用来配置弹出方式
|
|
25902
25916
|
source: source,
|
|
25903
25917
|
size: "lg",
|
|
@@ -26140,16 +26154,18 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26140
26154
|
}
|
|
26141
26155
|
// console.log(`lookupToAmis====`, field, readonly, ctx)
|
|
26142
26156
|
if(readonly){
|
|
26143
|
-
|
|
26144
|
-
|
|
26145
|
-
|
|
26146
|
-
|
|
26157
|
+
if(field.reference_to){
|
|
26158
|
+
return {
|
|
26159
|
+
type: 'steedos-field',
|
|
26160
|
+
config: field,
|
|
26161
|
+
static: true
|
|
26162
|
+
}
|
|
26163
|
+
}else {
|
|
26164
|
+
return {
|
|
26165
|
+
type: getAmisStaticFieldType('picker', readonly),
|
|
26166
|
+
tpl: getRelatedFieldTpl(field, ctx)
|
|
26167
|
+
}
|
|
26147
26168
|
}
|
|
26148
|
-
|
|
26149
|
-
// return {
|
|
26150
|
-
// type: Field.getAmisStaticFieldType('picker', readonly),
|
|
26151
|
-
// tpl: Tpl.getRelatedFieldTpl(field, ctx)
|
|
26152
|
-
// }
|
|
26153
26169
|
}
|
|
26154
26170
|
if(field.reference_to && !lodash.exports.isString(field.reference_to) && !readonly){
|
|
26155
26171
|
return {
|
|
@@ -27085,7 +27101,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
27085
27101
|
if(field.is_wide || convertData.type === 'group'){
|
|
27086
27102
|
convertData.className = 'col-span-2 m-0';
|
|
27087
27103
|
}else {
|
|
27088
|
-
convertData.className = 'm-
|
|
27104
|
+
convertData.className = 'm-0';
|
|
27089
27105
|
}
|
|
27090
27106
|
if(readonly){
|
|
27091
27107
|
convertData.className = `${convertData.className} border-b`;
|
|
@@ -27110,6 +27126,10 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
27110
27126
|
}
|
|
27111
27127
|
}
|
|
27112
27128
|
|
|
27129
|
+
if(ctx.amisData && ctx.amisData._master && ctx.amisData._master.relatedKey === field.name){
|
|
27130
|
+
convertData.className = `${convertData.className || ''} hidden`;
|
|
27131
|
+
}
|
|
27132
|
+
|
|
27113
27133
|
if(lodash.exports.isString(baseData.required)){
|
|
27114
27134
|
if(baseData.required.startsWith("{{")){
|
|
27115
27135
|
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.9",
|
|
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.9"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "9acd287dd121c0c2c31d65b8fc5bec7279809b9d"
|
|
51
51
|
}
|