dtable-ui-component 0.3.21-beta.1 → 0.3.22-beta.1
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,16 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
2
3
|
import { getLocale } from '../lang';
|
|
3
4
|
import './index.css';
|
|
4
5
|
function DepartmentSingleSelectFormatter(props) {
|
|
5
6
|
var value = props.value,
|
|
6
|
-
departments = props.departments
|
|
7
|
+
departments = props.departments,
|
|
8
|
+
containerClassName = props.containerClassName;
|
|
7
9
|
if (!value) return null;
|
|
8
10
|
var department = departments.find(function (department) {
|
|
9
11
|
return department.id === value;
|
|
10
12
|
});
|
|
11
13
|
var name = department ? department.name : getLocale('Deleted_department');
|
|
14
|
+
var classname = classnames('dtable-ui cell-formatter-container department-single-select-formatter text-truncate', containerClassName);
|
|
12
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className:
|
|
16
|
+
className: classname
|
|
14
17
|
}, /*#__PURE__*/React.createElement("div", {
|
|
15
18
|
className: "department-avatar-container d-flex align-items-center justify-content-center"
|
|
16
19
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -4,6 +4,7 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import { Tooltip } from 'reactstrap';
|
|
7
|
+
import MediaQuery from 'react-responsive';
|
|
7
8
|
import { getLocale } from '../lang';
|
|
8
9
|
import DeleteTip from '../common/delete-tip';
|
|
9
10
|
var RowExpandImageItemFormatter = /*#__PURE__*/function (_Component) {
|
|
@@ -91,7 +92,9 @@ var RowExpandImageItemFormatter = /*#__PURE__*/function (_Component) {
|
|
|
91
92
|
toggle: this.closeDeleteTip,
|
|
92
93
|
onDelete: this.onDelete,
|
|
93
94
|
deleteTip: getLocale('Are_you_sure_you_want_to_delete_this_image')
|
|
94
|
-
}), /*#__PURE__*/React.createElement(
|
|
95
|
+
}), /*#__PURE__*/React.createElement(MediaQuery, {
|
|
96
|
+
query: '(min-width: 768px)'
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
95
98
|
placement: "bottom",
|
|
96
99
|
isOpen: this.state.isTooltipOpen,
|
|
97
100
|
toggle: this.toggleTooltip,
|
|
@@ -101,7 +104,7 @@ var RowExpandImageItemFormatter = /*#__PURE__*/function (_Component) {
|
|
|
101
104
|
hide: 0
|
|
102
105
|
},
|
|
103
106
|
fade: false
|
|
104
|
-
}, name));
|
|
107
|
+
}, name)));
|
|
105
108
|
}
|
|
106
109
|
}]);
|
|
107
110
|
return RowExpandImageItemFormatter;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.22-beta.1",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "2.0.4",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"classnames": "^2.3.2",
|
|
12
12
|
"dayjs": "1.10.7",
|
|
13
13
|
"deepmerge": "^2.1.0",
|
|
14
|
-
"dtable-utils": "4.2.
|
|
14
|
+
"dtable-utils": "4.2.4",
|
|
15
15
|
"glamor": "^2.20.40",
|
|
16
16
|
"hast-util-sanitize": "^1.1.2",
|
|
17
17
|
"hast-util-to-html": "3.1.0",
|