@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.
Files changed (151) hide show
  1. package/lib/components/avatar/icon-avatar/index.js +1 -1
  2. package/lib/components/avatar/index.js +5 -1
  3. package/lib/components/avatar/num-avatar/index.css +12 -0
  4. package/lib/components/avatar/num-avatar/index.js +34 -0
  5. package/lib/components/button/default-button/index.css +49 -0
  6. package/lib/components/button/default-button/index.js +51 -0
  7. package/lib/components/button/index.js +8 -2
  8. package/lib/components/communication/CommunicationRecord.js +110 -162
  9. package/lib/components/communication/index.css +4 -0
  10. package/lib/components/communication/index.js +34 -25
  11. package/lib/components/communication/style.js +1 -1
  12. package/lib/components/create-okr/index.css +4 -0
  13. package/lib/components/create-okr/index.js +43 -31
  14. package/lib/components/dropdown-layer/index.js +15 -12
  15. package/lib/components/dynamic/components/condition-render/index.js +20 -0
  16. package/lib/components/dynamic/components/dynamic-search-input/index.css +6 -0
  17. package/lib/components/dynamic/components/dynamic-search-input/index.js +4 -2
  18. package/lib/components/dynamic/components/obj-status/index.css +22 -0
  19. package/lib/components/dynamic/components/obj-status/index.js +38 -0
  20. package/lib/components/dynamic/components/percent/index.css +21 -0
  21. package/lib/components/dynamic/components/percent/index.js +38 -0
  22. package/lib/components/dynamic/components/title/index.css +35 -0
  23. package/lib/components/dynamic/{dynamic-item/components/publish-content → components/title}/index.js +27 -31
  24. package/lib/components/dynamic/constant.js +19 -2
  25. package/lib/components/dynamic/dynamic-item/components/{dynamic-item-header → header}/index.css +1 -1
  26. package/lib/components/dynamic/dynamic-item/components/{dynamic-item-header → header}/index.js +97 -73
  27. package/lib/components/dynamic/dynamic-item/components/icon/index.css +10 -0
  28. package/lib/components/dynamic/dynamic-item/components/icon/index.js +35 -0
  29. package/lib/components/dynamic/dynamic-item/{components/align → dynamic-align}/img/dynamic-align.svg +0 -0
  30. package/lib/components/dynamic/dynamic-item/{components/align → dynamic-align}/img/dynamic-relative.svg +0 -0
  31. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +95 -0
  32. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +173 -0
  33. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +54 -0
  34. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +107 -0
  35. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +48 -0
  36. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +89 -0
  37. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +96 -0
  38. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +171 -0
  39. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +67 -0
  40. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +110 -0
  41. package/lib/components/dynamic/dynamic-item/{components/task-project → dynamic-milestone}/constant.js +0 -0
  42. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
  43. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +111 -0
  44. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +158 -0
  45. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +95 -0
  46. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +215 -0
  47. package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +16 -0
  48. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-project}/img/project.png +0 -0
  49. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +91 -0
  50. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +125 -0
  51. package/lib/components/dynamic/dynamic-item/{components/relative → dynamic-relative}/img/dynamic-relative.svg +0 -0
  52. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +95 -0
  53. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +192 -0
  54. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +138 -0
  55. package/lib/components/dynamic/dynamic-item/{components/replay → dynamic-replay}/index.js +76 -11
  56. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +153 -0
  57. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +138 -0
  58. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +97 -0
  59. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +207 -0
  60. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +54 -0
  61. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +107 -0
  62. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/constant.js +13 -3
  63. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-cancel.png +0 -0
  64. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-delay.png +0 -0
  65. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-done.png +0 -0
  66. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-pause.png +0 -0
  67. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-progress.png +0 -0
  68. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-unaccept.png +0 -0
  69. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-unstart.png +0 -0
  70. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +111 -0
  71. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +164 -0
  72. package/lib/components/dynamic/dynamic-item/index.css +34 -10
  73. package/lib/components/dynamic/dynamic-item/index.js +155 -85
  74. package/lib/components/dynamic/dynamic-like-ranking/index.css +11 -8
  75. package/lib/components/dynamic/dynamic-like-ranking/index.js +69 -20
  76. package/lib/components/dynamic/dynamic-like-ranking/item.js +28 -51
  77. package/lib/components/dynamic/dynamic-liking/index.css +1 -8
  78. package/lib/components/dynamic/dynamic-liking/index.js +10 -4
  79. package/lib/components/dynamic/dynamic-liking/item.js +46 -25
  80. package/lib/components/dynamic/dynamic-list/index.css +1 -1
  81. package/lib/components/dynamic/dynamic-list/index.js +9 -7
  82. package/lib/components/dynamic/dynamic-topping/index.css +0 -5
  83. package/lib/components/dynamic/dynamic-topping/index.js +1 -1
  84. package/lib/components/dynamic/dynamic-topping/item.js +13 -17
  85. package/lib/components/dynamic/dynamic.css +54 -0
  86. package/lib/components/dynamic/dynamic.js +126 -58
  87. package/lib/components/dynamic/img/dynamic-top.svg +14 -0
  88. package/lib/components/dynamic/quick-operation/index.css +3 -1
  89. package/lib/components/dynamic/quick-operation/index.js +14 -4
  90. package/lib/components/dynamic/request-api.js +20 -8
  91. package/lib/components/dynamic/util.js +41 -7
  92. package/lib/components/file-list/components/single-file/index.css +3 -3
  93. package/lib/components/grid-page/personal-info/index.js +4 -4
  94. package/lib/components/img-viewer/index.css +1 -1
  95. package/lib/components/mblog/index.js +2 -2
  96. package/lib/components/mblog/style.js +2 -2
  97. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +48 -25
  98. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +62 -24
  99. package/lib/components/publish-dynamic-modal/requist-api.js +17 -2
  100. package/lib/components/table/index.css +0 -1
  101. package/lib/components/upload/style.js +1 -1
  102. package/lib/components/upvote/index.js +26 -14
  103. package/lib/components/user-selector/export-modules/field-tree-selector/index.css +4 -0
  104. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +8 -6
  105. package/lib/index.js +5 -1
  106. package/lib/pages/dynamic/index.css +1 -0
  107. package/lib/pages/like-ranking/column.js +33 -14
  108. package/lib/pages/like-ranking/filter-buttons/department.js +8 -11
  109. package/lib/pages/like-ranking/filter-buttons/group.js +34 -0
  110. package/lib/pages/like-ranking/filter-buttons/index.css +4 -8
  111. package/lib/pages/like-ranking/filter-buttons/index.js +18 -11
  112. package/lib/pages/like-ranking/filter-buttons/modular.js +51 -28
  113. package/lib/pages/like-ranking/filter-buttons/name.js +33 -6
  114. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +17 -0
  115. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +8 -2
  116. package/lib/pages/like-ranking/filter-buttons/timer.js +28 -46
  117. package/lib/pages/like-ranking/image/dynamic-empty.png +0 -0
  118. package/lib/pages/like-ranking/image/loading.gif +0 -0
  119. package/lib/pages/like-ranking/index.css +83 -4
  120. package/lib/pages/like-ranking/index.js +183 -22
  121. package/lib/pages/like-ranking/request-api.js +15 -0
  122. package/lib/utils/auth.js +16 -2
  123. package/lib/utils/bs-global.js +19 -2
  124. package/lib/utils/format-time.js +113 -8
  125. package/lib/utils/tools.js +50 -25
  126. package/package.json +1 -1
  127. package/lib/components/dynamic/components/common-title/index.css +0 -106
  128. package/lib/components/dynamic/components/common-title/index.js +0 -129
  129. package/lib/components/dynamic/dynamic-item/components/align/index.css +0 -66
  130. package/lib/components/dynamic/dynamic-item/components/align/index.js +0 -109
  131. package/lib/components/dynamic/dynamic-item/components/assessment/index.css +0 -20
  132. package/lib/components/dynamic/dynamic-item/components/assessment/index.js +0 -48
  133. package/lib/components/dynamic/dynamic-item/components/common-dynamic/index.css +0 -34
  134. package/lib/components/dynamic/dynamic-item/components/common-dynamic/index.js +0 -142
  135. package/lib/components/dynamic/dynamic-item/components/create-o/index.css +0 -52
  136. package/lib/components/dynamic/dynamic-item/components/create-o/index.js +0 -104
  137. package/lib/components/dynamic/dynamic-item/components/dynamic-desc/index.css +0 -62
  138. package/lib/components/dynamic/dynamic-item/components/dynamic-desc/index.js +0 -256
  139. package/lib/components/dynamic/dynamic-item/components/publish-content/index.css +0 -22
  140. package/lib/components/dynamic/dynamic-item/components/relative/index.css +0 -66
  141. package/lib/components/dynamic/dynamic-item/components/relative/index.js +0 -124
  142. package/lib/components/dynamic/dynamic-item/components/replay/index.css +0 -93
  143. package/lib/components/dynamic/dynamic-item/components/report/index.css +0 -32
  144. package/lib/components/dynamic/dynamic-item/components/report/index.js +0 -82
  145. package/lib/components/dynamic/dynamic-item/components/task-project/index.css +0 -57
  146. package/lib/components/dynamic/dynamic-item/components/task-project/index.js +0 -87
  147. package/lib/components/dynamic/dynamic-item/components/task-project-icon/index.css +0 -20
  148. package/lib/components/dynamic/dynamic-item/components/task-project-icon/index.js +0 -40
  149. package/lib/components/dynamic/dynamic-topping/mock.js +0 -1
  150. package/lib/pages/like-ranking/tab-bar/index.css +0 -22
  151. package/lib/pages/like-ranking/tab-bar/index.js +0 -65
