@steedos-widgets/amis-lib 1.1.12-beta.1 → 1.1.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.
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +14 -31
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +15 -32
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +14 -31
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/api.d.ts +4 -0
- package/dist/types/lib/converter/amis/index.d.ts +4 -0
- package/dist/types/lib/objects.d.ts +4 -0
- package/dist/types/lib/page_init.d.ts +4 -0
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -5489,12 +5489,12 @@ setTimeout(()=>{
|
|
|
5489
5489
|
if(uiSchema.form){
|
|
5490
5490
|
try{
|
|
5491
5491
|
var objectFormConfig = JSON.parse(uiSchema.form);
|
|
5492
|
-
|
|
5493
|
-
if(
|
|
5494
|
-
|
|
5492
|
+
var formInitialValuesFun = objectFormConfig.initialValues;
|
|
5493
|
+
if(formInitialValuesFun){
|
|
5494
|
+
formInitialValuesFun = new Function("return " + formInitialValuesFun)();
|
|
5495
5495
|
}
|
|
5496
|
-
if(typeof
|
|
5497
|
-
initialValues =
|
|
5496
|
+
if(typeof formInitialValuesFun === "function"){
|
|
5497
|
+
initialValues = formInitialValuesFun.apply({doc: defaultValues || {} , global: api.body.global})
|
|
5498
5498
|
}
|
|
5499
5499
|
}
|
|
5500
5500
|
catch(ex){
|
|
@@ -5511,12 +5511,15 @@ setTimeout(()=>{
|
|
|
5511
5511
|
}
|
|
5512
5512
|
// data下的变量需要在保存接口(getSaveApi)中被删除。
|
|
5513
5513
|
payload.data = {
|
|
5514
|
-
initialValues
|
|
5515
|
-
editFormInited: true
|
|
5514
|
+
...initialValues
|
|
5516
5515
|
}
|
|
5517
5516
|
${options.initApiAdaptor || ''}
|
|
5518
5517
|
return payload;
|
|
5519
5518
|
`,
|
|
5519
|
+
responseData: {
|
|
5520
|
+
initialValues: "$$",
|
|
5521
|
+
editFormInited: true
|
|
5522
|
+
},
|
|
5520
5523
|
data: data,
|
|
5521
5524
|
headers: {
|
|
5522
5525
|
Authorization: "Bearer ${context.tenantId},${context.authToken}"
|
|
@@ -6643,28 +6646,8 @@ setTimeout(()=>{
|
|
|
6643
6646
|
|
|
6644
6647
|
if(enable_tree){
|
|
6645
6648
|
const records = payload.data.rows;
|
|
6646
|
-
const
|
|
6647
|
-
|
|
6648
|
-
if(!childrenIds){
|
|
6649
|
-
return;
|
|
6650
|
-
}
|
|
6651
|
-
const children = _.filter(records, (record)=>{
|
|
6652
|
-
return _.includes(childrenIds, record._id)
|
|
6653
|
-
});
|
|
6654
|
-
_.each(children, (item)=>{
|
|
6655
|
-
if(item.children){
|
|
6656
|
-
item.children = getChildren(records, item.children)
|
|
6657
|
-
}
|
|
6658
|
-
})
|
|
6659
|
-
return children;
|
|
6660
|
-
}
|
|
6661
|
-
|
|
6662
|
-
_.each(records, (record)=>{
|
|
6663
|
-
if(!record.parent){
|
|
6664
|
-
treeRecords.push(Object.assign({}, record, {children: getChildren(records, record.children)}));
|
|
6665
|
-
}
|
|
6666
|
-
});
|
|
6667
|
-
payload.data.rows = treeRecords;
|
|
6649
|
+
const getTreeOptions = SteedosUI.getTreeOptions
|
|
6650
|
+
payload.data.rows = getTreeOptions(records,{"valueField":"_id"});
|
|
6668
6651
|
}
|
|
6669
6652
|
|
|
6670
6653
|
|
|
@@ -7357,7 +7340,7 @@ setTimeout(()=>{
|
|
|
7357
7340
|
* @Author: baozhoutao@steedos.com
|
|
7358
7341
|
* @Date: 2022-07-05 15:55:39
|
|
7359
7342
|
* @LastEditors: Please set LastEditors
|
|
7360
|
-
* @LastEditTime: 2023-04-
|
|
7343
|
+
* @LastEditTime: 2023-04-18 19:13:30
|
|
7361
7344
|
* @Description:
|
|
7362
7345
|
*/
|
|
7363
7346
|
|
|
@@ -7454,7 +7437,7 @@ setTimeout(()=>{
|
|
|
7454
7437
|
mainRelated[arr[0]] = arr[1];
|
|
7455
7438
|
}
|
|
7456
7439
|
}else {
|
|
7457
|
-
const details = mainObjectUiSchema.details || [];
|
|
7440
|
+
const details = _$1.union(mainObjectUiSchema.details,mainObjectUiSchema.lookup_details) || [];
|
|
7458
7441
|
for (const detail of details) {
|
|
7459
7442
|
const arr = detail.split(".");
|
|
7460
7443
|
mainRelated[arr[0]] = arr[1];
|