@titaui/pc 1.11.51 → 1.11.52-beta.11

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 (225) hide show
  1. package/lib/components/button/images/blue.svg +21 -0
  2. package/lib/components/button/images/red.svg +21 -0
  3. package/lib/components/button/images/white.svg +19 -0
  4. package/lib/components/button/rect-btn/index.js +3 -3
  5. package/lib/components/change-okr-modal/Item.js +19 -18
  6. package/lib/components/change-okr-modal/styledComponents.js +9 -9
  7. package/lib/components/checkbox/index.css +4 -0
  8. package/lib/components/contact-kefu/index.css +11 -1
  9. package/lib/components/contact-kefu/index.js +10 -4
  10. package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
  11. package/lib/components/create-okr-modal/fields/index.css +14 -3
  12. package/lib/components/create-okr-modal/fields/o-new-name.js +30 -19
  13. package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
  14. package/lib/components/create-okr-modal/index.js +200 -133
  15. package/lib/components/create-okr-modal/kr-items/index.css +23 -13
  16. package/lib/components/create-okr-modal/kr-items/krDatas.js +95 -76
  17. package/lib/components/create-okr-modal/kr-items/krItem.js +53 -56
  18. package/lib/components/create-okr-modal/style.js +5 -5
  19. package/lib/components/date-picker/BodyItem.js +3 -3
  20. package/lib/components/date-picker/CalendarHeader.js +3 -3
  21. package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
  22. package/lib/components/dynamic/constant.js +1 -1
  23. package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +8 -8
  24. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -8
  25. package/lib/components/dynamic/dynamic-list/index.js +14 -7
  26. package/lib/components/dynamic/index.js +9 -12
  27. package/lib/components/dynamic/request-api.js +7 -68
  28. package/lib/components/eReport/eReportLists/reportList.js +3 -3
  29. package/lib/components/emotions-selector/selector-pop.js +3 -3
  30. package/lib/components/ereport-list/index.js +3 -3
  31. package/lib/components/mblog/components/MblogAction.js +3 -3
  32. package/lib/components/menus/export-modules/appraisal-menus/menus.js +11 -9
  33. package/lib/components/nav-top/components/menu/index.js +18 -16
  34. package/lib/components/nav-top/index.js +2 -2
  35. package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
  36. package/lib/components/okr-detail/components/header/edit-name.js +86 -40
  37. package/lib/components/okr-detail/components/header/index.css +120 -41
  38. package/lib/components/okr-detail/components/header/index.js +36 -46
  39. package/lib/components/okr-detail/components/header/o-classify.js +152 -0
  40. package/lib/components/okr-detail/components/header/o-name.js +7 -5
  41. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
  42. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +58 -4
  43. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +159 -63
  44. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
  45. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
  46. package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +15 -13
  47. package/lib/components/okr-detail/detail-header/index.js +8 -4
  48. package/lib/components/okr-detail/e-list/index.js +2 -2
  49. package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
  50. package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
  51. package/lib/components/okr-detail/request-apis.js +73 -69
  52. package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
  53. package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
  54. package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
  55. package/lib/components/okr-flow/child-node/kr-node.js +3 -1
  56. package/lib/components/okr-flow/child-node/work-node.js +3 -1
  57. package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
  58. package/lib/components/okr-progress/components/o-progress/index.js +3 -1
  59. package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
  60. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
  61. package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
  62. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
  63. package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
  64. package/lib/components/okr-share/common-painter/utils.js +183 -36
  65. package/lib/components/okr-share/index.css +5 -4
  66. package/lib/components/okr-share/pink-card/card.js +3 -3
  67. package/lib/components/okr-share/pink-card/drawKrs.js +93 -18
  68. package/lib/components/okr-share/pink-card/index.js +20 -12
  69. package/lib/components/open-data-painter/index.js +6 -5
  70. package/lib/components/period-selector/interface.js +7 -0
  71. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
  72. package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
  73. package/lib/components/rich-editor/models/schema.js +6 -6
  74. package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
  75. package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
  76. package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
  77. package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
  78. package/lib/components/rich-editor/plugins/core/index.js +4 -4
  79. package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
  80. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
  81. package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
  82. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
  83. package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
  84. package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
  85. package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
  86. package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
  87. package/lib/components/rich-editor/react/uiProvider.js +3 -3
  88. package/lib/components/rich-editor/ui/Popup/index.js +3 -3
  89. package/lib/components/search-input/index.css +1 -1
  90. package/lib/components/search-key-handle/index.js +9 -7
  91. package/lib/components/select/Option.js +3 -3
  92. package/lib/components/select-layer/index.css +1 -1
  93. package/lib/components/task-relation-modal/helper.js +139 -2
  94. package/lib/components/task-relation-modal/image/loading.gif +0 -0
  95. package/lib/components/task-relation-modal/index.js +9 -0
  96. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
  97. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +262 -0
  98. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
  99. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
  100. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +129 -0
  101. package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
  102. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
  103. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +185 -0
  104. package/lib/components/task-relation-modal/request-api.js +28 -2
  105. package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
  106. package/lib/components/task-relation-modal/search/principal.js +36 -19
  107. package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
  108. package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
  109. package/lib/components/{dynamic/dynamic-topping/index.js → task-relation-modal/search/task-relation.js} +45 -44
  110. package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
  111. package/lib/components/{dynamic/dynamic-liking/index.js → task-relation-modal/search/work-relation.js} +43 -39
  112. package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
  113. package/lib/components/task-relation-modal/tree/category-tree/index.css +3 -3
  114. package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
  115. package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
  116. package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
  117. package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
  118. package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
  119. package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
  120. package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
  121. package/lib/components/task-relation-modal/tree/work-tree/index.css +1 -1
  122. package/lib/components/task-relation-modal/tree-node/category-node/index.css +1 -12
  123. package/lib/components/task-relation-modal/tree-node/category-node/index.js +1 -3
  124. package/lib/components/task-relation-modal/tree-node/kr-node/index.css +0 -16
  125. package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -10
  126. package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +0 -16
  127. package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +0 -4
  128. package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
  129. package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
  130. package/lib/components/task-relation-modal/work-relation/index.css +0 -0
  131. package/lib/components/task-relation-modal/work-relation/index.js +256 -0
  132. package/lib/components/tita-chart/errorBoundary/index.js +3 -3
  133. package/lib/components/tooltip/index.js +3 -0
  134. package/lib/components/tooltip/tooltip-rows/index.css +26 -0
  135. package/lib/components/{dynamic/advertise → tooltip/tooltip-rows}/index.js +65 -85
  136. package/lib/components/user-selector/category-selector-panel/index.js +6 -1
  137. package/lib/components/{dynamic/quick-operation/components/create-task/index.js → user-selector/category-selector-panel/subordinate-tree.js} +37 -20
  138. package/lib/components/user-selector/constant.js +10 -2
  139. package/lib/components/user-selector/empty/index.css +5 -0
  140. package/lib/components/user-selector/empty/index.js +9 -3
  141. package/lib/components/user-selector/export-modules/depart-search-selector/index.js +45 -17
  142. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
  143. package/lib/components/user-selector/images/no-auth.png +0 -0
  144. package/lib/components/user-selector/request-apis.js +28 -9
  145. package/lib/components/user-selector/searched-panel/index.js +21 -7
  146. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
  147. package/lib/components/wechat-btn/index.css +5 -1
  148. package/lib/components-v1/animate/AnimateChild.js +3 -3
  149. package/lib/components-v1/avatar/index.js +3 -3
  150. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
  151. package/lib/components-v1/progress/CircleProgress.js +3 -3
  152. package/lib/components-v1/select/Option.js +3 -3
  153. package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
  154. package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
  155. package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
  156. package/lib/components-v1/userSelector/components/UserItem.js +3 -3
  157. package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
  158. package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
  159. package/lib/utils/open-data.js +213 -65
  160. package/lib/utils/planDataJson.js +11115 -0
  161. package/package.json +3 -2
  162. package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
  163. package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
  164. package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
  165. package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
  166. package/lib/components/dynamic/advertise/index.css +0 -21
  167. package/lib/components/dynamic/advertise/interface.js +0 -5
  168. package/lib/components/dynamic/advertise/util.js +0 -28
  169. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
  170. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
  171. package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
  172. package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
  173. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  174. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  175. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  176. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  177. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  178. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
  179. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
  180. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
  181. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  182. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  183. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  184. package/lib/components/dynamic/dynamic-liking/item.js +0 -75
  185. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  186. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
  187. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
  188. package/lib/components/dynamic/dynamic-topping/index.css +0 -141
  189. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  190. package/lib/components/dynamic/dynamic-topping/item.js +0 -153
  191. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  192. package/lib/components/dynamic/dynamic.css +0 -173
  193. package/lib/components/dynamic/dynamic.js +0 -428
  194. package/lib/components/dynamic/export-module/index.js +0 -37
  195. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  196. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  197. package/lib/components/dynamic/my-team/img/line.png +0 -0
  198. package/lib/components/dynamic/my-team/img/team.png +0 -0
  199. package/lib/components/dynamic/my-team/index.css +0 -184
  200. package/lib/components/dynamic/my-team/index.js +0 -263
  201. package/lib/components/dynamic/my-team/request-api.js +0 -52
  202. package/lib/components/dynamic/my-team/util.js +0 -20
  203. package/lib/components/dynamic/new-ui.css +0 -192
  204. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
  205. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
  206. package/lib/components/dynamic/online-broadcast/data.js +0 -95
  207. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
  208. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  209. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  210. package/lib/components/dynamic/online-broadcast/index.css +0 -46
  211. package/lib/components/dynamic/online-broadcast/index.js +0 -61
  212. package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
  213. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  214. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
  215. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  216. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
  217. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  218. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
  219. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  220. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  221. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  222. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  223. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  224. package/lib/components/dynamic/quick-operation/index.css +0 -51
  225. package/lib/components/dynamic/quick-operation/index.js +0 -120
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _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
+ var _getLocale = require("../../../../utils/getLocale");
15
+
16
+ var _popup = _interopRequireDefault(require("../../../../components/popup"));
17
+
18
+ var _toast = _interopRequireDefault(require("../../../../components/toast"));
19
+
20
+ var _requestApis = require("../../request-apis");
21
+
22
+ require("./index.css");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ 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); }
27
+
28
+ 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; }
29
+
30
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
31
+
32
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
33
+
34
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
35
+
36
+ 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."); }
37
+
38
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
39
+
40
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
41
+
42
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
43
+
44
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
+
46
+ var OClassify = function OClassify(props) {
47
+ var editable = props.editable,
48
+ okrId = props.okrId,
49
+ okrClassify = props.okrClassify,
50
+ onOkrClassifyChange = props.onOkrClassifyChange;
51
+
52
+ var _useState = (0, _react.useState)(false),
53
+ _useState2 = _slicedToArray(_useState, 2),
54
+ visible = _useState2[0],
55
+ setVisible = _useState2[1];
56
+
57
+ var updateClassifyHandler = /*#__PURE__*/function () {
58
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(select) {
59
+ return regeneratorRuntime.wrap(function _callee$(_context) {
60
+ while (1) {
61
+ switch (_context.prev = _context.next) {
62
+ case 0:
63
+ if (!(select == okrClassify)) {
64
+ _context.next = 3;
65
+ break;
66
+ }
67
+
68
+ setVisible(false);
69
+ return _context.abrupt("return");
70
+
71
+ case 3:
72
+ _context.next = 5;
73
+ return (0, _requestApis.updateClassify)({
74
+ okrId: okrId,
75
+ okrClassify: select
76
+ });
77
+
78
+ case 5:
79
+ if (onOkrClassifyChange) {
80
+ onOkrClassifyChange(select);
81
+ }
82
+
83
+ setVisible(false);
84
+
85
+ _toast["default"].Success('修改成功');
86
+
87
+ case 8:
88
+ case "end":
89
+ return _context.stop();
90
+ }
91
+ }
92
+ }, _callee);
93
+ }));
94
+
95
+ return function updateClassifyHandler(_x) {
96
+ return _ref.apply(this, arguments);
97
+ };
98
+ }();
99
+
100
+ var renderTrigger = (0, _react.useMemo)(function () {
101
+ return /*#__PURE__*/_react["default"].createElement("span", {
102
+ className: (0, _classnames["default"])('okr-drawer-header__classify', {
103
+ 'okr-drawer-header__classify--editable': editable,
104
+ 'tu-icon-nuo': okrClassify == 1,
105
+ 'tu-icon-yuan': okrClassify == 2
106
+ }),
107
+ onClick: function onClick() {
108
+ return editable && setVisible(true);
109
+ }
110
+ }, okrClassify == 1 ? (0, _getLocale.getLocale)('OKR_MyO_Es_Commitment') : (0, _getLocale.getLocale)('OKR_MyO_Es_Visiontype'));
111
+ }, [okrClassify, editable]);
112
+
113
+ if (editable && okrClassify !== 0) {
114
+ var popContent = /*#__PURE__*/_react["default"].createElement("div", {
115
+ className: "okr-drawer-header__classify-popup"
116
+ }, /*#__PURE__*/_react["default"].createElement("div", {
117
+ className: (0, _classnames["default"])('okr-drawer-header__classify-popup-item', {
118
+ active: okrClassify === 1
119
+ }),
120
+ onClick: function onClick() {
121
+ return updateClassifyHandler(1);
122
+ }
123
+ }, (0, _getLocale.getLocale)('OKR_MyO_Es_Commitment')), /*#__PURE__*/_react["default"].createElement("div", {
124
+ className: (0, _classnames["default"])('okr-drawer-header__classify-popup-item', {
125
+ active: okrClassify === 2
126
+ }),
127
+ onClick: function onClick() {
128
+ return updateClassifyHandler(2);
129
+ }
130
+ }, (0, _getLocale.getLocale)('OKR_MyO_Es_Visiontype')));
131
+
132
+ return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
133
+ popup: popContent,
134
+ popupVisible: visible,
135
+ placement: "bottomLeft",
136
+ popupAlign: {
137
+ offset: [48, 0],
138
+ overflow: {
139
+ adjustX: true,
140
+ adjustY: true
141
+ },
142
+ targetOffset: [0, 0]
143
+ }
144
+ }, renderTrigger);
145
+ }
146
+
147
+ if (okrClassify === 0) return null;
148
+ return renderTrigger;
149
+ };
150
+
151
+ var _default = OClassify;
152
+ exports["default"] = _default;
@@ -13,6 +13,8 @@ var _getLocale = require("../../../../utils/getLocale");
13
13
 
