@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/index.esm.js CHANGED
@@ -1,5 +1,8 @@
1
1
  import * as _$1 from 'lodash';
2
2
  import ___default, { isEmpty, isArray, each, find, endsWith, cloneDeep, forEach, includes, get, isBoolean, omitBy, isNil, toArray, mergeWith, map, isString, union, has, slice, defaultsDeep as defaultsDeep$1, isObject as isObject$1, filter, startsWith } from 'lodash';
3
+ import i18next from 'i18next';
4
+ export { default as i18next } from 'i18next';
5
+ import { initReactI18next } from 'react-i18next';
3
6
  import { Router as Router$1, getSteedosAuth as getSteedosAuth$1, lookupToAmis as lookupToAmis$1, fetchAPI as fetchAPI$1 } from '@steedos-widgets/amis-lib';
4
7
  import isPlainObject from 'lodash/isPlainObject';
5
8
 
@@ -183,7 +186,7 @@ const amisRender = (root, schema, data = {}, env = {}, options) => {
183
186
  * @Author: baozhoutao@steedos.com
184
187
  * @Date: 2022-07-04 11:24:28
185
188
  * @LastEditors: baozhoutao@steedos.com
186
- * @LastEditTime: 2023-02-23 09:20:32
189
+ * @LastEditTime: 2023-06-12 11:51:15
187
190
  * @Description:
188
191
  */
189
192
 
@@ -213,7 +216,6 @@ async function fetchAPI(api, options = { credentials: 'include' }) {
213
216
 
214
217
  options.headers = Object.assign({}, headers, options.headers);
215
218
  options.credentials = 'include';
216
-
217
219
  const res = await fetch(`${getRootUrl()}${api}`, options);
218
220
 
219
221
  if(res.status === 401){
@@ -308,7 +310,7 @@ function getRootUrl(defaultRootUrl){
308
310
  if(rootUrl){
309
311
  return rootUrl
310
312
  }
311
- return defaultRootUrl;
313
+ return defaultRootUrl || '';
312
314
  }
313
315
 
314
316
  function setRootUrl(rootUrl){
@@ -1383,6 +1385,350 @@ const parseSingleExpression = function (func, formData, dataPath, global, userSe
1383
1385
  }
1384
1386
  };
1385
1387
 
1388
+ var frontend_field_group_generalization$1 = "Generalization";
1389
+ var frontend_download$1 = "Download";
1390
+ var frontend_form_save$1 = "Save";
1391
+ var frontend_form_save_and_new$1 = "Save and New";
1392
+ var frontend_form_cancel$1 = "Cancel";
1393
+ var frontend_form_new$1 = "New";
1394
+ var frontend_form_edit$1 = "Edit";
1395
+ var frontend_form_select$1 = "Select";
1396
+ var frontend_form_confirm$1 = "Confirm";
1397
+ var frontend_form_delete$1 = "Delete";
1398
+ var frontend_form_view$1 = "view";
1399
+ var frontend_delete_confirm_text$1 = "Are you sure you want to delete this item?";
1400
+ var frontend_delete_many_selected_required$1 = "Please select the item to be deleted";
1401
+ var frontend_delete_many_confirm_text$1 = "Are you sure you want to delete?";
1402
+ var frontend_display_type_is_table$1 = "Table";
1403
+ var frontend_display_type_is_split$1 = "Split View";
1404
+ var frontend_display_as$1 = "Displayed as";
1405
+ var frontend_record_sum$1 = "items";
1406
+ var frontend_button_reload_tooltip$1 = "Refresh";
1407
+ var frontend_button_search_tooltip$1 = "Search";
1408
+ var frontend_fields_filter_button_search$1 = "Search";
1409
+ var frontend_fields_filter_button_settings$1 = "Set search options";
1410
+ var frontend_button_listview_control_tooltip$1 = "List View Controls";
1411
+ var frontend_button_listview_control_label$1 = "LIST VIEW CONTROLS";
1412
+ var frontend_listview_control_columns$1 = "Show List";
1413
+ var frontend_listview_control_columns_mobile_group$1 = "Mobile side";
1414
+ var frontend_listview_control_clone_label$1 = "Clone";
1415
+ var frontend_listview_control_clone_title$1 = "Clone List View";
1416
+ var frontend_listview_control_clone_defaultData_label_start$1 = "Copy of";
1417
+ var frontend_listview_control_clone_defaultData_label_end$1 = "";
1418
+ var frontend_listview_control_delete_label$1 = "Delete";
1419
+ 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?";
1420
+ var frontend_listview_control_delete_message_success$1 = "Deletion successful";
1421
+ var frontend_listview_control_filters$1 = "Filter settings";
1422
+ var frontend_listview_control_filters_fields_extend$1 = "Conditional component 1";
1423
+ var frontend_listview_control_new_label$1 = "New";
1424
+ var frontend_listview_control_new_title$1 = "New List View";
1425
+ var frontend_listview_control_new_message_success$1 = "Success";
1426
+ var frontend_listview_control_new_message_failed$1 = "Failure";
1427
+ var frontend_listview_control_rename_label$1 = "Rename";
1428
+ var frontend_listview_control_rename_title$1 = "Rename List View";
1429
+ var frontend_listview_control_share$1 = "Sharing Settings";
1430
+ var frontend_listview_control_sort$1 = "Default sorting rule";
1431
+ var frontend_export_excel$1 = "Export Excel";
1432
+ var frontend_ercord_operation$1 = "Operation";
1433
+ var frontend_import_data$1 = "Import data";
1434
+ var frontend_import_data_object_name$1 = "Import object";
1435
+ var frontend_import_data_queue_import$1 = "Data import";
1436
+ var frontend_import_data_queue_import_description$1 = "Import description";
1437
+ var frontend_import_data_queue_import_encoding$1 = "Character code";
1438
+ var frontend_import_data_queue_import_template_url$1 = "Import template";
1439
+ var frontend_import_data_file$1 = "Excel file";
1440
+ var frontend_import_data_message_success$1 = "Importing has started...";
1441
+ var frontend_import_data_message_failed$1 = "Import failed";
1442
+ var frontend_record_detail_tab_detailed$1 = "Details";
1443
+ var frontend_record_detail_tab_related$1 = "Related";
1444
+ var frontend_all_apps$1 = "All apps";
1445
+ var frontend_all_projects$1 = "All projects";
1446
+ var frontend_application_launcher$1 = "Application launcher";
1447
+ var frontend_menu$1 = "Menu";
1448
+ var frontend_help$1 = "Help";
1449
+ var frontend_setup$1 = "Setup";
1450
+ var frontend_notifications$1 = "Notifications";
1451
+ var frontend_notifications_allread$1 = "Mark all as read";
1452
+ var frontend_notifications_allread_message$1 = "All marked as read";
1453
+ var frontend_profile$1 = "Profile";
1454
+ var frontend_about$1 = "About";
1455
+ var frontend_log_out$1 = "Log out";
1456
+ var frontend_listview_warning_start$1 = "The current ";
1457
+ var frontend_listview_warning_end$1 = " view does not exist!";
1458
+ var frontend_record_detail_related_list_warning$1 = "Missing parent object, parent record, or related list object property!";
1459
+ var frontend_record_detail_related_lists_warning$1 = "Missing parent object, or parent record property!";
1460
+ var frontend_record_detail_related_lists_info$1 = "No related child tables found";
1461
+ var frontend_calendar_listWeek$1 = "List";
1462
+ var frontend_message_no_permission_to_edit$1 = "You don't have permission to edit this record!";
1463
+ var frontend_message_modification_successful$1 = "Modification successful!";
1464
+ var frontend_message_modification_failed$1 = "Modification failed!";
1465
+ var en_us = {
1466
+ frontend_field_group_generalization: frontend_field_group_generalization$1,
1467
+ frontend_download: frontend_download$1,
1468
+ frontend_form_save: frontend_form_save$1,
1469
+ frontend_form_save_and_new: frontend_form_save_and_new$1,
1470
+ frontend_form_cancel: frontend_form_cancel$1,
1471
+ frontend_form_new: frontend_form_new$1,
1472
+ frontend_form_edit: frontend_form_edit$1,
1473
+ frontend_form_select: frontend_form_select$1,
1474
+ frontend_form_confirm: frontend_form_confirm$1,
1475
+ frontend_form_delete: frontend_form_delete$1,
1476
+ frontend_form_view: frontend_form_view$1,
1477
+ frontend_delete_confirm_text: frontend_delete_confirm_text$1,
1478
+ frontend_delete_many_selected_required: frontend_delete_many_selected_required$1,
1479
+ frontend_delete_many_confirm_text: frontend_delete_many_confirm_text$1,
1480
+ frontend_display_type_is_table: frontend_display_type_is_table$1,
1481
+ frontend_display_type_is_split: frontend_display_type_is_split$1,
1482
+ frontend_display_as: frontend_display_as$1,
1483
+ frontend_record_sum: frontend_record_sum$1,
1484
+ frontend_button_reload_tooltip: frontend_button_reload_tooltip$1,
1485
+ frontend_button_search_tooltip: frontend_button_search_tooltip$1,
1486
+ frontend_fields_filter_button_search: frontend_fields_filter_button_search$1,
1487
+ frontend_fields_filter_button_settings: frontend_fields_filter_button_settings$1,
1488
+ frontend_button_listview_control_tooltip: frontend_button_listview_control_tooltip$1,
1489
+ frontend_button_listview_control_label: frontend_button_listview_control_label$1,
1490
+ frontend_listview_control_columns: frontend_listview_control_columns$1,
1491
+ frontend_listview_control_columns_mobile_group: frontend_listview_control_columns_mobile_group$1,
1492
+ frontend_listview_control_clone_label: frontend_listview_control_clone_label$1,
1493
+ frontend_listview_control_clone_title: frontend_listview_control_clone_title$1,
1494
+ frontend_listview_control_clone_defaultData_label_start: frontend_listview_control_clone_defaultData_label_start$1,
1495
+ frontend_listview_control_clone_defaultData_label_end: frontend_listview_control_clone_defaultData_label_end$1,
1496
+ frontend_listview_control_delete_label: frontend_listview_control_delete_label$1,
1497
+ frontend_listview_control_delete_confirm_text: frontend_listview_control_delete_confirm_text$1,
1498
+ frontend_listview_control_delete_message_success: frontend_listview_control_delete_message_success$1,
1499
+ frontend_listview_control_filters: frontend_listview_control_filters$1,
1500
+ frontend_listview_control_filters_fields_extend: frontend_listview_control_filters_fields_extend$1,
1501
+ frontend_listview_control_new_label: frontend_listview_control_new_label$1,
1502
+ frontend_listview_control_new_title: frontend_listview_control_new_title$1,
1503
+ frontend_listview_control_new_message_success: frontend_listview_control_new_message_success$1,
1504
+ frontend_listview_control_new_message_failed: frontend_listview_control_new_message_failed$1,
1505
+ frontend_listview_control_rename_label: frontend_listview_control_rename_label$1,
1506
+ frontend_listview_control_rename_title: frontend_listview_control_rename_title$1,
1507
+ frontend_listview_control_share: frontend_listview_control_share$1,
1508
+ frontend_listview_control_sort: frontend_listview_control_sort$1,
1509
+ frontend_export_excel: frontend_export_excel$1,
1510
+ frontend_ercord_operation: frontend_ercord_operation$1,
1511
+ frontend_import_data: frontend_import_data$1,
1512
+ frontend_import_data_object_name: frontend_import_data_object_name$1,
1513
+ frontend_import_data_queue_import: frontend_import_data_queue_import$1,
1514
+ frontend_import_data_queue_import_description: frontend_import_data_queue_import_description$1,
1515
+ frontend_import_data_queue_import_encoding: frontend_import_data_queue_import_encoding$1,
1516
+ frontend_import_data_queue_import_template_url: frontend_import_data_queue_import_template_url$1,
1517
+ frontend_import_data_file: frontend_import_data_file$1,
1518
+ frontend_import_data_message_success: frontend_import_data_message_success$1,
1519
+ frontend_import_data_message_failed: frontend_import_data_message_failed$1,
1520
+ frontend_record_detail_tab_detailed: frontend_record_detail_tab_detailed$1,
1521
+ frontend_record_detail_tab_related: frontend_record_detail_tab_related$1,
1522
+ frontend_all_apps: frontend_all_apps$1,
1523
+ frontend_all_projects: frontend_all_projects$1,
1524
+ frontend_application_launcher: frontend_application_launcher$1,
1525
+ frontend_menu: frontend_menu$1,
1526
+ frontend_help: frontend_help$1,
1527
+ frontend_setup: frontend_setup$1,
1528
+ frontend_notifications: frontend_notifications$1,
1529
+ frontend_notifications_allread: frontend_notifications_allread$1,
1530
+ frontend_notifications_allread_message: frontend_notifications_allread_message$1,
1531
+ frontend_profile: frontend_profile$1,
1532
+ frontend_about: frontend_about$1,
1533
+ frontend_log_out: frontend_log_out$1,
1534
+ frontend_listview_warning_start: frontend_listview_warning_start$1,
1535
+ frontend_listview_warning_end: frontend_listview_warning_end$1,
1536
+ frontend_record_detail_related_list_warning: frontend_record_detail_related_list_warning$1,
1537
+ frontend_record_detail_related_lists_warning: frontend_record_detail_related_lists_warning$1,
1538
+ frontend_record_detail_related_lists_info: frontend_record_detail_related_lists_info$1,
1539
+ frontend_calendar_listWeek: frontend_calendar_listWeek$1,
1540
+ frontend_message_no_permission_to_edit: frontend_message_no_permission_to_edit$1,
1541
+ frontend_message_modification_successful: frontend_message_modification_successful$1,
1542
+ frontend_message_modification_failed: frontend_message_modification_failed$1
1543
+ };
1544
+
1545
+ var frontend_field_group_generalization = "通用";
1546
+ var frontend_download = "下载";
1547
+ var frontend_form_save = "保存";
1548
+ var frontend_form_save_and_new = "保存并新建";
1549
+ var frontend_form_cancel = "取消";
1550
+ var frontend_form_new = "新建";
1551
+ var frontend_form_edit = "编辑";
1552
+ var frontend_form_select = "选择";
1553
+ var frontend_form_confirm = "确认";
1554
+ var frontend_form_delete = "删除";
1555
+ var frontend_form_view = "查看";
1556
+ var frontend_delete_confirm_text = "确定要删除此项目?";
1557
+ var frontend_delete_many_selected_required = "请选择要删除的项";
1558
+ var frontend_delete_many_confirm_text = "确定要删除吗?";
1559
+ var frontend_display_type_is_table = "表格";
1560
+ var frontend_display_type_is_split = "分栏视图";
1561
+ var frontend_display_as = "显示为";
1562
+ var frontend_record_sum = "个项目";
1563
+ var frontend_button_reload_tooltip = "刷新";
1564
+ var frontend_button_search_tooltip = "搜索";
1565
+ var frontend_fields_filter_button_search = "搜索";
1566
+ var frontend_fields_filter_button_settings = "设置搜索项";
1567
+ var frontend_button_listview_control_tooltip = "列表视图控制";
1568
+ var frontend_button_listview_control_label = "列表视图控制";
1569
+ var frontend_listview_control_columns = "显示的列";
1570
+ var frontend_listview_control_columns_mobile_group = "手机端";
1571
+ var frontend_listview_control_clone = "复制";
1572
+ var frontend_listview_control_clone_label = "复制";
1573
+ var frontend_listview_control_clone_title = "复制 列表视图";
1574
+ var frontend_listview_control_clone_defaultData_label_start = "";
1575
+ var frontend_listview_control_clone_defaultData_label_end = "的副本";
1576
+ var frontend_listview_control_delete_label = "删除";
1577
+ var frontend_listview_control_delete_confirm_text = "如果您删除此列表视图,该视图将为所有具备访问权限的用户永久删除。是否确定要删除?";
1578
+ var frontend_listview_control_delete_message_success = "删除成功";
1579
+ var frontend_listview_control_filters = "过滤设置";
1580
+ var frontend_listview_control_filters_fields_extend = "条件组件1";
1581
+ var frontend_listview_control_new_label = "新建";
1582
+ var frontend_listview_control_new_title = "新建 列表视图";
1583
+ var frontend_listview_control_new_message_success = "成功";
1584
+ var frontend_listview_control_new_message_failed = "失败";
1585
+ var frontend_listview_control_rename_label = "重命名";
1586
+ var frontend_listview_control_rename_title = "重命名 列表视图";
1587
+ var frontend_listview_control_share = "共享设置";
1588
+ var frontend_listview_control_sort = "默认排序规则";
1589
+ var frontend_export_excel = "导出";
1590
+ var frontend_ercord_operation = "操作";
1591
+ var frontend_import_data = "导入数据";
1592
+ var frontend_import_data_object_name = "导入对象";
1593
+ var frontend_import_data_queue_import = "数据导入";
1594
+ var frontend_import_data_queue_import_description = "导入描述";
1595
+ var frontend_import_data_queue_import_encoding = "字符代码";
1596
+ var frontend_import_data_queue_import_template_url = "导入模板";
1597
+ var frontend_import_data_file = "Excel文件";
1598
+ var frontend_import_data_message_success = "已开始导入...";
1599
+ var frontend_import_data_message_failed = "导入失败";
1600
+ var frontend_record_detail_tab_detailed = "详细";
1601
+ var frontend_record_detail_tab_related = "相关";
1602
+ var frontend_all_apps = "所有应用";
1603
+ var frontend_all_projects = "所有项目";
1604
+ var frontend_application_launcher = "应用程序启动器";
1605
+ var frontend_menu = "菜单";
1606
+ var frontend_help = "帮助";
1607
+ var frontend_setup = "设置";
1608
+ var frontend_notifications = "通知";
1609
+ var frontend_notifications_allread = "全部标记为已读";
1610
+ var frontend_notifications_allread_message = "已全部标记为已读";
1611
+ var frontend_profile = "个人资料";
1612
+ var frontend_about = "关于";
1613
+ var frontend_log_out = "注销";
1614
+ var frontend_listview_warning_start = "当前";
1615
+ var frontend_listview_warning_end = "视图不存在!";
1616
+ var frontend_record_detail_related_list_warning = "缺少父级对象、父级记录或相关列表对象属性!";
1617
+ var frontend_record_detail_related_lists_warning = "缺少父级对象或父级记录属性!";
1618
+ var frontend_record_detail_related_lists_info = "没有相关子表";
1619
+ var frontend_calendar_listWeek = "列表";
1620
+ var frontend_message_no_permission_to_edit = "您没有编辑该记录的权限!";
1621
+ var frontend_message_modification_successful = "修改成功!";
1622
+ var frontend_message_modification_failed = "修改失败!";
1623
+ var zh_cn = {
1624
+ frontend_field_group_generalization: frontend_field_group_generalization,
1625
+ frontend_download: frontend_download,
1626
+ frontend_form_save: frontend_form_save,
1627
+ frontend_form_save_and_new: frontend_form_save_and_new,
1628
+ frontend_form_cancel: frontend_form_cancel,
1629
+ frontend_form_new: frontend_form_new,
1630
+ frontend_form_edit: frontend_form_edit,
1631
+ frontend_form_select: frontend_form_select,
1632
+ frontend_form_confirm: frontend_form_confirm,
1633
+ frontend_form_delete: frontend_form_delete,
1634
+ frontend_form_view: frontend_form_view,
1635
+ frontend_delete_confirm_text: frontend_delete_confirm_text,
1636
+ frontend_delete_many_selected_required: frontend_delete_many_selected_required,
1637
+ frontend_delete_many_confirm_text: frontend_delete_many_confirm_text,
1638
+ frontend_display_type_is_table: frontend_display_type_is_table,
1639
+ frontend_display_type_is_split: frontend_display_type_is_split,
1640
+ frontend_display_as: frontend_display_as,
1641
+ frontend_record_sum: frontend_record_sum,
1642
+ frontend_button_reload_tooltip: frontend_button_reload_tooltip,
1643
+ frontend_button_search_tooltip: frontend_button_search_tooltip,
1644
+ frontend_fields_filter_button_search: frontend_fields_filter_button_search,
1645
+ frontend_fields_filter_button_settings: frontend_fields_filter_button_settings,
1646
+ frontend_button_listview_control_tooltip: frontend_button_listview_control_tooltip,
1647
+ frontend_button_listview_control_label: frontend_button_listview_control_label,
1648
+ frontend_listview_control_columns: frontend_listview_control_columns,
1649
+ frontend_listview_control_columns_mobile_group: frontend_listview_control_columns_mobile_group,
1650
+ frontend_listview_control_clone: frontend_listview_control_clone,
1651
+ frontend_listview_control_clone_label: frontend_listview_control_clone_label,
1652
+ frontend_listview_control_clone_title: frontend_listview_control_clone_title,
1653
+ frontend_listview_control_clone_defaultData_label_start: frontend_listview_control_clone_defaultData_label_start,
1654
+ frontend_listview_control_clone_defaultData_label_end: frontend_listview_control_clone_defaultData_label_end,
1655
+ frontend_listview_control_delete_label: frontend_listview_control_delete_label,
1656
+ frontend_listview_control_delete_confirm_text: frontend_listview_control_delete_confirm_text,
1657
+ frontend_listview_control_delete_message_success: frontend_listview_control_delete_message_success,
1658
+ frontend_listview_control_filters: frontend_listview_control_filters,
1659
+ frontend_listview_control_filters_fields_extend: frontend_listview_control_filters_fields_extend,
1660
+ frontend_listview_control_new_label: frontend_listview_control_new_label,
1661
+ frontend_listview_control_new_title: frontend_listview_control_new_title,
1662
+ frontend_listview_control_new_message_success: frontend_listview_control_new_message_success,
1663
+ frontend_listview_control_new_message_failed: frontend_listview_control_new_message_failed,
1664
+ frontend_listview_control_rename_label: frontend_listview_control_rename_label,
1665
+ frontend_listview_control_rename_title: frontend_listview_control_rename_title,
1666
+ frontend_listview_control_share: frontend_listview_control_share,
1667
+ frontend_listview_control_sort: frontend_listview_control_sort,
1668
+ frontend_export_excel: frontend_export_excel,
1669
+ frontend_ercord_operation: frontend_ercord_operation,
1670
+ frontend_import_data: frontend_import_data,
1671
+ frontend_import_data_object_name: frontend_import_data_object_name,
1672
+ frontend_import_data_queue_import: frontend_import_data_queue_import,
1673
+ frontend_import_data_queue_import_description: frontend_import_data_queue_import_description,
1674
+ frontend_import_data_queue_import_encoding: frontend_import_data_queue_import_encoding,
1675
+ frontend_import_data_queue_import_template_url: frontend_import_data_queue_import_template_url,
1676
+ frontend_import_data_file: frontend_import_data_file,
1677
+ frontend_import_data_message_success: frontend_import_data_message_success,
1678
+ frontend_import_data_message_failed: frontend_import_data_message_failed,
1679
+ frontend_record_detail_tab_detailed: frontend_record_detail_tab_detailed,
1680
+ frontend_record_detail_tab_related: frontend_record_detail_tab_related,
1681
+ frontend_all_apps: frontend_all_apps,
1682
+ frontend_all_projects: frontend_all_projects,
1683
+ frontend_application_launcher: frontend_application_launcher,
1684
+ frontend_menu: frontend_menu,
1685
+ frontend_help: frontend_help,
1686
+ frontend_setup: frontend_setup,
1687
+ frontend_notifications: frontend_notifications,
1688
+ frontend_notifications_allread: frontend_notifications_allread,
1689
+ frontend_notifications_allread_message: frontend_notifications_allread_message,
1690
+ frontend_profile: frontend_profile,
1691
+ frontend_about: frontend_about,
1692
+ frontend_log_out: frontend_log_out,
1693
+ frontend_listview_warning_start: frontend_listview_warning_start,
1694
+ frontend_listview_warning_end: frontend_listview_warning_end,
1695
+ frontend_record_detail_related_list_warning: frontend_record_detail_related_list_warning,
1696
+ frontend_record_detail_related_lists_warning: frontend_record_detail_related_lists_warning,
1697
+ frontend_record_detail_related_lists_info: frontend_record_detail_related_lists_info,
1698
+ frontend_calendar_listWeek: frontend_calendar_listWeek,
1699
+ frontend_message_no_permission_to_edit: frontend_message_no_permission_to_edit,
1700
+ frontend_message_modification_successful: frontend_message_modification_successful,
1701
+ frontend_message_modification_failed: frontend_message_modification_failed
1702
+ };
1703
+
1704
+ const resources = {
1705
+ "en-US": {
1706
+ translation: en_us
1707
+ },
1708
+ "zh-CN": {
1709
+ translation: zh_cn
1710
+ }
1711
+ };
1712
+ var locale = "zh-CN";
1713
+ if (typeof window != 'undefined') {
1714
+ if (window.Builder?.settings.locale == "en-us") {
1715
+ locale = "en-US";
1716
+ } else if (window.Builder?.settings.locale == "zh-cn") {
1717
+ locale = "zh-CN";
1718
+ }
1719
+ }
1720
+
1721
+
1722
+ i18next
1723
+ .use(initReactI18next)
1724
+ .init({
1725
+ resources,
1726
+ lng: locale,
1727
+ interpolation: {
1728
+ escapeValue: false
1729
+ }
1730
+ });
1731
+
1386
1732
  /*
1387
1733
  * @Author: baozhoutao@steedos.com
1388
1734
  * @Date: 2022-11-01 15:51:00
@@ -1391,7 +1737,7 @@ const parseSingleExpression = function (func, formData, dataPath, global, userSe
1391
1737
  * @Description:
1392
1738
  */
1393
1739
 
1394
- const getSchema$4 = async (uiSchema, ctx) => {
1740
+ const getSchema$5 = async (uiSchema, ctx) => {
1395
1741
  const schemaApiAdaptor = `
1396
1742
  let formSchema = {
1397
1743
  "type": "steedos-object-form",
@@ -1444,7 +1790,7 @@ const getSchema$4 = async (uiSchema, ctx) => {
1444
1790
  "body": [
1445
1791
  {
1446
1792
  "type": "button",
1447
- "label": "新建",
1793
+ "label": i18next.t('frontend_form_new'),
1448
1794
  "id": "u:standard_new",
1449
1795
  "level": "default",
1450
1796
  "onEvent": {
@@ -1470,7 +1816,7 @@ const getSchema$4 = async (uiSchema, ctx) => {
1470
1816
  "isLookup": "${isLookup}",
1471
1817
  "listName": "${listName}"
1472
1818
  },
1473
- "title": "新建 ${uiSchema.label | raw}",
1819
+ "title":i18next.t('frontend_form_new') + " ${uiSchema.label | raw}",
1474
1820
  "body": [
1475
1821
  {
1476
1822
  "type": "service",
@@ -1503,11 +1849,11 @@ const getSchema$4 = async (uiSchema, ctx) => {
1503
1849
  {
1504
1850
  type: 'button',
1505
1851
  actionType: 'cancel',
1506
- label: "取消"
1852
+ label: i18next.t('frontend_form_cancel')
1507
1853
  },
1508
1854
  {
1509
1855
  type: 'button',
1510
- label: "保存并新建",
1856
+ label: i18next.t('frontend_form_save_and_new'),
1511
1857
  actionType: 'confirm',
1512
1858
  close: false,
1513
1859
  id: "confirmAndNew"
@@ -1515,7 +1861,7 @@ const getSchema$4 = async (uiSchema, ctx) => {
1515
1861
  {
1516
1862
  type: 'button',
1517
1863
  actionType: 'confirm',
1518
- label: "保存",
1864
+ label: i18next.t('frontend_form_save'),
1519
1865
  primary: true
1520
1866
  },
1521
1867
  ]
@@ -1565,8 +1911,8 @@ async function getPage({type, pageId = '', appId, objectName = '', recordId = ''
1565
1911
  * @Description:
1566
1912
  */
1567
1913
 
1568
- const getSchema$3 = async (uiSchema, ctx) => {
1569
- const title = "编辑 " + uiSchema.label;
1914
+ const getSchema$4 = async (uiSchema, ctx) => {
1915
+ const title = i18next.t('frontend_form_edit') + " " + uiSchema.label;
1570
1916
 
1571
1917
  const defaultFormSchema = {
1572
1918
  type: "steedos-object-form",
@@ -1596,7 +1942,7 @@ const getSchema$3 = async (uiSchema, ctx) => {
1596
1942
  body: [
1597
1943
  {
1598
1944
  type: "button",
1599
- label: "编辑",
1945
+ label: i18next.t('frontend_form_edit'),
1600
1946
  id: "u:standard_edit",
1601
1947
  onEvent: {
1602
1948
  click: {
@@ -1633,15 +1979,15 @@ const getSchema$3 = async (uiSchema, ctx) => {
1633
1979
  * @LastEditors: Please set LastEditors
1634
1980
  * @LastEditTime: 2023-04-12 10:35:36
1635
1981
  */
1636
- const getSchema$2 = (uiSchema)=>{
1982
+ const getSchema$3 = (uiSchema)=>{
1637
1983
  return {
1638
1984
  "type": "service",
1639
1985
  "className": "p-0",
1640
1986
  "body": [
1641
1987
  {
1642
1988
  "type": "button",
1643
- "label": "删除",
1644
- "confirmText": "确定要删除此项目?",
1989
+ "label": i18next.t('frontend_form_delete'),
1990
+ "confirmText": i18next.t('frontend_delete_many_confirm_text'),
1645
1991
  "onEvent": {
1646
1992
  "click": {
1647
1993
  "actions": [
@@ -1702,13 +2048,13 @@ const getSchema$2 = (uiSchema)=>{
1702
2048
  }
1703
2049
  };
1704
2050
 
1705
- const getSchema$1 = (uiSchema) => {
2051
+ const getSchema$2 = (uiSchema) => {
1706
2052
  return {
1707
2053
  type: "service",
1708
2054
  body: [
1709
2055
  {
1710
2056
  type: "button",
1711
- label: "导入数据",
2057
+ label: i18next.t('frontend_import_data'),
1712
2058
  id: "u:import_data",
1713
2059
  onEvent: {
1714
2060
  click: {
@@ -1721,7 +2067,7 @@ const getSchema$1 = (uiSchema) => {
1721
2067
  "object_name": "${objectName}"
1722
2068
  },
1723
2069
  type: "dialog",
1724
- title: "导入数据",
2070
+ title: i18next.t('frontend_import_data'),
1725
2071
  body: [
1726
2072
  {
1727
2073
  type: "form",
@@ -1756,12 +2102,12 @@ const getSchema$1 = (uiSchema) => {
1756
2102
  body: [
1757
2103
  {
1758
2104
  type: "fieldSet",
1759
- title: "通用",
2105
+ title: i18next.t('frontend_field_group_generalization'),
1760
2106
  collapsable: true,
1761
2107
  body: [
1762
2108
  {
1763
2109
  name: "object_name",
1764
- label: "导入对象",
2110
+ label: i18next.t('frontend_import_data_object_name'),
1765
2111
  required: false,
1766
2112
  type: "select",
1767
2113
  joinValues: false,
@@ -1797,7 +2143,7 @@ const getSchema$1 = (uiSchema) => {
1797
2143
  },
1798
2144
  {
1799
2145
  name: "queue_import",
1800
- label: "数据导入",
2146
+ label: i18next.t('frontend_import_data_queue_import'),
1801
2147
  required: true,
1802
2148
  type: "picker",
1803
2149
  labelField: "description",
@@ -1843,7 +2189,7 @@ const getSchema$1 = (uiSchema) => {
1843
2189
  },
1844
2190
  {
1845
2191
  name: "description",
1846
- label: "导入描述",
2192
+ label: i18next.t('frontend_import_data_queue_import_description'),
1847
2193
  type: "tpl",
1848
2194
  tpl: '<a href="/app/undefined/undefined/view/${undefined}">${description}</a>',
1849
2195
  className: "whitespace-nowrap",
@@ -1851,7 +2197,7 @@ const getSchema$1 = (uiSchema) => {
1851
2197
  },
1852
2198
  {
1853
2199
  name: "object_name",
1854
- label: "导入对象",
2200
+ label: i18next.t('frontend_import_data_object_name'),
1855
2201
  type: "tpl",
1856
2202
  tpl: '<a href="/app/undefined/${_display.object_name.objectName}/view/${_display.object_name.value}">${_display.object_name.label}</a>',
1857
2203
  className: "whitespace-nowrap",
@@ -1859,7 +2205,7 @@ const getSchema$1 = (uiSchema) => {
1859
2205
  },
1860
2206
  {
1861
2207
  name: "encoding",
1862
- label: "字符代码",
2208
+ label: i18next.t('frontend_import_data_queue_import_encoding'),
1863
2209
  type: "tpl",
1864
2210
  tpl: "<div>${_display.encoding}</div>",
1865
2211
  className: "whitespace-nowrap",
@@ -1867,12 +2213,12 @@ const getSchema$1 = (uiSchema) => {
1867
2213
  },
1868
2214
  {
1869
2215
  name: "template_url",
1870
- label: "导入模板",
2216
+ label: i18next.t('frontend_import_data_queue_import_template_url'),
1871
2217
  type: "button-group",
1872
2218
  buttons: [
1873
2219
  {
1874
2220
  type: "button",
1875
- label: "下载",
2221
+ label: i18next.t('frontend_download'),
1876
2222
  visibleOn: "${template_url}",
1877
2223
  level: "link",
1878
2224
  actionType: "download",
@@ -1906,7 +2252,7 @@ const getSchema$1 = (uiSchema) => {
1906
2252
  },
1907
2253
  {
1908
2254
  name: "file",
1909
- label: "Excel文件",
2255
+ label: i18next.t('frontend_import_data_file'),
1910
2256
  required: true,
1911
2257
  type: "input-file",
1912
2258
  className: "m-1",
@@ -1962,8 +2308,8 @@ const getSchema$1 = (uiSchema) => {
1962
2308
  },
1963
2309
  },
1964
2310
  messages: {
1965
- success: "已开始导入...",
1966
- failed: "导入失败",
2311
+ success: i18next.t('frontend_import_data_message_success'),
2312
+ failed: i18next.t('frontend_import_data_message_failed'),
1967
2313
  },
1968
2314
  },
1969
2315
  actionType: "ajax",
@@ -2002,14 +2348,15 @@ const getSchema$1 = (uiSchema) => {
2002
2348
  * @LastEditTime: 2022-11-07 17:12:20
2003
2349
  * @Description:
2004
2350
  */
2005
- const getSchema = (uiSchema)=>{
2351
+
2352
+ const getSchema$1 = (uiSchema)=>{
2006
2353
  return {
2007
2354
  "type": "service",
2008
2355
  "className": "p-0",
2009
2356
  "body": [
2010
2357
  {
2011
2358
  "type": "button",
2012
- "label": "查看",
2359
+ "label": i18next.t('frontend_form_view'),
2013
2360
  "className": "border-none",
2014
2361
  "onEvent": {
2015
2362
  "click": {
@@ -2034,6 +2381,94 @@ const getSchema = (uiSchema)=>{
2034
2381
  }
2035
2382
  };
2036
2383
 
2384
+ const getSchema = async (uiSchema, ctx) => {
2385
+ const requestAdaptor = `
2386
+ // 获取列表视图的属性
2387
+ let uiSchema = api.body.uiSchema;
2388
+ let list_views = uiSchema.list_views;
2389
+ let list_views_name = api.body.listName;
2390
+ let col = list_views[list_views_name].columns;
2391
+ let sort_test = list_views[list_views_name].sort;
2392
+
2393
+ // 获取下载字段
2394
+ let select = [];
2395
+ _.each(col, (col) => {
2396
+ if (col.field == undefined)
2397
+ select.push(col);
2398
+ else select.push(col.field);
2399
+ });
2400
+
2401
+ // 获取排序字段
2402
+
2403
+ let sort = [];
2404
+ _.forEach(sort_test, (sortField) => {
2405
+ if (sortField.field_name == undefined)
2406
+ sort.push(sortField);
2407
+ else sort.push([sortField.field_name, sortField.order]);
2408
+ })
2409
+
2410
+ let orders = [];
2411
+ _.map(sort, (value) => {
2412
+ let order_tmp = [];
2413
+ if (value[1] == "desc")
2414
+ order_tmp = value[0] + ' desc';
2415
+ else
2416
+ order_tmp = value[0];
2417
+ orders.push(order_tmp);
2418
+ });
2419
+ let order = orders.join(',');
2420
+
2421
+ let filename = uiSchema.label + "-" + list_views[list_views_name].label;
2422
+
2423
+ url_tmp = api.url.split('?')[0];
2424
+ api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
2425
+
2426
+ // 判断sort 和 filters
2427
+ if (sort.length > 0) {
2428
+ api.url += "&$orderby=" + order;
2429
+ }
2430
+ let filters = list_views[list_views_name].filters;
2431
+ if (filters && filters.length > 0) {
2432
+ api.url = api.url + "&filters=" + JSON.stringify(filters);
2433
+ }
2434
+ return api;
2435
+ `;
2436
+ return {
2437
+ "type": "service",
2438
+ "body": [{
2439
+ "type": "button",
2440
+ "label": i18next.t('frontend_export_excel'),
2441
+ "id": "u:standard_export_excel",
2442
+ "level": "default",
2443
+ "onEvent": {
2444
+ "click": {
2445
+ "weight": 0,
2446
+ "actions": [
2447
+ {
2448
+ "args": {
2449
+ "api": {
2450
+ "url": "${context.rootUrl}/api/record/export/${objectName}",
2451
+ "method": "get",
2452
+ "messages": {},
2453
+ "requestAdaptor": requestAdaptor,
2454
+ "data": {
2455
+ "uiSchema": "${uiSchema}",
2456
+ "listName": "${listName}"
2457
+ },
2458
+ "headers": {
2459
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
2460
+ }
2461
+ }
2462
+ },
2463
+ "actionType": "download"
2464
+ }
2465
+ ]
2466
+ }
2467
+ }
2468
+ }]
2469
+ }
2470
+ };
2471
+
2037
2472
  /*
2038
2473
  * @Author: baozhoutao@steedos.com
2039
2474
  * @Date: 2022-11-01 15:53:07
@@ -2046,19 +2481,19 @@ const StandardButtons = {
2046
2481
  getStandardNew: async (uiSchema, ctx)=>{
2047
2482
  return {
2048
2483
  type: 'amis_button',
2049
- amis_schema: await getSchema$4(uiSchema)
2484
+ amis_schema: await getSchema$5(uiSchema)
2050
2485
  }
2051
2486
  },
2052
2487
  getStandardEdit: async (uiSchema, ctx)=>{
2053
2488
  return {
2054
2489
  type: 'amis_button',
2055
- amis_schema: await getSchema$3(uiSchema, ctx)
2490
+ amis_schema: await getSchema$4(uiSchema, ctx)
2056
2491
  }
2057
2492
  },
2058
2493
  getStandardDelete: async (uiSchema, ctx)=>{
2059
2494
  return {
2060
2495
  type: 'amis_button',
2061
- amis_schema: await getSchema$2(uiSchema)
2496
+ amis_schema: await getSchema$3(uiSchema)
2062
2497
  }
2063
2498
  },
2064
2499
  getStandardDeleteMany: async (uiSchema, ctx)=>{
@@ -2080,7 +2515,7 @@ const StandardButtons = {
2080
2515
  "items": [
2081
2516
  {
2082
2517
  "position": "top-right",
2083
- "body": "请选择要删除的项"
2518
+ "body": i18next.t('frontend_delete_many_selected_required')
2084
2519
  }
2085
2520
  ]
2086
2521
  }
@@ -2094,10 +2529,16 @@ const StandardButtons = {
2094
2529
  getStandardImportData: async (uiSchema, ctx)=>{
2095
2530
  return {
2096
2531
  type: 'amis_button',
2097
- amis_schema: await getSchema$1()
2532
+ amis_schema: await getSchema$2()
2098
2533
  }
2099
2534
  },
2100
2535
  getStandardOpenView: async (uiSchema, ctx)=>{
2536
+ return {
2537
+ type: 'amis_button',
2538
+ amis_schema: await getSchema$1()
2539
+ }
2540
+ },
2541
+ getStandardExportExcel: async (uiSchema, ctx)=>{
2101
2542
  return {
2102
2543
  type: 'amis_button',
2103
2544
  amis_schema: await getSchema()
@@ -2362,6 +2803,16 @@ const getButton = async (objectName, buttonName, ctx)=>{
2362
2803
  }
2363
2804
  }
2364
2805
 
2806
+ if(button.name === 'standard_export_excel'){
2807
+ return {
2808
+ label: button.label,
2809
+ name: button.name,
2810
+ on: button.on,
2811
+ sort: button.sort,
2812
+ ...await StandardButtons.getStandardExportExcel(uiSchema, ctx)
2813
+ }
2814
+ }
2815
+
2365
2816
  if(button.name === 'standard_open_view'){
2366
2817
  return {
2367
2818
  label: button.label,
@@ -2856,7 +3307,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
2856
3307
  if(_.isEmpty(defaultSearchableFields) && data.uiSchema){
2857
3308
  defaultSearchableFields = _.map(
2858
3309
  _.sortBy(_.filter(_.values(data.uiSchema.fields), (field) => {
2859
- return field.searchable;
3310
+ return field.filterable;
2860
3311
  }), "sort_no"),
2861
3312
  "name"
2862
3313
  );
@@ -3023,7 +3474,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
3023
3474
  {
3024
3475
  "type": "button",
3025
3476
  "id": btnSearchId,
3026
- "label": "搜索",
3477
+ "label": i18next.t('frontend_fields_filter_button_search'),
3027
3478
  "icon": "fa fa-search",
3028
3479
  // "visibleOn": "this.filterFormSearchableFields && this.filterFormSearchableFields.length",
3029
3480
  "onEvent": {
@@ -3039,7 +3490,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
3039
3490
  },
3040
3491
  {
3041
3492
  "type": "button",
3042
- "label": "取消",
3493
+ "label": i18next.t('frontend_form_cancel'),
3043
3494
  "name": "btn_filter_form_cancel",
3044
3495
  // "visibleOn": "this.filterFormSearchableFields && this.filterFormSearchableFields.length",
3045
3496
  "onEvent": {
@@ -3055,7 +3506,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
3055
3506
  },
3056
3507
  {
3057
3508
  "type": "button",
3058
- "label": "设置搜索项",
3509
+ "label": i18next.t('frontend_fields_filter_button_settings'),
3059
3510
  "onEvent": {
3060
3511
  "click": {
3061
3512
  "actions": [
@@ -3064,7 +3515,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
3064
3515
  "dialog": {
3065
3516
  "type": "dialog",
3066
3517
  "size": "md",
3067
- "title": "设置搜索项",
3518
+ "title": i18next.t('frontend_fields_filter_button_settings'),
3068
3519
  "body": [
3069
3520
  {
3070
3521
  "type": "form",
@@ -3132,7 +3583,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
3132
3583
  "actions": [
3133
3584
  {
3134
3585
  "type": "button",
3135
- "label": "取消",
3586
+ "label": i18next.t('frontend_form_cancel'),
3136
3587
  "onEvent": {
3137
3588
  "click": {
3138
3589
  "actions": [
@@ -3148,7 +3599,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
3148
3599
  },
3149
3600
  {
3150
3601
  "type": "button",
3151
- "label": "确认",
3602
+ "label": i18next.t('frontend_form_confirm'),
3152
3603
  "onEvent": {
3153
3604
  "click": {
3154
3605
  "actions": [
@@ -3665,7 +4116,7 @@ const getExportExcelToolbarButtonSchema = ()=>{
3665
4116
  "className": "bg-white p-2 rounded border-gray-300 text-gray-500",
3666
4117
  "tooltipPlacement": "bottom",
3667
4118
  "visibleOn": "${!isLookup && global.user.is_space_admin}",
3668
- "tooltip": "导出Excel",
4119
+ "tooltip": i18next.t('frontend_export_excel'),
3669
4120
  "onEvent": {
3670
4121
  "click": {
3671
4122
  "weight": 0,
@@ -3751,7 +4202,7 @@ function requestAdaptor$1(){
3751
4202
  const getNewListviewButtonSchema = ()=>{
3752
4203
  return {
3753
4204
  "type": "button",
3754
- "label": "新建",
4205
+ "label": i18next.t('frontend_listview_control_new_label'),
3755
4206
  "onEvent": {
3756
4207
  "click": {
3757
4208
  "weight": 0,
@@ -3759,7 +4210,7 @@ const getNewListviewButtonSchema = ()=>{
3759
4210
  {
3760
4211
  "dialog": {
3761
4212
  "type": "dialog",
3762
- "title": "新建 列表视图",
4213
+ "title": i18next.t('frontend_listview_control_new_title'),
3763
4214
  "data": {
3764
4215
  //"&":"$$",2.7、2.9、3.0在此处失效
3765
4216
  "all": "${uiSchema.list_views.all}",
@@ -3801,8 +4252,8 @@ const getNewListviewButtonSchema = ()=>{
3801
4252
  }
3802
4253
  },
3803
4254
  "messages": {
3804
- "success": "成功",
3805
- "failed": "失败"
4255
+ "success": i18next.t('frontend_listview_control_new_message_success'),
4256
+ "failed": i18next.t('frontend_listview_control_new_message_failed')
3806
4257
  },
3807
4258
  }
3808
4259
  ],
@@ -3901,7 +4352,7 @@ function fieldsExtend$4(){
3901
4352
  const getCopyListviewButtonSchema = ()=>{
3902
4353
  return {
3903
4354
  "type": "button",
3904
- "label": "复制",
4355
+ "label": i18next.t('frontend_listview_control_clone_label'),
3905
4356
  "onEvent": {
3906
4357
  "click": {
3907
4358
  "weight": 0,
@@ -3909,7 +4360,7 @@ const getCopyListviewButtonSchema = ()=>{
3909
4360
  {
3910
4361
  "dialog": {
3911
4362
  "type": "dialog",
3912
- "title": "复制 列表视图",
4363
+ "title": i18next.t('frontend_listview_control_clone_title'),
3913
4364
  "data": {
3914
4365
  //"&":"$$",2.7、2.9、3.0在此处失效
3915
4366
  "listName": "${listName}",
@@ -3929,7 +4380,7 @@ const getCopyListviewButtonSchema = ()=>{
3929
4380
  "defaultData": {
3930
4381
  "&": "${list_view}",
3931
4382
  "name":"",
3932
- "label": "${list_view.label} 的副本",
4383
+ "label": i18next.t('frontend_listview_control_clone_defaultData_label_start') + " ${list_view.label} " + i18next.t('frontend_listview_control_clone_defaultData_label_end'),
3933
4384
  "shared":false
3934
4385
  },
3935
4386
  "fieldsExtend": fieldsExtend$3(),
@@ -4046,7 +4497,7 @@ function fieldsExtend$3(){
4046
4497
  const getRenameListviewButtonSchema = ()=>{
4047
4498
  return {
4048
4499
  "type": "button",
4049
- "label": "重命名",
4500
+ "label": i18next.t('frontend_listview_control_rename_label'),
4050
4501
  "disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
4051
4502
  "onEvent": {
4052
4503
  "click": {
@@ -4055,7 +4506,7 @@ const getRenameListviewButtonSchema = ()=>{
4055
4506
  {
4056
4507
  "dialog": {
4057
4508
  "type": "dialog",
4058
- "title": "重命名 列表视图",
4509
+ "title": i18next.t('frontend_listview_control_rename_title'),
4059
4510
  "data": {
4060
4511
  "targetObjectName": "${objectName}",
4061
4512
  "recordId": "${uiSchema.list_views[listName]._id}",
@@ -4105,7 +4556,7 @@ const getRenameListviewButtonSchema = ()=>{
4105
4556
  const getSetListviewShareButtonSchema = ()=>{
4106
4557
  return {
4107
4558
  "type": "button",
4108
- "label": "共享设置",
4559
+ "label": i18next.t('frontend_listview_control_share'),
4109
4560
  "disabledOn": "!(global.user.is_space_admin && !!uiSchema.list_views[listName].owner)",
4110
4561
  "onEvent": {
4111
4562
  "click": {
@@ -4114,7 +4565,7 @@ const getSetListviewShareButtonSchema = ()=>{
4114
4565
  {
4115
4566
  "dialog": {
4116
4567
  "type": "dialog",
4117
- "title": "共享设置",
4568
+ "title": i18next.t('frontend_listview_control_share'),
4118
4569
  "data": {
4119
4570
  "recordId": "${uiSchema.list_views[listName]._id}",
4120
4571
  "context": "${context}"
@@ -4149,7 +4600,7 @@ const getSetListviewShareButtonSchema = ()=>{
4149
4600
  const getSetListviewFiltersButtonSchema = ()=>{
4150
4601
  return {
4151
4602
  "type": "button",
4152
- "label": "过滤设置",
4603
+ "label": i18next.t('frontend_listview_control_filters'),
4153
4604
  "disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
4154
4605
  "onEvent": {
4155
4606
  "click": {
@@ -4158,7 +4609,7 @@ const getSetListviewFiltersButtonSchema = ()=>{
4158
4609
  {
4159
4610
  "dialog": {
4160
4611
  "type": "dialog",
4161
- "title": "过滤设置",
4612
+ "title": i18next.t('frontend_listview_control_filters'),
4162
4613
  "data": {
4163
4614
  "targetObjectName": "${objectName}",
4164
4615
  "recordId": "${uiSchema.list_views[listName]._id}",
@@ -4279,7 +4730,7 @@ function fieldsExtend$2(){
4279
4730
  "visible_on": "true",
4280
4731
  "amis": {
4281
4732
  "type": "condition-builder",
4282
- "label": "条件组件1",
4733
+ "label": i18next.t('frontend_listview_control_filters_fields_extend'),
4283
4734
  "source": {
4284
4735
  "method": "get",
4285
4736
  "url": "${context.rootUrl}/service/api/amis-metadata-listviews/getFilterFields?objectName=${targetObjectName}",
@@ -4296,7 +4747,7 @@ function fieldsExtend$2(){
4296
4747
  const getSetListviewColumnsButtonSchema = ()=>{
4297
4748
  return {
4298
4749
  "type": "button",
4299
- "label": "显示的列",
4750
+ "label": i18next.t('frontend_listview_control_columns'),
4300
4751
  "disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
4301
4752
  "onEvent": {
4302
4753
  "click": {
@@ -4306,7 +4757,7 @@ const getSetListviewColumnsButtonSchema = ()=>{
4306
4757
  "args": {},
4307
4758
  "dialog": {
4308
4759
  "type": "dialog",
4309
- "title": "显示的列",
4760
+ "title": i18next.t('frontend_listview_control_columns'),
4310
4761
  "data": {
4311
4762
  //"&":"$$",2.7、2.9、3.0在此处失效
4312
4763
  "targetObjectName": "${objectName}",
@@ -4376,7 +4827,7 @@ function fieldsExtend$1(){
4376
4827
  }
4377
4828
  },
4378
4829
  "mobile_columns": {
4379
- "group": "手机端",
4830
+ "group": i18next.t('frontend_listview_control_columns_mobile_group'),
4380
4831
  "amis": {
4381
4832
  "type": "transfer",
4382
4833
  "sortable": true,
@@ -4451,7 +4902,7 @@ function apiRequestAdaptor$1(){
4451
4902
  const getSetListviewSortButtonSchema = ()=>{
4452
4903
  return {
4453
4904
  "type": "button",
4454
- "label": "默认排序规则",
4905
+ "label": i18next.t('frontend_listview_control_sort'),
4455
4906
  "disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
4456
4907
  "onEvent": {
4457
4908
  "click": {
@@ -4460,7 +4911,7 @@ const getSetListviewSortButtonSchema = ()=>{
4460
4911
  {
4461
4912
  "dialog": {
4462
4913
  "type": "dialog",
4463
- "title": "默认排序规则",
4914
+ "title": i18next.t('frontend_listview_control_sort'),
4464
4915
  "data": {
4465
4916
  //"&":"$$",2.7、2.9、3.0在此处失效
4466
4917
  "targetObjectName": "${objectName}",
@@ -4576,9 +5027,9 @@ function apiRequestAdaptor(){
4576
5027
  const getDeleteListviewButtonSchema = ()=>{
4577
5028
  return {
4578
5029
  "type": "button",
4579
- "label": "删除",
5030
+ "label": i18next.t('frontend_listview_control_delete_label'),
4580
5031
  "disabledOn": "!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",
4581
- "confirmText": "如果您删除此列表视图,该视图将为所有具备访问权限的用户永久删除。是否确定要删除?",
5032
+ "confirmText": i18next.t('frontend_listview_control_delete_confirm_text'),
4582
5033
  "onEvent": {
4583
5034
  "click": {
4584
5035
  "actions": [
@@ -4597,7 +5048,7 @@ const getDeleteListviewButtonSchema = ()=>{
4597
5048
  "recordId": "${uiSchema.list_views[listName]._id}"
4598
5049
  },
4599
5050
  "messages": {
4600
- "success": "删除成功"
5051
+ "success": i18next.t('frontend_listview_control_delete_message_success')
4601
5052
  },
4602
5053
  "requestAdaptor": requestAdaptor(),
4603
5054
  "adaptor": adaptor(),
@@ -4644,13 +5095,13 @@ const getSettingListviewToolbarButtonSchema = ()=>{
4644
5095
  "type": "dropdown-button",
4645
5096
  "trigger": "click",
4646
5097
  "icon": "fa fa-cog",
4647
- "tooltip": "列表视图控制",
5098
+ "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
4648
5099
  "btnClassName": "antd-Button--iconOnly bg-white p-2 rounded border-gray-300 text-gray-500",
4649
5100
  "align": "right",
4650
5101
  "visibleOn": "${!isLookup}",
4651
5102
  "buttons": [
4652
5103
  {
4653
- "label": "列表视图控制",
5104
+ "label": i18next.t('frontend_button_listview_control_label'),
4654
5105
  "children": [
4655
5106
  getNewListviewButtonSchema(),
4656
5107
  getCopyListviewButtonSchema(),
@@ -4671,30 +5122,30 @@ const getDisplayAsButton = function(objectName, showDisplayAs){
4671
5122
  let buttons = [
4672
5123
  {
4673
5124
  "type": "button",
4674
- "label": "表格",
5125
+ "label": i18next.t('frontend_display_type_is_table'),
4675
5126
  "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');",
4676
5127
  "rightIcon": displayAs != 'split' ? "fa fa-check" : null,
4677
5128
  "rightIconClassName": "m-l-sm"
4678
5129
  },
4679
5130
  {
4680
5131
  "type": "button",
4681
- "label": "分栏视图",
5132
+ "label": i18next.t('frontend_display_type_is_split'),
4682
5133
  "onClick": "const url = document.location.pathname + '?display=split'; props.env.jumpTo(url);",
4683
5134
  "rightIcon": displayAs === 'split' ? "fa fa-check" : null,
4684
5135
  "rightIconClassName": "m-l-sm"
4685
5136
  }
4686
5137
  ];
4687
- const displayAsLabel = displayAs === 'split'? "分栏视图" : "表格";
5138
+ const displayAsLabel = displayAs === 'split'? i18next.t('frontend_display_type_is_split') : i18next.t('frontend_display_type_is_table');
4688
5139
  return {
4689
5140
  "type": "dropdown-button",
4690
5141
  "icon": "fa fa-table-columns",
4691
- "tooltip": `显示为 ${displayAsLabel}`,
5142
+ "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
4692
5143
  "btnClassName": "antd-Button--iconOnly bg-white p-2 rounded border-gray-300 text-gray-500",
4693
5144
  "align": "right",
4694
5145
  "visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
4695
5146
  "buttons": [
4696
5147
  {
4697
- "label": "显示为",
5148
+ "label": i18next.t('frontend_display_as'),
4698
5149
  "children": buttons
4699
5150
  }
4700
5151
  ]
@@ -4762,13 +5213,13 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
4762
5213
  ...(headerToolbarItems || []),
4763
5214
  hiddenCount ? {} :{
4764
5215
  "type": "tpl",
4765
- "tpl": "${count} 个项目"
5216
+ "tpl": "${count} " + i18next.t('frontend_record_sum')
4766
5217
  },
4767
5218
  {
4768
5219
  // "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页
4769
5220
  "type": "button",
4770
5221
  "align": "right",
4771
- "tooltip": "刷新",
5222
+ "tooltip": i18next.t('frontend_button_reload_tooltip'),
4772
5223
  "className": "bg-white p-2 rounded border-gray-300 text-gray-500",
4773
5224
  "label": "",
4774
5225
  "icon": "fa fa-sync",
@@ -4788,7 +5239,7 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
4788
5239
  "label": "",
4789
5240
  "icon": "fa fa-search",
4790
5241
  "type": "button",
4791
- "tooltip": "搜索",
5242
+ "tooltip": i18next.t('frontend_button_search_tooltip'),
4792
5243
  "badge": {
4793
5244
  "offset": [
4794
5245
  -5,
@@ -4828,12 +5279,12 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
4828
5279
  // },
4829
5280
  hiddenCount ? {} : {
4830
5281
  "type": "tpl",
4831
- "tpl": "${count} 个项目"
5282
+ "tpl": "${count} " + i18next.t('frontend_record_sum')
4832
5283
  },
4833
5284
  {
4834
5285
  "type": "reload",
4835
5286
  "align": "right",
4836
- "tooltip": "刷新",
5287
+ "tooltip": i18next.t('frontend_button_reload_tooltip'),
4837
5288
  "tooltipPlacement": "bottom",
4838
5289
  "className": "bg-white p-2 rounded border-gray-300 text-gray-500"
4839
5290
  },
@@ -4841,7 +5292,7 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
4841
5292
  filterVisible ? {
4842
5293
  "label": "",
4843
5294
  "icon": "fa fa-search",
4844
- "tooltip": "搜索",
5295
+ "tooltip": i18next.t('frontend_button_search_tooltip'),
4845
5296
  "tooltipPlacement": "bottom",
4846
5297
  "type": "button",
4847
5298
  "align": "right",
@@ -5461,7 +5912,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
5461
5912
  pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, ctx.formFactor, { headerToolbarItems });
5462
5913
  const isAllowCreate = refObjectConfig.permissions.allowCreate;
5463
5914
  if (isAllowCreate) {
5464
- const new_button = await getSchema$4(refObjectConfig, { appId: ctx.appId, objectName: refObjectConfig.name, formFactor: ctx.formFactor });
5915
+ const new_button = await getSchema$5(refObjectConfig, { appId: ctx.appId, objectName: refObjectConfig.name, formFactor: ctx.formFactor });
5465
5916
  new_button.align = "right";
5466
5917
  pickerSchema.headerToolbar.push(new_button);
5467
5918
  }
@@ -7344,7 +7795,7 @@ async function getTableOperation(ctx){
7344
7795
  }
7345
7796
  return {
7346
7797
  type: 'operation',
7347
- label: '操作',
7798
+ label: i18next.t('frontend_ercord_operation'),
7348
7799
  fixed: 'right',
7349
7800
  labelClassName: 'text-center',
7350
7801
  className: 'text-center steedos-listview-operation w-20',
@@ -8393,7 +8844,7 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
8393
8844
  // ObjectForm会认作用域下的变量值
8394
8845
  // TODO: 待组件支持initValues属性后应该改掉,不应该通过data直接传值
8395
8846
  // TODO: 全天事件属性传入doc了但是没有生效,需要手动在ObjectForm中勾选全天事件
8396
- const title = "新建 ${objectSchema.label}";
8847
+ const title = "${i18next.t('frontend_form_new')} ${objectSchema.label}";
8397
8848
  doAction(
8398
8849
  {
8399
8850
  "actionType": "dialog",
@@ -8427,33 +8878,6 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
8427
8878
  });
8428
8879
  `;
8429
8880
 
8430
- const onEventClickScript = `
8431
- const data = event.data;
8432
- const eventData = data.event;
8433
- const appId = data.appId;
8434
- const objectName = data.objectName;
8435
- const eventId = data.event && data.event.id;
8436
- doAction({
8437
- "actionType": "dialog",
8438
- "dialog": {
8439
- "type": "dialog",
8440
- "title": "",
8441
- "body": [
8442
- {
8443
- "type": "steedos-record-detail",
8444
- "objectApiName": "\${objectName}",
8445
- "recordId": data.event && data.event.id
8446
- }
8447
- ],
8448
- "closeOnEsc": false,
8449
- "closeOnOutside": false,
8450
- "showCloseButton": true,
8451
- "size": "lg",
8452
- "actions": []
8453
- }
8454
- });
8455
- `;
8456
-
8457
8881
  const recordId = "${event.id}";
8458
8882
  const recordPermissionsApi = getCalendarRecordPermissionsApi(objectSchema, recordId);
8459
8883
  const recordSaveApi = getCalendarRecordSaveApi(objectSchema, calendarOptions);
@@ -8499,11 +8923,10 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
8499
8923
  "weight": 0,
8500
8924
  "actions": [
8501
8925
  {
8502
- "componentId": "",
8926
+ "actionType": "link",
8503
8927
  "args": {
8504
- },
8505
- "actionType": "custom",
8506
- "script": onEventClickScript
8928
+ "link": "/app/${appId}/${objectName}/view/${event.id}"
8929
+ }
8507
8930
  }
8508
8931
  ]
8509
8932
  },
@@ -8533,7 +8956,7 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
8533
8956
  "expression": "!event.data.editable",
8534
8957
  "args": {
8535
8958
  "msgType": "error",
8536
- "msg": "您没有编辑该记录的权限!",
8959
+ "msg": i18next.t('frontend_message_no_permission_to_edit'),
8537
8960
  "position": "top-center"
8538
8961
  }
8539
8962
  },
@@ -8543,8 +8966,8 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
8543
8966
  "args": {
8544
8967
  "api": recordSaveApi,
8545
8968
  "messages": {
8546
- "success": objectSchema.label + "修改成功",
8547
- "failed": objectSchema.label + "修改失败!"
8969
+ "success": objectSchema.label + i18next.t('frontend_message_modification_successful'),
8970
+ "failed": objectSchema.label + i18next.t('frontend_message_modification_successful')
8548
8971
  }
8549
8972
  }
8550
8973
  }
@@ -8616,7 +9039,12 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
8616
9039
  "initialView": initialView,
8617
9040
  "businessHours": businessHours,
8618
9041
  ...config,
8619
- "onEvent": onEvent
9042
+ "onEvent": onEvent,
9043
+ "views":{
9044
+ listWeek: {
9045
+ buttonText: i18next.t('frontend_calendar_listWeek')
9046
+ }
9047
+ }
8620
9048
  };
