@titaui/pc 1.10.82-beta.18 → 1.10.82-beta.19
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/avatar/name-avatar/index.css +1 -0
- package/lib/components/avatar/name-avatar/index.js +22 -13
- package/lib/components/drawer/index.css +11 -0
- package/lib/components/drawer/index.js +8 -1
- package/lib/components/e-priority/index.js +11 -5
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/index.js +9 -1
- package/lib/components/textarea/index.css +16 -16
- package/lib/components/textarea/index.js +1 -1
- package/lib/pages/new-okr-list/list/index.js +19 -2
- package/package.json +1 -1
|
@@ -58,7 +58,10 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
58
58
|
onDelUser = props.onDelUser,
|
|
59
59
|
_props$textWidth = props.textWidth,
|
|
60
60
|
textWidth = _props$textWidth === void 0 ? 42 : _props$textWidth,
|
|
61
|
-
textClass = props.textClass
|
|
61
|
+
textClass = props.textClass,
|
|
62
|
+
renderRightTopCmp = props.renderRightTopCmp,
|
|
63
|
+
_props$avatarTips = props.avatarTips,
|
|
64
|
+
avatarTips = _props$avatarTips === void 0 ? '' : _props$avatarTips;
|
|
62
65
|
var hasAvatar = src && !src.match(/default\w*.jpg$/);
|
|
63
66
|
|
|
64
67
|
var _useState = (0, _react.useState)(false),
|
|
@@ -103,7 +106,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
103
106
|
style: {
|
|
104
107
|
width: size.width,
|
|
105
108
|
height: size.width,
|
|
106
|
-
verticalAlign:
|
|
109
|
+
verticalAlign: 'top'
|
|
107
110
|
},
|
|
108
111
|
src: src
|
|
109
112
|
});
|
|
@@ -120,11 +123,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
120
123
|
}
|
|
121
124
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
125
|
style: {
|
|
123
|
-
display:
|
|
126
|
+
display: 'inline-block',
|
|
124
127
|
width: "".concat(size.fontSize, "px"),
|
|
125
|
-
margin:
|
|
126
|
-
overflow:
|
|
127
|
-
whiteSpace:
|
|
128
|
+
margin: '0 auto',
|
|
129
|
+
overflow: 'hidden',
|
|
130
|
+
whiteSpace: 'nowrap',
|
|
128
131
|
fontSize: "".concat(size.fontSize, "px"),
|
|
129
132
|
lineHeight: "".concat(size.width, "px")
|
|
130
133
|
}
|
|
@@ -134,7 +137,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
134
137
|
})));
|
|
135
138
|
}
|
|
136
139
|
|
|
137
|
-
var cuttedName =
|
|
140
|
+
var cuttedName = '';
|
|
138
141
|
var cuttedNameLen = 0;
|
|
139
142
|
|
|
140
143
|
for (var i = 0, lent = name.length; i < lent; i++) {
|
|
@@ -167,11 +170,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
167
170
|
className: "titaui-pc-avator__name-avatar-container",
|
|
168
171
|
onMouseEnter: handleMouseEnter,
|
|
169
172
|
onMouseLeave: handleMouseLeave
|
|
170
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
|
+
}, renderRightTopCmp, /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
174
|
onClick: handleDelUser,
|
|
172
175
|
onMouseLeave: handleCloseIconMouseLeave,
|
|
173
176
|
onMouseEnter: handleCloseIconMouseEnter,
|
|
174
|
-
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ?
|
|
177
|
+
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ? 'titaui-pc-avator--enter' : ''),
|
|
175
178
|
style: {
|
|
176
179
|
left: "".concat(size.width - 14, "px")
|
|
177
180
|
}
|
|
@@ -185,7 +188,10 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
185
188
|
onClick: onClick,
|
|
186
189
|
onMouseEnter: onMouseEnter,
|
|
187
190
|
onMouseLeave: onMouseLeave
|
|
188
|
-
},
|
|
191
|
+
}, avatarTips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
192
|
+
overlay: avatarTips,
|
|
193
|
+
placement: "top"
|
|
194
|
+
}, hasAvatar ? renderImgAvatar() : renderTextAvatar()), !avatarTips && (hasAvatar ? renderImgAvatar() : renderTextAvatar())), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
189
195
|
overlay: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
190
196
|
name: name,
|
|
191
197
|
id: userId
|
|
@@ -194,14 +200,17 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
194
200
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
195
201
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
196
202
|
style: {
|
|
197
|
-
|
|
203
|
+
maxWidth: textWidth
|
|
198
204
|
}
|
|
199
205
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
200
206
|
ref: textRef
|
|
201
|
-
},
|
|
207
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
208
|
+
name: name,
|
|
209
|
+
id: userId
|
|
210
|
+
})))) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
202
211
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
203
212
|
style: {
|
|
204
|
-
|
|
213
|
+
maxWidth: textWidth
|
|
205
214
|
}
|
|
206
215
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
207
216
|
ref: textRef
|
|
@@ -48,6 +48,17 @@
|
|
|
48
48
|
background: linear-gradient(180deg, rgba(191, 199, 213, 0) 0%, #BFC7D5 50%, rgba(240, 242, 245, 0) 100%);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
.titaui-drawer-header-status {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
border-radius: 16px;
|
|
56
|
+
width: 68px;
|
|
57
|
+
height: 28px;
|
|
58
|
+
margin-right: 18px;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
}
|
|
61
|
+
|
|
51
62
|
.titaui-drawer-header-action {
|
|
52
63
|
font-size: 18px;
|
|
53
64
|
color: #a4acb9;
|
|
@@ -141,6 +141,7 @@ function DrawerHeader(_ref) {
|
|
|
141
141
|
content = _ref.content,
|
|
142
142
|
style = _ref.style,
|
|
143
143
|
onClose = _ref.onClose,
|
|
144
|
+
status = _ref.status,
|
|
144
145
|
actionComponent = _ref.actionComponent;
|
|
145
146
|
var drawer = (0, _react.useContext)(DrawerContext);
|
|
146
147
|
var manager = (0, _react.useContext)(_context["default"]);
|
|
@@ -170,7 +171,13 @@ function DrawerHeader(_ref) {
|
|
|
170
171
|
style: {
|
|
171
172
|
flex: 1
|
|
172
173
|
}
|
|
173
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent),
|
|
174
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), status && status.color && /*#__PURE__*/_react["default"].createElement("div", {
|
|
175
|
+
className: "titaui-drawer-header-status",
|
|
176
|
+
style: {
|
|
177
|
+
color: status.color.color,
|
|
178
|
+
backgroundColor: status.color.bgColor
|
|
179
|
+
}
|
|
180
|
+
}, status.title), displayActions.map(function (action) {
|
|
174
181
|
return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
|
|
175
182
|
}), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
|
|
176
183
|
title: (0, _getLocale.getLocale)('Mod_MoreOperate'),
|
|
@@ -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["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -37,7 +37,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
37
37
|
|
|
38
38
|
var preCls = "tita-okrdt-tree";
|
|
39
39
|
|
|
40
|
-
function
|
|
40
|
+
var EPriority = function EPriority(props) {
|
|
41
41
|
var onChange = props.onChange,
|
|
42
42
|
checked = props.checked,
|
|
43
43
|
hasAuth = props.hasAuth,
|
|
@@ -50,7 +50,10 @@ function _default(props) {
|
|
|
50
50
|
|
|
51
51
|
var onMenuClickHandler = function onMenuClickHandler(name) {
|
|
52
52
|
setLevel(name);
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
if (onChange) {
|
|
55
|
+
onChange(name);
|
|
56
|
+
}
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
(0, _react.useEffect)(function () {
|
|
@@ -72,7 +75,7 @@ function _default(props) {
|
|
|
72
75
|
name: "2"
|
|
73
76
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
74
77
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p2 ").concat(preCls, "__e-task-node-select-priority"))
|
|
75
|
-
}), (0, _getLocale.getLocale)("
|
|
78
|
+
}), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_High")), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
76
79
|
name: "3"
|
|
77
80
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
81
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p3 ").concat(preCls, "__e-task-node-select-priority"))
|
|
@@ -85,4 +88,7 @@ function _default(props) {
|
|
|
85
88
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
86
89
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p5 ").concat(preCls, "__e-task-node-select-priority"))
|
|
87
90
|
}), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Verylow")));
|
|
88
|
-
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var _default = EPriority;
|
|
94
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getApproveStatusTextMap = exports.ApproveStatusColor = exports.ApproveStatus = void 0;
|
|
7
|
+
|
|
8
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
9
|
+
|
|
10
|
+
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; }
|
|
11
|
+
|
|
12
|
+
var ApproveStatus;
|
|
13
|
+
exports.ApproveStatus = ApproveStatus;
|
|
14
|
+
|
|
15
|
+
(function (ApproveStatus) {
|
|
16
|
+
ApproveStatus[ApproveStatus["None"] = 0] = "None";
|
|
17
|
+
ApproveStatus[ApproveStatus["WaitCommit"] = 6] = "WaitCommit";
|
|
18
|
+
ApproveStatus[ApproveStatus["Rejected"] = 3] = "Rejected";
|
|
19
|
+
ApproveStatus[ApproveStatus["UnderApproval"] = 1] = "UnderApproval";
|
|
20
|
+
ApproveStatus[ApproveStatus["ApproveAgree"] = 2] = "ApproveAgree";
|
|
21
|
+
ApproveStatus[ApproveStatus["WithDraw"] = 4] = "WithDraw";
|
|
22
|
+
ApproveStatus[ApproveStatus["Done"] = 5] = "Done";
|
|
23
|
+
})(ApproveStatus || (exports.ApproveStatus = ApproveStatus = {}));
|
|
24
|
+
|
|
25
|
+
var getApproveStatusTextMap = function getApproveStatusTextMap(status) {
|
|
26
|
+
var _ApproveStatusTextMap;
|
|
27
|
+
|
|
28
|
+
var ApproveStatusTextMap = (_ApproveStatusTextMap = {}, _defineProperty(_ApproveStatusTextMap, ApproveStatus.WaitCommit, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Rejected, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.UnderApproval, (0, _getLocale.getLocale)('Pro_detail_Approval')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.ApproveAgree, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.WithDraw, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.None, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Done, ''), _ApproveStatusTextMap);
|
|
29
|
+
return ApproveStatusTextMap[status];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.getApproveStatusTextMap = getApproveStatusTextMap;
|
|
33
|
+
|
|
34
|
+
var ApproveStatusColor = function ApproveStatusColor(status) {
|
|
35
|
+
var _ApprovalStatusColorM;
|
|
36
|
+
|
|
37
|
+
var ApprovalStatusColorMap = (_ApprovalStatusColorM = {}, _defineProperty(_ApprovalStatusColorM, ApproveStatus.WaitCommit, {
|
|
38
|
+
color: '#F0A326',
|
|
39
|
+
bgColor: 'rgba(240, 163, 38, 0.1)'
|
|
40
|
+
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.Rejected, {
|
|
41
|
+
color: '#F0A326',
|
|
42
|
+
bgColor: 'rgba(240, 163, 38, 0.1)'
|
|
43
|
+
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.UnderApproval, {
|
|
44
|
+
color: '#2879FF',
|
|
45
|
+
bgColor: 'rgba(40, 121, 255, 0.1)'
|
|
46
|
+
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.ApproveAgree, {
|
|
47
|
+
color: '#ffffff',
|
|
48
|
+
bgColor: '#ffffff'
|
|
49
|
+
}), _ApprovalStatusColorM);
|
|
50
|
+
return ApprovalStatusColorMap[status];
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.ApproveStatusColor = ApproveStatusColor;
|
|
@@ -29,6 +29,8 @@ var _okrShare = _interopRequireDefault(require("../../okr-share"));
|
|
|
29
29
|
|
|
30
30
|
var _context7 = require("../context");
|
|
31
31
|
|
|
32
|
+
var _constant = require("./constant");
|
|
33
|
+
|
|
32
34
|
var _deleteConfirm = _interopRequireDefault(require("./delete-confirm/delete-confirm"));
|
|
33
35
|
|
|
34
36
|
var _drawerManager = _interopRequireDefault(require("../../drawer-manager"));
|
|
@@ -85,6 +87,7 @@ function OkrDetailHeader(_ref) {
|
|
|
85
87
|
var loginUserId = window.BSGlobal.loginUserInfo.Id;
|
|
86
88
|
var context = (0, _react.useContext)(_context7.GeneralDataContext);
|
|
87
89
|
var commonContext = (0, _react.useContext)(_context7.CommonContext);
|
|
90
|
+
var approveStatusColor = (0, _constant.ApproveStatusColor)(detailInfo.applyStatus);
|
|
88
91
|
var changVisiblity = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
89
92
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(workId, visibility) {
|
|
90
93
|
var visibilityScope,
|
|
@@ -366,6 +369,7 @@ function OkrDetailHeader(_ref) {
|
|
|
366
369
|
}
|
|
367
370
|
}
|
|
368
371
|
|
|
372
|
+
(0, _react.useEffect)(function () {}, []);
|
|
369
373
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
|
|
370
374
|
actions: actions,
|
|
371
375
|
actionComponent: /*#__PURE__*/_react["default"].createElement(_wechatBtn["default"], {
|
|
@@ -386,7 +390,11 @@ function OkrDetailHeader(_ref) {
|
|
|
386
390
|
krId: parent.id
|
|
387
391
|
});
|
|
388
392
|
}
|
|
389
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null
|
|
393
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null,
|
|
394
|
+
status: {
|
|
395
|
+
title: (0, _constant.getApproveStatusTextMap)(detailInfo.applyStatus),
|
|
396
|
+
color: approveStatusColor
|
|
397
|
+
}
|
|
390
398
|
}), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
|
|
391
399
|
visible: shareVisible,
|
|
392
400
|
onClose: closeShareModal,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.titaui-textArea {
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
position: relative;
|
|
4
4
|
min-height: 36px;
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
transition: border 0.2s ease 0.2s, box-shadow 0.2s ease 0.2s;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.titaui-textArea.has-error {
|
|
15
15
|
border: 1px solid #f05e5e !important;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.titaui-textArea:hover {
|
|
19
19
|
border: 1px solid #2879ff;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.titaui-textArea > input {
|
|
23
23
|
flex-grow: 1;
|
|
24
24
|
border: none;
|
|
25
25
|
padding: 0 12px;
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
color: #3f4755;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.titaui-textArea > input ::-webkit-input-placeholder {
|
|
35
35
|
color: #bfc7d5;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.titaui-textArea > input :-ms-input-placeholder {
|
|
39
39
|
color: #bfc7d5;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.titaui-textArea > input :-moz-input-placeholder {
|
|
43
43
|
color: #bfc7d5;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
.titaui-textArea textarea {
|
|
47
47
|
flex: 1;
|
|
48
48
|
line-height: 20px;
|
|
49
49
|
min-height: 20px;
|
|
@@ -60,32 +60,32 @@
|
|
|
60
60
|
word-break: break-all;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.
|
|
63
|
+
.titaui-textArea textarea ::-webkit-input-placeholder {
|
|
64
64
|
color: #bfc7d5;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.
|
|
67
|
+
.titaui-textArea textarea :-ms-input-placeholder {
|
|
68
68
|
color: #bfc7d5;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.
|
|
71
|
+
.titaui-textArea textarea :-moz-input-placeholder {
|
|
72
72
|
color: #bfc7d5;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.
|
|
75
|
+
.titaui-textArea.disabled {
|
|
76
76
|
background-color: rgba(240, 242, 245, 0.4);
|
|
77
77
|
border-color: #f0f2f5;
|
|
78
78
|
color: #bfc7d5;
|
|
79
79
|
cursor: default;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.
|
|
83
|
-
.
|
|
84
|
-
.
|
|
82
|
+
.titaui-textArea.disabled > input,
|
|
83
|
+
.titaui-textArea.disabled textarea,
|
|
84
|
+
.titaui-textArea.disabled .tail-wrapper {
|
|
85
85
|
color: #bfc7d5;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.
|
|
88
|
+
.titaui-textArea.disabled:hover {
|
|
89
89
|
border-color: #f0f2f5;
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -61,7 +61,7 @@ var Textarea = function Textarea(p) {
|
|
|
61
61
|
_onKeyDown = p.onKeyDown,
|
|
62
62
|
others = _objectWithoutProperties(p, _excluded);
|
|
63
63
|
|
|
64
|
-
var prefixCls = "
|
|
64
|
+
var prefixCls = "titaui-textArea";
|
|
65
65
|
|
|
66
66
|
var _useState = (0, _react.useState)(false),
|
|
67
67
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _context = require("../context");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
15
|
|
|
10
|
-
function
|
|
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; }
|
|
11
17
|
|
|
12
18
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
19
|
|
|
@@ -31,8 +37,19 @@ function List(props) {
|
|
|
31
37
|
refreshList = props.refreshList,
|
|
32
38
|
replaceOkr = props.replaceOkr;
|
|
33
39
|
var OkrListCmp = props.OkrListCmp;
|
|
40
|
+
|
|
41
|
+
var _useContext = (0, _react.useContext)(_context.Context),
|
|
42
|
+
annualNum = _useContext.annualNum,
|
|
43
|
+
cycleType = _useContext.cycleType,
|
|
44
|
+
yqmNum = _useContext.yqmNum;
|
|
45
|
+
|
|
34
46
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(OkrListCmp, {
|
|
35
47
|
okrData: okrs,
|
|
48
|
+
cycle: {
|
|
49
|
+
annualNum: annualNum,
|
|
50
|
+
cycleType: cycleType,
|
|
51
|
+
yqmNum: yqmNum
|
|
52
|
+
},
|
|
36
53
|
addOkr: function addOkr(okr) {
|
|
37
54
|
setOkrs([].concat(_toConsumableArray(okrs), [okr]));
|
|
38
55
|
},
|