@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.esm.js
CHANGED
|
@@ -1834,8 +1834,8 @@ async function getPage({type, pageId = '', appId, objectName = '', recordId = ''
|
|
|
1834
1834
|
/*
|
|
1835
1835
|
* @Author: baozhoutao@steedos.com
|
|
1836
1836
|
* @Date: 2022-11-01 15:49:58
|
|
1837
|
-
* @LastEditors:
|
|
1838
|
-
* @LastEditTime:
|
|
1837
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
1838
|
+
* @LastEditTime: 2023-03-25 17:22:00
|
|
1839
1839
|
* @Description:
|
|
1840
1840
|
*/
|
|
1841
1841
|
|
|
@@ -1879,6 +1879,10 @@ const getSchema$3 = async (uiSchema, ctx) => {
|
|
|
1879
1879
|
actionType: "dialog",
|
|
1880
1880
|
dialog: {
|
|
1881
1881
|
type: "dialog",
|
|
1882
|
+
"data": {
|
|
1883
|
+
"&": "$$",
|
|
1884
|
+
"$master": "$$"
|
|
1885
|
+
},
|
|
1882
1886
|
title: title,
|
|
1883
1887
|
bodyClassName: "",
|
|
1884
1888
|
body: [formSchema],
|
|
@@ -1901,6 +1905,12 @@ const getSchema$3 = async (uiSchema, ctx) => {
|
|
|
1901
1905
|
};
|
|
1902
1906
|
};
|
|
1903
1907
|
|
|
1908
|
+
/*
|
|
1909
|
+
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
1910
|
+
* @Date: 2023-03-22 09:31:21
|
|
1911
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
1912
|
+
* @LastEditTime: 2023-03-25 22:41:27
|
|
1913
|
+
*/
|
|
1904
1914
|
const getSchema$2 = (uiSchema)=>{
|
|
1905
1915
|
return {
|
|
1906
1916
|
"type": "service",
|
|
@@ -1951,6 +1961,16 @@ const getSchema$2 = (uiSchema)=>{
|
|
|
1951
1961
|
"objectName": `${uiSchema.name}`,
|
|
1952
1962
|
"__deletedRecord": true
|
|
1953
1963
|
}
|
|
1964
|
+
},
|
|
1965
|
+
{
|
|
1966
|
+
"actionType": "broadcast",
|
|
1967
|
+
"args": {
|
|
1968
|
+
"eventName": "@data.changed.${masterObjectName}"
|
|
1969
|
+
},
|
|
1970
|
+
"data": {
|
|
1971
|
+
"objectName": "${masterObjectName}"
|
|
1972
|
+
},
|
|
1973
|
+
"expression": "${masterObjectName}"
|
|
1954
1974
|
}
|
|
1955
1975
|
]
|
|
1956
1976
|
}
|
|
@@ -4300,9 +4320,13 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
4300
4320
|
`;
|
|
4301
4321
|
source.adaptor = `
|
|
4302
4322
|
const enable_tree = ${refObjectConfig.enable_tree};
|
|
4303
|
-
const
|
|
4304
|
-
if(!_.isEmpty(
|
|
4305
|
-
//
|
|
4323
|
+
const op = api.data.$self.op;
|
|
4324
|
+
if(!_.isEmpty(op)){
|
|
4325
|
+
// op不为空,表示处于字段初始编辑状态,不是点击后出现弹窗状态。
|
|
4326
|
+
const rows = _.map(payload.data.rows, (item)=>{
|
|
4327
|
+
return _.pick(item, ["${referenceTo.labelField.name}", "${referenceTo.valueField.name}"]);
|
|
4328
|
+
})
|
|
4329
|
+
payload.data.rows = rows;
|
|
4306
4330
|
return payload;
|
|
4307
4331
|
}
|
|
4308
4332
|
if(enable_tree){
|
|
@@ -6181,6 +6205,16 @@ async function getObjectForm(objectSchema, ctx){
|
|
|
6181
6205
|
"data": {
|
|
6182
6206
|
"objectName": `${objectSchema.name}`
|
|
6183
6207
|
}
|
|
6208
|
+
},
|
|
6209
|
+
{
|
|
6210
|
+
"actionType": "broadcast",
|
|
6211
|
+
"args": {
|
|
6212
|
+
"eventName": "@data.changed.${$master.masterObjectName}"
|
|
6213
|
+
},
|
|
6214
|
+
"data": {
|
|
6215
|
+
"objectName": "${$master.masterObjectName}"
|
|
6216
|
+
},
|
|
6217
|
+
"expression": "${$master.masterObjectName}"
|
|
6184
6218
|
}
|
|
6185
6219
|
]
|
|
6186
6220
|
}
|
|
@@ -13153,7 +13187,7 @@ var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
13153
13187
|
"showHeader": true,
|
|
13154
13188
|
"showDisplayAs": (defaultFormFactor !== 'SMALL'),
|
|
13155
13189
|
"formFactor": formFactor,
|
|
13156
|
-
"className": (displayAs === 'split') ? 'w-full' : 'p-0 flex-1
|
|
13190
|
+
"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'
|
|
13157
13191
|
};
|
|
13158
13192
|
defData = __assign$2(__assign$2({}, $schema.data), { objectName: objectApiName, listViewId: listViewId, listName: listviewId, appId: appId, formFactor: formFactor, displayAs: displayAs });
|
|
13159
13193
|
return [2 /*return*/, {
|