@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
@@ -0,0 +1,154 @@
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 _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; }
31
+
32
+ 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); } }
33
+
34
+ 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); }); }; }
35
+
36
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
37
+
38
+ 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."); }
39
+
40
+ 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); }
41
+
42
+ 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; }
43
+
44
+ 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; }
45
+
46
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
47
+
48
+ var OClassify = function OClassify(props) {
49
+ var editable = props.editable,
50
+ okrId = props.okrId,
51
+ okrClassify = props.okrClassify,
52
+ onOkrClassifyChange = props.onOkrClassifyChange;
53
+
54
+ var _useState = (0, _react.useState)(false),
55
+ _useState2 = _slicedToArray(_useState, 2),
56
+ visible = _useState2[0],
57
+ setVisible = _useState2[1];
58
+
59
+ var updateClassifyHandler = /*#__PURE__*/function () {
60
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(select) {
61
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
62
+ while (1) {
63
+ switch (_context.prev = _context.next) {
64
+ case 0:
65
+ if (!(select == okrClassify)) {
66
+ _context.next = 3;
67
+ break;
68
+ }
69
+
70
+ setVisible(false);
71
+ return _context.abrupt("return");
72
+
73
+ case 3:
74
+ _context.next = 5;
75
+ return (0, _requestApis.updateClassify)({
76
+ okrId: okrId,
77
+ okrClassify: select
78
+ });
79
+
80
+ case 5:
81
+ if (onOkrClassifyChange) {
82
+ onOkrClassifyChange(select);
83
+ }
84
+
85
+ setVisible(false);
86
+
87
+ _toast["default"].Success('修改成功');
88
+
89
+ case 8:
90
+ case "end":
91
+ return _context.stop();
92
+ }
93
+ }
94
+ }, _callee);
95
+ }));
96
+
97
+ return function updateClassifyHandler(_x) {
98
+ return _ref.apply(this, arguments);
99
+ };
100
+ }();
101
+
102
+ var renderTrigger = (0, _react.useMemo)(function () {
103
+ return /*#__PURE__*/_react["default"].createElement("span", {
104
+ className: (0, _classnames["default"])('okr-drawer-header__classify', {
105
+ 'okr-drawer-header__classify--editable': editable,
106
+ 'tu-icon-nuo': okrClassify == 1,
107
+ 'tu-icon-yuan': okrClassify == 2
108
+ }),
109
+ onClick: function onClick() {
110
+ return editable && setVisible(true);
111
+ }
112
+ }, okrClassify == 1 ? (0, _getLocale.getLocale)('OKR_MyO_Es_Commitment') : (0, _getLocale.getLocale)('OKR_MyO_Es_Visiontype'));
113
+ }, [okrClassify, editable]);
114
+
115
+ if (editable && okrClassify !== 0) {
116
+ var popContent = /*#__PURE__*/_react["default"].createElement("div", {
117
+ className: "okr-drawer-header__classify-popup"
118
+ }, /*#__PURE__*/_react["default"].createElement("div", {
119
+ className: (0, _classnames["default"])('okr-drawer-header__classify-popup-item', {
120
+ active: okrClassify === 1
121
+ }),
122
+ onClick: function onClick() {
123
+ return updateClassifyHandler(1);
124
+ }
125
+ }, (0, _getLocale.getLocale)('OKR_MyO_Es_Commitment')), /*#__PURE__*/_react["default"].createElement("div", {
126
+ className: (0, _classnames["default"])('okr-drawer-header__classify-popup-item', {
127
+ active: okrClassify === 2
128
+ }),
129
+ onClick: function onClick() {
130
+ return updateClassifyHandler(2);
131
+ }
132
+ }, (0, _getLocale.getLocale)('OKR_MyO_Es_Visiontype')));
133
+
134
+ return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
135
+ popup: popContent,
136
+ popupVisible: visible,
137
+ placement: "bottomLeft",
138
+ popupAlign: {
139
+ offset: [48, 0],
140
+ overflow: {
141
+ adjustX: true,
142
+ adjustY: true
143
+ },
144
+ targetOffset: [0, 0]
145
+ }
146
+ }, renderTrigger);
147
+ }
148
+
149
+ if (okrClassify === 0) return null;
150
+ return renderTrigger;
151
+ };
152
+
153
+ var _default = OClassify;
154
+ 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;
@@ -54,7 +54,7 @@ function OProgressUpdate(props) {
54
54
  renderContent = props.renderContent,
55
55
  setUpdateData = props.setUpdateData,
56
56
  _props$title = props.title,
57
- title = _props$title === void 0 ? (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Upd") : _props$title;
57
+ title = _props$title === void 0 ? (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Upd') : _props$title;
58
58
 
59
59
  var _useState = (0, _react.useState)(false),
60
60
  _useState2 = _slicedToArray(_useState, 2),
@@ -86,7 +86,7 @@ function OProgressUpdate(props) {
86
86
  data = _context.sent;
87
87
 
88
88
  if (data.Code === 1) {
89
- _toast["default"].Success((0, _getLocale.getLocale)("Per_Ma_form_Updatesuc"));
89
+ _toast["default"].Success((0, _getLocale.getLocale)('Per_Ma_form_Updatesuc'));
90
90
 
91
91
  if (refreshAll) {
92
92
  refreshAll();
@@ -31,6 +31,8 @@ var _getLocale = require("../../../../../../utils/getLocale");
31
31
 
32
32
  var _bsGlobal = require("../../../../../../utils/bs-global");
33
33
 
34
+ var _openData = require("../../../../../../utils/open-data");
35
+
34
36
  require("./index.css");
35
37
 
36
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -209,7 +211,7 @@ var EKrNode = function EKrNode(props) {
209
211
  }
210
212
  }
211
213
  }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
212
- text: title,
214
+ text: (0, _openData.parseString)(title),
213
215
  minusWidth: 150,
214
216
  isPercent: true
215
217
  })), okrInfo.status === 1 && (isParticipant || hasRelativeAuth) ? /*#__PURE__*/_react["default"].createElement("div", {
@@ -71,6 +71,10 @@
71
71
  color: #f05e5e;
72
72
  }
73
73
 
74
+ .tita-okrdt-tree__kr-node-h1 {
75
+ display: flex;
76
+ }
77
+
74
78
  .tita-okrdt-tree__kr-node-h2 {
75
79
  height: 20px;
76
80
  padding-left: 28px;
@@ -88,18 +92,76 @@
88
92
  }
89
93
 
90
94
  .tita-okrdt-tree__kr-node-title {
91
- display: inline-block;
95
+ max-width: calc(100% - 32px);
92
96
  margin-left: 8px;
93
97
  font-size: 14px;
94
- font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
95
98
  font-weight: 600;
96
- color: #3f4755;
97
99
  line-height: 22px;
100
+ color: #3f4755;
101
+ display: inline-flex;
102
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
98
103
  vertical-align: top;
99
- width: calc(100% - 32px);
100
104
  white-space: break-spaces;
101
105
  }
102
106
 
107
+ .tita-okrdt-tree__kr-node-title--editing {
108
+ width: calc(100% - 32px);
109
+ }
110
+
111
+ .tita-okrdt-tree__kr-node-title .tu-icon-bianji2 {
112
+ margin-left: 5px;
113
+ font-size: 13px;
114
+ transition: visibility 0.3s ease;
115
+ color: #89919f;
116
+ visibility: hidden;
117
+ }
118
+
103
119
  .tita-okrdt-tree__kr-node-title:hover .tu-icon-bianji2 {
104
120
  visibility: visible;
105
121
  }
122
+
123
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor {
124
+ flex: 1;
125
+ border: 1px solid #2879ff;
126
+ border-radius: 4px;
127
+ box-shadow: 0px 0px 6px 0px rgba(40, 121, 255, 0.3) inset;
128
+ transition: all 0.3s ease;
129
+ box-sizing: border-box;
130
+ }
131
+
132
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor .ProseMirror p {
133
+ padding: 2px;
134
+ white-space: nowrap;
135
+ }
136
+
137
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor--disabled {
138
+ padding: 0;
139
+ flex: unset !important;
140
+ border-color: transparent;
141
+ box-shadow: none;
142
+ }
143
+
144
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor--disabled .ProseMirror p {
145
+ padding: 0;
146
+ font-size: 14px;
147
+ font-weight: 600;
148
+ line-height: 20px;
149
+ transition: color 0.3s ease-in 0s;
150
+ color: #3f4755;
151
+ cursor: pointer;
152
+ display: -webkit-box;
153
+ overflow: hidden;
154
+ text-overflow: ellipsis;
155
+ word-break: break-all;
156
+ -webkit-box-orient: vertical;
157
+ -webkit-line-clamp: 2;
158
+ white-space: normal;
159
+ }
160
+
161
+ .tita-okrdt-tree__kr-node-title .tita-rich-editor--disabled .ProseMirror p:hover {
162
+ color: #2879ff;
163
+ }
164
+
165
+ .tita-okrdt-tree .rc-tree-treenode {
166
+ overflow: visible !important;
167
+ }