@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/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +14 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +15 -16
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +14 -15
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/objects.d.ts +1 -10
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _$1 from 'lodash';
|
|
2
|
-
import ___default, { isEmpty, isArray, each, find, endsWith, cloneDeep, forEach, includes, get, isBoolean, omitBy, isNil, toArray, mergeWith, map, isString, union, has, slice, defaultsDeep as defaultsDeep$1, isObject as isObject$1, filter, startsWith } from 'lodash';
|
|
2
|
+
import ___default, { isEmpty, isArray, each, find, endsWith, cloneDeep, forEach, includes, trimEnd, get, isBoolean, omitBy, isNil, toArray, mergeWith, map, isString, union, has, slice, defaultsDeep as defaultsDeep$1, isObject as isObject$1, filter, startsWith } from 'lodash';
|
|
3
3
|
import i18next from 'i18next';
|
|
4
4
|
export { default as i18next } from 'i18next';
|
|
5
5
|
import { initReactI18next } from 'react-i18next';
|
|
@@ -685,7 +685,7 @@ async function getFieldsTemplate(fields, display){
|
|
|
685
685
|
if(displayFields.length > 0){
|
|
686
686
|
return `${fieldsName.join(',')},${expandFieldsQuery},_display:_ui{${displayFields.join(',')}}`;
|
|
687
687
|
}
|
|
688
|
-
return `${fieldsName.join(' ')},${expandFieldsQuery}
|
|
688
|
+
return trimEnd(`${fieldsName.join(' ')},${expandFieldsQuery}`, ",")
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
function getRecordPermissionsTemplate(){
|
|
@@ -3354,8 +3354,8 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3354
3354
|
}
|
|
3355
3355
|
if(!event.data.isLookup){
|
|
3356
3356
|
// 刷新浏览器后,filterFormValues值是空的,只能从本地存储中取出并重置为空值
|
|
3357
|
-
const
|
|
3358
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
3357
|
+
const listName = event.data.listName;
|
|
3358
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
3359
3359
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
3360
3360
|
if(localListViewProps){
|
|
3361
3361
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -3381,13 +3381,13 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3381
3381
|
const dataProviderInited = `
|
|
3382
3382
|
const objectName = data.objectName;
|
|
3383
3383
|
const isLookup = data.isLookup;
|
|
3384
|
-
const
|
|
3384
|
+
const listName = data.listName;
|
|
3385
3385
|
let searchableFieldsStoreKey = location.pathname + "/searchable_fields/";
|
|
3386
3386
|
if(isLookup){
|
|
3387
3387
|
searchableFieldsStoreKey += "lookup/" + objectName;
|
|
3388
3388
|
}
|
|
3389
3389
|
else{
|
|
3390
|
-
searchableFieldsStoreKey += (
|
|
3390
|
+
searchableFieldsStoreKey += (listName || "");
|
|
3391
3391
|
}
|
|
3392
3392
|
let defaultSearchableFields = sessionStorage.getItem(searchableFieldsStoreKey);
|
|
3393
3393
|
if(defaultSearchableFields){
|
|
@@ -3414,7 +3414,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3414
3414
|
setData({ showFieldsFilter: false });
|
|
3415
3415
|
}
|
|
3416
3416
|
else{
|
|
3417
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
3417
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
3418
3418
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
3419
3419
|
if(localListViewProps){
|
|
3420
3420
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -3444,7 +3444,6 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3444
3444
|
const listName = data.listName;
|
|
3445
3445
|
const objectName = data.objectName;
|
|
3446
3446
|
const isLookup = data.isLookup;
|
|
3447
|
-
const listViewId = data.listViewId;
|
|
3448
3447
|
const value = data.fields;
|
|
3449
3448
|
const scope = event.context.scoped;
|
|
3450
3449
|
// 这里的filterForm不是name为"listview-filter-form"的内部form,而是crud自带的filter form
|
|
@@ -3460,7 +3459,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3460
3459
|
searchableFieldsStoreKey += "lookup/" + objectName;
|
|
3461
3460
|
}
|
|
3462
3461
|
else{
|
|
3463
|
-
searchableFieldsStoreKey += (
|
|
3462
|
+
searchableFieldsStoreKey += (listName || "");
|
|
3464
3463
|
}
|
|
3465
3464
|
sessionStorage.setItem(searchableFieldsStoreKey, value);
|
|
3466
3465
|
|
|
@@ -3518,7 +3517,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3518
3517
|
}
|
|
3519
3518
|
|
|
3520
3519
|
// 列表视图crud支持本地缓存,所以需要进一步清除浏览器本地缓存里面用户在可搜索项中移除的字段值
|
|
3521
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
3520
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
3522
3521
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
3523
3522
|
if(localListViewProps){
|
|
3524
3523
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -8260,8 +8259,8 @@ async function getTableApi(mainObject, fields, options){
|
|
|
8260
8259
|
const data = _.cloneDeep(api.data);
|
|
8261
8260
|
try{
|
|
8262
8261
|
// TODO: 不应该直接在这里取localStorage,应该从外面传入
|
|
8263
|
-
const
|
|
8264
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
8262
|
+
const listName = api.data.listName;
|
|
8263
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
8265
8264
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
8266
8265
|
if(localListViewProps){
|
|
8267
8266
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -8461,8 +8460,8 @@ async function getTableApi(mainObject, fields, options){
|
|
|
8461
8460
|
|
|
8462
8461
|
try{
|
|
8463
8462
|
// TODO: 不应该直接在这里取localStorage,应该从外面传入
|
|
8464
|
-
const
|
|
8465
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
8463
|
+
const listName = api.body.listName;
|
|
8464
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
8466
8465
|
/**
|
|
8467
8466
|
* localListViewProps规范来自crud请求api中api.data.$self参数值的。
|
|
8468
8467
|
* 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
|
|
@@ -10431,7 +10430,7 @@ async function getRelatedListSchema(
|
|
|
10431
10430
|
* @Author: baozhoutao@steedos.com
|
|
10432
10431
|
* @Date: 2022-07-05 15:55:39
|
|
10433
10432
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
10434
|
-
* @LastEditTime: 2023-08-
|
|
10433
|
+
* @LastEditTime: 2023-08-04 12:27:48
|
|
10435
10434
|
* @Description:
|
|
10436
10435
|
*/
|
|
10437
10436
|
|
|
@@ -10696,7 +10695,7 @@ async function getListSchema(
|
|
|
10696
10695
|
* 本次存储代码段
|
|
10697
10696
|
*/
|
|
10698
10697
|
try {
|
|
10699
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
10698
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listViewName || "");
|
|
10700
10699
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
10701
10700
|
/**
|
|
10702
10701
|
* localListViewProps规范来自crud请求api中api.data.$self参数值的。
|