14
14
  var _tools = require("../../../../utils/tools");
15
15
 
16
+ var _openData = require("../../../../utils/open-data");
17
+
16
18
  var _helper = require("../../helper");
17
19
 
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -28,7 +30,7 @@ function OName(props) {
28
30
  OkrAndKrApprovalTypes = props.OkrAndKrApprovalTypes;
29
31
 
30
32
  var handleEditClick = function handleEditClick() {
31
- if ((0, _helper.getApprovalOkr)(approvalSetting, "changeOkrName", applyState, OkrAndKrApprovalTypes)) {
33
+ if ((0, _helper.getApprovalOkr)(approvalSetting, 'changeOkrName', applyState, OkrAndKrApprovalTypes)) {
32
34
  if (editable) {
33
35
  setIsEdit(true);
34
36
  }
@@ -36,15 +38,15 @@ function OName(props) {
36
38
  };
37
39
 
38
40
  return /*#__PURE__*/_react["default"].createElement("div", {
39
- className: (0, _classnames["default"])("okr-drawer-header__title", {
40
- "okr-drawer-header__title--editable": editable
41
+ className: (0, _classnames["default"])('okr-drawer-header__title', {
42
+ 'okr-drawer-header__title--editable': editable
41
43
  })
42
44
  }, /*#__PURE__*/_react["default"].createElement("span", {
43
45
  className: "okr-drawer-header__name",
44
46
  onClick: handleEditClick
45
- }, (0, _tools.htmlDecodeByRegExp)(okrName)), children, Number(okrStatus) === 2 && /*#__PURE__*/_react["default"].createElement("span", {
47
+ }, (0, _openData.parseString)((0, _tools.htmlDecodeByRegExp)(okrName))), children, Number(okrStatus) === 2 && /*#__PURE__*/_react["default"].createElement("span", {
46
48
  className: "okr-drawer-header__over-tag"
47
- }, (0, _getLocale.getLocale)("OKR_MyO_Butt_Hasended")));
49
+ }, (0, _getLocale.getLocale)('OKR_MyO_Butt_Hasended')));
48
50
  }
49
51
 
50
52
  var _default = OName;
@@ -29,6 +29,8 @@ var _getLocale = require("../../../../../../utils/getLocale");
29
29
 
30
30
  var _bsGlobal = require("../../../../../../utils/bs-global");
31
31
 
32
+ var _openData = require("../../../../../../utils/open-data");
33
+
32
34
  require("./index.css");
33
35
 
34
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -186,7 +188,7 @@ var EKrNode = function EKrNode(props) {
186
188
  }
187
189
  }
188
190
  }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
