@titaui/pc 1.12.7 → 1.12.8

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 (79) hide show
  1. package/lib/components/change-okr-modal/Item.js +19 -18
  2. package/lib/components/change-okr-modal/styledComponents.js +9 -9
  3. package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
  4. package/lib/components/create-okr-modal/fields/index.css +14 -3
  5. package/lib/components/create-okr-modal/fields/o-new-name.js +31 -20
  6. package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
  7. package/lib/components/create-okr-modal/index.js +197 -132
  8. package/lib/components/create-okr-modal/kr-items/index.css +23 -13
  9. package/lib/components/create-okr-modal/kr-items/krDatas.js +95 -76
  10. package/lib/components/create-okr-modal/kr-items/krItem.js +54 -57
  11. package/lib/components/create-okr-modal/style.js +5 -5
  12. package/lib/components/dynamic/components/title/index.js +1 -1
  13. package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +7 -7
  14. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +7 -7
  15. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +17 -17
  16. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -1
  17. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +9 -9
  18. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +3 -1
  19. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -1
  20. package/lib/components/eReport/eReportLists/reportList.js +29 -30
  21. package/lib/components/eReport/eReportShare/style.js +1 -1
  22. package/lib/components/edit-kr-wight/EditKrWightModal.js +11 -9
  23. package/lib/components/nav-top/components/menu/index.js +3 -3
  24. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +1 -1
  25. package/lib/components/nav-top/components/user-message/components/todos/todo-item.js +3 -3
  26. package/lib/components/okr-detail/components/ao-nice/index.css +0 -1
  27. package/lib/components/okr-detail/components/header/edit-name.js +76 -39
  28. package/lib/components/okr-detail/components/header/index.css +122 -41
  29. package/lib/components/okr-detail/components/header/index.js +45 -48
  30. package/lib/components/okr-detail/components/header/o-classify.js +154 -0
  31. package/lib/components/okr-detail/components/header/o-name.js +7 -5
  32. package/lib/components/okr-detail/components/o-progress-update/index.js +2 -2
  33. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
  34. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +66 -4
  35. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +174 -64
  36. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
  37. package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +15 -13
  38. package/lib/components/okr-detail/components/tab-panel-content/index.css +1 -0
  39. package/lib/components/okr-detail/detail-header/index.js +11 -5
  40. package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
  41. package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
  42. package/lib/components/okr-detail/okr-list/index.css +9 -0
  43. package/lib/components/okr-detail/okr-list/index.js +25 -25
  44. package/lib/components/okr-detail/request-apis.js +73 -69
  45. package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
  46. package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
  47. package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
  48. package/lib/components/okr-flow/child-node/kr-node.js +3 -1
  49. package/lib/components/okr-flow/child-node/work-node.js +3 -1
  50. package/lib/components/okr-flow/export-modal/index.js +6 -6
  51. package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
  52. package/lib/components/okr-progress/components/o-progress/index.js +3 -1
  53. package/lib/components/okr-progress/components/o-progress-update/index.js +2 -2
  54. package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
  55. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
  56. package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
  57. package/lib/components/okr-share/common-painter/utils.js +187 -36
  58. package/lib/components/okr-share/index.css +5 -4
  59. package/lib/components/okr-share/pink-card/card.js +3 -3
  60. package/lib/components/okr-share/pink-card/drawKrs.js +97 -18
  61. package/lib/components/okr-share/pink-card/index.js +20 -12
  62. package/lib/components/open-data-painter/index.js +6 -5
  63. package/lib/components/search-key-handle/index.js +12 -10
  64. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +2 -2
  65. package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -4
  66. package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
  67. package/lib/components/upload/components/uploadedPreview.js +17 -17
  68. package/lib/components/upload/index.js +23 -23
  69. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +14 -14
  70. package/lib/components/user-selector/searched-panel/index.js +4 -4
  71. package/lib/components/wechat-btn/index.css +5 -1
  72. package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
  73. package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
  74. package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
  75. package/lib/pages/new-okr-list/header/index.js +15 -15
  76. package/lib/utils/hooks.js +5 -5
  77. package/lib/utils/open-data.js +216 -66
  78. package/lib/utils/tita-okr-cycle.js +3 -3
  79. package/package.json +2 -1
