@titaui/pc 1.10.82-beta.18 → 1.10.82-beta.20

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.
@@ -55,4 +55,5 @@
55
55
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
56
56
  color: #6F7886;
57
57
  line-height: 20px;
58
+ margin-left: 4px;
58
59
  }
@@ -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: "top"
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: "inline-block",
126
+ display: 'inline-block',
124
127
  width: "".concat(size.fontSize, "px"),
125
- margin: "0 auto",
126
- overflow: "hidden",
127
- whiteSpace: "nowrap",
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 ? "titaui-pc-avator--enter" : ""),
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
- }, hasAvatar ? renderImgAvatar() : renderTextAvatar()), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
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
- width: textWidth
203
+ maxWidth: textWidth
198
204
  }
199
205
  }, /*#__PURE__*/_react["default"].createElement("span", {
200
206
  ref: textRef
201
- }, name))) : /*#__PURE__*/_react["default"].createElement("span", {
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
- width: textWidth
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), displayActions.map(function (action) {
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"] = _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 _default(props) {
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
- onChange && onChange(name);
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)("OKR_MyO_E_Butt_Highest")), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
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,
@@ -75,7 +75,7 @@
75
75
  }
76
76
 
77
77
  .titaui-okr-flow--node-krs {
78
- margin-top: 16px;
78
+ margin-top: 12px;
79
79
  }
80
80
 
