@steedos-widgets/amis-lib 1.2.36 → 1.2.37

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/index.umd.js CHANGED
@@ -709,7 +709,7 @@
709
709
  if(displayFields.length > 0){
710
710
  return `${fieldsName.join(',')},${expandFieldsQuery},_display:_ui{${displayFields.join(',')}}`;
711
711
  }
712
- return `${fieldsName.join(' ')},${expandFieldsQuery}`
712
+ return _$1.trimEnd(`${fieldsName.join(' ')},${expandFieldsQuery}`, ",")
713
713
  }
714
714
 
715
715
  function getRecordPermissionsTemplate(){
@@ -3378,8 +3378,8 @@
3378
3378
  }
3379
3379
  if(!event.data.isLookup){
3380
3380
  // 刷新浏览器后,filterFormValues值是空的,只能从本地存储中取出并重置为空值
3381
- const listViewId = event.data.listViewId;
3382
- const listViewPropsStoreKey = location.pathname + "/crud/" + (listViewId || "");
3381
+ const listName = event.data.listName;
3382
+ const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
3383
3383
  let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
3384
3384
  if(localListViewProps){
3385
3385
  localListViewProps = JSON.parse(localListViewProps);
@@ -3405,13 +3405,13 @@
3405
3405
  const dataProviderInited = `
3406
3406
  const objectName = data.objectName;
3407
3407
  const isLookup = data.isLookup;
3408
- const listViewId = data.listViewId;
3408
+ const listName = data.listName;
3409
3409
  let searchableFieldsStoreKey = location.pathname + "/searchable_fields/";
3410
3410
  if(isLookup){
3411
3411
  searchableFieldsStoreKey += "lookup/" + objectName;
3412
3412
  }
3413
3413
  else{
3414
- searchableFieldsStoreKey += (listViewId || "");
3414
+ searchableFieldsStoreKey += (listName || "");
3415
3415
  }
3416
3416
  let defaultSearchableFields = sessionStorage.getItem(searchableFieldsStoreKey);
3417
3417
  if(defaultSearchableFields){
@@ -3438,7 +3438,7 @@
3438
3438
  setData({ showFieldsFilter: false });
3439
3439
  }
3440
3440
  else{
3441
- const listViewPropsStoreKey = location.pathname + "/crud/" + (data.listViewId || "");
3441
+ const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
3442
3442
  let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
3443
3443
  if(localListViewProps){
3444
3444
  localListViewProps = JSON.parse(localListViewProps);
@@ -3468,7 +3468,6 @@
3468
3468
  const listName = data.listName;
3469
3469
  const objectName = data.objectName;
3470
3470
  const isLookup = data.isLookup;
3471
- const listViewId = data.listViewId;
3472
3471
  const value = data.fields;
3473
3472
  const scope = event.context.scoped;
3474
3473
  // 这里的filterForm不是name为"listview-filter-form"的内部form,而是crud自带的filter form
@@ -3484,7 +3483,7 @@
3484
3483
  searchableFieldsStoreKey += "lookup/" + objectName;
3485
3484
  }
3486
3485
  else{
3487
- searchableFieldsStoreKey += (listViewId || "");
3486
+ searchableFieldsStoreKey += (listName || "");
3488
3487
  }
3489
3488
  sessionStorage.setItem(searchableFieldsStoreKey, value);
3490
3489
 
@@ -3542,7 +3541,7 @@
3542
3541
  }
3543
3542
 
3544
3543
  // 列表视图crud支持本地缓存,所以需要进一步清除浏览器本地缓存里面用户在可搜索项中移除的字段值
3545
- const listViewPropsStoreKey = location.pathname + "/crud/" + (listViewId || "");
3544
+ const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
3546
3545
  let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
3547
3546
  if(localListViewProps){
3548
3547
  localListViewProps = JSON.parse(localListViewProps);
@@ -8284,8 +8283,8 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
8284
8283
  const data = _.cloneDeep(api.data);
8285
8284
  try{
8286
8285
  // TODO: 不应该直接在这里取localStorage,应该从外面传入
8287
- const listViewId = api.data.listViewId;
8288
- const listViewPropsStoreKey = location.pathname + "/crud/" + (listViewId || "");
8286
+ const listName = api.data.listName;
8287
+ const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
8289
8288
  let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
8290
8289
  if(localListViewProps){
8291
8290
  localListViewProps = JSON.parse(localListViewProps);
@@ -8485,8 +8484,8 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
8485
8484
 
8486
8485
  try{
8487
8486
  // TODO: 不应该直接在这里取localStorage,应该从外面传入
8488
- const listViewId = api.body.listViewId;
8489
- const listViewPropsStoreKey = location.pathname + "/crud/" + (listViewId || "");
8487
+ const listName = api.body.listName;
8488
+ const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
8490
8489
  /**
8491
8490
  * localListViewProps规范来自crud请求api中api.data.$self参数值的。
8492
8491
  * 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
@@ -10455,7 +10454,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
10455
10454
  * @Author: baozhoutao@steedos.com
10456
10455
  * @Date: 2022-07-05 15:55:39
10457
10456
  * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
10458
- * @LastEditTime: 2023-08-01 14:50:23
10457
+ * @LastEditTime: 2023-08-04 12:27:48
10459
10458
  * @Description:
10460
10459
  */
10461
10460
 
@@ -10720,7 +10719,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
10720
10719
  * 本次存储代码段
10721
10720
  */
10722
10721
  try {
10723
- const listViewPropsStoreKey = location.pathname + "/crud/" + (ctx.listViewId || "");
10722
+ const listViewPropsStoreKey = location.pathname + "/crud/" + (listViewName || "");
10724
10723
  let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
10725
10724
  /**
10726
10725
  * localListViewProps规范来自crud请求api中api.data.$self参数值的。