@@ -198,14 +198,15 @@ var Item = /*#__PURE__*/function (_PureComponent) {
198
198
  isShowKr: isShowKr
199
199
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
200
200
  placement: "top",
201
- overlay: htmlToText(item.mileStoneName)
201
+ overlay: (0, _openData.parseString)(htmlToText(item.mileStoneName))
202
202
  }, /*#__PURE__*/_react["default"].createElement(_styledComponents.OkrName, {
203
+ className: "okr-relate-modal__milestonename",
203
204
  isKr: true,
204
- isShowKr: isShowKr,
205
- dangerouslySetInnerHTML: {
206
- __html: "KR".concat(index + 1, "\uFF1A").concat(item.mileStoneName)
207
- }
208
- }))));
205
+ isShowKr: isShowKr // dangerouslySetInnerHTML={{
206
+ // __html: `KR${index + 1}:${parseString(item.mileStoneName)}`,
207
+ // }}
208
+
209
+ }, "KR".concat(index + 1, "\uFF1A"), (0, _openData.parseString)(item.mileStoneName)))));
209
210
  }
210
211
 
211
212
  if (active && item.mileStoneId === (active.workId || active.mileStoneId)) {
@@ -220,14 +221,15 @@ var Item = /*#__PURE__*/function (_PureComponent) {
220
221
  isShowKr: isShowKr
221
222
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
222
223
  placement: "top",
223
- overlay: htmlToText(item.mileStoneName)
224
+ overlay: (0, _openData.parseString)(htmlToText(item.mileStoneName))
224
225
  }, /*#__PURE__*/_react["default"].createElement(_styledComponents.OkrName, {
226
+ className: "okr-relate-modal__milestonename",
225
227
  isKr: true,
226
- isShowKr: isShowKr,
227
- dangerouslySetInnerHTML: {
228
- __html: "KR".concat(index + 1, "\uFF1A").concat(item.mileStoneName)
229
- }
230
- }))));
228
+ isShowKr: isShowKr // dangerouslySetInnerHTML={{
229
+ // __html: KR${index + 1}:${parseString(item.mileStoneName)}`,
230
+ // }}
231
+
232
+ }, "KR".concat(index + 1, "\uFF1A"), (0, _openData.parseString)(item.mileStoneName)))));
231
233
  }
232
234
 
233
235
  return '';
@@ -282,14 +284,13 @@ var Item = /*#__PURE__*/function (_PureComponent) {
282
284
  isShowKr: isShowKr
283
285
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
284
286
  placement: "top",
285
- overlay: htmlToText(okrData.workName)
287
+ overlay: (0, _openData.parseString)(htmlToText(okrData.workName))
286
288
  }, /*#__PURE__*/_react["default"].createElement(_styledComponents.OkrName, {
289
+ className: "okr-relate-modal__workname",
287
290
  isKr: false,
288
- isShowKr: isShowKr,
289
- dangerouslySetInnerHTML: {
290
- __html: okrData.workName
291
- }
292
- }))), this.isObjectiveRelevanceKr && isShowKr && data.Krs.length > 0 && /*#__PURE__*/_react["default"].createElement("span", {
291
+ isShowKr: isShowKr // dangerouslySetInnerHTML={{ __html: parseString(okrData.workName) }}
292
+
293
+ }, (0, _openData.parseString)(okrData.workName)))), this.isObjectiveRelevanceKr && isShowKr && data.Krs.length > 0 && /*#__PURE__*/_react["default"].createElement("span", {
293
294
  className: "".concat(isExpand ? 'tu-icon-arrow-up' : 'tu-icon-arrow-down')
294
295
  })), /*#__PURE__*/_react["default"].createElement(_styledComponents.ItemBottom, null, !isShowKr && [/*#__PURE__*/_react["default"].createElement("span", null, (0, _constant.getTypeMap)()[data.okrType]), /*#__PURE__*/_react["default"].createElement(_styledComponents.Separator, null)], /*#__PURE__*/_react["default"].createElement(_styledComponents.PricipleName, null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
295
296
  name: data.principalUser.name,
@@ -14,7 +14,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
14
14
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
15
 
16
16
  var Wrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 589px;\n height: 488px;\n margin-top: ", ";\n background: #ffffff;\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n"])), function (p) {
17
- return p.okrPopType === 1 ? 0 : "32px";
17
+ return p.okrPopType === 1 ? 0 : '32px';
18
18
  });
19
19
 
20
20
  exports.Wrapper = Wrapper;
