@steedos-widgets/sortable 1.3.17 → 1.3.18

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.
@@ -55325,9 +55325,9 @@ function getFieldWidth(width){
55325
55325
  const defaultWidth = "unset";//用于使table内的td标签下生成div,实现将快速编辑按钮固定在右侧的效果,并不是为了unset效果
55326
55326
  if(typeof width == 'string'){
55327
55327
  if(isNaN(width)){
55328
- return width;
55328
+ return width || defaultWidth;
55329
55329
  }else {
55330
- return Number(width);
55330
+ return Number(width) || defaultWidth;
55331
55331
  }
55332
55332
  }else if(typeof width == 'number'){
55333
55333
  return width;
@@ -55428,6 +55428,7 @@ async function getTableColumns(fields, options){
55428
55428
  width: getFieldWidth(field.width),
55429
55429
  toggled: field.toggled,
55430
55430
  className,
55431
+ inputClassName: "inline",
55431
55432
  static: true,
55432
55433
  }, field.amis, {name: field.name});
55433
55434
  }
@@ -55465,6 +55466,7 @@ async function getTableColumns(fields, options){
55465
55466
  tpl: tpl,
55466
55467
  toggled: field.toggled,
55467
55468
  className,
55469
+ inputClassName: "inline",
55468
55470
  static: true,
55469
55471
  options: field.type === 'html' ? {html: true} : null
55470
55472
  // toggled: true
@@ -55486,8 +55488,8 @@ async function getTableColumns(fields, options){
55486
55488
  const href = Router.getObjectDetailPath({
55487
55489
  ...options, formFactor: options.formFactor, appId: "${appId}", objectName: options.objectName || "${objectName}", recordId: `\${${options.idFieldName}}`
55488
55490
  });
55489
- columns[0].type = "tpl";
55490
- columns[0].tpl = `<a href="${href}">\${${columns[0].name}}</a>`;
55491
+ columns[1].type = "tpl";
55492
+ columns[1].tpl = `<a href="${href}">\${${columns[1].name}}</a>`;
55491
55493
  }
55492
55494
  return columns;
55493
55495
  }
@@ -56931,78 +56933,97 @@ function fields$1(){
56931
56933
 
56932
56934
  function fieldsExtend$4(){
56933
56935
  return {
56936
+ "group": "",
56934
56937
  "label": {
56935
56938
  "is_wide": true
56936
56939
  },
56937
56940
  "name": {
56941
+ "group": "",
56938
56942
  "amis": {
56939
56943
  "hidden": true,
56940
56944
  "required": false
56941
56945
  }
56942
56946
  },
56943
56947
  "object_name": {
56948
+ "group": "",
56944
56949
  "amis": {
56945
56950
  "hidden": true
56946
56951
  }
56947
56952
  },
56948
56953
  "filter_scope": {
56954
+ "group": "",
56949
56955
  "amis": {
56950
56956
  "hidden": true,
56951
56957
  "required": false
56952
56958
  }
56953
56959
  },
56954
56960
  "columns": {
56961
+ "group": "",
56955
56962
  "amis": {
56956
56963
  "hidden": true,
56957
56964
  "required": false
56958
56965
  }
56959
56966
  },
56960
56967
  "mobile_columns":{
56968
+ "group": "",
56961
56969
  "amis": {
56962
56970
  "hidden": true,
56963
56971
  "required": false
56964
56972
  }
56965
56973
  },
56966
56974
  "searchable_fields":{
56975
+ "group": "",
56967
56976
  "amis": {
56968
56977
  "hidden": true,
56969
56978
  "required": false
56970
56979
  }
56971
56980
  },
56972
56981
  "filter_fields": {
56982
+ "group": "",
56973
56983
  "amis": {
56974
56984
  "hidden": true,
56975
56985
  "required": false
56976
56986
  }
56977
56987
  },
56978
56988
  "scrolling_mode": {
56989
+ "group": "",
56979
56990
  "amis": {
56980
56991
  "hidden": true,
56981
56992
  "required": false
56982
56993
  }
56983
56994
  },
56984
56995
  "sort": {
56996
+ "group": "",
56985
56997
  "amis": {
56986
56998
  "hidden": true,
56987
56999
  "required": false
56988
57000
  }
56989
57001
  },
56990
57002
  "show_count": {
57003
+ "group": "",
56991
57004
  "amis": {
56992
57005
  "hidden": true,
56993
57006
  "required": false
56994
57007
  }
56995
57008
  },
56996
57009
  "type": {
57010
+ "group": "",
56997
57011
  "amis": {
56998
57012
  "hidden": true,
56999
57013
  "required": false
57000
57014
  }
57001
57015
  },
57002
57016
  "shared": {
57017
+ "group": "",
57003
57018
  "amis": {
57004
57019
  "visibleOn": "${global.user.is_space_admin}"
57005
57020
  }
57021
+ },
57022
+ "filters": {
57023
+ "group": "",
57024
+ "amis": {
57025
+ "hidden": true
57026
+ }
57006
57027
  }
57007
57028
  }
57008
57029
  }
@@ -57149,6 +57170,12 @@ function fieldsExtend$3(){
57149
57170
  "amis": {
57150
57171
  "visibleOn": "${global.user.is_space_admin}"
57151
57172
  }
57173
+ },
57174
+ "filters": {
57175
+ "group": "",
57176
+ "amis": {
57177
+ "hidden": true
57178
+ }
57152
57179
  }
57153
57180
  }