189
- text: title,
191
+ text: (0, _openData.parseString)(title),
190
192
  minusWidth: 150,
191
193
  isPercent: true
192
194
  })), okrInfo.status === 1 && (isParticipant || hasRelativeAuth) ? /*#__PURE__*/_react["default"].createElement("div", {
@@ -88,18 +88,72 @@
88
88
  }
89
89
 
90
90
  .tita-okrdt-tree__kr-node-title {
91
- display: inline-block;
91
+ width: calc(100% - 32px);
92
92
  margin-left: 8px;
93
93
  font-size: 14px;
94
- font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
95
94
  font-weight: 600;
96
- color: #3f4755;
97
95
  line-height: 22px;
96
+ color: #3f4755;
97
+ display: inline-flex;
98
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
98
99
  vertical-align: top;
99
- width: calc(100% - 32px);
100
100
  white-space: break-spaces;
101
101
  }
102
102
 
103
+ .tita-okrdt-tree__kr-node-title .tu-icon-bianji2 {
104
+ margin-left: 5px;
105
+ font-size: 13px;
106
+ transition: visibility 0.3s ease;
107
+ color: #89919f;
108
+ visibility: hidden;
109
+ }
110
+
103
111
  .tita-okrdt-tree__kr-node-title:hover .tu-icon-bianji2 {
104
112
  visibility: visible;
105
113
  }
114
+
115
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor {
116
+ flex: 1;
117
+ border: 1px solid #2879ff;
118
+ border-radius: 4px;
119
+ box-shadow: 0px 0px 6px 0px rgba(40, 121, 255, 0.3) inset;
120
+ transition: all 0.3s ease;
121
+ box-sizing: border-box;
122
+ }
123
+
124
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor .ProseMirror p {
125
+ padding: 2px;
126
+ white-space: nowrap;
127
+ }
128
+
129
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor--disabled {
130
+ padding: 0;
131
+ flex: unset !important;
132
+ border-color: transparent;
133
+ box-shadow: none;
134
+ }
135
+
136
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor--disabled .ProseMirror p {
137
+ padding: 0;
138
+ font-size: 14px;
139
+ font-weight: 600;
140
+ line-height: 20px;
141
+ transition: color 0.3s ease-in 0s;
142
+ color: #3f4755;
143
+ cursor: pointer;
144
+ display: -webkit-box;
145
+ overflow: hidden;
146
+ text-overflow: ellipsis;
147
+ word-break: break-all;
148
+ -webkit-box-orient: vertical;
149
+ -webkit-line-clamp: 2;
150
+ white-space: normal;
151
+ }
152
+
153
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor--disabled .ProseMirror p:hover {
154
+ color: #2879ff;
155
+ }
156
+
157
+ .tita-okrdt-tree .rc-tree-treenode {
158
+ overflow: visible !important;
159
+ }
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
+ var _richEditor = require("@titaui/rich-editor");
15
+
14
16
  var _bsGlobal = require("../../../../../../utils/bs-global");
15
17
 
16
18
  var _avatar = _interopRequireDefault(require("../../../../../avatar"));
@@ -27,7 +29,7 @@ var _toast = _interopRequireDefault(require("../../../../../toast"));
27
29
 
28
30
  var _dialogConfirm = _interopRequireWildcard(require("../../../../../dialog-confirm"));
29
31
 
30
- var _editableInput = _interopRequireDefault(require("../../../../components/editable-input"));
32
+ var _errorTip = _interopRequireDefault(require("../../../../../tooltip/error-tip"));
31
33
 
32
34
  var _requestApis = require("../../../../request-apis");
33
35
 
@@ -51,6 +53,8 @@ var _helper = require("../../../../helper");
51
53
 
52
54
  var _getLocale = require("../../../../../../utils/getLocale");
53
55
 
56
+ var _i18nFrontTranslate = require("../../../../../../utils/i18n-front-translate");
57
+
54
58
  require("./index.css");
55
59
 
56
60
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -84,9 +88,9 @@ function OkrRowColumn(_ref) {
84
88
  marginLeft = _ref$marginLeft === void 0 ? 0 : _ref$marginLeft;
85
89
  return /*#__PURE__*/_react["default"].createElement("span", {
86
90
  style: {
87
- display: "inline-block",
91
+ display: 'inline-block',
88
92
  width: width,
89
- textAlign: "left",
93
+ textAlign: 'left',
90
94
  marginLeft: marginLeft
91
95
  }
92
96
  }, children);
@@ -109,53 +113,68 @@ function _default(props) {
109
113
  confidence = _useState2[0],
110
114
  setConfidence = _useState2[1];
111
115
 
112
- var _useState3 = (0, _react.useState)(data.user || {}),
116
+ var _useState3 = (0, _react.useState)(''),
113
117
  _useState4 = _slicedToArray(_useState3, 2),
114
- user = _useState4[0],
115
- setUser = _useState4[1];
118
+ errorTip = _useState4[0],
119
+ setErrorTip = _useState4[1];
116
120
 
117
- var _useState5 = (0, _react.useState)(false),
121
+ var _useState5 = (0, _react.useState)(data.user || {}),
118
122
  _useState6 = _slicedToArray(_useState5, 2),
119
- editWightVisible = _useState6[0],
120
- setEditWightVisible = _useState6[1];
123
+ user = _useState6[0],
124
+ setUser = _useState6[1];
121
125
 
122
- var _useState7 = (0, _react.useState)(data.evaluateValue),
126
+ var _useState7 = (0, _react.useState)(false),
123
127
  _useState8 = _slicedToArray(_useState7, 2),
124
- evaluateValue = _useState8[0],
125
- setEvaluateValue = _useState8[1];
128
+ editWightVisible = _useState8[0],
129
+ setEditWightVisible = _useState8[1];
126
130
 
127
131
  var _useState9 = (0, _react.useState)(false),
128
132
  _useState10 = _slicedToArray(_useState9, 2),
129
- krModalVsible = _useState10[0],
130
- setKrModalVsible = _useState10[1];
133
+ editing = _useState10[0],
134
+ setEditing = _useState10[1];
131
135
 
132
- var _useState11 = (0, _react.useState)(false),
136
+ var _useState11 = (0, _react.useState)(data.evaluateValue),
133
137
  _useState12 = _slicedToArray(_useState11, 2),
134
- deleteModalVisible = _useState12[0],
135
- setDeleteModalVisible = _useState12[1];
138
+ evaluateValue = _useState12[0],
139
+ setEvaluateValue = _useState12[1];
136
140
 
137
- var _useState13 = (0, _react.useState)(title),
141
+ var _useState13 = (0, _react.useState)(false),
138
142
  _useState14 = _slicedToArray(_useState13, 2),
139
- krName = _useState14[0],
140
- setKrName = _useState14[1];
143
+ krModalVsible = _useState14[0],
144
+ setKrModalVsible = _useState14[1];
145
+
146
+ var _useState15 = (0, _react.useState)(false),
147
+ _useState16 = _slicedToArray(_useState15, 2),
148
+ deleteModalVisible = _useState16[0],
149
+ setDeleteModalVisible = _useState16[1];
150
+
151
+ var _useState17 = (0, _react.useState)({
152
+ pureText: title,
153
+ pureTextExcludeAt: title,
154
+ richText: data.mileStoneNameRichText ? JSON.parse(data.mileStoneNameRichText) : (0, _richEditor.TitaRichEditorInitTextState)(title),
155
+ mentionUsers: []
156
+ }),
157
+ _useState18 = _slicedToArray(_useState17, 2),
158
+ krNameData = _useState18[0],
159
+ setKrNameData = _useState18[1];
141
160
 
142
- var _useState15 = (0, _react.useState)((0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting.ShowKrConfidence),
143
- _useState16 = _slicedToArray(_useState15, 1),
144
- showHeart = _useState16[0]; // 高级功能: 关键成果信心指数
161
+ var _useState19 = (0, _react.useState)((0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting.ShowKrConfidence),
162
+ _useState20 = _slicedToArray(_useState19, 1),
163
+ showHeart = _useState20[0]; // 高级功能: 关键成果信心指数
145
164
 
146
165
 
147
- var _useState17 = (0, _react.useState)((0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting.KrWeight),
148
- _useState18 = _slicedToArray(_useState17, 1),
149
- showKrWeight = _useState18[0]; // 高级功能: 关见成果权重
166
+ var _useState21 = (0, _react.useState)((0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting.KrWeight),
167
+ _useState22 = _slicedToArray(_useState21, 1),
168
+ showKrWeight = _useState22[0]; // 高级功能: 关见成果权重
150
169
 
151
170
 
152
- var _useState19 = (0, _react.useState)(data.isEvaluate),
153
- _useState20 = _slicedToArray(_useState19, 2),
154
- isEvaluate = _useState20[0],
155
- setIsEvaluate = _useState20[1]; // 权限 & 非结束目标
171
+ var _useState23 = (0, _react.useState)(data.isEvaluate),
172
+ _useState24 = _slicedToArray(_useState23, 2),
173
+ isEvaluate = _useState24[0],
174
+ setIsEvaluate = _useState24[1]; // 权限 & 非结束目标
156
175
 
157
176
 
158
- var _useState21 = (0, _react.useState)(function () {
177
+ var _useState25 = (0, _react.useState)(function () {
159
178
  var hasAuth = new _auth.KRAuth({
160
179
  user: data.user,
161
180
  createUserId: data.createUserId
@@ -163,11 +182,17 @@ function _default(props) {
163
182
  var livetime = okrInfo.status != 2;
164
183
  return hasAuth && livetime;
165
184
  }),
166
- _useState22 = _slicedToArray(_useState21, 1),
167
- krCanEdit = _useState22[0];
185
+ _useState26 = _slicedToArray(_useState25, 1),
186
+ krCanEdit = _useState26[0];
168
187
 
188
+ var mentionInputRef = (0, _react.useRef)();
169
189
  (0, _react.useEffect)(function () {
170
- setKrName(title);
190
+ setKrNameData({
191
+ pureText: title,
192
+ pureTextExcludeAt: title,
193
+ richText: data.mileStoneNameRichText ? JSON.parse(data.mileStoneNameRichText) : (0, _richEditor.TitaRichEditorInitTextState)(title),
194
+ mentionUsers: []
195
+ });
171
196
  }, [title]);
172
197
 
173
198
  var _useContext2 = (0, _react.useContext)(_context2.OkrListContext),
@@ -190,9 +215,7 @@ function _default(props) {
190
215
  kr: data,
191
216
  confidenceIndex: level
192
217
  }).then(function () {
193
- _toast["default"].Success("修改成功", {
194
- top: 60
195
- });
218
+ _toast["default"].Success('修改成功');
196
219
  });
197
220
  };
198
221
 
@@ -214,7 +237,7 @@ function _default(props) {
214
237
  progressDescription = val.progressDescription,
215
238
  riskLevel = val.riskLevel,
216
239
  updateProgressWay = val.updateProgressWay;
217
- progress = progress.replace(/%/, "");
240
+ progress = progress.replace(/%/, '');
218
241
  (0, _requestApis.updateKrProgressAndStatus)({
219
242
  krId: data.mileStoneId,
220
243
  progress: Number(progress),
@@ -223,7 +246,7 @@ function _default(props) {
223
246
  updateProgressWay: updateProgressWay
224
247
  }).then(function (res) {
225
248
  if (res.Code == 1) {
226
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
249
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
227
250
 
228
251
  refreshAll();
229
252
  updateKrs();
@@ -251,7 +274,7 @@ function _default(props) {
251
274
  setDeleteModalVisible(false);
252
275
 
253
276
  if (!Message) {
254
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
277
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
255
278
 
256
279
  setTimeout(function () {
257
280
  refreshAll();
@@ -274,13 +297,56 @@ function _default(props) {
274
297
  };
275
298
  }();
276
299
 
277
- var onKrNameChangeHandler = function onKrNameChangeHandler(val) {
300
+ var onInputKeyDownHandler = function onInputKeyDownHandler(e) {
301
+ if (e.keyCode !== 13) return;
302
+ onKrNameChangeHandler();
303
+ };
304
+
305
+ var validateKrName = function validateKrName(data) {
306
+ var _pureTextExcludeAt$tr;
307
+
308
+ var pureTextExcludeAt = data.pureTextExcludeAt;
309
+ var krNameLen = pureTextExcludeAt === null || pureTextExcludeAt === void 0 ? void 0 : (_pureTextExcludeAt$tr = pureTextExcludeAt.trim()) === null || _pureTextExcludeAt$tr === void 0 ? void 0 : _pureTextExcludeAt$tr.length;
310
+
311
+ if (krNameLen === 0) {
312
+ setErrorTip('KR 名称不能为空');
313
+ return false;
314
+ }
315
+
316
+ if (krNameLen > 5000) {
317
+ setErrorTip((0, _i18nFrontTranslate.inputWordTrans)(krNameLen, 5000));
318
+ return false;
319
+ }
320
+
321
+ setErrorTip('');
322
+ return true;
323
+ };
324
+
325
+ var onEditorChange = function onEditorChange(data) {
326
+ setKrNameData(function () {
327
+ return data;
328
+ });
329
+ validateKrName(data);
330
+ };
331
+
332
+ var onKrNameChangeHandler = function onKrNameChangeHandler() {
333
+ var mentionUsers = krNameData.mentionUsers,
334
+ pureText = krNameData.pureText,
335
+ richText = krNameData.richText;
336
+ var hasError = !validateKrName(krNameData);
337
+ if (hasError) return;
278
338
  (0, _requestApis.updateKrName)({
279
- mileStoneName: val,
339
+ mileStoneName: pureText,
340
+ mileStoneNameRichText: richText,
341
+ aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
342
+ return user.mentionId;
343
+ }),
280
344
  workId: data.workId,
281
345
  workMileStoneId: data.mileStoneId
282
- }).then(function () {
283
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
346
+ }).then(function (res) {
347
+ setEditing(false);
348
+
349
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
284
350
  });
285
351
  };
286
352
 
@@ -297,11 +363,26 @@ function _default(props) {
297
363
  };
298
364
 
299
365
  var onTitleTextClickHandler = function onTitleTextClickHandler() {
300
- _drawerManager["default"].open("krDetail", {
366
+ if (editing) return;
367
+
368
+ _drawerManager["default"].open('krDetail', {
301
369
  krId: data.mileStoneId
302
370
  });
303
371
  };
304
372
 
373
+ var triggerEdit = function triggerEdit(e) {
374
+ e.stopPropagation();
375
+ e.nativeEvent.stopImmediatePropagation();
376
+ setEditing(true);
377
+ setTimeout(function () {
378
+ var _mentionInputRef$curr;
379
+
380
+ // @ts-ignore
381
+ (_mentionInputRef$curr = mentionInputRef.current) === null || _mentionInputRef$curr === void 0 ? void 0 : _mentionInputRef$curr.methods().focus();
382
+ }, 0);
383
+ };
384
+
385
+ var krNameEditable = krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, 'changeOkrName', okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes);
305
386
  return /*#__PURE__*/_react["default"].createElement("div", {
306
387
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node"))
307
388
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -312,16 +393,31 @@ function _default(props) {
312
393
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-h1"))
313
394
  }, /*#__PURE__*/_react["default"].createElement("span", {
314
395
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-prefix"))
315
- }, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("span", {
316
- className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-title"))
317
- }, /*#__PURE__*/_react["default"].createElement(_editableInput["default"], {
318
- editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, "changeOkrName", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes),
319
- defaultValue: krName,
320
- emptyMessage: "KR\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",
321
- onKeyDown: onKrNameChangeHandler,
396
+ }, "KR", index + 1), /*#__PURE__*/_react["default"].createElement(_errorTip["default"], {
397
+ overlay: /*#__PURE__*/_react["default"].createElement("span", {
398
+ style: {
399
+ color: '#f05e5e'
400
+ }
401
+ }, errorTip),
402
+ visible: editing && errorTip.length > 0,
403
+ placement: "top"
404
+ }, /*#__PURE__*/_react["default"].createElement("span", {
405
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-title")),
406
+ onClick: onTitleTextClickHandler
407
+ }, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
408
+ editable: editing,
409
+ initialState: krNameData.richText,
410
+ onDocChange: onEditorChange,
322
411
  onBlur: onKrNameChangeHandler,
323
- onTextClick: onTitleTextClickHandler
324
- }))), /*#__PURE__*/_react["default"].createElement("div", {
412
+ onKeyDown: onInputKeyDownHandler,
413
+ placeholder: "KR\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",
414
+ ref: mentionInputRef
415
+ }), krNameEditable && !editing && /*#__PURE__*/_react["default"].createElement("span", {
416
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__text-icon"))
417
+ }, /*#__PURE__*/_react["default"].createElement("span", {
418
+ className: "tu-icon-bianji2",
419
+ onClick: triggerEdit
420
+ }))))), /*#__PURE__*/_react["default"].createElement("div", {
325
421
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-h2"))
326
422
  }, /*#__PURE__*/_react["default"].createElement(OkrRowColumn, {
327
423
  width: 68
@@ -348,7 +444,7 @@ function _default(props) {
348
444
  marginLeft: 16
349
445
  }, /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
350
446
  data: data,
351
- editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, "changeOkrTime", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes)
447
+ editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, 'changeOkrTime', okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes)
352
448
  })), /*#__PURE__*/_react["default"].createElement("div", {
353
449
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-actions"))
354
450
  }, showHeart && /*#__PURE__*/_react["default"].createElement("div", {
@@ -366,9 +462,9 @@ function _default(props) {
366
462
  percent: data.progress,
367
463
  linear: true,
368
464
  linearId: data.mileStoneId,
369
- linearStartColor: (0, _utils.getProcessColor)(data.riskLevel, "linearStartColor", okrInfo.status),
370
- linearEndColor: (0, _utils.getProcessColor)(data.riskLevel, "linearEndColor", okrInfo.status),
371
- backgroundColor: (0, _utils.getProcessColor)(data.riskLevel, "backgroundColor", okrInfo.status)
465
+ linearStartColor: (0, _utils.getProcessColor)(data.riskLevel, 'linearStartColor', okrInfo.status),
466
+ linearEndColor: (0, _utils.getProcessColor)(data.riskLevel, 'linearEndColor', okrInfo.status),
467
+ backgroundColor: (0, _utils.getProcessColor)(data.riskLevel, 'backgroundColor', okrInfo.status)
372
468
  })), /*#__PURE__*/_react["default"].createElement("div", {
373
469
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-score"))
374
470
  }, /*#__PURE__*/_react["default"].createElement(_krScoreEditor["default"], {
@@ -394,7 +490,7 @@ function _default(props) {
394
490
  onOk: onEditWightOkHandler
395
491
  }), /*#__PURE__*/_react["default"].createElement(_okrProgressModal["default"], {
396
492
  okrInfo: data,
397
- title: (0, _getLocale.getLocale)("OKR_MyO_Title_UpdateKR"),
493
+ title: (0, _getLocale.getLocale)('OKR_MyO_Title_UpdateKR'),
398
494
  visible: krModalVsible,
399
495
  onClose: function onClose() {
400
496
  return setKrModalVsible(false);
@@ -407,15 +503,15 @@ function _default(props) {
407
503
  type: "warning"
408
504
  }, /*#__PURE__*/_react["default"].createElement("span", {
409
505
  type: "title"
410
- }, (0, _getLocale.getLocale)("OKR_MyO_KRP_Deletekey")), /*#__PURE__*/_react["default"].createElement("span", {
506
+ }, (0, _getLocale.getLocale)('OKR_MyO_KRP_Deletekey')), /*#__PURE__*/_react["default"].createElement("span", {
411
507
  type: "content"
412
- }, (0, _getLocale.getLocale)("OKR_MyO_KRP_Thekeyachieve")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
508
+ }, (0, _getLocale.getLocale)('OKR_MyO_KRP_Thekeyachieve')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
413
509
  type: "button",
414
510
  onClick: function onClick() {
415
511
  return setDeleteModalVisible(false);
416
512
  }
417
- }, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.WarningButton, {
513
+ }, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.WarningButton, {
418
514
  type: "button",
419
515
  onClick: onDeleteKrHandler
420
- }, (0, _getLocale.getLocale)("Mod_Delete"))));
516
+ }, (0, _getLocale.getLocale)('Mod_Delete'))));
421
517
  }