@steedos-widgets/sortable 1.3.22-beta.1 → 1.3.22-beta.3

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.
@@ -54965,6 +54965,7 @@ async function getQuickEditSchema(field, options){
54965
54965
  {
54966
54966
  "actionType": "custom",
54967
54967
  "script": `
54968
+
54968
54969
  var _display = _.cloneDeep(event.data._display);
54969
54970
  ${displayField}
54970
54971
  doAction({actionType: 'setValue', "args": {"value": {_display}},componentId: "${quickEditId}"});
@@ -55351,7 +55352,9 @@ async function getTableColumns(fields, options){
55351
55352
  if(!options.isLookup && !options.isInputTable){
55352
55353
  //将_display放入crud的columns中,可以通过setvalue修改行内数据域的_display,而不影响上层items的_display,用于批量编辑
55353
55354
  columns.push({name: '_display',type: 'static', width: 32, placeholder: "",id: "_display_${_index}", className: "hidden"});
55354
- columns.push({name: '_index',type: 'text', width: 32, placeholder: ""});
55355
+ if(!options.enable_tree){
55356
+ columns.push({name: '_index',type: 'text', width: 32, placeholder: ""});
55357
+ }
55355
55358
  }
55356
55359
  const allowEdit = options.permissions?.allowEdit && !options.isLookup && options.enable_inline_edit != false;
55357
55360
 
@@ -58177,7 +58180,8 @@ function getObjectFooterToolbar(mainObject, formFactor, options) {
58177
58180
  {
58178
58181
  "type": "pagination",
58179
58182
  "maxButtons": 5,
58180
- "showPageInput": false
58183
+ "showPageInput": true,
58184
+ "layout": "total,pager,go"
58181
58185
  }
58182
58186
  ]
58183
58187
  }
@@ -59937,6 +59941,19 @@ function getGridFieldSubFields(mainField, fields){
59937
59941
  return newMainField;
59938
59942
  }
59939
59943
 
59944
+ function getTabledFieldSubFields(mainField, fields){
59945
+ const newMainField = Object.assign({subFields: []}, mainField);
59946
+ const subFields = lodash.exports.filter(fields, function(field){
59947
+ let result = field.name.startsWith(`${mainField.name}.`);
59948
+ if(result){
59949
+ field._prefix = `${mainField.name}.`;
59950
+ }
59951
+ return result;
59952
+ });
59953
+ newMainField.subFields = subFields;
59954
+ return newMainField;
59955
+ }
59956
+
59940
59957
 
59941
59958
  function getSelectFieldOptions(field){
59942
59959
  const dataType = field.data_type || 'text';
@@ -60065,7 +60082,16 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
60065
60082
  format:'YYYY-MM-DDT00:00:00.000[Z]',
60066
60083
  tpl: readonly ? getDateTpl(field) : null,
60067
60084
  // utc: true,
60068
- joinValues: false
60085
+ joinValues: false,
60086
+ "shortcuts": [
60087
+ "thismonth",
60088
+ "2monthsago",
60089
+ "3monthslater",
60090
+ "prevquarter",
60091
+ "thisquarter",
60092
+ "thisyear",
60093
+ "lastYear"
60094
+ ]
60069
60095
  };
60070
60096
  break;
60071
60097
  case 'date':
@@ -60476,6 +60502,8 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
60476
60502
  let subFieldName = subField.name.replace(`${field.name}.$.`, '').replace(`${field.name}.`, '');
60477
60503
  if(subField.type === 'grid'){
60478
60504
  subField = await getGridFieldSubFields(subField, ctx.__formFields);
60505
+ }else if(subField.type === 'table'){
60506
+ subField = await getTabledFieldSubFields(subField, ctx.__formFields);
60479
60507
  }else {
60480
60508
  if(readonly){
60481
60509
  subFieldName = `${field.name}.${subFieldName}`;
@@ -60592,7 +60620,8 @@ async function getFieldSearchable(perField, permissionFields, ctx){
60592
60620
  fieldNamePrefix = `${fieldNamePrefix}between__`;
60593
60621
  }
60594
60622
  if(_field.type === 'datetime'){
60595
- _field.type = 'input-datetime-range';
60623
+ // 特意改为日期范围而不是日期时间范围,因为搜索时一般精确到日期就足够了,需要精确到日期时间范围需要在字段上配置amis属性来实现
60624
+ _field.type = 'input-date-range';
60596
60625
  _field.is_wide = true;
60597
60626
  fieldNamePrefix = `${fieldNamePrefix}between__`;
60598
60627
  }