@titaui/pc 1.11.42 → 1.11.45
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/button/rect-btn/index.css +45 -11
- package/lib/components/button/rect-btn/index.js +12 -6
- package/lib/components/change-okr-modal/index.js +2 -1
- package/lib/components/checkbox/index.css +3 -3
- package/lib/components/create-okr-modal/index.js +45 -41
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +5 -1
- package/lib/components/drawer/headerDrop.js +42 -4
- package/lib/components/drawer/index.css +33 -0
- package/lib/components/drawer/index.js +26 -3
- package/lib/components/dynamic/new-ui.css +4 -4
- package/lib/components/dynamic/online-broadcast/data.js +19 -1
- package/lib/components/mblog/components/MblogContent.js +5 -2
- package/lib/components/nav-top/components/user-message/components/todos/index.css +1 -0
- package/lib/components/nav-top/index.js +6 -2
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
- package/lib/components/okr-detail/components/header/index.js +10 -3
- package/lib/components/okr-detail/components/header/o-name.js +10 -3
- package/lib/components/okr-detail/components/o-classify.js +5 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +13 -14
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +111 -54
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +59 -0
- package/lib/components/okr-detail/detail-header/index.css +11 -0
- package/lib/components/okr-detail/detail-header/index.js +228 -234
- package/lib/components/okr-detail/helper.js +108 -0
- package/lib/components/okr-detail/index.js +21 -4
- package/lib/components/okr-detail/okr-list/index.js +8 -3
- package/lib/components/okr-detail/request-apis.js +14 -8
- package/lib/components/okr-period-selector/index.js +9 -5
- package/lib/components/okr-period-selector/select-cycle.js +23 -19
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/task-relation-modal/index.js +0 -1
- package/lib/components/task-relation-modal/request-api.js +2 -1
- package/lib/components/textarea/index.css +142 -0
- package/lib/components/textarea/index.js +259 -0
- package/lib/components/toast/index.js +5 -3
- package/lib/index.js +40 -0
- package/lib/pages/new-okr-list/header/common.js +52 -0
- package/lib/pages/new-okr-list/header/index.css +45 -0
- package/lib/pages/new-okr-list/header/index.js +51 -29
- package/lib/pages/new-okr-list/header/operate-record.js +136 -0
- package/lib/pages/new-okr-list/index.js +4 -2
- package/lib/pages/new-okr-list/list/index.js +19 -2
- package/lib/pages/new-okr-list/request-api.js +8 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
- package/lib/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- package/package.json +1 -1
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
|
@@ -9,13 +9,15 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _dialogConfirm = _interopRequireDefault(require("../../../dialog-confirm"));
|
|
15
15
|
|
|
16
16
|
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _form = _interopRequireDefault(require("../../../form"));
|
|
19
|
+
|
|
20
|
+
require("./index.css");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
23
|
|
|
@@ -35,61 +37,116 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
35
37
|
|
|
36
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
39
|
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
var prefix = "okr-detail-delete-confirm";
|
|
41
|
+
var Radios = _form["default"].Fields.Radios;
|
|
42
|
+
var radios = [{
|
|
43
|
+
label: /*#__PURE__*/_react["default"].createElement("span", {
|
|
44
|
+
className: "".concat(prefix, "__option-text")
|
|
45
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_OdeletionNTask")),
|
|
46
|
+
value: 0
|
|
47
|
+
}, {
|
|
48
|
+
label: /*#__PURE__*/_react["default"].createElement("span", {
|
|
49
|
+
className: "".concat(prefix, "__option-text")
|
|
50
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_OdeletionTask"), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
51
|
+
overlay: (0, _getLocale.getLocale)("Pro_detail_Tasksapproval"),
|
|
52
|
+
placement: "top",
|
|
53
|
+
zIndex: 15000
|
|
54
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
55
|
+
className: "".concat(prefix, "__icon tu-icon-wiki")
|
|
56
|
+
}))),
|
|
57
|
+
value: 1
|
|
58
|
+
}, {
|
|
59
|
+
label: /*#__PURE__*/_react["default"].createElement("span", {
|
|
60
|
+
className: "".concat(prefix, "__option-text")
|
|
61
|
+
}, (0, _getLocale.getLocale)("Pro_detail_Attheametime"), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
62
|
+
overlay: (0, _getLocale.getLocale)("Pro_detail_Tasksapproval"),
|
|
63
|
+
placement: "top",
|
|
64
|
+
zIndex: 15000
|
|
65
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
|
+
className: "".concat(prefix, "__icon tu-icon-wiki")
|
|
67
|
+
}))),
|
|
68
|
+
value: 2
|
|
69
|
+
}];
|
|
70
|
+
var OkrDeletePop = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
71
|
+
var onCancel = _ref.onCancel,
|
|
72
|
+
onConfirm = _ref.onConfirm,
|
|
73
|
+
approvalSetting = _ref.approvalSetting,
|
|
74
|
+
okrInfo = _ref.okrInfo;
|
|
75
|
+
|
|
76
|
+
var _useState = (0, _react.useState)(false),
|
|
59
77
|
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
-
|
|
61
|
-
|
|
78
|
+
showConfirmPop = _useState2[0],
|
|
79
|
+
setShowConfirmPop = _useState2[1];
|
|
62
80
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
onClick: function onClick() {
|
|
71
|
-
return setSelected(option.id);
|
|
72
|
-
}
|
|
73
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.Icon, {
|
|
74
|
-
className: selected == option.id ? "tu-icon-singlebox-avtive" : "tu-icon-singlebox-have"
|
|
75
|
-
}), /*#__PURE__*/_react["default"].createElement("p", null, option.text), option.tips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
76
|
-
overlay: option.tips,
|
|
77
|
-
placement: "top",
|
|
78
|
-
zIndex: 15000
|
|
79
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.Icon, {
|
|
80
|
-
className: "tu-icon-warning"
|
|
81
|
-
})));
|
|
82
|
-
})), /*#__PURE__*/_react["default"].createElement(_style.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
83
|
-
onClick: function onClick() {
|
|
81
|
+
var _useState3 = (0, _react.useState)(0),
|
|
82
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
83
|
+
selected = _useState4[0],
|
|
84
|
+
setSelected = _useState4[1];
|
|
85
|
+
|
|
86
|
+
var handleCancelClick = function handleCancelClick() {
|
|
87
|
+
if (onCancel) {
|
|
84
88
|
onCancel();
|
|
85
89
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
|
|
91
|
+
setShowConfirmPop(false);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var handleConfirmClick = function handleConfirmClick() {
|
|
95
|
+
if (onConfirm) {
|
|
96
|
+
onConfirm(selected);
|
|
90
97
|
}
|
|
91
|
-
}, (0, _getLocale.getLocale)("Pro_detail_Submission"))));
|
|
92
|
-
}
|
|
93
98
|
|
|
94
|
-
|
|
99
|
+
setShowConfirmPop(false);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
var show = function show() {
|
|
103
|
+
setShowConfirmPop(true);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var hide = function hide() {
|
|
107
|
+
setShowConfirmPop(false);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var showApprovalCmp = (0, _react.useMemo)(function () {
|
|
111
|
+
return approvalSetting.isOpen && approvalSetting.deleteOkr && !okrInfo.OkrAndKrApprovalTypes.includes(53);
|
|
112
|
+
}, [approvalSetting, okrInfo]);
|
|
113
|
+
|
|
114
|
+
var handleChangeDeleteRadios = function handleChangeDeleteRadios(value) {
|
|
115
|
+
setSelected(value);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
119
|
+
return {
|
|
120
|
+
show: show,
|
|
121
|
+
hide: hide
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
var renderDialogConfirm = (0, _react.useMemo)(function () {
|
|
125
|
+
return /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
126
|
+
zIndex: 1200,
|
|
127
|
+
visible: showConfirmPop,
|
|
128
|
+
type: "warning",
|
|
129
|
+
className: prefix
|
|
130
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
131
|
+
type: "title"
|
|
132
|
+
}, showApprovalCmp ? (0, _getLocale.getLocale)("OKR_MyO_Deleteoapproval") : (0, _getLocale.getLocale)("OKR_MyO_Determinedeletiono")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
133
|
+
type: "content"
|
|
134
|
+
}, !showApprovalCmp && (0, _getLocale.getLocale)("OKR_MyO_Text_Odeletion"), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(Radios, {
|
|
135
|
+
radios: radios,
|
|
136
|
+
value: 0,
|
|
137
|
+
onChange: handleChangeDeleteRadios
|
|
138
|
+
}))), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"].CancelButton, {
|
|
139
|
+
type: "button",
|
|
140
|
+
onClick: handleCancelClick
|
|
141
|
+
}, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"].SureButton, {
|
|
142
|
+
type: "button",
|
|
143
|
+
onClick: handleConfirmClick
|
|
144
|
+
}, showApprovalCmp ? (0, _getLocale.getLocale)("OKR_MyO_Submittedapproval") : (0, _getLocale.getLocale)("Pro_detail_Submission")));
|
|
145
|
+
}, [showConfirmPop, selected]);
|
|
146
|
+
return renderDialogConfirm;
|
|
147
|
+
});
|
|
148
|
+
OkrDeletePop.defaultProps = {
|
|
149
|
+
onCancel: function onCancel() {}
|
|
150
|
+
};
|
|
151
|
+
var _default = OkrDeletePop;
|
|
95
152
|
exports["default"] = _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
.okr-detail-delete-confirm__option {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
display: flex;
|
|
4
|
+
margin-top: 10px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.okr-detail-delete-confirm__option-text {
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
color: #3F4755;
|
|
10
|
+
line-height: 22px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.okr-detail-delete-confirm__icon {
|
|
14
|
+
font-size: 12px;
|
|
15
|
+
color: #89919f;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.okr-detail-delete-confirm__icon.tu-icon-singlebox-have, .okr-detail-delete-confirm__icon.tu-icon-singlebox-avtive {
|
|
20
|
+
margin-top: 4px;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
color: #2879ff;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.okr-detail-delete-confirm__icon.tu-icon-singlebox-have {
|
|
26
|
+
color: #BFC7D5;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.okr-detail-delete-confirm__icon.tu-icon-wiki {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
color: #acb7bf;
|
|
33
|
+
margin-left: 4px;
|
|
34
|
+
margin-bottom: 2px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.okr-detail-delete-confirm .form-field-radio__radios-item {
|
|
38
|
+
margin-top: 10px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.isApprovalDisabled {
|
|
42
|
+
margin-bottom: 0;
|
|
43
|
+
padding: 5px 24px;
|
|
44
|
+
font-size: 14px;
|
|
45
|
+
line-height: 22px;
|
|
46
|
+
transition: all .3s ease-in;
|
|
47
|
+
color: #BFC7D5;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.isApprovalDisabled .options-icon {
|
|
55
|
+
margin-right: 12px;
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
transition: all .3s ease-in;
|
|
58
|
+
color: #89919f;
|
|
59
|
+
}
|
|
@@ -25,3 +25,14 @@
|
|
|
25
25
|
.okr-detail-head-parent > span:hover {
|
|
26
26
|
color: #2879ff;
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
.okr-detail-header-status {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
border-radius: 16px;
|
|
34
|
+
width: 68px;
|
|
35
|
+
height: 28px;
|
|
36
|
+
margin-right: 18px;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
}
|