@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.esm.js
CHANGED
|
@@ -53933,22 +53933,26 @@ function getRootUrl(defaultRootUrl){
|
|
|
53933
53933
|
* @Description:
|
|
53934
53934
|
*/
|
|
53935
53935
|
|
|
53936
|
-
|
|
53937
53936
|
const Router = {
|
|
53938
53937
|
getTabDisplayAs(tab_id){
|
|
53938
|
+
const uiSchema = getUISchemaSync$1(tab_id, false);
|
|
53939
53939
|
var urlSearch = new URLSearchParams(document.location.search);
|
|
53940
53940
|
if(urlSearch.has('display')){
|
|
53941
53941
|
return urlSearch.get('display')
|
|
53942
53942
|
}
|
|
53943
53943
|
const key = `tab_${tab_id}_display`;
|
|
53944
53944
|
// const key = `page_display`;
|
|
53945
|
-
const value =
|
|
53946
|
-
|
|
53945
|
+
const value = sessionStorage.getItem(key);
|
|
53946
|
+
let defaultDisplay = "grid";
|
|
53947
|
+
if(uiSchema.enable_split){
|
|
53948
|
+
defaultDisplay = "split";
|
|
53949
|
+
}
|
|
53950
|
+
return value ? value : defaultDisplay;
|
|
53947
53951
|
},
|
|
53948
53952
|
|
|
53949
53953
|
setTabDisplayAs(tab_id, displayAs){
|
|
53950
53954
|
const key = `tab_${tab_id}_display`;
|
|
53951
|
-
|
|
53955
|
+
sessionStorage.setItem(key, displayAs);
|
|
53952
53956
|
},
|
|
53953
53957
|
getAppPath({formFactor, appId}){
|
|
53954
53958
|
return `/app/${appId}`;
|
|
@@ -54102,7 +54106,7 @@ function getSelectMap(selectOptions){
|
|
|
54102
54106
|
|
|
54103
54107
|
function getNameTplUrl(field, ctx){
|
|
54104
54108
|
if(ctx.objectName === 'cms_files'){
|
|
54105
|
-
return
|
|
54109
|
+
return "${(versions[0] && versions[0].url) ? versions[0].url+'?download=true' : context.rootUrl+'/api/files/files/'+versions[0]+'?download=true'}"
|
|
54106
54110
|
}
|
|
54107
54111
|
const href = Router.getObjectDetailPath({
|
|
54108
54112
|
...ctx, formFactor: ctx.formFactor, appId: "${appId}", objectName: ctx.objectName || "${objectName}", recordId: `\${${ctx.idFieldName}}`
|
|
@@ -55399,7 +55403,11 @@ async function getTableColumns(fields, options){
|
|
|
55399
55403
|
const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
|
|
55400
55404
|
let className = "";
|
|
55401
55405
|
if(field.wrap != true){
|
|
55402
|
-
|
|
55406
|
+
if(field.wrap != false && field.is_wide){
|
|
55407
|
+
className += " break-words ";
|
|
55408
|
+
}else {
|
|
55409
|
+
className += " whitespace-nowrap ";
|
|
55410
|
+
}
|
|
55403
55411
|
}else {
|
|
55404
55412
|
className += " break-words ";
|
|
55405
55413
|
}
|
|
@@ -55498,12 +55506,12 @@ async function getTableColumns(fields, options){
|
|
|
55498
55506
|
if(field.type === 'textarea'){
|
|
55499
55507
|
className += 'min-w-56';
|
|
55500
55508
|
}
|
|
55501
|
-
if(field.type === 'date'){
|
|
55502
|
-
|
|
55503
|
-
}
|
|
55504
|
-
if(field.type === 'datetime'){
|
|
55505
|
-
|
|
55506
|
-
}
|
|
55509
|
+
// if(field.type === 'date'){
|
|
55510
|
+
// className += 'date-min-w';
|
|
55511
|
+
// }
|
|
55512
|
+
// if(field.type === 'datetime'){
|
|
55513
|
+
// className += 'datetime-min-w';
|
|
55514
|
+
// }
|
|
55507
55515
|
|
|
55508
55516
|
//field上的amis属性里的clssname需要单独判断类型合并
|
|
55509
55517
|
if (typeof field.amis?.className == "object") {
|
|
@@ -55598,7 +55606,7 @@ function getMobileLines(tpls){
|
|
|
55598
55606
|
}
|
|
55599
55607
|
if(isLeft){
|
|
55600
55608
|
// 左侧半行
|
|
55601
|
-
lineChildrenClassName = "steedos-listview-item-left truncate";
|
|
55609
|
+
lineChildrenClassName = "steedos-listview-item-left truncate h-5";
|
|
55602
55610
|
if(item.field.is_wide){
|
|
55603
55611
|
// 左侧全行样式可以单独写,如果需要配置两行省略号效果,可以加样式类 two-lines-truncate
|
|
55604
55612
|
lineChildrenClassName = "steedos-listview-item-wide";
|
|
@@ -55610,7 +55618,7 @@ function getMobileLines(tpls){
|
|
|
55610
55618
|
}
|
|
55611
55619
|
else {
|
|
55612
55620
|
// 右侧半行,这里加样式类 flex flex-shrink-0,是为了省略号只显示在左半行,右半行文字一般比较短,如果也加省略号效果的话,左侧文字多的话,右侧没几个字就显示省略号了
|
|
55613
|
-
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0";
|
|
55621
|
+
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0 h-5";
|
|
55614
55622
|
}
|
|
55615
55623
|
//支持字段amis属性配置classname,识别classname的类型,与原样式合并
|
|
55616
55624
|
var className;
|
|
@@ -55721,7 +55729,15 @@ async function getMobileTableColumns(fields, options){
|
|
|
55721
55729
|
"actions": [
|
|
55722
55730
|
{
|
|
55723
55731
|
"script": `
|
|
55724
|
-
let cms_url =
|
|
55732
|
+
let cms_url = '';
|
|
55733
|
+
let value = event.data.versions[0];
|
|
55734
|
+
if(value){
|
|
55735
|
+
if(value.url){
|
|
55736
|
+
cms_url = value.url;
|
|
55737
|
+
}else{
|
|
55738
|
+
cms_url = "/api/files/files/"+value+"?download=true"
|
|
55739
|
+
}
|
|
55740
|
+
}
|
|
55725
55741
|
Steedos.cordovaDownload(encodeURI(Steedos.absoluteUrl(cms_url)), event.data.name);
|
|
55726
55742
|
`,
|
|
55727
55743
|
"actionType": "custom"
|
|
@@ -56093,7 +56109,7 @@ async function getListBody(fields, options){
|
|
|
56093
56109
|
|
|
56094
56110
|
function getDefaultParams(options){
|
|
56095
56111
|
return {
|
|
56096
|
-
perPage: options.top || options.perPage ||
|
|
56112
|
+
perPage: options.top || options.perPage || 20
|
|
56097
56113
|
}
|
|
56098
56114
|
}
|
|
56099
56115
|
|
|
@@ -56147,7 +56163,6 @@ const getSchema$5 = async (uiSchema, ctx) => {
|
|
|
56147
56163
|
"objectApiName": "\${objectName}",
|
|
56148
56164
|
"recordId": "",
|
|
56149
56165
|
"mode": "edit",
|
|
56150
|
-
"layout": "normal"
|
|
56151
56166
|
};
|
|
56152
56167
|
|
|
56153
56168
|
if (payload && payload.schema) {
|
|
@@ -57931,14 +57946,14 @@ const getDisplayAsButton = function(objectName, showDisplayAs){
|
|
|
57931
57946
|
{
|
|
57932
57947
|
"type": "button",
|
|
57933
57948
|
"label": instance.t('frontend_display_type_is_table'),
|
|
57934
|
-
"onClick": "const key = 'tab_"+objectName+"_display';
|
|
57949
|
+
"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');",
|
|
57935
57950
|
"rightIcon": displayAs != 'split' ? "fa fa-check" : null,
|
|
57936
57951
|
"rightIconClassName": "m-l-sm"
|
|
57937
57952
|
},
|
|
57938
57953
|
{
|
|
57939
57954
|
"type": "button",
|
|
57940
57955
|
"label": instance.t('frontend_display_type_is_split'),
|
|
57941
|
-
"onClick": "const key = 'tab_"+objectName+"_display';
|
|
57956
|
+
"onClick": "const key = 'tab_"+objectName+"_display';sessionStorage.setItem(key, 'split');const url = document.location.pathname + '?display=split'; props.env.jumpTo(url);",
|
|
57942
57957
|
"rightIcon": displayAs === 'split' ? "fa fa-check" : null,
|
|
57943
57958
|
"rightIconClassName": "m-l-sm"
|
|
57944
57959
|
}
|
|
@@ -59591,8 +59606,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59591
59606
|
labelField: referenceTo.labelField.name,
|
|
59592
59607
|
valueField: referenceTo.valueField.name,
|
|
59593
59608
|
// disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段,多选字段可以编辑。
|
|
59594
|
-
disabledOn: `${readonly}`,
|
|
59595
|
-
hiddenOn: `( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
59609
|
+
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
59596
59610
|
modalMode: 'dialog', //TODO 设置 dialog 或者 drawer,用来配置弹出方式
|
|
59597
59611
|
source: source,
|
|
59598
59612
|
size: "lg",
|
|
@@ -59835,16 +59849,18 @@ async function lookupToAmis(field, readonly, ctx){
|
|
|
59835
59849
|
}
|
|
59836
59850
|
// console.log(`lookupToAmis====`, field, readonly, ctx)
|
|
59837
59851
|
if(readonly){
|
|
59838
|
-
|
|
59839
|
-
|
|
59840
|
-
|
|
59841
|
-
|
|
59852
|
+
if(field.reference_to){
|
|
59853
|
+
return {
|
|
59854
|
+
type: 'steedos-field',
|
|
59855
|
+
config: field,
|
|
59856
|
+
static: true
|
|
59857
|
+
}
|
|
59858
|
+
}else {
|
|
59859
|
+
return {
|
|
59860
|
+
type: getAmisStaticFieldType('picker', readonly),
|
|
59861
|
+
tpl: getRelatedFieldTpl(field, ctx)
|
|
59862
|
+
}
|
|
59842
59863
|
}
|
|
59843
|
-
|
|
59844
|
-
// return {
|
|
59845
|
-
// type: Field.getAmisStaticFieldType('picker', readonly),
|
|
59846
|
-
// tpl: Tpl.getRelatedFieldTpl(field, ctx)
|
|
59847
|
-
// }
|
|
59848
59864
|
}
|
|
59849
59865
|
if(field.reference_to && !lodash.exports.isString(field.reference_to) && !readonly){
|
|
59850
59866
|
return {
|
|
@@ -60780,7 +60796,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60780
60796
|
if(field.is_wide || convertData.type === 'group'){
|
|
60781
60797
|
convertData.className = 'col-span-2 m-0';
|
|
60782
60798
|
}else {
|
|
60783
|
-
convertData.className = 'm-
|
|
60799
|
+
convertData.className = 'm-0';
|
|
60784
60800
|
}
|
|
60785
60801
|
if(readonly){
|
|
60786
60802
|
convertData.className = `${convertData.className} border-b`;
|
|
@@ -60805,6 +60821,10 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60805
60821
|
}
|
|
60806
60822
|
}
|
|
60807
60823
|
|
|
60824
|
+
if(ctx.amisData && ctx.amisData._master && ctx.amisData._master.relatedKey === field.name){
|
|
60825
|
+
convertData.className = `${convertData.className || ''} hidden`;
|
|
60826
|
+
}
|
|
60827
|
+
|
|
60808
60828
|
if(lodash.exports.isString(baseData.required)){
|
|
60809
60829
|
if(baseData.required.startsWith("{{")){
|
|
60810
60830
|
baseData.requiredOn = `${baseData.required.substring(2, baseData.required.length -2).replace(/formData./g, 'data.')}`;
|