@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.
@@ -54102,7 +54102,7 @@ function getSelectMap(selectOptions){
54102
54102
 
54103
54103
  function getNameTplUrl(field, ctx){
54104
54104
  if(ctx.objectName === 'cms_files'){
54105
- return `\${context.rootUrl}/api/files/files/\${versions[0]}?download=true`
54105
+ return "${(versions[0] && versions[0].url) ? versions[0].url+'?download=true' : context.rootUrl+'/api/files/files/'+versions[0]+'?download=true'}"
54106
54106
  }
54107
54107
  const href = Router.getObjectDetailPath({
54108
54108
  ...ctx, formFactor: ctx.formFactor, appId: "${appId}", objectName: ctx.objectName || "${objectName}", recordId: `\${${ctx.idFieldName}}`
@@ -55598,7 +55598,7 @@ function getMobileLines(tpls){
55598
55598
  }
55599
55599
  if(isLeft){
55600
55600
  // 左侧半行
55601
- lineChildrenClassName = "steedos-listview-item-left truncate";
55601
+ lineChildrenClassName = "steedos-listview-item-left truncate h-5";
55602
55602
  if(item.field.is_wide){
55603
55603
  // 左侧全行样式可以单独写,如果需要配置两行省略号效果,可以加样式类 two-lines-truncate
55604
55604
  lineChildrenClassName = "steedos-listview-item-wide";
@@ -55610,7 +55610,7 @@ function getMobileLines(tpls){
55610
55610
  }
55611
55611
  else {
55612
55612
  // 右侧半行,这里加样式类 flex flex-shrink-0,是为了省略号只显示在左半行,右半行文字一般比较短,如果也加省略号效果的话,左侧文字多的话,右侧没几个字就显示省略号了
55613
- lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0";
55613
+ lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0 h-5";
55614
55614
  }
55615
55615
  //支持字段amis属性配置classname,识别classname的类型,与原样式合并
55616
55616
  var className;
@@ -55721,7 +55721,15 @@ async function getMobileTableColumns(fields, options){
55721
55721
  "actions": [
55722
55722
  {
55723
55723
  "script": `
55724
- let cms_url = "/api/files/files/"+event.data.versions[0]+"?download=true"
55724
+ let cms_url = '';
55725
+ let value = event.data.versions[0];
55726
+ if(value){
55727
+ if(value.url){
55728
+ cms_url = value.url;
55729
+ }else{
55730
+ cms_url = "/api/files/files/"+value+"?download=true"
55731
+ }
55732
+ }
55725
55733
  Steedos.cordovaDownload(encodeURI(Steedos.absoluteUrl(cms_url)), event.data.name);
55726
55734
  `,
55727
55735
  "actionType": "custom"
@@ -56093,7 +56101,7 @@ async function getListBody(fields, options){
56093
56101
 
56094
56102
  function getDefaultParams(options){
56095
56103
  return {
56096
- perPage: options.top || options.perPage || 10
56104
+ perPage: options.top || options.perPage || 20
56097
56105
  }
56098
56106
  }
56099
56107
 
@@ -56147,7 +56155,6 @@ const getSchema$5 = async (uiSchema, ctx) => {
56147
56155
  "objectApiName": "\${objectName}",
56148
56156
  "recordId": "",
56149
56157
  "mode": "edit",
56150
- "layout": "normal"
56151
56158
  };
56152
56159
 
56153
56160
  if (payload && payload.schema) {
@@ -59591,8 +59598,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
59591
59598
  labelField: referenceTo.labelField.name,
59592
59599
  valueField: referenceTo.valueField.name,
59593
59600
  // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段,多选字段可以编辑。
59594
- disabledOn: `${readonly}`,
59595
- hiddenOn: `( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
59601
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
59596
59602
  modalMode: 'dialog', //TODO 设置 dialog 或者 drawer,用来配置弹出方式
59597
59603
  source: source,
59598
59604
  size: "lg",
@@ -59835,16 +59841,18 @@ async function lookupToAmis(field, readonly, ctx){
59835
59841
  }
59836
59842
  // console.log(`lookupToAmis====`, field, readonly, ctx)
59837
59843
  if(readonly){
59838
- return {
59839
- type: 'steedos-field',
59840
- config: field,
59841
- static: true
59844
+ if(field.reference_to){
59845
+ return {
59846
+ type: 'steedos-field',
59847
+ config: field,
59848
+ static: true
59849
+ }
59850
+ }else {
59851
+ return {
59852
+ type: getAmisStaticFieldType('picker', readonly),
59853
+ tpl: getRelatedFieldTpl(field, ctx)
59854
+ }
59842
59855
  }
59843
-
59844
- // return {
59845
- // type: Field.getAmisStaticFieldType('picker', readonly),
59846
- // tpl: Tpl.getRelatedFieldTpl(field, ctx)
59847
- // }
59848
59856
  }
59849
59857
  if(field.reference_to && !lodash.exports.isString(field.reference_to) && !readonly){
59850
59858
  return {
@@ -60780,7 +60788,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
60780
60788
  if(field.is_wide || convertData.type === 'group'){
60781
60789
  convertData.className = 'col-span-2 m-0';
60782
60790
  }else {
60783
- convertData.className = 'm-1';
60791
+ convertData.className = 'm-0';
60784
60792
  }
60785
60793
  if(readonly){
60786
60794
  convertData.className = `${convertData.className} border-b`;
@@ -60805,6 +60813,10 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
60805
60813
  }
60806
60814
  }
60807
60815
 
60816
+ if(ctx.amisData && ctx.amisData._master && ctx.amisData._master.relatedKey === field.name){
60817
+ convertData.className = `${convertData.className || ''} hidden`;
60818
+ }
60819
+
60808
60820
  if(lodash.exports.isString(baseData.required)){
60809
60821
  if(baseData.required.startsWith("{{")){
60810
60822
  baseData.requiredOn = `${baseData.required.substring(2, baseData.required.length -2).replace(/formData./g, 'data.')}`;