@titaui/pc 1.5.69-beta.2 → 1.5.69-beta.23
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/lib/components/avatar/icon-avatar/index.js +1 -1
- package/lib/components/avatar/index.js +5 -1
- package/lib/components/avatar/num-avatar/index.css +12 -0
- package/lib/components/avatar/num-avatar/index.js +34 -0
- package/lib/components/button/default-button/index.css +49 -0
- package/lib/components/button/default-button/index.js +51 -0
- package/lib/components/button/index.js +8 -2
- package/lib/components/communication/CommunicationRecord.js +110 -162
- package/lib/components/communication/index.css +4 -0
- package/lib/components/communication/index.js +34 -25
- package/lib/components/communication/style.js +1 -1
- package/lib/components/create-okr/index.css +4 -0
- package/lib/components/create-okr/index.js +43 -31
- package/lib/components/dropdown-layer/index.js +15 -12
- package/lib/components/dynamic/components/condition-render/index.js +20 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +6 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +4 -2
- package/lib/components/dynamic/components/obj-status/index.css +22 -0
- package/lib/components/dynamic/components/obj-status/index.js +38 -0
- package/lib/components/dynamic/components/percent/index.css +21 -0
- package/lib/components/dynamic/components/percent/index.js +38 -0
- package/lib/components/dynamic/components/title/index.css +35 -0
- package/lib/components/dynamic/{dynamic-item/components/publish-content → components/title}/index.js +27 -31
- package/lib/components/dynamic/constant.js +19 -2
- package/lib/components/dynamic/dynamic-item/components/{dynamic-item-header → header}/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/components/{dynamic-item-header → header}/index.js +97 -73
- package/lib/components/dynamic/dynamic-item/components/icon/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/icon/index.js +35 -0
- package/lib/components/dynamic/dynamic-item/{components/align → dynamic-align}/img/dynamic-align.svg +0 -0
- package/lib/components/dynamic/dynamic-item/{components/align → dynamic-align}/img/dynamic-relative.svg +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +173 -0
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +54 -0
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +48 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +89 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +96 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +171 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +67 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +110 -0
- package/lib/components/dynamic/dynamic-item/{components/task-project → dynamic-milestone}/constant.js +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +111 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +158 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +215 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-project}/img/project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +91 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +125 -0
- package/lib/components/dynamic/dynamic-item/{components/relative → dynamic-relative}/img/dynamic-relative.svg +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +192 -0
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +138 -0
- package/lib/components/dynamic/dynamic-item/{components/replay → dynamic-replay}/index.js +76 -11
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +153 -0
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +138 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +97 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +207 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +54 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/constant.js +13 -3
- package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-cancel.png +0 -0
- package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-delay.png +0 -0
- package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-done.png +0 -0
- package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-pause.png +0 -0
- package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-progress.png +0 -0
- package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-unaccept.png +0 -0
- package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-unstart.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +111 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +164 -0
- package/lib/components/dynamic/dynamic-item/index.css +34 -10
- package/lib/components/dynamic/dynamic-item/index.js +155 -85
- package/lib/components/dynamic/dynamic-like-ranking/index.css +11 -8
- package/lib/components/dynamic/dynamic-like-ranking/index.js +69 -20
- package/lib/components/dynamic/dynamic-like-ranking/item.js +28 -51
- package/lib/components/dynamic/dynamic-liking/index.css +1 -8
- package/lib/components/dynamic/dynamic-liking/index.js +10 -4
- package/lib/components/dynamic/dynamic-liking/item.js +46 -25
- package/lib/components/dynamic/dynamic-list/index.css +1 -1
- package/lib/components/dynamic/dynamic-list/index.js +9 -7
- package/lib/components/dynamic/dynamic-topping/index.css +0 -5
- package/lib/components/dynamic/dynamic-topping/index.js +1 -1
- package/lib/components/dynamic/dynamic-topping/item.js +13 -17
- package/lib/components/dynamic/dynamic.css +54 -0
- package/lib/components/dynamic/dynamic.js +126 -58
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/quick-operation/index.css +3 -1
- package/lib/components/dynamic/quick-operation/index.js +14 -4
- package/lib/components/dynamic/request-api.js +20 -8
- package/lib/components/dynamic/util.js +41 -7
- package/lib/components/file-list/components/single-file/index.css +3 -3
- package/lib/components/grid-page/personal-info/index.js +4 -4
- package/lib/components/img-viewer/index.css +1 -1
- package/lib/components/mblog/index.js +2 -2
- package/lib/components/mblog/style.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +48 -25
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +62 -24
- package/lib/components/publish-dynamic-modal/requist-api.js +17 -2
- package/lib/components/table/index.css +0 -1
- package/lib/components/upload/style.js +1 -1
- package/lib/components/upvote/index.js +26 -14
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +4 -0
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +8 -6
- package/lib/index.js +5 -1
- package/lib/pages/dynamic/index.css +1 -0
- package/lib/pages/like-ranking/column.js +33 -14
- package/lib/pages/like-ranking/filter-buttons/department.js +8 -11
- package/lib/pages/like-ranking/filter-buttons/group.js +34 -0
- package/lib/pages/like-ranking/filter-buttons/index.css +4 -8
- package/lib/pages/like-ranking/filter-buttons/index.js +18 -11
- package/lib/pages/like-ranking/filter-buttons/modular.js +51 -28
- package/lib/pages/like-ranking/filter-buttons/name.js +33 -6
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +17 -0
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +8 -2
- package/lib/pages/like-ranking/filter-buttons/timer.js +28 -46
- package/lib/pages/like-ranking/image/dynamic-empty.png +0 -0
- package/lib/pages/like-ranking/image/loading.gif +0 -0
- package/lib/pages/like-ranking/index.css +83 -4
- package/lib/pages/like-ranking/index.js +183 -22
- package/lib/pages/like-ranking/request-api.js +15 -0
- package/lib/utils/auth.js +16 -2
- package/lib/utils/bs-global.js +19 -2
- package/lib/utils/format-time.js +113 -8
- package/lib/utils/tools.js +50 -25
- package/package.json +1 -1
- package/lib/components/dynamic/components/common-title/index.css +0 -106
- package/lib/components/dynamic/components/common-title/index.js +0 -129
- package/lib/components/dynamic/dynamic-item/components/align/index.css +0 -66
- package/lib/components/dynamic/dynamic-item/components/align/index.js +0 -109
- package/lib/components/dynamic/dynamic-item/components/assessment/index.css +0 -20
- package/lib/components/dynamic/dynamic-item/components/assessment/index.js +0 -48
- package/lib/components/dynamic/dynamic-item/components/common-dynamic/index.css +0 -34
- package/lib/components/dynamic/dynamic-item/components/common-dynamic/index.js +0 -142
- package/lib/components/dynamic/dynamic-item/components/create-o/index.css +0 -52
- package/lib/components/dynamic/dynamic-item/components/create-o/index.js +0 -104
- package/lib/components/dynamic/dynamic-item/components/dynamic-desc/index.css +0 -62
- package/lib/components/dynamic/dynamic-item/components/dynamic-desc/index.js +0 -256
- package/lib/components/dynamic/dynamic-item/components/publish-content/index.css +0 -22
- package/lib/components/dynamic/dynamic-item/components/relative/index.css +0 -66
- package/lib/components/dynamic/dynamic-item/components/relative/index.js +0 -124
- package/lib/components/dynamic/dynamic-item/components/replay/index.css +0 -93
- package/lib/components/dynamic/dynamic-item/components/report/index.css +0 -32
- package/lib/components/dynamic/dynamic-item/components/report/index.js +0 -82
- package/lib/components/dynamic/dynamic-item/components/task-project/index.css +0 -57
- package/lib/components/dynamic/dynamic-item/components/task-project/index.js +0 -87
- package/lib/components/dynamic/dynamic-item/components/task-project-icon/index.css +0 -20
- package/lib/components/dynamic/dynamic-item/components/task-project-icon/index.js +0 -40
- package/lib/components/dynamic/dynamic-topping/mock.js +0 -1
- package/lib/pages/like-ranking/tab-bar/index.css +0 -22
- package/lib/pages/like-ranking/tab-bar/index.js +0 -65
|
@@ -34,7 +34,7 @@ var IconAvatar = function IconAvatar(_ref) {
|
|
|
34
34
|
className: "tita-icon-avatar"
|
|
35
35
|
}, /*#__PURE__*/_react["default"].createElement(_default2["default"], _extends({
|
|
36
36
|
userId: userId,
|
|
37
|
-
src: avatar.HasAvatar ? avatar.medium :
|
|
37
|
+
src: avatar.HasAvatar || avatar.hasAvatar ? avatar.medium : "",
|
|
38
38
|
color: avatar.color,
|
|
39
39
|
name: name
|
|
40
40
|
}, restProps)), /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = exports.IconAvatar = exports.NameAvatar = exports.DefaultAvatar = exports.TextAvatar = void 0;
|
|
6
|
+
exports["default"] = exports.NumAvatar = exports.IconAvatar = exports.NameAvatar = exports.DefaultAvatar = exports.TextAvatar = void 0;
|
|
7
7
|
|
|
8
8
|
var _default2 = _interopRequireDefault(require("./default"));
|
|
9
9
|
|
|
@@ -13,6 +13,8 @@ var _nameAvatar = _interopRequireDefault(require("./name-avatar"));
|
|
|
13
13
|
|
|
14
14
|
var _iconAvatar = _interopRequireDefault(require("./icon-avatar"));
|
|
15
15
|
|
|
16
|
+
var _numAvatar = _interopRequireDefault(require("./num-avatar"));
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
18
20
|
var TextAvatar = _textAvatar["default"];
|
|
@@ -23,5 +25,7 @@ var NameAvatar = _nameAvatar["default"];
|
|
|
23
25
|
exports.NameAvatar = NameAvatar;
|
|
24
26
|
var IconAvatar = _iconAvatar["default"];
|
|
25
27
|
exports.IconAvatar = IconAvatar;
|
|
28
|
+
var NumAvatar = _numAvatar["default"];
|
|
29
|
+
exports.NumAvatar = NumAvatar;
|
|
26
30
|
var _default = _default2["default"];
|
|
27
31
|
exports["default"] = _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _bsGlobal = require("../../../utils/bs-global");
|
|
11
|
+
|
|
12
|
+
require("./index.css");
|
|
13
|
+
|
|
14
|
+
var _excluded = ["num"];
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
|
+
|
|
22
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
|
+
|
|
24
|
+
var IconAvatar = function IconAvatar(_ref) {
|
|
25
|
+
var num = _ref.num,
|
|
26
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
+
|
|
28
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
29
|
+
className: "tita-num-avatar"
|
|
30
|
+
}, restProps), (0, _bsGlobal.formatNum)(num));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var _default = IconAvatar;
|
|
34
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.tita-button-small {
|
|
2
|
+
min-width: 64px;
|
|
3
|
+
height: 28px;
|
|
4
|
+
padding: 12px 4px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tita-button-middle {
|
|
8
|
+
min-width: 90px;
|
|
9
|
+
height: 32px;
|
|
10
|
+
padding: 12px 4px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tita-button-large {
|
|
14
|
+
min-width: 90px;
|
|
15
|
+
height: 36px;
|
|
16
|
+
padding: 16px 4px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.tita-button-primary {
|
|
20
|
+
background: #2879FF;
|
|
21
|
+
color: #ffffff;
|
|
22
|
+
border-radius: 4px;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
user-select: none;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.tita-button-primary:hover {
|
|
32
|
+
background: #5C8EFF;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.tita-button-default {
|
|
36
|
+
background: #ffffff;
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
border: 1px solid #2879FF;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
user-select: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.tita-button-default:hover {
|
|
48
|
+
background: #E9F1FF;
|
|
49
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
var _excluded = ["type", "children", "size", "className"];
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
+
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
|
+
|
|
30
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
+
|
|
32
|
+
var preCls = "tita-button";
|
|
33
|
+
|
|
34
|
+
var Button = function Button(_ref) {
|
|
35
|
+
var _ref$type = _ref.type,
|
|
36
|
+
type = _ref$type === void 0 ? "default" : _ref$type,
|
|
37
|
+
_ref$children = _ref.children,
|
|
38
|
+
children = _ref$children === void 0 ? "确定" : _ref$children,
|
|
39
|
+
_ref$size = _ref.size,
|
|
40
|
+
size = _ref$size === void 0 ? "middle" : _ref$size,
|
|
41
|
+
_ref$className = _ref.className,
|
|
42
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
43
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
44
|
+
|
|
45
|
+
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
46
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "-primary"), type === "primary"), _defineProperty({}, "".concat(preCls, "-default"), type === "default"), "".concat(preCls, "-").concat(size), className)
|
|
47
|
+
}, restProps), children));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var _default = Button;
|
|
51
|
+
exports["default"] = _default;
|
|
@@ -3,15 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ExportBtn = exports.AdminButton = void 0;
|
|
6
|
+
exports["default"] = exports.Default = exports.ExportBtn = exports.AdminButton = void 0;
|
|
7
7
|
|
|
8
8
|
var _adminButton = _interopRequireDefault(require("./admin-button"));
|
|
9
9
|
|
|
10
10
|
var _exportButton = _interopRequireDefault(require("./export-button"));
|
|
11
11
|
|
|
12
|
+
var _defaultButton = _interopRequireDefault(require("./default-button"));
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
15
|
|
|
14
16
|
var AdminButton = _adminButton["default"];
|
|
15
17
|
exports.AdminButton = AdminButton;
|
|
16
18
|
var ExportBtn = _exportButton["default"];
|
|
17
|
-
exports.ExportBtn = ExportBtn;
|
|
19
|
+
exports.ExportBtn = ExportBtn;
|
|
20
|
+
var Default = _defaultButton["default"];
|
|
21
|
+
exports.Default = Default;
|
|
22
|
+
var _default = Default;
|
|
23
|
+
exports["default"] = _default;
|
|
@@ -19,12 +19,12 @@ var _ConfirmPop = _interopRequireDefault(require("../delete-confirm-pop/ConfirmP
|
|
|
19
19
|
|
|
20
20
|
var _ConvertUserName = _interopRequireDefault(require("./ConvertUserName"));
|
|
21
21
|
|
|
22
|
-
var _requestV = require("../../utils/request-v1");
|
|
23
|
-
|
|
24
22
|
var _openData = require("../../utils/open-data");
|
|
25
23
|
|
|
26
24
|
var _fileList = _interopRequireDefault(require("../file-list"));
|
|
27
25
|
|
|
26
|
+
var _tools = require("../../utils/tools");
|
|
27
|
+
|
|
28
28
|
require("./index.css");
|
|
29
29
|
|
|
30
30
|
var _style = require("./style");
|
|
@@ -35,167 +35,115 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
35
35
|
|
|
36
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
37
|
|
|
38
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
39
|
-
|
|
40
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
41
|
-
|
|
42
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
43
|
-
|
|
44
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
45
|
-
|
|
46
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
47
|
-
|
|
48
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49
|
-
|
|
50
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
51
|
-
|
|
52
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
53
|
-
|
|
54
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
55
|
-
|
|
56
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
57
|
-
|
|
58
38
|
var prefix = "titaui-communication";
|
|
59
39
|
|
|
60
|
-
var CommunicationRecord =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
40
|
+
var CommunicationRecord = function CommunicationRecord(_ref) {
|
|
41
|
+
var communicationTrack = _ref.communicationTrack,
|
|
42
|
+
_ref$confirmPopAlign = _ref.confirmPopAlign,
|
|
43
|
+
confirmPopAlign = _ref$confirmPopAlign === void 0 ? "top right" : _ref$confirmPopAlign,
|
|
44
|
+
highLightKeyWord = _ref.highLightKeyWord,
|
|
45
|
+
index = _ref.index,
|
|
46
|
+
onCommunicationRecordChange = _ref.onCommunicationRecordChange,
|
|
47
|
+
className = _ref.className,
|
|
48
|
+
praiseStatus = _ref.praiseStatus;
|
|
49
|
+
var contentRef = (0, _react.useRef)();
|
|
50
|
+
(0, _react.useEffect)(function () {
|
|
51
|
+
(0, _tools.unHighLight)({
|
|
52
|
+
parentDom: contentRef.current
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
if (highLightKeyWord) {
|
|
56
|
+
(0, _tools.highLightWord)({
|
|
57
|
+
parentDom: contentRef.current,
|
|
58
|
+
keyWord: highLightKeyWord
|
|
80
59
|
});
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
_this.state = {
|
|
84
|
-
replyedContent: ""
|
|
85
|
-
};
|
|
86
|
-
return _this;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
_createClass(CommunicationRecord, [{
|
|
90
|
-
key: "componentWillMount",
|
|
91
|
-
value: function componentWillMount() {
|
|
92
|
-
var parentCommentId = this.props.communicationTrack.parentCommentId;
|
|
93
|
-
|
|
94
|
-
if (parentCommentId) {
|
|
95
|
-
this.getCommentGetByIds(parentCommentId);
|
|
96
|
-
}
|
|
97
|
-
} // 获取被回复人发布的沟通内容:“的话”上的tips信息
|
|
98
|
-
|
|
99
|
-
}, {
|
|
100
|
-
key: "render",
|
|
101
|
-
value: function render() {
|
|
102
|
-
var _this$props = this.props,
|
|
103
|
-
communicationTrack = _this$props.communicationTrack,
|
|
104
|
-
index = _this$props.index,
|
|
105
|
-
onCommunicationRecordChange = _this$props.onCommunicationRecordChange,
|
|
106
|
-
className = _this$props.className,
|
|
107
|
-
confirmPopAlign = _this$props.confirmPopAlign,
|
|
108
|
-
praiseStatus = _this$props.praiseStatus;
|
|
109
|
-
return /*#__PURE__*/_react["default"].createElement(_style.CommunicationItem, {
|
|
110
|
-
className: className
|
|
111
|
-
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
112
|
-
size: _avatar["default"].size(7),
|
|
113
|
-
name: communicationTrack.publishUser.name,
|
|
114
|
-
src: communicationTrack.publishUser.avatar.small,
|
|
115
|
-
color: communicationTrack.publishUser.avatar.color,
|
|
116
|
-
userId: communicationTrack.publishUser.userId
|
|
117
|
-
}), /*#__PURE__*/_react["default"].createElement(_style.CommunicationDetail, null, /*#__PURE__*/_react["default"].createElement("p", {
|
|
118
|
-
style: {
|
|
119
|
-
color: "#3a4247",
|
|
120
|
-
wordBreak: "break-all"
|
|
121
|
-
}
|
|
122
|
-
}, communicationTrack.commentType != 2 ? /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
|
|
123
|
-
userName: communicationTrack.publishUser.name,
|
|
124
|
-
userId: communicationTrack.publishUser.userId
|
|
125
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
126
|
-
className: prefix + "__communication-colon"
|
|
127
|
-
}, "\uFF1A")) : /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
|
|
128
|
-
userName: communicationTrack.publishUser.name,
|
|
129
|
-
userId: communicationTrack.publishUser.userId
|
|
130
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
131
|
-
className: prefix + "__communication-text"
|
|
132
|
-
}, "\u56DE\u590D"), /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
|
|
133
|
-
userName: communicationTrack.parentUser.name,
|
|
134
|
-
userId: communicationTrack.parentUser.userId
|
|
135
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
136
|
-
className: prefix + "__communication-colon"
|
|
137
|
-
}, "\uFF1A"), /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
|
|
138
|
-
html: true,
|
|
139
|
-
className: "tt-react-tooltip",
|
|
140
|
-
place: "top",
|
|
141
|
-
type: "dark",
|
|
142
|
-
effect: "solid"
|
|
143
|
-
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
144
|
-
className: prefix + "__communication-content"
|
|
145
|
-
}, (0, _openData.parseTag)(communicationTrack.content))), communicationTrack.attachments && /*#__PURE__*/_react["default"].createElement("div", {
|
|
146
|
-
className: prefix + "__communication-attachments"
|
|
147
|
-
}, /*#__PURE__*/_react["default"].createElement(_fileList["default"], {
|
|
148
|
-
data: communicationTrack.attachments
|
|
149
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
150
|
-
className: prefix + '__communication-bottom'
|
|
151
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
152
|
-
className: prefix + "__communication-time"
|
|
153
|
-
}, communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_style.CommunicationActionbar, {
|
|
154
|
-
className: "communication__actionbar"
|
|
155
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.ActionbarList, null, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
|
|
156
|
-
onMouseDown: function onMouseDown(event) {
|
|
157
|
-
praiseStatus != 2 && onCommunicationRecordChange(event, "reply", index);
|
|
158
|
-
}
|
|
159
|
-
}, "\u56DE\u590D"), /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
|
|
160
|
-
onMouseDown: function onMouseDown(event) {
|
|
161
|
-
praiseStatus != 2 && onCommunicationRecordChange(event, "praise", index);
|
|
162
|
-
}
|
|
163
|
-
}, communicationTrack.isPraise ? "已赞" : "点赞"), communicationTrack.praiseTotal > 0 &&
|
|
164
|
-
/*#__PURE__*/
|
|
165
|
-
// <ToolTip title='点击查看点赞记录'>
|
|
166
|
-
_react["default"].createElement(_style.CommunicationPraiseTotal, {
|
|
167
|
-
className: "communication__praise__total",
|
|
168
|
-
onMouseDown: function onMouseDown(event) {
|
|
169
|
-
onCommunicationRecordChange(event, "showPraiseRecord", index);
|
|
170
|
-
event.stopPropagation();
|
|
171
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
172
|
-
},
|
|
173
|
-
onClick: function onClick(event) {
|
|
174
|
-
event.stopPropagation();
|
|
175
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
176
|
-
},
|
|
177
|
-
"data-for": "praise-record",
|
|
178
|
-
"data-tip": !!communicationTrack.praiseTotal ? "点击查看点赞记录" : ""
|
|
179
|
-
}, communicationTrack.praiseTotal) // </ToolTip>
|
|
180
|
-
, communicationTrack.isEdit && /*#__PURE__*/_react["default"].createElement(_ConfirmPop["default"], {
|
|
181
|
-
align: confirmPopAlign,
|
|
182
|
-
onSubmit: function onSubmit(event) {
|
|
183
|
-
return onCommunicationRecordChange(event, "delete", index);
|
|
184
|
-
}
|
|
185
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, null, "\u5220\u9664")))))), /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
|
|
186
|
-
id: "praise-record",
|
|
187
|
-
className: "tt-react-tooltip",
|
|
188
|
-
place: "top",
|
|
189
|
-
type: "dark",
|
|
190
|
-
effect: "solid"
|
|
191
|
-
}));
|
|
192
60
|
}
|
|
193
|
-
}]);
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
61
|
+
}, [highLightKeyWord]);
|
|
62
|
+
return /*#__PURE__*/_react["default"].createElement(_style.CommunicationItem, {
|
|
63
|
+
className: className
|
|
64
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
65
|
+
size: _avatar["default"].size(7),
|
|
66
|
+
name: communicationTrack.publishUser.name,
|
|
67
|
+
src: communicationTrack.publishUser.avatar.small,
|
|
68
|
+
color: communicationTrack.publishUser.avatar.color,
|
|
69
|
+
userId: communicationTrack.publishUser.userId
|
|
70
|
+
}), /*#__PURE__*/_react["default"].createElement(_style.CommunicationDetail, null, /*#__PURE__*/_react["default"].createElement("p", {
|
|
71
|
+
style: {
|
|
72
|
+
color: "#3a4247",
|
|
73
|
+
wordBreak: "break-all"
|
|
74
|
+
}
|
|
75
|
+
}, communicationTrack.commentType != 2 ? /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
|
|
76
|
+
userName: communicationTrack.publishUser.name,
|
|
77
|
+
userId: communicationTrack.publishUser.userId
|
|
78
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
79
|
+
className: prefix + "__communication-colon"
|
|
80
|
+
}, "\uFF1A")) : /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
|
|
81
|
+
userName: communicationTrack.publishUser.name,
|
|
82
|
+
userId: communicationTrack.publishUser.userId
|
|
83
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
84
|
+
className: prefix + "__communication-text"
|
|
85
|
+
}, "\u56DE\u590D"), /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
|
|
86
|
+
userName: communicationTrack.parentUser.name,
|
|
87
|
+
userId: communicationTrack.parentUser.userId
|
|
88
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
89
|
+
className: prefix + "__communication-colon"
|
|
90
|
+
}, "\uFF1A"), /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
|
|
91
|
+
html: true,
|
|
92
|
+
className: "tt-react-tooltip",
|
|
93
|
+
place: "top",
|
|
94
|
+
type: "dark",
|
|
95
|
+
effect: "solid"
|
|
96
|
+
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
97
|
+
className: prefix + "__communication-content",
|
|
98
|
+
ref: contentRef
|
|
99
|
+
}, (0, _openData.parseTag)(communicationTrack.content))), communicationTrack.attachments && /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
|
+
className: prefix + "__communication-attachments"
|
|
101
|
+
}, /*#__PURE__*/_react["default"].createElement(_fileList["default"], {
|
|
102
|
+
data: communicationTrack.attachments
|
|
103
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
|
+
className: prefix + "__communication-bottom"
|
|
105
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
106
|
+
className: prefix + "__communication-time"
|
|
107
|
+
}, communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_style.CommunicationActionbar, {
|
|
108
|
+
className: "communication__actionbar"
|
|
109
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.ActionbarList, null, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
|
|
110
|
+
onMouseDown: function onMouseDown(event) {
|
|
111
|
+
praiseStatus != 2 && onCommunicationRecordChange(event, "reply", index);
|
|
112
|
+
}
|
|
113
|
+
}, "\u56DE\u590D"), /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
|
|
114
|
+
onMouseDown: function onMouseDown(event) {
|
|
115
|
+
praiseStatus != 2 && onCommunicationRecordChange(event, "praise", index);
|
|
116
|
+
}
|
|
117
|
+
}, communicationTrack.isPraise ? "已赞" : "点赞"), communicationTrack.praiseTotal > 0 &&
|
|
118
|
+
/*#__PURE__*/
|
|
119
|
+
// <ToolTip title='点击查看点赞记录'>
|
|
120
|
+
_react["default"].createElement(_style.CommunicationPraiseTotal, {
|
|
121
|
+
className: "communication__praise__total",
|
|
122
|
+
onMouseDown: function onMouseDown(event) {
|
|
123
|
+
onCommunicationRecordChange(event, "showPraiseRecord", index);
|
|
124
|
+
event.stopPropagation();
|
|
125
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
126
|
+
},
|
|
127
|
+
onClick: function onClick(event) {
|
|
128
|
+
event.stopPropagation();
|
|
129
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
130
|
+
},
|
|
131
|
+
"data-for": "praise-record",
|
|
132
|
+
"data-tip": !!communicationTrack.praiseTotal ? "点击查看点赞记录" : ""
|
|
133
|
+
}, communicationTrack.praiseTotal) // </ToolTip>
|
|
134
|
+
, communicationTrack.isEdit && /*#__PURE__*/_react["default"].createElement(_ConfirmPop["default"], {
|
|
135
|
+
align: confirmPopAlign,
|
|
136
|
+
onSubmit: function onSubmit(event) {
|
|
137
|
+
return onCommunicationRecordChange(event, "delete", index);
|
|
138
|
+
}
|
|
139
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, null, "\u5220\u9664")))))), /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
|
|
140
|
+
id: "praise-record",
|
|
141
|
+
className: "tt-react-tooltip",
|
|
142
|
+
place: "top",
|
|
143
|
+
type: "dark",
|
|
144
|
+
effect: "solid"
|
|
145
|
+
}));
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
var _default = CommunicationRecord;
|
|
149
|
+
exports["default"] = _default;
|