@titaui/pc 1.9.73 → 1.9.77
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/.eslintrc.js +5 -3
- package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +15 -10
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +4 -3
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +5 -3
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +6 -4
- package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +15 -10
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +6 -5
- package/lib/components/dynamic/dynamic-like-ranking/index.css +2 -5
- package/lib/components/dynamic/dynamic.js +7 -2
- package/lib/components/mblog/style.js +3 -3
- package/lib/components/okr-detail/detail-header/confirm.js +2 -1
- package/lib/components/okr-detail/detail-header/index.js +13 -10
- package/lib/components/okr-progress-modal/helper.js +59 -45
- package/lib/components/okr-progress-modal/index.js +19 -14
- package/lib/components/okr-share/index.js +7 -2
- package/lib/components/okrcase-library/index.css +3 -1
- package/lib/components/part-notice/index.js +6 -0
- package/lib/components/part-notice/not-allow-data.js +10 -0
- package/lib/components/period-selector/common.js +18 -10
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +12 -11
- package/lib/utils/tools.js +94 -45
- package/package.json +2 -1
- package/src/components/dynamic/dynamic-item/dynamic-project/constant.ts +4 -2
- package/src/components/dynamic/dynamic-item/dynamic-project/index.tsx +5 -5
- package/src/components/dynamic/dynamic-item/dynamic-replay/index.scss +5 -3
- package/src/components/dynamic/dynamic-item/dynamic-replay/index.tsx +6 -5
- package/src/components/dynamic/dynamic-item/dynamic-task/constant.ts +4 -2
- package/src/components/dynamic/dynamic-item/dynamic-task/index.tsx +6 -6
- package/src/components/dynamic/dynamic-like-ranking/index.scss +2 -3
- package/src/components/dynamic/dynamic.tsx +8 -3
- package/src/components/mblog/style.ts +6 -7
- package/src/components/okr-detail/detail-header/confirm.tsx +1 -1
- package/src/components/okr-detail/detail-header/index.tsx +19 -13
- package/src/components/okr-progress-modal/helper.js +49 -41
- package/src/components/okr-progress-modal/index.tsx +17 -16
- package/src/components/okr-share/index.tsx +9 -4
- package/src/components/okrcase-library/index.scss +9 -7
- package/src/components/part-notice/index.tsx +3 -0
- package/src/components/part-notice/not-allow-data.tsx +110 -0
- package/src/components/period-selector/common.ts +16 -10
- package/src/pages/okr-map/export-modules/okr-map/header/index.scss +24 -19
- package/src/utils/tools.js +48 -20
- package/yarn-error.log +16 -15807
package/.eslintrc.js
CHANGED
|
@@ -26,7 +26,8 @@ module.exports = {
|
|
|
26
26
|
"eqeqeq": 2,
|
|
27
27
|
"spaced-comment": 2,
|
|
28
28
|
"prefer-object-spread": 2,
|
|
29
|
-
|
|
29
|
+
'no-unused-expressions': 'off',
|
|
30
|
+
'@typescript-eslint/no-unused-expressions': 2,
|
|
30
31
|
"no-plusplus": 2,
|
|
31
32
|
"no-multiple-empty-lines": 2,
|
|
32
33
|
"arrow-body-style": 2,
|
|
@@ -70,7 +71,8 @@ module.exports = {
|
|
|
70
71
|
"jsx-a11y/no-static-element-interactions": 0,
|
|
71
72
|
"jsx-a11y/click-events-have-key-events": 0,
|
|
72
73
|
"no-trailing-spaces": 2,
|
|
73
|
-
"no-unused-vars":
|
|
74
|
+
"no-unused-vars": 0,
|
|
75
|
+
"@typescript-eslint/no-unused-vars": 2,
|
|
74
76
|
"default-case": 2,
|
|
75
77
|
"implicit-arrow-linebreak": 2,
|
|
76
78
|
"react/jsx-closing-bracket-location": 2,
|
|
@@ -93,7 +95,7 @@ module.exports = {
|
|
|
93
95
|
"prefer-arrow-callback": 2,
|
|
94
96
|
"arrow-spacing": 2,
|
|
95
97
|
"no-nested-ternary": 2,
|
|
96
|
-
"max-len":
|
|
98
|
+
"max-len": ["error", { "code": 200 }],
|
|
97
99
|
"lines-between-class-members": 2,
|
|
98
100
|
"no-tabs": 2,
|
|
99
101
|
"react/jsx-indent": 2,
|
|
@@ -3,17 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getEStatusClass2StatusTypeText = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../../../utils/getLocale");
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
var getEStatusClass2StatusTypeText = function getEStatusClass2StatusTypeText() {
|
|
11
|
+
return {
|
|
12
|
+
2: (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed"),
|
|
13
|
+
1: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
14
|
+
4: (0, _getLocale.getLocale)("OKR_MyO_E_From_Cancelled"),
|
|
15
|
+
3: (0, _getLocale.getLocale)("OKR_MyO_E_From_Delayed"),
|
|
16
|
+
6: (0, _getLocale.getLocale)("OKR_MyO_E_From_Suspended"),
|
|
17
|
+
0: (0, _getLocale.getLocale)("OKR_MyO_E_From_NotStarted"),
|
|
18
|
+
5: (0, _getLocale.getLocale)("OKR_MyO_E_From_Notaccepted")
|
|
19
|
+
};
|
|
18
20
|
};
|
|
19
|
-
|
|
21
|
+
|
|
22
|
+
exports.getEStatusClass2StatusTypeText = getEStatusClass2StatusTypeText;
|
|
23
|
+
var _default = getEStatusClass2StatusTypeText;
|
|
24
|
+
exports["default"] = _default;
|
|
@@ -65,7 +65,7 @@ var DynamicProject = function DynamicProject(_ref) {
|
|
|
65
65
|
feedTypeColor = _getFeedTypeAndTypeCo.feedTypeColor;
|
|
66
66
|
|
|
67
67
|
var handleClickTitle = function handleClickTitle() {
|
|
68
|
-
window.open(window.location.href.replace(location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(data.obj.objId)));
|
|
68
|
+
window.open(window.location.href.replace(window.location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(data.obj.objId)));
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
var renderName = (0, _react.useMemo)(function () {
|
|
@@ -98,7 +98,8 @@ var DynamicProject = function DynamicProject(_ref) {
|
|
|
98
98
|
className: "".concat(prefix, "__content")
|
|
99
99
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
100
100
|
className: "".concat(prefix, "__content-img"),
|
|
101
|
-
src: _dynamicProject["default"]
|
|
101
|
+
src: _dynamicProject["default"],
|
|
102
|
+
alt: ""
|
|
102
103
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
104
|
className: "".concat(prefix, "__content-info")
|
|
104
105
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -113,7 +114,7 @@ var DynamicProject = function DynamicProject(_ref) {
|
|
|
113
114
|
className: (0, _classnames["default"])(_constant2.EStatusStatus2ClassType[status])
|
|
114
115
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
115
116
|
className: "".concat(prefix, "__content-status-text")
|
|
116
|
-
}, _constant.
|
|
117
|
+
}, (0, _constant.getEStatusClass2StatusTypeText)()[status]), /*#__PURE__*/_react["default"].createElement("i", {
|
|
117
118
|
className: (0, _classnames["default"])("tu-icon-deferred")
|
|
118
119
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
119
120
|
className: "".concat(prefix, "__content-time-range")
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.titaui-dynamic-reply-item__detail-tasks-item::before {
|
|
32
|
-
content:
|
|
32
|
+
content: '';
|
|
33
33
|
display: inline-block;
|
|
34
34
|
width: 6px;
|
|
35
35
|
height: 6px;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.titaui-dynamic-reply-item__detail-block-title::before {
|
|
56
|
-
content:
|
|
56
|
+
content: '';
|
|
57
57
|
display: inline-block;
|
|
58
58
|
width: 4px;
|
|
59
59
|
height: 12px;
|
|
@@ -71,10 +71,11 @@
|
|
|
71
71
|
color: #3f4755;
|
|
72
72
|
line-height: 22px;
|
|
73
73
|
margin-left: 8px;
|
|
74
|
+
white-space: pre-wrap;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
.titaui-dynamic-reply-item__detail-block-title--sub::before {
|
|
77
|
-
content:
|
|
78
|
+
content: '';
|
|
78
79
|
display: inline-block;
|
|
79
80
|
width: 6px;
|
|
80
81
|
height: 6px;
|
|
@@ -90,6 +91,7 @@
|
|
|
90
91
|
line-height: 22px;
|
|
91
92
|
margin-bottom: 4px;
|
|
92
93
|
margin-left: 8px;
|
|
94
|
+
white-space: pre-wrap;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
.titaui-dynamic-reply-item__detail-block-content--sub {
|
|
@@ -29,6 +29,8 @@ var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
|
29
29
|
|
|
30
30
|
var _getLocale = require("../../../../utils/getLocale");
|
|
31
31
|
|
|
32
|
+
var _tools = require("../../../../utils/tools");
|
|
33
|
+
|
|
32
34
|
require("./index.css");
|
|
33
35
|
|
|
34
36
|
var _excluded = ["data"];
|
|
@@ -135,7 +137,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
135
137
|
}, (0, _getLocale.getLocale)("OKR_MyO_KRP_Pop_Value")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
136
138
|
className: "".concat(prefix, "__detail-block-content")
|
|
137
139
|
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
138
|
-
str: data.gains,
|
|
140
|
+
str: (0, _tools.htmlDecodeByHtmlRegExp)(data.gains),
|
|
139
141
|
keyWord: searchKeyWord
|
|
140
142
|
}))), /*#__PURE__*/_react["default"].createElement("div", null, data.drawbacks && data.drawbacks.map(function (item, index) {
|
|
141
143
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -146,21 +148,21 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
146
148
|
}, (0, _getLocale.getLocale)("OKR_MyO_KRP_Pop_Problems"), " ", index + 1), /*#__PURE__*/_react["default"].createElement("div", {
|
|
147
149
|
className: "".concat(prefix, "__detail-block-content")
|
|
148
150
|
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
149
|
-
str: item.drawback,
|
|
151
|
+
str: (0, _tools.htmlDecodeByHtmlRegExp)(item.drawback),
|
|
150
152
|
keyWord: searchKeyWord
|
|
151
153
|
})), item.cause && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
152
154
|
className: "".concat(prefix, "__detail-block-title--sub")
|
|
153
155
|
}, "\u6839\u672C\u539F\u56E0:"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
154
156
|
className: (0, _classnames["default"])("".concat(prefix, "__detail-block-content"), "".concat(prefix, "__detail-block-content--sub"))
|
|
155
157
|
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
156
|
-
str: item.cause,
|
|
158
|
+
str: (0, _tools.htmlDecodeByHtmlRegExp)(item.cause),
|
|
157
159
|
keyWord: searchKeyWord
|
|
158
160
|
}))), item.measures && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
159
161
|
className: "".concat(prefix, "__detail-block-title--sub")
|
|
160
162
|
}, "\u76F8\u5E94\u63AA\u65BD:"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
163
|
className: (0, _classnames["default"])("".concat(prefix, "__detail-block-content"), "".concat(prefix, "__detail-block-content--sub"))
|
|
162
164
|
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
163
|
-
str: item.measures,
|
|
165
|
+
str: (0, _tools.htmlDecodeByHtmlRegExp)(item.measures),
|
|
164
166
|
keyWord: searchKeyWord
|
|
165
167
|
}))));
|
|
166
168
|
})), data.tasks && data.tasks.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -3,17 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getEStatusClass2StatusTypeText = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../../../utils/getLocale");
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
var getEStatusClass2StatusTypeText = function getEStatusClass2StatusTypeText() {
|
|
11
|
+
return {
|
|
12
|
+
2: (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed"),
|
|
13
|
+
1: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
14
|
+
4: (0, _getLocale.getLocale)("OKR_MyO_E_From_Cancelled"),
|
|
15
|
+
3: (0, _getLocale.getLocale)("OKR_MyO_E_From_Delayed"),
|
|
16
|
+
6: (0, _getLocale.getLocale)("OKR_MyO_E_From_Suspended"),
|
|
17
|
+
0: (0, _getLocale.getLocale)("OKR_MyO_E_From_NotStarted"),
|
|
18
|
+
5: (0, _getLocale.getLocale)("OKR_MyO_E_From_Notaccepted")
|
|
19
|
+
};
|
|
18
20
|
};
|
|
19
|
-
|
|
21
|
+
|
|
22
|
+
exports.getEStatusClass2StatusTypeText = getEStatusClass2StatusTypeText;
|
|
23
|
+
var _default = getEStatusClass2StatusTypeText;
|
|
24
|
+
exports["default"] = _default;
|
|
@@ -92,17 +92,17 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
if (objType === _constant2.EObjType.Project) {
|
|
95
|
-
window.open(window.location.href.replace(location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(objId)));
|
|
95
|
+
window.open(window.location.href.replace(window.location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(objId)));
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
if (objType === _constant2.EObjType.MileStone) {
|
|
99
99
|
if (workId <= 0) return;
|
|
100
|
-
window.open(window.location.href.replace(location.hash, "#work?work_id=".concat(workId, "&detail_type=milepost")));
|
|
100
|
+
window.open(window.location.href.replace(window.location.hash, "#work?work_id=".concat(workId, "&detail_type=milepost")));
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
if (objType === _constant2.EObjType.KanBan) {
|
|
104
104
|
if (workId <= 0) return;
|
|
105
|
-
window.open(window.location.href.replace(location.hash, "#work?work_id=".concat(workId, "&detail_type=kanban")));
|
|
105
|
+
window.open(window.location.href.replace(window.location.hash, "#work?work_id=".concat(workId, "&detail_type=kanban")));
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
|
|
@@ -152,7 +152,8 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
152
152
|
className: "".concat(prefix, "__content")
|
|
153
153
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
154
154
|
className: "".concat(prefix, "__content-img"),
|
|
155
|
-
src: _taskIcon["default"]
|
|
155
|
+
src: _taskIcon["default"],
|
|
156
|
+
alt: ""
|
|
156
157
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
158
|
className: "".concat(prefix, "__content-info")
|
|
158
159
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -167,7 +168,7 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
167
168
|
className: (0, _classnames["default"])(_constant2.EStatusStatus2ClassType[status])
|
|
168
169
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
169
170
|
className: "".concat(prefix, "__content-status-text")
|
|
170
|
-
}, _constant.
|
|
171
|
+
}, (0, _constant.getEStatusClass2StatusTypeText)()[status]), /*#__PURE__*/_react["default"].createElement("i", {
|
|
171
172
|
className: (0, _classnames["default"])("tu-icon-deferred")
|
|
172
173
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
173
174
|
className: "".concat(prefix, "__content-time-range")
|
|
@@ -69,8 +69,9 @@
|
|
|
69
69
|
|
|
70
70
|
.danamic-like-ranking__content-table-items {
|
|
71
71
|
display: grid;
|
|
72
|
-
grid-template-columns: auto
|
|
72
|
+
grid-template-columns: auto 28px auto auto;
|
|
73
73
|
grid-row-gap: 16px;
|
|
74
|
+
margin-left: -8px;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
.danamic-like-ranking__item:last-of-type {
|
|
@@ -92,10 +93,6 @@
|
|
|
92
93
|
font-size: 14px;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
.danamic-like-ranking__item-avatar {
|
|
96
|
-
margin-left: 9px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
96
|
.danamic-like-ranking__item-avatar .titaui-pc-avator-container {
|
|
100
97
|
display: inline-flex !important;
|
|
101
98
|
}
|
|
@@ -185,9 +185,14 @@ var Dynamic = function Dynamic() {
|
|
|
185
185
|
};
|
|
186
186
|
|
|
187
187
|
var handleDeleteFeed = function handleDeleteFeed(feedId) {
|
|
188
|
-
|
|
188
|
+
var newDatas = dynamicData.filter(function (item) {
|
|
189
189
|
return item.feedId !== feedId;
|
|
190
|
-
})
|
|
190
|
+
});
|
|
191
|
+
setDynamicData([]); // 动画效果如果直接设置新的数据,diff时间会比较长,所以直接清空再赋值,这样不会出现删除时等待长时间空白
|
|
192
|
+
|
|
193
|
+
setTimeout(function () {
|
|
194
|
+
setDynamicData(_toConsumableArray(newDatas));
|
|
195
|
+
}, 0);
|
|
191
196
|
};
|
|
192
197
|
|
|
193
198
|
var getDynamicData = function getDynamicData(needResetValue) {
|
|
@@ -18,7 +18,7 @@ var MBlogBox = _styledComponents["default"].div(_templateObject || (_templateObj
|
|
|
18
18
|
|
|
19
19
|
exports.MBlogBox = MBlogBox;
|
|
20
20
|
|
|
21
|
-
var DivMblogContent = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px 10px 6px;\n border: 1px solid #DFE3EA;\n border-radius: 8px;\n background-color: #fff;\n position: relative;\n transition: all .2s ease-in-out;\n height:
|
|
21
|
+
var DivMblogContent = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px 10px 6px;\n border: 1px solid #DFE3EA;\n border-radius: 8px;\n background-color: #fff;\n position: relative;\n transition: all .2s ease-in-out;\n height: 200px;\n box-sizing: border-box;\n\n &.input_default-active {\n box-shadow: inset 0px 0px 4px 0px rgba(40, 121, 255, 0.3);\n border-color: #2879ff;\n }\n"])));
|
|
22
22
|
|
|
23
23
|
exports.DivMblogContent = DivMblogContent;
|
|
24
24
|
|
|
@@ -36,11 +36,11 @@ var TextareaWrapper = _styledComponents["default"].div(_templateObject5 || (_tem
|
|
|
36
36
|
|
|
37
37
|
exports.TextareaWrapper = TextareaWrapper;
|
|
38
38
|
|
|
39
|
-
var Textarea = _styledComponents["default"].textarea(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n padding: 0;\n border: 0 none;\n background-color: transparent;\n color: #3F4755;\n resize: none;\n word-break: break-all;\n word-wrap: break-word;\n height:
|
|
39
|
+
var Textarea = _styledComponents["default"].textarea(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n padding: 0;\n border: 0 none;\n background-color: transparent;\n color: #3F4755;\n resize: none;\n word-break: break-all;\n word-wrap: break-word;\n height: 160px;\n font-size: 14px;\n line-height: 22px;\n\n &.textarea-setheight {\n visibility: hidden;\n position: absolute;\n }\n"])));
|
|
40
40
|
|
|
41
41
|
exports.Textarea = Textarea;
|
|
42
42
|
|
|
43
|
-
var Tips = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n line-height:
|
|
43
|
+
var Tips = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: 14px;\n line-height: 22px;\n color: ", ";\n text-align: right;\n"])), function (p) {
|
|
44
44
|
return p.color;
|
|
45
45
|
}); // MblogAction
|
|
46
46
|
|
|
@@ -140,7 +140,7 @@ function OkrDetailHeader(_ref) {
|
|
|
140
140
|
detailInfo: detailInfo,
|
|
141
141
|
openShareModal: function () {
|
|
142
142
|
var _openShareModal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
143
|
-
var
|
|
143
|
+
var krss;
|
|
144
144
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
145
145
|
while (1) {
|
|
146
146
|
switch (_context2.prev = _context2.next) {
|
|
@@ -151,8 +151,8 @@ function OkrDetailHeader(_ref) {
|
|
|
151
151
|
});
|
|
152
152
|
|
|
153
153
|
case 2:
|
|
154
|
-
|
|
155
|
-
setKrs(
|
|
154
|
+
krss = _context2.sent;
|
|
155
|
+
setKrs(krss);
|
|
156
156
|
setShareVisible(true);
|
|
157
157
|
|
|
158
158
|
case 5:
|
|
@@ -170,8 +170,11 @@ function OkrDetailHeader(_ref) {
|
|
|
170
170
|
return openShareModal;
|
|
171
171
|
}(),
|
|
172
172
|
changeVisiblilty: function changeVisiblilty(visibility) {
|
|
173
|
-
if (visibility
|
|
174
|
-
|
|
173
|
+
if (visibility === 4) {
|
|
174
|
+
if (userSelectRef.current) {
|
|
175
|
+
userSelectRef.current.open();
|
|
176
|
+
}
|
|
177
|
+
|
|
175
178
|
return;
|
|
176
179
|
}
|
|
177
180
|
|
|
@@ -205,8 +208,7 @@ function OkrDetailHeader(_ref) {
|
|
|
205
208
|
break;
|
|
206
209
|
}
|
|
207
210
|
|
|
208
|
-
if (!follow
|
|
209
|
-
) {
|
|
211
|
+
if (!follow) {
|
|
210
212
|
_context3.next = 9;
|
|
211
213
|
break;
|
|
212
214
|
}
|
|
@@ -367,13 +369,13 @@ function OkrDetailHeader(_ref) {
|
|
|
367
369
|
className: "tu-icon-liebiao-duiqinubiao"
|
|
368
370
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
369
371
|
onClick: function onClick() {
|
|
370
|
-
return parent.type
|
|
372
|
+
return parent.type === "okr" ? _drawerManager["default"].open("okrDetail", {
|
|
371
373
|
okrId: parent.id
|
|
372
374
|
}) : _drawerManager["default"].open("krDetail", {
|
|
373
375
|
krId: parent.id
|
|
374
376
|
});
|
|
375
377
|
}
|
|
376
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type
|
|
378
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === "okr" ? "O " : "KR "), parent.name)) : null
|
|
377
379
|
}), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
|
|
378
380
|
visible: shareVisible,
|
|
379
381
|
onClose: closeShareModal,
|
|
@@ -389,7 +391,8 @@ function OkrDetailHeader(_ref) {
|
|
|
389
391
|
src: detailInfo.principalUser.avatar.medium
|
|
390
392
|
}
|
|
391
393
|
})
|
|
392
|
-
}
|
|
394
|
+
},
|
|
395
|
+
zIndex: 2400
|
|
393
396
|
}), /*#__PURE__*/_react["default"].createElement(_titaUi.PopConfirm, {
|
|
394
397
|
ref: popRef,
|
|
395
398
|
showArrow: false,
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.transProgress = exports.getOptions = exports.
|
|
8
|
+
exports.transProgress = exports.getOptions = exports.getOSetting = exports.getKrSetting = exports.getKrOptions = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
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; }
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var getOSetting = function getOSetting() {
|
|
19
19
|
return {
|
|
20
20
|
settingTitle: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Setmatically"),
|
|
21
21
|
switchLabel: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Setmatically"),
|
|
@@ -28,38 +28,45 @@ var getO_SETTING = function getO_SETTING() {
|
|
|
28
28
|
key: 2,
|
|
29
29
|
tooltip: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_SubO")
|
|
30
30
|
}],
|
|
31
|
-
getRecommandText: function getRecommandText() {
|
|
32
|
-
var autoUpdate = arguments.length >
|
|
33
|
-
var updateWay = arguments.length >
|
|
34
|
-
var recommandProgressObj = arguments.length > 2 ? arguments[2] : undefined;
|
|
31
|
+
getRecommandText: function getRecommandText(recommandProgressObj) {
|
|
32
|
+
var autoUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
33
|
+
var updateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
35
34
|
|
|
36
35
|
if (autoUpdate) {
|
|
37
|
-
if (updateWay
|
|
36
|
+
if (updateWay === 1) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
38
37
|
className: "auto-update__recommand-tip"
|
|
39
38
|
}, (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Automatic"));
|
|
40
|
-
if (updateWay
|
|
39
|
+
if (updateWay === 2) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
41
40
|
className: "auto-update__recommand-tip"
|
|
42
41
|
}, (0, _getLocale.getLocale)("OKR_MyO_calculationSubO"));
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}, (0, _getLocale.getLocale)("Per_Ass_Pop_title_Recommend")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
53
|
-
className: "auto-update__recommand-tip"
|
|
54
|
-
}, "\uFF08", textArr.join(","), "\uFF09"));
|
|
42
|
+
return /*#__PURE__*/_react["default"].createElement("span", null);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
var childOkrProgress = recommandProgressObj.childOkrProgress,
|
|
46
|
+
childkrProgress = recommandProgressObj.childkrProgress;
|
|
47
|
+
var textArr = [];
|
|
48
|
+
|
|
49
|
+
if (childkrProgress !== -1) {
|
|
50
|
+
textArr.push("".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_KRCom")).concat(childkrProgress).concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Percentage")));
|
|
55
51
|
}
|
|
52
|
+
|
|
53
|
+
if (childOkrProgress !== -1) {
|
|
54
|
+
textArr.push("".concat((0, _getLocale.getLocale)("OKR_MyO_Ew_SubobjCom")).concat(childOkrProgress).concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Percentage")));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (textArr.length === 0) return "";
|
|
58
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
|
+
className: "auto-update__recommand-icon"
|
|
60
|
+
}, (0, _getLocale.getLocale)("Per_Ass_Pop_title_Recommend")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
|
+
className: "auto-update__recommand-tip"
|
|
62
|
+
}, "\uFF08", textArr.join(","), "\uFF09"));
|
|
56
63
|
}
|
|
57
64
|
};
|
|
58
65
|
};
|
|
59
66
|
|
|
60
|
-
exports.
|
|
67
|
+
exports.getOSetting = getOSetting;
|
|
61
68
|
|
|
62
|
-
var
|
|
69
|
+
var getKrSetting = function getKrSetting() {
|
|
63
70
|
return {
|
|
64
71
|
settingTitle: (0, _getLocale.getLocale)("OKR_MyO_KRCompletion"),
|
|
65
72
|
switchLabel: (0, _getLocale.getLocale)("OKR_MyO_SetKRcompletion"),
|
|
@@ -72,42 +79,49 @@ var getKR_SETTING = function getKR_SETTING() {
|
|
|
72
79
|
key: 2,
|
|
73
80
|
tooltip: (0, _getLocale.getLocale)("OKR_MyO_KRcompletionde")
|
|
74
81
|
}],
|
|
75
|
-
getRecommandText: function getRecommandText() {
|
|
76
|
-
var autoUpdate = arguments.length >
|
|
77
|
-
var updateWay = arguments.length >
|
|
78
|
-
var recommandProgressObj = arguments.length > 2 ? arguments[2] : undefined;
|
|
82
|
+
getRecommandText: function getRecommandText(recommandProgressObj) {
|
|
83
|
+
var autoUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
84
|
+
var updateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
79
85
|
|
|
80
86
|
if (autoUpdate) {
|
|
81
|
-
if (updateWay
|
|
87
|
+
if (updateWay === 1) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
88
|
className: "auto-update__recommand-tip"
|
|
83
89
|
}, (0, _getLocale.getLocale)("OKR_MyO_Automatic"));
|
|
84
|
-
if (updateWay
|
|
90
|
+
if (updateWay === 2) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
91
|
className: "auto-update__recommand-tip"
|
|
86
92
|
}, (0, _getLocale.getLocale)("OKR_MyO_calculationSubO"));
|
|
87
|
-
|
|
88
|
-
var childOkrProgress = recommandProgressObj.childOkrProgress,
|
|
89
|
-
childEProgress = recommandProgressObj.childEProgress;
|
|
90
|
-
var textArr = [];
|
|
91
|
-
childEProgress !== -1 && textArr.push("".concat((0, _getLocale.getLocale)("OKR_MyO_Ecompletion")).concat(childEProgress).concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Percentage")));
|
|
92
|
-
childOkrProgress !== -1 && textArr.push("".concat((0, _getLocale.getLocale)("OKR_MyO_Ew_SubobjCom")).concat(childOkrProgress).concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Percentage")));
|
|
93
|
-
if (textArr.length == 0) return "";
|
|
94
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
95
|
-
className: "auto-update__recommand-icon"
|
|
96
|
-
}, (0, _getLocale.getLocale)("Per_Ass_Pop_title_Recommend")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
97
|
-
className: "auto-update__recommand-tip",
|
|
98
|
-
style: {
|
|
99
|
-
marginLeft: 0
|
|
100
|
-
}
|
|
101
|
-
}, "(", textArr.join(","), ")"));
|
|
93
|
+
return /*#__PURE__*/_react["default"].createElement("span", null);
|
|
102
94
|
}
|
|
95
|
+
|
|
96
|
+
var childOkrProgress = recommandProgressObj.childOkrProgress,
|
|
97
|
+
childEProgress = recommandProgressObj.childEProgress;
|
|
98
|
+
var textArr = [];
|
|
99
|
+
|
|
100
|
+
if (childEProgress !== -1) {
|
|
101
|
+
textArr.push("".concat((0, _getLocale.getLocale)("OKR_MyO_Ecompletion")).concat(childEProgress).concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Percentage")));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (childOkrProgress !== -1) {
|
|
105
|
+
textArr.push("".concat((0, _getLocale.getLocale)("OKR_MyO_Ew_SubobjCom")).concat(childOkrProgress).concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Percentage")));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (textArr.length === 0) return "";
|
|
109
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
110
|
+
className: "auto-update__recommand-icon"
|
|
111
|
+
}, (0, _getLocale.getLocale)("Per_Ass_Pop_title_Recommend")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
112
|
+
className: "auto-update__recommand-tip",
|
|
113
|
+
style: {
|
|
114
|
+
marginLeft: 0
|
|
115
|
+
}
|
|
116
|
+
}, "(", textArr.join(","), ")"));
|
|
103
117
|
}
|
|
104
118
|
};
|
|
105
119
|
};
|
|
106
120
|
|
|
107
|
-
exports.
|
|
121
|
+
exports.getKrSetting = getKrSetting;
|
|
108
122
|
|
|
109
123
|
var transProgress = function transProgress(progress) {
|
|
110
|
-
return progress
|
|
124
|
+
return progress === -1 ? 0 : progress;
|
|
111
125
|
};
|
|
112
126
|
|
|
113
127
|
exports.transProgress = transProgress;
|
|
@@ -52,6 +52,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
52
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
53
|
|
|
54
54
|
var ProgressModal = function ProgressModal(props) {
|
|
55
|
+
var _window, _window$BSGlobal, _window$BSGlobal$OkrA, _window$BSGlobal$OkrA2;
|
|
56
|
+
|
|
55
57
|
var maxLength = props.maxLength,
|
|
56
58
|
okrInfo = props.okrInfo,
|
|
57
59
|
onClose = props.onClose,
|
|
@@ -60,7 +62,7 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
60
62
|
title = _props$title === void 0 ? window.getLocale("OKR_MyO_Prog_Butt_Update") : _props$title,
|
|
61
63
|
visible = props.visible,
|
|
62
64
|
isKr = props.isKr;
|
|
63
|
-
var configure = isKr ? (0, _helper.
|
|
65
|
+
var configure = isKr ? (0, _helper.getKrSetting)() : (0, _helper.getOSetting)();
|
|
64
66
|
var reg = /^[0-9]*[1-9][0-9]*$/;
|
|
65
67
|
|
|
66
68
|
var _useState = (0, _react.useState)(false),
|
|
@@ -95,11 +97,7 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
95
97
|
selected = _useState12[0],
|
|
96
98
|
setSelected = _useState12[1];
|
|
97
99
|
|
|
98
|
-
var _useState13 = (0, _react.useState)(
|
|
99
|
-
return (// @ts-ignore
|
|
100
|
-
window.BSGlobal.OkrAdvancedSetting.KRSetting.ShowKrProgress
|
|
101
|
-
);
|
|
102
|
-
}),
|
|
100
|
+
var _useState13 = (0, _react.useState)((_window = window) === null || _window === void 0 ? void 0 : (_window$BSGlobal = _window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$OkrA = _window$BSGlobal.OkrAdvancedSetting) === null || _window$BSGlobal$OkrA === void 0 ? void 0 : (_window$BSGlobal$OkrA2 = _window$BSGlobal$OkrA.KRSetting) === null || _window$BSGlobal$OkrA2 === void 0 ? void 0 : _window$BSGlobal$OkrA2.ShowKrProgress),
|
|
103
101
|
_useState14 = _slicedToArray(_useState13, 1),
|
|
104
102
|
ShowKrProgress = _useState14[0];
|
|
105
103
|
|
|
@@ -136,11 +134,11 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
136
134
|
case 3:
|
|
137
135
|
data = _context.sent;
|
|
138
136
|
|
|
139
|
-
if (data.Code
|
|
137
|
+
if (data.Code === 1) {
|
|
140
138
|
_data$Data = data.Data, UpdateProgressWay = _data$Data.UpdateProgressWay, Progress = _data$Data.Progress;
|
|
141
139
|
setRecommandProgressObj(data.Data);
|
|
142
|
-
setUpdate(UpdateProgressWay
|
|
143
|
-
setUpdateWay(UpdateProgressWay
|
|
140
|
+
setUpdate(UpdateProgressWay !== 0);
|
|
141
|
+
setUpdateWay(UpdateProgressWay === 0 ? 1 : UpdateProgressWay);
|
|
144
142
|
setProgress(Progress);
|
|
145
143
|
}
|
|
146
144
|
|
|
@@ -169,8 +167,14 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
169
167
|
var childOkrProgress = recommandProgressObj.childOkrProgress,
|
|
170
168
|
childkrProgress = recommandProgressObj.childkrProgress,
|
|
171
169
|
childEProgress = recommandProgressObj.childEProgress;
|
|
172
|
-
|
|
173
|
-
updateWay
|
|
170
|
+
|
|
171
|
+
if (updateWay === 1) {
|
|
172
|
+
setProgress(isKr ? (0, _helper.transProgress)(childEProgress) : (0, _helper.transProgress)(childkrProgress));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (updateWay === 2) {
|
|
176
|
+
setProgress((0, _helper.transProgress)(childOkrProgress));
|
|
177
|
+
}
|
|
174
178
|
}, [updateWay, autoUpdate, recommandProgressObj]);
|
|
175
179
|
|
|
176
180
|
var descriptionText = /*#__PURE__*/_react["default"].createElement(_style.Item, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -229,7 +233,8 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
229
233
|
okDisabled: errorProgress || errorRemark,
|
|
230
234
|
title: title,
|
|
231
235
|
visible: visible,
|
|
232
|
-
width: 600
|
|
236
|
+
width: 600,
|
|
237
|
+
zIndex: 2400
|
|
233
238
|
}, /*#__PURE__*/_react["default"].createElement(_style.List, null, /*#__PURE__*/_react["default"].createElement(_style.Item, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
234
239
|
className: "auto-update__item-label"
|
|
235
240
|
}, (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Progresss1")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -259,7 +264,7 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
259
264
|
}
|
|
260
265
|
}, /*#__PURE__*/_react["default"].createElement(_style.Icon, {
|
|
261
266
|
color: option.color,
|
|
262
|
-
className: selected
|
|
267
|
+
className: selected === option.id ? "tu-icon-singlebox-avtive" : "tu-icon-singlebox-have"
|
|
263
268
|
}), /*#__PURE__*/_react["default"].createElement("p", null, option.text));
|
|
264
269
|
}))), descriptionText, /*#__PURE__*/_react["default"].createElement("div", {
|
|
265
270
|
className: "auto-update-setting"
|
|
@@ -278,7 +283,7 @@ var ProgressModal = function ProgressModal(props) {
|
|
|
278
283
|
},
|
|
279
284
|
className: "auto-update-setting__option"
|
|
280
285
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
281
|
-
className: (0, _classnames["default"])("auto-update-setting__radio", "auto-update-setting__radio".concat(updateWay
|
|
286
|
+
className: (0, _classnames["default"])("auto-update-setting__radio", "auto-update-setting__radio".concat(updateWay === option.key ? "--selected" : ""))
|
|
282
287
|
}), /*#__PURE__*/_react["default"].createElement("span", null, option.label), /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
283
288
|
content: option.tooltip,
|
|
284
289
|
container: document.body,
|