@@ -59,7 +59,7 @@ var OptionItem = _styledComponents["default"].span(_templateObject11 || (_templa
59
59
 
60
60
  exports.OptionItem = OptionItem;
61
61
 
62
- var List = _styledComponents["default"].ul(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n /* overflow: auto; */\n flex: 1;\n max-height: 310px;\n overflow-y: scroll;\n &:empty::after {\n content: '\\6682\\65e0\\6570\\636e';\n display: block;\n color: #c5c5c5;\n border: dashed 1px #c5c5c5;\n padding: 30px 25px;\n border-radius: 3px;\n text-align: center;\n font-size: 22px;\n line-height: 30px;\n margin-top: 100px;\n }\n"], ["\n /* overflow: auto; */\n flex: 1;\n max-height: 310px;\n overflow-y: scroll;\n &:empty::after {\n content: '\\\\6682\\\\65e0\\\\6570\\\\636e';\n display: block;\n color: #c5c5c5;\n border: dashed 1px #c5c5c5;\n padding: 30px 25px;\n border-radius: 3px;\n text-align: center;\n font-size: 22px;\n line-height: 30px;\n margin-top: 100px;\n }\n"])));
62
+ var List = _styledComponents["default"].ul(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n /* overflow: auto; */\n flex: 1;\n max-height: 358px;\n overflow-y: scroll;\n &:empty::after {\n content: '\\6682\\65e0\\6570\\636e';\n display: block;\n color: #c5c5c5;\n border: dashed 1px #c5c5c5;\n padding: 30px 25px;\n border-radius: 3px;\n text-align: center;\n font-size: 22px;\n line-height: 30px;\n margin-top: 100px;\n }\n"], ["\n /* overflow: auto; */\n flex: 1;\n max-height: 358px;\n overflow-y: scroll;\n &:empty::after {\n content: '\\\\6682\\\\65e0\\\\6570\\\\636e';\n display: block;\n color: #c5c5c5;\n border: dashed 1px #c5c5c5;\n padding: 30px 25px;\n border-radius: 3px;\n text-align: center;\n font-size: 22px;\n line-height: 30px;\n margin-top: 100px;\n }\n"])));
63
63
 
64
64
  exports.List = List;
65
65
 
@@ -80,15 +80,15 @@ var ItemTop = _styledComponents["default"].div(_templateObject16 || (_templateOb
80
80
  exports.ItemTop = ItemTop;
81
81
 
82
82
  var WorkNameWrapper = _styledComponents["default"].div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n flex: 1px;\n white-space: nowrap;\n overflow: hidden;\n cursor: ", ";\n"])), function (p) {
83
- return p.isKr ? "default" : "pointer";
83
+ return p.isKr ? 'default' : 'pointer';
84
84
  });
85
85
 
86
86
  exports.WorkNameWrapper = WorkNameWrapper;
87
87
 
88
88
  var Radio = _styledComponents["default"].a(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 15px;\n width: 15px;\n border: 1px solid ", ";\n border-radius: 50%;\n &::after {\n content: '';\n display: ", ";\n width: 9px;\n height: 9px;\n border-radius: 50%;\n background-color: #2879ff;\n }\n"])), function (p) {
89
- return p.active ? "#2879ff" : "#BFC3C7";
89
+ return p.active ? '#2879ff' : '#BFC3C7';
90
90
  }, function (p) {
91
- return p.active ? "block" : "none";
91
+ return p.active ? 'block' : 'none';
92
92
  });
93
93
 
94
94
  exports.Radio = Radio;
@@ -102,7 +102,7 @@ var Tag = _styledComponents["default"].div(_templateObject19 || (_templateObject
102
102
  exports.Tag = Tag;
103
103
 
104
104
  var OkrName = _styledComponents["default"].span(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: inline-block\n flex: 1;\n max-width: 400px;\n font-size: 13px;\n font-weight: ", ";\n color: #33383d;\n white-space: nowrap;\n overflow: hidden;\n word-break: keep-all;\n text-overflow: ellipsis;\n line-height: 1;\n"])), function (p) {
105
- return p.isShowKr ? "normal" : "600";
105
+ return p.isShowKr ? 'normal' : '600';
106
106
  });
107
107
 
108
108
  exports.OkrName = OkrName;
@@ -128,11 +128,11 @@ var ButtonGroup = _styledComponents["default"].div(_templateObject25 || (_templa
128
128
  exports.ButtonGroup = ButtonGroup;
129
129
 
130
130
  var Button = _styledComponents["default"].a(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n display: block;\n min-width: 28px;\n height: 27px;\n padding: 0 15px;\n box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.21);\n border-radius: 2px;\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n text-align: center;\n white-space: nowrap;\n line-height: 27px;\n &:hover {\n color: ", ";\n }\n"])), function (p) {
131
- return p.type !== "confirm" ? "#FAFBFC" : p.disabled ? "#E7EEF3" : "#2879FF";
131
+ return p.type !== 'confirm' ? '#FAFBFC' : p.disabled ? '#E7EEF3' : '#2879FF';
132
132
  }, function (p) {
133
- return p.type !== "confirm" ? "#565E66" : "#FFF";
133
+ return p.type !== 'confirm' ? '#565E66' : '#FFF';
134
134
  }, function (p) {
135
- return p.type !== "confirm" ? "#565E66" : "#FFF";
135
+ return p.type !== 'confirm' ? '#565E66' : '#FFF';
136
136
  });
137
137
 
138
138
  exports.Button = Button;
@@ -35,6 +35,8 @@ var _createSuccessShadow = _interopRequireDefault(require("./img/create-success-
35
35
 
36
36
  var _getLocale = require("../../utils/getLocale");
37
37
 
38
+ var _openData = require("../../utils/open-data");
39
+
38
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
39
41
 
40
42
  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); }
@@ -66,6 +68,16 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
66
68
  dontShowValue = _useState2[0],
67
69
  setDontShowValue = _useState2[1];
68
70
 
71
+ var _useState3 = (0, _react.useState)(null),
72
+ _useState4 = _slicedToArray(_useState3, 2),
73
+ okrName = _useState4[0],
74
+ setOkrName = _useState4[1];
75
+
76
+ var _useState5 = (0, _react.useState)([]),
77
+ _useState6 = _slicedToArray(_useState5, 2),
78
+ krNames = _useState6[0],
79
+ setKrNames = _useState6[1];
80
+
69
81
  var handleCloseModel = (0, _react.useCallback)(function () {
70
82
  onCloseModel && onCloseModel(dontShowValue);
71
83
  }, [dontShowValue, onCloseModel]);
@@ -87,7 +99,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
87
99
 
88
100
  var height = shareContent.clientHeight; // 获取dom 高度
89
101
 
90
- var canvas = document.createElement("canvas"); // 创建一个canvas节点
102
+ var canvas = document.createElement('canvas'); // 创建一个canvas节点
91
103
 
92
104
  var scale = 2; // 定义任意放大倍数 支持小数
93
105
 
@@ -116,17 +128,17 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
116
128
 
117
129
  };
118
130
  (0, _html2canvas["default"])(downLoadRef.current, opts).then(function (canvas) {
119
- var imgUrl = canvas.toDataURL("image/png"); // 得到图片的base64编码数据
131
+ var imgUrl = canvas.toDataURL('image/png'); // 得到图片的base64编码数据
120
132
 
121
133
  var image = new Image();
122
- image.setAttribute("crossOrigin", "anonymous");
134
+ image.setAttribute('crossOrigin', 'anonymous');
123
135
 
124
136
  image.onload = function () {
125
- var a = document.createElement("a"); // 生成一个a元素
137
+ var a = document.createElement('a'); // 生成一个a元素
126
138
 
127
- var event = new MouseEvent("click"); // 创建一个单击事件
139
+ var event = new MouseEvent('click'); // 创建一个单击事件
128
140
 
129
- a.download = (0, _getLocale.getLocale)("OKR_MyO_Share"); // 设置图片名称
141
+ a.download = (0, _getLocale.getLocale)('OKR_MyO_Share'); // 设置图片名称
130
142
 
131
143
  a.href = imgUrl; // 将生成的URL设置为a.href属性
132
144
 
@@ -135,6 +147,22 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
135
147
 
136
148
  image.src = imgUrl;
137
149
  });
150
+ }, []);
151
+ (0, _react.useEffect)(function () {
152
+ (0, _openData.parseOpenDataStringToImg)(createdSuccessInfo.workName, {
153
+ fontSize: 14,
154
+ fontWeight: '600',
155
+ color: '141c28',
156
+ lineHeight: 22
157
+ }).then(setOkrName);
158
+ Promise.all(createdSuccessInfo.Krs.map(function (kr) {
159
+ return (0, _openData.parseOpenDataStringToImg)(kr.mileStoneName, {
160
+ fontSize: 12,
161
+ fontWeight: 'normal',
162
+ color: '3f4755',
163
+ lineHeight: 18
164
+ });
165
+ })).then(setKrNames);
138
166
  }, []); // console.log(createdSuccessInfo)
139
167
 
140
168
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -149,10 +177,10 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
149
177
  className: "create-success-model__top-block"
150
178
  }, /*#__PURE__*/_react["default"].createElement("img", {
151
179
  src: _light["default"],
152
- className: "create-success-model__light ".concat(isDownload ? "create-success-model--animation-unset" : "")
180
+ className: "create-success-model__light ".concat(isDownload ? 'create-success-model--animation-unset' : '')
153
181
  }), isDownload ? null : /*#__PURE__*/_react["default"].createElement("img", {
154
182
  src: _shower["default"],
155
- className: "create-success-model__shower ".concat(isDownload ? "create-success-model--animation-unset" : "")
183
+ className: "create-success-model__shower ".concat(isDownload ? 'create-success-model--animation-unset' : '')
156
184
  }), /*#__PURE__*/_react["default"].createElement("img", {
157
185
  src: _createSuccessHead["default"],
158
186
  className: "create-success-model__create-head"
@@ -163,7 +191,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
163
191
  className: "create-success-model__avatar"
164
192
  }, createdSuccessInfo.principalUser.avatar.hasAvatar ? /*#__PURE__*/_react["default"].createElement("img", {
165
193
  className: "create-success-model__img",
166
- src: "".concat(createdSuccessInfo.userAvatarBase64Url ? "data:image/png;base64,".concat(createdSuccessInfo.userAvatarBase64Url) : "")
194
+ src: "".concat(createdSuccessInfo.userAvatarBase64Url ? "data:image/png;base64,".concat(createdSuccessInfo.userAvatarBase64Url) : '')
167
195
  }) : /*#__PURE__*/_react["default"].createElement("div", {
168
196
  className: "create-success-model__text-avatar",
169
197
  style: {
@@ -182,10 +210,10 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
182
210
  src: _createSuccessRightQuotation["default"]
183
211
  })), /*#__PURE__*/_react["default"].createElement("div", {
184
212
  className: "create-success-model__congratulation"
185
- }, (0, _getLocale.getLocale)("OKR_MyO_Pop_OKRscreated"), "\xA0\xA0", /*#__PURE__*/_react["default"].createElement("span", {
213
+ }, (0, _getLocale.getLocale)('OKR_MyO_Pop_OKRscreated'), "\xA0\xA0", /*#__PURE__*/_react["default"].createElement("span", {
186
214
  className: "create-success-model__percent"
187
- }, createdSuccessInfo.countSurpassPercentage, "%"), "\xA0\xA0", (0, _getLocale.getLocale)("OKR_MyO_Pop_ofpeople")), /*#__PURE__*/_react["default"].createElement("div", {
188
- className: "create-success-model__okr-info ".concat(isDownload ? "" : "create-success-model--fix-height")
215
+ }, createdSuccessInfo.countSurpassPercentage, "%"), "\xA0\xA0", (0, _getLocale.getLocale)('OKR_MyO_Pop_ofpeople')), /*#__PURE__*/_react["default"].createElement("div", {
216
+ className: "create-success-model__okr-info ".concat(isDownload ? '' : 'create-success-model--fix-height')
189
217
  }, isDownload ? null : /*#__PURE__*/_react["default"].createElement("img", {
190
218
  className: "create-success-model__shadow-img",
191
219
  src: _createSuccessShadow["default"]
@@ -196,7 +224,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
196
224
  className: "create-success-model__o-name-icon"
197
225
  }), /*#__PURE__*/_react["default"].createElement("span", {
198
226
  className: "create-success-model__o-name-text"
199
- }, createdSuccessInfo.workName)), createdSuccessInfo.Krs.map(function (kr, index) {
227
+ }, okrName)), krNames.map(function (kr, index) {
200
228
  return (
201
229
  /*#__PURE__*/
202
230
  // if(!isDownload && index > 2) {
@@ -207,11 +235,11 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
207
235
  }, /*#__PURE__*/_react["default"].createElement("span", {
208
236
  className: "create-success-model__dot"
209
237
  }), /*#__PURE__*/_react["default"].createElement("li", {
210
- className: "create-success-model__kr ".concat(isDownload ? "create-success-model__kr--no-wrap" : "")
211
- }, kr.mileStoneName))
238
+ className: "create-success-model__kr ".concat(isDownload ? 'create-success-model__kr--no-wrap' : '')
239
+ }, kr))
212
240
  );
213
241
  })), isDownload ? /*#__PURE__*/_react["default"].createElement("div", {
214
- className: "create-success-model__qrcode ".concat(isDownload ? "create-success-model--hidden-box-shadow" : "")
242
+ className: "create-success-model__qrcode ".concat(isDownload ? 'create-success-model--hidden-box-shadow' : '')
215
243
  }, /*#__PURE__*/_react["default"].createElement("img", {
216
244
  src: _qrCode["default"],
217
245
  width: "275"
@@ -222,10 +250,10 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
222
250
  }, /*#__PURE__*/_react["default"].createElement("span", {
223
251
  className: "create-success-model__common-btn-style create-success-model__return-list",
224
252
  onClick: handleShowDetail
225
- }, (0, _getLocale.getLocale)("Mod_Checkdetails")), /*#__PURE__*/_react["default"].createElement("span", {
253
+ }, (0, _getLocale.getLocale)('Mod_Checkdetails')), /*#__PURE__*/_react["default"].createElement("span", {
226
254
  className: "create-success-model__common-btn-style create-success-model__download-img",
227
255
  onClick: handleDownloadPic
228
- }, (0, _getLocale.getLocale)("OKR_MyO_Popup_Download"))), /*#__PURE__*/_react["default"].createElement("div", {
256
+ }, (0, _getLocale.getLocale)('OKR_MyO_Popup_Download'))), /*#__PURE__*/_react["default"].createElement("div", {
229
257
  className: "create-success-model__checkbox-wrapper"
230
258
  }, /*#__PURE__*/_react["default"].createElement("input", {
231
259
  id: "dontShowCreateSucess",
@@ -236,7 +264,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
236
264
  }), /*#__PURE__*/_react["default"].createElement("label", {
237
265
  htmlFor: "dontShowCreateSucess",
238
266
  className: "create-success-model__label"
239
- }, (0, _getLocale.getLocale)("OKR_MyO_Pop_Nomore"))))));
267
+ }, (0, _getLocale.getLocale)('OKR_MyO_Pop_Nomore'))))));
240
268
  };
