@titaui/pc 1.11.13-beta.2 → 1.11.14-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.
- package/.husky/pre-commit +1 -1
- package/lib/components/avatar/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/button/rect-btn/index.css +11 -25
- package/lib/components/button/rect-btn/index.js +4 -8
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -41
- package/lib/components/drawer/index.css +0 -44
- package/lib/components/drawer/index.js +6 -35
- package/lib/components/dynamic/constant.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/index.js +14 -2
- package/lib/components/dynamic/dynamic-list/index.js +1 -9
- package/lib/components/icon-button-list/index.css +1 -56
- package/lib/components/icon-button-list/index.js +8 -5
- package/lib/components/nav-top/index.js +2 -6
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -16
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -9
- package/lib/components/okr-detail/components/header/o-name.js +3 -9
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +6 -9
- package/lib/components/okr-detail/detail-header/index.js +1 -12
- package/lib/components/okr-detail/index.js +2 -21
- package/lib/components/okr-detail/okr-list/index.js +2 -7
- package/lib/components/okr-detail/request-apis.js +1 -7
- package/lib/components/okr-flow/child-node/index.css +2 -0
- package/lib/components/okr-flow/child-node/work-node.js +3 -1
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/okrcase-library/index.css +6 -4
- package/lib/index.js +0 -40
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -28
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +1 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +14 -9
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +1 -1
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/helper.js +0 -62
- package/lib/components/textarea/index.css +0 -120
- package/lib/components/textarea/index.js +0 -257
- package/lib/pages/new-okr-list/header/common.js +0 -52
- package/lib/pages/new-okr-list/header/operate-record.js +0 -88
package/.husky/pre-commit
CHANGED
|
@@ -58,10 +58,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
58
58
|
onDelUser = props.onDelUser,
|
|
59
59
|
_props$textWidth = props.textWidth,
|
|
60
60
|
textWidth = _props$textWidth === void 0 ? 42 : _props$textWidth,
|
|
61
|
-
textClass = props.textClass
|
|
62
|
-
renderRightTopCmp = props.renderRightTopCmp,
|
|
63
|
-
_props$avatarTips = props.avatarTips,
|
|
64
|
-
avatarTips = _props$avatarTips === void 0 ? '' : _props$avatarTips;
|
|
61
|
+
textClass = props.textClass;
|
|
65
62
|
var hasAvatar = src && !src.match(/default\w*.jpg$/);
|
|
66
63
|
|
|
67
64
|
var _useState = (0, _react.useState)(false),
|
|
@@ -106,7 +103,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
106
103
|
style: {
|
|
107
104
|
width: size.width,
|
|
108
105
|
height: size.width,
|
|
109
|
-
verticalAlign:
|
|
106
|
+
verticalAlign: "top"
|
|
110
107
|
},
|
|
111
108
|
src: src
|
|
112
109
|
});
|
|
@@ -123,11 +120,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
123
120
|
}
|
|
124
121
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
122
|
style: {
|
|
126
|
-
display:
|
|
123
|
+
display: "inline-block",
|
|
127
124
|
width: "".concat(size.fontSize, "px"),
|
|
128
|
-
margin:
|
|
129
|
-
overflow:
|
|
130
|
-
whiteSpace:
|
|
125
|
+
margin: "0 auto",
|
|
126
|
+
overflow: "hidden",
|
|
127
|
+
whiteSpace: "nowrap",
|
|
131
128
|
fontSize: "".concat(size.fontSize, "px"),
|
|
132
129
|
lineHeight: "".concat(size.width, "px")
|
|
133
130
|
}
|
|
@@ -137,7 +134,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
137
134
|
})));
|
|
138
135
|
}
|
|
139
136
|
|
|
140
|
-
var cuttedName =
|
|
137
|
+
var cuttedName = "";
|
|
141
138
|
var cuttedNameLen = 0;
|
|
142
139
|
|
|
143
140
|
for (var i = 0, lent = name.length; i < lent; i++) {
|
|
@@ -170,11 +167,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
170
167
|
className: "titaui-pc-avator__name-avatar-container",
|
|
171
168
|
onMouseEnter: handleMouseEnter,
|
|
172
169
|
onMouseLeave: handleMouseLeave
|
|
173
|
-
},
|
|
170
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
174
171
|
onClick: handleDelUser,
|
|
175
172
|
onMouseLeave: handleCloseIconMouseLeave,
|
|
176
173
|
onMouseEnter: handleCloseIconMouseEnter,
|
|
177
|
-
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ?
|
|
174
|
+
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ? "titaui-pc-avator--enter" : ""),
|
|
178
175
|
style: {
|
|
179
176
|
left: "".concat(size.width - 14, "px")
|
|
180
177
|
}
|
|
@@ -188,10 +185,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
188
185
|
onClick: onClick,
|
|
189
186
|
onMouseEnter: onMouseEnter,
|
|
190
187
|
onMouseLeave: onMouseLeave
|
|
191
|
-
},
|
|
192
|
-
overlay: avatarTips,
|
|
193
|
-
placement: "top"
|
|
194
|
-
}, hasAvatar ? renderImgAvatar() : renderTextAvatar()), !avatarTips && (hasAvatar ? renderImgAvatar() : renderTextAvatar())), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
188
|
+
}, hasAvatar ? renderImgAvatar() : renderTextAvatar()), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
195
189
|
overlay: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
196
190
|
name: name,
|
|
197
191
|
id: userId
|
|
@@ -200,17 +194,14 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
200
194
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
201
195
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
202
196
|
style: {
|
|
203
|
-
|
|
197
|
+
width: textWidth
|
|
204
198
|
}
|
|
205
199
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
206
200
|
ref: textRef
|
|
207
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
208
|
-
name: name,
|
|
209
|
-
id: userId
|
|
210
|
-
})))) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
201
|
+
}, name))) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
211
202
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
212
203
|
style: {
|
|
213
|
-
|
|
204
|
+
width: textWidth
|
|
214
205
|
}
|
|
215
206
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
216
207
|
ref: textRef
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
align-items: center;
|
|
14
14
|
justify-content: center;
|
|
15
15
|
min-width: 64px;
|
|
16
|
-
font-size:
|
|
16
|
+
font-size: 13px;
|
|
17
17
|
padding: 0 12px;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -60,35 +60,21 @@
|
|
|
60
60
|
background: #5c8eff;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.titaui-rect-btn--secondary {
|
|
64
|
-
font-size: 14px;
|
|
65
|
-
font-weight: normal;
|
|
66
|
-
color: #2879ff;
|
|
67
|
-
line-height: 28px;
|
|
68
|
-
background: rgba(40, 121, 255, 0.2);
|
|
69
|
-
margin-right: 16px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.titaui-rect-btn--secondary:hover {
|
|
73
|
-
color: #fff;
|
|
74
|
-
background-color: #2879ff;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
63
|
.titaui-rect-btn--cancel {
|
|
78
|
-
color: #
|
|
79
|
-
border: 1px solid #
|
|
80
|
-
background: #
|
|
64
|
+
color: #6F7886;
|
|
65
|
+
border: 1px solid #DFE3EA;
|
|
66
|
+
background: #FFFFFF;
|
|
81
67
|
}
|
|
82
68
|
|
|
83
69
|
.titaui-rect-btn--cancel:hover {
|
|
84
|
-
color: #
|
|
85
|
-
border: 1px solid #
|
|
70
|
+
color: #2879FF;
|
|
71
|
+
border: 1px solid #2879FF;
|
|
86
72
|
}
|
|
87
73
|
|
|
88
74
|
.titaui-rect-btn--delete {
|
|
89
|
-
background: #
|
|
90
|
-
color: #
|
|
91
|
-
border: 1px solid #
|
|
75
|
+
background: #FFFFFF;
|
|
76
|
+
color: #F05E5E;
|
|
77
|
+
border: 1px solid #F05E5E;
|
|
92
78
|
}
|
|
93
79
|
|
|
94
80
|
.titaui-rect-btn--delete:hover {
|
|
@@ -107,10 +93,10 @@
|
|
|
107
93
|
}
|
|
108
94
|
|
|
109
95
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled {
|
|
110
|
-
background: #
|
|
96
|
+
background: #93BCFF;
|
|
111
97
|
opacity: 1;
|
|
112
98
|
}
|
|
113
99
|
|
|
114
100
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled:hover {
|
|
115
|
-
background: #
|
|
101
|
+
background: #93BCFF;
|
|
116
102
|
}
|
|
@@ -34,8 +34,7 @@ function RectBtn(props) {
|
|
|
34
34
|
className = _props$className === void 0 ? "" : _props$className,
|
|
35
35
|
_props$disabled = props.disabled,
|
|
36
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
37
|
-
style = props.style
|
|
38
|
-
children = props.children;
|
|
37
|
+
style = props.style;
|
|
39
38
|
|
|
40
39
|
var renderIcon = function renderIcon() {
|
|
41
40
|
if (typeof icon === "string") {
|
|
@@ -51,19 +50,16 @@ function RectBtn(props) {
|
|
|
51
50
|
}, icon);
|
|
52
51
|
};
|
|
53
52
|
|
|
54
|
-
var onClickHandler = function onClickHandler(
|
|
53
|
+
var onClickHandler = function onClickHandler() {
|
|
55
54
|
if (disabled) return;
|
|
56
|
-
|
|
57
|
-
if (onClick) {
|
|
58
|
-
onClick(e);
|
|
59
|
-
}
|
|
55
|
+
onClick && onClick();
|
|
60
56
|
};
|
|
61
57
|
|
|
62
58
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
63
59
|
className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled), className),
|
|
64
60
|
style: style,
|
|
65
61
|
onClick: onClickHandler
|
|
66
|
-
}, icon && renderIcon(), children || text);
|
|
62
|
+
}, icon && renderIcon(), props.children || text);
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
var _default = RectBtn;
|
|
@@ -46,7 +46,7 @@ var createWidthKr = /*#__PURE__*/function () {
|
|
|
46
46
|
while (1) {
|
|
47
47
|
switch (_context.prev = _context.next) {
|
|
48
48
|
case 0:
|
|
49
|
-
url = "".concat(requestDomain(), "/api/
|
|
49
|
+
url = "".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/work/createWithKr");
|
|
50
50
|
_context.next = 3;
|
|
51
51
|
return _axios["default"].post(url, _objectSpread({
|
|
52
52
|
workType: 6
|
|
@@ -49,9 +49,7 @@ function HeaderAction(_ref) {
|
|
|
49
49
|
_onClick = _ref.onClick,
|
|
50
50
|
className = _ref.className,
|
|
51
51
|
title = _ref.title,
|
|
52
|
-
children = _ref.children
|
|
53
|
-
approvalSetting = _ref.approvalSetting,
|
|
54
|
-
detailInfo = _ref.detailInfo;
|
|
52
|
+
children = _ref.children;
|
|
55
53
|
|
|
56
54
|
var _useState = (0, _react.useState)(false),
|
|
57
55
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -101,8 +99,6 @@ function HeaderAction(_ref) {
|
|
|
101
99
|
if (children && children.length > 0) {
|
|
102
100
|
content = /*#__PURE__*/_react["default"].createElement(_headerDrop["default"], {
|
|
103
101
|
visible: dropVisible,
|
|
104
|
-
detailInfo: detailInfo,
|
|
105
|
-
approvalSetting: approvalSetting,
|
|
106
102
|
onVisibleChange: function onVisibleChange(visible) {
|
|
107
103
|
active.current = visible;
|
|
108
104
|
!visible && setDropVisible(false);
|
|
@@ -9,8 +9,6 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _helper = require("../okr-detail/helper");
|
|
13
|
-
|
|
14
12
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -46,9 +44,7 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
46
44
|
colorInDrop = _ref.colorInDrop,
|
|
47
45
|
hoverColorInDrop = _ref.hoverColorInDrop,
|
|
48
46
|
_onClick = _ref.onClick,
|
|
49
|
-
onClose = _ref.onClose
|
|
50
|
-
approvalSetting = _ref.approvalSetting,
|
|
51
|
-
detailInfo = _ref.detailInfo;
|
|
47
|
+
onClose = _ref.onClose;
|
|
52
48
|
|
|
53
49
|
var _useState = (0, _react.useState)(false),
|
|
54
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -56,36 +52,7 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
56
52
|
setHover = _useState2[1];
|
|
57
53
|
|
|
58
54
|
var hasIcon = !!icon && typeof icon === "string";
|
|
59
|
-
|
|
60
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, icon === 'tu-icon-del' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _helper.getApprovalIsShow)(approvalSetting, 'deleteOkr', applyState) ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
61
|
-
className: "header-drop-item",
|
|
62
|
-
style: {
|
|
63
|
-
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
64
|
-
},
|
|
65
|
-
onClick: function onClick(e) {
|
|
66
|
-
_onClick && _onClick(e);
|
|
67
|
-
onClose(false);
|
|
68
|
-
},
|
|
69
|
-
onMouseOver: function onMouseOver() {
|
|
70
|
-
return setHover(true);
|
|
71
|
-
},
|
|
72
|
-
onMouseOut: function onMouseOut() {
|
|
73
|
-
return setHover(false);
|
|
74
|
-
}
|
|
75
|
-
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
|
-
className: "header-drop-item-icon",
|
|
77
|
-
style: {
|
|
78
|
-
color: hover ? hoverIconColorInDrop || hoverColorInDrop || hoverColor : iconColorInDrop || colorInDrop || color
|
|
79
|
-
}
|
|
80
|
-
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
|
-
className: icon
|
|
82
|
-
}) : icon), title) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
|
-
className: "header-drop-item-approval"
|
|
84
|
-
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
|
-
className: "header-drop-item-icon"
|
|
86
|
-
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
87
|
-
className: icon
|
|
88
|
-
}) : icon), title)) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
55
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
56
|
className: "header-drop-item",
|
|
90
57
|
style: {
|
|
91
58
|
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
@@ -107,23 +74,19 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
107
74
|
}
|
|
108
75
|
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
109
76
|
className: icon
|
|
110
|
-
}) : icon), title)
|
|
77
|
+
}) : icon), title);
|
|
111
78
|
};
|
|
112
79
|
|
|
113
80
|
var HeaderDrop = function HeaderDrop(_ref2) {
|
|
114
81
|
var visible = _ref2.visible,
|
|
115
82
|
onVisibleChange = _ref2.onVisibleChange,
|
|
116
83
|
items = _ref2.items,
|
|
117
|
-
children = _ref2.children
|
|
118
|
-
approvalSetting = _ref2.approvalSetting,
|
|
119
|
-
detailInfo = _ref2.detailInfo;
|
|
84
|
+
children = _ref2.children;
|
|
120
85
|
var renderDrop = (0, _react.useMemo)(function () {
|
|
121
86
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
87
|
className: "titaui-drawer-header-action-drop-wrapper"
|
|
123
88
|
}, items.map(function (item) {
|
|
124
89
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropItem, _extends({}, item, {
|
|
125
|
-
detailInfo: detailInfo,
|
|
126
|
-
approvalSetting: approvalSetting,
|
|
127
90
|
onClose: function onClose() {
|
|
128
91
|
return onVisibleChange(false);
|
|
129
92
|
}
|
|
@@ -48,17 +48,6 @@
|
|
|
48
48
|
background: linear-gradient(180deg, rgba(191, 199, 213, 0) 0%, #BFC7D5 50%, rgba(240, 242, 245, 0) 100%);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.titaui-drawer-header-status {
|
|
52
|
-
display: inline-flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
justify-content: center;
|
|
55
|
-
border-radius: 16px;
|
|
56
|
-
width: 68px;
|
|
57
|
-
height: 28px;
|
|
58
|
-
margin-right: 18px;
|
|
59
|
-
font-size: 12px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
51
|
.titaui-drawer-header-action {
|
|
63
52
|
font-size: 18px;
|
|
64
53
|
color: #a4acb9;
|
|
@@ -175,39 +164,6 @@
|
|
|
175
164
|
background-repeat: no-repeat;
|
|
176
165
|
}
|
|
177
166
|
|
|
178
|
-
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval {
|
|
179
|
-
height: 32px;
|
|
180
|
-
display: flex;
|
|
181
|
-
align-items: center;
|
|
182
|
-
padding: 0 23px;
|
|
183
|
-
cursor: pointer;
|
|
184
|
-
color: #BFC7D5;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon {
|
|
188
|
-
font-size: 18px;
|
|
189
|
-
color: inherit;
|
|
190
|
-
width: 18px;
|
|
191
|
-
height: 18px;
|
|
192
|
-
cursor: pointer;
|
|
193
|
-
margin-right: 10px;
|
|
194
|
-
background-size: contain;
|
|
195
|
-
background-position: center center;
|
|
196
|
-
background-repeat: no-repeat;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon > span {
|
|
200
|
-
display: flex;
|
|
201
|
-
align-items: center;
|
|
202
|
-
justify-content: center;
|
|
203
|
-
color: inherit;
|
|
204
|
-
width: 18px;
|
|
205
|
-
height: 18px;
|
|
206
|
-
background-size: contain;
|
|
207
|
-
background-position: center center;
|
|
208
|
-
background-repeat: no-repeat;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
167
|
.drawer-left .drawer-content-wrapper,
|
|
212
168
|
.drawer-right .drawer-content-wrapper,
|
|
213
169
|
.drawer-left .drawer-content,
|
|
@@ -25,9 +25,7 @@ require("./index.css");
|
|
|
25
25
|
|
|
26
26
|
var _context = _interopRequireDefault(require("../drawer-manager/context"));
|
|
27
27
|
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex", "autoClosable"];
|
|
28
|
+
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex"];
|
|
31
29
|
|
|
32
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
31
|
|
|
@@ -56,7 +54,7 @@ var Drawer = function Drawer(props) {
|
|
|
56
54
|
|
|
57
55
|
var visible = props.visible,
|
|
58
56
|
_props$placement = props.placement,
|
|
59
|
-
placement = _props$placement === void 0 ?
|
|
57
|
+
placement = _props$placement === void 0 ? "right" : _props$placement,
|
|
60
58
|
children = props.children,
|
|
61
59
|
_props$mask = props.mask,
|
|
62
60
|
mask = _props$mask === void 0 ? false : _props$mask,
|
|
@@ -72,8 +70,6 @@ var Drawer = function Drawer(props) {
|
|
|
72
70
|
bodyStyle = props.bodyStyle,
|
|
73
71
|
_props$zIndex = props.zIndex,
|
|
74
72
|
zIndex = _props$zIndex === void 0 ? 1200 : _props$zIndex,
|
|
75
|
-
_props$autoClosable = props.autoClosable,
|
|
76
|
-
autoClosable = _props$autoClosable === void 0 ? false : _props$autoClosable,
|
|
77
73
|
rest = _objectWithoutProperties(props, _excluded);
|
|
78
74
|
|
|
79
75
|
var handleAfterVisibleChange = (0, _react.useCallback)(function (opened) {
|
|
@@ -93,20 +89,6 @@ var Drawer = function Drawer(props) {
|
|
|
93
89
|
return children;
|
|
94
90
|
}
|
|
95
91
|
|
|
96
|
-
var autoClose = function autoClose(e) {
|
|
97
|
-
if ((0, _dom.hasAncestorElement)(e.target, 'document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add')) return;
|
|
98
|
-
onClose();
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
(0, _react.useEffect)(function () {
|
|
102
|
-
if (autoClosable) {
|
|
103
|
-
document.addEventListener('mousedown', autoClose);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return function () {
|
|
107
|
-
document.removeEventListener('mousedown', autoClose);
|
|
108
|
-
};
|
|
109
|
-
}, []);
|
|
110
92
|
return /*#__PURE__*/_react["default"].createElement(DrawerContext.Provider, {
|
|
111
93
|
value: {
|
|
112
94
|
close: function close() {
|
|
@@ -114,7 +96,7 @@ var Drawer = function Drawer(props) {
|
|
|
114
96
|
}
|
|
115
97
|
}
|
|
116
98
|
}, /*#__PURE__*/_react["default"].createElement(_rcDrawer["default"], _extends({
|
|
117
|
-
className: (0, _classnames["default"])(
|
|
99
|
+
className: (0, _classnames["default"])("titaui-drawer", "document-mouse-event-ignore", className),
|
|
118
100
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
119
101
|
zIndex: zIndex
|
|
120
102
|
})
|
|
@@ -141,9 +123,6 @@ function DrawerHeader(_ref) {
|
|
|
141
123
|
content = _ref.content,
|
|
142
124
|
style = _ref.style,
|
|
143
125
|
onClose = _ref.onClose,
|
|
144
|
-
status = _ref.status,
|
|
145
|
-
approvalSetting = _ref.approvalSetting,
|
|
146
|
-
detailInfo = _ref.detailInfo,
|
|
147
126
|
actionComponent = _ref.actionComponent;
|
|
148
127
|
var drawer = (0, _react.useContext)(DrawerContext);
|
|
149
128
|
var manager = (0, _react.useContext)(_context["default"]);
|
|
@@ -167,24 +146,16 @@ function DrawerHeader(_ref) {
|
|
|
167
146
|
onClick: manager && manager.goBack
|
|
168
147
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
169
148
|
className: "tu-icon-fanhui"
|
|
170
|
-
}), (0, _getLocale.getLocale)(
|
|
149
|
+
}), (0, _getLocale.getLocale)("Mod_Back")), showBackBtn && hasContent && /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
150
|
className: "titaui-drawer-header-divider"
|
|
172
151
|
}), hasContent && content, /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
152
|
style: {
|
|
174
153
|
flex: 1
|
|
175
154
|
}
|
|
176
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent),
|
|
177
|
-
className: "titaui-drawer-header-status",
|
|
178
|
-
style: {
|
|
179
|
-
color: status.color.color,
|
|
180
|
-
backgroundColor: status.color.bgColor
|
|
181
|
-
}
|
|
182
|
-
}, status.title), displayActions.map(function (action) {
|
|
155
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
|
|
183
156
|
return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
|
|
184
157
|
}), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
|
|
185
|
-
|
|
186
|
-
detailInfo: detailInfo,
|
|
187
|
-
title: (0, _getLocale.getLocale)('Mod_MoreOperate'),
|
|
158
|
+
title: (0, _getLocale.getLocale)("Mod_MoreOperate"),
|
|
188
159
|
icon: "tu-icon-10",
|
|
189
160
|
children: collapsedActions
|
|
190
161
|
}), showClose && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getObjTypeMapText = exports.OkrRiskMapping = exports.ObjectType = exports.EStatusStatus2ClassType = exports.EShareType = exports.EObjType = exports.EFeedType = void 0;
|
|
6
|
+
exports.getObjTypeMapText = exports.PlanReportType = exports.OkrRiskMapping = exports.ObjectType = exports.EStatusStatus2ClassType = exports.EShareType = exports.EObjType = exports.EFeedType = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../utils/getLocale");
|
|
9
9
|
|
|
@@ -117,4 +117,6 @@ var EStatusStatus2ClassType = {
|
|
|
117
117
|
0: "tu-icon-notstart",
|
|
118
118
|
5: "tu-icon-jiantou-right"
|
|
119
119
|
};
|
|
120
|
-
exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
|
|
120
|
+
exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
|
|
121
|
+
var PlanReportType = ["titaPlanReport"];
|
|
122
|
+
exports.PlanReportType = PlanReportType;
|
|
@@ -75,7 +75,7 @@ var DynamicKr = function DynamicKr(_ref) {
|
|
|
75
75
|
className: "".concat(prefix, "__object-name"),
|
|
76
76
|
onClick: handleClickOTitle
|
|
77
77
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
78
|
-
text: data.obj.objName,
|
|
78
|
+
text: (0, _tools.htmlDecodeByRegExp)(data.obj.objName),
|
|
79
79
|
isPercent: true
|
|
80
80
|
})), (0, _getLocale.getLocale)("Mod_skeyresults")));
|
|
81
81
|
}, []);
|
|
@@ -96,7 +96,7 @@ var DynamicMilestone = function DynamicMilestone(_ref) {
|
|
|
96
96
|
className: "".concat(prefix, "__object-name"),
|
|
97
97
|
onClick: handleClickTitle
|
|
98
98
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
99
|
-
text: obj.objName,
|
|
99
|
+
text: (0, _tools.htmlDecodeByRegExp)(obj.objName),
|
|
100
100
|
isPercent: true
|
|
101
101
|
})), (0, _getLocale.getLocale)("Mod_smilestone")));
|
|
102
102
|
}, []);
|
|
@@ -109,7 +109,7 @@ var DynamicProgress = function DynamicProgress(_ref) {
|
|
|
109
109
|
onClick: handleClickOTitle
|
|
110
110
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
111
111
|
text: /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
112
|
-
str: relationParentName,
|
|
112
|
+
str: (0, _tools.htmlDecodeByRegExp)(relationParentName),
|
|
113
113
|
keyWord: searchKeyWord
|
|
114
114
|
}),
|
|
115
115
|
isPercent: true
|
|
@@ -95,7 +95,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
95
95
|
className: "".concat(prefix, "__object-name"),
|
|
96
96
|
onClick: handleClickOTitle
|
|
97
97
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
98
|
-
text: data.obj.objName,
|
|
98
|
+
text: (0, _tools.htmlDecodeByRegExp)(data.obj.objName),
|
|
99
99
|
isPercent: true
|
|
100
100
|
})), "\u4E0B\u5173\u952E\u6210\u679C\u7684\u590D\u76D8");
|
|
101
101
|
}
|
|
@@ -118,7 +118,7 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
118
118
|
className: "".concat(prefix, "__object-name"),
|
|
119
119
|
onClick: handleClickTitle
|
|
120
120
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
121
|
-
text: obj.objName,
|
|
121
|
+
text: (0, _mblog.htmlDecodeByRegExp)(obj.objName),
|
|
122
122
|
isPercent: true
|
|
123
123
|
})), (0, _getLocale.getLocale)("Mod_stask"));
|
|
124
124
|
}
|
|
@@ -39,6 +39,8 @@ var _dynamicProgress = _interopRequireDefault(require("./dynamic-progress"));
|
|
|
39
39
|
|
|
40
40
|
var _dynamicCreateO = _interopRequireDefault(require("./dynamic-create-o"));
|
|
41
41
|
|
|
42
|
+
var _dynamicAiDialy = _interopRequireDefault(require("./dynamic-ai-dialy"));
|
|
43
|
+
|
|
42
44
|
var _dynamicTask = _interopRequireDefault(require("./dynamic-task"));
|
|
43
45
|
|
|
44
46
|
var _dynamicProject = _interopRequireDefault(require("./dynamic-project"));
|
|
@@ -104,7 +106,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
104
106
|
var prefix = "titaui-dynamic-item";
|
|
105
107
|
|
|
106
108
|
var DynamicItem = function DynamicItem(_ref) {
|
|
107
|
-
var _getBSGlobal;
|
|
109
|
+
var _getBSGlobal, _JSON$parse;
|
|
108
110
|
|
|
109
111
|
var data = _ref.data,
|
|
110
112
|
onDeleteFeed = _ref.onDeleteFeed,
|
|
@@ -154,6 +156,10 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
154
156
|
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)("WebHead")) !== null && _getBSGlobal !== void 0 && _getBSGlobal.AppHead.find(function (item) {
|
|
155
157
|
return item.AppId === "950";
|
|
156
158
|
}));
|
|
159
|
+
var isBiShare = data.shareType === _constant.EShareType.BiShare && data.biId;
|
|
160
|
+
|
|
161
|
+
var isFeedReport = isBiShare && _constant.PlanReportType.includes((_JSON$parse = JSON.parse(data.biId)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.type);
|
|
162
|
+
|
|
157
163
|
var dynamicContentRef = (0, _react.useRef)();
|
|
158
164
|
var communicationRef = (0, _react.useRef)();
|
|
159
165
|
|
|
@@ -393,6 +399,12 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
393
399
|
}, [feedComments]);
|
|
394
400
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
395
401
|
className: prefix
|
|
402
|
+
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
403
|
+
condition: isFeedReport
|
|
404
|
+
}, /*#__PURE__*/_react["default"].createElement(_dynamicAiDialy["default"], {
|
|
405
|
+
data: data
|
|
406
|
+
})), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
407
|
+
condition: !isFeedReport
|
|
396
408
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
397
409
|
className: "".concat(prefix, "__content"),
|
|
398
410
|
ref: dynamicContentRef,
|
|
@@ -496,7 +508,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
496
508
|
onReplyChange: handleReply,
|
|
497
509
|
showUser: true,
|
|
498
510
|
showDefaultInput: true
|
|
499
|
-
}))));
|
|
511
|
+
})))));
|
|
500
512
|
};
|
|
501
513
|
|
|
502
514
|
var _default = DynamicItem;
|
|
@@ -11,8 +11,6 @@ var _rcQueueAnim = _interopRequireDefault(require("rc-queue-anim"));
|
|
|
11
11
|
|
|
12
12
|
var _dynamicItem = _interopRequireDefault(require("../dynamic-item"));
|
|
13
13
|
|
|
14
|
-
var _dynamicAiDialy = _interopRequireDefault(require("../dynamic-item/dynamic-ai-dialy"));
|
|
15
|
-
|
|
16
14
|
var _dynamicEmpty = _interopRequireDefault(require("../img/dynamic-empty.png"));
|
|
17
15
|
|
|
18
16
|
var _conditionRender = _interopRequireDefault(require("../../condition-render"));
|
|
@@ -21,8 +19,6 @@ var _getLocale = require("../../../utils/getLocale");
|
|
|
21
19
|
|
|
22
20
|
require("./index.css");
|
|
23
21
|
|
|
24
|
-
var _constant = require("../constant");
|
|
25
|
-
|
|
26
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
23
|
|
|
28
24
|
// @ts-ignore
|
|
@@ -68,14 +64,10 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
68
64
|
display: "none"
|
|
69
65
|
}]
|
|
70
66
|
}, data.map(function (item) {
|
|
71
|
-
var _JSON$parse;
|
|
72
|
-
|
|
73
67
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
68
|
className: "".concat(prefix, "__item-wrapper"),
|
|
75
69
|
key: item.feedId
|
|
76
|
-
},
|
|
77
|
-
data: item
|
|
78
|
-
}) : /*#__PURE__*/_react["default"].createElement(_dynamicItem["default"], {
|
|
70
|
+
}, /*#__PURE__*/_react["default"].createElement(_dynamicItem["default"], {
|
|
79
71
|
data: item,
|
|
80
72
|
onDeleteFeed: handleDeleteFeed,
|
|
81
73
|
dynamicShareIsShowToping: dynamicShareIsShowToping
|