@titaui/pc 1.12.6 → 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 (137) hide show
  1. package/lib/components/change-okr-modal/Item.js +19 -18
  2. package/lib/components/change-okr-modal/index.js +4 -2
  3. package/lib/components/change-okr-modal/styledComponents.js +9 -9
  4. package/lib/components/common-share/publishMblog.js +4 -2
  5. package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
  6. package/lib/components/create-okr-modal/fields/index.css +14 -3
  7. package/lib/components/create-okr-modal/fields/o-new-name.js +31 -20
  8. package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
  9. package/lib/components/create-okr-modal/fields/okr-type-detail.js +4 -2
  10. package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +4 -2
  11. package/lib/components/create-okr-modal/index.js +201 -134
  12. package/lib/components/create-okr-modal/kr-items/index.css +23 -13
  13. package/lib/components/create-okr-modal/kr-items/krDatas.js +95 -76
  14. package/lib/components/create-okr-modal/kr-items/krItem.js +54 -57
  15. package/lib/components/create-okr-modal/request-api.js +16 -12
  16. package/lib/components/create-okr-modal/style.js +5 -5
  17. package/lib/components/create-okr-modal/utils/helper.js +6 -2
  18. package/lib/components/drawer-manager/drawerWrapper.js +4 -2
  19. package/lib/components/dynamic/components/title/index.js +1 -1
  20. package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +7 -7
  21. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +7 -7
  22. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +17 -17
  23. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -1
  24. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +9 -9
  25. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +3 -1
  26. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -1
  27. package/lib/components/eReport/eReportLists/reportList.js +29 -30
  28. package/lib/components/eReport/eReportShare/style.js +1 -1
  29. package/lib/components/edit-kr-wight/EditKrWightModal.js +11 -9
  30. package/lib/components/firework/index.js +6 -2
  31. package/lib/components/form/form-fields/input-verification-code/index.js +4 -2
  32. package/lib/components/grid-layout/util/network.js +10 -6
  33. package/lib/components/nav-top/components/menu/index.js +3 -3
  34. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +1 -1
  35. package/lib/components/nav-top/components/user-message/components/todos/todo-item.js +3 -3
  36. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +4 -2
  37. package/lib/components/okr-detail/components/ao-nice/index.css +0 -1
  38. package/lib/components/okr-detail/components/ao-nice/index.js +6 -4
  39. package/lib/components/okr-detail/components/header/edit-name.js +80 -41
  40. package/lib/components/okr-detail/components/header/index.css +122 -41
  41. package/lib/components/okr-detail/components/header/index.js +45 -48
  42. package/lib/components/okr-detail/components/header/o-avatar.js +4 -2
  43. package/lib/components/okr-detail/components/header/o-classify.js +154 -0
  44. package/lib/components/okr-detail/components/header/o-name.js +7 -5
  45. package/lib/components/okr-detail/components/o-classify.js +4 -2
  46. package/lib/components/okr-detail/components/o-progress-update/index.js +14 -8
  47. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +7 -3
  48. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +4 -2
  49. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +4 -2
  50. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +66 -4
  51. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +178 -66
  52. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +4 -2
  53. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +8 -6
  54. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
  55. package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +19 -15
  56. package/lib/components/okr-detail/components/tab-panel-content/index.css +1 -0
  57. package/lib/components/okr-detail/detail-footer/index.js +4 -2
  58. package/lib/components/okr-detail/detail-header/index.js +23 -15
  59. package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
  60. package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
  61. package/lib/components/okr-detail/okr-list/index.css +9 -0
  62. package/lib/components/okr-detail/okr-list/index.js +29 -27
  63. package/lib/components/okr-detail/request-apis.js +79 -71
  64. package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
  65. package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
  66. package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
  67. package/lib/components/okr-flow/child-node/fields/creator.js +4 -2
  68. package/lib/components/okr-flow/child-node/kr-node.js +3 -1
  69. package/lib/components/okr-flow/child-node/work-node.js +7 -3
  70. package/lib/components/okr-flow/export-modal/index.js +10 -29
  71. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +10 -8
  72. package/lib/components/okr-flow/request-apis.js +6 -2
  73. package/lib/components/okr-flow/root-node/index.js +4 -2
  74. package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
  75. package/lib/components/okr-progress/components/o-progress/index.js +3 -1
  76. package/lib/components/okr-progress/components/o-progress-update/index.js +10 -6
  77. package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
  78. package/lib/components/okr-progress-modal/index.js +4 -2
  79. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +7 -5
  80. package/lib/components/okr-share/common-painter/darwAvatar.js +8 -4
  81. package/lib/components/okr-share/common-painter/openDataPainter.js +15 -8
  82. package/lib/components/okr-share/common-painter/utils.js +187 -36
  83. package/lib/components/okr-share/index.css +5 -4
  84. package/lib/components/okr-share/pink-card/card.js +3 -3
  85. package/lib/components/okr-share/pink-card/drawDepartmentName.js +6 -2
  86. package/lib/components/okr-share/pink-card/drawKrs.js +97 -18
  87. package/lib/components/okr-share/pink-card/drawQuote.js +6 -2
  88. package/lib/components/okr-share/pink-card/drawUserName.js +6 -2
  89. package/lib/components/okr-share/pink-card/index.js +26 -14
  90. package/lib/components/okr-share/publishMblog.js +4 -2
  91. package/lib/components/okr-share/shareCardSelector.js +6 -4
  92. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
  93. package/lib/components/okrcase-library/server/network.js +24 -20
  94. package/lib/components/open-data-painter/index.js +12 -7
  95. package/lib/components/period-selector/helper/index.js +6 -2
  96. package/lib/components/search-key-handle/index.js +12 -10
  97. package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +6 -2
  98. package/lib/components/superset-charts/fetch-assets-and-append/index.js +8 -4
  99. package/lib/components/survey-model/request-api.js +6 -2
  100. package/lib/components/task-relation-modal/index.js +6 -4
  101. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +2 -2
  102. package/lib/components/task-relation-modal/tree/category-tree/index.js +4 -2
  103. package/lib/components/task-relation-modal/tree/okr-tree/index.js +4 -2
  104. package/lib/components/task-relation-modal/tree/work-tree/index.js +4 -2
  105. package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -4
  106. package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
  107. package/lib/components/task-relation-modal/work-relation/index.js +6 -4
  108. package/lib/components/task-tree/task-item-node/e-project.js +4 -2
  109. package/lib/components/task-tree/task-item-node/e-task.js +4 -2
  110. package/lib/components/toast/index.js +12 -8
  111. package/lib/components/upload/components/uploadedPreview.js +17 -17
  112. package/lib/components/upload/index.js +23 -23
  113. package/lib/components/upvote/index.js +6 -4
  114. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +14 -14
  115. package/lib/components/user-selector/searched-panel/index.js +4 -4
  116. package/lib/components/version-change-modal/index.js +6 -4
  117. package/lib/components/version-change-modal/request-api.js +6 -2
  118. package/lib/components/wechat-btn/index.css +5 -1
  119. package/lib/components/weekly-report/card.js +4 -12
  120. package/lib/components/weekly-report/common-painter/darwAvatar.js +10 -6
  121. package/lib/components/weekly-report/common-painter/drawName.js +6 -2
  122. package/lib/components/weekly-report/common-painter/openDataPainter.js +6 -2
  123. package/lib/components/weekly-report/index.js +6 -4
  124. package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
  125. package/lib/pages/group-management/groupInterface.js +6 -2
  126. package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
  127. package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
  128. package/lib/pages/new-okr-list/header/index.js +15 -15
  129. package/lib/pages/new-okr-list/request-api.js +18 -14
  130. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +4 -2
  131. package/lib/pages/okr-map/request-apis.js +6 -2
  132. package/lib/utils/hooks.js +5 -5
  133. package/lib/utils/open-data.js +216 -66
  134. package/lib/utils/request-v1.js +6 -2
  135. package/lib/utils/request.js +6 -2
  136. package/lib/utils/tita-okr-cycle.js +3 -3
  137. package/package.json +2 -1