241
269
 
242
270
  var _default = CreateSuccessCmp;
@@ -97,6 +97,7 @@
97
97
  .okr-o-new-name .okr-o-new-name__left-block {
98
98
  flex: 1;
99
99
  display: flex;
100
+ align-items: center;
100
101
  position: relative;
101
102
  }
102
103
 
@@ -133,6 +134,16 @@
133
134
  right: 8px;
134
135
  }
135
136
 
137
+ .okr-o-new-name .okr-o-new-name__left-block .tita-rich-editor__inline-editor {
138
+ flex: 1;
139
+ width: 0;
140
+ margin-right: 8px;
141
+ }
142
+
143
+ .okr-o-new-name .okr-o-new-name__left-block .tita-rich-editor .ProseMirror > p {
144
+ font-weight: 600;
145
+ }
146
+
136
147
  .user-info {
137
148
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
138
149
  display: flex;
@@ -177,7 +188,7 @@
177
188
  }
178
189
 
179
190
  .error-popup-text-wrapper::after {
180
- content: "";
191
+ content: '';
181
192
  display: block;
182
193
  border: 6px solid transparent;
183
194
  position: absolute;
@@ -223,7 +234,7 @@
223
234
  }
224
235
 
225
236
  .okr-create-suggest .okr-create-suggest__triangle::after {
226
- content: "";
237
+ content: '';
227
238
  display: block;
228
239
  border: 8px solid #fffffd;
229
240
  border-top: 8px solid transparent;
@@ -235,7 +246,7 @@
235
246
  }