81
81
  .titaui-okr-flow--node-kr {
@@ -123,7 +123,7 @@
123
123
  .titaui-okr-flow--node-title {
124
124
  max-width: 252px;
125
125
  margin-right: 54px;
126
- margin-bottom: 8px;
126
+ margin-bottom: 4px;
127
127
  line-height: 24px;
128
128
  color: #141c28;
129
129
  font-size: 14px;
@@ -335,7 +335,7 @@
335
335
  top: 0;
336
336
  width: 50px;
337
337
  height: 32px;
338
- border-radius: 0 6px 0 20px;
338
+ border-radius: 0 12px 0 20px;
339
339
  font-size: 13px;
340
340
  text-align: center;
341
341
  line-height: 32px;
@@ -1,5 +1,12 @@
1
1
  .titaui-okr-flow--empty {
2
- padding-top: 125px;
2
+ width: 200px;
3
+ height: 200px;
4
+ position: absolute;
5
+ left: 0;
6
+ right: 0;
7
+ top: 0;
8
+ bottom: 0;
9
+ margin: auto;
3
10
  text-align: center;
4
11
  }
5
12
 
@@ -4,12 +4,14 @@
4
4
  display: flex;
5
5
  justify-content: center;
6
6
  align-items: center;
7
+ background: #f0f4fa;
7
8
  }
8
9
 
9
10
  .titaui-okr-flow--loading-img {
10
- width: 162px;
11
+ width: 80px;
11
12
  height: 140px;
12
13
  background: url("../../images/loading-light.gif") no-repeat;
14
+ background-size: 100% auto;
13
15
  }
14
16
 
15
17
  .titaui-okr-flow--loading-img__dark {
@@ -1,5 +1,5 @@
1
1
  .titaui-okr-flow--root-node {
2
- padding: 5px 12px;
2
+ padding: 4px 12px;
3
3
  background: rgba(255, 255, 255, 0.6);
4
4
  border-radius: 16px;
5
5
  color: #89919f;
@@ -29,39 +29,10 @@ exports.nodeTypes = nodeTypes;
29
29
 
30
30
  var getLayoutedElements = function getLayoutedElements(elements) {
31
31
  var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "horizontal";
32
- var isHorizontal = direction === "horizontal"; // const dagreGraph = new dagre.graphlib.Graph();
33
- // dagreGraph.setDefaultEdgeLabel(() => ({}));
34
- // dagreGraph.setGraph({ rankdir: isHorizontal ? "LR" : "TB", ranksep: 80,nodesep:12});
35
- // elements.forEach((el) => {
36
- // if (isNode(el)) {
37
- // // debugger
38
- // // let krsLength = el?.data?.data?.Krs?.length || 0
39
- // // if(krsLength){
40
- // // debugger
41
- // // nodeHeight = nodeHeight + (krsLength*20)
42
- // // }
43
- // // const nodeElement = document.querySelector(`.react-flow__node[data-id="${Number(el.id)}"]`);
44
- // console.log(el.__rf)
45
- // dagreGraph.setNode(el.id, { width: el.__rf?.width || 0, height:el.__rf?.height || 0 });
46
- // } else {
47
- // dagreGraph.setEdge(el.source, el.target)
48
- // }
49
- // });
50
- // dagre.layout(dagreGraph);
51
- // return elements.map((el) => {
52
- // if (isNode(el)) {
53
- // const nodeWithPosition = dagreGraph.node(el.id);
54
- // el.targetPosition = isHorizontal ? "left" : "top";
55
- // el.sourcePosition = isHorizontal ? "right" : "bottom";
56
- // el.position = {
57
- // x: nodeWithPosition.x ,
58
- // y: nodeWithPosition.y ,
59
- // };
60
- // }
61
- // return el;
62
- // });
63
-
64
- var g = new _dagre["default"].graphlib.Graph();
32
+ var isHorizontal = direction === "horizontal";
33
+ var g = new _dagre["default"].graphlib.Graph({
34
+ compound: true
35
+ });
65
36
  g.setGraph({
66
37
  rankdir: isHorizontal ? "LR" : "TB",
67
38
  nodesep: 12,
@@ -74,8 +45,14 @@ var getLayoutedElements = function getLayoutedElements(elements) {
74
45
  if ((0, _reactFlowRenderer.isNode)(element)) {
75
46
  var _element$__rf, _element$__rf2;
76
47
 
48
+ // const { data,id } = element
49
+ // if(id!=="0"){
50
+ // const {parentId} = data
51
+ // if(parentId===0||parentId){
52
+ // g.setParent(id, parentId+"");
53
+ // }
54
+ // }
77
55
  g.setNode(element.id, {
78
- label: element.id,
79
56
  width: (_element$__rf = element.__rf) === null || _element$__rf === void 0 ? void 0 : _element$__rf.width,
80
57
  height: (_element$__rf2 = element.__rf) === null || _element$__rf2 === void 0 ? void 0 : _element$__rf2.height
81
58
  });
@@ -130,6 +130,7 @@ exports.formatNodes = formatNodes;
130
130
 
131
131
  var flatTree = function flatTree(current, elements, showkr) {
132
132
  var isParentExpand = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
133
+ var parentId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
133
134
  if (!current) return;
134
135
  var id = current.id,
135
136
  data = current.data,
@@ -143,6 +144,7 @@ var flatTree = function flatTree(current, elements, showkr) {
143
144
  id: "".concat(id),
144
145
  type: "RootNode",
145
146
  data: data,
147
+ isParent: true,
146
148
  position: {
147
149
  x: 0,
148
150
  y: 0
@@ -177,6 +179,7 @@ var flatTree = function flatTree(current, elements, showkr) {
177
179
  data: data,
178
180
  isParentExpand: isParentExpand,
179
181
  isChildExpand: isChildExpand,
182
+ parentId: parentId,
180
183
  modelType: modelType,
181
184
  isSearchRes: isSearchRes
182
185
  }
@@ -199,7 +202,7 @@ var flatTree = function flatTree(current, elements, showkr) {
199
202
  source: "".concat(id),
200
203
  target: "".concat(sub.id)
201
204
  });
202
- flatTree(sub, elements, showkr, current.modelType != "root");
205
+ flatTree(sub, elements, showkr, current.modelType != "root", id);
203
206
  });
204
207
  }
205
208
  } else {
@@ -208,7 +211,7 @@ var flatTree = function flatTree(current, elements, showkr) {
208
211
  source: "".concat(id),
209
212
  target: "".concat(child.id)
210
213
  });
211
- flatTree(child, elements, showkr, current.modelType != "root");
214
+ flatTree(child, elements, showkr, current.modelType != "root", id);
212
215
  }
213
216
  });
214
217
  }
@@ -1,4 +1,4 @@
1
- .inputWrapper {
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
- .inputWrapper.has-error {
14
+ .titaui-textArea.has-error {
15
15
  border: 1px solid #f05e5e !important;
16
16
  }
17
17
 
18
- .inputWrapper:hover {
18
+ .titaui-textArea:hover {
19
19
  border: 1px solid #2879ff;
20
20
  }
21
21
 
22
- .inputWrapper > input {
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
- .inputWrapper > input ::-webkit-input-placeholder {
34
+ .titaui-textArea > input ::-webkit-input-placeholder {
35
35
  color: #bfc7d5;
36
36
  }
37
37
 
38
- .inputWrapper > input :-ms-input-placeholder {
38
+ .titaui-textArea > input :-ms-input-placeholder {
39
39
  color: #bfc7d5;
40
40
  }
41
41
 
42
- .inputWrapper > input :-moz-input-placeholder {
42
+ .titaui-textArea > input :-moz-input-placeholder {
43
43
  color: #bfc7d5;
44
44
  }
45
45
 
46
- .inputWrapper textarea {
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
- .inputWrapper textarea ::-webkit-input-placeholder {
63
+ .titaui-textArea textarea ::-webkit-input-placeholder {
64
64
  color: #bfc7d5;
65
65
  }
66
66
 
67
- .inputWrapper textarea :-ms-input-placeholder {
67
+ .titaui-textArea textarea :-ms-input-placeholder {
68
68
  color: #bfc7d5;
69
69
  }
70
70
 
71
- .inputWrapper textarea :-moz-input-placeholder {
71
+ .titaui-textArea textarea :-moz-input-placeholder {
72
72
  color: #bfc7d5;
73
73
  }
74
74
 
75
- .inputWrapper.disabled {
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
- .inputWrapper.disabled > input,
83
- .inputWrapper.disabled textarea,
84
- .inputWrapper.disabled .tail-wrapper {
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
- .inputWrapper.disabled:hover {
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 = "inputWrapper";
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 = _interopRequireDefault(require("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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.10.82-beta.18",
3
+ "version": "1.10.82-beta.20",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",