@titaui/pc 1.11.4-5 → 1.11.4-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/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +4 -4
- package/lib/components/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/form/form-fields/date/index.js +15 -11
- package/lib/components/form/form-fields/user/index.css +22 -2
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +3 -3
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +4 -2
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/picker/components/panels/date-panel/date-body.js +21 -19
- package/lib/components/picker/components/panels/date-panel/date-head.js +29 -8
- package/lib/components/picker/components/panels/month-panel/month-body.js +6 -4
- package/lib/components/picker/components/picker-trigger/index.css +15 -0
- package/lib/components/picker/components/picker-trigger/index.js +8 -8
- package/lib/components/popup/index.js +4 -4
- package/lib/components/radio/index.css +9 -9
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/select/Option.js +3 -3
- package/lib/components/task-tree/request-apis.js +1 -1
- package/lib/components/task-tree/task-item-node/constant.js +20 -20
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +10 -10
- package/lib/components/task-tree/task-item-node/e-task.js +24 -23
- package/lib/components/task-tree/task-item-node/index.css +0 -1
- package/lib/components/task-tree/task-tree.css +9 -1
- package/lib/components/time-picker/index.css +6 -0
- package/lib/components/time-picker/time-picker.js +27 -27
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/package.json +1 -1
|
@@ -94,7 +94,7 @@ function ETaskNode(props) {
|
|
|
94
94
|
_props$hasRelation = props.hasRelation,
|
|
95
95
|
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
|
|
96
96
|
_props$isPushScreen = props.isPushScreen,
|
|
97
|
-
isPushScreen = _props$isPushScreen === void 0 ?
|
|
97
|
+
isPushScreen = _props$isPushScreen === void 0 ? true : _props$isPushScreen,
|
|
98
98
|
_props$hasPrinciple = props.hasPrinciple,
|
|
99
99
|
hasPrinciple = _props$hasPrinciple === void 0 ? true : _props$hasPrinciple;
|
|
100
100
|
|
|
@@ -138,7 +138,7 @@ function ETaskNode(props) {
|
|
|
138
138
|
setDataInfo = _useState14[1];
|
|
139
139
|
|
|
140
140
|
var _useState15 = (0, _react.useState)(function () {
|
|
141
|
-
return (0, _bsGlobal.getBSGlobal)(
|
|
141
|
+
return (0, _bsGlobal.getBSGlobal)('TaskAdvancedSetting').TaskFunctionSetting.TaskPriority;
|
|
142
142
|
}),
|
|
143
143
|
_useState16 = _slicedToArray(_useState15, 1),
|
|
144
144
|
isShowPriority = _useState16[0]; // const { okrInfo } = useContext(CommonContext);
|
|
@@ -154,10 +154,11 @@ function ETaskNode(props) {
|
|
|
154
154
|
// }).hasAuth()
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
var hasEditAuth =
|
|
157
|
+
var hasEditAuth = new _auth.EAuth({
|
|
158
158
|
principalUser: data.principalUser,
|
|
159
159
|
user: data.user
|
|
160
|
-
}).hasAuth()
|
|
160
|
+
}).hasAuth() && // || extraEditAuth
|
|
161
|
+
data.status !== 5;
|
|
161
162
|
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
162
163
|
var hasRelativeAuth = new _auth.KRAuth({
|
|
163
164
|
user: krUser,
|
|
@@ -178,7 +179,7 @@ function ETaskNode(props) {
|
|
|
178
179
|
if (data.Code === 1) {
|
|
179
180
|
setUser(user.data);
|
|
180
181
|
|
|
181
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
182
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
182
183
|
canClose: false
|
|
183
184
|
});
|
|
184
185
|
} else {
|
|
@@ -187,7 +188,7 @@ function ETaskNode(props) {
|
|
|
187
188
|
});
|
|
188
189
|
}
|
|
189
190
|
})["catch"](function () {
|
|
190
|
-
_toast["default"].Error(
|
|
191
|
+
_toast["default"].Error('网络异常', {
|
|
191
192
|
canClose: false
|
|
192
193
|
});
|
|
193
194
|
});
|
|
@@ -199,7 +200,7 @@ function ETaskNode(props) {
|
|
|
199
200
|
status: _constant.EStatusClass2StatusType[statusType]
|
|
200
201
|
}).then(function (resp) {
|
|
201
202
|
if (resp.Code === 1) {
|
|
202
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
203
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
203
204
|
canClose: false
|
|
204
205
|
});
|
|
205
206
|
|
|
@@ -214,7 +215,7 @@ function ETaskNode(props) {
|
|
|
214
215
|
});
|
|
215
216
|
}
|
|
216
217
|
})["catch"](function () {
|
|
217
|
-
_toast["default"].Error(
|
|
218
|
+
_toast["default"].Error('网络异常', {
|
|
218
219
|
canClose: false
|
|
219
220
|
});
|
|
220
221
|
});
|
|
@@ -228,7 +229,7 @@ function ETaskNode(props) {
|
|
|
228
229
|
taskId: data.taskId
|
|
229
230
|
}).then(function (resp) {
|
|
230
231
|
if (resp.Code === 1) {
|
|
231
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
232
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
232
233
|
canClose: false
|
|
233
234
|
});
|
|
234
235
|
|
|
@@ -239,7 +240,7 @@ function ETaskNode(props) {
|
|
|
239
240
|
});
|
|
240
241
|
}
|
|
241
242
|
})["catch"](function () {
|
|
242
|
-
_toast["default"].Error(
|
|
243
|
+
_toast["default"].Error('网络异常', {
|
|
243
244
|
canClose: false
|
|
244
245
|
});
|
|
245
246
|
})["finally"](setUnConnectVisible(false));
|
|
@@ -285,7 +286,7 @@ function ETaskNode(props) {
|
|
|
285
286
|
status: resp.Data.status
|
|
286
287
|
}));
|
|
287
288
|
|
|
288
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
289
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
289
290
|
canClose: false
|
|
290
291
|
});
|
|
291
292
|
} else {
|
|
@@ -294,7 +295,7 @@ function ETaskNode(props) {
|
|
|
294
295
|
});
|
|
295
296
|
}
|
|
296
297
|
})["catch"](function () {
|
|
297
|
-
_toast["default"].Error(
|
|
298
|
+
_toast["default"].Error('网络异常', {
|
|
298
299
|
canClose: false
|
|
299
300
|
});
|
|
300
301
|
});
|
|
@@ -328,7 +329,7 @@ function ETaskNode(props) {
|
|
|
328
329
|
};
|
|
329
330
|
|
|
330
331
|
var handleShowTaskDetail = function handleShowTaskDetail() {
|
|
331
|
-
if ((0, _platform.isPlatform)(
|
|
332
|
+
if ((0, _platform.isPlatform)('dd')) {
|
|
332
333
|
_drawerManager["default"].close();
|
|
333
334
|
}
|
|
334
335
|
|
|
@@ -340,7 +341,7 @@ function ETaskNode(props) {
|
|
|
340
341
|
refreshEList && refreshEList();
|
|
341
342
|
}); // 任务:打开推屏
|
|
342
343
|
|
|
343
|
-
window.Talent.app.vent.trigger(
|
|
344
|
+
window.Talent.app.vent.trigger('global-pull-screen', data.taskId, 'task');
|
|
344
345
|
} else {
|
|
345
346
|
window.open("//".concat(window.location.host).concat(window.location.pathname, "#more/taskinfo?id=").concat(data.taskId));
|
|
346
347
|
}
|
|
@@ -363,7 +364,7 @@ function ETaskNode(props) {
|
|
|
363
364
|
hasAuth: hasEditAuth,
|
|
364
365
|
status: data.status
|
|
365
366
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
366
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-title ").concat(isCancel ? "".concat(_precls["default"], "__e-project-node-gray") :
|
|
367
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-title ").concat(isCancel ? "".concat(_precls["default"], "__e-project-node-gray") : '')),
|
|
367
368
|
onClick: handleShowTaskDetail
|
|
368
369
|
}, /*#__PURE__*/_react["default"].createElement(TooltipText, {
|
|
369
370
|
text: (0, _helpers.escapeHtml)(title),
|
|
@@ -396,11 +397,11 @@ function ETaskNode(props) {
|
|
|
396
397
|
percent: progress,
|
|
397
398
|
linear: true,
|
|
398
399
|
linearId: data.taskId,
|
|
399
|
-
linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel,
|
|
400
|
-
linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel,
|
|
401
|
-
backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel,
|
|
400
|
+
linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, 'linearStartColor', dataInfo.status),
|
|
401
|
+
linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, 'linearEndColor', dataInfo.status),
|
|
402
|
+
backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, 'backgroundColor', dataInfo.status)
|
|
402
403
|
})), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
403
|
-
overlay: (0, _getLocale.getLocale)(
|
|
404
|
+
overlay: (0, _getLocale.getLocale)('OKR_MyO_Text_Cancel'),
|
|
404
405
|
placement: "top"
|
|
405
406
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
406
407
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-connect")),
|
|
@@ -414,17 +415,17 @@ function ETaskNode(props) {
|
|
|
414
415
|
type: "warning"
|
|
415
416
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
416
417
|
type: "title"
|
|
417
|
-
}, (0, _getLocale.getLocale)(
|
|
418
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_Cancelass')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
418
419
|
type: "content"
|
|
419
|
-
}, (0, _getLocale.getLocale)(
|
|
420
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_TtasknotO')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
420
421
|
type: "button",
|
|
421
422
|
onClick: function onClick() {
|
|
422
423
|
return setUnConnectVisible(false);
|
|
423
424
|
}
|
|
424
|
-
}, (0, _getLocale.getLocale)(
|
|
425
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
425
426
|
type: "button",
|
|
426
427
|
onClick: onSureUnConnectHandler
|
|
427
|
-
}, (0, _getLocale.getLocale)(
|
|
428
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Determine'))));
|
|
428
429
|
}
|
|
429
430
|
|
|
430
431
|
var _default = ETaskNode;
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
.titaui-task-tree .rc-tree-treenode {
|
|
7
|
+
padding: 0 4px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.titaui-task-tree .rc-tree-treenode .rc-tree-node-content-wrapper {
|
|
11
|
+
width: 100% !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
6
14
|
.titaui-task-tree .rc-tree-treenode-switcher-close:hover {
|
|
7
|
-
background: #
|
|
15
|
+
background: #f7f8fa;
|
|
8
16
|
}
|
|
@@ -62,9 +62,15 @@
|
|
|
62
62
|
|
|
63
63
|
.tita-ui__time-picker-icon {
|
|
64
64
|
font-size: 16px;
|
|
65
|
+
color: #3f4755;
|
|
65
66
|
cursor: pointer;
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
.tita-ui__time-picker-icon::before {
|
|
70
|
+
transform: scale(0.5);
|
|
71
|
+
display: inline-block;
|
|
72
|
+
}
|
|
73
|
+
|
|
68
74
|
.tita-ui__time-picker-icon:hover {
|
|
69
75
|
color: #2879ff;
|
|
70
76
|
}
|
|
@@ -52,17 +52,17 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
52
52
|
var TimePicker = function TimePicker(props) {
|
|
53
53
|
var disabled = props.disabled,
|
|
54
54
|
_props$timeFormat = props.timeFormat,
|
|
55
|
-
timeFormat = _props$timeFormat === void 0 ?
|
|
55
|
+
timeFormat = _props$timeFormat === void 0 ? 'hh:mm' : _props$timeFormat,
|
|
56
56
|
_props$hourStep = props.hourStep,
|
|
57
57
|
hourStep = _props$hourStep === void 0 ? 1 : _props$hourStep,
|
|
58
58
|
_props$minuteStep = props.minuteStep,
|
|
59
59
|
minuteStep = _props$minuteStep === void 0 ? 1 : _props$minuteStep,
|
|
60
60
|
onChange = props.onChange,
|
|
61
61
|
_props$value = props.value,
|
|
62
|
-
value = _props$value === void 0 ?
|
|
62
|
+
value = _props$value === void 0 ? '00:00' : _props$value,
|
|
63
63
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
64
64
|
|
|
65
|
-
var _useState = (0, _react.useState)(
|
|
65
|
+
var _useState = (0, _react.useState)(''),
|
|
66
66
|
_useState2 = _slicedToArray(_useState, 2),
|
|
67
67
|
timeSetType = _useState2[0],
|
|
68
68
|
setTimeSetType = _useState2[1];
|
|
@@ -72,10 +72,10 @@ var TimePicker = function TimePicker(props) {
|
|
|
72
72
|
visible = _useState4[0],
|
|
73
73
|
setVisible = _useState4[1];
|
|
74
74
|
|
|
75
|
-
var hourRef = (0, _react.useRef)((0, _moment["default"])(value ||
|
|
75
|
+
var hourRef = (0, _react.useRef)((0, _moment["default"])(value || '00:00', timeFormat).format('HH'));
|
|
76
76
|
var hInputRef = (0, _react.useRef)();
|
|
77
77
|
var mInputRef = (0, _react.useRef)();
|
|
78
|
-
var minuteRef = (0, _react.useRef)((0, _moment["default"])(value ||
|
|
78
|
+
var minuteRef = (0, _react.useRef)((0, _moment["default"])(value || '00:00', timeFormat).format('mm'));
|
|
79
79
|
var triggerRef = (0, _react.useRef)();
|
|
80
80
|
var timerRef = (0, _react.useRef)();
|
|
81
81
|
var hours = (0, _utils.getHours)(hourStep);
|
|
@@ -88,7 +88,7 @@ var TimePicker = function TimePicker(props) {
|
|
|
88
88
|
var onInputClick = function onInputClick(type) {
|
|
89
89
|
clearTimeout(timerRef.current);
|
|
90
90
|
timerRef.current = setTimeout(function () {
|
|
91
|
-
if (type ===
|
|
91
|
+
if (type === 'hour') {
|
|
92
92
|
var _hInputRef$current;
|
|
93
93
|
|
|
94
94
|
(_hInputRef$current = hInputRef.current) === null || _hInputRef$current === void 0 ? void 0 : _hInputRef$current.focus();
|
|
@@ -117,7 +117,7 @@ var TimePicker = function TimePicker(props) {
|
|
|
117
117
|
// hInputRef.current.focus();
|
|
118
118
|
// }
|
|
119
119
|
// onTimeChange();
|
|
120
|
-
setTimeSetType(
|
|
120
|
+
setTimeSetType('');
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
var onHourInputChange = function onHourInputChange(e) {
|
|
@@ -158,7 +158,7 @@ var TimePicker = function TimePicker(props) {
|
|
|
158
158
|
// mInputRef.current.focus();
|
|
159
159
|
// }
|
|
160
160
|
// onTimeChange();
|
|
161
|
-
setTimeSetType(
|
|
161
|
+
setTimeSetType('');
|
|
162
162
|
};
|
|
163
163
|
|
|
164
164
|
var onMinuteInputChange = function onMinuteInputChange(e) {
|
|
@@ -177,7 +177,7 @@ var TimePicker = function TimePicker(props) {
|
|
|
177
177
|
};
|
|
178
178
|
|
|
179
179
|
var setTimeOnKeyboardDirectionChange = function setTimeOnKeyboardDirectionChange(keyCode, type, currTime) {
|
|
180
|
-
var datas = JSON.parse(JSON.stringify(type ===
|
|
180
|
+
var datas = JSON.parse(JSON.stringify(type === 'hour' ? hours : minutes));
|
|
181
181
|
var currentTimeIndex;
|
|
182
182
|
datas.forEach(function (item, index) {
|
|
183
183
|
if (item === currTime) {
|
|
@@ -198,8 +198,8 @@ var TimePicker = function TimePicker(props) {
|
|
|
198
198
|
var nextValue = datas[nextIndex];
|
|
199
199
|
|
|
200
200
|
if (currentTimeIndex > -1 && !!nextValue) {
|
|
201
|
-
if (type ===
|
|
202
|
-
hourRef.current = setTimeOnKeyboardDirectionChange(keyCode,
|
|
201
|
+
if (type === 'minute' && nextValue === datas[0]) {
|
|
202
|
+
hourRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'hour', hourRef.current);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
return nextValue;
|
|
@@ -210,8 +210,8 @@ var TimePicker = function TimePicker(props) {
|
|
|
210
210
|
var prevValue = datas[prevIndex];
|
|
211
211
|
|
|
212
212
|
if (currentTimeIndex > -1 && !!prevValue) {
|
|
213
|
-
if (type ===
|
|
214
|
-
hourRef.current = setTimeOnKeyboardDirectionChange(keyCode,
|
|
213
|
+
if (type === 'minute' && prevValue === datas[datas.length - 1]) {
|
|
214
|
+
hourRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'hour', hourRef.current);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
return prevValue;
|
|
@@ -231,12 +231,12 @@ var TimePicker = function TimePicker(props) {
|
|
|
231
231
|
if ([_utils.KEYCODE.directionUp, _utils.KEYCODE.directionDown].indexOf(keyCode) === -1) return;
|
|
232
232
|
|
|
233
233
|
switch (timeSetType) {
|
|
234
|
-
case
|
|
235
|
-
hourRef.current = setTimeOnKeyboardDirectionChange(keyCode,
|
|
234
|
+
case 'hour':
|
|
235
|
+
hourRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'hour', hourRef.current);
|
|
236
236
|
break;
|
|
237
237
|
|
|
238
|
-
case
|
|
239
|
-
minuteRef.current = setTimeOnKeyboardDirectionChange(keyCode,
|
|
238
|
+
case 'minute':
|
|
239
|
+
minuteRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'minute', minuteRef.current);
|
|
240
240
|
break;
|
|
241
241
|
|
|
242
242
|
default:
|
|
@@ -247,10 +247,10 @@ var TimePicker = function TimePicker(props) {
|
|
|
247
247
|
};
|
|
248
248
|
|
|
249
249
|
(0, _react.useEffect)(function () {
|
|
250
|
-
document.removeEventListener(
|
|
251
|
-
document.addEventListener(
|
|
250
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
251
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
252
252
|
return function () {
|
|
253
|
-
document.removeEventListener(
|
|
253
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
254
254
|
};
|
|
255
255
|
}, [timeSetType]);
|
|
256
256
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -262,27 +262,27 @@ var TimePicker = function TimePicker(props) {
|
|
|
262
262
|
className: (0, _classnames["default"])("".concat(_utils.TimePickerClass, "-inputs"), _defineProperty({}, "".concat(_utils.TimePickerClass, "-inputs--placeholder"), !value))
|
|
263
263
|
}, /*#__PURE__*/_react["default"].createElement(_timerPickerInput["default"], {
|
|
264
264
|
className: (0, _classnames["default"])("".concat(_utils.TimePickerClass, "-input"), {
|
|
265
|
-
active: timeSetType ===
|
|
265
|
+
active: timeSetType === 'hour'
|
|
266
266
|
}),
|
|
267
267
|
disabled: disabled,
|
|
268
268
|
maxLength: 2,
|
|
269
269
|
onBlur: onHourInputBlur,
|
|
270
270
|
onChange: onHourInputChange,
|
|
271
271
|
onClick: function onClick() {
|
|
272
|
-
return onInputClick(
|
|
272
|
+
return onInputClick('hour');
|
|
273
273
|
},
|
|
274
274
|
ref: hInputRef,
|
|
275
275
|
value: hourRef.current
|
|
276
276
|
}), /*#__PURE__*/_react["default"].createElement("span", null, ":"), /*#__PURE__*/_react["default"].createElement(_timerPickerInput["default"], {
|
|
277
277
|
className: (0, _classnames["default"])("".concat(_utils.TimePickerClass, "-input"), {
|
|
278
|
-
active: timeSetType ===
|
|
278
|
+
active: timeSetType === 'minute'
|
|
279
279
|
}),
|
|
280
280
|
disabled: disabled,
|
|
281
281
|
maxLength: 2,
|
|
282
282
|
onBlur: onMinuteInputBlur,
|
|
283
283
|
onChange: onMinuteInputChange,
|
|
284
284
|
onClick: function onClick() {
|
|
285
|
-
return onInputClick(
|
|
285
|
+
return onInputClick('minute');
|
|
286
286
|
},
|
|
287
287
|
ref: mInputRef,
|
|
288
288
|
value: minuteRef.current
|
|
@@ -303,8 +303,8 @@ var TimePicker = function TimePicker(props) {
|
|
|
303
303
|
hour: hourRef.current,
|
|
304
304
|
minute: minuteRef.current,
|
|
305
305
|
setTime: function setTime(time) {
|
|
306
|
-
hourRef.current = (0, _moment["default"])(time,
|
|
307
|
-
minuteRef.current = (0, _moment["default"])(time,
|
|
306
|
+
hourRef.current = (0, _moment["default"])(time, 'HH:mm').format('HH');
|
|
307
|
+
minuteRef.current = (0, _moment["default"])(time, 'HH:mm').format('mm');
|
|
308
308
|
onChange(time);
|
|
309
309
|
}
|
|
310
310
|
},
|
|
@@ -313,7 +313,7 @@ var TimePicker = function TimePicker(props) {
|
|
|
313
313
|
setVisible: setVisible
|
|
314
314
|
}
|
|
315
315
|
}, restProps), /*#__PURE__*/_react["default"].createElement("span", {
|
|
316
|
-
className: "".concat(_utils.TimePickerClass, "-icon tu-icon-
|
|
316
|
+
className: "".concat(_utils.TimePickerClass, "-icon tu-icon-caret-down"),
|
|
317
317
|
onClick: function onClick() {
|
|
318
318
|
setVisible(true);
|
|
319
319
|
}
|
|
@@ -37,7 +37,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
37
37
|
var _super = _createSuper(ErrorBoundary);
|
|
38
38
|
|
|
39
39
|
function ErrorBoundary() {
|
|
40
|
-
var
|
|
40
|
+
var _this;
|
|
41
41
|
|
|
42
42
|
_classCallCheck(this, ErrorBoundary);
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
45
45
|
args[_key] = arguments[_key];
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
return _possibleConstructorReturn(_this, (
|
|
48
|
+
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
|
|
49
49
|
hasError: false
|
|
50
50
|
}, _this.renderError = function (e) {
|
|
51
51
|
var errorTemplate = _this.props.errorTemplate;
|
|
@@ -55,7 +55,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
55
55
|
// fallback
|
|
56
56
|
return errorTemplate && typeof errorTemplate === "function" ? errorTemplate(e) : /*#__PURE__*/_react["default"].createElement("h5", null, "\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A", e.message);
|
|
57
57
|
}
|
|
58
|
-
},
|
|
58
|
+
}, _assertThisInitialized(_this)));
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
_createClass(ErrorBoundary, [{
|
|
@@ -45,7 +45,7 @@ var AnimateChild = /*#__PURE__*/function (_Component) {
|
|
|
45
45
|
var _super = _createSuper(AnimateChild);
|
|
46
46
|
|
|
47
47
|
function AnimateChild() {
|
|
48
|
-
var
|
|
48
|
+
var _this;
|
|
49
49
|
|
|
50
50
|
_classCallCheck(this, AnimateChild);
|
|
51
51
|
|
|
@@ -53,14 +53,14 @@ var AnimateChild = /*#__PURE__*/function (_Component) {
|
|
|
53
53
|
args[_key] = arguments[_key];
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
return _possibleConstructorReturn(_this, (
|
|
56
|
+
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.componentWillEnter = function (done) {
|
|
57
57
|
_this.transition("enter", done);
|
|
58
58
|
}, _this.componentWillLeave = function (done) {
|
|
59
59
|
_this.transition("leave", done);
|
|
60
60
|
}, _this.transition = function (animationType, done) {
|
|
61
61
|
var name = _typeof(_this.props.transitionName) === "object" ? _this.props.transitionName[animationType] : "".concat(_this.props.transitionName, "-").concat(animationType);
|
|
62
62
|
(0, _animate["default"])((0, _reactDom.findDOMNode)(_assertThisInitialized(_this)), name, done);
|
|
63
|
-
},
|
|
63
|
+
}, _assertThisInitialized(_this)));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
_createClass(AnimateChild, [{
|
|
@@ -45,7 +45,7 @@ var Avatar = /*#__PURE__*/function (_PureComponent) {
|
|
|
45
45
|
var _super = _createSuper(Avatar);
|
|
46
46
|
|
|
47
47
|
function Avatar() {
|
|
48
|
-
var
|
|
48
|
+
var _this;
|
|
49
49
|
|
|
50
50
|
_classCallCheck(this, Avatar);
|
|
51
51
|
|
|
@@ -53,7 +53,7 @@ var Avatar = /*#__PURE__*/function (_PureComponent) {
|
|
|
53
53
|
args[_key] = arguments[_key];
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
return _possibleConstructorReturn(_this, (
|
|
56
|
+
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.renderImgAvatar = function () {
|
|
57
57
|
var src = _this.props.src;
|
|
58
58
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
59
59
|
style: {
|
|
@@ -103,7 +103,7 @@ var Avatar = /*#__PURE__*/function (_PureComponent) {
|
|
|
103
103
|
height: size.width,
|
|
104
104
|
background: color
|
|
105
105
|
}, cuttedName);
|
|
106
|
-
},
|
|
106
|
+
}, _assertThisInitialized(_this)));
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
_createClass(Avatar, [{
|
|
@@ -47,7 +47,7 @@ var StatelessDropdown = /*#__PURE__*/function (_Component) {
|
|
|
47
47
|
var _super = _createSuper(StatelessDropdown);
|
|
48
48
|
|
|
49
49
|
function StatelessDropdown() {
|
|
50
|
-
var
|
|
50
|
+
var _this;
|
|
51
51
|
|
|
52
52
|
_classCallCheck(this, StatelessDropdown);
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ var StatelessDropdown = /*#__PURE__*/function (_Component) {
|
|
|
55
55
|
args[_key] = arguments[_key];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
return _possibleConstructorReturn(_this, (
|
|
58
|
+
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.renderLabel = function () {
|
|
59
59
|
if (_this.props.labelText) {
|
|
60
60
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
61
|
className: "drop-down-label"
|
|
@@ -63,7 +63,7 @@ var StatelessDropdown = /*#__PURE__*/function (_Component) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
return "";
|
|
66
|
-
},
|
|
66
|
+
}, _assertThisInitialized(_this)));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
_createClass(StatelessDropdown, [{
|
|
@@ -41,7 +41,7 @@ var CircleProgress = /*#__PURE__*/function (_Component) {
|
|
|
41
41
|
var _super = _createSuper(CircleProgress);
|
|
42
42
|
|
|
43
43
|
function CircleProgress() {
|
|
44
|
-
var
|
|
44
|
+
var _this;
|
|
45
45
|
|
|
46
46
|
_classCallCheck(this, CircleProgress);
|
|
47
47
|
|
|
@@ -49,7 +49,7 @@ var CircleProgress = /*#__PURE__*/function (_Component) {
|
|
|
49
49
|
args[_key] = arguments[_key];
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
return _possibleConstructorReturn(_this, (
|
|
52
|
+
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.getTextContent = function () {
|
|
53
53
|
var _this$props = _this.props,
|
|
54
54
|
formatText = _this$props.formatText,
|
|
55
55
|
percent = _this$props.percent;
|
|
@@ -59,7 +59,7 @@ var CircleProgress = /*#__PURE__*/function (_Component) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
return percent + getLocale("OKR_MyO_Pop_Upd_Percentage");
|
|
62
|
-
},
|
|
62
|
+
}, _assertThisInitialized(_this)));
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
_createClass(CircleProgress, [{
|
|
@@ -9,10 +9,10 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
require("./style/index.css");
|
|
13
|
-
|
|
14
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
13
|
|
|
14
|
+
require("./style/index.css");
|
|
15
|
+
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -43,7 +43,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
43
43
|
|
|
44
44
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
45
45
|
|
|
46
|
-
var RadioWrapper = _styledComponents["default"].label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n color: #36434d;\n margin-right: 15px;\n box-sizing: border-box;\n .label {\n position: relative;\n user-select: none;\n top: -2px;\n }\n"])));
|
|
46
|
+
var RadioWrapper = _styledComponents["default"].label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n color: #36434d;\n margin-right: 15px;\n box-sizing: border-box;\n display: flex;\n\n .label {\n position: relative;\n user-select: none;\n top: -2px;\n }\n"])));
|
|
47
47
|
|
|
48
48
|
var Radio = /*#__PURE__*/function (_Component) {
|
|
49
49
|
_inherits(Radio, _Component);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.tita-radio {
|
|
2
2
|
display: inline-block;
|
|
3
3
|
position: relative;
|
|
4
|
-
top:
|
|
4
|
+
top: 1px;
|
|
5
5
|
width: 16px;
|
|
6
6
|
min-width: 16px;
|
|
7
7
|
height: 16px;
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
bottom: 0;
|
|
31
31
|
border-radius: 100px;
|
|
32
32
|
background-color: #fff;
|
|
33
|
-
border: 1px solid #
|
|
33
|
+
border: 1px solid #dfe3ea;
|
|
34
34
|
transition: all 300ms;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.tita-radio .tita-radio-inner::after {
|
|
38
38
|
content: '';
|
|
39
39
|
position: absolute;
|
|
40
|
-
top:
|
|
41
|
-
left:
|
|
42
|
-
width:
|
|
43
|
-
min-width:
|
|
44
|
-
height:
|
|
45
|
-
min-height:
|
|
40
|
+
top: 2px;
|
|
41
|
+
left: 2px;
|
|
42
|
+
width: 10px;
|
|
43
|
+
min-width: 10px;
|
|
44
|
+
height: 10px;
|
|
45
|
+
min-height: 10px;
|
|
46
46
|
border-radius: 50%;
|
|
47
47
|
background-color: #2879ff !important;
|
|
48
48
|
transform: scale(0);
|
|
@@ -47,7 +47,7 @@ var Option = /*#__PURE__*/function (_Component) {
|
|
|
47
47
|
var _super = _createSuper(Option);
|
|
48
48
|
|
|
49
49
|
function Option() {
|
|
50
|
-
var
|
|
50
|
+
var _this;
|
|
51
51
|
|
|
52
52
|
_classCallCheck(this, Option);
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ var Option = /*#__PURE__*/function (_Component) {
|
|
|
55
55
|
args[_key] = arguments[_key];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
return _possibleConstructorReturn(_this, (
|
|
58
|
+
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleSelect = function (e) {
|
|
59
59
|
e.stopPropagation();
|
|
60
60
|
e.nativeEvent.stopImmediatePropagation();
|
|
61
61
|
var onSelect = _this.props.onSelect;
|
|
@@ -65,7 +65,7 @@ var Option = /*#__PURE__*/function (_Component) {
|
|
|
65
65
|
height: _this.props.height,
|
|
66
66
|
lineHeight: _this.props.height
|
|
67
67
|
};
|
|
68
|
-
},
|
|
68
|
+
}, _assertThisInitialized(_this)));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
_createClass(Option, [{
|
|
@@ -52,7 +52,7 @@ var UserSelectorPop = /*#__PURE__*/function (_PureComponent) {
|
|
|
52
52
|
var _super = _createSuper(UserSelectorPop);
|
|
53
53
|
|
|
54
54
|
function UserSelectorPop() {
|
|
55
|
-
var
|
|
55
|
+
var _this;
|
|
56
56
|
|
|
57
57
|
_classCallCheck(this, UserSelectorPop);
|
|
58
58
|
|
|
@@ -60,7 +60,7 @@ var UserSelectorPop = /*#__PURE__*/function (_PureComponent) {
|
|
|
60
60
|
args[_key] = arguments[_key];
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
return _possibleConstructorReturn(_this, (
|
|
63
|
+
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function (e) {
|
|
64
64
|
if (_this.props.stopPropagation && !!e) {
|
|
65
65
|
e.stopPropagation();
|
|
66
66
|
e.nativeEvent.stopImmediatePropagation();
|
|
@@ -74,7 +74,7 @@ var UserSelectorPop = /*#__PURE__*/function (_PureComponent) {
|
|
|
74
74
|
}, _this.show = function (el) {
|
|
75
75
|
// @ts-ignore
|
|
76
76
|
_this.refs.pop.show(el);
|
|
77
|
-
},
|
|
77
|
+
}, _assertThisInitialized(_this)));
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
_createClass(UserSelectorPop, [{
|