@steedos-widgets/sortable 3.6.2-beta.11 → 3.6.2-beta.12

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.
@@ -20252,6 +20252,9 @@
20252
20252
  if(uiSchema.enable_split){
20253
20253
  defaultDisplay = "split";
20254
20254
  }
20255
+ if(window.innerWidth <= 768){
20256
+ return "grid";
20257
+ }
20255
20258
  return value ? value : defaultDisplay;
20256
20259
  },
20257
20260
 
@@ -21681,7 +21684,7 @@
21681
21684
  }
21682
21685
 
21683
21686
  function getFieldWidth(width){
21684
- const defaultWidth = "unset";//用于使table内的td标签下生成div,实现将快速编辑按钮固定在右侧的效果,并不是为了unset效果
21687
+ const defaultWidth = null;
21685
21688
  if(typeof width == 'string'){
21686
21689
  if(isNaN(width)){
21687
21690
  return width || defaultWidth;
@@ -21711,14 +21714,14 @@
21711
21714
  //增加quickEdit属性,实现快速编辑
21712
21715
  const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
21713
21716
  let className = "";
21714
- if(field.wrap != true){
21715
- if(field.wrap != false && field.is_wide){
21716
- className += " break-words ";
21717
- }else {
21717
+ if(/Safari/.test(navigator.userAgent)){
21718
+ className += " whitespace-nowrap ";
21719
+ }else {
21720
+ if(field.wrap != true){
21718
21721
  className += " whitespace-nowrap ";
21722
+ }else {
21723
+ className += " break-words ";
21719
21724
  }
21720
- }else {
21721
- className += " break-words ";
21722
21725
  }
21723
21726
  let columnItem;
21724
21727
  if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files'){
@@ -25327,17 +25330,13 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
25327
25330
 
25328
25331
  function getLookupSapceUserTreeSchema(isMobile){
25329
25332
  let apiAdaptor = `
25330
- // console.log("===getLookupSapceUserTreeSchema===", JSON.stringify(payload));
25331
25333
  const records = payload.data.options;
25332
- let isTreeOptionsComputed = false;
25333
- if(records.length === 1 && records[0].children){
25334
- isTreeOptionsComputed = true;
25335
- }
25336
- if(isTreeOptionsComputed){
25337
- return payload;
25338
- }
25339
25334
  const treeRecords = [];
25340
- const getChildren = (records, childrenIds) => {
25335
+ const getChildren = (currentRecord, records, childrenIds) => {
25336
+ if (currentRecord.children && typeof currentRecord.children[0] === "object") {
25337
+ // 考虑api配置了cache缓存的话,不会请求接口但是会重新进这个接收适配器脚本且payload.data.options返回的会是上一次计算结果,这里直接返回计算过的children
25338
+ return currentRecord.children;
25339
+ }
25341
25340
  if (!childrenIds) {
25342
25341
  return;
25343
25342
  }
@@ -25346,7 +25345,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
25346
25345
  });
25347
25346
  _.each(children, (item) => {
25348
25347
  if (item.children) {
25349
- item.children = getChildren(records, item.children)
25348
+ item.children = getChildren(item, records, item.children)
25350
25349
  }else{
25351
25350
  item.children = [];
25352
25351
  }
@@ -25372,7 +25371,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
25372
25371
 
25373
25372
  _.each(records, (record) => {
25374
25373
  if (record.noParent == 1) {
25375
- treeRecords.push(Object.assign({}, record, { children: getChildren(records, record.children) }));
25374
+ treeRecords.push(Object.assign({}, record, { children: getChildren(record, records, record.children) }));
25376
25375
  }
25377
25376
  });
25378
25377
  console.log(treeRecords)
@@ -27107,7 +27106,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
27107
27106
  }else {
27108
27107
  convertData.className = 'm-0';
27109
27108
  }
27110
- if(readonly){
27109
+ if(readonly && ctx.mode !== 'edit'){
27111
27110
  convertData.className = `${convertData.className} border-b`;
27112
27111
  }
27113
27112
  if(readonly){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-widgets/sortable",
3
- "version": "3.6.2-beta.11",
3
+ "version": "3.6.2-beta.12",
4
4
  "main": "dist/sortable.cjs.js",
5
5
  "module": "dist/sortable.esm.js",
6
6
  "unpkg": "dist/sortable.umd.js",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@dnd-kit/core": "^6.0.5",
47
47
  "@dnd-kit/sortable": "^7.0.1",
48
- "@steedos-widgets/amis-lib": "3.6.2-beta.11"
48
+ "@steedos-widgets/amis-lib": "3.6.2-beta.12"
49
49
  },
50
- "gitHead": "c8f1202857d0988250628012afbc80be391eae3d"
50
+ "gitHead": "b33f87b4a0a125c4662bd07bb7dd553208ee90c4"
51
51
  }