dtable-ui-component 0.3.22-beta.1 → 0.3.22-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import { getLocale } from '../lang';
|
|
4
3
|
import './index.css';
|
|
5
4
|
function DepartmentSingleSelectFormatter(props) {
|
|
6
5
|
var value = props.value,
|
|
7
6
|
departments = props.departments,
|
|
8
|
-
containerClassName = props.containerClassName
|
|
7
|
+
containerClassName = props.containerClassName,
|
|
8
|
+
tip = props.tip;
|
|
9
9
|
if (!value) return null;
|
|
10
|
+
var deletedTip = tip || 'Deleted department';
|
|
10
11
|
var department = departments.find(function (department) {
|
|
11
12
|
return department.id === value;
|
|
12
13
|
});
|
|
13
|
-
var name = department ? department.name :
|
|
14
|
-
var classname = classnames('dtable-ui cell-formatter-container department-single-select-formatter text-truncate', containerClassName);
|
|
14
|
+
var name = department ? department.name : deletedTip;
|
|
15
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
-
className:
|
|
16
|
+
className: classnames('dtable-ui cell-formatter-container department-single-select-formatter text-truncate', containerClassName)
|
|
17
17
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18
18
|
className: "department-avatar-container d-flex align-items-center justify-content-center"
|
|
19
19
|
}, /*#__PURE__*/React.createElement("span", {
|
package/lib/locals/en.js
CHANGED
|
@@ -16,7 +16,6 @@ var en = {
|
|
|
16
16
|
Are_you_sure_you_want_to_delete_this_file: 'Are you sure you want to delete this file?',
|
|
17
17
|
Are_you_sure_you_want_to_delete_this_image: 'Are you sure you want to delete this image?',
|
|
18
18
|
Cancel: 'Cancel',
|
|
19
|
-
Delete: 'Delete'
|
|
20
|
-
Deleted_department: 'Deleted department'
|
|
19
|
+
Delete: 'Delete'
|
|
21
20
|
};
|
|
22
21
|
export default en;
|
package/lib/locals/zh-CN.js
CHANGED