57154
57181
  }
@@ -57487,7 +57514,6 @@ function fieldsExtend$1(){
57487
57514
  }
57488
57515
  },
57489
57516
  "mobile_columns": {
57490
- "group": instance.t('frontend_listview_control_columns_mobile_group'),
57491
57517
  "amis": {
57492
57518
  "type": "transfer",
57493
57519
  "sortable": true,
@@ -58761,8 +58787,6 @@ async function lookupToAmisTreeSelect(field, readonly, ctx) {
58761
58787
  return amisSchema;
58762
58788
  }
58763
58789
 
58764
- const keywordsSearchBoxName = `__keywords_lookup`;
58765
-
58766
58790
  const getReferenceToFieldSchema = (field, refObjectConfig)=>{
58767
58791
  let referenceTo = field.reference_to;
58768
58792
  if(!referenceTo){
@@ -59021,7 +59045,10 @@ async function lookupToAmisPicker(field, readonly, ctx){
59021
59045
 
59022
59046
  source.data.$term = "$term";
59023
59047
  source.data.$self = "$$";
59024
-
59048
+
59049
+ // field.name可能是带点的名称,比如审批王中子表字段'instances.instances_submitter',如果不替换掉点,会造成审批王表单中新建子表行时报错
59050
+ let keywordsSearchBoxName = `__keywords_lookup__${field.name.replace(/\./g, "_")}__to__${refObjectConfig.name}`;
59051
+
59025
59052
  source.requestAdaptor = `
59026
59053
  let __changedFilterFormValues = api.data.$self.__changedFilterFormValues || {};
59027
59054
  let __changedSearchBoxValues = api.data.$self.__changedSearchBoxValues || {};
@@ -59164,6 +59191,14 @@ async function lookupToAmisPicker(field, readonly, ctx){
59164
59191
  }
59165
59192
  });
59166
59193
  payload.data.rows = treeRecords;
59194
+ try{
59195
+ setTimeout(() => {
59196
+ $('.amis-dialog-widget.antd-Modal .antd-Table-content .antd-Table-table thead .antd-Table-expandBtn')[0]?.click();
59197
+ }, 600);
59198
+ }
59199
+ catch(ex){
59200
+ console.error("tree数据格式展开异常:", ex);
59201
+ }
59167
59202
  }
59168
59203
  return payload;
59169
59204
  `;
@@ -59336,6 +59371,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
59336
59371
 
59337
59372
  async function lookupToAmisSelect(field, readonly, ctx){
59338
59373
  let referenceTo = await getReferenceTo(field);
59374
+ const isMobile = window.innerWidth <= 768;
59339
59375
  const valueFieldKey = referenceTo && referenceTo.valueField?.name || '_id' ;
59340
59376
  // const labelFieldKey = referenceTo && referenceTo.labelField?.name || 'name';
59341
59377
 
@@ -59516,7 +59552,11 @@ async function lookupToAmisSelect(field, readonly, ctx){
59516
59552
  </span>
59517
59553
  <span class='pl-1.5'>\${label}</span>
59518
59554
  </span>`;
59519
- data.menuTpl = "${icon ? `"+select_menuTpl+"` : label}";
59555
+ const menuTpl = "${icon ? `"+select_menuTpl+"` : label}";
59556
+ // TODO: 待amis修复了此bug, 就可以撤销添加menuTpl的判断。
59557
+ if(!(isMobile && field.multiple)){
59558
+ data.menuTpl = menuTpl;
59559
+ }
59520
59560
  if(field.multiple){
59521
59561
  data.multiple = true;
59522
59562
  data.extractValue = true;
@@ -59900,6 +59940,8 @@ function getSelectFieldOptions(field){
59900
59940
  }
59901
59941
 
59902
59942
  async function convertSFieldToAmisField(field, readonly, ctx) {
59943
+ // console.log('convertSFieldToAmisField====>', field, readonly, ctx)
59944
+ const isMobile = window.innerWidth <= 768;
59903
59945
  // 创建人和修改人、创建时间和修改时间不显示
59904
59946
  if(lodash.exports.includes(OMIT_FIELDS, field.name) && ctx.showSystemFields != true){
59905
59947
  return;
@@ -59962,7 +60004,11 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
59962
60004
  </span>
59963
60005
  <span class='pl-1.5'>\${label}</span>
59964
60006
  </span>`;
59965
- convertData.menuTpl = "${icon ? `"+select_menuTpl+"` : label}";
60007
+ const menuTpl = "${icon ? `"+select_menuTpl+"` : label}";
60008
+ // TODO: 待amis修复了此bug, 就可以撤销添加menuTpl的判断。
60009
+ if(!(isMobile && field.multiple)){
60010
+ convertData.menuTpl = menuTpl;
60011
+ }
59966
60012
  if(field.multiple){
59967
60013
  convertData.multiple = true;
59968
60014
  convertData.extractValue = true;