8621
9049
  return amisSchema;
8622
9050
  }
@@ -8635,7 +9063,7 @@ const getFieldSchemaArray = (formFields) => {
8635
9063
 
8636
9064
  _$1.forEach(formFields, (field) => {
8637
9065
  if (!field.group || field.group == 'null' || field.group == '-')
8638
- field.group = '通用';
9066
+ field.group = i18next.t('frontend_field_group_generalization');
8639
9067
  const fieldName = field.name;
8640
9068
  let isObjectField = /\w+\.\w+/.test(fieldName);
8641
9069
  if (field.type == 'grid' || field.type == 'object') {
@@ -8800,7 +9228,7 @@ function getBulkActions(objectSchema){
8800
9228
  "level": "danger",
8801
9229
  "label": "批量删除",
8802
9230
  "actionType": "ajax",
8803
- "confirmText": "确定要删除吗",
9231
+ "confirmText": i18next.t('frontend_delete_many_confirm_text'),
8804
9232
  "className": "hidden",
8805
9233
  "id": "batchDelete",
8806
9234
  "api": getBatchDelete(objectSchema.name),
@@ -10079,7 +10507,7 @@ async function getRecordDetailSchema(objectName, appId, props = {}){
10079
10507
  const uiSchema = await getUISchema(objectName);
10080
10508
  const relatedLists = await getObjectRelatedList(objectName);
10081
10509
  const detailed = {
10082
- "title": "详细",
10510
+ "title": i18next.t('frontend_record_detail_tab_detailed'),
10083
10511
  "className": "px-0 py-4",
10084
10512
  "body": [
10085
10513
  {
@@ -10094,7 +10522,7 @@ async function getRecordDetailSchema(objectName, appId, props = {}){
10094
10522
  "id": "u:5d4e7e3f6ecc"
10095
10523
  };
10096
10524
  const related = {
10097
- "title": "相关",
10525
+ "title": i18next.t('frontend_record_detail_tab_related'),
10098
10526
  "className": "px-0 pt-4",
10099
10527
  "body": [
10100
10528
  {