@@ -83,14 +83,14 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
83
83
  okrFeedParams = _this$props.okrFeedParams;
84
84
  var isShowAllCommunicationRecord = _this.state.isShowAllCommunicationRecord;
85
85
  var url = commentType == 1 ? isShowAllCommunicationRecord ? (0, _requestV.getApiUrl2)("comment/Get?feed_id=".concat(feedId, "&comment_type=0")) : (0, _requestV.getApiUrl2)("user/feed/GetById?feed_id=".concat(feedId, "&comment_count=").concat(commentCount)) : (0, _requestV.getApiUrl)("okr/cycle/getFeed?objId=".concat(okrFeedParams && okrFeedParams.objId, "&objType=").concat(okrFeedParams && okrFeedParams.objType, "&cycleType=").concat(okrFeedParams && okrFeedParams.cycleType, "&yqmNum=").concat(okrFeedParams && okrFeedParams.yqmNum, "&annualNum=").concat(okrFeedParams && okrFeedParams.annualNum, "&commentCount=").concat(commentCount));
86
- (0, _requestV.taker)(url, 'GET').then(function (res) {
86
+ (0, _requestV.taker)(url, "GET").then(function (res) {
87
87
  if (res.Code === 1) {
88
88
  var data = res.Data && (res.Data.feedComments || res.Data);
89
89
 
90
90
  _this.setState({
91
91
  communicationTrackList: data.comments ? data.comments : [],
92
92
  communicationTrackTotal: data.total,
93
- okrCommentFeedId: commentType == 2 ? res.Data.feedId : ''
93
+ okrCommentFeedId: commentType == 2 ? res.Data.feedId : ""
94
94
  });
95
95
  } else {
96
96
  _this.setState({
@@ -130,15 +130,15 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
130
130
 
131
131
  var communicationTrackList = _toConsumableArray(_this.state.communicationTrackList);
132
132
 
133
- if (actionType === 'delete') {
133
+ if (actionType === "delete") {
134
134
  // 删除
135
135
  var url = (0, _requestV.getApiUrl2)("comment/Delete?comment_id=".concat(communicationTrackList[index].commentId, "&feed_id=").concat(feedId || _this.state.okrCommentFeedId));
136
- (0, _requestV.taker)(url, 'DELETE').then(function (res) {
136
+ (0, _requestV.taker)(url, "DELETE").then(function (res) {
137
137
  if (res.Code === 1) {
138
138
  isShowAllCommunicationRecord ? _this.getFeedInfo(feedId, communicationTrackTotal - 1) : _this.getFeedInfo(feedId, commentCount);
139
139
  }
140
140
  });
141
- } else if (actionType === 'reply') {
141
+ } else if (actionType === "reply") {
142
142
  // 沟通里的回复
143
143
  if (_this.props.useCustomMblog && _this.props.onComment) {
144
144
  _this.props.onComment({
@@ -163,7 +163,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
163
163
  replyUserId: communicationTrackList[index].publishUser.userId,
164
164
  replyUserCommentId: communicationTrackList[index].commentId
165
165
  });
166
- } else if (actionType === 'praise') {
166
+ } else if (actionType === "praise") {
167
167
  // 沟通里的点赞
168
168
  var isPraise = communicationTrackList[index].isPraise;
169
169
  isPraise = !isPraise;
@@ -174,7 +174,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
174
174
 
175
175
  var _url = isPraise ? (0, _requestV.getApiUrl)("praise/add?objId=".concat(communicationTrackList[index].commentId, "&objType=19&praiseType=1")) : (0, _requestV.getApiUrl)("praise/cancel?objId=".concat(communicationTrackList[index].commentId, "&objType=19"));
176
176
 
177
- (0, _requestV.taker)(_url, 'POST').then(function (res) {
177
+ (0, _requestV.taker)(_url, "POST").then(function (res) {
178
178
  if (res.Code === 1) {
179
179
  var praiseTotal = communicationTrackList[index].praiseTotal;
180
180
  communicationTrackList[index].isPraise = isPraise;
@@ -190,7 +190,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
190
190
  });
191
191
  }
192
192
  });
193
- } else if (actionType === 'showPraiseRecord') {
193
+ } else if (actionType === "showPraiseRecord") {
194
194
  // 显示点赞记录
195
195
  _this.setState({
196
196
  isShowPraiseRecordPop: true,
@@ -225,12 +225,13 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
225
225
  communicationTrackTotal = _this$state3.communicationTrackTotal,
226
226
  isShowAllCommunicationRecord = _this$state3.isShowAllCommunicationRecord;
227
227
 
228
- if (submitType === 'submit') {
228
+ if (submitType === "submit") {
229
229
  // 发送
230
230
  sentData.FeedId = feedId;
231
231
  sentData.CommentId = 0;
232
232
  sentData.ObjId = 0;
233
233
  sentData.ObjType = 0;
234
+ sentData.Content = sentData.Content || ' ';
234
235
 
235
236
  if (isShowReplyToUser) {
236
237
  sentData.CommentId = replyUserCommentId;
@@ -240,8 +241,8 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
240
241
  submitStatus: 2
241
242
  });
242
243
 
243
- var url = commentType == 1 ? (0, _requestV.getApiUrl2)('comment/Add') : (0, _requestV.getApiUrl)("okr/cycle/addComment?objId=".concat(okrFeedParams && okrFeedParams.objId, "&objType=").concat(okrFeedParams && okrFeedParams.objType, "&cycleType=").concat(okrFeedParams && okrFeedParams.cycleType, "&yqmNum=").concat(okrFeedParams && okrFeedParams.yqmNum, "&annualNum=").concat(okrFeedParams && okrFeedParams.annualNum));
244
- (0, _requestV.taker)(url, 'POST', sentData).then(function (res) {
244
+ var url = commentType == 1 ? (0, _requestV.getApiUrl2)("comment/Add") : (0, _requestV.getApiUrl)("okr/cycle/addComment?objId=".concat(okrFeedParams && okrFeedParams.objId, "&objType=").concat(okrFeedParams && okrFeedParams.objType, "&cycleType=").concat(okrFeedParams && okrFeedParams.cycleType, "&yqmNum=").concat(okrFeedParams && okrFeedParams.yqmNum, "&annualNum=").concat(okrFeedParams && okrFeedParams.annualNum));
245
+ (0, _requestV.taker)(url, "POST", sentData).then(function (res) {
245
246
  if (res.Code === 1) {
246
247
  isShowAllCommunicationRecord ? _this.getFeedInfo(feedId, communicationTrackTotal + 1) : _this.getFeedInfo(feedId, commentCount);
247
248
 
@@ -277,17 +278,17 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
277
278
  isShowAllCommunicationRecord: false,
278
279
  // 是否显示所有记录
279
280
  // 回复
280
- replyUser: '',
281
- replyUserId: '',
282
- replyUserCommentId: '0',
281
+ replyUser: "",
282
+ replyUserId: "",
283
+ replyUserCommentId: "0",
283
284
  isShowReplyToUser: false,
284
285
  // 是否显示回复谁
285
286
  submitStatus: 0,
286
287
  praiseStatus: 0,
287
288
  // 点赞记录
288
- praiseObjId: '',
289
+ praiseObjId: "",
289
290
  isShowPraiseRecordPop: false,
290
- okrCommentFeedId: ''
291
+ okrCommentFeedId: ""
291
292
  };
292
293
  return _this;
293
294
  }
@@ -345,18 +346,23 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
345
346
  userSelectorPopAlign = _this$props8.userSelectorPopAlign,
346
347
  emotionsSelectorPopAlign = _this$props8.emotionsSelectorPopAlign,
347
348
  showAtAll = _this$props8.showAtAll,
349
+ commentCount = _this$props8.commentCount,
348
350
  useCustomMblog = _this$props8.useCustomMblog,
349
351
  _this$props8$submitTe = _this$props8.submitText,
350
- submitText = _this$props8$submitTe === void 0 ? '回复' : _this$props8$submitTe;
352
+ submitText = _this$props8$submitTe === void 0 ? "回复" : _this$props8$submitTe,
353
+ _this$props8$highLigh = _this$props8.highLightKeyWord,
354
+ highLightKeyWord = _this$props8$highLigh === void 0 ? '' : _this$props8$highLigh,
355
+ _this$props8$autoFocu = _this$props8.autoFocus,
356
+ autoFocus = _this$props8$autoFocu === void 0 ? false : _this$props8$autoFocu;
351
357
  return /*#__PURE__*/_react["default"].createElement(_style.CommunicationWrapper, {
352
358
  className: "communcation-wrapper ".concat(className)
353
359
  }, /*#__PURE__*/_react["default"].createElement("div", null, communicationTrackTotal > 0 && /*#__PURE__*/_react["default"].createElement(_style.CommunicationRecordTotal, null, /*#__PURE__*/_react["default"].createElement("div", {
354
- className: prefix + '__communication-total',
360
+ className: prefix + "__communication-total",
355
361
  onMouseDown: function onMouseDown() {
356
362
  return _this2.handlerSwitchShowRecord();
357
363
  }
358
- }, "\u5168\u90E8\u6C9F\u901A\xA0", /*#__PURE__*/_react["default"].createElement("span", null, communicationTrackTotal), /*#__PURE__*/_react["default"].createElement("i", {
359
- className: (0, _classnames["default"])(prefix + '__communication-total-icon', {
364
+ }, "\u5168\u90E8\u6C9F\u901A\xA0", /*#__PURE__*/_react["default"].createElement("span", null, communicationTrackTotal), communicationTrackTotal > commentCount && /*#__PURE__*/_react["default"].createElement("i", {
365
+ className: (0, _classnames["default"])(prefix + "__communication-total-icon", {
360
366
  "tu-icon-APP-xi": isShowAllCommunicationRecord,
361
367
  "tu-icon-arrow-down1": !isShowAllCommunicationRecord
362
368
  })
@@ -365,6 +371,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
365
371
  }, communicationTrackList.length > 0 && communicationTrackList.map(function (item, index) {
366
372
  return /*#__PURE__*/_react["default"].createElement(_CommunicationRecord["default"], {
367
373
  communicationTrack: item,
374
+ highLightKeyWord: highLightKeyWord,
368
375
  index: index,
369
376
  key: item.commentId,
370
377
  praiseStatus: _this2.state.praiseStatus,
@@ -376,12 +383,12 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
376
383
  }))), !useCustomMblog && /*#__PURE__*/_react["default"].createElement("div", {
377
384
  className: "communication__reply__cintainer"
378
385
  }, /*#__PURE__*/_react["default"].createElement(_style.ReplyToUser, {
379
- height: isShowReplyToUser ? 'auto' : '0',
380
- padding: isShowReplyToUser ? '3px 0' : '0'
386
+ height: isShowReplyToUser ? "auto" : "0",
387
+ padding: isShowReplyToUser ? "3px 0" : "0"
381
388
  }, /*#__PURE__*/_react["default"].createElement("span", {
382
389
  style: {
383
- position: 'relative',
384
- top: '2px'
390
+ position: "relative",
391
+ top: "2px"
385
392
  }
386
393
  }, "\u56DE\u590D"), /*#__PURE__*/_react["default"].createElement(_style.ReplyUser, null, /*#__PURE__*/_react["default"].createElement("span", {
387
394
  className: "name"
@@ -404,6 +411,8 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
404
411
  submitStatus: submitStatus,
405
412
  userSelectorPopAlign: userSelectorPopAlign,
406
413
  emotionsSelectorPopAlign: emotionsSelectorPopAlign,
414
+ autoFocus: autoFocus,
415
+ autoResizing: false,
407
416
  onMblogSubmit: function onMblogSubmit(submitType, sentData) {
408
417
  return _this2.handlerReply(submitType, sentData);
409
418
  }
@@ -413,7 +422,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
413
422
  onSubmit: function onSubmit() {
414
423
  return _this2.setState({
415
424
  isShowPraiseRecordPop: false,
416
- praiseObjId: ''
425
+ praiseObjId: ""
417
426
  });
418
427
  }
419
428
  }));
@@ -33,7 +33,7 @@ var ReplyUser = _styledComponents["default"].div(_templateObject4 || (_templateO
33
33
 
34
34
  exports.ReplyUser = ReplyUser;
35
35
 
36
- var CommunicationItem = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: -8px;\n padding: 8px 8px 4px 8px;\n margin-bottom: 4px;\n font-size: 12px;\n color: #83898f;\n border-radius: 8px;\n display: flex;\n position: relative;\n\n &:hover {\n background: #eff5fb;\n .communication__actionbar {\n display: inline-block;\n }\n }\n"])));
36
+ var CommunicationItem = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: -8px;\n padding: 8px 8px 4px 8px;\n margin-bottom: 4px;\n font-size: 12px;\n color: #83898f;\n border-radius: 8px;\n display: flex;\n position: relative;\n\n &:hover {\n background: #F7F9FB;\n .communication__actionbar {\n display: inline-block;\n }\n }\n"])));
37
37
 
38
38
  exports.CommunicationItem = CommunicationItem;
39
39
 
@@ -405,6 +405,10 @@
405
405
  visibility: hidden;
406
406
  }
407
407
 
408
+ .modal-close-btn > span:hover {
409
+ color: #141c28 !important;
410
+ }
411
+
408
412
  @keyframes create-success-rotate {
409
413
  0% {
410
414
  transform: rotateZ(0);
@@ -107,11 +107,17 @@ function CreateOkrModal(_ref, ref) {
107
107
  userInfo = _ref.userInfo,
108
108
  onSuccess = _ref.onSuccess,
109
109
  _ref$isPerformance = _ref.isPerformance,
110
- isPerformance = _ref$isPerformance === void 0 ? false : _ref$isPerformance;
111
-
112
- var _useState = (0, _react.useState)(false),
110
+ isPerformance = _ref$isPerformance === void 0 ? false : _ref$isPerformance,
111
+ _ref$handleCreatedClo = _ref.handleCreatedClose,
112
+ handleCreatedClose = _ref$handleCreatedClo === void 0 ? function () {} : _ref$handleCreatedClo,
113
+ _ref$visible = _ref.visible,
114
+ visible = _ref$visible === void 0 ? false : _ref$visible,
115
+ _ref$onClose = _ref.onClose,
116
+ onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose;
117
+
118
+ var _useState = (0, _react.useState)(visible),
113
119
  _useState2 = _slicedToArray(_useState, 2),
114
- visible = _useState2[0],
120
+ isVisible = _useState2[0],
115
121
  setVisible = _useState2[1]; // @ts-ignore
116
122
 
117
123
 
@@ -313,8 +319,12 @@ function CreateOkrModal(_ref, ref) {
313
319
  setVisible(true);
314
320
  }, []);
315
321
  var hideCreateOkrModal = (0, _react.useCallback)(function () {
322
+ onClose && onClose();
316
323
  setVisible(false);
317
324
  }, []);
325
+ (0, _react.useEffect)(function () {
326
+ setVisible(visible);
327
+ }, [visible]);
318
328
  (0, _react.useImperativeHandle)(ref, function () {
319
329
  return {
320
330
  setCase: function setCase(data) {
@@ -353,12 +363,6 @@ function CreateOkrModal(_ref, ref) {
353
363
  duration: 3000
354
364
  });
355
365
 
356
- if (!onSuccess) {
357
- _manager["default"].open("okrDetail", {
358
- okrId: data.workId
359
- });
360
- }
361
-
362
366
  onSuccess && onSuccess(data);
363
367
  }
364
368
  }, [userAvatarBase64Url, isApplyTpl]);
@@ -400,7 +404,7 @@ function CreateOkrModal(_ref, ref) {
400
404
  }
401
405
 
402
406
  _popDownNotification.Toast.Error("目标名称不能为空", {
403
- canClose: true
407
+ canClose: false
404
408
  });
405
409
 
406
410
  return _context.abrupt("return");
@@ -412,7 +416,7 @@ function CreateOkrModal(_ref, ref) {
412
416
  }
413
417
 
414
418
  _popDownNotification.Toast.Error("目标名称不能超过500字", {
415
- canClose: true
419
+ canClose: false
416
420
  });
417
421
 
418
422
  return _context.abrupt("return");
@@ -424,7 +428,7 @@ function CreateOkrModal(_ref, ref) {
424
428
  }
425
429
 
426
430
  _popDownNotification.Toast.Error("关键成果不能为空", {
427
- canClose: true
431
+ canClose: false
428
432
  });
429
433
 
430
434
  setKrIsValidate(true);
@@ -441,7 +445,7 @@ function CreateOkrModal(_ref, ref) {
441
445
  }
442
446
 
443
447
  _popDownNotification.Toast.Error("关键成果不能超过500字", {
444
- canClose: true
448
+ canClose: false
445
449
  });
446
450
 
447
451
  return _context.abrupt("return");
@@ -455,7 +459,7 @@ function CreateOkrModal(_ref, ref) {
455
459
  }
456
460
 
457
461
  _popDownNotification.Toast.Error("关键成果总权重不等于100%", {
458
- canClose: true
462
+ canClose: false
459
463
  });
460
464
 
461
465
  return _context.abrupt("return");
@@ -469,8 +473,9 @@ function CreateOkrModal(_ref, ref) {
469
473
  return _context.abrupt("return");
470
474
 
471
475
  case 20:
476
+ handleCreatedClose();
472
477
  visibilityArea = formatVisiableLimit();
473
- _context.next = 23;
478
+ _context.next = 24;
474
479
  return (0, _requestApi.createWidthKr)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
475
480
  krInfos: krDatas.map(function (kr) {
476
481
  return _objectSpread(_objectSpread({}, kr), {}, {
@@ -492,11 +497,11 @@ function CreateOkrModal(_ref, ref) {
492
497
  }]
493
498
  }, visibilityArea));
494
499
 
495
- case 23:
500
+ case 24:
496
501
  data = _context.sent;
497
502
 
498
503
  if (!(data.Code === 0)) {
499
- _context.next = 27;
504
+ _context.next = 28;
500
505
  break;
501
506
  }
502
507
 
@@ -506,7 +511,7 @@ function CreateOkrModal(_ref, ref) {
506
511
 
507
512
  return _context.abrupt("return");
508
513
 
509
- case 27:
514
+ case 28:
510
515
  hideCreateOkrModal();
511
516
 
512
517
  if (onSuccess || !isPerformance) {
@@ -536,7 +541,7 @@ function CreateOkrModal(_ref, ref) {
536
541
 
537
542
  setIsApplyTpl(false);
538
543
 
539
- case 30:
544
+ case 31:
540
545
  case "end":
541
546
  return _context.stop();
542
547
  }
@@ -570,7 +575,7 @@ function CreateOkrModal(_ref, ref) {
570
575
  };
571
576
 
572
577
  (0, _react.useEffect)(function () {
573
- if (!visible) {
578
+ if (!isVisible) {
574
579
  setKrDatas([{
575
580
  uuid: _uuid["default"].v1(),
576
581
  principalId: Id,
@@ -605,7 +610,7 @@ function CreateOkrModal(_ref, ref) {
605
610
  parentKrId: 0
606
611
  });
607
612
  }
608
- }, [visible]);
613
+ }, [isVisible]);
609
614
  var handleONameSuggestClose = (0, _react.useCallback)(function () {
610
615
  setONameIsInput(false);
611
616
  setCustomCloseOSuggest(true);
@@ -745,21 +750,27 @@ function CreateOkrModal(_ref, ref) {
745
750
  }
746
751
 
747
752
  setShowCreatedSuccessInfo(false);
748
-
749
- _manager["default"].open("okrDetail", {
750
- okrId: workId
751
- });
752
-
753
753
  onSuccess && onSuccess(newOkrDataRef.current);
754
754
  }, []);
755
755
  (0, _react.useEffect)(function () {
756
- // @ts-ignore
756
+ if (!isVisible) return; // @ts-ignore
757
+
757
758
  (0, _requestApi.getImageBase64ByUrl)(user.id).then(function (data) {
758
759
  setUserAvatarBase64Url(data.obj);
759
760
  })["catch"](function (err) {
760
761
  _popDownNotification.Toast.Error(err);
761
762
  });
762
- }, [user]);
763
+ }, [user, isVisible]);
764
+
765
+ var trackAction = function trackAction() {
766
+ // @ts-ignore
767
+ window.titaTracker && window.titaTracker('action').record({
768
+ actionName: '点击【教你写OKR】',
769
+ actionGroup: '创建OKR',
770
+ productName: 'OKR'
771
+ });
772
+ };
773
+
763
774
  var renderFooterTeachWriteOKr = (0, _react.useMemo)(function () {
764
775
  {
765
776
  /*钉钉用 https://wiki.tita.com/pages/viewpage.action?pageId=15696093 */
@@ -767,7 +778,8 @@ function CreateOkrModal(_ref, ref) {
767
778
  return /*#__PURE__*/_react["default"].createElement("a", {
768
779
  className: "teact-write-okr",
769
780
  href: (0, _helpers.isDingDing)() ? "https://wiki.tita.com/pages/viewpage.action?pageId=15696093" : "https://docs.tita.com/question/okr-write/",
770
- target: "_blank"
781
+ target: "_blank",
782
+ onClick: trackAction
771
783
  }, /*#__PURE__*/_react["default"].createElement("img", {
772
784
  className: "teact-write-okr__icon",
773
785
  src: _teachOkr["default"]
@@ -789,7 +801,7 @@ function CreateOkrModal(_ref, ref) {
789
801
  onOk: onModalOkHandler,
790
802
  okText: "\u7ACB\u5373\u521B\u5EFA",
791
803
  title: ModalTitle,
792
- visible: visible,
804
+ visible: isVisible,
793
805
  onCancel: hideCreateOkrModal,
794
806
  maskClosable: false,
795
807
  footerLeftContent: renderFooterTeachWriteOKr
@@ -21,7 +21,8 @@ require("./index.css");
21
21
 
22
22
  var _iconItem = _interopRequireDefault(require("./icon-item"));
23
23
 
24
- var _excluded = ["trigger", "triggerIcon", "destroyPopupOnHide", "popupPlacement", "hideOnChange", "onChange", "canEdit"];
24
+ var _excluded = ["name", "multi", "children", "onClick", "className"],
25
+ _excluded2 = ["trigger", "triggerIcon", "destroyPopupOnHide", "popupPlacement", "hideOnChange", "onChange", "canEdit"];
25
26
 
26
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
28
 
@@ -29,18 +30,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
29
30
 
30
31
  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; }
31
32
 
32
- 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); }
33
-
34
- 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; }
35
-
36
- 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; }
37
-
38
33
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
39
34
 
40
35
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
41
36
 
42
37
  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; }
43
38
 
39
+ 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); }
40
+
44
41
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
45
42
 
46
43
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -53,6 +50,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
53
50
 
54
51
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
55
52
 
53
+ 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; }
54
+
55
+ 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; }
56
+
56
57
  var preCls = 'titaui-dropdown-layer';
57
58
  var IconItem = _iconItem["default"];
58
59
  exports.IconItem = IconItem;
@@ -61,7 +62,9 @@ var Item = function Item(props) {
61
62
  var name = props.name,
62
63
  multi = props.multi,
63
64
  children = props.children,
64
- onClick = props.onClick;
65
+ onClick = props.onClick,
66
+ className = props.className,
67
+ restProps = _objectWithoutProperties(props, _excluded);
65
68
 
66
69
  var _useState = (0, _react.useState)(props.checked),
67
70
  _useState2 = _slicedToArray(_useState, 2),
@@ -77,11 +80,11 @@ var Item = function Item(props) {
77
80
  onClick && onClick(name, !checked);
78
81
  };
79
82
 
80
- return /*#__PURE__*/_react["default"].createElement("div", {
83
+ return /*#__PURE__*/_react["default"].createElement("div", _extends({
81
84
  key: name,
82
- className: (0, _classnames["default"])("".concat(preCls, "__operation-item")),
85
+ className: (0, _classnames["default"])("".concat(preCls, "__operation-item"), className),
83
86
  onClick: onClickHandler
84
- }, multi && /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
87
+ }, restProps), multi && /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
85
88
  checked: checked
86
89
  }), /*#__PURE__*/_react["default"].createElement("span", {
87
90
  className: (0, _classnames["default"])("".concat(preCls, "__operation-item-text"))
@@ -137,7 +140,7 @@ var _default = function _default(props) {
137
140
  onChange = props.onChange,
138
141
  _props$canEdit = props.canEdit,
139
142
  canEdit = _props$canEdit === void 0 ? true : _props$canEdit,
140
- restProps = _objectWithoutProperties(props, _excluded);
143
+ restProps = _objectWithoutProperties(props, _excluded2);
141
144
 
142
145
  var _useState3 = (0, _react.useState)(false),
143
146
  _useState4 = _slicedToArray(_useState3, 2),
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var ConditionRender = function ConditionRender(_ref) {
9
+ var condition = _ref.condition,
10
+ children = _ref.children;
11
+
12
+ if (!condition) {
13
+ return null;
14
+ }
15
+
16
+ return children;
17
+ };
18
+
19
+ var _default = ConditionRender;
20
+ exports["default"] = _default;
@@ -61,6 +61,12 @@
61
61
  text-overflow: ellipsis;
62
62
  }
63
63
 
64
+ .titaui-dynamic-search-input__input::placeholder {
65
+ font-size: 14px;
66
+ color: #BFC7D5;
67
+ line-height: 22px;
68
+ }
69
+
64
70
  .titaui-dynamic-search-input__input-clear {
65
71
  color: #BFC7D5;
66
72
  font-size: 14px;
@@ -78,7 +78,7 @@ var DynamicSearchInput = function DynamicSearchInput(_ref) {
78
78
 
79
79
  var handleKeyUp = function handleKeyUp(e) {
80
80
  // 按回车
81
- if (e.keyCode === 13) {
81
+ if (e.keyCode === 13 && searchDynamicType !== 'person') {
82
82
  setSearchKey(searchInputValue);
83
83
  setSearchKeyType(searchDynamicType);
84
84
  }
@@ -111,6 +111,7 @@ var DynamicSearchInput = function DynamicSearchInput(_ref) {
111
111
  var handleClearSearchValue = function handleClearSearchValue() {
112
112
  setSearchInputValue('');
113
113
  setSearchKey('');
114
+ setSearchUser(null);
114
115
  setSearchKeyType(searchDynamicType);
115
116
  };
116
117
 
@@ -155,7 +156,8 @@ var DynamicSearchInput = function DynamicSearchInput(_ref) {
155
156
  className: prefix + "__input",
156
157
  value: searchInputValue,
157
158
  onChange: handleInputChange,
158
- onKeyUp: handleKeyUp
159
+ onKeyUp: handleKeyUp,
160
+ placeholder: searchDynamicType === 'dynamic' ? '按关键词搜索' : '按姓名搜索'
159
161
  }), isMouseEnter && searchInputValue && /*#__PURE__*/_react["default"].createElement("i", {
160
162
  onClick: handleClearSearchValue,
161
163
  className: (0, _classnames["default"])("tu-icon-circle", prefix + "__input-clear")
@@ -0,0 +1,22 @@
1
+ .titaui-dynamic-obj-status {
2
+ display: inline-block;
3
+ width: 18px;
4
+ height: 18px;
5
+ min-width: 18px;
6
+ }
7
+
8
+ .titaui-dynamic-obj-status--delay {
9
+ background: url("../../img/dynamic-delay.svg");
10
+ }
11
+
12
+ .titaui-dynamic-obj-status--normal {
13
+ background: url("../../img/dynamic-normal.svg");
14
+ }
15
+
16
+ .titaui-dynamic-obj-status--risk {
17
+ background: url("../../img/dynamic-risk.svg");
18
+ }
19
+
20
+ .titaui-dynamic-obj-status--end {
21
+ background: url("../../img/dynamic-end.svg");
22
+ }
@@ -0,0 +1,38 @@
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 _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ var _util = require("../../util");
13
+
14
+ require("./index.css");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ var prefix = "titaui-dynamic-obj-status";
19
+ var StateIconMapping = {
20
+ delay: "".concat(prefix, "--delay"),
21
+ normal: "".concat(prefix, "--normal"),
22
+ risk: "".concat(prefix, "--risk"),
23
+ end: "".concat(prefix, "--end")
24
+ };
25
+
26
+ var DynamicObjStatus = function DynamicObjStatus(_ref) {
27
+ var _ref$oStatus = _ref.oStatus,
28
+ oStatus = _ref$oStatus === void 0 ? 1 : _ref$oStatus,
29
+ _ref$riskLevel = _ref.riskLevel,
30
+ riskLevel = _ref$riskLevel === void 0 ? 1 : _ref$riskLevel,
31
+ extraClass = _ref.extraClass;
32
+ return /*#__PURE__*/_react["default"].createElement("span", {
33
+ className: (0, _classnames["default"])(extraClass, prefix, StateIconMapping[(0, _util.getProgressState)(oStatus, riskLevel)])
34
+ });
35
+ };
36
+
37
+ var _default = DynamicObjStatus;
38
+ exports["default"] = _default;
@@ -0,0 +1,21 @@
1
+ .titaui-dynamic-percent {
2
+ font-size: 16px;
3
+ font-weight: 600;
4
+ color: #3f4755;
5
+ line-height: 24px;
6
+ }
7
+
8
+ .titaui-dynamic-percent__grow {
9
+ font-size: 12px;
10
+ font-weight: 600;
11
+ line-height: 20px;
12
+ margin-left: 4px;
13
+ }
14
+
15
+ .titaui-dynamic-percent__grow--increase {
16
+ color: #5ad8a6;
17
+ }
18
+
19
+ .titaui-dynamic-percent__grow--decrease {
20
+ color: #f05e5e;
21
+ }