@steedos-widgets/amis-object 1.1.1 → 1.1.2
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/amis-object.cjs.js +40 -6
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.js +40 -6
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.js +40 -6
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +10 -10
- package/package.json +3 -3
package/dist/amis-object.cjs.js
CHANGED
|
@@ -1862,8 +1862,8 @@ async function getPage({type, pageId = '', appId, objectName = '', recordId = ''
|
|
|
1862
1862
|
/*
|
|
1863
1863
|
* @Author: baozhoutao@steedos.com
|
|
1864
1864
|
* @Date: 2022-11-01 15:49:58
|
|
1865
|
-
* @LastEditors:
|
|
1866
|
-
* @LastEditTime:
|
|
1865
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
1866
|
+
* @LastEditTime: 2023-03-25 17:22:00
|
|
1867
1867
|
* @Description:
|
|
1868
1868
|
*/
|
|
1869
1869
|
|
|
@@ -1907,6 +1907,10 @@ const getSchema$3 = async (uiSchema, ctx) => {
|
|
|
1907
1907
|
actionType: "dialog",
|
|
1908
1908
|
dialog: {
|
|
1909
1909
|
type: "dialog",
|
|
1910
|
+
"data": {
|
|
1911
|
+
"&": "$$",
|
|
1912
|
+
"$master": "$$"
|
|
1913
|
+
},
|
|
1910
1914
|
title: title,
|
|
1911
1915
|
bodyClassName: "",
|
|
1912
1916
|
body: [formSchema],
|
|
@@ -1929,6 +1933,12 @@ const getSchema$3 = async (uiSchema, ctx) => {
|
|
|
1929
1933
|
};
|
|
1930
1934
|
};
|
|
1931
1935
|
|
|
1936
|
+
/*
|
|
1937
|
+
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
1938
|
+
* @Date: 2023-03-22 09:31:21
|
|
1939
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
1940
|
+
* @LastEditTime: 2023-03-25 22:41:27
|
|
1941
|
+
*/
|
|
1932
1942
|
const getSchema$2 = (uiSchema)=>{
|
|
1933
1943
|
return {
|
|
1934
1944
|
"type": "service",
|
|
@@ -1979,6 +1989,16 @@ const getSchema$2 = (uiSchema)=>{
|
|
|
1979
1989
|
"objectName": `${uiSchema.name}`,
|
|
1980
1990
|
"__deletedRecord": true
|
|
1981
1991
|
}
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
"actionType": "broadcast",
|
|
1995
|
+
"args": {
|
|
1996
|
+
"eventName": "@data.changed.${masterObjectName}"
|
|
1997
|
+
},
|
|
1998
|
+
"data": {
|
|
1999
|
+
"objectName": "${masterObjectName}"
|
|
2000
|
+
},
|
|
2001
|
+
"expression": "${masterObjectName}"
|
|
1982
2002
|
}
|
|
1983
2003
|
]
|
|
1984
2004
|
}
|
|
@@ -4328,9 +4348,13 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
4328
4348
|
`;
|
|
4329
4349
|
source.adaptor = `
|
|
4330
4350
|
const enable_tree = ${refObjectConfig.enable_tree};
|
|
4331
|
-
const
|
|
4332
|
-
if(!_.isEmpty(
|
|
4333
|
-
//
|
|
4351
|
+
const op = api.data.$self.op;
|
|
4352
|
+
if(!_.isEmpty(op)){
|
|
4353
|
+
// op不为空,表示处于字段初始编辑状态,不是点击后出现弹窗状态。
|
|
4354
|
+
const rows = _.map(payload.data.rows, (item)=>{
|
|
4355
|
+
return _.pick(item, ["${referenceTo.labelField.name}", "${referenceTo.valueField.name}"]);
|
|
4356
|
+
})
|
|
4357
|
+
payload.data.rows = rows;
|
|
4334
4358
|
return payload;
|
|
4335
4359
|
}
|
|
4336
4360
|
if(enable_tree){
|
|
@@ -6209,6 +6233,16 @@ async function getObjectForm(objectSchema, ctx){
|
|
|
6209
6233
|
"data": {
|
|
6210
6234
|
"objectName": `${objectSchema.name}`
|
|
6211
6235
|
}
|
|
6236
|
+
},
|
|
6237
|
+
{
|
|
6238
|
+
"actionType": "broadcast",
|
|
6239
|
+
"args": {
|
|
6240
|
+
"eventName": "@data.changed.${$master.masterObjectName}"
|
|
6241
|
+
},
|
|
6242
|
+
"data": {
|
|
6243
|
+
"objectName": "${$master.masterObjectName}"
|
|
6244
|
+
},
|
|
6245
|
+
"expression": "${$master.masterObjectName}"
|
|
6212
6246
|
}
|
|
6213
6247
|
]
|
|
6214
6248
|
}
|
|
@@ -13181,7 +13215,7 @@ var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
13181
13215
|
"showHeader": true,
|
|
13182
13216
|
"showDisplayAs": (defaultFormFactor !== 'SMALL'),
|
|
13183
13217
|
"formFactor": formFactor,
|
|
13184
|
-
"className": (displayAs === 'split') ? 'w-full' : 'p-0 flex-1
|
|
13218
|
+
"className": (displayAs === 'split') ? 'w-full' : 'p-0 flex-1 sm:m-3 sm:mb-0 sm:border sm:shadow sm:rounded border-slate-300 border-solid bg-gray-100'
|
|
13185
13219
|
};
|
|
13186
13220
|
defData = __assign$2(__assign$2({}, $schema.data), { objectName: objectApiName, listViewId: listViewId, listName: listviewId, appId: appId, formFactor: formFactor, displayAs: displayAs });
|
|
13187
13221
|
return [2 /*return*/, {
|