@steedos-widgets/sortable 6.3.0-beta.4 → 6.3.0-beta.6

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 CHANGED
@@ -3,8 +3,8 @@
3
3
  {
4
4
  "package": "@steedos-widgets/sortable",
5
5
  "urls": [
6
- "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.4/dist/sortable.umd.js",
7
- "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.4/dist/sortable.umd.css"
6
+ "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.6/dist/sortable.umd.js",
7
+ "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.6/dist/sortable.umd.css"
8
8
  ],
9
9
  "library": "BuilderSortable"
10
10
  }
@@ -15,10 +15,10 @@
15
15
  "npm": {
16
16
  "package": "@steedos-widgets/sortable"
17
17
  },
18
- "url": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.4/dist/meta.js",
18
+ "url": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.6/dist/meta.js",
19
19
  "urls": {
20
- "default": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.4/dist/meta.js",
21
- "design": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.4/dist/meta.js"
20
+ "default": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.6/dist/meta.js",
21
+ "design": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.6/dist/meta.js"
22
22
  }
23
23
  }
24
24
  ]
@@ -58739,7 +58739,7 @@ async function getObjectFilter(objectSchema, fields, options) {
58739
58739
  * @Author: baozhoutao@steedos.com
58740
58740
  * @Date: 2022-07-05 15:55:39
58741
58741
  * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
58742
- * @LastEditTime: 2024-04-25 19:01:52
58742
+ * @LastEditTime: 2024-04-26 16:46:44
58743
58743
  * @Description:
58744
58744
  */
58745
58745
 
@@ -58998,10 +58998,6 @@ async function getListSchema(
58998
58998
  if (localListViewProps.perPage) {
58999
58999
  listSchema.perPage = localListViewProps.perPage;
59000
59000
  }
59001
- if (window.innerWidth > 768) {
59002
- // 列表视图组件PC端高度自动计算实现满屏效果,手机端不需要满屏效果,所以不用autofillheight
59003
- listSchema.autoFillHeight = true;
59004
- }
59005
59001
  defaults.listSchema = lodash.exports.defaultsDeep({}, listSchema, defaults.listSchema || {});
59006
59002
  }
59007
59003
  }
@@ -59009,6 +59005,13 @@ async function getListSchema(
59009
59005
  console.error("本地存储中crud参数解析异常:", ex);
59010
59006
  }
59011
59007
 
59008
+ if (window.innerWidth > 768) {
59009
+ // 列表视图组件PC端高度自动计算实现满屏效果,手机端不需要满屏效果,所以不用autofillheight,且允许重写微页面中重新组件autoFillHeight属性
59010
+ defaults.listSchema = lodash.exports.defaultsDeep({}, defaults.listSchema || {}, {
59011
+ autoFillHeight: true
59012
+ });
59013
+ }
59014
+
59012
59015
  ctx.defaults = defaults;
59013
59016
 
59014
59017
  if (listViewName == "recent") {
@@ -59567,7 +59570,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
59567
59570
  });
59568
59571
 
59569
59572
  // 把自动填充规则中依赖的字段也加到api请求中
59570
- let autoFillMapping = !field.multiple && field.auto_fill_mapping;
59573
+ let autoFillMapping = field.auto_fill_mapping;
59571
59574
  if (autoFillMapping && autoFillMapping.length) {
59572
59575
  autoFillMapping.forEach(function (item) {
59573
59576
  if(!lodash.exports.find(tableFields, function(f){
@@ -60039,7 +60042,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
60039
60042
  ];
60040
60043
 
60041
60044
  // 把自动填充规则中依赖的字段也加到api请求中
60042
- let autoFillMapping = !field.multiple && field.auto_fill_mapping;
60045
+ let autoFillMapping = field.auto_fill_mapping;
60043
60046
  if (autoFillMapping && autoFillMapping.length) {
60044
60047
  autoFillMapping.forEach(function (item) {
60045
60048
  queryFields.push(refObjectConfig.fields[item.from]);
@@ -60281,14 +60284,25 @@ async function getApi(object, recordId, fields, options){
60281
60284
  }
60282
60285
 
60283
60286
  async function getAutoFill(field, refObject) {
60284
- let autoFillMapping = !field.multiple && field.auto_fill_mapping;
60287
+ let autoFillMapping = field.auto_fill_mapping;
60285
60288
  if (autoFillMapping && autoFillMapping.length) {
60286
60289
  let fillMapping = {};
60290
+ if (field.multiple) {
60291
+ autoFillMapping.forEach(function (item) {
60292
+ //from的字段类型为lookup、master_detail、select时,需要保留数组格式;其他类型需要转变为字符串格式
60293
+ if (lodash.exports.includes(["lookup","master_detail","select"], refObject.fields[item.from].type)) {
60294
+ fillMapping[item.to] = `\${items | pick:${item.from}}`;
60295
+ } else {
60296
+ fillMapping[item.to] = `\${items | pick:${item.from} | join}`;
60297
+ }
60298
+ });
60299
+ }else {
60300
+ autoFillMapping.forEach(function (item) {
60301
+ fillMapping[item.to] = `\${${item.from}}`;
60302
+ });
60303
+ }
60287
60304
  // let fieldsForApi = [];
60288
- autoFillMapping.forEach(function (item) {
60289
- fillMapping[item.to] = `\${${item.from}}`;
60290
- // fieldsForApi.push(item.from);
60291
- });
60305
+ // fieldsForApi.push(item.from);
60292
60306
  // let api = {
60293
60307
  // // "url": "/amis/api/mock2/form/autoUpdate?browser=${browser}&version=${version}",
60294
60308
  // "url": `/api/v1/${refObject.name}/\${${field.name}}?fields=${JSON.stringify(fieldsForApi)}`,
@@ -60390,7 +60404,7 @@ async function lookupToAmis(field, readonly, ctx){
60390
60404
  amisSchema = lodash.exports.defaultsDeep({}, pageAmisSchema, amisSchema);
60391
60405
  }
60392
60406
  }
60393
- const autoFill = await getAutoFill(field);
60407
+ const autoFill = await getAutoFill(field, refObject);
60394
60408
  if(autoFill){
60395
60409
  amisSchema.autoFill = autoFill;
60396
60410
  // 这里不配置initAutoFill值,按amis规则initAutoFill默认值为fillIfNotSet处理--需要amis sdk 版本 > 3.6.3-patch.6(不包括)版本