@steedos-widgets/amis-lib 1.2.15 → 1.2.18
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 +553 -121
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +549 -121
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +555 -125
- package/dist/index.umd.js.map +1 -1
- package/dist/types/i18n.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/converter/amis/header.d.ts +0 -5
- package/dist/types/schema/standard_export_excel.amis.d.ts +32 -0
- package/dist/types/standard/button.d.ts +35 -0
- package/package.json +5 -3
package/dist/index.cjs.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _$1 = require('lodash');
|
|
6
|
+
var i18next = require('i18next');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
6
8
|
var amisLib = require('@steedos-widgets/amis-lib');
|
|
7
9
|
var isPlainObject = require('lodash/isPlainObject');
|
|
8
10
|
|
|
@@ -28,6 +30,7 @@ function _interopNamespace(e) {
|
|
|
28
30
|
|
|
29
31
|
var ___namespace = /*#__PURE__*/_interopNamespace(_$1);
|
|
30
32
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_$1);
|
|
33
|
+
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
31
34
|
var isPlainObject__default = /*#__PURE__*/_interopDefaultLegacy(isPlainObject);
|
|
32
35
|
|
|
33
36
|
/*
|
|
@@ -210,7 +213,7 @@ const amisRender = (root, schema, data = {}, env = {}, options) => {
|
|
|
210
213
|
* @Author: baozhoutao@steedos.com
|
|
211
214
|
* @Date: 2022-07-04 11:24:28
|
|
212
215
|
* @LastEditors: baozhoutao@steedos.com
|
|
213
|
-
* @LastEditTime: 2023-
|
|
216
|
+
* @LastEditTime: 2023-06-12 11:51:15
|
|
214
217
|
* @Description:
|
|
215
218
|
*/
|
|
216
219
|
|
|
@@ -240,7 +243,6 @@ async function fetchAPI(api, options = { credentials: 'include' }) {
|
|
|
240
243
|
|
|
241
244
|
options.headers = Object.assign({}, headers, options.headers);
|
|
242
245
|
options.credentials = 'include';
|
|
243
|
-
|
|
244
246
|
const res = await fetch(`${getRootUrl()}${api}`, options);
|
|
245
247
|
|
|
246
248
|
if(res.status === 401){
|
|
@@ -335,7 +337,7 @@ function getRootUrl(defaultRootUrl){
|
|
|
335
337
|
if(rootUrl){
|
|
336
338
|
return rootUrl
|
|
337
339
|
}
|
|
338
|
-
return defaultRootUrl;
|
|
340
|
+
return defaultRootUrl || '';
|
|
339
341
|
}
|
|
340
342
|
|
|
341
343
|
function setRootUrl(rootUrl){
|
|
@@ -1410,6 +1412,350 @@ const parseSingleExpression = function (func, formData, dataPath, global, userSe
|
|
|
1410
1412
|
}
|
|
1411
1413
|
};
|
|
1412
1414
|
|
|
1415
|
+
var frontend_field_group_generalization$1 = "Generalization";
|
|
1416
|
+
var frontend_download$1 = "Download";
|
|
1417
|
+
var frontend_form_save$1 = "Save";
|
|
1418
|
+
var frontend_form_save_and_new$1 = "Save and New";
|
|
1419
|
+
var frontend_form_cancel$1 = "Cancel";
|
|
1420
|
+
var frontend_form_new$1 = "New";
|
|
1421
|
+
var frontend_form_edit$1 = "Edit";
|
|
1422
|
+
var frontend_form_select$1 = "Select";
|
|
1423
|
+
var frontend_form_confirm$1 = "Confirm";
|
|
1424
|
+
var frontend_form_delete$1 = "Delete";
|
|
1425
|
+
var frontend_form_view$1 = "view";
|
|
1426
|
+
var frontend_delete_confirm_text$1 = "Are you sure you want to delete this item?";
|
|
1427
|
+
var frontend_delete_many_selected_required$1 = "Please select the item to be deleted";
|
|
1428
|
+
var frontend_delete_many_confirm_text$1 = "Are you sure you want to delete?";
|
|
1429
|
+
var frontend_display_type_is_table$1 = "Table";
|
|
1430
|
+
var frontend_display_type_is_split$1 = "Split View";
|
|
1431
|
+
var frontend_display_as$1 = "Displayed as";
|
|
1432
|
+
var frontend_record_sum$1 = "items";
|
|
1433
|
+
var frontend_button_reload_tooltip$1 = "Refresh";
|
|
1434
|
+
var frontend_button_search_tooltip$1 = "Search";
|
|
1435
|
+
var frontend_fields_filter_button_search$1 = "Search";
|
|
1436
|
+
var frontend_fields_filter_button_settings$1 = "Set search options";
|
|
1437
|
+
var frontend_button_listview_control_tooltip$1 = "List View Controls";
|
|
1438
|
+
var frontend_button_listview_control_label$1 = "LIST VIEW CONTROLS";
|
|
1439
|
+
var frontend_listview_control_columns$1 = "Show List";
|
|
1440
|
+
var frontend_listview_control_columns_mobile_group$1 = "Mobile side";
|
|
1441
|
+
var frontend_listview_control_clone_label$1 = "Clone";
|
|
1442
|
+
var frontend_listview_control_clone_title$1 = "Clone List View";
|
|
1443
|
+
var frontend_listview_control_clone_defaultData_label_start$1 = "Copy of";
|
|
1444
|
+
var frontend_listview_control_clone_defaultData_label_end$1 = "";
|
|
1445
|
+
var frontend_listview_control_delete_label$1 = "Delete";
|
|
1446
|
+
var frontend_listview_control_delete_confirm_text$1 = "If you delete this list view it will be permanently removed for all users with access. Are you sure you want to delete?";
|
|
1447
|
+
var frontend_listview_control_delete_message_success$1 = "Deletion successful";
|
|
1448
|
+
var frontend_listview_control_filters$1 = "Filter settings";
|
|
1449
|
+
var frontend_listview_control_filters_fields_extend$1 = "Conditional component 1";
|
|
1450
|
+
var frontend_listview_control_new_label$1 = "New";
|
|
1451
|
+
var frontend_listview_control_new_title$1 = "New List View";
|
|
1452
|
+
var frontend_listview_control_new_message_success$1 = "Success";
|
|
1453
|
+
var frontend_listview_control_new_message_failed$1 = "Failure";
|
|
1454
|
+
var frontend_listview_control_rename_label$1 = "Rename";
|
|
1455
|
+
var frontend_listview_control_rename_title$1 = "Rename List View";
|
|
1456
|
+
var frontend_listview_control_share$1 = "Sharing Settings";
|
|
1457
|
+
var frontend_listview_control_sort$1 = "Default sorting rule";
|
|
1458
|
+
var frontend_export_excel$1 = "Export Excel";
|
|
1459
|
+
var frontend_ercord_operation$1 = "Operation";
|
|
1460
|
+
var frontend_import_data$1 = "Import data";
|
|
1461
|
+
var frontend_import_data_object_name$1 = "Import object";
|
|
1462
|
+
var frontend_import_data_queue_import$1 = "Data import";
|
|
1463
|
+
var frontend_import_data_queue_import_description$1 = "Import description";
|
|
1464
|
+
var frontend_import_data_queue_import_encoding$1 = "Character code";
|
|
1465
|
+
var frontend_import_data_queue_import_template_url$1 = "Import template";
|
|
1466
|
+
var frontend_import_data_file$1 = "Excel file";
|
|
1467
|
+
var frontend_import_data_message_success$1 = "Importing has started...";
|
|
1468
|
+
var frontend_import_data_message_failed$1 = "Import failed";
|
|
1469
|
+
var frontend_record_detail_tab_detailed$1 = "Details";
|
|
1470
|
+
var frontend_record_detail_tab_related$1 = "Related";
|
|
1471
|
+
var frontend_all_apps$1 = "All apps";
|
|
1472
|
+
var frontend_all_projects$1 = "All projects";
|
|
1473
|
+
var frontend_application_launcher$1 = "Application launcher";
|
|
1474
|
+
var frontend_menu$1 = "Menu";
|
|
1475
|
+
var frontend_help$1 = "Help";
|
|
1476
|
+
var frontend_setup$1 = "Setup";
|
|
1477
|
+
var frontend_notifications$1 = "Notifications";
|
|
1478
|
+
var frontend_notifications_allread$1 = "Mark all as read";
|
|
1479
|
+
var frontend_notifications_allread_message$1 = "All marked as read";
|
|
1480
|
+
var frontend_profile$1 = "Profile";
|
|
1481
|
+
var frontend_about$1 = "About";
|
|
1482
|
+
var frontend_log_out$1 = "Log out";
|
|
1483
|
+
var frontend_listview_warning_start$1 = "The current ";
|
|
1484
|
+
var frontend_listview_warning_end$1 = " view does not exist!";
|
|
1485
|
+
var frontend_record_detail_related_list_warning$1 = "Missing parent object, parent record, or related list object property!";
|
|
1486
|
+
var frontend_record_detail_related_lists_warning$1 = "Missing parent object, or parent record property!";
|
|
1487
|
+
var frontend_record_detail_related_lists_info$1 = "No related child tables found";
|
|
1488
|
+
var frontend_calendar_listWeek$1 = "List";
|
|
1489
|
+
var frontend_message_no_permission_to_edit$1 = "You don't have permission to edit this record!";
|
|
1490
|
+
var frontend_message_modification_successful$1 = "Modification successful!";
|
|
1491
|
+
var frontend_message_modification_failed$1 = "Modification failed!";
|
|
1492
|
+
var en_us = {
|
|
1493
|
+
frontend_field_group_generalization: frontend_field_group_generalization$1,
|
|
1494
|
+
frontend_download: frontend_download$1,
|
|
1495
|
+
frontend_form_save: frontend_form_save$1,
|
|
1496
|
+
frontend_form_save_and_new: frontend_form_save_and_new$1,
|
|
1497
|
+
frontend_form_cancel: frontend_form_cancel$1,
|
|
1498
|
+
frontend_form_new: frontend_form_new$1,
|
|
1499
|
+
frontend_form_edit: frontend_form_edit$1,
|
|
1500
|
+
frontend_form_select: frontend_form_select$1,
|
|
1501
|
+
frontend_form_confirm: frontend_form_confirm$1,
|
|
1502
|
+
frontend_form_delete: frontend_form_delete$1,
|
|
1503
|
+
frontend_form_view: frontend_form_view$1,
|
|
1504
|
+
frontend_delete_confirm_text: frontend_delete_confirm_text$1,
|
|
1505
|
+
frontend_delete_many_selected_required: frontend_delete_many_selected_required$1,
|
|
1506
|
+
frontend_delete_many_confirm_text: frontend_delete_many_confirm_text$1,
|
|
1507
|
+
frontend_display_type_is_table: frontend_display_type_is_table$1,
|
|
1508
|
+
frontend_display_type_is_split: frontend_display_type_is_split$1,
|
|
1509
|
+
frontend_display_as: frontend_display_as$1,
|
|
1510
|
+
frontend_record_sum: frontend_record_sum$1,
|
|
1511
|
+
frontend_button_reload_tooltip: frontend_button_reload_tooltip$1,
|
|
1512
|
+
frontend_button_search_tooltip: frontend_button_search_tooltip$1,
|
|
1513
|
+
frontend_fields_filter_button_search: frontend_fields_filter_button_search$1,
|
|
1514
|
+
frontend_fields_filter_button_settings: frontend_fields_filter_button_settings$1,
|
|
1515
|
+
frontend_button_listview_control_tooltip: frontend_button_listview_control_tooltip$1,
|
|
1516
|
+
frontend_button_listview_control_label: frontend_button_listview_control_label$1,
|
|
1517
|
+
frontend_listview_control_columns: frontend_listview_control_columns$1,
|
|
1518
|
+
frontend_listview_control_columns_mobile_group: frontend_listview_control_columns_mobile_group$1,
|
|
1519
|
+
frontend_listview_control_clone_label: frontend_listview_control_clone_label$1,
|
|
1520
|
+
frontend_listview_control_clone_title: frontend_listview_control_clone_title$1,
|
|
1521
|
+
frontend_listview_control_clone_defaultData_label_start: frontend_listview_control_clone_defaultData_label_start$1,
|
|
1522
|
+
frontend_listview_control_clone_defaultData_label_end: frontend_listview_control_clone_defaultData_label_end$1,
|
|
1523
|
+
frontend_listview_control_delete_label: frontend_listview_control_delete_label$1,
|
|
1524
|
+
frontend_listview_control_delete_confirm_text: frontend_listview_control_delete_confirm_text$1,
|
|
1525
|
+
frontend_listview_control_delete_message_success: frontend_listview_control_delete_message_success$1,
|
|
1526
|
+
frontend_listview_control_filters: frontend_listview_control_filters$1,
|
|
1527
|
+
frontend_listview_control_filters_fields_extend: frontend_listview_control_filters_fields_extend$1,
|
|
1528
|
+
frontend_listview_control_new_label: frontend_listview_control_new_label$1,
|
|
1529
|
+
frontend_listview_control_new_title: frontend_listview_control_new_title$1,
|
|
1530
|
+
frontend_listview_control_new_message_success: frontend_listview_control_new_message_success$1,
|
|
1531
|
+
frontend_listview_control_new_message_failed: frontend_listview_control_new_message_failed$1,
|
|
1532
|
+
frontend_listview_control_rename_label: frontend_listview_control_rename_label$1,
|
|
1533
|
+
frontend_listview_control_rename_title: frontend_listview_control_rename_title$1,
|
|
1534
|
+
frontend_listview_control_share: frontend_listview_control_share$1,
|
|
1535
|
+
frontend_listview_control_sort: frontend_listview_control_sort$1,
|
|
1536
|
+
frontend_export_excel: frontend_export_excel$1,
|
|
1537
|
+
frontend_ercord_operation: frontend_ercord_operation$1,
|
|
1538
|
+
frontend_import_data: frontend_import_data$1,
|
|
1539
|
+
frontend_import_data_object_name: frontend_import_data_object_name$1,
|
|
1540
|
+
frontend_import_data_queue_import: frontend_import_data_queue_import$1,
|
|
1541
|
+
frontend_import_data_queue_import_description: frontend_import_data_queue_import_description$1,
|
|
1542
|
+
frontend_import_data_queue_import_encoding: frontend_import_data_queue_import_encoding$1,
|
|
1543
|
+
frontend_import_data_queue_import_template_url: frontend_import_data_queue_import_template_url$1,
|
|
1544
|
+
frontend_import_data_file: frontend_import_data_file$1,
|
|
1545
|
+
frontend_import_data_message_success: frontend_import_data_message_success$1,
|
|
1546
|
+
frontend_import_data_message_failed: frontend_import_data_message_failed$1,
|
|
1547
|
+
frontend_record_detail_tab_detailed: frontend_record_detail_tab_detailed$1,
|
|
1548
|
+
frontend_record_detail_tab_related: frontend_record_detail_tab_related$1,
|
|
1549
|
+
frontend_all_apps: frontend_all_apps$1,
|
|
1550
|
+
frontend_all_projects: frontend_all_projects$1,
|
|
1551
|
+
frontend_application_launcher: frontend_application_launcher$1,
|
|
1552
|
+
frontend_menu: frontend_menu$1,
|
|
1553
|
+
frontend_help: frontend_help$1,
|
|
1554
|
+
frontend_setup: frontend_setup$1,
|
|
1555
|
+
frontend_notifications: frontend_notifications$1,
|
|
1556
|
+
frontend_notifications_allread: frontend_notifications_allread$1,
|
|
1557
|
+
frontend_notifications_allread_message: frontend_notifications_allread_message$1,
|
|
1558
|
+
frontend_profile: frontend_profile$1,
|
|
1559
|
+
frontend_about: frontend_about$1,
|
|
1560
|
+
frontend_log_out: frontend_log_out$1,
|
|
1561
|
+
frontend_listview_warning_start: frontend_listview_warning_start$1,
|
|
1562
|
+
frontend_listview_warning_end: frontend_listview_warning_end$1,
|
|
1563
|
+
frontend_record_detail_related_list_warning: frontend_record_detail_related_list_warning$1,
|
|
1564
|
+
frontend_record_detail_related_lists_warning: frontend_record_detail_related_lists_warning$1,
|
|
1565
|
+
frontend_record_detail_related_lists_info: frontend_record_detail_related_lists_info$1,
|
|
1566
|
+
frontend_calendar_listWeek: frontend_calendar_listWeek$1,
|
|
1567
|
+
frontend_message_no_permission_to_edit: frontend_message_no_permission_to_edit$1,
|
|
1568
|
+
frontend_message_modification_successful: frontend_message_modification_successful$1,
|
|
1569
|
+
frontend_message_modification_failed: frontend_message_modification_failed$1
|
|
1570
|
+
};
|
|
1571
|
+
|
|
1572
|
+
var frontend_field_group_generalization = "通用";
|
|
1573
|
+
var frontend_download = "下载";
|
|
1574
|
+
var frontend_form_save = "保存";
|
|
1575
|
+
var frontend_form_save_and_new = "保存并新建";
|
|
1576
|
+
var frontend_form_cancel = "取消";
|
|
1577
|
+
var frontend_form_new = "新建";
|
|
1578
|
+
var frontend_form_edit = "编辑";
|
|
1579
|
+
var frontend_form_select = "选择";
|
|
1580
|
+
var frontend_form_confirm = "确认";
|
|
1581
|
+
var frontend_form_delete = "删除";
|
|
1582
|
+
var frontend_form_view = "查看";
|
|
1583
|
+
var frontend_delete_confirm_text = "确定要删除此项目?";
|
|
1584
|
+
var frontend_delete_many_selected_required = "请选择要删除的项";
|
|
1585
|
+
var frontend_delete_many_confirm_text = "确定要删除吗?";
|
|
1586
|
+
var frontend_display_type_is_table = "表格";
|
|
1587
|
+
var frontend_display_type_is_split = "分栏视图";
|
|
1588
|
+
var frontend_display_as = "显示为";
|
|
1589
|
+
var frontend_record_sum = "个项目";
|
|
1590
|
+
var frontend_button_reload_tooltip = "刷新";
|
|
1591
|
+
var frontend_button_search_tooltip = "搜索";
|
|
1592
|
+
var frontend_fields_filter_button_search = "搜索";
|
|
1593
|
+
var frontend_fields_filter_button_settings = "设置搜索项";
|
|
1594
|
+
var frontend_button_listview_control_tooltip = "列表视图控制";
|
|
1595
|
+
var frontend_button_listview_control_label = "列表视图控制";
|
|
1596
|
+
var frontend_listview_control_columns = "显示的列";
|
|
1597
|
+
var frontend_listview_control_columns_mobile_group = "手机端";
|
|
1598
|
+
var frontend_listview_control_clone = "复制";
|
|
1599
|
+
var frontend_listview_control_clone_label = "复制";
|
|
1600
|
+
var frontend_listview_control_clone_title = "复制 列表视图";
|
|
1601
|
+
var frontend_listview_control_clone_defaultData_label_start = "";
|
|
1602
|
+
var frontend_listview_control_clone_defaultData_label_end = "的副本";
|
|
1603
|
+
var frontend_listview_control_delete_label = "删除";
|
|
1604
|
+
var frontend_listview_control_delete_confirm_text = "如果您删除此列表视图,该视图将为所有具备访问权限的用户永久删除。是否确定要删除?";
|
|
1605
|
+
var frontend_listview_control_delete_message_success = "删除成功";
|
|
1606
|
+
var frontend_listview_control_filters = "过滤设置";
|
|
1607
|
+
var frontend_listview_control_filters_fields_extend = "条件组件1";
|
|
1608
|
+
var frontend_listview_control_new_label = "新建";
|
|
1609
|
+
var frontend_listview_control_new_title = "新建 列表视图";
|
|
1610
|
+
var frontend_listview_control_new_message_success = "成功";
|
|
1611
|
+
var frontend_listview_control_new_message_failed = "失败";
|
|
1612
|
+
var frontend_listview_control_rename_label = "重命名";
|
|
1613
|
+
var frontend_listview_control_rename_title = "重命名 列表视图";
|
|
1614
|
+
var frontend_listview_control_share = "共享设置";
|
|
1615
|
+
var frontend_listview_control_sort = "默认排序规则";
|
|
1616
|
+
var frontend_export_excel = "导出";
|
|
1617
|
+
var frontend_ercord_operation = "操作";
|
|
1618
|
+
var frontend_import_data = "导入数据";
|
|
1619
|
+
var frontend_import_data_object_name = "导入对象";
|
|
1620
|
+
var frontend_import_data_queue_import = "数据导入";
|
|
1621
|
+
var frontend_import_data_queue_import_description = "导入描述";
|
|
1622
|
+
var frontend_import_data_queue_import_encoding = "字符代码";
|
|
1623
|
+
var frontend_import_data_queue_import_template_url = "导入模板";
|
|
1624
|
+
var frontend_import_data_file = "Excel文件";
|
|
1625
|
+
var frontend_import_data_message_success = "已开始导入...";
|
|
1626
|
+
var frontend_import_data_message_failed = "导入失败";
|
|
1627
|
+
var frontend_record_detail_tab_detailed = "详细";
|
|
1628
|
+
var frontend_record_detail_tab_related = "相关";
|
|
1629
|
+
var frontend_all_apps = "所有应用";
|
|
1630
|
+
var frontend_all_projects = "所有项目";
|
|
1631
|
+
var frontend_application_launcher = "应用程序启动器";
|
|
1632
|
+
var frontend_menu = "菜单";
|
|
1633
|
+
var frontend_help = "帮助";
|
|
1634
|
+
var frontend_setup = "设置";
|
|
1635
|
+
var frontend_notifications = "通知";
|
|
1636
|
+
var frontend_notifications_allread = "全部标记为已读";
|
|
1637
|
+
var frontend_notifications_allread_message = "已全部标记为已读";
|
|
1638
|
+
var frontend_profile = "个人资料";
|
|
1639
|
+
var frontend_about = "关于";
|
|
1640
|
+
var frontend_log_out = "注销";
|
|
1641
|
+
var frontend_listview_warning_start = "当前";
|
|
1642
|
+
var frontend_listview_warning_end = "视图不存在!";
|
|
1643
|
+
var frontend_record_detail_related_list_warning = "缺少父级对象、父级记录或相关列表对象属性!";
|
|
1644
|
+
var frontend_record_detail_related_lists_warning = "缺少父级对象或父级记录属性!";
|
|
1645
|
+
var frontend_record_detail_related_lists_info = "没有相关子表";
|
|
1646
|
+
var frontend_calendar_listWeek = "列表";
|
|
1647
|
+
var frontend_message_no_permission_to_edit = "您没有编辑该记录的权限!";
|
|
1648
|
+
var frontend_message_modification_successful = "修改成功!";
|
|
1649
|
+
var frontend_message_modification_failed = "修改失败!";
|
|
1650
|
+
var zh_cn = {
|
|
1651
|
+
frontend_field_group_generalization: frontend_field_group_generalization,
|
|
1652
|
+
frontend_download: frontend_download,
|
|
1653
|
+
frontend_form_save: frontend_form_save,
|
|
1654
|
+
frontend_form_save_and_new: frontend_form_save_and_new,
|
|
1655
|
+
frontend_form_cancel: frontend_form_cancel,
|
|
1656
|
+
frontend_form_new: frontend_form_new,
|
|
1657
|
+
frontend_form_edit: frontend_form_edit,
|
|
1658
|
+
frontend_form_select: frontend_form_select,
|
|
1659
|
+
frontend_form_confirm: frontend_form_confirm,
|
|
1660
|
+
frontend_form_delete: frontend_form_delete,
|
|
1661
|
+
frontend_form_view: frontend_form_view,
|
|
1662
|
+
frontend_delete_confirm_text: frontend_delete_confirm_text,
|
|
1663
|
+
frontend_delete_many_selected_required: frontend_delete_many_selected_required,
|
|
1664
|
+
frontend_delete_many_confirm_text: frontend_delete_many_confirm_text,
|
|
1665
|
+
frontend_display_type_is_table: frontend_display_type_is_table,
|
|
1666
|
+
frontend_display_type_is_split: frontend_display_type_is_split,
|
|
1667
|
+
frontend_display_as: frontend_display_as,
|
|
1668
|
+
frontend_record_sum: frontend_record_sum,
|
|
1669
|
+
frontend_button_reload_tooltip: frontend_button_reload_tooltip,
|
|
1670
|
+
frontend_button_search_tooltip: frontend_button_search_tooltip,
|
|
1671
|
+
frontend_fields_filter_button_search: frontend_fields_filter_button_search,
|
|
1672
|
+
frontend_fields_filter_button_settings: frontend_fields_filter_button_settings,
|
|
1673
|
+
frontend_button_listview_control_tooltip: frontend_button_listview_control_tooltip,
|
|
1674
|
+
frontend_button_listview_control_label: frontend_button_listview_control_label,
|
|
1675
|
+
frontend_listview_control_columns: frontend_listview_control_columns,
|
|
1676
|
+
frontend_listview_control_columns_mobile_group: frontend_listview_control_columns_mobile_group,
|
|
1677
|
+
frontend_listview_control_clone: frontend_listview_control_clone,
|
|
1678
|
+
frontend_listview_control_clone_label: frontend_listview_control_clone_label,
|
|
1679
|
+
frontend_listview_control_clone_title: frontend_listview_control_clone_title,
|
|
1680
|
+
frontend_listview_control_clone_defaultData_label_start: frontend_listview_control_clone_defaultData_label_start,
|
|
1681
|
+
frontend_listview_control_clone_defaultData_label_end: frontend_listview_control_clone_defaultData_label_end,
|
|
1682
|
+
frontend_listview_control_delete_label: frontend_listview_control_delete_label,
|
|
1683
|
+
frontend_listview_control_delete_confirm_text: frontend_listview_control_delete_confirm_text,
|
|
1684
|
+
frontend_listview_control_delete_message_success: frontend_listview_control_delete_message_success,
|
|
1685
|
+
frontend_listview_control_filters: frontend_listview_control_filters,
|
|
1686
|
+
frontend_listview_control_filters_fields_extend: frontend_listview_control_filters_fields_extend,
|
|
1687
|
+
frontend_listview_control_new_label: frontend_listview_control_new_label,
|
|
1688
|
+
frontend_listview_control_new_title: frontend_listview_control_new_title,
|
|
1689
|
+
frontend_listview_control_new_message_success: frontend_listview_control_new_message_success,
|
|
1690
|
+
frontend_listview_control_new_message_failed: frontend_listview_control_new_message_failed,
|
|
1691
|
+
frontend_listview_control_rename_label: frontend_listview_control_rename_label,
|
|
1692
|
+
frontend_listview_control_rename_title: frontend_listview_control_rename_title,
|
|
1693
|
+
frontend_listview_control_share: frontend_listview_control_share,
|
|
1694
|
+
frontend_listview_control_sort: frontend_listview_control_sort,
|
|
1695
|
+
frontend_export_excel: frontend_export_excel,
|
|
1696
|
+
frontend_ercord_operation: frontend_ercord_operation,
|
|
1697
|
+
frontend_import_data: frontend_import_data,
|
|
1698
|
+
frontend_import_data_object_name: frontend_import_data_object_name,
|
|
1699
|
+
frontend_import_data_queue_import: frontend_import_data_queue_import,
|
|
1700
|
+
frontend_import_data_queue_import_description: frontend_import_data_queue_import_description,
|
|
1701
|
+
frontend_import_data_queue_import_encoding: frontend_import_data_queue_import_encoding,
|
|
1702
|
+
frontend_import_data_queue_import_template_url: frontend_import_data_queue_import_template_url,
|
|
1703
|
+
frontend_import_data_file: frontend_import_data_file,
|
|
1704
|
+
frontend_import_data_message_success: frontend_import_data_message_success,
|
|
1705
|
+
frontend_import_data_message_failed: frontend_import_data_message_failed,
|
|
1706
|
+
frontend_record_detail_tab_detailed: frontend_record_detail_tab_detailed,
|
|
1707
|
+
frontend_record_detail_tab_related: frontend_record_detail_tab_related,
|
|
1708
|
+
frontend_all_apps: frontend_all_apps,
|
|
1709
|
+
frontend_all_projects: frontend_all_projects,
|
|
1710
|
+
frontend_application_launcher: frontend_application_launcher,
|
|
1711
|
+
frontend_menu: frontend_menu,
|
|
1712
|
+
frontend_help: frontend_help,
|
|
1713
|
+
frontend_setup: frontend_setup,
|
|
1714
|
+
frontend_notifications: frontend_notifications,
|
|
1715
|
+
frontend_notifications_allread: frontend_notifications_allread,
|
|
1716
|
+
frontend_notifications_allread_message: frontend_notifications_allread_message,
|
|
1717
|
+
frontend_profile: frontend_profile,
|
|
1718
|
+
frontend_about: frontend_about,
|
|
1719
|
+
frontend_log_out: frontend_log_out,
|
|
1720
|
+
frontend_listview_warning_start: frontend_listview_warning_start,
|
|
1721
|
+
frontend_listview_warning_end: frontend_listview_warning_end,
|
|
1722
|
+
frontend_record_detail_related_list_warning: frontend_record_detail_related_list_warning,
|
|
1723
|
+
frontend_record_detail_related_lists_warning: frontend_record_detail_related_lists_warning,
|
|
1724
|
+
frontend_record_detail_related_lists_info: frontend_record_detail_related_lists_info,
|
|
1725
|
+
frontend_calendar_listWeek: frontend_calendar_listWeek,
|
|
1726
|
+
frontend_message_no_permission_to_edit: frontend_message_no_permission_to_edit,
|
|
1727
|
+
frontend_message_modification_successful: frontend_message_modification_successful,
|
|
1728
|
+
frontend_message_modification_failed: frontend_message_modification_failed
|
|
1729
|
+
};
|
|
1730
|
+
|
|
1731
|
+
const resources = {
|
|
1732
|
+
"en-US": {
|
|
1733
|
+
translation: en_us
|
|
1734
|
+
},
|
|
1735
|
+
"zh-CN": {
|
|
1736
|
+
translation: zh_cn
|
|
1737
|
+
}
|
|
1738
|
+
};
|
|
1739
|
+
var locale = "zh-CN";
|
|
1740
|
+
if (typeof window != 'undefined') {
|
|
1741
|
+
if (window.Builder?.settings.locale == "en-us") {
|
|
1742
|
+
locale = "en-US";
|
|
1743
|
+
} else if (window.Builder?.settings.locale == "zh-cn") {
|
|
1744
|
+
locale = "zh-CN";
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
i18next__default["default"]
|
|
1750
|
+
.use(reactI18next.initReactI18next)
|
|
1751
|
+
.init({
|
|
1752
|
+
resources,
|
|
1753
|
+
lng: locale,
|
|
1754
|
+
interpolation: {
|
|
1755
|
+
escapeValue: false
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
|
|
1413
1759
|
/*
|
|
1414
1760
|
* @Author: baozhoutao@steedos.com
|
|
1415
1761
|
* @Date: 2022-11-01 15:51:00
|
|
@@ -1418,7 +1764,7 @@ const parseSingleExpression = function (func, formData, dataPath, global, userSe
|
|
|
1418
1764
|
* @Description:
|
|
1419
1765
|
*/
|
|
1420
1766
|
|
|
1421
|
-
const getSchema$
|
|
1767
|
+
const getSchema$5 = async (uiSchema, ctx) => {
|
|
1422
1768
|
const schemaApiAdaptor = `
|
|
1423
1769
|
let formSchema = {
|
|
1424
1770
|
"type": "steedos-object-form",
|
|
@@ -1471,7 +1817,7 @@ const getSchema$4 = async (uiSchema, ctx) => {
|
|
|
1471
1817
|
"body": [
|
|
1472
1818
|
{
|
|
1473
1819
|
"type": "button",
|
|
1474
|
-
"label": "
|
|
1820
|
+
"label": i18next__default["default"].t('frontend_form_new'),
|
|
1475
1821
|
"id": "u:standard_new",
|
|
1476
1822
|
"level": "default",
|
|
1477
1823
|
"onEvent": {
|
|
@@ -1497,7 +1843,7 @@ const getSchema$4 = async (uiSchema, ctx) => {
|
|
|
1497
1843
|
"isLookup": "${isLookup}",
|
|
1498
1844
|
"listName": "${listName}"
|
|
1499
1845
|
},
|
|
1500
|
-
"title": "
|
|
1846
|
+
"title":i18next__default["default"].t('frontend_form_new') + " ${uiSchema.label | raw}",
|
|
1501
1847
|
"body": [
|
|
1502
1848
|
{
|
|
1503
1849
|
"type": "service",
|
|
@@ -1530,11 +1876,11 @@ const getSchema$4 = async (uiSchema, ctx) => {
|
|
|
1530
1876
|
{
|
|
1531
1877
|
type: 'button',
|
|
1532
1878
|
actionType: 'cancel',
|
|
1533
|
-
label: "
|
|
1879
|
+
label: i18next__default["default"].t('frontend_form_cancel')
|
|
1534
1880
|
},
|
|
1535
1881
|
{
|
|
1536
1882
|
type: 'button',
|
|
1537
|
-
label: "
|
|
1883
|
+
label: i18next__default["default"].t('frontend_form_save_and_new'),
|
|
1538
1884
|
actionType: 'confirm',
|
|
1539
1885
|
close: false,
|
|
1540
1886
|
id: "confirmAndNew"
|
|
@@ -1542,7 +1888,7 @@ const getSchema$4 = async (uiSchema, ctx) => {
|
|
|
1542
1888
|
{
|
|
1543
1889
|
type: 'button',
|
|
1544
1890
|
actionType: 'confirm',
|
|
1545
|
-
label: "
|
|
1891
|
+
label: i18next__default["default"].t('frontend_form_save'),
|
|
1546
1892
|
primary: true
|
|
1547
1893
|
},
|
|
1548
1894
|
]
|
|
@@ -1592,8 +1938,8 @@ async function getPage({type, pageId = '', appId, objectName = '', recordId = ''
|
|
|
1592
1938
|
* @Description:
|
|
1593
1939
|
*/
|
|
1594
1940
|
|
|
1595
|
-
const getSchema$
|
|
1596
|
-
const title = "
|
|
1941
|
+
const getSchema$4 = async (uiSchema, ctx) => {
|
|
1942
|
+
const title = i18next__default["default"].t('frontend_form_edit') + " " + uiSchema.label;
|
|
1597
1943
|
|
|
1598
1944
|
const defaultFormSchema = {
|
|
1599
1945
|
type: "steedos-object-form",
|
|
@@ -1623,7 +1969,7 @@ const getSchema$3 = async (uiSchema, ctx) => {
|
|
|
1623
1969
|
body: [
|
|
1624
1970
|
{
|
|
1625
1971
|
type: "button",
|
|
1626
|
-
label: "
|
|
1972
|
+
label: i18next__default["default"].t('frontend_form_edit'),
|
|
1627
1973
|
id: "u:standard_edit",
|
|
1628
1974
|
onEvent: {
|
|
1629
1975
|
click: {
|
|
@@ -1660,15 +2006,15 @@ const getSchema$3 = async (uiSchema, ctx) => {
|
|
|
1660
2006
|
* @LastEditors: Please set LastEditors
|
|
1661
2007
|
* @LastEditTime: 2023-04-12 10:35:36
|
|
1662
2008
|
*/
|
|
1663
|
-
const getSchema$
|
|
2009
|
+
const getSchema$3 = (uiSchema)=>{
|
|
1664
2010
|
return {
|
|
1665
2011
|
"type": "service",
|
|
1666
2012
|
"className": "p-0",
|
|
1667
2013
|
"body": [
|
|
1668
2014
|
{
|
|
1669
2015
|
"type": "button",
|
|
1670
|
-
"label": "
|
|
1671
|
-
"confirmText": "
|
|
2016
|
+
"label": i18next__default["default"].t('frontend_form_delete'),
|
|
2017
|
+
"confirmText": i18next__default["default"].t('frontend_delete_many_confirm_text'),
|
|
1672
2018
|
"onEvent": {
|
|
1673
2019
|
"click": {
|
|
1674
2020
|
"actions": [
|
|
@@ -1729,13 +2075,13 @@ const getSchema$2 = (uiSchema)=>{
|
|
|
1729
2075
|
}
|
|
1730
2076
|
};
|
|
1731
2077
|
|
|
1732
|
-
const getSchema$
|
|
2078
|
+
const getSchema$2 = (uiSchema) => {
|
|
1733
2079
|
return {
|
|
1734
2080
|
type: "service",
|
|
1735
2081
|
body: [
|
|
1736
2082
|
{
|
|
1737
2083
|
type: "button",
|
|
1738
|
-
label: "
|
|
2084
|
+
label: i18next__default["default"].t('frontend_import_data'),
|
|
1739
2085
|
id: "u:import_data",
|
|
1740
2086
|
onEvent: {
|
|
1741
2087
|
click: {
|
|
@@ -1748,7 +2094,7 @@ const getSchema$1 = (uiSchema) => {
|
|
|
1748
2094
|
"object_name": "${objectName}"
|
|
1749
2095
|
},
|
|
1750
2096
|
type: "dialog",
|
|
1751
|
-
title: "
|
|
2097
|
+
title: i18next__default["default"].t('frontend_import_data'),
|
|
1752
2098
|
body: [
|
|
1753
2099
|
{
|
|
1754
2100
|
type: "form",
|
|
@@ -1783,12 +2129,12 @@ const getSchema$1 = (uiSchema) => {
|
|
|
1783
2129
|
body: [
|
|
1784
2130
|
{
|
|
1785
2131
|
type: "fieldSet",
|
|
1786
|
-
title: "
|
|
2132
|
+
title: i18next__default["default"].t('frontend_field_group_generalization'),
|
|
1787
2133
|
collapsable: true,
|
|
1788
2134
|
body: [
|
|
1789
2135
|
{
|
|
1790
2136
|
name: "object_name",
|
|
1791
|
-
label: "
|
|
2137
|
+
label: i18next__default["default"].t('frontend_import_data_object_name'),
|
|
1792
2138
|
required: false,
|
|
1793
2139
|
type: "select",
|
|
1794
2140
|
joinValues: false,
|
|
@@ -1824,7 +2170,7 @@ const getSchema$1 = (uiSchema) => {
|
|
|
1824
2170
|
},
|
|
1825
2171
|
{
|
|
1826
2172
|
name: "queue_import",
|
|
1827
|
-
label: "
|
|
2173
|
+
label: i18next__default["default"].t('frontend_import_data_queue_import'),
|
|
1828
2174
|
required: true,
|
|
1829
2175
|
type: "picker",
|
|
1830
2176
|
labelField: "description",
|
|
@@ -1870,7 +2216,7 @@ const getSchema$1 = (uiSchema) => {
|
|
|
1870
2216
|
},
|
|
1871
2217
|
{
|
|
1872
2218
|
name: "description",
|
|
1873
|
-
label: "
|
|
2219
|
+
label: i18next__default["default"].t('frontend_import_data_queue_import_description'),
|
|
1874
2220
|
type: "tpl",
|
|
1875
2221
|
tpl: '<a href="/app/undefined/undefined/view/${undefined}">${description}</a>',
|
|
1876
2222
|
className: "whitespace-nowrap",
|
|
@@ -1878,7 +2224,7 @@ const getSchema$1 = (uiSchema) => {
|
|
|
1878
2224
|
},
|
|
1879
2225
|
{
|
|
1880
2226
|
name: "object_name",
|
|
1881
|
-
label: "
|
|
2227
|
+
label: i18next__default["default"].t('frontend_import_data_object_name'),
|
|
1882
2228
|
type: "tpl",
|
|
1883
2229
|
tpl: '<a href="/app/undefined/${_display.object_name.objectName}/view/${_display.object_name.value}">${_display.object_name.label}</a>',
|
|
1884
2230
|
className: "whitespace-nowrap",
|
|
@@ -1886,7 +2232,7 @@ const getSchema$1 = (uiSchema) => {
|
|
|
1886
2232
|
},
|
|
1887
2233
|
{
|
|
1888
2234
|
name: "encoding",
|
|
1889
|
-
label: "
|
|
2235
|
+
label: i18next__default["default"].t('frontend_import_data_queue_import_encoding'),
|
|
1890
2236
|
type: "tpl",
|
|
1891
2237
|
tpl: "<div>${_display.encoding}</div>",
|
|
1892
2238
|
className: "whitespace-nowrap",
|
|
@@ -1894,12 +2240,12 @@ const getSchema$1 = (uiSchema) => {
|
|
|
1894
2240
|
},
|
|
1895
2241
|
{
|
|
1896
2242
|
name: "template_url",
|
|
1897
|
-
label: "
|
|
2243
|
+
label: i18next__default["default"].t('frontend_import_data_queue_import_template_url'),
|
|
1898
2244
|
type: "button-group",
|
|
1899
2245
|
buttons: [
|
|
1900
2246
|
{
|
|
1901
2247
|
type: "button",
|
|
1902
|
-
label: "
|
|
2248
|
+
label: i18next__default["default"].t('frontend_download'),
|
|
1903
2249
|
visibleOn: "${template_url}",
|
|
1904
2250
|
level: "link",
|
|
1905
2251
|
actionType: "download",
|
|
@@ -1933,7 +2279,7 @@ const getSchema$1 = (uiSchema) => {
|
|
|
1933
2279
|
},
|
|
1934
2280
|
{
|
|
1935
2281
|
name: "file",
|
|
1936
|
-
label: "
|
|
2282
|
+
label: i18next__default["default"].t('frontend_import_data_file'),
|
|
1937
2283
|
required: true,
|
|
1938
2284
|
type: "input-file",
|
|
1939
2285
|
className: "m-1",
|
|
@@ -1989,8 +2335,8 @@ const getSchema$1 = (uiSchema) => {
|
|
|
1989
2335
|
},
|
|
1990
2336
|
},
|
|
1991
2337
|
messages: {
|
|
1992
|
-
success: "
|
|
1993
|
-
failed: "
|
|
2338
|
+
success: i18next__default["default"].t('frontend_import_data_message_success'),
|
|
2339
|
+
failed: i18next__default["default"].t('frontend_import_data_message_failed'),
|
|
1994
2340
|
},
|
|
1995
2341
|
},
|
|
1996
2342
|
actionType: "ajax",
|
|
@@ -2029,14 +2375,15 @@ const getSchema$1 = (uiSchema) => {
|
|
|
2029
2375
|
* @LastEditTime: 2022-11-07 17:12:20
|
|
2030
2376
|
* @Description:
|
|
2031
2377
|
*/
|
|
2032
|
-
|
|
2378
|
+
|
|
2379
|
+
const getSchema$1 = (uiSchema)=>{
|
|
2033
2380
|
return {
|
|
2034
2381
|
"type": "service",
|
|
2035
2382
|
"className": "p-0",
|
|
2036
2383
|
"body": [
|
|
2037
2384
|
{
|
|
2038
2385
|
"type": "button",
|
|
2039
|
-
"label": "
|
|
2386
|
+
"label": i18next__default["default"].t('frontend_form_view'),
|
|
2040
2387
|
"className": "border-none",
|
|
2041
2388
|
"onEvent": {
|
|
2042
2389
|
"click": {
|
|
@@ -2061,6 +2408,94 @@ const getSchema = (uiSchema)=>{
|
|
|
2061
2408
|
}
|
|
2062
2409
|
};
|
|
2063
2410
|
|
|
2411
|
+
const getSchema = async (uiSchema, ctx) => {
|
|
2412
|
+
const requestAdaptor = `
|
|
2413
|
+
// 获取列表视图的属性
|
|
2414
|
+
let uiSchema = api.body.uiSchema;
|
|
2415
|
+
let list_views = uiSchema.list_views;
|
|
2416
|
+
let list_views_name = api.body.listName;
|
|
2417
|
+
let col = list_views[list_views_name].columns;
|
|
2418
|
+
let sort_test = list_views[list_views_name].sort;
|
|
2419
|
+
|
|
2420
|
+
// 获取下载字段
|
|
2421
|
+
let select = [];
|
|
2422
|
+
_.each(col, (col) => {
|
|
2423
|
+
if (col.field == undefined)
|
|
2424
|
+
select.push(col);
|
|
2425
|
+
else select.push(col.field);
|
|
2426
|
+
});
|
|
2427
|
+
|
|
2428
|
+
// 获取排序字段
|
|
2429
|
+
|
|
2430
|
+
let sort = [];
|
|
2431
|
+
_.forEach(sort_test, (sortField) => {
|
|
2432
|
+
if (sortField.field_name == undefined)
|
|
2433
|
+
sort.push(sortField);
|
|
2434
|
+
else sort.push([sortField.field_name, sortField.order]);
|
|
2435
|
+
})
|
|
2436
|
+
|
|
2437
|
+
let orders = [];
|
|
2438
|
+
_.map(sort, (value) => {
|
|
2439
|
+
let order_tmp = [];
|
|
2440
|
+
if (value[1] == "desc")
|
|
2441
|
+
order_tmp = value[0] + ' desc';
|
|
2442
|
+
else
|
|
2443
|
+
order_tmp = value[0];
|
|
2444
|
+
orders.push(order_tmp);
|
|
2445
|
+
});
|
|
2446
|
+
let order = orders.join(',');
|
|
2447
|
+
|
|
2448
|
+
let filename = uiSchema.label + "-" + list_views[list_views_name].label;
|
|
2449
|
+
|
|
2450
|
+
url_tmp = api.url.split('?')[0];
|
|
2451
|
+
api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
|
|
2452
|
+
|
|
2453
|
+
// 判断sort 和 filters
|
|
2454
|
+
if (sort.length > 0) {
|
|
2455
|
+
api.url += "&$orderby=" + order;
|
|
2456
|
+
}
|
|
2457
|
+
let filters = list_views[list_views_name].filters;
|
|
2458
|
+
if (filters && filters.length > 0) {
|
|
2459
|
+
api.url = api.url + "&filters=" + JSON.stringify(filters);
|
|
2460
|
+
}
|
|
2461
|
+
return api;
|
|
2462
|
+
`;
|
|
2463
|
+
return {
|
|
2464
|
+
"type": "service",
|
|
2465
|
+
"body": [{
|
|
2466
|
+
"type": "button",
|
|
2467
|
+
"label": i18next__default["default"].t('frontend_export_excel'),
|
|
2468
|
+
"id": "u:standard_export_excel",
|
|
2469
|
+
"level": "default",
|
|
2470
|
+
"onEvent": {
|
|
2471
|
+
"click": {
|
|
2472
|
+
"weight": 0,
|
|
2473
|
+
"actions": [
|
|
2474
|
+
{
|
|
2475
|
+
"args": {
|
|
2476
|
+
"api": {
|
|
2477
|
+
"url": "${context.rootUrl}/api/record/export/${objectName}",
|
|
2478
|
+
"method": "get",
|
|
2479
|
+
"messages": {},
|
|
2480
|
+
"requestAdaptor": requestAdaptor,
|
|
2481
|
+
"data": {
|
|
2482
|
+
"uiSchema": "${uiSchema}",
|
|
2483
|
+
"listName": "${listName}"
|
|
2484
|
+
},
|
|
2485
|
+
"headers": {
|
|
2486
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
},
|
|
2490
|
+
"actionType": "download"
|
|
2491
|
+
}
|
|
2492
|
+
]
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
}]
|
|
2496
|
+
}
|
|
2497
|
+
};
|
|
2498
|
+
|
|
2064
2499
|
/*
|
|
2065
2500
|
* @Author: baozhoutao@steedos.com
|
|
2066
2501
|
* @Date: 2022-11-01 15:53:07
|
|
@@ -2073,19 +2508,19 @@ const StandardButtons = {
|
|
|
2073
2508
|
getStandardNew: async (uiSchema, ctx)=>{
|
|
2074
2509
|
return {
|
|
2075
2510
|
type: 'amis_button',
|
|
2076
|
-
amis_schema: await getSchema$
|
|
2511
|
+
amis_schema: await getSchema$5(uiSchema)
|
|
2077
2512
|
}
|
|
2078
2513
|
},
|
|
2079
2514
|
getStandardEdit: async (uiSchema, ctx)=>{
|
|
2080
2515
|
return {
|
|
2081
2516
|
type: 'amis_button',
|
|
2082
|
-
amis_schema: await getSchema$
|
|
2517
|
+
amis_schema: await getSchema$4(uiSchema, ctx)
|
|
2083
2518
|
}
|
|
2084
2519
|
},
|
|
2085
2520
|
getStandardDelete: async (uiSchema, ctx)=>{
|
|
2086
2521
|
return {
|
|
2087
2522
|
type: 'amis_button',
|
|
2088
|
-
amis_schema: await getSchema$
|
|
2523
|
+
amis_schema: await getSchema$3(uiSchema)
|
|
2089
2524
|
}
|
|
2090
2525
|
},
|
|
2091
2526
|
getStandardDeleteMany: async (uiSchema, ctx)=>{
|
|
@@ -2107,7 +2542,7 @@ const StandardButtons = {
|
|
|
2107
2542
|
"items": [
|
|
2108
2543
|
{
|
|
2109
2544
|
"position": "top-right",
|
|
2110
|
-
"body": "
|
|
2545
|
+
"body": i18next__default["default"].t('frontend_delete_many_selected_required')
|
|
2111
2546
|
}
|
|
2112
2547
|
]
|
|
2113
2548
|
}
|
|
@@ -2121,10 +2556,16 @@ const StandardButtons = {
|
|
|
2121
2556
|
getStandardImportData: async (uiSchema, ctx)=>{
|
|
2122
2557
|
return {
|
|
2123
2558
|
type: 'amis_button',
|
|
2124
|
-
amis_schema: await getSchema$
|
|
2559
|
+
amis_schema: await getSchema$2()
|
|
2125
2560
|
}
|
|
2126
2561
|
},
|
|
2127
2562
|
getStandardOpenView: async (uiSchema, ctx)=>{
|
|
2563
|
+
return {
|
|
2564
|
+
type: 'amis_button',
|
|
2565
|
+
amis_schema: await getSchema$1()
|
|
2566
|
+
}
|
|
2567
|
+
},
|
|
2568
|
+
getStandardExportExcel: async (uiSchema, ctx)=>{
|
|
2128
2569
|
return {
|
|
2129
2570
|
type: 'amis_button',
|
|
2130
2571
|
amis_schema: await getSchema()
|
|
@@ -2389,6 +2830,16 @@ const getButton = async (objectName, buttonName, ctx)=>{
|
|
|
2389
2830
|
}
|
|
2390
2831
|
}
|
|
2391
2832
|
|
|
2833
|
+
if(button.name === 'standard_export_excel'){
|
|
2834
|
+
return {
|
|
2835
|
+
label: button.label,
|
|
2836
|
+
name: button.name,
|
|
2837
|
+
on: button.on,
|
|
2838
|
+
sort: button.sort,
|
|
2839
|
+
...await StandardButtons.getStandardExportExcel(uiSchema, ctx)
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2392
2843
|
if(button.name === 'standard_open_view'){
|
|
2393
2844
|
return {
|
|
2394
2845
|
label: button.label,
|
|
@@ -2883,7 +3334,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
2883
3334
|
if(_.isEmpty(defaultSearchableFields) && data.uiSchema){
|
|
2884
3335
|
defaultSearchableFields = _.map(
|
|
2885
3336
|
_.sortBy(_.filter(_.values(data.uiSchema.fields), (field) => {
|
|
2886
|
-
return field.
|
|
3337
|
+
return field.filterable;
|
|
2887
3338
|
}), "sort_no"),
|
|
2888
3339
|
"name"
|
|
2889
3340
|
);
|
|
@@ -3050,7 +3501,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3050
3501
|
{
|
|
3051
3502
|
"type": "button",
|
|
3052
3503
|
"id": btnSearchId,
|
|
3053
|
-
"label": "
|
|
3504
|
+
"label": i18next__default["default"].t('frontend_fields_filter_button_search'),
|
|
3054
3505
|
"icon": "fa fa-search",
|
|
3055
3506
|
// "visibleOn": "this.filterFormSearchableFields && this.filterFormSearchableFields.length",
|
|
3056
3507
|
"onEvent": {
|
|
@@ -3066,7 +3517,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3066
3517
|
},
|
|
3067
3518
|
{
|
|
3068
3519
|
"type": "button",
|
|
3069
|
-
"label": "
|
|
3520
|
+
"label": i18next__default["default"].t('frontend_form_cancel'),
|
|
3070
3521
|
"name": "btn_filter_form_cancel",
|
|
3071
3522
|
// "visibleOn": "this.filterFormSearchableFields && this.filterFormSearchableFields.length",
|
|
3072
3523
|
"onEvent": {
|
|
@@ -3082,7 +3533,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3082
3533
|
},
|
|
3083
3534
|
{
|
|
3084
3535
|
"type": "button",
|
|
3085
|
-
"label": "
|
|
3536
|
+
"label": i18next__default["default"].t('frontend_fields_filter_button_settings'),
|
|
3086
3537
|
"onEvent": {
|
|
3087
3538
|
"click": {
|
|
3088
3539
|
"actions": [
|
|
@@ -3091,7 +3542,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3091
3542
|
"dialog": {
|
|
3092
3543
|
"type": "dialog",
|
|
3093
3544
|
"size": "md",
|
|
3094
|
-
"title": "
|
|
3545
|
+
"title": i18next__default["default"].t('frontend_fields_filter_button_settings'),
|
|
3095
3546
|
"body": [
|
|
3096
3547
|
{
|
|
3097
3548
|
"type": "form",
|
|
@@ -3159,7 +3610,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3159
3610
|
"actions": [
|
|
3160
3611
|
{
|
|
3161
3612
|
"type": "button",
|
|
3162
|
-
"label": "
|
|
3613
|
+
"label": i18next__default["default"].t('frontend_form_cancel'),
|
|
3163
3614
|
"onEvent": {
|
|
3164
3615
|
"click": {
|
|
3165
3616
|
"actions": [
|
|
@@ -3175,7 +3626,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3175
3626
|
},
|
|
3176
3627
|
{
|
|
3177
3628
|
"type": "button",
|
|
3178
|
-
"label": "
|
|
3629
|
+
"label": i18next__default["default"].t('frontend_form_confirm'),
|
|
3179
3630
|
"onEvent": {
|
|
3180
3631
|
"click": {
|
|
3181
3632
|
"actions": [
|
|
@@ -3692,7 +4143,7 @@ const getExportExcelToolbarButtonSchema = ()=>{
|
|
|
3692
4143
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
3693
4144
|
"tooltipPlacement": "bottom",
|
|
3694
4145
|
"visibleOn": "${!isLookup && global.user.is_space_admin}",
|
|
3695
|
-
"tooltip": "
|
|
4146
|
+
"tooltip": i18next__default["default"].t('frontend_export_excel'),
|
|
3696
4147
|
"onEvent": {
|
|
3697
4148
|
"click": {
|
|
3698
4149
|
"weight": 0,
|
|
@@ -3778,7 +4229,7 @@ function requestAdaptor$1(){
|
|
|
3778
4229
|
const getNewListviewButtonSchema = ()=>{
|
|
3779
4230
|
return {
|
|
3780
4231
|
"type": "button",
|
|
3781
|
-
"label": "
|
|
4232
|
+
"label": i18next__default["default"].t('frontend_listview_control_new_label'),
|
|
3782
4233
|
"onEvent": {
|
|
3783
4234
|
"click": {
|
|
3784
4235
|
"weight": 0,
|
|
@@ -3786,7 +4237,7 @@ const getNewListviewButtonSchema = ()=>{
|
|
|
3786
4237
|
{
|
|
3787
4238
|
"dialog": {
|
|
3788
4239
|
"type": "dialog",
|
|
3789
|
-
"title": "
|
|
4240
|
+
"title": i18next__default["default"].t('frontend_listview_control_new_title'),
|
|
3790
4241
|
"data": {
|
|
3791
4242
|
//"&":"$$",2.7、2.9、3.0在此处失效
|
|
3792
4243
|
"all": "${uiSchema.list_views.all}",
|
|
@@ -3828,8 +4279,8 @@ const getNewListviewButtonSchema = ()=>{
|
|
|
3828
4279
|
}
|
|
3829
4280
|
},
|
|
3830
4281
|
"messages": {
|
|
3831
|
-
"success": "
|
|
3832
|
-
"failed": "
|
|
4282
|
+
"success": i18next__default["default"].t('frontend_listview_control_new_message_success'),
|
|
4283
|
+
"failed": i18next__default["default"].t('frontend_listview_control_new_message_failed')
|
|
3833
4284
|
},
|
|
3834
4285
|
}
|
|
3835
4286
|
],
|
|
@@ -3928,7 +4379,7 @@ function fieldsExtend$4(){
|
|
|
3928
4379
|
const getCopyListviewButtonSchema = ()=>{
|
|
3929
4380
|
return {
|
|
3930
4381
|
"type": "button",
|
|
3931
|
-
"label": "
|
|
4382
|
+
"label": i18next__default["default"].t('frontend_listview_control_clone_label'),
|
|
3932
4383
|
"onEvent": {
|
|
3933
4384
|
"click": {
|
|
3934
4385
|
"weight": 0,
|
|
@@ -3936,7 +4387,7 @@ const getCopyListviewButtonSchema = ()=>{
|
|
|
3936
4387
|
{
|
|
3937
4388
|
"dialog": {
|
|
3938
4389
|
"type": "dialog",
|
|
3939
|
-
"title": "
|
|
4390
|
+
"title": i18next__default["default"].t('frontend_listview_control_clone_title'),
|
|
3940
4391
|
"data": {
|
|
3941
4392
|
//"&":"$$",2.7、2.9、3.0在此处失效
|
|
3942
4393
|
"listName": "${listName}",
|
|
@@ -3956,7 +4407,7 @@ const getCopyListviewButtonSchema = ()=>{
|
|
|
3956
4407
|
"defaultData": {
|
|
3957
4408
|
"&": "${list_view}",
|
|
3958
4409
|
"name":"",
|
|
3959
|
-
"label": "${list_view.label}
|
|
4410
|
+
"label": i18next__default["default"].t('frontend_listview_control_clone_defaultData_label_start') + " ${list_view.label} " + i18next__default["default"].t('frontend_listview_control_clone_defaultData_label_end'),
|
|
3960
4411
|
"shared":false
|
|
3961
4412
|
},
|
|
3962
4413
|
"fieldsExtend": fieldsExtend$3(),
|
|
@@ -4073,7 +4524,7 @@ function fieldsExtend$3(){
|
|
|
4073
4524
|
const getRenameListviewButtonSchema = ()=>{
|
|
4074
4525
|
return {
|
|
4075
4526
|
"type": "button",
|
|
4076
|
-
"label": "
|
|
4527
|
+
"label": i18next__default["default"].t('frontend_listview_control_rename_label'),
|
|
4077
4528
|
"disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
|
|
4078
4529
|
"onEvent": {
|
|
4079
4530
|
"click": {
|
|
@@ -4082,7 +4533,7 @@ const getRenameListviewButtonSchema = ()=>{
|
|
|
4082
4533
|
{
|
|
4083
4534
|
"dialog": {
|
|
4084
4535
|
"type": "dialog",
|
|
4085
|
-
"title": "
|
|
4536
|
+
"title": i18next__default["default"].t('frontend_listview_control_rename_title'),
|
|
4086
4537
|
"data": {
|
|
4087
4538
|
"targetObjectName": "${objectName}",
|
|
4088
4539
|
"recordId": "${uiSchema.list_views[listName]._id}",
|
|
@@ -4132,7 +4583,7 @@ const getRenameListviewButtonSchema = ()=>{
|
|
|
4132
4583
|
const getSetListviewShareButtonSchema = ()=>{
|
|
4133
4584
|
return {
|
|
4134
4585
|
"type": "button",
|
|
4135
|
-
"label": "
|
|
4586
|
+
"label": i18next__default["default"].t('frontend_listview_control_share'),
|
|
4136
4587
|
"disabledOn": "!(global.user.is_space_admin && !!uiSchema.list_views[listName].owner)",
|
|
4137
4588
|
"onEvent": {
|
|
4138
4589
|
"click": {
|
|
@@ -4141,7 +4592,7 @@ const getSetListviewShareButtonSchema = ()=>{
|
|
|
4141
4592
|
{
|
|
4142
4593
|
"dialog": {
|
|
4143
4594
|
"type": "dialog",
|
|
4144
|
-
"title": "
|
|
4595
|
+
"title": i18next__default["default"].t('frontend_listview_control_share'),
|
|
4145
4596
|
"data": {
|
|
4146
4597
|
"recordId": "${uiSchema.list_views[listName]._id}",
|
|
4147
4598
|
"context": "${context}"
|
|
@@ -4176,7 +4627,7 @@ const getSetListviewShareButtonSchema = ()=>{
|
|
|
4176
4627
|
const getSetListviewFiltersButtonSchema = ()=>{
|
|
4177
4628
|
return {
|
|
4178
4629
|
"type": "button",
|
|
4179
|
-
"label": "
|
|
4630
|
+
"label": i18next__default["default"].t('frontend_listview_control_filters'),
|
|
4180
4631
|
"disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
|
|
4181
4632
|
"onEvent": {
|
|
4182
4633
|
"click": {
|
|
@@ -4185,7 +4636,7 @@ const getSetListviewFiltersButtonSchema = ()=>{
|
|
|
4185
4636
|
{
|
|
4186
4637
|
"dialog": {
|
|
4187
4638
|
"type": "dialog",
|
|
4188
|
-
"title": "
|
|
4639
|
+
"title": i18next__default["default"].t('frontend_listview_control_filters'),
|
|
4189
4640
|
"data": {
|
|
4190
4641
|
"targetObjectName": "${objectName}",
|
|
4191
4642
|
"recordId": "${uiSchema.list_views[listName]._id}",
|
|
@@ -4306,7 +4757,7 @@ function fieldsExtend$2(){
|
|
|
4306
4757
|
"visible_on": "true",
|
|
4307
4758
|
"amis": {
|
|
4308
4759
|
"type": "condition-builder",
|
|
4309
|
-
"label": "
|
|
4760
|
+
"label": i18next__default["default"].t('frontend_listview_control_filters_fields_extend'),
|
|
4310
4761
|
"source": {
|
|
4311
4762
|
"method": "get",
|
|
4312
4763
|
"url": "${context.rootUrl}/service/api/amis-metadata-listviews/getFilterFields?objectName=${targetObjectName}",
|
|
@@ -4323,7 +4774,7 @@ function fieldsExtend$2(){
|
|
|
4323
4774
|
const getSetListviewColumnsButtonSchema = ()=>{
|
|
4324
4775
|
return {
|
|
4325
4776
|
"type": "button",
|
|
4326
|
-
"label": "
|
|
4777
|
+
"label": i18next__default["default"].t('frontend_listview_control_columns'),
|
|
4327
4778
|
"disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
|
|
4328
4779
|
"onEvent": {
|
|
4329
4780
|
"click": {
|
|
@@ -4333,7 +4784,7 @@ const getSetListviewColumnsButtonSchema = ()=>{
|
|
|
4333
4784
|
"args": {},
|
|
4334
4785
|
"dialog": {
|
|
4335
4786
|
"type": "dialog",
|
|
4336
|
-
"title": "
|
|
4787
|
+
"title": i18next__default["default"].t('frontend_listview_control_columns'),
|
|
4337
4788
|
"data": {
|
|
4338
4789
|
//"&":"$$",2.7、2.9、3.0在此处失效
|
|
4339
4790
|
"targetObjectName": "${objectName}",
|
|
@@ -4403,7 +4854,7 @@ function fieldsExtend$1(){
|
|
|
4403
4854
|
}
|
|
4404
4855
|
},
|
|
4405
4856
|
"mobile_columns": {
|
|
4406
|
-
"group": "
|
|
4857
|
+
"group": i18next__default["default"].t('frontend_listview_control_columns_mobile_group'),
|
|
4407
4858
|
"amis": {
|
|
4408
4859
|
"type": "transfer",
|
|
4409
4860
|
"sortable": true,
|
|
@@ -4478,7 +4929,7 @@ function apiRequestAdaptor$1(){
|
|
|
4478
4929
|
const getSetListviewSortButtonSchema = ()=>{
|
|
4479
4930
|
return {
|
|
4480
4931
|
"type": "button",
|
|
4481
|
-
"label": "
|
|
4932
|
+
"label": i18next__default["default"].t('frontend_listview_control_sort'),
|
|
4482
4933
|
"disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
|
|
4483
4934
|
"onEvent": {
|
|
4484
4935
|
"click": {
|
|
@@ -4487,7 +4938,7 @@ const getSetListviewSortButtonSchema = ()=>{
|
|
|
4487
4938
|
{
|
|
4488
4939
|
"dialog": {
|
|
4489
4940
|
"type": "dialog",
|
|
4490
|
-
"title": "
|
|
4941
|
+
"title": i18next__default["default"].t('frontend_listview_control_sort'),
|
|
4491
4942
|
"data": {
|
|
4492
4943
|
//"&":"$$",2.7、2.9、3.0在此处失效
|
|
4493
4944
|
"targetObjectName": "${objectName}",
|
|
@@ -4603,9 +5054,9 @@ function apiRequestAdaptor(){
|
|
|
4603
5054
|
const getDeleteListviewButtonSchema = ()=>{
|
|
4604
5055
|
return {
|
|
4605
5056
|
"type": "button",
|
|
4606
|
-
"label": "
|
|
5057
|
+
"label": i18next__default["default"].t('frontend_listview_control_delete_label'),
|
|
4607
5058
|
"disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
|
|
4608
|
-
"confirmText": "
|
|
5059
|
+
"confirmText": i18next__default["default"].t('frontend_listview_control_delete_confirm_text'),
|
|
4609
5060
|
"onEvent": {
|
|
4610
5061
|
"click": {
|
|
4611
5062
|
"actions": [
|
|
@@ -4624,7 +5075,7 @@ const getDeleteListviewButtonSchema = ()=>{
|
|
|
4624
5075
|
"recordId": "${uiSchema.list_views[listName]._id}"
|
|
4625
5076
|
},
|
|
4626
5077
|
"messages": {
|
|
4627
|
-
"success": "
|
|
5078
|
+
"success": i18next__default["default"].t('frontend_listview_control_delete_message_success')
|
|
4628
5079
|
},
|
|
4629
5080
|
"requestAdaptor": requestAdaptor(),
|
|
4630
5081
|
"adaptor": adaptor(),
|
|
@@ -4671,13 +5122,13 @@ const getSettingListviewToolbarButtonSchema = ()=>{
|
|
|
4671
5122
|
"type": "dropdown-button",
|
|
4672
5123
|
"trigger": "click",
|
|
4673
5124
|
"icon": "fa fa-cog",
|
|
4674
|
-
"tooltip": "
|
|
5125
|
+
"tooltip": i18next__default["default"].t('frontend_button_listview_control_tooltip'),
|
|
4675
5126
|
"btnClassName": "antd-Button--iconOnly bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
4676
5127
|
"align": "right",
|
|
4677
5128
|
"visibleOn": "${!isLookup}",
|
|
4678
5129
|
"buttons": [
|
|
4679
5130
|
{
|
|
4680
|
-
"label": "
|
|
5131
|
+
"label": i18next__default["default"].t('frontend_button_listview_control_label'),
|
|
4681
5132
|
"children": [
|
|
4682
5133
|
getNewListviewButtonSchema(),
|
|
4683
5134
|
getCopyListviewButtonSchema(),
|
|
@@ -4698,30 +5149,30 @@ const getDisplayAsButton = function(objectName, showDisplayAs){
|
|
|
4698
5149
|
let buttons = [
|
|
4699
5150
|
{
|
|
4700
5151
|
"type": "button",
|
|
4701
|
-
"label": "
|
|
5152
|
+
"label": i18next__default["default"].t('frontend_display_type_is_table'),
|
|
4702
5153
|
"onClick": "let url = document.location.pathname; var urlSearch = new URLSearchParams(document.location.search); if(urlSearch.get(\"side_object\") && urlSearch.get(\"side_listview_id\")){url=`/app/${props.data.appId}/${urlSearch.get(\"side_object\")}/grid/${urlSearch.get(\"side_listview_id\")}`;}; props.env.jumpTo(url + '?display=grid');",
|
|
4703
5154
|
"rightIcon": displayAs != 'split' ? "fa fa-check" : null,
|
|
4704
5155
|
"rightIconClassName": "m-l-sm"
|
|
4705
5156
|
},
|
|
4706
5157
|
{
|
|
4707
5158
|
"type": "button",
|
|
4708
|
-
"label": "
|
|
5159
|
+
"label": i18next__default["default"].t('frontend_display_type_is_split'),
|
|
4709
5160
|
"onClick": "const url = document.location.pathname + '?display=split'; props.env.jumpTo(url);",
|
|
4710
5161
|
"rightIcon": displayAs === 'split' ? "fa fa-check" : null,
|
|
4711
5162
|
"rightIconClassName": "m-l-sm"
|
|
4712
5163
|
}
|
|
4713
5164
|
];
|
|
4714
|
-
const displayAsLabel = displayAs === 'split'? "
|
|
5165
|
+
const displayAsLabel = displayAs === 'split'? i18next__default["default"].t('frontend_display_type_is_split') : i18next__default["default"].t('frontend_display_type_is_table');
|
|
4715
5166
|
return {
|
|
4716
5167
|
"type": "dropdown-button",
|
|
4717
5168
|
"icon": "fa fa-table-columns",
|
|
4718
|
-
"tooltip":
|
|
5169
|
+
"tooltip": `${i18next__default["default"].t('frontend_display_as')} ${displayAsLabel}`,
|
|
4719
5170
|
"btnClassName": "antd-Button--iconOnly bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
4720
5171
|
"align": "right",
|
|
4721
5172
|
"visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
|
|
4722
5173
|
"buttons": [
|
|
4723
5174
|
{
|
|
4724
|
-
"label": "
|
|
5175
|
+
"label": i18next__default["default"].t('frontend_display_as'),
|
|
4725
5176
|
"children": buttons
|
|
4726
5177
|
}
|
|
4727
5178
|
]
|
|
@@ -4789,13 +5240,13 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
|
|
|
4789
5240
|
...(headerToolbarItems || []),
|
|
4790
5241
|
hiddenCount ? {} :{
|
|
4791
5242
|
"type": "tpl",
|
|
4792
|
-
"tpl": "${count}
|
|
5243
|
+
"tpl": "${count} " + i18next__default["default"].t('frontend_record_sum')
|
|
4793
5244
|
},
|
|
4794
5245
|
{
|
|
4795
5246
|
// "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页
|
|
4796
5247
|
"type": "button",
|
|
4797
5248
|
"align": "right",
|
|
4798
|
-
"tooltip": "
|
|
5249
|
+
"tooltip": i18next__default["default"].t('frontend_button_reload_tooltip'),
|
|
4799
5250
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
4800
5251
|
"label": "",
|
|
4801
5252
|
"icon": "fa fa-sync",
|
|
@@ -4815,7 +5266,7 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
|
|
|
4815
5266
|
"label": "",
|
|
4816
5267
|
"icon": "fa fa-search",
|
|
4817
5268
|
"type": "button",
|
|
4818
|
-
"tooltip": "
|
|
5269
|
+
"tooltip": i18next__default["default"].t('frontend_button_search_tooltip'),
|
|
4819
5270
|
"badge": {
|
|
4820
5271
|
"offset": [
|
|
4821
5272
|
-5,
|
|
@@ -4855,12 +5306,12 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
|
|
|
4855
5306
|
// },
|
|
4856
5307
|
hiddenCount ? {} : {
|
|
4857
5308
|
"type": "tpl",
|
|
4858
|
-
"tpl": "${count}
|
|
5309
|
+
"tpl": "${count} " + i18next__default["default"].t('frontend_record_sum')
|
|
4859
5310
|
},
|
|
4860
5311
|
{
|
|
4861
5312
|
"type": "reload",
|
|
4862
5313
|
"align": "right",
|
|
4863
|
-
"tooltip": "
|
|
5314
|
+
"tooltip": i18next__default["default"].t('frontend_button_reload_tooltip'),
|
|
4864
5315
|
"tooltipPlacement": "bottom",
|
|
4865
5316
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500"
|
|
4866
5317
|
},
|
|
@@ -4868,7 +5319,7 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
|
|
|
4868
5319
|
filterVisible ? {
|
|
4869
5320
|
"label": "",
|
|
4870
5321
|
"icon": "fa fa-search",
|
|
4871
|
-
"tooltip": "
|
|
5322
|
+
"tooltip": i18next__default["default"].t('frontend_button_search_tooltip'),
|
|
4872
5323
|
"tooltipPlacement": "bottom",
|
|
4873
5324
|
"type": "button",
|
|
4874
5325
|
"align": "right",
|
|
@@ -5488,7 +5939,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
5488
5939
|
pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, ctx.formFactor, { headerToolbarItems });
|
|
5489
5940
|
const isAllowCreate = refObjectConfig.permissions.allowCreate;
|
|
5490
5941
|
if (isAllowCreate) {
|
|
5491
|
-
const new_button = await getSchema$
|
|
5942
|
+
const new_button = await getSchema$5(refObjectConfig, { appId: ctx.appId, objectName: refObjectConfig.name, formFactor: ctx.formFactor });
|
|
5492
5943
|
new_button.align = "right";
|
|
5493
5944
|
pickerSchema.headerToolbar.push(new_button);
|
|
5494
5945
|
}
|
|
@@ -7371,7 +7822,7 @@ async function getTableOperation(ctx){
|
|
|
7371
7822
|
}
|
|
7372
7823
|
return {
|
|
7373
7824
|
type: 'operation',
|
|
7374
|
-
label: '
|
|
7825
|
+
label: i18next__default["default"].t('frontend_ercord_operation'),
|
|
7375
7826
|
fixed: 'right',
|
|
7376
7827
|
labelClassName: 'text-center',
|
|
7377
7828
|
className: 'text-center steedos-listview-operation w-20',
|
|
@@ -8420,7 +8871,7 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
8420
8871
|
// ObjectForm会认作用域下的变量值
|
|
8421
8872
|
// TODO: 待组件支持initValues属性后应该改掉,不应该通过data直接传值
|
|
8422
8873
|
// TODO: 全天事件属性传入doc了但是没有生效,需要手动在ObjectForm中勾选全天事件
|
|
8423
|
-
const title = "
|
|
8874
|
+
const title = "${i18next__default["default"].t('frontend_form_new')} ${objectSchema.label}";
|
|
8424
8875
|
doAction(
|
|
8425
8876
|
{
|
|
8426
8877
|
"actionType": "dialog",
|
|
@@ -8454,33 +8905,6 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
8454
8905
|
});
|
|
8455
8906
|
`;
|
|
8456
8907
|
|
|
8457
|
-
const onEventClickScript = `
|
|
8458
|
-
const data = event.data;
|
|
8459
|
-
const eventData = data.event;
|
|
8460
|
-
const appId = data.appId;
|
|
8461
|
-
const objectName = data.objectName;
|
|
8462
|
-
const eventId = data.event && data.event.id;
|
|
8463
|
-
doAction({
|
|
8464
|
-
"actionType": "dialog",
|
|
8465
|
-
"dialog": {
|
|
8466
|
-
"type": "dialog",
|
|
8467
|
-
"title": "",
|
|
8468
|
-
"body": [
|
|
8469
|
-
{
|
|
8470
|
-
"type": "steedos-record-detail",
|
|
8471
|
-
"objectApiName": "\${objectName}",
|
|
8472
|
-
"recordId": data.event && data.event.id
|
|
8473
|
-
}
|
|
8474
|
-
],
|
|
8475
|
-
"closeOnEsc": false,
|
|
8476
|
-
"closeOnOutside": false,
|
|
8477
|
-
"showCloseButton": true,
|
|
8478
|
-
"size": "lg",
|
|
8479
|
-
"actions": []
|
|
8480
|
-
}
|
|
8481
|
-
});
|
|
8482
|
-
`;
|
|
8483
|
-
|
|
8484
8908
|
const recordId = "${event.id}";
|
|
8485
8909
|
const recordPermissionsApi = getCalendarRecordPermissionsApi(objectSchema, recordId);
|
|
8486
8910
|
const recordSaveApi = getCalendarRecordSaveApi(objectSchema, calendarOptions);
|
|
@@ -8526,11 +8950,10 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
8526
8950
|
"weight": 0,
|
|
8527
8951
|
"actions": [
|
|
8528
8952
|
{
|
|
8529
|
-
"
|
|
8953
|
+
"actionType": "link",
|
|
8530
8954
|
"args": {
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
"script": onEventClickScript
|
|
8955
|
+
"link": "/app/${appId}/${objectName}/view/${event.id}"
|
|
8956
|
+
}
|
|
8534
8957
|
}
|
|
8535
8958
|
]
|
|
8536
8959
|
},
|
|
@@ -8560,7 +8983,7 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
8560
8983
|
"expression": "!event.data.editable",
|
|
8561
8984
|
"args": {
|
|
8562
8985
|
"msgType": "error",
|
|
8563
|
-
"msg": "
|
|
8986
|
+
"msg": i18next__default["default"].t('frontend_message_no_permission_to_edit'),
|
|
8564
8987
|
"position": "top-center"
|
|
8565
8988
|
}
|
|
8566
8989
|
},
|
|
@@ -8570,8 +8993,8 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
8570
8993
|
"args": {
|
|
8571
8994
|
"api": recordSaveApi,
|
|
8572
8995
|
"messages": {
|
|
8573
|
-
"success": objectSchema.label + "
|
|
8574
|
-
"failed": objectSchema.label + "
|
|
8996
|
+
"success": objectSchema.label + i18next__default["default"].t('frontend_message_modification_successful'),
|
|
8997
|
+
"failed": objectSchema.label + i18next__default["default"].t('frontend_message_modification_successful')
|
|
8575
8998
|
}
|
|
8576
8999
|
}
|
|
8577
9000
|
}
|
|
@@ -8643,7 +9066,12 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
8643
9066
|
"initialView": initialView,
|
|
8644
9067
|
"businessHours": businessHours,
|
|
8645
9068
|
...config,
|
|
8646
|
-
"onEvent": onEvent
|
|
9069
|
+
"onEvent": onEvent,
|
|
9070
|
+
"views":{
|
|
9071
|
+
listWeek: {
|
|
9072
|
+
buttonText: i18next__default["default"].t('frontend_calendar_listWeek')
|
|
9073
|
+
}
|
|
9074
|
+
}
|
|
8647
9075
|
};
|
|
8648
9076
|
return amisSchema;
|
|
8649
9077
|
}
|
|
@@ -8662,7 +9090,7 @@ const getFieldSchemaArray = (formFields) => {
|
|
|
8662
9090
|
|
|
8663
9091
|
___namespace.forEach(formFields, (field) => {
|
|
8664
9092
|
if (!field.group || field.group == 'null' || field.group == '-')
|
|
8665
|
-
field.group = '
|
|
9093
|
+
field.group = i18next__default["default"].t('frontend_field_group_generalization');
|
|
8666
9094
|
const fieldName = field.name;
|
|
8667
9095
|
let isObjectField = /\w+\.\w+/.test(fieldName);
|
|
8668
9096
|
if (field.type == 'grid' || field.type == 'object') {
|
|
@@ -8827,7 +9255,7 @@ function getBulkActions(objectSchema){
|
|
|
8827
9255
|
"level": "danger",
|
|
8828
9256
|
"label": "批量删除",
|
|
8829
9257
|
"actionType": "ajax",
|
|
8830
|
-
"confirmText": "
|
|
9258
|
+
"confirmText": i18next__default["default"].t('frontend_delete_many_confirm_text'),
|
|
8831
9259
|
"className": "hidden",
|
|
8832
9260
|
"id": "batchDelete",
|
|
8833
9261
|
"api": getBatchDelete(objectSchema.name),
|
|
@@ -10106,7 +10534,7 @@ async function getRecordDetailSchema(objectName, appId, props = {}){
|
|
|
10106
10534
|
const uiSchema = await getUISchema(objectName);
|
|
10107
10535
|
const relatedLists = await getObjectRelatedList(objectName);
|
|
10108
10536
|
const detailed = {
|
|
10109
|
-
"title": "
|
|
10537
|
+
"title": i18next__default["default"].t('frontend_record_detail_tab_detailed'),
|
|
10110
10538
|
"className": "px-0 py-4",
|
|
10111
10539
|
"body": [
|
|
10112
10540
|
{
|
|
@@ -10121,7 +10549,7 @@ async function getRecordDetailSchema(objectName, appId, props = {}){
|
|
|
10121
10549
|
"id": "u:5d4e7e3f6ecc"
|
|
10122
10550
|
};
|
|
10123
10551
|
const related = {
|
|
10124
|
-
"title": "
|
|
10552
|
+
"title": i18next__default["default"].t('frontend_record_detail_tab_related'),
|
|
10125
10553
|
"className": "px-0 pt-4",
|
|
10126
10554
|
"body": [
|
|
10127
10555
|
{
|
|
@@ -13073,6 +13501,10 @@ const getInstanceInfo = async ({ instanceId, box }) => {
|
|
|
13073
13501
|
};
|
|
13074
13502
|
};
|
|
13075
13503
|
|
|
13504
|
+
Object.defineProperty(exports, 'i18next', {
|
|
13505
|
+
enumerable: true,
|
|
13506
|
+
get: function () { return i18next__default["default"]; }
|
|
13507
|
+
});
|
|
13076
13508
|
exports.Field = index;
|
|
13077
13509
|
exports.Router = Router;
|
|
13078
13510
|
exports.absoluteUrl = absoluteUrl;
|