@steedos-widgets/amis-lib 6.3.0-beta.9 → 6.3.0
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 +1125 -529
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1125 -530
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +309 -262
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/buttons.d.ts +296 -107
- package/dist/types/lib/converter/amis/fields/editor.d.ts +1 -0
- package/dist/types/lib/converter/amis/fields/file.d.ts +82 -14
- package/dist/types/lib/converter/amis/graphql.d.ts +1 -1
- package/dist/types/lib/converter/amis/header.d.ts +307 -118
- package/dist/types/lib/converter/amis/toolbars/setting_listview/new.d.ts +1 -0
- package/dist/types/lib/converter/amis/toolbars/setting_listview.d.ts +1 -0
- package/dist/types/lib/input_table.d.ts +1 -0
- package/dist/types/lib/objects.d.ts +1 -0
- package/dist/types/schema/standard_edit.amis.d.ts +17 -9
- package/dist/types/schema/standard_new.amis.d.ts +0 -9
- package/dist/types/standard/button.d.ts +17 -18
- package/dist/types/utils/uuid.d.ts +5 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -555,9 +555,9 @@ function getSelectMap(selectOptions){
|
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
function getNameTplUrl(field, ctx){
|
|
558
|
-
if(ctx.objectName === 'cms_files'){
|
|
559
|
-
|
|
560
|
-
}
|
|
558
|
+
// if(ctx.objectName === 'cms_files'){
|
|
559
|
+
// return "${(versions[0] && versions[0].url) ? versions[0].url+'?download=true' : context.rootUrl+'/api/files/files/'+versions[0]+'?download=true'}"
|
|
560
|
+
// }
|
|
561
561
|
const href = Router.getObjectDetailPath({
|
|
562
562
|
...ctx, formFactor: ctx.formFactor, appId: "${appId}", objectName: ctx.objectName || "${objectName}", recordId: `\${${ctx.idFieldName}}`
|
|
563
563
|
});
|
|
@@ -572,7 +572,7 @@ function getNameTpl(field, ctx){
|
|
|
572
572
|
}
|
|
573
573
|
let nameLabel = field.name;
|
|
574
574
|
//若字段类型是lookup,则按照相关表tpl的label规则显示;若是其它类型,则显示_display或字段本身的值
|
|
575
|
-
if (field.type == "lookup") {
|
|
575
|
+
if (field.type == "lookup" || field.type == "master_detail") {
|
|
576
576
|
if(!field.reference_to && (field.optionsFunction || field._optionsFunction || field.options)){
|
|
577
577
|
if(!field.isTableField){
|
|
578
578
|
nameLabel = `\${${field.name}__label}`;
|
|
@@ -747,12 +747,15 @@ async function getFieldTpl (field, options){
|
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
async function getFieldsTemplate(fields, display){
|
|
750
|
+
async function getFieldsTemplate(object, fields, display){
|
|
751
751
|
let expandFields = [];
|
|
752
752
|
if(display != false){
|
|
753
753
|
display = true;
|
|
754
754
|
}
|
|
755
755
|
let fieldsName = ['_id'];
|
|
756
|
+
if(!object.datasource || object.datasource === 'default' || object.datasource === 'meteor'){
|
|
757
|
+
fieldsName.push('space');
|
|
758
|
+
}
|
|
756
759
|
let displayFields = [];
|
|
757
760
|
let fieldsArr = [];
|
|
758
761
|
if(_$1.isArray(fields)){
|
|
@@ -848,7 +851,7 @@ async function getFindOneQuery$1(object, recordId, fields, options){
|
|
|
848
851
|
}
|
|
849
852
|
}
|
|
850
853
|
return {
|
|
851
|
-
query: `{${alias}:${object.name}${queryOptions}{${await getFieldsTemplate(fields)}, ${getRecordPermissionsTemplate()}}}`
|
|
854
|
+
query: `{${alias}:${object.name}${queryOptions}{${await getFieldsTemplate(object, fields)}, ${getRecordPermissionsTemplate()}}}`
|
|
852
855
|
}
|
|
853
856
|
}
|
|
854
857
|
|
|
@@ -1037,7 +1040,7 @@ async function getFindQuery(object, recordId, fields, options){
|
|
|
1037
1040
|
// return item.replace(/^{/,"").replace(/}$/,"");
|
|
1038
1041
|
// }).join(",")) : "";
|
|
1039
1042
|
|
|
1040
|
-
const fieldsTemplate = `${await getFieldsTemplate(fields, options.expand)}${treeFields}${cfsFields}`;
|
|
1043
|
+
const fieldsTemplate = `${await getFieldsTemplate(object, fields, options.expand)}${treeFields}${cfsFields}`;
|
|
1041
1044
|
|
|
1042
1045
|
return {
|
|
1043
1046
|
orderBy: "${orderBy}",
|
|
@@ -1085,7 +1088,7 @@ function getRecordPermissionsQuery(object, recordId, options){
|
|
|
1085
1088
|
function getApi$2 (isMobile){
|
|
1086
1089
|
if(isMobile);else {
|
|
1087
1090
|
// return __meteor_runtime_config__.ROOT_URL_PATH_PREFIX + "/graphql"
|
|
1088
|
-
return `\${context.rootUrl}/graphql?reload=\${additionalFilters}`
|
|
1091
|
+
return `\${context.rootUrl}/graphql?reload=\${additionalFilters|join}`
|
|
1089
1092
|
}
|
|
1090
1093
|
}
|
|
1091
1094
|
|
|
@@ -1153,6 +1156,29 @@ function getAmisStaticFieldType(type, readonly, options){
|
|
|
1153
1156
|
}
|
|
1154
1157
|
}
|
|
1155
1158
|
|
|
1159
|
+
/*
|
|
1160
|
+
* @Author: baozhoutao@steedos.com
|
|
1161
|
+
* @Date: 2022-07-13 15:18:03
|
|
1162
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
1163
|
+
* @LastEditTime: 2023-04-11 10:34:26
|
|
1164
|
+
* @Description:
|
|
1165
|
+
*/
|
|
1166
|
+
|
|
1167
|
+
async function getPage({type, pageId = '', appId, objectName = '', recordId = '', formFactor = 'LARGE'}){
|
|
1168
|
+
const api = `/api/pageSchema/${type}?app=${appId}&objectApiName=${objectName}&recordId=${recordId}&pageId=${pageId}&formFactor=${formFactor}`;
|
|
1169
|
+
const page = await fetchAPI(api);
|
|
1170
|
+
if (page && page.schema) {
|
|
1171
|
+
page.schema = JSON.parse(page.schema);
|
|
1172
|
+
if(page.schema.data){
|
|
1173
|
+
delete page.schema.data.recordId;
|
|
1174
|
+
delete page.schema.data.objectName;
|
|
1175
|
+
delete page.schema.data.context;
|
|
1176
|
+
delete page.schema.data.global;
|
|
1177
|
+
}
|
|
1178
|
+
return page;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1156
1182
|
/*
|
|
1157
1183
|
* @Author: baozhoutao@steedos.com
|
|
1158
1184
|
* @Date: 2022-10-28 14:15:09
|
|
@@ -1176,9 +1202,74 @@ const getAmisFieldType$1 = (steedosField, readonly)=>{
|
|
|
1176
1202
|
return getAmisStaticFieldType(steedosField.type === 'avatar' ? 'image' : steedosField.type, readonly, {multiple: steedosField.multiple});
|
|
1177
1203
|
};
|
|
1178
1204
|
|
|
1179
|
-
|
|
1205
|
+
async function getLookupLinkOnClick(field, options) {
|
|
1206
|
+
const recordPage = await getPage({ type: 'record', appId: options.appId, objectName: options.objectName, formFactor: options.formFactor });
|
|
1207
|
+
|
|
1208
|
+
const drawerRecordDetailSchema = recordPage ? Object.assign({}, recordPage.schema, {
|
|
1209
|
+
"recordId": "${value}",
|
|
1210
|
+
"data": {
|
|
1211
|
+
...recordPage.schema.data,
|
|
1212
|
+
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
1213
|
+
"recordLoaded": false, // 重置数据加载状态
|
|
1214
|
+
"objectName": options.objectName,
|
|
1215
|
+
}
|
|
1216
|
+
}) : {
|
|
1217
|
+
"type": "steedos-record-detail",
|
|
1218
|
+
"objectApiName": options.objectName,
|
|
1219
|
+
"recordId": "${value}",
|
|
1220
|
+
"showBackButton": false,
|
|
1221
|
+
"showButtons": true,
|
|
1222
|
+
"data": {
|
|
1223
|
+
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
1224
|
+
"recordLoaded": false, // 重置数据加载状态
|
|
1225
|
+
}
|
|
1226
|
+
};
|
|
1227
|
+
return {
|
|
1228
|
+
"click": {
|
|
1229
|
+
"actions": [
|
|
1230
|
+
// {
|
|
1231
|
+
// "type": "custom",
|
|
1232
|
+
// "script": `
|
|
1233
|
+
// let fileRecordId = url.match(${regFileRecordId})[2];
|
|
1234
|
+
// console.log('fileRecordId:',fileRecordId);
|
|
1235
|
+
// event.data.recordId = fileRecordId;
|
|
1236
|
+
// `,
|
|
1237
|
+
// },
|
|
1238
|
+
{
|
|
1239
|
+
"actionType": "drawer",
|
|
1240
|
+
"drawer": {
|
|
1241
|
+
"type": "drawer",
|
|
1242
|
+
"title": " ",
|
|
1243
|
+
"headerClassName": "hidden",
|
|
1244
|
+
"size": "lg",
|
|
1245
|
+
"bodyClassName": "p-0 m-0 bg-gray-100",
|
|
1246
|
+
"closeOnEsc": true,
|
|
1247
|
+
"closeOnOutside": true,
|
|
1248
|
+
"resizable": true,
|
|
1249
|
+
"actions": [],
|
|
1250
|
+
"body": [
|
|
1251
|
+
drawerRecordDetailSchema
|
|
1252
|
+
],
|
|
1253
|
+
"className": "steedos-record-detail-drawer app-popover"
|
|
1254
|
+
},
|
|
1255
|
+
"preventDefault": true
|
|
1256
|
+
}
|
|
1257
|
+
]
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
const getAmisFileReadonlySchema = async (steedosField,ctx = {})=>{
|
|
1180
1263
|
const type = steedosField.type;
|
|
1264
|
+
const { appId, formFactor } = ctx.amisData || {};
|
|
1181
1265
|
const amisFieldType = getAmisFieldType$1(steedosField, true);
|
|
1266
|
+
|
|
1267
|
+
let lookupATagClick = 'onclick="return false;"';
|
|
1268
|
+
|
|
1269
|
+
if(window.innerWidth < 768){
|
|
1270
|
+
lookupATagClick = "";
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1182
1273
|
if(_.includes(['avatar','image'], type)){
|
|
1183
1274
|
return {
|
|
1184
1275
|
type: amisFieldType,
|
|
@@ -1213,13 +1304,34 @@ const getAmisFileReadonlySchema = (steedosField)=>{
|
|
|
1213
1304
|
}
|
|
1214
1305
|
}
|
|
1215
1306
|
} : {
|
|
1216
|
-
type: amisFieldType,
|
|
1217
|
-
tpl: `
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1307
|
+
// type: amisFieldType,
|
|
1308
|
+
// tpl: `
|
|
1309
|
+
// <% let fileData = data._display.${steedosField.name}; if (fileData) { %>
|
|
1310
|
+
// <% if(!Array.isArray(fileData)){ fileData = [fileData]} %>
|
|
1311
|
+
// <% fileData.forEach(function(item) { %>
|
|
1312
|
+
// <a href='<%= item.url %>' target='_self' class='block'><%= item.name %></a>
|
|
1313
|
+
// <% });} %>`
|
|
1314
|
+
"type": "control",
|
|
1315
|
+
"body": {
|
|
1316
|
+
type: 'each',
|
|
1317
|
+
placeholder: "",
|
|
1318
|
+
// className: `steedos-field-lookup-each flex flex-wrap gap-2`,
|
|
1319
|
+
source: `\${_display.${steedosField.name}|asArray}`,
|
|
1320
|
+
items: {
|
|
1321
|
+
type: 'static',
|
|
1322
|
+
labelClassName: "hidden",
|
|
1323
|
+
label: false,
|
|
1324
|
+
className: 'm-0',
|
|
1325
|
+
tpl: `<a href="/app/-/cfs_files_filerecord/view/\${value}" ${lookupATagClick}>\${name}</a>`,
|
|
1326
|
+
// tpl: "<%= item.name >",
|
|
1327
|
+
// onEvent: window.innerWidth < 768 ? null : REFERENCE_VALUE_ITEM_ONCLICK
|
|
1328
|
+
onEvent: window.innerWidth < 768 ? null : await getLookupLinkOnClick(steedosField, {
|
|
1329
|
+
appId,
|
|
1330
|
+
objectName: "cfs_files_filerecord",
|
|
1331
|
+
formFactor
|
|
1332
|
+
})
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1223
1335
|
}
|
|
1224
1336
|
}
|
|
1225
1337
|
};
|
|
@@ -1281,8 +1393,8 @@ const getAmisFileEditSchema = (steedosField)=>{
|
|
|
1281
1393
|
return convertData;
|
|
1282
1394
|
};
|
|
1283
1395
|
|
|
1284
|
-
const getAmisFileSchema = (steedosField, readonly)=>{
|
|
1285
|
-
return readonly ? getAmisFileReadonlySchema(steedosField) : getAmisFileEditSchema(steedosField);
|
|
1396
|
+
const getAmisFileSchema = async (steedosField, readonly, ctx)=>{
|
|
1397
|
+
return readonly ? await getAmisFileReadonlySchema(steedosField,ctx) : getAmisFileEditSchema(steedosField);
|
|
1286
1398
|
};
|
|
1287
1399
|
|
|
1288
1400
|
var frontend_field_group_generalization$1 = "General";
|
|
@@ -1299,6 +1411,7 @@ var frontend_form_confirm$1 = "Confirm";
|
|
|
1299
1411
|
var frontend_form_delete$1 = "Delete";
|
|
1300
1412
|
var frontend_form_view$1 = "view";
|
|
1301
1413
|
var frontend_form_details$1 = "details";
|
|
1414
|
+
var frontend_form_validation_failed_url$1 = "The URL format is incorrect";
|
|
1302
1415
|
var frontend_delete_confirm_text$1 = "Are you sure you want to delete this item?";
|
|
1303
1416
|
var frontend_delete_many_selected_required$1 = "Please select the item to be deleted";
|
|
1304
1417
|
var frontend_delete_many_confirm_text$1 = "Are you sure you want to delete?";
|
|
@@ -1355,6 +1468,7 @@ var frontend_setup$1 = "Setup";
|
|
|
1355
1468
|
var frontend_notifications$1 = "Notifications";
|
|
1356
1469
|
var frontend_notifications_allread$1 = "Mark all as read";
|
|
1357
1470
|
var frontend_notifications_allread_message$1 = "All marked as read";
|
|
1471
|
+
var frontend_notifications_close_dialog$1 = "Close";
|
|
1358
1472
|
var frontend_profile$1 = "Profile";
|
|
1359
1473
|
var switch_space$1 = "Switch Space";
|
|
1360
1474
|
var frontend_about$1 = "About";
|
|
@@ -1387,6 +1501,7 @@ var en_us = {
|
|
|
1387
1501
|
frontend_form_delete: frontend_form_delete$1,
|
|
1388
1502
|
frontend_form_view: frontend_form_view$1,
|
|
1389
1503
|
frontend_form_details: frontend_form_details$1,
|
|
1504
|
+
frontend_form_validation_failed_url: frontend_form_validation_failed_url$1,
|
|
1390
1505
|
frontend_delete_confirm_text: frontend_delete_confirm_text$1,
|
|
1391
1506
|
frontend_delete_many_selected_required: frontend_delete_many_selected_required$1,
|
|
1392
1507
|
frontend_delete_many_confirm_text: frontend_delete_many_confirm_text$1,
|
|
@@ -1443,6 +1558,7 @@ var en_us = {
|
|
|
1443
1558
|
frontend_notifications: frontend_notifications$1,
|
|
1444
1559
|
frontend_notifications_allread: frontend_notifications_allread$1,
|
|
1445
1560
|
frontend_notifications_allread_message: frontend_notifications_allread_message$1,
|
|
1561
|
+
frontend_notifications_close_dialog: frontend_notifications_close_dialog$1,
|
|
1446
1562
|
frontend_profile: frontend_profile$1,
|
|
1447
1563
|
switch_space: switch_space$1,
|
|
1448
1564
|
frontend_about: frontend_about$1,
|
|
@@ -1476,6 +1592,7 @@ var frontend_form_confirm = "确认";
|
|
|
1476
1592
|
var frontend_form_delete = "删除";
|
|
1477
1593
|
var frontend_form_view = "查看";
|
|
1478
1594
|
var frontend_form_details = "详情";
|
|
1595
|
+
var frontend_form_validation_failed_url = "URL 格式不正确";
|
|
1479
1596
|
var frontend_delete_confirm_text = "确定要删除此项目?";
|
|
1480
1597
|
var frontend_delete_many_selected_required = "请选择要删除的项";
|
|
1481
1598
|
var frontend_delete_many_confirm_text = "确定要删除吗?";
|
|
@@ -1533,6 +1650,7 @@ var frontend_setup = "设置";
|
|
|
1533
1650
|
var frontend_notifications = "通知";
|
|
1534
1651
|
var frontend_notifications_allread = "全部标记为已读";
|
|
1535
1652
|
var frontend_notifications_allread_message = "已全部标记为已读";
|
|
1653
|
+
var frontend_notifications_close_dialog = "关闭";
|
|
1536
1654
|
var frontend_profile = "个人资料";
|
|
1537
1655
|
var switch_space = "切换工作区";
|
|
1538
1656
|
var frontend_about = "关于";
|
|
@@ -1565,6 +1683,7 @@ var zh_cn = {
|
|
|
1565
1683
|
frontend_form_delete: frontend_form_delete,
|
|
1566
1684
|
frontend_form_view: frontend_form_view,
|
|
1567
1685
|
frontend_form_details: frontend_form_details,
|
|
1686
|
+
frontend_form_validation_failed_url: frontend_form_validation_failed_url,
|
|
1568
1687
|
frontend_delete_confirm_text: frontend_delete_confirm_text,
|
|
1569
1688
|
frontend_delete_many_selected_required: frontend_delete_many_selected_required,
|
|
1570
1689
|
frontend_delete_many_confirm_text: frontend_delete_many_confirm_text,
|
|
@@ -1622,6 +1741,7 @@ var zh_cn = {
|
|
|
1622
1741
|
frontend_notifications: frontend_notifications,
|
|
1623
1742
|
frontend_notifications_allread: frontend_notifications_allread,
|
|
1624
1743
|
frontend_notifications_allread_message: frontend_notifications_allread_message,
|
|
1744
|
+
frontend_notifications_close_dialog: frontend_notifications_close_dialog,
|
|
1625
1745
|
frontend_profile: frontend_profile,
|
|
1626
1746
|
switch_space: switch_space,
|
|
1627
1747
|
frontend_about: frontend_about,
|
|
@@ -1794,7 +1914,12 @@ async function getQuickEditSchema(object, columnField, options){
|
|
|
1794
1914
|
break;
|
|
1795
1915
|
case "percent":
|
|
1796
1916
|
TempDisplayField = `
|
|
1797
|
-
|
|
1917
|
+
if(event.data.value){
|
|
1918
|
+
_display["${field.name}"] = event.data.value.toFixed(${field.scale}) + '%';
|
|
1919
|
+
} else {
|
|
1920
|
+
_display["${field.name}"] = event.data.value;
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1798
1923
|
`;
|
|
1799
1924
|
quickEditSchema.body[0].onEvent["change"] = quickEditOnEvent(TempDisplayField);
|
|
1800
1925
|
break;
|
|
@@ -2138,6 +2263,60 @@ function getFieldWidth(width){
|
|
|
2138
2263
|
}
|
|
2139
2264
|
}
|
|
2140
2265
|
|
|
2266
|
+
async function getColumnItemOnClick(field, options){
|
|
2267
|
+
const recordPage = await getPage({ type: 'record', appId: options.appId, objectName: options.objectName, formFactor: options.formFactor });
|
|
2268
|
+
const drawerRecordDetailSchema = recordPage ? Object.assign({}, recordPage.schema, {
|
|
2269
|
+
"recordId": `\${${options.idFieldName}}`,
|
|
2270
|
+
"data": {
|
|
2271
|
+
...recordPage.schema.data,
|
|
2272
|
+
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
2273
|
+
"recordLoaded": false, // 重置数据加载状态
|
|
2274
|
+
"recordId": `\${${options.idFieldName}}`//审批微页面依赖了作用域中的recordId
|
|
2275
|
+
}
|
|
2276
|
+
}) : {
|
|
2277
|
+
"type": "steedos-record-detail",
|
|
2278
|
+
"objectApiName": "${objectName}",
|
|
2279
|
+
"recordId": `\${${options.idFieldName}}`,
|
|
2280
|
+
"showBackButton": false,
|
|
2281
|
+
"showButtons": true,
|
|
2282
|
+
"data": {
|
|
2283
|
+
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
2284
|
+
"recordLoaded": false, // 重置数据加载状态
|
|
2285
|
+
}
|
|
2286
|
+
};
|
|
2287
|
+
|
|
2288
|
+
if(!(field.is_name || field.name === options.labelFieldName)){
|
|
2289
|
+
drawerRecordDetailSchema.objectApiName = field.reference_to;
|
|
2290
|
+
drawerRecordDetailSchema.recordId = `\${_display.${field.name}.value}`;
|
|
2291
|
+
}
|
|
2292
|
+
return {
|
|
2293
|
+
"click": {
|
|
2294
|
+
"actions": [
|
|
2295
|
+
{
|
|
2296
|
+
"actionType": "drawer",
|
|
2297
|
+
"drawer": {
|
|
2298
|
+
"type": "drawer",
|
|
2299
|
+
"title": " ",
|
|
2300
|
+
"headerClassName": "hidden",
|
|
2301
|
+
"size": "lg",
|
|
2302
|
+
"bodyClassName": "p-0 m-0 bg-gray-100",
|
|
2303
|
+
"closeOnEsc": true,
|
|
2304
|
+
"closeOnOutside": true,
|
|
2305
|
+
"resizable": true,
|
|
2306
|
+
"actions": [],
|
|
2307
|
+
"body": [
|
|
2308
|
+
drawerRecordDetailSchema
|
|
2309
|
+
],
|
|
2310
|
+
"className": "steedos-record-detail-drawer app-popover",
|
|
2311
|
+
"id": "u:fc5f055afa8c"
|
|
2312
|
+
},
|
|
2313
|
+
"preventDefault": true
|
|
2314
|
+
}
|
|
2315
|
+
]
|
|
2316
|
+
}
|
|
2317
|
+
};
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2141
2320
|
async function getTableColumns(object, fields, options){
|
|
2142
2321
|
const columns = [];
|
|
2143
2322
|
if(!options.isLookup && !options.isInputTable){
|
|
@@ -2177,7 +2356,10 @@ async function getTableColumns(object, fields, options){
|
|
|
2177
2356
|
delete fieldAmis?.className;
|
|
2178
2357
|
|
|
2179
2358
|
let columnItem;
|
|
2180
|
-
|
|
2359
|
+
|
|
2360
|
+
// PC客户端点击名称字段直接预览
|
|
2361
|
+
let isNode = !!(window && window.nw && window.nw.require);
|
|
2362
|
+
if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files' && isNode){
|
|
2181
2363
|
const previewFileScript = `
|
|
2182
2364
|
var data = event.data;
|
|
2183
2365
|
var file_name = data.versions ? data.name : "${field.label}";
|
|
@@ -2192,20 +2374,20 @@ async function getTableColumns(object, fields, options){
|
|
|
2192
2374
|
"onEvent": {
|
|
2193
2375
|
"click": {
|
|
2194
2376
|
"actions": [
|
|
2195
|
-
{
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
},
|
|
2377
|
+
// {
|
|
2378
|
+
// "args": {
|
|
2379
|
+
// "api": {
|
|
2380
|
+
// "url": "${(versions[0] && versions[0].url) ? versions[0].url+'?download=true' : context.rootUrl+'/api/files/files/'+versions[0]+'?download=true'}",
|
|
2381
|
+
// "method": "get",
|
|
2382
|
+
// "headers": {
|
|
2383
|
+
// "Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
2384
|
+
// }
|
|
2385
|
+
// }
|
|
2386
|
+
// },
|
|
2387
|
+
// "actionType": "download",
|
|
2388
|
+
// // "expression": "!!!window?.nw?.require"//浏览器上直接下载
|
|
2389
|
+
// "expression": "!!!(window && window.nw && window.nw.require)"//浏览器上直接下载
|
|
2390
|
+
// },
|
|
2209
2391
|
{
|
|
2210
2392
|
"args": {},
|
|
2211
2393
|
"actionType": "custom",
|
|
@@ -2236,7 +2418,7 @@ async function getTableColumns(object, fields, options){
|
|
|
2236
2418
|
toggled: field.toggled,
|
|
2237
2419
|
static: true,
|
|
2238
2420
|
className,
|
|
2239
|
-
...getAmisFileReadonlySchema(field)
|
|
2421
|
+
...await getAmisFileReadonlySchema(field)
|
|
2240
2422
|
}, fieldAmis, {name: field.name});
|
|
2241
2423
|
}
|
|
2242
2424
|
else if(field.type === 'select'){
|
|
@@ -2303,51 +2485,7 @@ async function getTableColumns(object, fields, options){
|
|
|
2303
2485
|
}
|
|
2304
2486
|
|
|
2305
2487
|
if(window.innerWidth >= 768 && ((field.is_name || field.name === options.labelFieldName) || ((field.type == 'lookup' || field.type == 'master_detail') && _$1.isString(field.reference_to) && field.multiple != true)) && options.isRelated){
|
|
2306
|
-
|
|
2307
|
-
const drawerRecordDetailSchema = {
|
|
2308
|
-
"type": "steedos-record-detail",
|
|
2309
|
-
"objectApiName": "${objectName}",
|
|
2310
|
-
"recordId": `\${${options.idFieldName}}`,
|
|
2311
|
-
"showBackButton": false,
|
|
2312
|
-
"showButtons": true,
|
|
2313
|
-
"data": {
|
|
2314
|
-
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
2315
|
-
"recordLoaded": false, // 重置数据加载状态
|
|
2316
|
-
}
|
|
2317
|
-
};
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
if(!(field.is_name || field.name === options.labelFieldName)){
|
|
2321
|
-
drawerRecordDetailSchema.objectApiName = field.reference_to;
|
|
2322
|
-
drawerRecordDetailSchema.recordId = `\${_display.${field.name}.value}`;
|
|
2323
|
-
}
|
|
2324
|
-
|
|
2325
|
-
columnItem.onEvent = {
|
|
2326
|
-
"click": {
|
|
2327
|
-
"actions": [
|
|
2328
|
-
{
|
|
2329
|
-
"actionType": "drawer",
|
|
2330
|
-
"drawer": {
|
|
2331
|
-
"type": "drawer",
|
|
2332
|
-
"title": " ",
|
|
2333
|
-
"headerClassName": "hidden",
|
|
2334
|
-
"size": "lg",
|
|
2335
|
-
"bodyClassName": "p-0 m-0 bg-gray-100",
|
|
2336
|
-
"closeOnEsc": true,
|
|
2337
|
-
"closeOnOutside": true,
|
|
2338
|
-
"resizable": true,
|
|
2339
|
-
"actions": [],
|
|
2340
|
-
"body": [
|
|
2341
|
-
drawerRecordDetailSchema
|
|
2342
|
-
],
|
|
2343
|
-
"className": "steedos-record-detail-drawer app-popover",
|
|
2344
|
-
"id": "u:fc5f055afa8c"
|
|
2345
|
-
},
|
|
2346
|
-
"preventDefault": true
|
|
2347
|
-
}
|
|
2348
|
-
]
|
|
2349
|
-
}
|
|
2350
|
-
};
|
|
2488
|
+
columnItem.onEvent = await getColumnItemOnClick(field, options);
|
|
2351
2489
|
}
|
|
2352
2490
|
|
|
2353
2491
|
}
|
|
@@ -2560,17 +2698,23 @@ async function getMobileTableColumns(fields, options){
|
|
|
2560
2698
|
onEvent: {
|
|
2561
2699
|
"click": {
|
|
2562
2700
|
"actions": [
|
|
2701
|
+
// {
|
|
2702
|
+
// "args": {
|
|
2703
|
+
// "api": {
|
|
2704
|
+
// "url": url,
|
|
2705
|
+
// "method": "get",
|
|
2706
|
+
// "headers": {
|
|
2707
|
+
// "Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
2708
|
+
// }
|
|
2709
|
+
// }
|
|
2710
|
+
// },
|
|
2711
|
+
// "actionType": "download"
|
|
2712
|
+
// }
|
|
2563
2713
|
{
|
|
2714
|
+
"actionType": "link",
|
|
2564
2715
|
"args": {
|
|
2565
|
-
"
|
|
2566
|
-
|
|
2567
|
-
"method": "get",
|
|
2568
|
-
"headers": {
|
|
2569
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
2570
|
-
}
|
|
2571
|
-
}
|
|
2572
|
-
},
|
|
2573
|
-
"actionType": "download"
|
|
2716
|
+
"link": url
|
|
2717
|
+
}
|
|
2574
2718
|
}
|
|
2575
2719
|
],
|
|
2576
2720
|
"weight": 0
|
|
@@ -3269,8 +3413,8 @@ function getReadonlyFormAdaptor(object, fields, options){
|
|
|
3269
3413
|
|
|
3270
3414
|
var fieldNames = _$1.map(fields, function(n){return n.name});
|
|
3271
3415
|
var nameField = object.fields[object.NAME_FIELD_KEY];
|
|
3272
|
-
let nameLabel = nameField.name;
|
|
3273
|
-
if (nameField.type == "lookup") {
|
|
3416
|
+
let nameLabel = nameField && nameField.name;
|
|
3417
|
+
if (nameField && (nameField.type == "lookup" || nameField.type == "master_detail")) {
|
|
3274
3418
|
if(!nameField.reference_to && (nameField.optionsFunction || nameField._optionsFunction || nameField.options)){
|
|
3275
3419
|
if(!nameField.isTableField){
|
|
3276
3420
|
nameLabel = `record.${nameField.name}__label`;
|
|
@@ -3278,8 +3422,8 @@ function getReadonlyFormAdaptor(object, fields, options){
|
|
|
3278
3422
|
} else {
|
|
3279
3423
|
nameLabel = `record._display.${nameField.name}.label`;
|
|
3280
3424
|
}
|
|
3281
|
-
} else {
|
|
3282
|
-
nameLabel = `record._display.${nameField.name}
|
|
3425
|
+
} else if (nameField){
|
|
3426
|
+
nameLabel = `(record._display ? record._display.${nameField.name} : record.${nameField.name})`;
|
|
3283
3427
|
}
|
|
3284
3428
|
return `
|
|
3285
3429
|
if(payload.data.data.length === 0){
|
|
@@ -4662,16 +4806,6 @@ const getSchema$5 = async (uiSchema, ctx) => {
|
|
|
4662
4806
|
data: formSchema
|
|
4663
4807
|
};
|
|
4664
4808
|
`;
|
|
4665
|
-
const onDialogCancelScript = `
|
|
4666
|
-
// 这里加setTimeout是因为amis的Bug,它会先触发cancel事件执行此脚本关闭父窗口然后再关闭子窗口
|
|
4667
|
-
// 正确的顺序应该是先关闭子窗口再关闭父窗口,顺序错了会造成第二次点击新建按钮的时候异常
|
|
4668
|
-
setTimeout(function(){
|
|
4669
|
-
doAction({
|
|
4670
|
-
"actionType": "cancel",
|
|
4671
|
-
"componentId": "object_actions_drawer_${uiSchema.name}"
|
|
4672
|
-
});
|
|
4673
|
-
}, 200);
|
|
4674
|
-
`;
|
|
4675
4809
|
const getSelectedRowsScript = `
|
|
4676
4810
|
const isLookup = event.data.isLookup;
|
|
4677
4811
|
if(isLookup){
|
|
@@ -4761,17 +4895,6 @@ const getSchema$5 = async (uiSchema, ctx) => {
|
|
|
4761
4895
|
"closeOnEsc": false,
|
|
4762
4896
|
"closeOnOutside": false,
|
|
4763
4897
|
"size": "lg",
|
|
4764
|
-
"onEvent": {
|
|
4765
|
-
"cancel": {
|
|
4766
|
-
"actions": [
|
|
4767
|
-
{
|
|
4768
|
-
"actionType": "custom",
|
|
4769
|
-
"script": onDialogCancelScript,
|
|
4770
|
-
"expression": "${window:innerWidth < 768}",
|
|
4771
|
-
}
|
|
4772
|
-
]
|
|
4773
|
-
}
|
|
4774
|
-
},
|
|
4775
4898
|
"actions": [
|
|
4776
4899
|
{
|
|
4777
4900
|
type: 'button',
|
|
@@ -4807,34 +4930,11 @@ const getSchema$5 = async (uiSchema, ctx) => {
|
|
|
4807
4930
|
}
|
|
4808
4931
|
};
|
|
4809
4932
|
|
|
4810
|
-
/*
|
|
4811
|
-
* @Author: baozhoutao@steedos.com
|
|
4812
|
-
* @Date: 2022-07-13 15:18:03
|
|
4813
|
-
* @LastEditors: baozhoutao@steedos.com
|
|
4814
|
-
* @LastEditTime: 2023-04-11 10:34:26
|
|
4815
|
-
* @Description:
|
|
4816
|
-
*/
|
|
4817
|
-
|
|
4818
|
-
async function getPage({type, pageId = '', appId, objectName = '', recordId = '', formFactor = 'LARGE'}){
|
|
4819
|
-
const api = `/api/pageSchema/${type}?app=${appId}&objectApiName=${objectName}&recordId=${recordId}&pageId=${pageId}&formFactor=${formFactor}`;
|
|
4820
|
-
const page = await fetchAPI(api);
|
|
4821
|
-
if (page && page.schema) {
|
|
4822
|
-
page.schema = JSON.parse(page.schema);
|
|
4823
|
-
if(page.schema.data){
|
|
4824
|
-
delete page.schema.data.recordId;
|
|
4825
|
-
delete page.schema.data.objectName;
|
|
4826
|
-
delete page.schema.data.context;
|
|
4827
|
-
delete page.schema.data.global;
|
|
4828
|
-
}
|
|
4829
|
-
return page;
|
|
4830
|
-
}
|
|
4831
|
-
}
|
|
4832
|
-
|
|
4833
4933
|
/*
|
|
4834
4934
|
* @Author: baozhoutao@steedos.com
|
|
4835
4935
|
* @Date: 2022-11-01 15:49:58
|
|
4836
|
-
* @LastEditors:
|
|
4837
|
-
* @LastEditTime:
|
|
4936
|
+
* @LastEditors: yinlianghui@hotoa.com yinlianghui@hotoa.com
|
|
4937
|
+
* @LastEditTime: 2024-05-19 10:01:07
|
|
4838
4938
|
* @Description:
|
|
4839
4939
|
*/
|
|
4840
4940
|
|
|
@@ -4864,16 +4964,6 @@ const getSchema$4 = async (uiSchema, ctx) => {
|
|
|
4864
4964
|
: page.schema;
|
|
4865
4965
|
}
|
|
4866
4966
|
|
|
4867
|
-
const onDialogCancelScript = `
|
|
4868
|
-
// 这里加setTimeout是因为amis的Bug,它会先触发cancel事件执行此脚本关闭父窗口然后再关闭子窗口
|
|
4869
|
-
// 正确的顺序应该是先关闭子窗口再关闭父窗口,顺序错了会造成第二次点击编辑按钮的时候异常
|
|
4870
|
-
setTimeout(function(){
|
|
4871
|
-
doAction({
|
|
4872
|
-
"actionType": "cancel",
|
|
4873
|
-
"componentId": "object_actions_drawer_${uiSchema.name}"
|
|
4874
|
-
});
|
|
4875
|
-
}, 200);
|
|
4876
|
-
`;
|
|
4877
4967
|
|
|
4878
4968
|
return {
|
|
4879
4969
|
type: "service",
|
|
@@ -4896,18 +4986,26 @@ const getSchema$4 = async (uiSchema, ctx) => {
|
|
|
4896
4986
|
closeOnEsc: false,
|
|
4897
4987
|
closeOnOutside: false,
|
|
4898
4988
|
showCloseButton: true,
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
"
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
"actionType": "custom",
|
|
4905
|
-
"script": onDialogCancelScript,
|
|
4906
|
-
"expression": "${window:innerWidth < 768}",
|
|
4907
|
-
}
|
|
4908
|
-
]
|
|
4909
|
-
}
|
|
4989
|
+
"data": {
|
|
4990
|
+
"&": "$$",
|
|
4991
|
+
"_master": "${_master}",
|
|
4992
|
+
"_master._isRelated": "${_isRelated}",
|
|
4993
|
+
"_master.relatedKey": "${relatedKey}"
|
|
4910
4994
|
},
|
|
4995
|
+
size: "lg",
|
|
4996
|
+
"actions": [
|
|
4997
|
+
{
|
|
4998
|
+
type: 'button',
|
|
4999
|
+
actionType: 'cancel',
|
|
5000
|
+
label: i18next.t('frontend_form_cancel')
|
|
5001
|
+
},
|
|
5002
|
+
{
|
|
5003
|
+
type: 'button',
|
|
5004
|
+
actionType: 'confirm',
|
|
5005
|
+
label: i18next.t('frontend_form_save'),
|
|
5006
|
+
primary: true
|
|
5007
|
+
},
|
|
5008
|
+
]
|
|
4911
5009
|
},
|
|
4912
5010
|
},
|
|
4913
5011
|
],
|
|
@@ -5687,6 +5785,100 @@ const getObjectDetailHeaderButtons = (objectSchema, recordId)=>{
|
|
|
5687
5785
|
};
|
|
5688
5786
|
};
|
|
5689
5787
|
|
|
5788
|
+
const getDropdown = (dropdownButtons)=>{
|
|
5789
|
+
const dropdown = {
|
|
5790
|
+
"type": "dropdown-button",
|
|
5791
|
+
"icon": "fa fa-angle-down",
|
|
5792
|
+
"size": "sm",
|
|
5793
|
+
"hideCaret": true,
|
|
5794
|
+
"className": "mr-0 steedos-mobile-header-drop-down",
|
|
5795
|
+
"closeOnClick": true,
|
|
5796
|
+
"menuClassName": "buttons-drawer fixed bg-none border-0 shadow-none",
|
|
5797
|
+
"align": "right",
|
|
5798
|
+
"body": [
|
|
5799
|
+
{
|
|
5800
|
+
"type": "action",
|
|
5801
|
+
"style": {
|
|
5802
|
+
"z-index": 1,
|
|
5803
|
+
"background": "var(--Drawer-overlay-bg)",
|
|
5804
|
+
"height": "100%",
|
|
5805
|
+
"width": "100%",
|
|
5806
|
+
"padding": "0",
|
|
5807
|
+
"margin": "0",
|
|
5808
|
+
"border-radius": "0"
|
|
5809
|
+
}
|
|
5810
|
+
},
|
|
5811
|
+
{
|
|
5812
|
+
"type": "wrapper",
|
|
5813
|
+
"style": {
|
|
5814
|
+
"position": "fixed",
|
|
5815
|
+
"bottom": 0,
|
|
5816
|
+
"z-index": 2,
|
|
5817
|
+
"width": "100vw",
|
|
5818
|
+
"left": "0",
|
|
5819
|
+
"padding": "0",
|
|
5820
|
+
"background": "white",
|
|
5821
|
+
"box-shadow": "0 -10px 10px -10px rgba(0, 0, 0, 0.2)"
|
|
5822
|
+
},
|
|
5823
|
+
"body": [
|
|
5824
|
+
{
|
|
5825
|
+
"type": "flex",
|
|
5826
|
+
"justify": "space-between",
|
|
5827
|
+
"items": [
|
|
5828
|
+
{
|
|
5829
|
+
"type": "tpl",
|
|
5830
|
+
"tpl": "操作",
|
|
5831
|
+
"style": {
|
|
5832
|
+
"padding": "4px 12px",
|
|
5833
|
+
"align-items": "center",
|
|
5834
|
+
"display": "flex"
|
|
5835
|
+
}
|
|
5836
|
+
},
|
|
5837
|
+
{
|
|
5838
|
+
"type": "action",
|
|
5839
|
+
"label": "",
|
|
5840
|
+
"icon": "fa fa-times",
|
|
5841
|
+
"level": "link",
|
|
5842
|
+
"style": {
|
|
5843
|
+
"color": "black"
|
|
5844
|
+
},
|
|
5845
|
+
}
|
|
5846
|
+
],
|
|
5847
|
+
"style": {
|
|
5848
|
+
"padding-top": "0.5rem",
|
|
5849
|
+
"padding-bottom": "0.5rem",
|
|
5850
|
+
"border-bottom": "var(--Drawer-content-borderWidth) solid var(--Drawer-header-borderColor)"
|
|
5851
|
+
}
|
|
5852
|
+
},
|
|
5853
|
+
{
|
|
5854
|
+
"type": "wrapper",
|
|
5855
|
+
"body": [
|
|
5856
|
+
{
|
|
5857
|
+
"type": "button-group",
|
|
5858
|
+
"id": "u:fd837823be5b",
|
|
5859
|
+
"vertical": true,
|
|
5860
|
+
"tiled": true,
|
|
5861
|
+
"buttons": dropdownButtons,
|
|
5862
|
+
"className": "w-full overflow-auto",
|
|
5863
|
+
"btnClassName": "w-full",
|
|
5864
|
+
"size": "lg"
|
|
5865
|
+
}
|
|
5866
|
+
],
|
|
5867
|
+
"style": {
|
|
5868
|
+
"padding": "0",
|
|
5869
|
+
"overflow": "auto",
|
|
5870
|
+
"max-height": "70vh"
|
|
5871
|
+
}
|
|
5872
|
+
}
|
|
5873
|
+
|
|
5874
|
+
]
|
|
5875
|
+
}
|
|
5876
|
+
]
|
|
5877
|
+
};
|
|
5878
|
+
|
|
5879
|
+
return dropdown;
|
|
5880
|
+
};
|
|
5881
|
+
|
|
5690
5882
|
const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
|
|
5691
5883
|
const { buttons, moreButtons, moreButtonsVisibleOn } = getObjectDetailHeaderButtons(objectSchema, recordId);
|
|
5692
5884
|
if(ctx.formFactor === 'SMALL'){
|
|
@@ -5710,46 +5902,7 @@ const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
|
|
|
5710
5902
|
}
|
|
5711
5903
|
});
|
|
5712
5904
|
|
|
5713
|
-
return [
|
|
5714
|
-
{
|
|
5715
|
-
"type": "button",
|
|
5716
|
-
"icon": "fa fa-angle-down",
|
|
5717
|
-
"visibleOn": phoneMoreButtonsVisibleOn,
|
|
5718
|
-
"onEvent": {
|
|
5719
|
-
"click": {
|
|
5720
|
-
"actions": [
|
|
5721
|
-
{
|
|
5722
|
-
"actionType": "drawer",
|
|
5723
|
-
"drawer": {
|
|
5724
|
-
"type": "drawer",
|
|
5725
|
-
"title": i18next.t('frontend_operation'),
|
|
5726
|
-
"id": "object_actions_drawer_" + objectSchema.name,
|
|
5727
|
-
"body": [
|
|
5728
|
-
{
|
|
5729
|
-
"type": "button-group",
|
|
5730
|
-
"id": "u:fd837823be5b",
|
|
5731
|
-
"vertical": true,
|
|
5732
|
-
"tiled": true,
|
|
5733
|
-
"buttons": dropdownButtons,
|
|
5734
|
-
"btnLevel": "enhance",
|
|
5735
|
-
"className": "w-full",
|
|
5736
|
-
"btnClassName": "w-full",
|
|
5737
|
-
"size": "lg"
|
|
5738
|
-
}
|
|
5739
|
-
],
|
|
5740
|
-
"position": "bottom",
|
|
5741
|
-
"closeOnOutside": true,
|
|
5742
|
-
"resizable": false,
|
|
5743
|
-
"className": "buttons-drawer",
|
|
5744
|
-
"bodyClassName": "m-none p-none",
|
|
5745
|
-
"actions": []
|
|
5746
|
-
}
|
|
5747
|
-
}
|
|
5748
|
-
]
|
|
5749
|
-
}
|
|
5750
|
-
}
|
|
5751
|
-
}
|
|
5752
|
-
]
|
|
5905
|
+
return [getDropdown(dropdownButtons)];
|
|
5753
5906
|
}else {
|
|
5754
5907
|
if(moreButtons.length > 0){
|
|
5755
5908
|
const dropdownButtonsSchema = {
|
|
@@ -5770,54 +5923,16 @@ const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
|
|
|
5770
5923
|
const getObjectListViewButtonsSchemas = (objectSchema, ctx)=>{
|
|
5771
5924
|
const buttons = getListViewButtons(objectSchema, ctx);
|
|
5772
5925
|
if(ctx.formFactor === 'SMALL'){
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
{
|
|
5781
|
-
"actionType": "drawer",
|
|
5782
|
-
"drawer": {
|
|
5783
|
-
"type": "drawer",
|
|
5784
|
-
"title": i18next.t('frontend_operation'),
|
|
5785
|
-
"id": "object_actions_drawer_" + objectSchema.name,
|
|
5786
|
-
"body": [
|
|
5787
|
-
{
|
|
5788
|
-
"type": "button-group",
|
|
5789
|
-
"id": "u:fd837823be5b",
|
|
5790
|
-
"vertical": true,
|
|
5791
|
-
"tiled": true,
|
|
5792
|
-
"buttons": [
|
|
5793
|
-
..._$1.map(buttons, (button)=>{
|
|
5794
|
-
return {
|
|
5795
|
-
type: 'steedos-object-button',
|
|
5796
|
-
name: button.name,
|
|
5797
|
-
objectName: button.objectName,
|
|
5798
|
-
visibleOn: getButtonVisibleOn(button),
|
|
5799
|
-
className: `button_${button.name} w-full`
|
|
5800
|
-
}
|
|
5801
|
-
})
|
|
5802
|
-
],
|
|
5803
|
-
"btnLevel": "enhance",
|
|
5804
|
-
"className": "w-full",
|
|
5805
|
-
"btnClassName": "w-full",
|
|
5806
|
-
"size": "lg"
|
|
5807
|
-
}
|
|
5808
|
-
],
|
|
5809
|
-
"position": "bottom",
|
|
5810
|
-
"closeOnOutside": true,
|
|
5811
|
-
"resizable": false,
|
|
5812
|
-
"className": "buttons-drawer",
|
|
5813
|
-
"bodyClassName": "m-none p-none",
|
|
5814
|
-
"actions": []
|
|
5815
|
-
}
|
|
5816
|
-
}
|
|
5817
|
-
]
|
|
5818
|
-
}
|
|
5926
|
+
const dropdownButtons = _$1.map(buttons, (button)=>{
|
|
5927
|
+
return {
|
|
5928
|
+
type: 'steedos-object-button',
|
|
5929
|
+
name: button.name,
|
|
5930
|
+
objectName: button.objectName,
|
|
5931
|
+
visibleOn: getButtonVisibleOn(button),
|
|
5932
|
+
className: `button_${button.name} w-full`
|
|
5819
5933
|
}
|
|
5820
|
-
|
|
5934
|
+
});
|
|
5935
|
+
return getDropdown(dropdownButtons);
|
|
5821
5936
|
}else {
|
|
5822
5937
|
return _$1.map(buttons, (button) => {
|
|
5823
5938
|
return {
|
|
@@ -5834,55 +5949,19 @@ const getObjectListViewButtonsSchemas = (objectSchema, ctx)=>{
|
|
|
5834
5949
|
const getObjectRecordDetailRelatedListButtonsSchemas = (objectSchema, ctx)=>{
|
|
5835
5950
|
const buttons = getObjectRelatedListButtons(objectSchema, ctx);
|
|
5836
5951
|
if(ctx.formFactor === 'SMALL'){
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
"actionType": "drawer",
|
|
5845
|
-
"drawer": {
|
|
5846
|
-
"type": "drawer",
|
|
5847
|
-
"title": i18next.t('frontend_operation'),
|
|
5848
|
-
"id": "object_actions_drawer_" + objectSchema.name,
|
|
5849
|
-
"body": [
|
|
5850
|
-
{
|
|
5851
|
-
"type": "button-group",
|
|
5852
|
-
"vertical": true,
|
|
5853
|
-
"tiled": true,
|
|
5854
|
-
"buttons": [
|
|
5855
|
-
..._$1.map(buttons, (button)=>{
|
|
5856
|
-
return {
|
|
5857
|
-
type: 'steedos-object-button',
|
|
5858
|
-
name: button.name,
|
|
5859
|
-
objectName: button.objectName,
|
|
5860
|
-
visibleOn: getButtonVisibleOn(button),
|
|
5861
|
-
className: `button_${button.name} w-full`
|
|
5862
|
-
}
|
|
5863
|
-
})
|
|
5864
|
-
],
|
|
5865
|
-
"btnLevel": "enhance",
|
|
5866
|
-
"className": "w-full",
|
|
5867
|
-
"btnClassName": "w-full",
|
|
5868
|
-
"size": "lg"
|
|
5869
|
-
}
|
|
5870
|
-
],
|
|
5871
|
-
"position": "bottom",
|
|
5872
|
-
"closeOnOutside": true,
|
|
5873
|
-
"resizable": false,
|
|
5874
|
-
"className": "buttons-drawer",
|
|
5875
|
-
"bodyClassName": "m-none p-none",
|
|
5876
|
-
"actions": []
|
|
5877
|
-
}
|
|
5878
|
-
}
|
|
5879
|
-
]
|
|
5880
|
-
}
|
|
5952
|
+
const dropdownButtons = _$1.map(buttons, (button)=>{
|
|
5953
|
+
return {
|
|
5954
|
+
type: 'steedos-object-button',
|
|
5955
|
+
name: button.name,
|
|
5956
|
+
objectName: button.objectName,
|
|
5957
|
+
visibleOn: getButtonVisibleOn(button),
|
|
5958
|
+
className: `button_${button.name} w-full`
|
|
5881
5959
|
}
|
|
5882
|
-
|
|
5960
|
+
});
|
|
5961
|
+
return [getDropdown(dropdownButtons)];
|
|
5883
5962
|
}else {
|
|
5884
5963
|
return _$1.map(buttons, (button) => {
|
|
5885
|
-
return {
|
|
5964
|
+
return {
|
|
5886
5965
|
type: 'steedos-object-button',
|
|
5887
5966
|
name: button.name,
|
|
5888
5967
|
objectName: button.objectName,
|
|
@@ -6517,6 +6596,217 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
6517
6596
|
};
|
|
6518
6597
|
}
|
|
6519
6598
|
|
|
6599
|
+
const getNewListviewButtonSchema = ()=>{
|
|
6600
|
+
return {
|
|
6601
|
+
"type": "button",
|
|
6602
|
+
"label": i18next.t('frontend_listview_control_new_label'),
|
|
6603
|
+
"className": "steedos-listview-new-button",
|
|
6604
|
+
"onEvent": {
|
|
6605
|
+
"click": {
|
|
6606
|
+
"weight": 0,
|
|
6607
|
+
"actions": [
|
|
6608
|
+
{
|
|
6609
|
+
"dialog": {
|
|
6610
|
+
"type": "dialog",
|
|
6611
|
+
"title": i18next.t('frontend_listview_control_new_title'),
|
|
6612
|
+
"data": {
|
|
6613
|
+
//"&":"$$",2.7、2.9、3.0在此处失效
|
|
6614
|
+
"all": "${uiSchema.list_views.all}",
|
|
6615
|
+
"list_view": "${uiSchema.list_views[listName]}",
|
|
6616
|
+
"appId": "${appId}",
|
|
6617
|
+
"global": "${global}",
|
|
6618
|
+
"targetObjectName": "${objectName}",
|
|
6619
|
+
"context": "${context}"
|
|
6620
|
+
},
|
|
6621
|
+
"body": [
|
|
6622
|
+
{
|
|
6623
|
+
"type": "steedos-object-form",
|
|
6624
|
+
"label": "对象表单",
|
|
6625
|
+
"objectApiName": "object_listviews",
|
|
6626
|
+
"recordId": "",
|
|
6627
|
+
"mode": "edit",
|
|
6628
|
+
"layout": "normal",
|
|
6629
|
+
"defaultData": {
|
|
6630
|
+
"&": "${list_view}",
|
|
6631
|
+
"name":"",
|
|
6632
|
+
"label":"",
|
|
6633
|
+
"filters":"",
|
|
6634
|
+
"shared":false,
|
|
6635
|
+
"object_name": "${targetObjectName}",
|
|
6636
|
+
"_id":"",
|
|
6637
|
+
"shared_to": null,
|
|
6638
|
+
"shared_to_organizations": null,
|
|
6639
|
+
"locked": false,
|
|
6640
|
+
"owner": null,
|
|
6641
|
+
"company_id": null,
|
|
6642
|
+
"company_ids": null,
|
|
6643
|
+
"is_system": false
|
|
6644
|
+
},
|
|
6645
|
+
"fieldsExtend": fieldsExtend$5(),
|
|
6646
|
+
"fields": fields$1(),
|
|
6647
|
+
"onEvent": {
|
|
6648
|
+
"submitSucc": {
|
|
6649
|
+
"weight": 0,
|
|
6650
|
+
"actions": [
|
|
6651
|
+
{
|
|
6652
|
+
"args": {
|
|
6653
|
+
// 直接使用recordId不能拿到数据,只能通过result里面拿数据
|
|
6654
|
+
"url": "${context.rootUrl}/app/${appId}/${targetObjectName}/grid/listview_${result.data.recordId|lowerCase}",
|
|
6655
|
+
"blank": false
|
|
6656
|
+
},
|
|
6657
|
+
"actionType": "url",
|
|
6658
|
+
}
|
|
6659
|
+
]
|
|
6660
|
+
}
|
|
6661
|
+
},
|
|
6662
|
+
"messages": {
|
|
6663
|
+
"success": i18next.t('frontend_listview_control_new_message_success'),
|
|
6664
|
+
"failed": i18next.t('frontend_listview_control_new_message_failed')
|
|
6665
|
+
},
|
|
6666
|
+
}
|
|
6667
|
+
],
|
|
6668
|
+
"showCloseButton": true,
|
|
6669
|
+
"showErrorMsg": true,
|
|
6670
|
+
"showLoading": true,
|
|
6671
|
+
"closeOnEsc": false,
|
|
6672
|
+
"dataMapSwitch": false,
|
|
6673
|
+
"size": "lg"
|
|
6674
|
+
},
|
|
6675
|
+
"actionType": "dialog"
|
|
6676
|
+
}
|
|
6677
|
+
]
|
|
6678
|
+
}
|
|
6679
|
+
}
|
|
6680
|
+
}
|
|
6681
|
+
};
|
|
6682
|
+
|
|
6683
|
+
function fields$1(){
|
|
6684
|
+
return [
|
|
6685
|
+
"label",
|
|
6686
|
+
"name",
|
|
6687
|
+
"object_name",
|
|
6688
|
+
"filter_scope",
|
|
6689
|
+
"show_count",
|
|
6690
|
+
"columns",
|
|
6691
|
+
"sort",
|
|
6692
|
+
"filters",
|
|
6693
|
+
"mobile_columns",
|
|
6694
|
+
"searchable_fields",
|
|
6695
|
+
"is_system",
|
|
6696
|
+
"shared",
|
|
6697
|
+
"shared_to",
|
|
6698
|
+
"shared_to_organizations"
|
|
6699
|
+
]
|
|
6700
|
+
}
|
|
6701
|
+
|
|
6702
|
+
function fieldsExtend$5(){
|
|
6703
|
+
return {
|
|
6704
|
+
"group": "",
|
|
6705
|
+
"label": {
|
|
6706
|
+
"group": "",
|
|
6707
|
+
"is_wide": true
|
|
6708
|
+
},
|
|
6709
|
+
"name": {
|
|
6710
|
+
"group": "",
|
|
6711
|
+
"amis": {
|
|
6712
|
+
"hidden": true,
|
|
6713
|
+
"required": false
|
|
6714
|
+
}
|
|
6715
|
+
},
|
|
6716
|
+
"object_name": {
|
|
6717
|
+
"group": "",
|
|
6718
|
+
"amis": {
|
|
6719
|
+
"hidden": true
|
|
6720
|
+
}
|
|
6721
|
+
},
|
|
6722
|
+
"filter_scope": {
|
|
6723
|
+
"group": "",
|
|
6724
|
+
"amis": {
|
|
6725
|
+
"hidden": true,
|
|
6726
|
+
"required": false
|
|
6727
|
+
}
|
|
6728
|
+
},
|
|
6729
|
+
"columns": {
|
|
6730
|
+
"group": "",
|
|
6731
|
+
"amis": {
|
|
6732
|
+
"hidden": true,
|
|
6733
|
+
"required": false
|
|
6734
|
+
}
|
|
6735
|
+
},
|
|
6736
|
+
"mobile_columns":{
|
|
6737
|
+
"group": "",
|
|
6738
|
+
"amis": {
|
|
6739
|
+
"hidden": true,
|
|
6740
|
+
"required": false
|
|
6741
|
+
}
|
|
6742
|
+
},
|
|
6743
|
+
"searchable_fields":{
|
|
6744
|
+
"group": "",
|
|
6745
|
+
"amis": {
|
|
6746
|
+
"hidden": true,
|
|
6747
|
+
"required": false
|
|
6748
|
+
}
|
|
6749
|
+
},
|
|
6750
|
+
"filter_fields": {
|
|
6751
|
+
"group": "",
|
|
6752
|
+
"amis": {
|
|
6753
|
+
"hidden": true,
|
|
6754
|
+
"required": false
|
|
6755
|
+
}
|
|
6756
|
+
},
|
|
6757
|
+
"scrolling_mode": {
|
|
6758
|
+
"group": "",
|
|
6759
|
+
"amis": {
|
|
6760
|
+
"hidden": true,
|
|
6761
|
+
"required": false
|
|
6762
|
+
}
|
|
6763
|
+
},
|
|
6764
|
+
"sort": {
|
|
6765
|
+
"group": "",
|
|
6766
|
+
"amis": {
|
|
6767
|
+
"hidden": true,
|
|
6768
|
+
"required": false
|
|
6769
|
+
}
|
|
6770
|
+
},
|
|
6771
|
+
"show_count": {
|
|
6772
|
+
"group": "",
|
|
6773
|
+
"amis": {
|
|
6774
|
+
"hidden": true,
|
|
6775
|
+
"required": false
|
|
6776
|
+
}
|
|
6777
|
+
},
|
|
6778
|
+
"type": {
|
|
6779
|
+
"group": "",
|
|
6780
|
+
"amis": {
|
|
6781
|
+
"hidden": true,
|
|
6782
|
+
"required": false
|
|
6783
|
+
}
|
|
6784
|
+
},
|
|
6785
|
+
"shared": {
|
|
6786
|
+
"group": "",
|
|
6787
|
+
"amis": {
|
|
6788
|
+
"visibleOn": "${false}"
|
|
6789
|
+
}
|
|
6790
|
+
},
|
|
6791
|
+
"shared_to": {
|
|
6792
|
+
"group": "",
|
|
6793
|
+
"amis":{
|
|
6794
|
+
"type": "radios",
|
|
6795
|
+
"inline": false
|
|
6796
|
+
}
|
|
6797
|
+
},
|
|
6798
|
+
"shared_to_organizations": {
|
|
6799
|
+
"group": ""
|
|
6800
|
+
},
|
|
6801
|
+
"filters": {
|
|
6802
|
+
"group": "",
|
|
6803
|
+
"amis": {
|
|
6804
|
+
"hidden": true
|
|
6805
|
+
}
|
|
6806
|
+
}
|
|
6807
|
+
}
|
|
6808
|
+
}
|
|
6809
|
+
|
|
6520
6810
|
/**
|
|
6521
6811
|
* 列表视图顶部第一行amisSchema
|
|
6522
6812
|
* @param {*} objectSchema 对象UISchema
|
|
@@ -6526,6 +6816,99 @@ function getObjectListHeaderFirstLine(objectSchema, listViewName, ctx) {
|
|
|
6526
6816
|
const { icon, label } = objectSchema;
|
|
6527
6817
|
const disabled_list_views = objectSchema.permissions.disabled_list_views;
|
|
6528
6818
|
const listViewButtonOptions = [];
|
|
6819
|
+
const initApiAdaptor = `
|
|
6820
|
+
var data;
|
|
6821
|
+
if (recordId) {
|
|
6822
|
+
data = payload.data || { _filters_type_controller: 'conditions' };
|
|
6823
|
+
//数据格式转换
|
|
6824
|
+
if (data) {
|
|
6825
|
+
data.sort = lodash.map(data.sort, (item) => {
|
|
6826
|
+
return item.field_name + ":" + item.order;
|
|
6827
|
+
});
|
|
6828
|
+
data.searchable_fields = lodash.map(data.searchable_fields, 'field');
|
|
6829
|
+
|
|
6830
|
+
if (data.filters && lodash.isString(data.filters)) {
|
|
6831
|
+
try {
|
|
6832
|
+
data.filters = JSON.parse(data.filters);
|
|
6833
|
+
} catch (e) { }
|
|
6834
|
+
}
|
|
6835
|
+
|
|
6836
|
+
if (data.filters && lodash.isString(data.filters)) {
|
|
6837
|
+
data._filters_type_controller = 'function';
|
|
6838
|
+
} else {
|
|
6839
|
+
data._filters_type_controller = 'conditions'
|
|
6840
|
+
}
|
|
6841
|
+
|
|
6842
|
+
if (data._filters_type_controller === 'conditions') {
|
|
6843
|
+
data._filters_conditions = window.amisConvert.filtersToConditions(data.filters || []);
|
|
6844
|
+
} else {
|
|
6845
|
+
data._filters_function = data.filters;
|
|
6846
|
+
}
|
|
6847
|
+
}
|
|
6848
|
+
} else {
|
|
6849
|
+
const uiSchema = api.body.uiSchema;
|
|
6850
|
+
const contextDefaultData = context && context.data && context.data.defaultData; const defaultData = api.body.defaultData || contextDefaultData;
|
|
6851
|
+
let defaultValues = {};
|
|
6852
|
+
_.each(uiSchema && uiSchema.fields, function (field) {
|
|
6853
|
+
var value = SteedosUI.getFieldDefaultValue(field, api.body.global);
|
|
6854
|
+
if (!_.isNil(value)) {
|
|
6855
|
+
defaultValues[field.name] = value;
|
|
6856
|
+
}
|
|
6857
|
+
});
|
|
6858
|
+
if (defaultData && _.isObject(defaultData) && !_.isArray(defaultData)) {
|
|
6859
|
+
data = Object.assign({}, defaultValues, defaultData);
|
|
6860
|
+
}else{data = Object.assign({}, defaultValues) }
|
|
6861
|
+
}
|
|
6862
|
+
for (key in data) {
|
|
6863
|
+
if (data[key] === null) {
|
|
6864
|
+
delete data[key];
|
|
6865
|
+
}
|
|
6866
|
+
}
|
|
6867
|
+
payload.data = data;
|
|
6868
|
+
delete payload.extensions; if (data.is_enable != false) { data.is_enable = true; };
|
|
6869
|
+
return payload;
|
|
6870
|
+
`;
|
|
6871
|
+
const apiRequestAdaptor = `
|
|
6872
|
+
delete formData.created;
|
|
6873
|
+
delete formData.created_by;
|
|
6874
|
+
delete formData.modified;
|
|
6875
|
+
delete formData.modified_by;
|
|
6876
|
+
delete formData._display;
|
|
6877
|
+
|
|
6878
|
+
//数据格式转换
|
|
6879
|
+
formData.sort = lodash.map(formData.sort, (item) => {
|
|
6880
|
+
const arr = item.split(':');
|
|
6881
|
+
return { field_name: arr[0], order: arr[1] };
|
|
6882
|
+
});
|
|
6883
|
+
|
|
6884
|
+
formData.searchable_fields = lodash.map(formData.searchable_fields, (item) => {
|
|
6885
|
+
return { field: item };
|
|
6886
|
+
});
|
|
6887
|
+
|
|
6888
|
+
if (!formData._filters_type_controller) {
|
|
6889
|
+
formData._filters_type_controller = 'conditions';
|
|
6890
|
+
}
|
|
6891
|
+
|
|
6892
|
+
if (formData._filters_type_controller === 'conditions' && formData._filters_conditions) {
|
|
6893
|
+
formData.filters = window.amisConvert.conditionsToFilters(formData._filters_conditions);
|
|
6894
|
+
// formData.filters = JSON.stringify(window.amisConvert.conditionsToFilters(formData._filters_conditions), null, 4);
|
|
6895
|
+
} else {
|
|
6896
|
+
formData.filters = formData._filters_function || null;
|
|
6897
|
+
}
|
|
6898
|
+
|
|
6899
|
+
delete formData._filters_type_controller;
|
|
6900
|
+
delete formData._filters_conditions;
|
|
6901
|
+
delete formData._filters_function;
|
|
6902
|
+
|
|
6903
|
+
query = \`mutation{record: object_listviews__insert(doc: {__saveData}){_id}}\`;
|
|
6904
|
+
if (formData.recordId) {
|
|
6905
|
+
query = \`mutation{record: object_listviews__update(id: "\` + formData._id + \`", doc: {__saveData}){_id}}\`;
|
|
6906
|
+
};
|
|
6907
|
+
__saveData = JSON.stringify(JSON.stringify(formData));
|
|
6908
|
+
|
|
6909
|
+
api.data = { query: query.replace('{__saveData}', __saveData) };
|
|
6910
|
+
return api;
|
|
6911
|
+
`;
|
|
6529
6912
|
each(
|
|
6530
6913
|
objectSchema.list_views,
|
|
6531
6914
|
(listView, name) => {
|
|
@@ -6536,6 +6919,379 @@ function getObjectListHeaderFirstLine(objectSchema, listViewName, ctx) {
|
|
|
6536
6919
|
listViewButtonOptions.push({
|
|
6537
6920
|
type: "button",
|
|
6538
6921
|
label: listView.label,
|
|
6922
|
+
body: [
|
|
6923
|
+
{
|
|
6924
|
+
"type": "flex",
|
|
6925
|
+
"alignItems": "center",
|
|
6926
|
+
"justify": "space-between",
|
|
6927
|
+
"items": [
|
|
6928
|
+
{
|
|
6929
|
+
"type": "tpl",
|
|
6930
|
+
"tpl": listView.label
|
|
6931
|
+
},
|
|
6932
|
+
{
|
|
6933
|
+
"type": "button",
|
|
6934
|
+
"className": "steedos-listview-edit-button ml-3",
|
|
6935
|
+
"icon": "fa fa-edit",
|
|
6936
|
+
"actionType": "dialog",
|
|
6937
|
+
"hiddenOn": `!((global.user.is_space_admin || global.userId == '${listView.owner || ""}') && !!'${listView.owner || ""}')`,
|
|
6938
|
+
"dialog": {
|
|
6939
|
+
"type": "dialog",
|
|
6940
|
+
"title": "编辑 列表视图",
|
|
6941
|
+
"data": {
|
|
6942
|
+
"object_name": "${objectName}",
|
|
6943
|
+
"recordId": listView._id,
|
|
6944
|
+
"listName": "${listName}",
|
|
6945
|
+
"appId": "${appId}",
|
|
6946
|
+
"context": "${context}",
|
|
6947
|
+
"global": "${global}",
|
|
6948
|
+
"_id": listView._id
|
|
6949
|
+
},
|
|
6950
|
+
"body": [
|
|
6951
|
+
{
|
|
6952
|
+
"type": "steedos-object-form",
|
|
6953
|
+
"label": "对象表单",
|
|
6954
|
+
"objectApiName": "object_listviews",
|
|
6955
|
+
"recordId": "${recordId}",
|
|
6956
|
+
"className": "sm:rounded sm:border-gray-300 bg-white",
|
|
6957
|
+
"layout": "horizontal",
|
|
6958
|
+
"form": {
|
|
6959
|
+
"id": "form_object_listviews"
|
|
6960
|
+
},
|
|
6961
|
+
"mode": "edit",
|
|
6962
|
+
"enableTabs": true,
|
|
6963
|
+
"fields": [
|
|
6964
|
+
"label",
|
|
6965
|
+
"sort_no",
|
|
6966
|
+
"crud_mode",
|
|
6967
|
+
"shared",
|
|
6968
|
+
"shared_to",
|
|
6969
|
+
'shared_to_organizations',
|
|
6970
|
+
"columns",
|
|
6971
|
+
"columns.$",
|
|
6972
|
+
"columns.$.field",
|
|
6973
|
+
"columns.$.width",
|
|
6974
|
+
"columns.$.wrap",
|
|
6975
|
+
"mobile_columns",
|
|
6976
|
+
"mobile_columns.$",
|
|
6977
|
+
"mobile_columns.$.field",
|
|
6978
|
+
"sort",
|
|
6979
|
+
"sort.$",
|
|
6980
|
+
"sort.$.field_name",
|
|
6981
|
+
"sort.$.order",
|
|
6982
|
+
"filters",
|
|
6983
|
+
"searchable_fields",
|
|
6984
|
+
"searchable_fields.$",
|
|
6985
|
+
"searchable_fields.$.field",
|
|
6986
|
+
],
|
|
6987
|
+
"tabsMode": "line",
|
|
6988
|
+
"fieldsExtend": {
|
|
6989
|
+
"columns": {
|
|
6990
|
+
"amis": {
|
|
6991
|
+
"showIndex": true,
|
|
6992
|
+
"footerToolbar": [
|
|
6993
|
+
{
|
|
6994
|
+
"type": "button",
|
|
6995
|
+
"label": "${'object_listviews.listview_form.field_set' | t}",
|
|
6996
|
+
"actionType": "dialog",
|
|
6997
|
+
"dialog": {
|
|
6998
|
+
"type": "dialog",
|
|
6999
|
+
"title": "${'object_listviews.listview_form.displayed_columns' | t}",
|
|
7000
|
+
"size": "md",
|
|
7001
|
+
"body": [
|
|
7002
|
+
{
|
|
7003
|
+
"type": "transfer",
|
|
7004
|
+
"options": [
|
|
7005
|
+
],
|
|
7006
|
+
"multiple": true,
|
|
7007
|
+
"id": "u:92c0b3cccca0",
|
|
7008
|
+
"required": true,
|
|
7009
|
+
"placeholder": "-",
|
|
7010
|
+
"className": "col-span-2 m-0",
|
|
7011
|
+
"checkAll": false,
|
|
7012
|
+
"searchable": true,
|
|
7013
|
+
"sortable": true,
|
|
7014
|
+
"itemHeight": 40,
|
|
7015
|
+
"source": {
|
|
7016
|
+
"method": "get",
|
|
7017
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${object_name}/fields/options",
|
|
7018
|
+
"headers": {
|
|
7019
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
7020
|
+
},
|
|
7021
|
+
"requestAdaptor": "",
|
|
7022
|
+
"adaptor": ""
|
|
7023
|
+
},
|
|
7024
|
+
"joinValues": false,
|
|
7025
|
+
"extractValue": true,
|
|
7026
|
+
"name": "columns_quick_select",
|
|
7027
|
+
"value": "${columns|pick:field|split}"
|
|
7028
|
+
}
|
|
7029
|
+
],
|
|
7030
|
+
"onEvent": {
|
|
7031
|
+
"confirm": {
|
|
7032
|
+
"actions": [
|
|
7033
|
+
{
|
|
7034
|
+
"actionType": "custom",
|
|
7035
|
+
"script": "const columns = [];\nconst columns_quick_select = _.cloneDeep(event.data.columns_quick_select);\n_.forEach(columns_quick_select, function (field) {\n const column_field = _.find(event.data.columns, { field });\n if (column_field) {\n columns.push(column_field)\n } else {\n columns.push({\n field\n })\n }\n});\ndoAction({\n \"componentId\": \"form_object_listviews\",\n \"actionType\": \"setValue\",\n \"args\": {\n \"value\": {\n columns\n }\n }\n});"
|
|
7036
|
+
}
|
|
7037
|
+
]
|
|
7038
|
+
}
|
|
7039
|
+
}
|
|
7040
|
+
}
|
|
7041
|
+
}
|
|
7042
|
+
],
|
|
7043
|
+
"addable": false,
|
|
7044
|
+
"draggable": false,
|
|
7045
|
+
"columns": [
|
|
7046
|
+
{
|
|
7047
|
+
"name": "field",
|
|
7048
|
+
"inlineEditMode": false
|
|
7049
|
+
},
|
|
7050
|
+
{
|
|
7051
|
+
"name": "width",
|
|
7052
|
+
"width": 100
|
|
7053
|
+
},
|
|
7054
|
+
{
|
|
7055
|
+
"name": "wrap",
|
|
7056
|
+
"width": 50
|
|
7057
|
+
}
|
|
7058
|
+
],
|
|
7059
|
+
"enableDialog": false
|
|
7060
|
+
}
|
|
7061
|
+
},
|
|
7062
|
+
"sort": {
|
|
7063
|
+
"label": "",
|
|
7064
|
+
"amis": {
|
|
7065
|
+
"type": "tabs-transfer",
|
|
7066
|
+
"options": [
|
|
7067
|
+
],
|
|
7068
|
+
"id": "u:32f3e4e73115",
|
|
7069
|
+
"strictMode": true,
|
|
7070
|
+
"itemHeight": 40,
|
|
7071
|
+
"source": {
|
|
7072
|
+
"method": "get",
|
|
7073
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${object_name}/sortFields/options",
|
|
7074
|
+
"headers": {
|
|
7075
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
7076
|
+
},
|
|
7077
|
+
"data": null,
|
|
7078
|
+
"requestAdaptor": "",
|
|
7079
|
+
"adaptor": "",
|
|
7080
|
+
"sendOn": "!!this.object_name"
|
|
7081
|
+
},
|
|
7082
|
+
"visibleOn": "!!this.object_name",
|
|
7083
|
+
"sortable": true,
|
|
7084
|
+
"className": "col-span-2 m-0",
|
|
7085
|
+
"searchable": true,
|
|
7086
|
+
"checkAll": false,
|
|
7087
|
+
"clearValueOnHidden": false,
|
|
7088
|
+
"joinValues": false,
|
|
7089
|
+
"extractValue": true,
|
|
7090
|
+
"en-US": {
|
|
7091
|
+
"label": "Default Sort Order"
|
|
7092
|
+
},
|
|
7093
|
+
"multiple": true
|
|
7094
|
+
}
|
|
7095
|
+
},
|
|
7096
|
+
"filters": {
|
|
7097
|
+
"label": "",
|
|
7098
|
+
"amis": {
|
|
7099
|
+
"type": "group",
|
|
7100
|
+
"body": [
|
|
7101
|
+
{
|
|
7102
|
+
"type": "radios",
|
|
7103
|
+
"label": "${'object_listviews.listview_form.filter_configuration_method' | t}",
|
|
7104
|
+
"name": "_filters_type_controller",
|
|
7105
|
+
"options": [
|
|
7106
|
+
{
|
|
7107
|
+
"label": "${'object_listviews.listview_form.conditions_combination' | t}",
|
|
7108
|
+
"value": "conditions"
|
|
7109
|
+
},
|
|
7110
|
+
{
|
|
7111
|
+
"label": "${'object_listviews.listview_form.javascript' | t}",
|
|
7112
|
+
"value": "function"
|
|
7113
|
+
}
|
|
7114
|
+
],
|
|
7115
|
+
"id": "u:318671bc196c",
|
|
7116
|
+
"joinValues": true,
|
|
7117
|
+
"className": "col-span-2 m-0",
|
|
7118
|
+
"language": "javascript",
|
|
7119
|
+
"visibleOn": "false",
|
|
7120
|
+
"en-US": {
|
|
7121
|
+
"label": "Controller"
|
|
7122
|
+
}
|
|
7123
|
+
},
|
|
7124
|
+
{
|
|
7125
|
+
"type": "condition-builder",
|
|
7126
|
+
"label": "",
|
|
7127
|
+
"labelClassName": "none",
|
|
7128
|
+
"name": "_filters_conditions",
|
|
7129
|
+
"description": "",
|
|
7130
|
+
"id": "u:a9f2232e30d7",
|
|
7131
|
+
"source": {
|
|
7132
|
+
"method": "get",
|
|
7133
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-listviews/getFilterFields?objectName=${object_name}",
|
|
7134
|
+
"dataType": "json",
|
|
7135
|
+
"headers": {
|
|
7136
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
7137
|
+
}
|
|
7138
|
+
},
|
|
7139
|
+
"disabled": false,
|
|
7140
|
+
"className": "col-span-2 m-0",
|
|
7141
|
+
"visibleOn": "!!this.object_name",
|
|
7142
|
+
"en-US": {
|
|
7143
|
+
"label": "Filters Conditions"
|
|
7144
|
+
}
|
|
7145
|
+
},
|
|
7146
|
+
{
|
|
7147
|
+
"type": "editor",
|
|
7148
|
+
"label": "${'object_listviews.listview_form.javascript' | t}",
|
|
7149
|
+
"name": "_filters_function",
|
|
7150
|
+
"id": "u:84714ec9abba",
|
|
7151
|
+
"visibleOn": "!!this.object_name && !!this._filters_type_controller && _filters_type_controller== 'function'",
|
|
7152
|
+
"className": "col-span-2 m-0",
|
|
7153
|
+
"labelClassName": "hidden"
|
|
7154
|
+
}
|
|
7155
|
+
]
|
|
7156
|
+
}
|
|
7157
|
+
},
|
|
7158
|
+
"mobile_columns": {
|
|
7159
|
+
"amis": {
|
|
7160
|
+
"showIndex": true,
|
|
7161
|
+
"footerToolbar": [
|
|
7162
|
+
{
|
|
7163
|
+
"type": "button",
|
|
7164
|
+
"label": "${'object_listviews.listview_form.field_set' | t}",
|
|
7165
|
+
"actionType": "dialog",
|
|
7166
|
+
"dialog": {
|
|
7167
|
+
"type": "dialog",
|
|
7168
|
+
"title": "${'object_listviews.listview_form.displayed_columns' | t}",
|
|
7169
|
+
"size": "md",
|
|
7170
|
+
"body": [
|
|
7171
|
+
{
|
|
7172
|
+
"type": "transfer",
|
|
7173
|
+
"options": [
|
|
7174
|
+
],
|
|
7175
|
+
"multiple": true,
|
|
7176
|
+
"id": "u:92c0b3cccca0",
|
|
7177
|
+
"required": true,
|
|
7178
|
+
"placeholder": "-",
|
|
7179
|
+
"className": "col-span-2 m-0",
|
|
7180
|
+
"itemHeight": 40,
|
|
7181
|
+
"checkAll": false,
|
|
7182
|
+
"searchable": true,
|
|
7183
|
+
"sortable": true,
|
|
7184
|
+
"source": {
|
|
7185
|
+
"method": "get",
|
|
7186
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${object_name}/fields/options",
|
|
7187
|
+
"headers": {
|
|
7188
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
7189
|
+
},
|
|
7190
|
+
"requestAdaptor": "",
|
|
7191
|
+
"adaptor": ""
|
|
7192
|
+
},
|
|
7193
|
+
"joinValues": false,
|
|
7194
|
+
"extractValue": true,
|
|
7195
|
+
"name": "columns_quick_select",
|
|
7196
|
+
"value": "${mobile_columns|pick:field|split}"
|
|
7197
|
+
}
|
|
7198
|
+
],
|
|
7199
|
+
"onEvent": {
|
|
7200
|
+
"confirm": {
|
|
7201
|
+
"actions": [
|
|
7202
|
+
{
|
|
7203
|
+
"actionType": "custom",
|
|
7204
|
+
"script": "const mobile_columns = [];\nconst columns_quick_select = _.cloneDeep(event.data.columns_quick_select);\n_.forEach(columns_quick_select, function (field) {\n const column_field = _.find(event.data.mobile_columns, { field });\n if (column_field) {\n mobile_columns.push(column_field)\n } else {\n mobile_columns.push({\n field\n })\n }\n});\ndoAction({\n \"componentId\": \"form_object_listviews\",\n \"actionType\": \"setValue\",\n \"args\": {\n \"value\": {\n mobile_columns\n }\n }\n});"
|
|
7205
|
+
}
|
|
7206
|
+
]
|
|
7207
|
+
}
|
|
7208
|
+
}
|
|
7209
|
+
}
|
|
7210
|
+
}
|
|
7211
|
+
],
|
|
7212
|
+
"columns": [
|
|
7213
|
+
{
|
|
7214
|
+
"name": "field",
|
|
7215
|
+
"inlineEditMode": false
|
|
7216
|
+
}
|
|
7217
|
+
],
|
|
7218
|
+
"addable": false,
|
|
7219
|
+
"draggable": false,
|
|
7220
|
+
"enableDialog": false
|
|
7221
|
+
}
|
|
7222
|
+
},
|
|
7223
|
+
"searchable_fields": {
|
|
7224
|
+
"label": "",
|
|
7225
|
+
"amis": {
|
|
7226
|
+
"type": "transfer",
|
|
7227
|
+
"options": [
|
|
7228
|
+
],
|
|
7229
|
+
"selectMode": "list",
|
|
7230
|
+
"searchable": true,
|
|
7231
|
+
"searchApi": "",
|
|
7232
|
+
"sortable": true,
|
|
7233
|
+
"mode": "normal",
|
|
7234
|
+
"searchResultMode": "list",
|
|
7235
|
+
"joinValues": false,
|
|
7236
|
+
"extractValue": true,
|
|
7237
|
+
"itemHeight": 40,
|
|
7238
|
+
"source": {
|
|
7239
|
+
"method": "get",
|
|
7240
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${object_name}/fields/options",
|
|
7241
|
+
"headers": {
|
|
7242
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
7243
|
+
},
|
|
7244
|
+
"data": null,
|
|
7245
|
+
"requestAdaptor": "",
|
|
7246
|
+
"adaptor": "",
|
|
7247
|
+
"sendOn": "!!this.object_name"
|
|
7248
|
+
},
|
|
7249
|
+
"visibleOn": "!!this.object_name",
|
|
7250
|
+
"className": "col-span-2 m-0",
|
|
7251
|
+
"multiple": true,
|
|
7252
|
+
"id": "u:adb91066539e"
|
|
7253
|
+
}
|
|
7254
|
+
},
|
|
7255
|
+
"shared_to": {
|
|
7256
|
+
"amis":{
|
|
7257
|
+
"type": "radios",
|
|
7258
|
+
"inline": false
|
|
7259
|
+
},
|
|
7260
|
+
"group": "",
|
|
7261
|
+
"is_wide": true
|
|
7262
|
+
}
|
|
7263
|
+
},
|
|
7264
|
+
initApiAdaptor,
|
|
7265
|
+
apiRequestAdaptor,
|
|
7266
|
+
"onEvent": {
|
|
7267
|
+
"submitSucc": {
|
|
7268
|
+
"weight": 0,
|
|
7269
|
+
"actions": [
|
|
7270
|
+
{
|
|
7271
|
+
"args": {
|
|
7272
|
+
"url": "${context.rootUrl}/app/${appId}/${object_name}/grid/${name}",
|
|
7273
|
+
"blank": false
|
|
7274
|
+
},
|
|
7275
|
+
"actionType": "url",
|
|
7276
|
+
},
|
|
7277
|
+
]
|
|
7278
|
+
}
|
|
7279
|
+
},
|
|
7280
|
+
"id": "u:ce9e3fcc411a"
|
|
7281
|
+
}
|
|
7282
|
+
],
|
|
7283
|
+
"className": "steedos-overflow-visible-dialog",
|
|
7284
|
+
"showCloseButton": true,
|
|
7285
|
+
"showErrorMsg": true,
|
|
7286
|
+
"showLoading": true,
|
|
7287
|
+
"closeOnEsc": false,
|
|
7288
|
+
"dataMapSwitch": false,
|
|
7289
|
+
"size": "lg"
|
|
7290
|
+
}
|
|
7291
|
+
}
|
|
7292
|
+
]
|
|
7293
|
+
}
|
|
7294
|
+
],
|
|
6539
7295
|
actionType: "link",
|
|
6540
7296
|
link: `/app/\${appId}/${objectSchema.name}/grid/${name}`
|
|
6541
7297
|
});
|
|
@@ -6569,6 +7325,8 @@ function getObjectListHeaderFirstLine(objectSchema, listViewName, ctx) {
|
|
|
6569
7325
|
"visibleOn": "${display == 'split'?true:false}"
|
|
6570
7326
|
});
|
|
6571
7327
|
}
|
|
7328
|
+
const listviewNewButton = getNewListviewButtonSchema();
|
|
7329
|
+
listviewNewButton.visibleOn = "global.user.is_space_admin";
|
|
6572
7330
|
return {
|
|
6573
7331
|
"type": "grid",
|
|
6574
7332
|
"columns": [
|
|
@@ -6599,14 +7357,24 @@ function getObjectListHeaderFirstLine(objectSchema, listViewName, ctx) {
|
|
|
6599
7357
|
},
|
|
6600
7358
|
{
|
|
6601
7359
|
"type": "dropdown-button",
|
|
6602
|
-
"className": "",
|
|
7360
|
+
"className": "steedos-listview-change-button",
|
|
6603
7361
|
"label": "\${listName ? uiSchema.list_views[listName].label : uiSchema.list_views[defaultListName].label}",
|
|
6604
7362
|
"rightIcon": "fa fa-caret-down",
|
|
6605
7363
|
"size": "sm",
|
|
6606
7364
|
"hideCaret": true,
|
|
6607
7365
|
"closeOnClick": true,
|
|
6608
7366
|
"btnClassName": "!bg-transparent !border-none !hover:border-none text-lg h-5 font-bold p-0 text-black leading-none",
|
|
6609
|
-
"buttons":
|
|
7367
|
+
"buttons": [
|
|
7368
|
+
...listViewButtonOptions,
|
|
7369
|
+
{
|
|
7370
|
+
"children": [
|
|
7371
|
+
{
|
|
7372
|
+
"type": "divider"
|
|
7373
|
+
}
|
|
7374
|
+
]
|
|
7375
|
+
},
|
|
7376
|
+
listviewNewButton
|
|
7377
|
+
]
|
|
6610
7378
|
}
|
|
6611
7379
|
],
|
|
6612
7380
|
"md": "",
|
|
@@ -6762,6 +7530,7 @@ function getObjectListHeader$1(objectSchema, listViewName, ctx) {
|
|
|
6762
7530
|
function getBackButtonSchema(){
|
|
6763
7531
|
return {
|
|
6764
7532
|
"type": "service",
|
|
7533
|
+
"className": "steedos-object-record-detail-header-back-button",
|
|
6765
7534
|
"onEvent": {
|
|
6766
7535
|
"@history_paths.changed": {
|
|
6767
7536
|
"actions": [
|
|
@@ -7048,7 +7817,7 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
|
|
|
7048
7817
|
id: `page_readonly_${name}_header`,
|
|
7049
7818
|
name: `page`,
|
|
7050
7819
|
body: body,
|
|
7051
|
-
className:
|
|
7820
|
+
className: "steedos-object-record-detail-header"
|
|
7052
7821
|
}
|
|
7053
7822
|
|
|
7054
7823
|
}
|
|
@@ -7133,216 +7902,6 @@ async function getObjectRecordDetailRelatedListHeader(relatedObjectSchema, relat
|
|
|
7133
7902
|
async function getObjectRelatedListHeader(objectSchema, recordId, relatedObjectName) {
|
|
7134
7903
|
}
|
|
7135
7904
|
|
|
7136
|
-
const getNewListviewButtonSchema = ()=>{
|
|
7137
|
-
return {
|
|
7138
|
-
"type": "button",
|
|
7139
|
-
"label": i18next.t('frontend_listview_control_new_label'),
|
|
7140
|
-
"onEvent": {
|
|
7141
|
-
"click": {
|
|
7142
|
-
"weight": 0,
|
|
7143
|
-
"actions": [
|
|
7144
|
-
{
|
|
7145
|
-
"dialog": {
|
|
7146
|
-
"type": "dialog",
|
|
7147
|
-
"title": i18next.t('frontend_listview_control_new_title'),
|
|
7148
|
-
"data": {
|
|
7149
|
-
//"&":"$$",2.7、2.9、3.0在此处失效
|
|
7150
|
-
"all": "${uiSchema.list_views.all}",
|
|
7151
|
-
"list_view": "${uiSchema.list_views[listName]}",
|
|
7152
|
-
"appId": "${appId}",
|
|
7153
|
-
"global": "${global}",
|
|
7154
|
-
"targetObjectName": "${objectName}",
|
|
7155
|
-
"context": "${context}"
|
|
7156
|
-
},
|
|
7157
|
-
"body": [
|
|
7158
|
-
{
|
|
7159
|
-
"type": "steedos-object-form",
|
|
7160
|
-
"label": "对象表单",
|
|
7161
|
-
"objectApiName": "object_listviews",
|
|
7162
|
-
"recordId": "",
|
|
7163
|
-
"mode": "edit",
|
|
7164
|
-
"layout": "normal",
|
|
7165
|
-
"defaultData": {
|
|
7166
|
-
"&": "${list_view}",
|
|
7167
|
-
"name":"",
|
|
7168
|
-
"label":"",
|
|
7169
|
-
"filters":"",
|
|
7170
|
-
"shared":false,
|
|
7171
|
-
"object_name": "${targetObjectName}",
|
|
7172
|
-
"_id":"",
|
|
7173
|
-
"shared_to": null,
|
|
7174
|
-
"shared_to_organizations": null,
|
|
7175
|
-
"locked": false,
|
|
7176
|
-
"owner": null,
|
|
7177
|
-
"company_id": null,
|
|
7178
|
-
"company_ids": null,
|
|
7179
|
-
"is_system": false
|
|
7180
|
-
},
|
|
7181
|
-
"fieldsExtend": fieldsExtend$5(),
|
|
7182
|
-
"fields": fields$1(),
|
|
7183
|
-
"onEvent": {
|
|
7184
|
-
"submitSucc": {
|
|
7185
|
-
"weight": 0,
|
|
7186
|
-
"actions": [
|
|
7187
|
-
{
|
|
7188
|
-
"args": {
|
|
7189
|
-
// 直接使用recordId不能拿到数据,只能通过result里面拿数据
|
|
7190
|
-
"url": "${context.rootUrl}/app/${appId}/${targetObjectName}/grid/listview_${result.data.recordId|lowerCase}",
|
|
7191
|
-
"blank": false
|
|
7192
|
-
},
|
|
7193
|
-
"actionType": "url",
|
|
7194
|
-
}
|
|
7195
|
-
]
|
|
7196
|
-
}
|
|
7197
|
-
},
|
|
7198
|
-
"messages": {
|
|
7199
|
-
"success": i18next.t('frontend_listview_control_new_message_success'),
|
|
7200
|
-
"failed": i18next.t('frontend_listview_control_new_message_failed')
|
|
7201
|
-
},
|
|
7202
|
-
}
|
|
7203
|
-
],
|
|
7204
|
-
"showCloseButton": true,
|
|
7205
|
-
"showErrorMsg": true,
|
|
7206
|
-
"showLoading": true,
|
|
7207
|
-
"closeOnEsc": false,
|
|
7208
|
-
"dataMapSwitch": false,
|
|
7209
|
-
"size": "lg"
|
|
7210
|
-
},
|
|
7211
|
-
"actionType": "dialog"
|
|
7212
|
-
}
|
|
7213
|
-
]
|
|
7214
|
-
}
|
|
7215
|
-
}
|
|
7216
|
-
}
|
|
7217
|
-
};
|
|
7218
|
-
|
|
7219
|
-
function fields$1(){
|
|
7220
|
-
return [
|
|
7221
|
-
"label",
|
|
7222
|
-
"name",
|
|
7223
|
-
"object_name",
|
|
7224
|
-
"filter_scope",
|
|
7225
|
-
"show_count",
|
|
7226
|
-
"columns",
|
|
7227
|
-
"sort",
|
|
7228
|
-
"filters",
|
|
7229
|
-
"mobile_columns",
|
|
7230
|
-
"searchable_fields",
|
|
7231
|
-
"is_system",
|
|
7232
|
-
"shared",
|
|
7233
|
-
"shared_to",
|
|
7234
|
-
"shared_to_organizations"
|
|
7235
|
-
]
|
|
7236
|
-
}
|
|
7237
|
-
|
|
7238
|
-
function fieldsExtend$5(){
|
|
7239
|
-
return {
|
|
7240
|
-
"group": "",
|
|
7241
|
-
"label": {
|
|
7242
|
-
"group": "",
|
|
7243
|
-
"is_wide": true
|
|
7244
|
-
},
|
|
7245
|
-
"name": {
|
|
7246
|
-
"group": "",
|
|
7247
|
-
"amis": {
|
|
7248
|
-
"hidden": true,
|
|
7249
|
-
"required": false
|
|
7250
|
-
}
|
|
7251
|
-
},
|
|
7252
|
-
"object_name": {
|
|
7253
|
-
"group": "",
|
|
7254
|
-
"amis": {
|
|
7255
|
-
"hidden": true
|
|
7256
|
-
}
|
|
7257
|
-
},
|
|
7258
|
-
"filter_scope": {
|
|
7259
|
-
"group": "",
|
|
7260
|
-
"amis": {
|
|
7261
|
-
"hidden": true,
|
|
7262
|
-
"required": false
|
|
7263
|
-
}
|
|
7264
|
-
},
|
|
7265
|
-
"columns": {
|
|
7266
|
-
"group": "",
|
|
7267
|
-
"amis": {
|
|
7268
|
-
"hidden": true,
|
|
7269
|
-
"required": false
|
|
7270
|
-
}
|
|
7271
|
-
},
|
|
7272
|
-
"mobile_columns":{
|
|
7273
|
-
"group": "",
|
|
7274
|
-
"amis": {
|
|
7275
|
-
"hidden": true,
|
|
7276
|
-
"required": false
|
|
7277
|
-
}
|
|
7278
|
-
},
|
|
7279
|
-
"searchable_fields":{
|
|
7280
|
-
"group": "",
|
|
7281
|
-
"amis": {
|
|
7282
|
-
"hidden": true,
|
|
7283
|
-
"required": false
|
|
7284
|
-
}
|
|
7285
|
-
},
|
|
7286
|
-
"filter_fields": {
|
|
7287
|
-
"group": "",
|
|
7288
|
-
"amis": {
|
|
7289
|
-
"hidden": true,
|
|
7290
|
-
"required": false
|
|
7291
|
-
}
|
|
7292
|
-
},
|
|
7293
|
-
"scrolling_mode": {
|
|
7294
|
-
"group": "",
|
|
7295
|
-
"amis": {
|
|
7296
|
-
"hidden": true,
|
|
7297
|
-
"required": false
|
|
7298
|
-
}
|
|
7299
|
-
},
|
|
7300
|
-
"sort": {
|
|
7301
|
-
"group": "",
|
|
7302
|
-
"amis": {
|
|
7303
|
-
"hidden": true,
|
|
7304
|
-
"required": false
|
|
7305
|
-
}
|
|
7306
|
-
},
|
|
7307
|
-
"show_count": {
|
|
7308
|
-
"group": "",
|
|
7309
|
-
"amis": {
|
|
7310
|
-
"hidden": true,
|
|
7311
|
-
"required": false
|
|
7312
|
-
}
|
|
7313
|
-
},
|
|
7314
|
-
"type": {
|
|
7315
|
-
"group": "",
|
|
7316
|
-
"amis": {
|
|
7317
|
-
"hidden": true,
|
|
7318
|
-
"required": false
|
|
7319
|
-
}
|
|
7320
|
-
},
|
|
7321
|
-
"shared": {
|
|
7322
|
-
"group": "",
|
|
7323
|
-
"amis": {
|
|
7324
|
-
"visibleOn": "${false}"
|
|
7325
|
-
}
|
|
7326
|
-
},
|
|
7327
|
-
"shared_to": {
|
|
7328
|
-
"group": "",
|
|
7329
|
-
"amis":{
|
|
7330
|
-
"type": "radios",
|
|
7331
|
-
"inline": false
|
|
7332
|
-
}
|
|
7333
|
-
},
|
|
7334
|
-
"shared_to_organizations": {
|
|
7335
|
-
"group": ""
|
|
7336
|
-
},
|
|
7337
|
-
"filters": {
|
|
7338
|
-
"group": "",
|
|
7339
|
-
"amis": {
|
|
7340
|
-
"hidden": true
|
|
7341
|
-
}
|
|
7342
|
-
}
|
|
7343
|
-
}
|
|
7344
|
-
}
|
|
7345
|
-
|
|
7346
7905
|
const getCopyListviewButtonSchema = ()=>{
|
|
7347
7906
|
return {
|
|
7348
7907
|
"type": "button",
|
|
@@ -8308,6 +8867,10 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
8308
8867
|
// const scope = event.context.scoped;
|
|
8309
8868
|
// 如果点击过顶部搜索栏表单的取消按钮,会把此处event.data.__super.__super.__super中的搜索表单项的所有字段设置为null
|
|
8310
8869
|
// 点击取消按钮后继续在表单项中输入过滤条件且最后没有点击回车按键或点击表单项搜索按钮的话,在快速搜索中点击回车按钮提交搜索会所顶部搜索表单中的字段值清空
|
|
8870
|
+
let filterForm = SteedosUI.getClosestAmisComponentByType(scope, "form");
|
|
8871
|
+
if(!filterForm){
|
|
8872
|
+
return;
|
|
8873
|
+
}
|
|
8311
8874
|
let isLookup = event.data.isLookup;
|
|
8312
8875
|
let __lookupField = event.data.__lookupField;
|
|
8313
8876
|
let __changedFilterFormValuesKey = "__changedFilterFormValues";
|
|
@@ -8318,9 +8881,8 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
8318
8881
|
}
|
|
8319
8882
|
__changedFilterFormValuesKey += lookupTag;
|
|
8320
8883
|
}
|
|
8321
|
-
let filterForm = SteedosUI.getClosestAmisComponentByType(scope, "form");
|
|
8322
8884
|
setTimeout(function(){
|
|
8323
|
-
filterForm.setValues(event.data[__changedFilterFormValuesKey]);
|
|
8885
|
+
filterForm && filterForm.setValues(event.data[__changedFilterFormValuesKey]);
|
|
8324
8886
|
}, 500);
|
|
8325
8887
|
`;
|
|
8326
8888
|
|
|
@@ -8985,6 +9547,8 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
8985
9547
|
//将_display放入crud的columns的倒数第二列中(最后一列会影响固定列),可以通过setvalue修改行内数据域的_display,而不影响上层items的_display,用于批量编辑
|
|
8986
9548
|
body.columns.splice(body.columns.length -1 , 0, {name: '_display',type: 'static', width: 1, placeholder: "",id: objectSchema.name + "_display_${_index}", tpl: "${''}"});
|
|
8987
9549
|
}
|
|
9550
|
+
// 去除数组中的异常值,如null,undefined等
|
|
9551
|
+
body.columns = ___default.compact(body.columns);
|
|
8988
9552
|
|
|
8989
9553
|
if (defaults) {
|
|
8990
9554
|
const headerSchema = defaults.headerSchema;
|
|
@@ -10167,6 +10731,8 @@ async function convertColumnsToTableFields(columns, uiSchema, ctx = {}) {
|
|
|
10167
10731
|
wrap: column.wrap // wrap = true 是没效果的
|
|
10168
10732
|
}
|
|
10169
10733
|
);
|
|
10734
|
+
} else if (filedInfo && filedInfo.type === 'object') {
|
|
10735
|
+
columnField = uiSchema.fields[column.field];
|
|
10170
10736
|
}
|
|
10171
10737
|
} else {
|
|
10172
10738
|
if (uiSchema.fields[column.field]) {
|
|
@@ -10301,7 +10867,7 @@ async function getRecordDetailSchema(objectName, appId, props = {}){
|
|
|
10301
10867
|
};
|
|
10302
10868
|
const content = {
|
|
10303
10869
|
"type": "tabs",
|
|
10304
|
-
"className": "steedos-record-tabs bg-white p-4 m-2 border rounded",
|
|
10870
|
+
"className": "steedos-record-tabs bg-white p-4 sm:m-2 sm:border sm:rounded",
|
|
10305
10871
|
"contentClassName": "bg-none",
|
|
10306
10872
|
"tabs": [
|
|
10307
10873
|
detailed
|
|
@@ -11408,7 +11974,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
11408
11974
|
}
|
|
11409
11975
|
|
|
11410
11976
|
var fieldFilters = ${JSON.stringify(field.filters)};
|
|
11411
|
-
var currentAmis = amisRequire('amis');
|
|
11977
|
+
var currentAmis = (window.amisRequire && window.amisRequire('amis')) || Amis;
|
|
11412
11978
|
//递归fieldFilters数组,检查每一个元素,判断若是公式,就仅把它解析
|
|
11413
11979
|
function traverseNestedArray(arr) {
|
|
11414
11980
|
for (let i = 0; i < arr.length; i++) {
|
|
@@ -11419,7 +11985,11 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
11419
11985
|
// 如果当前元素不是数组,则处理该元素
|
|
11420
11986
|
// 下面正则用于匹配amis公式\${}
|
|
11421
11987
|
if(/\\\$\\\{([^}]*)\\\}/.test(arr[i])) {
|
|
11422
|
-
|
|
11988
|
+
try{
|
|
11989
|
+
arr[i] = currentAmis.evaluate(arr[i], api.context);
|
|
11990
|
+
}catch(ex){
|
|
11991
|
+
console.error("运行lookup过滤公式时出现错误:",ex);
|
|
11992
|
+
}
|
|
11423
11993
|
}
|
|
11424
11994
|
}
|
|
11425
11995
|
}
|
|
@@ -11580,8 +12150,8 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
11580
12150
|
const isAllowCreate = refObjectConfig.permissions.allowCreate;
|
|
11581
12151
|
const isCreate = _$1.isBoolean(field.create) ? field.create : true;
|
|
11582
12152
|
// lookup字段配置过滤条件就强制不显示新建按钮
|
|
11583
|
-
let
|
|
11584
|
-
if (isAllowCreate && isCreate && !
|
|
12153
|
+
let hasFilters = !_$1.isEmpty(field.filters) || !!field.filtersFunction || !!field._filtersFunction;
|
|
12154
|
+
if (isAllowCreate && isCreate && !hasFilters) {
|
|
11585
12155
|
const new_button = await getSchema$5(refObjectConfig, { appId: ctx.appId, objectName: refObjectConfig.name, formFactor: ctx.formFactor });
|
|
11586
12156
|
new_button.align = "right";
|
|
11587
12157
|
// 保持快速搜索放在最左侧,新建按钮往里插,而不是push到最后
|
|
@@ -11825,7 +12395,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
11825
12395
|
// }
|
|
11826
12396
|
|
|
11827
12397
|
var fieldFilters = ${JSON.stringify(field.filters)};
|
|
11828
|
-
var currentAmis = amisRequire('amis');
|
|
12398
|
+
var currentAmis = (window.amisRequire && window.amisRequire('amis')) || Amis;
|
|
11829
12399
|
//递归fieldFilters数组,检查每一个元素,判断若是公式,就仅把它解析
|
|
11830
12400
|
function traverseNestedArray(arr) {
|
|
11831
12401
|
for (let i = 0; i < arr.length; i++) {
|
|
@@ -11836,7 +12406,11 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
11836
12406
|
// 如果当前元素不是数组,则处理该元素
|
|
11837
12407
|
// 下面正则用于匹配amis公式\${}
|
|
11838
12408
|
if(/\\\$\\\{([^}]*)\\\}/.test(arr[i])) {
|
|
11839
|
-
|
|
12409
|
+
try{
|
|
12410
|
+
arr[i] = currentAmis.evaluate(arr[i], api.context);
|
|
12411
|
+
}catch(ex){
|
|
12412
|
+
console.error("运行lookup过滤公式时出现错误:",ex);
|
|
12413
|
+
}
|
|
11840
12414
|
}
|
|
11841
12415
|
}
|
|
11842
12416
|
}
|
|
@@ -12248,8 +12822,8 @@ if(typeof window != 'undefined'){
|
|
|
12248
12822
|
/*
|
|
12249
12823
|
* @Author: baozhoutao@steedos.com
|
|
12250
12824
|
* @Date: 2023-01-13 17:27:54
|
|
12251
|
-
* @LastEditors:
|
|
12252
|
-
* @LastEditTime: 2024-
|
|
12825
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
12826
|
+
* @LastEditTime: 2024-06-07 13:39:34
|
|
12253
12827
|
* @Description:
|
|
12254
12828
|
*/
|
|
12255
12829
|
|
|
@@ -12286,6 +12860,7 @@ const getMarkdownFieldSchema = (field, readonly, ctx)=>{
|
|
|
12286
12860
|
"name": field.name,
|
|
12287
12861
|
"labelClassName": "none",
|
|
12288
12862
|
"language": "markdown",
|
|
12863
|
+
"options": field.amis ? field.amis.editorOptions : null
|
|
12289
12864
|
}
|
|
12290
12865
|
]
|
|
12291
12866
|
},
|
|
@@ -12942,6 +13517,21 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
12942
13517
|
type: getAmisStaticFieldType('url', readonly, field),
|
|
12943
13518
|
static: readonly ? true : false
|
|
12944
13519
|
};
|
|
13520
|
+
if(!readonly){
|
|
13521
|
+
// amis input-url控件不支持相对路径,这里支持下
|
|
13522
|
+
// 如果要使用amis原生input-url控件的默认的isUrl验证效果或自定义字段validations效果,配置字段的amis.validations属性即可,配置为null或空字符串则使用amis默认的isUrl效果
|
|
13523
|
+
let fieldAmisValidations = field.amis?.validations;
|
|
13524
|
+
if(typeof fieldAmisValidations === "undefined"){
|
|
13525
|
+
Object.assign(convertData, {
|
|
13526
|
+
"validations": {
|
|
13527
|
+
"matchRegexp": "^((http:\\/\\/|https:\\/\\/|ftp:\\/\\/|sftp:\\/\\/)+([^\\s\\/\\.]+(\\.[^\\s\\/\\.]+)+))*(\\/[^\\s\\.\\/]+)*$"
|
|
13528
|
+
},
|
|
13529
|
+
"validationErrors": {
|
|
13530
|
+
"matchRegexp": i18next.t('frontend_form_validation_failed_url')//"URL 格式不正确"
|
|
13531
|
+
}
|
|
13532
|
+
});
|
|
13533
|
+
}
|
|
13534
|
+
}
|
|
12945
13535
|
if(readonly && field.show_as_qr){
|
|
12946
13536
|
convertData = {
|
|
12947
13537
|
type: "control",
|
|
@@ -13007,13 +13597,13 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
13007
13597
|
};
|
|
13008
13598
|
break;
|
|
13009
13599
|
case 'avatar':
|
|
13010
|
-
convertData = getAmisFileSchema(field, readonly);
|
|
13600
|
+
convertData = await getAmisFileSchema(field, readonly, ctx);
|
|
13011
13601
|
break;
|
|
13012
13602
|
case 'image':
|
|
13013
|
-
convertData = getAmisFileSchema(field, readonly);
|
|
13603
|
+
convertData = await getAmisFileSchema(field, readonly, ctx);
|
|
13014
13604
|
break;
|
|
13015
13605
|
case 'file':
|
|
13016
|
-
convertData = getAmisFileSchema(field, readonly);
|
|
13606
|
+
convertData = await getAmisFileSchema(field, readonly, ctx);
|
|
13017
13607
|
break;
|
|
13018
13608
|
case 'formula':
|
|
13019
13609
|
if(readonly){
|
|
@@ -13561,24 +14151,24 @@ async function getFormBody(permissionFields, formFields, ctx){
|
|
|
13561
14151
|
/*
|
|
13562
14152
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
13563
14153
|
* @Date: 2024-01-18 15:12:41
|
|
13564
|
-
* @LastEditors:
|
|
13565
|
-
* @LastEditTime: 2024-
|
|
14154
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
14155
|
+
* @LastEditTime: 2024-05-20 13:46:41
|
|
13566
14156
|
*/
|
|
13567
14157
|
/**
|
|
13568
14158
|
* 生成符合标准uuid格式的36位满足唯一性的随机串
|
|
13569
14159
|
* @returns uuid
|
|
13570
14160
|
*/
|
|
13571
14161
|
function uuidv4() {
|
|
13572
|
-
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c
|
|
13573
|
-
(c ^ window.crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
|
|
13574
|
-
);
|
|
14162
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, function (c) {
|
|
14163
|
+
return (c ^ window.crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16);
|
|
14164
|
+
});
|
|
13575
14165
|
}
|
|
13576
14166
|
|
|
13577
14167
|
/*
|
|
13578
14168
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
13579
14169
|
* @Date: 2023-11-15 09:50:22
|
|
13580
14170
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
13581
|
-
* @LastEditTime: 2024-
|
|
14171
|
+
* @LastEditTime: 2024-06-14 06:31:33
|
|
13582
14172
|
*/
|
|
13583
14173
|
|
|
13584
14174
|
/**
|
|
@@ -13797,7 +14387,8 @@ function getInputTableCell(field, showAsInlineEditMode) {
|
|
|
13797
14387
|
return {
|
|
13798
14388
|
"type": "steedos-field",
|
|
13799
14389
|
"config": Object.assign({}, field, {
|
|
13800
|
-
label: false
|
|
14390
|
+
label: false,
|
|
14391
|
+
description: null
|
|
13801
14392
|
}),
|
|
13802
14393
|
// quickEdit: {
|
|
13803
14394
|
// "type": "steedos-field",
|
|
@@ -13814,7 +14405,8 @@ function getInputTableCell(field, showAsInlineEditMode) {
|
|
|
13814
14405
|
return {
|
|
13815
14406
|
"type": "steedos-field",
|
|
13816
14407
|
"config": Object.assign({}, field, {
|
|
13817
|
-
label: false
|
|
14408
|
+
label: false,
|
|
14409
|
+
description: null
|
|
13818
14410
|
}),
|
|
13819
14411
|
inInputTable: true,
|
|
13820
14412
|
"static": true,
|
|
@@ -14648,6 +15240,7 @@ async function getButtonActions(props, mode) {
|
|
|
14648
15240
|
"__parentForm": mode == "new" ? "$$" : parentFormData,
|
|
14649
15241
|
"_master": "${_master}",
|
|
14650
15242
|
"global": "${global}",
|
|
15243
|
+
"context": "${context}",
|
|
14651
15244
|
"uiSchema": "${uiSchema}",
|
|
14652
15245
|
"index": "${index}",//amis组件自带行索引,在节点嵌套情况下,当前节点如果是children属性下的子节点时,这里的index是当前节点在children中的索引,而不是外层父节点的index
|
|
14653
15246
|
"parent": "${__super.parent}",//amis组件自带父节点数据域数据,即节点嵌套情况下,当前节点为某个节点(比如A节点)的children属性下的子节点时,当前节点的父节点(即A节点)的数据域数据
|
|
@@ -14772,6 +15365,7 @@ async function getButtonActions(props, mode) {
|
|
|
14772
15365
|
"__parentForm": parentFormData,
|
|
14773
15366
|
"_master": "${_master}",
|
|
14774
15367
|
"global": "${global}",
|
|
15368
|
+
"context": "${context}",
|
|
14775
15369
|
"uiSchema": "${uiSchema}",
|
|
14776
15370
|
"index": "${index}",
|
|
14777
15371
|
"parent": "${__super.parent}",//amis组件自带父节点数据域数据,即节点嵌套情况下,当前节点为某个节点(比如A节点)的children属性下的子节点时,当前节点的父节点(即A节点)的数据域数据
|
|
@@ -15058,7 +15652,8 @@ const getAmisInputTableSchema = async (props) => {
|
|
|
15058
15652
|
}
|
|
15059
15653
|
return value;
|
|
15060
15654
|
},
|
|
15061
|
-
"required": props.required
|
|
15655
|
+
"required": props.required,
|
|
15656
|
+
"description": props.description
|
|
15062
15657
|
};
|
|
15063
15658
|
if (buttonsForColumnOperations.length) {
|
|
15064
15659
|
inputTableSchema.columns.unshift({
|
|
@@ -17797,5 +18392,5 @@ const getInstanceInfo = async ({ instanceId, box }) => {
|
|
|
17797
18392
|
};
|
|
17798
18393
|
};
|
|
17799
18394
|
|
|
17800
|
-
export { index as Field, Router, absoluteUrl, amisRender, amisRootClick, cloneObject, conditionsToFilters, createObject, defaultsDeep, deleteVariable, execute, executeButton, extendObject, fetchAPI, filtersToConditions, getAmisInputTableSchema, getApp, getApps, getAuthToken, getAuthorization, getButton, getButtonVisible, getButtonVisibleOn, getButtons, getCalendarSchema, getCreatedInfoTpl, getDateTimeTpl, getDateTpl, getDefaultRenderData, getEnv, getEnvs, getEvn, getField, getFieldTpl, getFileSrc, getFlowFormSchema, getFormPageInitSchema, getFormSchema, getGlobalNowData, getIdsPickerSchema, getImageSrc, getInstanceInfo, getListPageInitSchema, getListSchema, getListViewButtons, getListViewColumns, getListViewFilter, getListViewItemButtons, getListViewSort, getListviewInitSchema, getLocationTpl, getLookupSapceUserTreeSchema, getLookupTpl, getModifiedInfoTpl, getNameTpl, getNameTplUrl, getNotifications, getNumberTpl, getObjectDetailButtons, getObjectDetailButtonsSchemas, getObjectDetailMoreButtons, getObjectFieldsFilterBarSchema, getObjectFieldsFilterButtonSchema, getObjectFieldsFilterFormSchema, getObjectListHeader$1 as getObjectListHeader, getObjectListHeaderFieldsFilterBar, getObjectListHeaderFirstLine, getObjectListHeaderSecordLine, getObjectListViewButtonsSchemas, getObjectRecordDetailHeader, getObjectRecordDetailRelatedListButtonsSchemas, getObjectRecordDetailRelatedListHeader, getObjectRelated, getObjectRelatedList, getObjectRelatedListButtons, getObjectRelatedListHeader, getObjectRelatedListsMiniSchema, getPage, getPasswordTpl, getRecord, getRecordDetailHeaderSchema, getRecordDetailMiniSchema, getRecordDetailRelatedListSchema, getRecordDetailSchema, getRecordPageInitSchema, getRecordPermissions, getRecordServiceSchema, getRefObjectNameFieldName, getReferenceTo, getReferenceToFieldSchema, getReferenceToSync, getRelatedFieldTpl, getRelatedFieldValue, getRelatedListSchema, getRelatedsCount, getRootUrl, getSelectMap, getSelectTpl, getSelectUserSchema, getSpaceUsersPickerAmisSchema, getSpaceUsersPickerSchema, getSteedosAuth, getSwitchTpl, getTableSchema, getTenantId, getTimeTpl, getUISchema, getUISchemaSync$1 as getUISchemaSync, getUiFieldTpl, getUiFileSizeTpl, getUserId, getViewSchema, isExpression, isObject, lookupToAmis, lookupToAmisIdsPicker, lookupToAmisPicker, lookupToAmisSelect, lookupToAmisSelectUser, markReadAll, parseSingleExpression, registerRemoteAssets, registerRenders, setEnv, setEnvs, setRootUrl, setSteedosAuth, setUISchemaFunction, setVariable, standardButtonsTodo };
|
|
18395
|
+
export { index as Field, Router, absoluteUrl, amisRender, amisRootClick, cloneObject, conditionsToFilters, createObject, defaultsDeep, deleteVariable, execute, executeButton, extendObject, fetchAPI, filtersToConditions, getAmisInputTableSchema, getApp, getApps, getAuthToken, getAuthorization, getButton, getButtonVisible, getButtonVisibleOn, getButtons, getCalendarSchema, getCreatedInfoTpl, getDateTimeTpl, getDateTpl, getDefaultRenderData, getEnv, getEnvs, getEvn, getField, getFieldTpl, getFileSrc, getFlowFormSchema, getFormPageInitSchema, getFormSchema, getGlobalNowData, getIdsPickerSchema, getImageSrc, getInstanceInfo, getListPageInitSchema, getListSchema, getListViewButtons, getListViewColumns, getListViewFilter, getListViewItemButtons, getListViewSort, getListviewInitSchema, getLocationTpl, getLookupSapceUserTreeSchema, getLookupTpl, getModifiedInfoTpl, getNameTpl, getNameTplUrl, getNotifications, getNumberTpl, getObjectDetailButtons, getObjectDetailButtonsSchemas, getObjectDetailMoreButtons, getObjectFieldsFilterBarSchema, getObjectFieldsFilterButtonSchema, getObjectFieldsFilterFormSchema, getObjectListHeader$1 as getObjectListHeader, getObjectListHeaderFieldsFilterBar, getObjectListHeaderFirstLine, getObjectListHeaderSecordLine, getObjectListViewButtonsSchemas, getObjectRecordDetailHeader, getObjectRecordDetailRelatedListButtonsSchemas, getObjectRecordDetailRelatedListHeader, getObjectRelated, getObjectRelatedList, getObjectRelatedListButtons, getObjectRelatedListHeader, getObjectRelatedListsMiniSchema, getPage, getPasswordTpl, getRecord, getRecordDetailHeaderSchema, getRecordDetailMiniSchema, getRecordDetailRelatedListSchema, getRecordDetailSchema, getRecordPageInitSchema, getRecordPermissions, getRecordServiceSchema, getRefObjectNameFieldName, getReferenceTo, getReferenceToFieldSchema, getReferenceToSync, getRelatedFieldTpl, getRelatedFieldValue, getRelatedListSchema, getRelatedsCount, getRootUrl, getSelectMap, getSelectTpl, getSelectUserSchema, getSpaceUsersPickerAmisSchema, getSpaceUsersPickerSchema, getSteedosAuth, getSwitchTpl, getTableSchema, getTenantId, getTimeTpl, getUISchema, getUISchemaSync$1 as getUISchemaSync, getUiFieldTpl, getUiFileSizeTpl, getUserId, getViewSchema, isExpression, isObject, lookupToAmis, lookupToAmisIdsPicker, lookupToAmisPicker, lookupToAmisSelect, lookupToAmisSelectUser, markReadAll, parseSingleExpression, registerRemoteAssets, registerRenders, setEnv, setEnvs, setRootUrl, setSteedosAuth, setUISchemaFunction, setVariable, standardButtonsTodo, uuidv4 };
|
|
17801
18396
|
//# sourceMappingURL=index.esm.js.map
|