236
247
 
237
248
  .okr-create-suggest .okr-create-suggest__triangle::before {
238
- content: "";
249
+ content: '';
239
250
  display: block;
240
251
  border: 8px solid #f6bd16;
241
252
  border-top: 8px solid transparent;
@@ -9,6 +9,8 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
+ var _richEditor = require("@titaui/rich-editor");
13
+
12
14
  var _toast = _interopRequireDefault(require("../../toast"));
13
15
 
14
16
  var _constant = require("../constant");
@@ -53,8 +55,9 @@ var initOCheckResult = function initOCheckResult() {
53
55
  };
54
56
 
55
57
  function ONewName(_ref) {
56
- var okrName = _ref.okrName,
57
- setOkrName = _ref.setOkrName,
58
+ var richEditorStatus = _ref.richEditorStatus,
59
+ okrNameData = _ref.okrNameData,
60
+ setOkrNameData = _ref.setOkrNameData,
58
61
  container = _ref.container,
59
62
  user = _ref.user,
60
63
  setUser = _ref.setUser,
@@ -63,9 +66,10 @@ function ONewName(_ref) {
63
66
  _ref$setIsInputConten = _ref.setIsInputContent,
64
67
  setIsInputContent = _ref$setIsInputConten === void 0 ? function () {} : _ref$setIsInputConten;
65
68
  var oCheckId = 0;
69
+ var mentionInputRef = (0, _react.useRef)();
66
70
  var timerRef = (0, _react.useRef)();
67
- var okrNameIsEmpty = (0, _react.useRef)(!okrName);
68
- var oldONameRef = (0, _react.useRef)("");
71
+ var okrNameIsEmpty = (0, _react.useRef)(!okrNameData.pureText);
72
+ var oldONameRef = (0, _react.useRef)('');
69
73
  var formatUser = (0, _react.useMemo)(function () {
70
74
  var medium = user.avatar && (user.avatar.Medium || user.avatar.medium);
71
75
  var color = user.avatar && (user.avatar.Color || user.avatar.color);
@@ -99,7 +103,7 @@ function ONewName(_ref) {
99
103
  var tempCheckId = oCheckId; // @ts-ignore
100
104
 
101
105
  return (0, _requestApi.getOAnalysisInfos)({
102
- text: okrName
106
+ text: okrNameData.pureTextExcludeAt
103
107
  }) // @ts-ignore
104
108
  .then(function (data) {
105
109
  if (tempCheckId !== oCheckId) {
@@ -132,12 +136,18 @@ function ONewName(_ref) {
132
136
  })["finally"](function () {
133
137
  setIsInputContent(false);
134
138
  });
135
- }, [okrName, setIsInputContent]);
139
+ }, [okrNameData, setIsInputContent]);
140
+
141
+ var onChangeHandler = function onChangeHandler(data) {
142
+ setOkrNameData(data);
143
+ setIsInputContent(true);
144
+ };
145
+
136
146
  (0, _react.useEffect)(function () {
137
147
  // 防抖
138
- okrNameIsEmpty.current = !okrName;
148
+ okrNameIsEmpty.current = !okrNameData.pureText;
139
149
 
140
- if (!okrName) {
150
+ if (!okrNameData.pureText) {
141
151
  setONameCheckResult(initOCheckResult());
142
152
  setIsInputContent(false);
143
153
  } else if (timerRef.current) {
@@ -150,7 +160,7 @@ function ONewName(_ref) {
150
160
  return function () {
151
161
  clearTimeout(timerRef.current);
152
162
  };
153
- }, [okrName]);
163
+ }, [okrNameData]);
154
164
  var handleInputFocus = (0, _react.useCallback)(function () {
155
165
  if (onOInputFocusStateChange) {
156
166
  onOInputFocusStateChange(true);
@@ -161,7 +171,7 @@ function ONewName(_ref) {
161
171
  onOInputFocusStateChange(false);
162
172
  }
163
173
  }, []);
164
- var handleOnKeyDown = (0, _react.useCallback)(function () {
174
+ var handleOnKeyDown = (0, _react.useCallback)(function (e) {
165
175
  setIsInputContent(true);
166
176
  }, [setIsInputContent]);
167
177
  var handleOnKeyUp = (0, _react.useCallback)(function (e) {
@@ -173,6 +183,9 @@ function ONewName(_ref) {
173
183
  oldONameRef.current = e.target.value;
174
184
  }
175
185
  }, []);
186
+ var pureTextExcludeAt = okrNameData.pureTextExcludeAt,
187
+ richText = okrNameData.richText;
188
+ var okrNameLen = (pureTextExcludeAt === null || pureTextExcludeAt === void 0 ? void 0 : pureTextExcludeAt.length) || 0;
176
189
  return /*#__PURE__*/_react["default"].createElement("div", {
177
190
  className: "okr-o-new-name"
178
191
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -180,21 +193,19 @@ function ONewName(_ref) {
180
193
  }, /*#__PURE__*/_react["default"].createElement("span", {
181
194
  className: "left-block__title"
182
195
  }, "O"), /*#__PURE__*/_react["default"].createElement(_inputWithErrPopup["default"], {
183
- strLength: okrName.length,
196
+ strLength: okrNameLen,
184
197
  maxLength: 500,
185
198
  position: "top"
186
- }, /*#__PURE__*/_react["default"].createElement("input", {
199
+ }, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
200
+ initialState: richText,
201
+ key: richEditorStatus,
202
+ onDocChange: onChangeHandler,
187
203
  onFocus: handleInputFocus,
188
204
  onBlur: handleInputBlur,
189
- className: "left-block__input",
190
- placeholder: (0, _getLocale.getLocale)("OKR_MyO_Pop_PleInspObjective"),
191
- type: "text",
192
- value: okrName,
193
- onChange: function onChange(e) {
194
- return setOkrName(e.target.value);
195
- },
196
205
  onKeyDown: handleOnKeyDown,
197
- onKeyUp: handleOnKeyUp
206
+ onKeyUp: handleOnKeyUp,
207
+ placeholder: (0, _getLocale.getLocale)('OKR_MyO_Pop_PleInspObjective'),
208
+ ref: mentionInputRef
198
209
  })), /*#__PURE__*/_react["default"].createElement("div", {
199
210
  className: "left-block__right-text-mask"
200
211
  })), /*#__PURE__*/_react["default"].createElement(_okrNewUserSelector["default"], {
@@ -19,6 +19,8 @@ var _changeOkrModal = _interopRequireDefault(require("../../change-okr-modal"));
19
19
 
20
20
  var _getLocale = require("../../../utils/getLocale");
21
21
 
22
+ var _openData = require("../../../utils/open-data");
23
+
22
24
  require("./index.css");
23
25
 
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -68,7 +70,7 @@ function _default(_ref) {
68
70
  e.stopPropagation();
69
71
  setParent({
70
72
  parentWorkId: 0,
71
- parentWorkName: "",
73
+ parentWorkName: '',
72
74
  parentType: 0,
73
75
  parentKrId: 0
74
76
  });
@@ -107,7 +109,7 @@ function _default(_ref) {
107
109
 
108
110
  (0, _react.useEffect)(function () {
109
111
  // @ts-ignore
110
- (0, _helper.taker)((0, _helper.getApiUrl)("org/Get"), "get").then(function (res) {
112
+ (0, _helper.taker)((0, _helper.getApiUrl)('org/Get'), 'get').then(function (res) {
111
113
  if (res.Code == 1) {
112
114
  var SuperiorUser = res.Data.SuperiorUser;
113
115
 
@@ -127,13 +129,13 @@ function _default(_ref) {
127
129
  className: "create-modal__sub-block"
128
130
  }, isCreateModal ? /*#__PURE__*/_react["default"].createElement("div", {
129
131
  className: "create-modal__sub-title"
130
- }, (0, _getLocale.getLocale)("OKR_MyO_Pop_SetAlignment")) : /*#__PURE__*/_react["default"].createElement(_style.TitleLine, null, (0, _getLocale.getLocale)("OKR_MyO_Pop_SetAlignment")), /*#__PURE__*/_react["default"].createElement(_style.SelectBtn, {
132
+ }, (0, _getLocale.getLocale)('OKR_MyO_Pop_SetAlignment')) : /*#__PURE__*/_react["default"].createElement(_style.TitleLine, null, (0, _getLocale.getLocale)('OKR_MyO_Pop_SetAlignment')), /*#__PURE__*/_react["default"].createElement(_style.SelectBtn, {
131
133
  onClick: onSelectClickHandler
132
134
  }, /*#__PURE__*/_react["default"].createElement("span", {
133
135
  style: {
134
- color: !parent.parentWorkName ? "#BFC7D5" : ""
136
+ color: !parent.parentWorkName ? '#BFC7D5' : ''
135
137
  }
136
- }, !parent.parentWorkName ? (0, _getLocale.getLocale)("OKR_MyO_Pop_Aligneobjective") : parent.parentWorkName), !!parent.parentWorkName && /*#__PURE__*/_react["default"].createElement("a", {
138
+ }, !parent.parentWorkName ? (0, _getLocale.getLocale)('OKR_MyO_Pop_Aligneobjective') : (0, _openData.parseString)(parent.parentWorkName)), !!parent.parentWorkName && /*#__PURE__*/_react["default"].createElement("a", {
137
139
  className: "tu-icon-cross",
138
140
  onClick: iconCrossClickHandler
139
141
  }), /*#__PURE__*/_react["default"].createElement("i", {