@@ -9,10 +9,14 @@ 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 _uuid = _interopRequireDefault(require("uuid"));
13
15
 
14
16
  var _titaUi = require("tita-ui");
15
17
 
18
+ var _scrollbar = _interopRequireDefault(require("../scrollbar"));
19
+
16
20
  var _bsGlobal = require("../../utils/bs-global");
17
21
 
18
22
  var _roundWeight = require("../../utils/roundWeight");
@@ -67,6 +71,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
67
71
 
68
72
  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; }
69
73
 
74
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
75
+
70
76
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
71
77
 
72
78
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -106,6 +112,13 @@ var initOCheckResult = function initOCheckResult() {
106
112
  });
107
113
  };
108
114
 
115
+ var DefaultOkrNameData = {
116
+ mentionUsers: [],
117
+ pureText: '',
118
+ pureTextExcludeAt: '',
119
+ richText: undefined
120
+ };
121
+
109
122
  function CreateOkrModal(_ref, ref) {
110
123
  var initCycle = _ref.initCycle,
111
124
  userInfo = _ref.userInfo,
@@ -121,10 +134,15 @@ function CreateOkrModal(_ref, ref) {
121
134
  _ref$isFromAssess = _ref.isFromAssess,
122
135
  isFromAssess = _ref$isFromAssess === void 0 ? false : _ref$isFromAssess;
123
136
 
124
- var _useState = (0, _react.useState)(visible),
137
+ var _useState = (0, _react.useState)('initialization'),
125
138
  _useState2 = _slicedToArray(_useState, 2),
126
- isVisible = _useState2[0],
127
- setVisible = _useState2[1]; // @ts-ignore
139
+ richEditorStatus = _useState2[0],
140
+ setRichEditorStatus = _useState2[1];
141
+
142
+ var _useState3 = (0, _react.useState)(visible),
143
+ _useState4 = _slicedToArray(_useState3, 2),
144
+ isVisible = _useState4[0],
145
+ setVisible = _useState4[1]; // @ts-ignore
128
146
 
129
147
 
130
148
  var userId = BSGlobal.loginUserInfo.Id;
@@ -138,80 +156,80 @@ function CreateOkrModal(_ref, ref) {
138
156
  Id = _ref2.Id,
139
157
  UserAvatar = _ref2.UserAvatar;
140
158
 
141
- var _useState3 = (0, _react.useState)(''),
142
- _useState4 = _slicedToArray(_useState3, 2),
143
- okrName = _useState4[0],
144
- setOkrName = _useState4[1]; // 目标名称
159
+ var _useState5 = (0, _react.useState)(DefaultOkrNameData),
160
+ _useState6 = _slicedToArray(_useState5, 2),
161
+ okrNameData = _useState6[0],
162
+ setOkrNameData = _useState6[1]; // 目标名称
145
163
 
146
164
 
147
- var _useState5 = (0, _react.useState)({
165
+ var _useState7 = (0, _react.useState)({
148
166
  name: Name,
149
167
  id: Id,
150
168
  avatar: UserAvatar
151
169
  }),
152
- _useState6 = _slicedToArray(_useState5, 2),
153
- user = _useState6[0],
154
- setUser = _useState6[1]; // 负责人
170
+ _useState8 = _slicedToArray(_useState7, 2),
171
+ user = _useState8[0],
172
+ setUser = _useState8[1]; // 负责人
155
173
 
156
174
 
157
- var _useState7 = (0, _react.useState)(false),
158
- _useState8 = _slicedToArray(_useState7, 2),
159
- isCustomWeight = _useState8[0],
160
- setIsCustomWeight = _useState8[1]; // 是否自定义权重
175
+ var _useState9 = (0, _react.useState)(false),
176
+ _useState10 = _slicedToArray(_useState9, 2),
177
+ isCustomWeight = _useState10[0],
178
+ setIsCustomWeight = _useState10[1]; // 是否自定义权重
161
179
 
162
180
 
163
- var _useState9 = (0, _react.useState)({
181
+ var _useState11 = (0, _react.useState)({
164
182
  departmentId: 0,
165
183
  departmentName: ''
166
184
  }),
167
- _useState10 = _slicedToArray(_useState9, 2),
168
- dept = _useState10[0],
169
- setDept = _useState10[1]; // 部门信息 用于目标类型为部门时
185
+ _useState12 = _slicedToArray(_useState11, 2),
186
+ dept = _useState12[0],
187
+ setDept = _useState12[1]; // 部门信息 用于目标类型为部门时
170
188
 
171
189
 
172
- var _useState11 = (0, _react.useState)({
190
+ var _useState13 = (0, _react.useState)({
173
191
  groupId: 0,
174
192
  groupName: ''
175
193
  }),
176
- _useState12 = _slicedToArray(_useState11, 2),
177
- team = _useState12[0],
178
- setTeam = _useState12[1]; // 团队信息 用于目标类型为团队时
194
+ _useState14 = _slicedToArray(_useState13, 2),
195
+ team = _useState14[0],
196
+ setTeam = _useState14[1]; // 团队信息 用于目标类型为团队时
179
197
 
180
198
 
181
- var _useState13 = (0, _react.useState)({
199
+ var _useState15 = (0, _react.useState)({
182
200
  typeName: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
183
201
  typeId: 1
184
202
  }),
185
- _useState14 = _slicedToArray(_useState13, 2),
186
- type = _useState14[0],
187
- setType = _useState14[1]; // 目标类型
188
-
189
-
190
- var _useState15 = (0, _react.useState)(initCycle),
191
203
  _useState16 = _slicedToArray(_useState15, 2),
192
- cycle = _useState16[0],
193
- setCycle = _useState16[1]; // 目标周期信息
204
+ type = _useState16[0],
205
+ setType = _useState16[1]; // 目标类型
194
206
 
195
207
 
196
- var _useState17 = (0, _react.useState)(),
208
+ var _useState17 = (0, _react.useState)(initCycle),
197
209
  _useState18 = _slicedToArray(_useState17, 2),
198
- okrClassify = _useState18[0],
199
- setOkrClassify = _useState18[1]; // 目标类别
210
+ cycle = _useState18[0],
211
+ setCycle = _useState18[1]; // 目标周期信息
200
212
 
201
213
 
202
- var _useState19 = (0, _react.useState)(1),
214
+ var _useState19 = (0, _react.useState)(),
203
215
  _useState20 = _slicedToArray(_useState19, 2),
204
- visibility = _useState20[0],
205
- setVisibility = _useState20[1]; // 可见性
216
+ okrClassify = _useState20[0],
217
+ setOkrClassify = _useState20[1]; // 目标类别
206
218
 
207
219
 
208
- var _useState21 = (0, _react.useState)({}),
220
+ var _useState21 = (0, _react.useState)(1),
209
221
  _useState22 = _slicedToArray(_useState21, 2),
210
- visiableLimit = _useState22[0],
211
- setVisiableLimit = _useState22[1]; // 可见性指定范围
222
+ visibility = _useState22[0],
223
+ setVisibility = _useState22[1]; // 可见性
212
224
 
213
225
 
214
- var _useState23 = (0, _react.useState)([{
226
+ var _useState23 = (0, _react.useState)({}),
227
+ _useState24 = _slicedToArray(_useState23, 2),
228
+ visiableLimit = _useState24[0],
229
+ setVisiableLimit = _useState24[1]; // 可见性指定范围
230
+
231
+
232
+ var _useState25 = (0, _react.useState)([{
215
233
  // kr信息
216
234
  uuid: _uuid["default"].v1(),
217
235
  principalId: Id,
@@ -219,91 +237,94 @@ function CreateOkrModal(_ref, ref) {
219
237
  userAvatar: UserAvatar,
220
238
  krWeight: 100,
221
239
  mileStoneName: '',
240
+ mileStoneNamePureTextExcludeAt: '',
241
+ mileStoneNameRichText: undefined,
242
+ aiteUsers: [],
222
243
  confidenceIndex: 5
223
244
  }]),
224
- _useState24 = _slicedToArray(_useState23, 2),
225
- krDatas = _useState24[0],
226
- setKrDatas = _useState24[1];
245
+ _useState26 = _slicedToArray(_useState25, 2),
246
+ krDatas = _useState26[0],
247
+ setKrDatas = _useState26[1];
227
248
 
228
- var _useState25 = (0, _react.useState)({
249
+ var _useState27 = (0, _react.useState)({
229
250
  // 对其目标
230
251
  parentWorkId: 0,
231
252
  parentWorkName: '',
232
253
  parentType: 0,
233
254
  parentKrId: 0
234
255
  }),
235
- _useState26 = _slicedToArray(_useState25, 2),
236
- parent = _useState26[0],
237
- setParent = _useState26[1];
238
-
239
- var _useState27 = (0, _react.useState)(false),
240
256
  _useState28 = _slicedToArray(_useState27, 2),
241
- oNameIsInput = _useState28[0],
242
- setONameIsInput = _useState28[1];
257
+ parent = _useState28[0],
258
+ setParent = _useState28[1];
243
259
 
244
260
  var _useState29 = (0, _react.useState)(false),
245
261
  _useState30 = _slicedToArray(_useState29, 2),
246
- krIsInput = _useState30[0],
247
- setKrIsInput = _useState30[1];
262
+ oNameIsInput = _useState30[0],
263
+ setONameIsInput = _useState30[1];
248
264
 
249
- var _useState31 = (0, _react.useState)(initOCheckResult()),
265
+ var _useState31 = (0, _react.useState)(false),
250
266
  _useState32 = _slicedToArray(_useState31, 2),
251
- oNameCheckResult = _useState32[0],
252
- setONameCheckResult = _useState32[1];
267
+ krIsInput = _useState32[0],
268
+ setKrIsInput = _useState32[1];
269
+
270
+ var _useState33 = (0, _react.useState)(initOCheckResult()),
271
+ _useState34 = _slicedToArray(_useState33, 2),
272
+ oNameCheckResult = _useState34[0],
273
+ setONameCheckResult = _useState34[1];
253
274
 
254
- var _useState33 = (0, _react.useState)({
275
+ var _useState35 = (0, _react.useState)({
255
276
  finalResult: _okrCreateSuggest.EOkrCreateSuggestResultType.normal,
256
277
  friendlyResult: []
257
278
  }),
258
- _useState34 = _slicedToArray(_useState33, 2),
259
- krsCheckResult = _useState34[0],
260
- setKrsCheckResult = _useState34[1];
261
-
262
- var _useState35 = (0, _react.useState)(false),
263
279
  _useState36 = _slicedToArray(_useState35, 2),
264
- customCloseOSuggest = _useState36[0],
265
- setCustomCloseOSuggest = _useState36[1]; // 用户点击收起后不再自动弹出
266
-
280
+ krsCheckResult = _useState36[0],
281
+ setKrsCheckResult = _useState36[1];
267
282
 
268
283
  var _useState37 = (0, _react.useState)(false),
269
284
  _useState38 = _slicedToArray(_useState37, 2),
270
- customCloseKrSuggest = _useState38[0],
271
- setCustomCloseKrSuggest = _useState38[1];
285
+ customCloseOSuggest = _useState38[0],
286
+ setCustomCloseOSuggest = _useState38[1]; // 用户点击收起后不再自动弹出
287
+
272
288
 
273
- var _useState39 = (0, _react.useState)(),
289
+ var _useState39 = (0, _react.useState)(false),
274
290
  _useState40 = _slicedToArray(_useState39, 2),
275
- createdSuccessInfo = _useState40[0],
276
- setCreatedSuccessInfo = _useState40[1];
291
+ customCloseKrSuggest = _useState40[0],
292
+ setCustomCloseKrSuggest = _useState40[1];
277
293
 
278
- var _useState41 = (0, _react.useState)(false),
294
+ var _useState41 = (0, _react.useState)(),
279
295
  _useState42 = _slicedToArray(_useState41, 2),
280
- showCreatedSuccessInfo = _useState42[0],
281
- setShowCreatedSuccessInfo = _useState42[1];
296
+ createdSuccessInfo = _useState42[0],
297
+ setCreatedSuccessInfo = _useState42[1];
282
298
 
283
- var _useState43 = (0, _react.useState)(Math.floor(Math.random() * 6)),
299
+ var _useState43 = (0, _react.useState)(false),
284
300
  _useState44 = _slicedToArray(_useState43, 2),
285
- tipIndex = _useState44[0],
286
- setTipIndex = _useState44[1];
301
+ showCreatedSuccessInfo = _useState44[0],
302
+ setShowCreatedSuccessInfo = _useState44[1];
287
303
 
288
- var _useState45 = (0, _react.useState)(''),
304
+ var _useState45 = (0, _react.useState)(Math.floor(Math.random() * 6)),
289
305
  _useState46 = _slicedToArray(_useState45, 2),
290
- userAvatarBase64Url = _useState46[0],
291
- setUserAvatarBase64Url = _useState46[1];
306
+ tipIndex = _useState46[0],
307
+ setTipIndex = _useState46[1];
292
308
 
293
- var _useState47 = (0, _react.useState)(false),
309
+ var _useState47 = (0, _react.useState)(''),
294
310
  _useState48 = _slicedToArray(_useState47, 2),
295
- krIsValidate = _useState48[0],
296
- setKrIsValidate = _useState48[1];
311
+ userAvatarBase64Url = _useState48[0],
312
+ setUserAvatarBase64Url = _useState48[1];
297
313
 
298
314
  var _useState49 = (0, _react.useState)(false),
299
315
  _useState50 = _slicedToArray(_useState49, 2),
300
- isApplyTpl = _useState50[0],
301
- setIsApplyTpl = _useState50[1];
316
+ krIsValidate = _useState50[0],
317
+ setKrIsValidate = _useState50[1];
302
318
 
303
319
  var _useState51 = (0, _react.useState)(false),
304
320
  _useState52 = _slicedToArray(_useState51, 2),
305
- isInputContent = _useState52[0],
306
- setIsInputContent = _useState52[1];
321
+ isApplyTpl = _useState52[0],
322
+ setIsApplyTpl = _useState52[1];
323
+
324
+ var _useState53 = (0, _react.useState)(false),
325
+ _useState54 = _slicedToArray(_useState53, 2),
326
+ isInputContent = _useState54[0],
327
+ setIsInputContent = _useState54[1];
307
328
 
308
329
  var wrapperRef = (0, _react.useRef)();
309
330
  var modalRef = (0, _react.useRef)();
@@ -336,7 +357,12 @@ function CreateOkrModal(_ref, ref) {
336
357
  setCase: function setCase(data) {
337
358
  var name = data.name,
338
359
  subelements = data.subelements;
339
- setOkrName(name);
360
+ setOkrNameData({
361
+ mentionUsers: [],
362
+ pureText: name,
363
+ pureTextExcludeAt: name,
364
+ richText: (0, _richEditor.TitaRichEditorInitTextState)(name)
365
+ });
340
366
  setKrDatas(subelements.map(function (s) {
341
367
  return {
342
368
  uuid: _uuid["default"].v1(),
@@ -345,13 +371,21 @@ function CreateOkrModal(_ref, ref) {
345
371
  userAvatar: UserAvatar,
346
372
  krWeight: (0, _roundWeight.RoundWeight)(100 / subelements.length),
347
373
  mileStoneName: s.name,
374
+ mileStoneNamePureTextExcludeAt: '',
375
+ mileStoneNameRichText: (0, _richEditor.TitaRichEditorInitTextState)(s.name),
376
+ aiteUsers: [],
348
377
  confidenceIndex: 5
349
378
  };
350
379
  }));
351
380
  setIsCustomWeight(false);
352
381
  },
353
382
  setData: function setData(data) {
354
- setOkrName(data.okrName);
383
+ setOkrNameData({
384
+ mentionUsers: [],
385
+ pureText: data.okrName,
386
+ pureTextExcludeAt: data.okrName,
387
+ richText: (0, _richEditor.TitaRichEditorInitTextState)(data.okrName)
388
+ });
355
389
  setUser(data.user);
356
390
  },
357
391
  show: showCreateOkrModal,
@@ -400,14 +434,16 @@ function CreateOkrModal(_ref, ref) {
400
434
 
401
435
 
402
436
  var onModalOkHandler = /*#__PURE__*/function () {
403
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
404
- var orkNameLengthValidate, visibilityArea, data, krNum, krTotalLength, krAvarageLength, krMeasurableLength, oHasVtWords, callData, workId;
405
- return regeneratorRuntime.wrap(function _callee$(_context) {
437
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
438
+ var mentionUsers, pureText, pureTextExcludeAt, richText, orkNameLengthValidate, visibilityArea, formData, data, krNum, krTotalLength, krAvarageLength, krMeasurableLength, oHasVtWords, callData, workId;
439
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
406
440
  while (1) {
407
441
  switch (_context.prev = _context.next) {
408
442
  case 0:
409
- if (okrName) {
410
- _context.next = 3;
443
+ mentionUsers = okrNameData.mentionUsers, pureText = okrNameData.pureText, pureTextExcludeAt = okrNameData.pureTextExcludeAt, richText = okrNameData.richText;
444
+
445
+ if (pureText) {
446
+ _context.next = 4;
411
447
  break;
412
448
  }
413
449
 
@@ -417,9 +453,9 @@ function CreateOkrModal(_ref, ref) {
417
453
 
418
454
  return _context.abrupt("return");
419
455
 
420
- case 3:
421
- if (!(okrName.length > 500)) {
422
- _context.next = 6;
456
+ case 4:
457
+ if (!(pureTextExcludeAt.length > 500)) {
458
+ _context.next = 7;
423
459
  break;
424
460
  }
425
461
 
@@ -429,9 +465,9 @@ function CreateOkrModal(_ref, ref) {
429
465
 
430
466
  return _context.abrupt("return");
431
467
 
432
- case 6:
468
+ case 7:
433
469
  if (allKrHasName) {
434
- _context.next = 10;
470
+ _context.next = 11;
435
471
  break;
436
472
  }
437
473
 
@@ -442,13 +478,15 @@ function CreateOkrModal(_ref, ref) {
442
478
  setKrIsValidate(true);
443
479
  return _context.abrupt("return");
444
480
 
445
- case 10:
481
+ case 11:
446
482
  orkNameLengthValidate = krDatas.filter(function (kr) {
447
- return kr.mileStoneName.trim().length > 500;
483
+ var _trim;
484
+
485
+ return ((_trim = (kr.mileStoneNamePureTextExcludeAt || '').trim()) === null || _trim === void 0 ? void 0 : _trim.length) > 500;
448
486
  }).length == 0;
449
487
 
450
488
  if (orkNameLengthValidate) {
451
- _context.next = 14;
489
+ _context.next = 15;
452
490
  break;
453
491
  }
454
492
 
@@ -458,11 +496,11 @@ function CreateOkrModal(_ref, ref) {
458
496
 
459
497
  return _context.abrupt("return");
460
498
 
461
- case 14:
499
+ case 15:
462
500
  setKrIsValidate(false);
463
501
 
464
502
  if (krWeightValid) {
465
- _context.next = 18;
503
+ _context.next = 19;
466
504
  break;
467
505
  }
468
506
 
@@ -472,27 +510,32 @@ function CreateOkrModal(_ref, ref) {
472
510
 
473
511
  return _context.abrupt("return");
474
512
 
475
- case 18:
513
+ case 19:
476
514
  if (cycle) {
477
- _context.next = 20;
515
+ _context.next = 21;
478
516
  break;
479
517
  }
480
518
 
481
519
  return _context.abrupt("return");
482
520
 
483
- case 20:
521
+ case 21:
484
522
  handleCreatedClose();
485
523
  visibilityArea = formatVisiableLimit();
486
- _context.next = 24;
487
- return (0, _requestApi.createWidthKr)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
524
+ formData = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
488
525
  krInfos: krDatas.map(function (kr) {
526
+ // @ts-ignore
527
+ delete kr.mileStoneNamePureTextExcludeAt;
489
528
  return _objectSpread(_objectSpread({}, kr), {}, {
490
529
  startDate: cycle.startDate,
491
530
  endDate: cycle.endDate
492
531
  });
493
532
  })
494
533
  }, cycle), {}, {
495
- workName: okrName
534
+ workName: pureText,
535
+ workNameRichText: richText,
536
+ aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
537
+ return user.mentionId;
538
+ })
496
539
  }, parent), {}, {
497
540
  workType: 6,
498
541
  visibility: visibility,
@@ -505,13 +548,15 @@ function CreateOkrModal(_ref, ref) {
505
548
  }]
506
549
  }, visibilityArea), {}, {
507
550
  CreateFromAssess: isFromAssess
508
- }));
551
+ });
552
+ _context.next = 26;
553
+ return (0, _requestApi.createWidthKr)(formData);
509
554
 
510
- case 24:
555
+ case 26:
511
556
  data = _context.sent;
512
557
 
513
558
  if (!(data.Code === 0)) {
514
- _context.next = 28;
559
+ _context.next = 30;
515
560
  break;
516
561
  }
517
562
 
@@ -521,7 +566,7 @@ function CreateOkrModal(_ref, ref) {
521
566
 
522
567
  return _context.abrupt("return");
523
568
 
524
- case 28:
569
+ case 30:
525
570
  hideCreateOkrModal();
526
571
 
527
572
  if (onSuccess || !isHiddenCreatedCard) {
@@ -529,8 +574,10 @@ function CreateOkrModal(_ref, ref) {
529
574
  krNum = krDatas.length;
530
575
  krTotalLength = 0;
531
576
  krDatas && krDatas.forEach(function (kr) {
577
+ var _kr$mileStoneNamePure;
578
+
532
579
  // 计算平均长度要去掉百分号和数字
533
- krTotalLength += kr.mileStoneName.replace(/(%|\d)/g, '').length;
580
+ krTotalLength += (_kr$mileStoneNamePure = kr.mileStoneNamePureTextExcludeAt) === null || _kr$mileStoneNamePure === void 0 ? void 0 : _kr$mileStoneNamePure.replace(/(%|\d)/g, '').length;
534
581
  });
535
582
  krAvarageLength = krDatas.length > 0 ? krTotalLength / krDatas.length : 0;
536
583
  krMeasurableLength = krsCheckResult.friendlyResult.filter(function (kr) {
@@ -538,7 +585,7 @@ function CreateOkrModal(_ref, ref) {
538
585
  }).length;
539
586
  oHasVtWords = oNameCheckResult[0].result === _okrCreateSuggest.EOkrCreateSuggestResultType.correct;
540
587
  callData = data;
541
- callData.countSurpassPercentage = (0, _getCreateOkrSurpassPercent["default"])(okrName.replace(/(%|\d)/g, '').length, oHasVtWords, krNum, krMeasurableLength, Number.parseInt(krAvarageLength.toString()));
588
+ callData.countSurpassPercentage = (0, _getCreateOkrSurpassPercent["default"])(okrNameData.pureTextExcludeAt.replace(/(%|\d)/g, '').length, oHasVtWords, krNum, krMeasurableLength, Number.parseInt(krAvarageLength.toString()));
542
589
  newOkrDataRef.current = callData;
543
590
  handleOnSuccess();
544
591
  } else {
@@ -551,7 +598,7 @@ function CreateOkrModal(_ref, ref) {
551
598
 
552
599
  setIsApplyTpl(false);
553
600
 
554
- case 31:
601
+ case 33:
555
602
  case "end":
556
603
  return _context.stop();
557
604
  }
@@ -566,9 +613,15 @@ function CreateOkrModal(_ref, ref) {
566
613
 
567
614
 
568
615
  var OnOkRApplyTplHandler = function OnOkRApplyTplHandler(data) {
616
+ setRichEditorStatus('refresh');
569
617
  var name = data.name,
570
618
  subelements = data.subelements;
571
- setOkrName(name);
619
+ setOkrNameData({
620
+ mentionUsers: [],
621
+ pureText: name,
622
+ pureTextExcludeAt: name,
623
+ richText: (0, _richEditor.TitaRichEditorInitTextState)(name)
624
+ });
572
625
  setKrDatas(subelements.map(function (s) {
573
626
  return {
574
627
  uuid: _uuid["default"].v1(),
@@ -577,11 +630,15 @@ function CreateOkrModal(_ref, ref) {
577
630
  userAvatar: UserAvatar,
578
631
  krWeight: (0, _roundWeight.RoundWeight)(100 / subelements.length),
579
632
  mileStoneName: s.name,
633
+ mileStoneNamePureTextExcludeAt: s.name,
634
+ mileStoneNameRichText: (0, _richEditor.TitaRichEditorInitTextState)(s.name),
635
+ aiteUsers: [],
580
636
  confidenceIndex: 5
581
637
  };
582
638
  }));
583
639
  setIsCustomWeight(false);
584
640
  setIsApplyTpl(true);
641
+ setRichEditorStatus('initialization');
585
642
  };
586
643
 
587
644
  (0, _react.useEffect)(function () {
@@ -593,9 +650,12 @@ function CreateOkrModal(_ref, ref) {
593
650
  userAvatar: UserAvatar,
594
651
  krWeight: 100,
595
652
  mileStoneName: '',
653
+ mileStoneNamePureTextExcludeAt: '',
654
+ mileStoneNameRichText: undefined,
655
+ aiteUsers: [],
596
656
  confidenceIndex: 5
597
657
  }]);
598
- setOkrName('');
658
+ setOkrNameData(DefaultOkrNameData);
599
659
  setUser({
600
660
  name: Name,
601
661
  id: Id,
@@ -620,6 +680,10 @@ function CreateOkrModal(_ref, ref) {
620
680
  parentKrId: 0
621
681
  });
622
682
  }
683
+
684
+ return function () {
685
+ return setRichEditorStatus('initialization');
686
+ };
623
687
  }, [isVisible]);
624
688
  var handleONameSuggestClose = (0, _react.useCallback)(function () {
625
689
  setONameIsInput(false);
@@ -839,17 +903,20 @@ function CreateOkrModal(_ref, ref) {
839
903
  }
840
904
  }, /*#__PURE__*/_react["default"].createElement(_style.Wrapper, {
841
905
  ref: wrapperRef
906
+ }, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], null, /*#__PURE__*/_react["default"].createElement("div", {
907
+ className: "create-modal__wrapper-inner"
842
908
  }, /*#__PURE__*/_react["default"].createElement(_oNewName["default"], {
843
909
  container: modalRef,
910
+ richEditorStatus: richEditorStatus,
911
+ key: richEditorStatus,
844
912
  user: user,
845
913
  setUser: setUser,
846
- okrName: okrName,
847
- setOkrName: setOkrName,
914
+ okrNameData: okrNameData,
915
+ setOkrNameData: setOkrNameData,
848
916
  onOInputFocusStateChange: handleOInputFocusStateChange,
849
917
  setONameCheckResult: setONameCheckResult,
850
918
  setIsInputContent: setIsInputContent
851
919
  }), /*#__PURE__*/_react["default"].createElement(_krDatas["default"], {
852
- krs: krDatas,
853
920
  isCustomWeight: isCustomWeight,
854
921
  wrapperRef: wrapperRef,
855
922
  krDatas: krDatas,
@@ -899,29 +966,29 @@ function CreateOkrModal(_ref, ref) {
899
966
  okrClassify: okrClassify,
900
967
  setOkrClassify: setOkrClassify,
901
968
  isCreateModal: true
902
- }))), !customCloseOSuggest && oNameIsInput ? /*#__PURE__*/_react["default"].createElement(_okrCreateSuggest["default"], {
969
+ }))))), /*#__PURE__*/_react["default"].createElement("img", {
970
+ className: "teach-suggest teach-suggest__o",
971
+ src: _hand["default"],
972
+ onClick: handleShowOSuggest
973
+ }), /*#__PURE__*/_react["default"].createElement("img", {
974
+ className: "teach-suggest teach-suggest__kr",
975
+ src: _hand["default"],
976
+ onClick: handleShowKrSuggest
977
+ }), !customCloseOSuggest && oNameIsInput ? /*#__PURE__*/_react["default"].createElement(_okrCreateSuggest["default"], {
903
978
  isInput: isInputContent,
904
979
  isOSuggest: true,
905
980
  descs: (0, _constant.getODesc)(),
906
981
  example: (0, _constant.getOExample)(),
907
982
  results: oNameCheckResult,
908
983
  handleClose: handleONameSuggestClose
909
- }) : null, /*#__PURE__*/_react["default"].createElement("img", {
910
- className: "teach-suggest teach-suggest__o",
911
- src: _hand["default"],
912
- onClick: handleShowOSuggest
913
- }), !customCloseKrSuggest && krIsInput ? /*#__PURE__*/_react["default"].createElement(_okrCreateSuggest["default"], {
984
+ }) : null, !customCloseKrSuggest && krIsInput ? /*#__PURE__*/_react["default"].createElement(_okrCreateSuggest["default"], {
914
985
  isInput: isInputContent,
915
986
  isOSuggest: false,
916
987
  descs: (0, _constant.getKrDesc)(),
917
988
  example: (0, _constant.KrExample)(),
918
989
  results: krCheckFinalResult,
919
990
  handleClose: handleKrSuggestClose
920
- }) : null, /*#__PURE__*/_react["default"].createElement("img", {
921
- className: "teach-suggest teach-suggest__kr",
922
- src: _hand["default"],
923
- onClick: handleShowKrSuggest
924
- })))), !isApplyTpl && !isHiddenCreatedCard && showCreatedSuccessInfo ? /*#__PURE__*/_react["default"].createElement(_createSuccessCmpWrapper["default"], null, /*#__PURE__*/_react["default"].createElement(_createSuccessCmp["default"], {
991
+ }) : null))), !isApplyTpl && !isHiddenCreatedCard && showCreatedSuccessInfo ? /*#__PURE__*/_react["default"].createElement(_createSuccessCmpWrapper["default"], null, /*#__PURE__*/_react["default"].createElement(_createSuccessCmp["default"], {
925
992
  tipIndex: tipIndex,
926
993
  createdSuccessInfo: createdSuccessInfo,
927
994
  isDownload: false,