@steedos-widgets/amis-lib 1.2.40 → 1.2.41
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 +49 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +49 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +49 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -678,7 +678,7 @@ async function getFieldsTemplate(fields, display){
|
|
|
678
678
|
let expandFieldsQuery = "";
|
|
679
679
|
if(expandFields.length > 0){
|
|
680
680
|
_$1.each(expandFields, function(field){
|
|
681
|
-
expandFieldsQuery = expandFieldsQuery + `${field.expandInfo.fieldName}
|
|
681
|
+
expandFieldsQuery = expandFieldsQuery + `${field.expandInfo.fieldName}__expand{${field.expandInfo.displayName}}`;
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
684
|
|
|
@@ -3440,7 +3440,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3440
3440
|
});
|
|
3441
3441
|
// 有过滤条件时只显示搜索按钮上的红点,不自动展开搜索栏
|
|
3442
3442
|
if(!_.isEmpty(omitedEmptyFormValue)){
|
|
3443
|
-
let crudService = SteedosUI.getRef(data.$scopeId).getComponentById("service_listview_" + data.objectName)
|
|
3443
|
+
let crudService = SteedosUI.getRef(data.$scopeId).parent.getComponentById("service_listview_" + data.objectName)
|
|
3444
3444
|
crudService && crudService.setData({isFieldsFilterEmpty: false});
|
|
3445
3445
|
// setData({ showFieldsFilter: true });//自动展开搜索栏
|
|
3446
3446
|
}
|
|
@@ -9349,6 +9349,39 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
9349
9349
|
});
|
|
9350
9350
|
`;
|
|
9351
9351
|
|
|
9352
|
+
const onEventClickScript = `
|
|
9353
|
+
const data = event.data;
|
|
9354
|
+
const eventData = data.event;
|
|
9355
|
+
const appId = data.appId;
|
|
9356
|
+
const objectName = data.objectName;
|
|
9357
|
+
const eventId = data.event && data.event.id;
|
|
9358
|
+
doAction({
|
|
9359
|
+
"actionType": "link",
|
|
9360
|
+
"args": {
|
|
9361
|
+
"link": "/app/" + appId + "/" + objectName + "/view/" + eventId
|
|
9362
|
+
}
|
|
9363
|
+
});
|
|
9364
|
+
// doAction({
|
|
9365
|
+
// "actionType": "dialog",
|
|
9366
|
+
// "dialog": {
|
|
9367
|
+
// "type": "dialog",
|
|
9368
|
+
// "title": "",
|
|
9369
|
+
// "body": [
|
|
9370
|
+
// {
|
|
9371
|
+
// "type": "steedos-record-detail",
|
|
9372
|
+
// "objectApiName": "\${objectName}",
|
|
9373
|
+
// "recordId": data.event && data.event.id
|
|
9374
|
+
// }
|
|
9375
|
+
// ],
|
|
9376
|
+
// "closeOnEsc": false,
|
|
9377
|
+
// "closeOnOutside": false,
|
|
9378
|
+
// "showCloseButton": true,
|
|
9379
|
+
// "size": "lg",
|
|
9380
|
+
// "actions": []
|
|
9381
|
+
// }
|
|
9382
|
+
// });
|
|
9383
|
+
`;
|
|
9384
|
+
|
|
9352
9385
|
const recordId = "${event.id}";
|
|
9353
9386
|
const recordPermissionsApi = getCalendarRecordPermissionsApi(objectSchema, recordId);
|
|
9354
9387
|
const recordSaveApi = getCalendarRecordSaveApi(objectSchema, calendarOptions);
|
|
@@ -9394,11 +9427,16 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
9394
9427
|
"weight": 0,
|
|
9395
9428
|
"actions": [
|
|
9396
9429
|
{
|
|
9397
|
-
"actionType": "
|
|
9398
|
-
"
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9430
|
+
"actionType": "custom",
|
|
9431
|
+
"script": onEventClickScript
|
|
9432
|
+
},
|
|
9433
|
+
// amis 升级到 3.2后,以下的"actionType": "link"方式拿不到appId和objectName了
|
|
9434
|
+
// {
|
|
9435
|
+
// "actionType": "link",
|
|
9436
|
+
// "args": {
|
|
9437
|
+
// "link": "/app/${appId}/${objectName}/view/${event.id}"
|
|
9438
|
+
// }
|
|
9439
|
+
// }
|
|
9402
9440
|
]
|
|
9403
9441
|
},
|
|
9404
9442
|
"eventAdd": {
|
|
@@ -10565,8 +10603,8 @@ async function getRelatedListSchema(
|
|
|
10565
10603
|
/*
|
|
10566
10604
|
* @Author: baozhoutao@steedos.com
|
|
10567
10605
|
* @Date: 2022-07-05 15:55:39
|
|
10568
|
-
* @LastEditors:
|
|
10569
|
-
* @LastEditTime: 2023-08-
|
|
10606
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
10607
|
+
* @LastEditTime: 2023-08-17 18:03:51
|
|
10570
10608
|
* @Description:
|
|
10571
10609
|
*/
|
|
10572
10610
|
|
|
@@ -10937,7 +10975,7 @@ async function getTableSchema(
|
|
|
10937
10975
|
if(filedInfo && (filedInfo.type === 'lookup' || filedInfo.type === 'master_detail') && isString(filedInfo.reference_to) ){
|
|
10938
10976
|
const rfUiSchema = await getUISchema(filedInfo.reference_to);
|
|
10939
10977
|
const rfFieldInfo = rfUiSchema.fields[displayName];
|
|
10940
|
-
fields.push(Object.assign({}, rfFieldInfo, {name:
|
|
10978
|
+
fields.push(Object.assign({}, rfFieldInfo, {name: `${fieldName}__expand.${displayName}`, expand: true, expandInfo: {fieldName, displayName}}));
|
|
10941
10979
|
}
|
|
10942
10980
|
}else {
|
|
10943
10981
|
if(uiSchema.fields[column]){
|
|
@@ -10953,7 +10991,7 @@ async function getTableSchema(
|
|
|
10953
10991
|
const rfUiSchema = await getUISchema(filedInfo.reference_to);
|
|
10954
10992
|
const rfFieldInfo = rfUiSchema.fields[displayName];
|
|
10955
10993
|
fields.push(Object.assign({}, rfFieldInfo,
|
|
10956
|
-
{name:
|
|
10994
|
+
{name: `${fieldName}__expand.${displayName}`, expand: true, expandInfo: {fieldName, displayName}},
|
|
10957
10995
|
{
|
|
10958
10996
|
width: column.width,
|
|
10959
10997
|
wrap: column.wrap, // wrap = true 是没效果的
|