@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.
- package/lib/components/change-okr-modal/Item.js +19 -18
- package/lib/components/change-okr-modal/index.js +4 -2
- package/lib/components/change-okr-modal/styledComponents.js +9 -9
- package/lib/components/common-share/publishMblog.js +4 -2
- package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
- package/lib/components/create-okr-modal/fields/index.css +14 -3
- package/lib/components/create-okr-modal/fields/o-new-name.js +31 -20
- package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
- package/lib/components/create-okr-modal/fields/okr-type-detail.js +4 -2
- package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +4 -2
- package/lib/components/create-okr-modal/index.js +201 -134
- package/lib/components/create-okr-modal/kr-items/index.css +23 -13
- package/lib/components/create-okr-modal/kr-items/krDatas.js +95 -76
- package/lib/components/create-okr-modal/kr-items/krItem.js +54 -57
- package/lib/components/create-okr-modal/request-api.js +16 -12
- package/lib/components/create-okr-modal/style.js +5 -5
- package/lib/components/create-okr-modal/utils/helper.js +6 -2
- package/lib/components/drawer-manager/drawerWrapper.js +4 -2
- package/lib/components/dynamic/components/title/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +17 -17
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -1
- package/lib/components/eReport/eReportLists/reportList.js +29 -30
- package/lib/components/eReport/eReportShare/style.js +1 -1
- package/lib/components/edit-kr-wight/EditKrWightModal.js +11 -9
- package/lib/components/firework/index.js +6 -2
- package/lib/components/form/form-fields/input-verification-code/index.js +4 -2
- package/lib/components/grid-layout/util/network.js +10 -6
- package/lib/components/nav-top/components/menu/index.js +3 -3
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +1 -1
- package/lib/components/nav-top/components/user-message/components/todos/todo-item.js +3 -3
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +4 -2
- package/lib/components/okr-detail/components/ao-nice/index.css +0 -1
- package/lib/components/okr-detail/components/ao-nice/index.js +6 -4
- package/lib/components/okr-detail/components/header/edit-name.js +80 -41
- package/lib/components/okr-detail/components/header/index.css +122 -41
- package/lib/components/okr-detail/components/header/index.js +45 -48
- package/lib/components/okr-detail/components/header/o-avatar.js +4 -2
- package/lib/components/okr-detail/components/header/o-classify.js +154 -0
- package/lib/components/okr-detail/components/header/o-name.js +7 -5
- package/lib/components/okr-detail/components/o-classify.js +4 -2
- package/lib/components/okr-detail/components/o-progress-update/index.js +14 -8
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +7 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +4 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +4 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +66 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +178 -66
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +4 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +8 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +19 -15
- package/lib/components/okr-detail/components/tab-panel-content/index.css +1 -0
- package/lib/components/okr-detail/detail-footer/index.js +4 -2
- package/lib/components/okr-detail/detail-header/index.js +23 -15
- package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
- package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
- package/lib/components/okr-detail/okr-list/index.css +9 -0
- package/lib/components/okr-detail/okr-list/index.js +29 -27
- package/lib/components/okr-detail/request-apis.js +79 -71
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
- package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-flow/child-node/fields/creator.js +4 -2
- package/lib/components/okr-flow/child-node/kr-node.js +3 -1
- package/lib/components/okr-flow/child-node/work-node.js +7 -3
- package/lib/components/okr-flow/export-modal/index.js +10 -29
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +10 -8
- package/lib/components/okr-flow/request-apis.js +6 -2
- package/lib/components/okr-flow/root-node/index.js +4 -2
- package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
- package/lib/components/okr-progress/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress/components/o-progress-update/index.js +10 -6
- package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-progress-modal/index.js +4 -2
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +7 -5
- package/lib/components/okr-share/common-painter/darwAvatar.js +8 -4
- package/lib/components/okr-share/common-painter/openDataPainter.js +15 -8
- package/lib/components/okr-share/common-painter/utils.js +187 -36
- package/lib/components/okr-share/index.css +5 -4
- package/lib/components/okr-share/pink-card/card.js +3 -3
- package/lib/components/okr-share/pink-card/drawDepartmentName.js +6 -2
- package/lib/components/okr-share/pink-card/drawKrs.js +97 -18
- package/lib/components/okr-share/pink-card/drawQuote.js +6 -2
- package/lib/components/okr-share/pink-card/drawUserName.js +6 -2
- package/lib/components/okr-share/pink-card/index.js +26 -14
- package/lib/components/okr-share/publishMblog.js +4 -2
- package/lib/components/okr-share/shareCardSelector.js +6 -4
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
- package/lib/components/okrcase-library/server/network.js +24 -20
- package/lib/components/open-data-painter/index.js +12 -7
- package/lib/components/period-selector/helper/index.js +6 -2
- package/lib/components/search-key-handle/index.js +12 -10
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +6 -2
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +8 -4
- package/lib/components/survey-model/request-api.js +6 -2
- package/lib/components/task-relation-modal/index.js +6 -4
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +2 -2
- package/lib/components/task-relation-modal/tree/category-tree/index.js +4 -2
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +4 -2
- package/lib/components/task-relation-modal/tree/work-tree/index.js +4 -2
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -4
- package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
- package/lib/components/task-relation-modal/work-relation/index.js +6 -4
- package/lib/components/task-tree/task-item-node/e-project.js +4 -2
- package/lib/components/task-tree/task-item-node/e-task.js +4 -2
- package/lib/components/toast/index.js +12 -8
- package/lib/components/upload/components/uploadedPreview.js +17 -17
- package/lib/components/upload/index.js +23 -23
- package/lib/components/upvote/index.js +6 -4
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +14 -14
- package/lib/components/user-selector/searched-panel/index.js +4 -4
- package/lib/components/version-change-modal/index.js +6 -4
- package/lib/components/version-change-modal/request-api.js +6 -2
- package/lib/components/wechat-btn/index.css +5 -1
- package/lib/components/weekly-report/card.js +4 -12
- package/lib/components/weekly-report/common-painter/darwAvatar.js +10 -6
- package/lib/components/weekly-report/common-painter/drawName.js +6 -2
- package/lib/components/weekly-report/common-painter/openDataPainter.js +6 -2
- package/lib/components/weekly-report/index.js +6 -4
- package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
- package/lib/pages/group-management/groupInterface.js +6 -2
- package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
- package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
- package/lib/pages/new-okr-list/header/index.js +15 -15
- package/lib/pages/new-okr-list/request-api.js +18 -14
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +4 -2
- package/lib/pages/okr-map/request-apis.js +6 -2
- package/lib/utils/hooks.js +5 -5
- package/lib/utils/open-data.js +216 -66
- package/lib/utils/request-v1.js +6 -2
- package/lib/utils/request.js +6 -2
- package/lib/utils/tita-okr-cycle.js +3 -3
- package/package.json +2 -1
|
@@ -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
|
-
|
|
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
|
+
}
|
|
@@ -11,6 +11,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
+
var _richEditor = require("@titaui/rich-editor");
|
|
15
|
+
|
|
16
|
+
var _titaUi = require("tita-ui");
|
|
17
|
+
|
|
14
18
|
var _bsGlobal = require("../../../../../../utils/bs-global");
|
|
15
19
|
|
|
16
20
|
var _avatar = _interopRequireDefault(require("../../../../../avatar"));
|
|
@@ -27,7 +31,7 @@ var _toast = _interopRequireDefault(require("../../../../../toast"));
|
|
|
27
31
|
|
|
28
32
|
var _dialogConfirm = _interopRequireWildcard(require("../../../../../dialog-confirm"));
|
|
29
33
|
|
|
30
|
-
var
|
|
34
|
+
var _errorTip = _interopRequireDefault(require("../../../../../tooltip/error-tip"));
|
|
31
35
|
|
|
32
36
|
var _requestApis = require("../../../../request-apis");
|
|
33
37
|
|
|
@@ -51,6 +55,10 @@ var _helper = require("../../../../helper");
|
|
|
51
55
|
|
|
52
56
|
var _getLocale = require("../../../../../../utils/getLocale");
|
|
53
57
|
|
|
58
|
+
var _openData = require("../../../../../../utils/open-data");
|
|
59
|
+
|
|
60
|
+
var _i18nFrontTranslate = require("../../../../../../utils/i18n-front-translate");
|
|
61
|
+
|
|
54
62
|
require("./index.css");
|
|
55
63
|
|
|
56
64
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -61,6 +69,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
61
69
|
|
|
62
70
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
63
71
|
|
|
72
|
+
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; }
|
|
73
|
+
|
|
64
74
|
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); } }
|
|
65
75
|
|
|
66
76
|
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); }); }; }
|
|
@@ -84,9 +94,9 @@ function OkrRowColumn(_ref) {
|
|
|
84
94
|
marginLeft = _ref$marginLeft === void 0 ? 0 : _ref$marginLeft;
|
|
85
95
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
86
96
|
style: {
|
|
87
|
-
display:
|
|
97
|
+
display: 'inline-block',
|
|
88
98
|
width: width,
|
|
89
|
-
textAlign:
|
|
99
|
+
textAlign: 'left',
|
|
90
100
|
marginLeft: marginLeft
|
|
91
101
|
}
|
|
92
102
|
}, children);
|
|
@@ -98,6 +108,8 @@ function _default(props) {
|
|
|
98
108
|
title = props.title,
|
|
99
109
|
key = props.key,
|
|
100
110
|
canEditOkr = props.canEditOkr;
|
|
111
|
+
var mileStoneName = data.mileStoneName,
|
|
112
|
+
mileStoneNameRichText = data.mileStoneNameRichText;
|
|
101
113
|
|
|
102
114
|
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
103
115
|
refreshAll = _useContext.refreshAll,
|
|
@@ -109,53 +121,68 @@ function _default(props) {
|
|
|
109
121
|
confidence = _useState2[0],
|
|
110
122
|
setConfidence = _useState2[1];
|
|
111
123
|
|
|
112
|
-
var _useState3 = (0, _react.useState)(
|
|
124
|
+
var _useState3 = (0, _react.useState)(''),
|
|
113
125
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
114
|
-
|
|
115
|
-
|
|
126
|
+
errorTip = _useState4[0],
|
|
127
|
+
setErrorTip = _useState4[1];
|
|
116
128
|
|
|
117
|
-
var _useState5 = (0, _react.useState)(
|
|
129
|
+
var _useState5 = (0, _react.useState)(data.user || {}),
|
|
118
130
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
119
|
-
|
|
120
|
-
|
|
131
|
+
user = _useState6[0],
|
|
132
|
+
setUser = _useState6[1];
|
|
121
133
|
|
|
122
|
-
var _useState7 = (0, _react.useState)(
|
|
134
|
+
var _useState7 = (0, _react.useState)(false),
|
|
123
135
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
124
|
-
|
|
125
|
-
|
|
136
|
+
editWightVisible = _useState8[0],
|
|
137
|
+
setEditWightVisible = _useState8[1];
|
|
126
138
|
|
|
127
139
|
var _useState9 = (0, _react.useState)(false),
|
|
128
140
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
129
|
-
|
|
130
|
-
|
|
141
|
+
editing = _useState10[0],
|
|
142
|
+
setEditing = _useState10[1];
|
|
131
143
|
|
|
132
|
-
var _useState11 = (0, _react.useState)(
|
|
144
|
+
var _useState11 = (0, _react.useState)(data.evaluateValue),
|
|
133
145
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
134
|
-
|
|
135
|
-
|
|
146
|
+
evaluateValue = _useState12[0],
|
|
147
|
+
setEvaluateValue = _useState12[1];
|
|
136
148
|
|
|
137
|
-
var _useState13 = (0, _react.useState)(
|
|
149
|
+
var _useState13 = (0, _react.useState)(false),
|
|
138
150
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
139
|
-
|
|
140
|
-
|
|
151
|
+
krModalVsible = _useState14[0],
|
|
152
|
+
setKrModalVsible = _useState14[1];
|
|
153
|
+
|
|
154
|
+
var _useState15 = (0, _react.useState)(false),
|
|
155
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
156
|
+
deleteModalVisible = _useState16[0],
|
|
157
|
+
setDeleteModalVisible = _useState16[1];
|
|
158
|
+
|
|
159
|
+
var _useState17 = (0, _react.useState)({
|
|
160
|
+
pureText: mileStoneName,
|
|
161
|
+
pureTextExcludeAt: mileStoneName,
|
|
162
|
+
richText: mileStoneNameRichText ? JSON.parse(mileStoneNameRichText) : (0, _richEditor.TitaRichEditorInitTextState)(mileStoneName),
|
|
163
|
+
mentionUsers: []
|
|
164
|
+
}),
|
|
165
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
166
|
+
krNameData = _useState18[0],
|
|
167
|
+
setKrNameData = _useState18[1];
|
|
141
168
|
|
|
142
|
-
var
|
|
143
|
-
|
|
144
|
-
showHeart =
|
|
169
|
+
var _useState19 = (0, _react.useState)((0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting.ShowKrConfidence),
|
|
170
|
+
_useState20 = _slicedToArray(_useState19, 1),
|
|
171
|
+
showHeart = _useState20[0]; // 高级功能: 关键成果信心指数
|
|
145
172
|
|
|
146
173
|
|
|
147
|
-
var
|
|
148
|
-
|
|
149
|
-
showKrWeight =
|
|
174
|
+
var _useState21 = (0, _react.useState)((0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting.KrWeight),
|
|
175
|
+
_useState22 = _slicedToArray(_useState21, 1),
|
|
176
|
+
showKrWeight = _useState22[0]; // 高级功能: 关见成果权重
|
|
150
177
|
|
|
151
178
|
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
isEvaluate =
|
|
155
|
-
setIsEvaluate =
|
|
179
|
+
var _useState23 = (0, _react.useState)(data.isEvaluate),
|
|
180
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
181
|
+
isEvaluate = _useState24[0],
|
|
182
|
+
setIsEvaluate = _useState24[1]; // 权限 & 非结束目标
|
|
156
183
|
|
|
157
184
|
|
|
158
|
-
var
|
|
185
|
+
var _useState25 = (0, _react.useState)(function () {
|
|
159
186
|
var hasAuth = new _auth.KRAuth({
|
|
160
187
|
user: data.user,
|
|
161
188
|
createUserId: data.createUserId
|
|
@@ -163,12 +190,18 @@ function _default(props) {
|
|
|
163
190
|
var livetime = okrInfo.status != 2;
|
|
164
191
|
return hasAuth && livetime;
|
|
165
192
|
}),
|
|
166
|
-
|
|
167
|
-
krCanEdit =
|
|
193
|
+
_useState26 = _slicedToArray(_useState25, 1),
|
|
194
|
+
krCanEdit = _useState26[0];
|
|
168
195
|
|
|
196
|
+
var mentionInputRef = (0, _react.useRef)();
|
|
169
197
|
(0, _react.useEffect)(function () {
|
|
170
|
-
|
|
171
|
-
|
|
198
|
+
setKrNameData({
|
|
199
|
+
pureText: mileStoneName,
|
|
200
|
+
pureTextExcludeAt: mileStoneName,
|
|
201
|
+
richText: data.mileStoneNameRichText ? JSON.parse(data.mileStoneNameRichText) : (0, _richEditor.TitaRichEditorInitTextState)(mileStoneName),
|
|
202
|
+
mentionUsers: []
|
|
203
|
+
});
|
|
204
|
+
}, [mileStoneName]);
|
|
172
205
|
|
|
173
206
|
var _useContext2 = (0, _react.useContext)(_context2.OkrListContext),
|
|
174
207
|
updateKrs = _useContext2.updateKrs;
|
|
@@ -190,9 +223,7 @@ function _default(props) {
|
|
|
190
223
|
kr: data,
|
|
191
224
|
confidenceIndex: level
|
|
192
225
|
}).then(function () {
|
|
193
|
-
_toast["default"].Success(
|
|
194
|
-
top: 60
|
|
195
|
-
});
|
|
226
|
+
_toast["default"].Success('修改成功');
|
|
196
227
|
});
|
|
197
228
|
};
|
|
198
229
|
|
|
@@ -214,7 +245,7 @@ function _default(props) {
|
|
|
214
245
|
progressDescription = val.progressDescription,
|
|
215
246
|
riskLevel = val.riskLevel,
|
|
216
247
|
updateProgressWay = val.updateProgressWay;
|
|
217
|
-
progress = progress.replace(/%/,
|
|
248
|
+
progress = progress.replace(/%/, '');
|
|
218
249
|
(0, _requestApis.updateKrProgressAndStatus)({
|
|
219
250
|
krId: data.mileStoneId,
|
|
220
251
|
progress: Number(progress),
|
|
@@ -223,7 +254,7 @@ function _default(props) {
|
|
|
223
254
|
updateProgressWay: updateProgressWay
|
|
224
255
|
}).then(function (res) {
|
|
225
256
|
if (res.Code == 1) {
|
|
226
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
257
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
227
258
|
|
|
228
259
|
refreshAll();
|
|
229
260
|
updateKrs();
|
|
@@ -235,10 +266,10 @@ function _default(props) {
|
|
|
235
266
|
};
|
|
236
267
|
|
|
237
268
|
var onDeleteKrHandler = /*#__PURE__*/function () {
|
|
238
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
|
269
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
239
270
|
var _yield$deleteKr, Message;
|
|
240
271
|
|
|
241
|
-
return
|
|
272
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
242
273
|
while (1) {
|
|
243
274
|
switch (_context.prev = _context.next) {
|
|
244
275
|
case 0:
|
|
@@ -251,7 +282,7 @@ function _default(props) {
|
|
|
251
282
|
setDeleteModalVisible(false);
|
|
252
283
|
|
|
253
284
|
if (!Message) {
|
|
254
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
285
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
255
286
|
|
|
256
287
|
setTimeout(function () {
|
|
257
288
|
refreshAll();
|
|
@@ -274,13 +305,62 @@ function _default(props) {
|
|
|
274
305
|
};
|
|
275
306
|
}();
|
|
276
307
|
|
|
277
|
-
var
|
|
308
|
+
var onInputKeyDownHandler = function onInputKeyDownHandler(e) {
|
|
309
|
+
if (e.keyCode !== 13) return;
|
|
310
|
+
onKrNameChangeHandler();
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
var validateKrName = function validateKrName(data) {
|
|
314
|
+
var _pureTextExcludeAt$tr;
|
|
315
|
+
|
|
316
|
+
var pureTextExcludeAt = data.pureTextExcludeAt;
|
|
317
|
+
var krNameLen = pureTextExcludeAt === null || pureTextExcludeAt === void 0 ? void 0 : (_pureTextExcludeAt$tr = pureTextExcludeAt.trim()) === null || _pureTextExcludeAt$tr === void 0 ? void 0 : _pureTextExcludeAt$tr.length;
|
|
318
|
+
|
|
319
|
+
if (krNameLen === 0) {
|
|
320
|
+
setErrorTip('KR 名称不能为空');
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (krNameLen > 5000) {
|
|
325
|
+
setErrorTip((0, _i18nFrontTranslate.inputWordTrans)(krNameLen, 5000));
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
setErrorTip('');
|
|
330
|
+
return true;
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
var onEditorChange = function onEditorChange(data) {
|
|
334
|
+
setKrNameData(function () {
|
|
335
|
+
return data;
|
|
336
|
+
});
|
|
337
|
+
validateKrName(data);
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
var onKrNameChangeHandler = function onKrNameChangeHandler() {
|
|
341
|
+
var mentionUsers = krNameData.mentionUsers,
|
|
342
|
+
pureText = krNameData.pureText,
|
|
343
|
+
richText = krNameData.richText;
|
|
344
|
+
|
|
345
|
+
if (data.mileStoneName == pureText) {
|
|
346
|
+
setEditing(false);
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
var hasError = !validateKrName(krNameData);
|
|
351
|
+
if (hasError) return;
|
|
278
352
|
(0, _requestApis.updateKrName)({
|
|
279
|
-
mileStoneName:
|
|
353
|
+
mileStoneName: pureText,
|
|
354
|
+
mileStoneNameRichText: richText,
|
|
355
|
+
aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
|
|
356
|
+
return user.mentionId;
|
|
357
|
+
}),
|
|
280
358
|
workId: data.workId,
|
|
281
359
|
workMileStoneId: data.mileStoneId
|
|
282
|
-
}).then(function () {
|
|
283
|
-
|
|
360
|
+
}).then(function (res) {
|
|
361
|
+
setEditing(false);
|
|
362
|
+
|
|
363
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
284
364
|
});
|
|
285
365
|
};
|
|
286
366
|
|
|
@@ -297,11 +377,26 @@ function _default(props) {
|
|
|
297
377
|
};
|
|
298
378
|
|
|
299
379
|
var onTitleTextClickHandler = function onTitleTextClickHandler() {
|
|
300
|
-
|
|
380
|
+
if (editing) return;
|
|
381
|
+
|
|
382
|
+
_drawerManager["default"].open('krDetail', {
|
|
301
383
|
krId: data.mileStoneId
|
|
302
384
|
});
|
|
303
385
|
};
|
|
304
386
|
|
|
387
|
+
var triggerEdit = function triggerEdit(e) {
|
|
388
|
+
e.stopPropagation();
|
|
389
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
390
|
+
setEditing(true);
|
|
391
|
+
setTimeout(function () {
|
|
392
|
+
var _mentionInputRef$curr;
|
|
393
|
+
|
|
394
|
+
// @ts-ignore
|
|
395
|
+
(_mentionInputRef$curr = mentionInputRef.current) === null || _mentionInputRef$curr === void 0 ? void 0 : _mentionInputRef$curr.methods().focus();
|
|
396
|
+
}, 0);
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
var krNameEditable = krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, 'changeOkrName', okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes);
|
|
305
400
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
306
401
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node"))
|
|
307
402
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -312,16 +407,33 @@ function _default(props) {
|
|
|
312
407
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-h1"))
|
|
313
408
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
314
409
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-prefix"))
|
|
315
|
-
}, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
410
|
+
}, "KR", index + 1), /*#__PURE__*/_react["default"].createElement(_errorTip["default"], {
|
|
411
|
+
overlay: /*#__PURE__*/_react["default"].createElement("span", {
|
|
412
|
+
style: {
|
|
413
|
+
color: '#f05e5e'
|
|
414
|
+
}
|
|
415
|
+
}, errorTip),
|
|
416
|
+
visible: editing && errorTip.length > 0,
|
|
417
|
+
placement: "top"
|
|
418
|
+
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
419
|
+
content: editing ? '' : (0, _openData.parseString)(krNameData.pureText)
|
|
420
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
421
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-title"), _defineProperty({}, "".concat(_precls["default"], "__kr-node-title--editing"), editing)),
|
|
422
|
+
onClick: onTitleTextClickHandler
|
|
423
|
+
}, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
|
|
424
|
+
editable: editing,
|
|
425
|
+
initialState: krNameData.richText,
|
|
426
|
+
onDocChange: onEditorChange,
|
|
322
427
|
onBlur: onKrNameChangeHandler,
|
|
323
|
-
|
|
324
|
-
|
|
428
|
+
onKeyDown: onInputKeyDownHandler,
|
|
429
|
+
placeholder: "KR\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",
|
|
430
|
+
ref: mentionInputRef
|
|
431
|
+
}), krNameEditable && !editing && /*#__PURE__*/_react["default"].createElement("span", {
|
|
432
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__text-icon"))
|
|
433
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
434
|
+
className: "tu-icon-bianji2",
|
|
435
|
+
onClick: triggerEdit
|
|
436
|
+
})))))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
325
437
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-h2"))
|
|
326
438
|
}, /*#__PURE__*/_react["default"].createElement(OkrRowColumn, {
|
|
327
439
|
width: 68
|
|
@@ -348,7 +460,7 @@ function _default(props) {
|
|
|
348
460
|
marginLeft: 16
|
|
349
461
|
}, /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
350
462
|
data: data,
|
|
351
|
-
editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting,
|
|
463
|
+
editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, 'changeOkrTime', okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes)
|
|
352
464
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
353
465
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-actions"))
|
|
354
466
|
}, showHeart && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -366,9 +478,9 @@ function _default(props) {
|
|
|
366
478
|
percent: data.progress,
|
|
367
479
|
linear: true,
|
|
368
480
|
linearId: data.mileStoneId,
|
|
369
|
-
linearStartColor: (0, _utils.getProcessColor)(data.riskLevel,
|
|
370
|
-
linearEndColor: (0, _utils.getProcessColor)(data.riskLevel,
|
|
371
|
-
backgroundColor: (0, _utils.getProcessColor)(data.riskLevel,
|
|
481
|
+
linearStartColor: (0, _utils.getProcessColor)(data.riskLevel, 'linearStartColor', okrInfo.status),
|
|
482
|
+
linearEndColor: (0, _utils.getProcessColor)(data.riskLevel, 'linearEndColor', okrInfo.status),
|
|
483
|
+
backgroundColor: (0, _utils.getProcessColor)(data.riskLevel, 'backgroundColor', okrInfo.status)
|
|
372
484
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
373
485
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-score"))
|
|
374
486
|
}, /*#__PURE__*/_react["default"].createElement(_krScoreEditor["default"], {
|
|
@@ -394,7 +506,7 @@ function _default(props) {
|
|
|
394
506
|
onOk: onEditWightOkHandler
|
|
395
507
|
}), /*#__PURE__*/_react["default"].createElement(_okrProgressModal["default"], {
|
|
396
508
|
okrInfo: data,
|
|
397
|
-
title: (0, _getLocale.getLocale)(
|
|
509
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Title_UpdateKR'),
|
|
398
510
|
visible: krModalVsible,
|
|
399
511
|
onClose: function onClose() {
|
|
400
512
|
return setKrModalVsible(false);
|
|
@@ -407,15 +519,15 @@ function _default(props) {
|
|
|
407
519
|
type: "warning"
|
|
408
520
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
409
521
|
type: "title"
|
|
410
|
-
}, (0, _getLocale.getLocale)(
|
|
522
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_KRP_Deletekey')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
411
523
|
type: "content"
|
|
412
|
-
}, (0, _getLocale.getLocale)(
|
|
524
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_KRP_Thekeyachieve')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
413
525
|
type: "button",
|
|
414
526
|
onClick: function onClick() {
|
|
415
527
|
return setDeleteModalVisible(false);
|
|
416
528
|
}
|
|
417
|
-
}, (0, _getLocale.getLocale)(
|
|
529
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.WarningButton, {
|
|
418
530
|
type: "button",
|
|
419
531
|
onClick: onDeleteKrHandler
|
|
420
|
-
}, (0, _getLocale.getLocale)(
|
|
532
|
+
}, (0, _getLocale.getLocale)('Mod_Delete'))));
|
|
421
533
|
}
|
|
@@ -49,6 +49,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
49
49
|
|
|
50
50
|
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; }
|
|
51
51
|
|
|
52
|
+
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; }
|
|
53
|
+
|
|
52
54
|
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); } }
|
|
53
55
|
|
|
54
56
|
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); }); }; }
|
|
@@ -131,8 +133,8 @@ function _default(props) {
|
|
|
131
133
|
};
|
|
132
134
|
|
|
133
135
|
var onSelectorChangeHandler = /*#__PURE__*/function () {
|
|
134
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
|
135
|
-
return
|
|
136
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(name) {
|
|
137
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
136
138
|
while (1) {
|
|
137
139
|
switch (_context.prev = _context.next) {
|
|
138
140
|
case 0:
|