@titaui/pc 1.11.32 → 1.11.35-beta.1
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 +3 -1
- 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/dynamic-list/index.js +14 -6
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/nav-top/index.js +8 -4
- 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 +98 -43
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +55 -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 +10 -4
- package/lib/components/okr-flow/child-node/index.css +1 -1
- package/lib/components/okr-flow/export-modal/index.js +47 -2
- 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/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/task-relation-modal/request-api.js +2 -1
- package/lib/components/task-tree/index.js +7 -1
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/task-item-node/e-task.js +1 -1
- package/lib/components/task-tree/task-item-node/index.css +14 -12
- package/lib/components/task-tree/task-tree.css +1 -1
- package/lib/components/textarea/index.css +142 -0
- package/lib/components/textarea/index.js +259 -0
- package/lib/components/time-picker/time-picker.js +37 -93
- 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 +38 -16
- package/lib/{components/dynamic/dynamic-liking/index.js → pages/new-okr-list/header/operate-record.js} +91 -39
- package/lib/pages/new-okr-list/index.js +3 -1
- 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 +2 -2
- package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
- package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/index.css +0 -21
- package/lib/components/dynamic/advertise/index.js +0 -126
- package/lib/components/dynamic/advertise/interface.js +0 -5
- package/lib/components/dynamic/advertise/util.js +0 -28
- package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
- package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
- package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
- package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
- package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
- package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
- package/lib/components/dynamic/dynamic-liking/index.css +0 -81
- package/lib/components/dynamic/dynamic-liking/item.js +0 -75
- package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
- package/lib/components/dynamic/dynamic-topping/index.css +0 -141
- package/lib/components/dynamic/dynamic-topping/index.js +0 -82
- package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
- package/lib/components/dynamic/dynamic-topping/item.js +0 -153
- package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/lib/components/dynamic/dynamic.css +0 -173
- package/lib/components/dynamic/dynamic.js +0 -428
- package/lib/components/dynamic/export-module/index.js +0 -37
- package/lib/components/dynamic/img/dynamic-top.svg +0 -14
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +0 -184
- package/lib/components/dynamic/my-team/index.js +0 -263
- package/lib/components/dynamic/my-team/request-api.js +0 -52
- package/lib/components/dynamic/my-team/util.js +0 -20
- package/lib/components/dynamic/new-ui.css +0 -192
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
- package/lib/components/dynamic/online-broadcast/data.js +0 -77
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +0 -46
- package/lib/components/dynamic/online-broadcast/index.js +0 -61
- package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -44
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +0 -51
- package/lib/components/dynamic/quick-operation/index.js +0 -120
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
|
@@ -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
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
align-items: center;
|
|
14
14
|
justify-content: center;
|
|
15
15
|
min-width: 64px;
|
|
16
|
-
font-size:
|
|
16
|
+
font-size: 14px;
|
|
17
17
|
padding: 0 12px;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -60,21 +60,35 @@
|
|
|
60
60
|
background: #5c8eff;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
.titaui-rect-btn--secondary {
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
font-weight: normal;
|
|
66
|
+
color: #2879ff;
|
|
67
|
+
line-height: 28px;
|
|
68
|
+
background: rgba(40, 121, 255, 0.2);
|
|
69
|
+
margin-right: 16px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.titaui-rect-btn--secondary:hover {
|
|
73
|
+
color: #fff;
|
|
74
|
+
background-color: #2879ff;
|
|
75
|
+
}
|
|
76
|
+
|
|
63
77
|
.titaui-rect-btn--cancel {
|
|
64
|
-
color: #
|
|
65
|
-
border: 1px solid #
|
|
66
|
-
background: #
|
|
78
|
+
color: #6f7886;
|
|
79
|
+
border: 1px solid #dfe3ea;
|
|
80
|
+
background: #ffffff;
|
|
67
81
|
}
|
|
68
82
|
|
|
69
83
|
.titaui-rect-btn--cancel:hover {
|
|
70
|
-
color: #
|
|
71
|
-
border: 1px solid #
|
|
84
|
+
color: #2879ff;
|
|
85
|
+
border: 1px solid #2879ff;
|
|
72
86
|
}
|
|
73
87
|
|
|
74
88
|
.titaui-rect-btn--delete {
|
|
75
|
-
background: #
|
|
76
|
-
color: #
|
|
77
|
-
border: 1px solid #
|
|
89
|
+
background: #ffffff;
|
|
90
|
+
color: #f05e5e;
|
|
91
|
+
border: 1px solid #f05e5e;
|
|
78
92
|
}
|
|
79
93
|
|
|
80
94
|
.titaui-rect-btn--delete:hover {
|
|
@@ -92,11 +106,31 @@
|
|
|
92
106
|
user-select: none;
|
|
93
107
|
}
|
|
94
108
|
|
|
109
|
+
.titaui-rect-btn--disabled:hover .titaui-rect-btn--default:hover {
|
|
110
|
+
background: #fff;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.titaui-rect-btn--disabled:hover .titaui-rect-btn--primary:hover {
|
|
114
|
+
background: #2879ff;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.titaui-rect-btn--disabled:hover .titaui-rect-btn--secondary:hover {
|
|
118
|
+
background: rgba(40, 121, 255, 0.2);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.titaui-rect-btn--disabled:hover .titaui-rect-btn--cancel:hover {
|
|
122
|
+
background: #ffffff;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.titaui-rect-btn--disabled:hover .titaui-rect-btn--delete:hover {
|
|
126
|
+
background: #ffffff;
|
|
127
|
+
}
|
|
128
|
+
|
|
95
129
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled {
|
|
96
|
-
background: #
|
|
130
|
+
background: #93bcff;
|
|
97
131
|
opacity: 1;
|
|
98
132
|
}
|
|
99
133
|
|
|
100
134
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled:hover {
|
|
101
|
-
background: #
|
|
135
|
+
background: #93bcff;
|
|
102
136
|
}
|
|
@@ -34,7 +34,10 @@ function RectBtn(props) {
|
|
|
34
34
|
className = _props$className === void 0 ? '' : _props$className,
|
|
35
35
|
_props$disabled = props.disabled,
|
|
36
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
37
|
-
style = props.style
|
|
37
|
+
style = props.style,
|
|
38
|
+
children = props.children,
|
|
39
|
+
_props$loading = props.loading,
|
|
40
|
+
loading = _props$loading === void 0 ? false : _props$loading;
|
|
38
41
|
|
|
39
42
|
var renderIcon = function renderIcon() {
|
|
40
43
|
if (typeof icon === 'string') {
|
|
@@ -50,16 +53,19 @@ function RectBtn(props) {
|
|
|
50
53
|
}, icon);
|
|
51
54
|
};
|
|
52
55
|
|
|
53
|
-
var onClickHandler = function onClickHandler() {
|
|
54
|
-
if (disabled) return;
|
|
55
|
-
|
|
56
|
+
var onClickHandler = function onClickHandler(e) {
|
|
57
|
+
if (disabled || loading) return;
|
|
58
|
+
|
|
59
|
+
if (onClick) {
|
|
60
|
+
onClick(e);
|
|
61
|
+
}
|
|
56
62
|
};
|
|
57
63
|
|
|
58
64
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
|
-
className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled), className),
|
|
65
|
+
className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled || loading), className),
|
|
60
66
|
style: style,
|
|
61
67
|
onClick: onClickHandler
|
|
62
|
-
}, icon && renderIcon(),
|
|
68
|
+
}, icon && renderIcon(), children || text);
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
var _default = RectBtn;
|
|
@@ -564,7 +564,8 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
564
564
|
}).join(','),
|
|
565
565
|
searchKr: okrPopType,
|
|
566
566
|
// 是否搜索KR:默认为0-不搜索,1-只有对齐目标弹层可以搜索KR
|
|
567
|
-
toUserId: toUserId
|
|
567
|
+
toUserId: toUserId,
|
|
568
|
+
includeCreateFailApprovalOkr: false
|
|
568
569
|
}).then(function (res) {
|
|
569
570
|
_this4.pending = false;
|
|
570
571
|
var resData = res && res.Data && res.Data.works || [];
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
display: inline-block;
|
|
3
3
|
width: 16px;
|
|
4
4
|
height: 16px;
|
|
5
|
-
background: #
|
|
5
|
+
background: #ffffff;
|
|
6
6
|
border-radius: 4px;
|
|
7
|
-
border: 1px solid #
|
|
7
|
+
border: 1px solid #bfc7d5;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
}
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.titaui-checkbox--disabled {
|
|
18
|
-
background-color: #
|
|
18
|
+
background-color: #f0f2f5;
|
|
19
19
|
cursor: not-allowed;
|
|
20
20
|
}
|
|
@@ -351,7 +351,9 @@ function CreateOkrModal(_ref, ref) {
|
|
|
351
351
|
setData: function setData(data) {
|
|
352
352
|
setOkrName(data.okrName);
|
|
353
353
|
setUser(data.user);
|
|
354
|
-
}
|
|
354
|
+
},
|
|
355
|
+
show: showCreateOkrModal,
|
|
356
|
+
hide: hideCreateOkrModal
|
|
355
357
|
};
|
|
356
358
|
});
|
|
357
359
|
var handleOnSuccess = (0, _react.useCallback)(function () {
|
|
@@ -46,7 +46,7 @@ var createWidthKr = /*#__PURE__*/function () {
|
|
|
46
46
|
while (1) {
|
|
47
47
|
switch (_context.prev = _context.next) {
|
|
48
48
|
case 0:
|
|
49
|
-
url = "".concat(requestDomain(), "/api/
|
|
49
|
+
url = "".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/createWithKr");
|
|
50
50
|
_context.next = 3;
|
|
51
51
|
return _axios["default"].post(url, _objectSpread({
|
|
52
52
|
workType: 6
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
|
|
34
34
|
.titaui-dialog-confirm__btn-cancel {
|
|
35
35
|
background: #ffffff;
|
|
36
|
-
border: 1px solid #dfe3ea;
|
|
36
|
+
border: 1px solid #dfe3ea !important;
|
|
37
37
|
color: #6f7886;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.titaui-dialog-confirm__btn-cancel:hover {
|
|
41
41
|
color: #2879ff;
|
|
42
|
-
border: 1px solid #2879ff;
|
|
42
|
+
border: 1px solid #2879ff !important;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.titaui-dialog-confirm__btn-cancel-text {
|
|
@@ -49,7 +49,9 @@ function HeaderAction(_ref) {
|
|
|
49
49
|
_onClick = _ref.onClick,
|
|
50
50
|
className = _ref.className,
|
|
51
51
|
title = _ref.title,
|
|
52
|
-
children = _ref.children
|
|
52
|
+
children = _ref.children,
|
|
53
|
+
approvalSetting = _ref.approvalSetting,
|
|
54
|
+
detailInfo = _ref.detailInfo;
|
|
53
55
|
|
|
54
56
|
var _useState = (0, _react.useState)(false),
|
|
55
57
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -99,6 +101,8 @@ function HeaderAction(_ref) {
|
|
|
99
101
|
if (children && children.length > 0) {
|
|
100
102
|
content = /*#__PURE__*/_react["default"].createElement(_headerDrop["default"], {
|
|
101
103
|
visible: dropVisible,
|
|
104
|
+
detailInfo: detailInfo,
|
|
105
|
+
approvalSetting: approvalSetting,
|
|
102
106
|
onVisibleChange: function onVisibleChange(visible) {
|
|
103
107
|
active.current = visible;
|
|
104
108
|
!visible && setDropVisible(false);
|
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _helper = require("../okr-detail/helper");
|
|
13
|
+
|
|
12
14
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -44,7 +46,9 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
44
46
|
colorInDrop = _ref.colorInDrop,
|
|
45
47
|
hoverColorInDrop = _ref.hoverColorInDrop,
|
|
46
48
|
_onClick = _ref.onClick,
|
|
47
|
-
onClose = _ref.onClose
|
|
49
|
+
onClose = _ref.onClose,
|
|
50
|
+
approvalSetting = _ref.approvalSetting,
|
|
51
|
+
detailInfo = _ref.detailInfo;
|
|
48
52
|
|
|
49
53
|
var _useState = (0, _react.useState)(false),
|
|
50
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -52,7 +56,37 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
52
56
|
setHover = _useState2[1];
|
|
53
57
|
|
|
54
58
|
var hasIcon = !!icon && typeof icon === "string";
|
|
55
|
-
|
|
59
|
+
var applyState = detailInfo === null || detailInfo === void 0 ? void 0 : detailInfo.applyState;
|
|
60
|
+
var OkrAndKrApprovalTypes = detailInfo === null || detailInfo === void 0 ? void 0 : detailInfo.OkrAndKrApprovalTypes;
|
|
61
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, icon === 'tu-icon-del' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _helper.getApprovalOkr)(approvalSetting, 'deleteOkr', applyState, OkrAndKrApprovalTypes) ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
|
+
className: "header-drop-item",
|
|
63
|
+
style: {
|
|
64
|
+
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
65
|
+
},
|
|
66
|
+
onClick: function onClick(e) {
|
|
67
|
+
_onClick && _onClick(e);
|
|
68
|
+
onClose(false);
|
|
69
|
+
},
|
|
70
|
+
onMouseOver: function onMouseOver() {
|
|
71
|
+
return setHover(true);
|
|
72
|
+
},
|
|
73
|
+
onMouseOut: function onMouseOut() {
|
|
74
|
+
return setHover(false);
|
|
75
|
+
}
|
|
76
|
+
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
|
+
className: "header-drop-item-icon",
|
|
78
|
+
style: {
|
|
79
|
+
color: hover ? hoverIconColorInDrop || hoverColorInDrop || hoverColor : iconColorInDrop || colorInDrop || color
|
|
80
|
+
}
|
|
81
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
|
+
className: icon
|
|
83
|
+
}) : icon), title) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
+
className: "header-drop-item-approval"
|
|
85
|
+
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
+
className: "header-drop-item-icon"
|
|
87
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
88
|
+
className: icon
|
|
89
|
+
}) : icon), title)) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
90
|
className: "header-drop-item",
|
|
57
91
|
style: {
|
|
58
92
|
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
@@ -74,19 +108,23 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
74
108
|
}
|
|
75
109
|
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
110
|
className: icon
|
|
77
|
-
}) : icon), title);
|
|
111
|
+
}) : icon), title));
|
|
78
112
|
};
|
|
79
113
|
|
|
80
114
|
var HeaderDrop = function HeaderDrop(_ref2) {
|
|
81
115
|
var visible = _ref2.visible,
|
|
82
116
|
onVisibleChange = _ref2.onVisibleChange,
|
|
83
117
|
items = _ref2.items,
|
|
84
|
-
children = _ref2.children
|
|
118
|
+
children = _ref2.children,
|
|
119
|
+
approvalSetting = _ref2.approvalSetting,
|
|
120
|
+
detailInfo = _ref2.detailInfo;
|
|
85
121
|
var renderDrop = (0, _react.useMemo)(function () {
|
|
86
122
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
123
|
className: "titaui-drawer-header-action-drop-wrapper"
|
|
88
124
|
}, items.map(function (item) {
|
|
89
125
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropItem, _extends({}, item, {
|
|
126
|
+
detailInfo: detailInfo,
|
|
127
|
+
approvalSetting: approvalSetting,
|
|
90
128
|
onClose: function onClose() {
|
|
91
129
|
return onVisibleChange(false);
|
|
92
130
|
}
|
|
@@ -164,6 +164,39 @@
|
|
|
164
164
|
background-repeat: no-repeat;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval {
|
|
168
|
+
height: 32px;
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
padding: 0 23px;
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
color: #BFC7D5;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon {
|
|
177
|
+
font-size: 18px;
|
|
178
|
+
color: inherit;
|
|
179
|
+
width: 18px;
|
|
180
|
+
height: 18px;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
margin-right: 10px;
|
|
183
|
+
background-size: contain;
|
|
184
|
+
background-position: center center;
|
|
185
|
+
background-repeat: no-repeat;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon > span {
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
color: inherit;
|
|
193
|
+
width: 18px;
|
|
194
|
+
height: 18px;
|
|
195
|
+
background-size: contain;
|
|
196
|
+
background-position: center center;
|
|
197
|
+
background-repeat: no-repeat;
|
|
198
|
+
}
|
|
199
|
+
|
|
167
200
|
.drawer-left .drawer-content-wrapper,
|
|
168
201
|
.drawer-right .drawer-content-wrapper,
|
|
169
202
|
.drawer-left .drawer-content,
|
|
@@ -25,7 +25,9 @@ require("./index.css");
|
|
|
25
25
|
|
|
26
26
|
var _context = _interopRequireDefault(require("../drawer-manager/context"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _dom = require("./utils/dom");
|
|
29
|
+
|
|
30
|
+
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex", "autoClosable"];
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
33
|
|
|
@@ -70,6 +72,8 @@ var Drawer = function Drawer(props) {
|
|
|
70
72
|
bodyStyle = props.bodyStyle,
|
|
71
73
|
_props$zIndex = props.zIndex,
|
|
72
74
|
zIndex = _props$zIndex === void 0 ? 1200 : _props$zIndex,
|
|
75
|
+
_props$autoClosable = props.autoClosable,
|
|
76
|
+
autoClosable = _props$autoClosable === void 0 ? false : _props$autoClosable,
|
|
73
77
|
rest = _objectWithoutProperties(props, _excluded);
|
|
74
78
|
|
|
75
79
|
var handleAfterVisibleChange = (0, _react.useCallback)(function (opened) {
|
|
@@ -89,6 +93,20 @@ var Drawer = function Drawer(props) {
|
|
|
89
93
|
return children;
|
|
90
94
|
}
|
|
91
95
|
|
|
96
|
+
var autoClose = function autoClose(e) {
|
|
97
|
+
if ((0, _dom.hasAncestorElement)(e.target, 'document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add')) return;
|
|
98
|
+
onClose();
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
(0, _react.useEffect)(function () {
|
|
102
|
+
if (autoClosable) {
|
|
103
|
+
document.addEventListener('mousedown', autoClose);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return function () {
|
|
107
|
+
document.removeEventListener('mousedown', autoClose);
|
|
108
|
+
};
|
|
109
|
+
}, []);
|
|
92
110
|
return /*#__PURE__*/_react["default"].createElement(DrawerContext.Provider, {
|
|
93
111
|
value: {
|
|
94
112
|
close: function close() {
|
|
@@ -123,7 +141,10 @@ function DrawerHeader(_ref) {
|
|
|
123
141
|
content = _ref.content,
|
|
124
142
|
style = _ref.style,
|
|
125
143
|
onClose = _ref.onClose,
|
|
126
|
-
actionComponent = _ref.actionComponent
|
|
144
|
+
actionComponent = _ref.actionComponent,
|
|
145
|
+
onlyShowContent = _ref.onlyShowContent,
|
|
146
|
+
approvalSetting = _ref.approvalSetting,
|
|
147
|
+
detailInfo = _ref.detailInfo;
|
|
127
148
|
var drawer = (0, _react.useContext)(DrawerContext);
|
|
128
149
|
var manager = (0, _react.useContext)(_context["default"]);
|
|
129
150
|
var showClose = closable && (!!onClose || !!drawer);
|
|
@@ -152,9 +173,11 @@ function DrawerHeader(_ref) {
|
|
|
152
173
|
style: {
|
|
153
174
|
flex: 1
|
|
154
175
|
}
|
|
155
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
|
|
176
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, onlyShowContent), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
|
|
156
177
|
return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
|
|
157
178
|
}), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
|
|
179
|
+
approvalSetting: approvalSetting,
|
|
180
|
+
detailInfo: detailInfo,
|
|
158
181
|
title: (0, _getLocale.getLocale)('Mod_MoreOperate'),
|
|
159
182
|
icon: "tu-icon-10",
|
|
160
183
|
children: collapsedActions
|
|
@@ -17,6 +17,8 @@ var _conditionRender = _interopRequireDefault(require("../../condition-render"))
|
|
|
17
17
|
|
|
18
18
|
var _getLocale = require("../../../utils/getLocale");
|
|
19
19
|
|
|
20
|
+
var _context = require("../context");
|
|
21
|
+
|
|
20
22
|
require("./index.css");
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -29,7 +31,9 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
29
31
|
dynamicShareIsShowToping = _ref.dynamicShareIsShowToping,
|
|
30
32
|
onDeleteFeed = _ref.onDeleteFeed,
|
|
31
33
|
_ref$height = _ref.height,
|
|
32
|
-
height = _ref$height === void 0 ? -1 : _ref$height
|
|
34
|
+
height = _ref$height === void 0 ? -1 : _ref$height,
|
|
35
|
+
_ref$searchKeyWord = _ref.searchKeyWord,
|
|
36
|
+
searchKeyWord = _ref$searchKeyWord === void 0 ? "" : _ref$searchKeyWord;
|
|
33
37
|
|
|
34
38
|
var handleDeleteFeed = function handleDeleteFeed(feedId) {
|
|
35
39
|
if (onDeleteFeed) {
|
|
@@ -37,10 +41,14 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
37
41
|
}
|
|
38
42
|
};
|
|
39
43
|
|
|
40
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
44
|
+
return /*#__PURE__*/_react["default"].createElement(_context.SearchKeyContext.Provider, {
|
|
45
|
+
value: {
|
|
46
|
+
searchKeyWord: searchKeyWord
|
|
47
|
+
}
|
|
48
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
41
49
|
className: prefix,
|
|
42
50
|
style: {
|
|
43
|
-
minHeight: height === -1 ?
|
|
51
|
+
minHeight: height === -1 ? "auto" : height
|
|
44
52
|
}
|
|
45
53
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
46
54
|
condition: data.length === 0
|
|
@@ -52,7 +60,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
52
60
|
alt: ""
|
|
53
61
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
54
62
|
className: "".concat(prefix, "__empty-text")
|
|
55
|
-
}, (0, _getLocale.getLocale)(
|
|
63
|
+
}, (0, _getLocale.getLocale)("OKR_Noinformation")))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
56
64
|
condition: data.length !== 0
|
|
57
65
|
}, /*#__PURE__*/_react["default"].createElement(_rcQueueAnim["default"], {
|
|
58
66
|
type: "bottom",
|
|
@@ -61,7 +69,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
61
69
|
animConfig: [{
|
|
62
70
|
opacity: [1, 0]
|
|
63
71
|
}, {
|
|
64
|
-
display:
|
|
72
|
+
display: "none"
|
|
65
73
|
}]
|
|
66
74
|
}, data.map(function (item) {
|
|
67
75
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -72,7 +80,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
72
80
|
onDeleteFeed: handleDeleteFeed,
|
|
73
81
|
dynamicShareIsShowToping: dynamicShareIsShowToping
|
|
74
82
|
}));
|
|
75
|
-
}))));
|
|
83
|
+
})))));
|
|
76
84
|
};
|
|
77
85
|
|
|
78
86
|
var _default = DynamicList;
|
|
@@ -1,23 +1,20 @@
|
|
|
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
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var
|
|
8
|
+
var _dynamicList = _interopRequireDefault(require("./dynamic-list"));
|
|
9
|
+
|
|
10
|
+
var _dynamicItem = _interopRequireDefault(require("./dynamic-item"));
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
var _context = require("./context");
|
|
13
13
|
|
|
14
|
-
function
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_exportModule["default"].QuickOperation = _exportModule.DynamicQuickOperation;
|
|
21
|
-
_exportModule["default"].Topping = _exportModule.DynamicTopping;
|
|
22
|
-
var _default = _exportModule["default"];
|
|
16
|
+
var Dynamic = _dynamicList["default"];
|
|
17
|
+
Dynamic.Item = _dynamicItem["default"];
|
|
18
|
+
Dynamic.SearchKeyContext = _context.SearchKeyContext;
|
|
19
|
+
var _default = Dynamic;
|
|
23
20
|
exports["default"] = _default;
|