@titaui/pc 1.11.31-beta.1 → 1.11.33
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 +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +6 -12
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/checkbox/index.css +3 -3
- package/lib/components/create-okr-modal/index.js +1 -3
- 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 +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
- package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/index.css +21 -0
- package/lib/components/dynamic/advertise/index.js +126 -0
- package/lib/components/dynamic/advertise/interface.js +5 -0
- package/lib/components/dynamic/advertise/util.js +28 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
- package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
- package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- 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 +146 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
- package/lib/components/dynamic/dynamic-liking/item.js +75 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.js +6 -14
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +141 -0
- package/lib/components/dynamic/dynamic-topping/index.js +82 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +153 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +173 -0
- package/lib/components/dynamic/dynamic.js +428 -0
- package/lib/components/dynamic/export-module/index.js +37 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +12 -9
- 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 +184 -0
- package/lib/components/dynamic/my-team/index.js +263 -0
- package/lib/components/dynamic/my-team/request-api.js +52 -0
- package/lib/components/dynamic/my-team/util.js +20 -0
- package/lib/components/dynamic/new-ui.css +192 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
- package/lib/components/dynamic/online-broadcast/data.js +77 -0
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
- 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 +46 -0
- package/lib/components/dynamic/online-broadcast/index.js +61 -0
- package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
- 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 +51 -0
- package/lib/components/dynamic/quick-operation/index.js +120 -0
- package/lib/components/dynamic/request-api.js +68 -7
- package/lib/components/nav-top/index.js +4 -8
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +7 -12
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +2 -21
- package/lib/components/okr-detail/okr-list/index.js +3 -8
- package/lib/components/okr-detail/request-apis.js +4 -10
- package/lib/components/okr-flow/child-node/index.css +1 -1
- package/lib/components/okr-flow/export-modal/index.js +35 -2
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- 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 +10 -16
- package/lib/components/survey-model/index.js +3 -0
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/components/toast/index.js +3 -5
- package/lib/index.js +0 -40
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +2 -2
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
|
@@ -58,10 +58,7 @@ 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
|
|
62
|
-
renderRightTopCmp = props.renderRightTopCmp,
|
|
63
|
-
_props$avatarTips = props.avatarTips,
|
|
64
|
-
avatarTips = _props$avatarTips === void 0 ? '' : _props$avatarTips;
|
|
61
|
+
textClass = props.textClass;
|
|
65
62
|
var hasAvatar = src && !src.match(/default\w*.jpg$/);
|
|
66
63
|
|
|
67
64
|
var _useState = (0, _react.useState)(false),
|
|
@@ -106,7 +103,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
106
103
|
style: {
|
|
107
104
|
width: size.width,
|
|
108
105
|
height: size.width,
|
|
109
|
-
verticalAlign:
|
|
106
|
+
verticalAlign: "top"
|
|
110
107
|
},
|
|
111
108
|
src: src
|
|
112
109
|
});
|
|
@@ -123,11 +120,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
123
120
|
}
|
|
124
121
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
122
|
style: {
|
|
126
|
-
display:
|
|
123
|
+
display: "inline-block",
|
|
127
124
|
width: "".concat(size.fontSize, "px"),
|
|
128
|
-
margin:
|
|
129
|
-
overflow:
|
|
130
|
-
whiteSpace:
|
|
125
|
+
margin: "0 auto",
|
|
126
|
+
overflow: "hidden",
|
|
127
|
+
whiteSpace: "nowrap",
|
|
131
128
|
fontSize: "".concat(size.fontSize, "px"),
|
|
132
129
|
lineHeight: "".concat(size.width, "px")
|
|
133
130
|
}
|
|
@@ -137,7 +134,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
137
134
|
})));
|
|
138
135
|
}
|
|
139
136
|
|
|
140
|
-
var cuttedName =
|
|
137
|
+
var cuttedName = "";
|
|
141
138
|
var cuttedNameLen = 0;
|
|
142
139
|
|
|
143
140
|
for (var i = 0, lent = name.length; i < lent; i++) {
|
|
@@ -170,11 +167,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
170
167
|
className: "titaui-pc-avator__name-avatar-container",
|
|
171
168
|
onMouseEnter: handleMouseEnter,
|
|
172
169
|
onMouseLeave: handleMouseLeave
|
|
173
|
-
},
|
|
170
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
174
171
|
onClick: handleDelUser,
|
|
175
172
|
onMouseLeave: handleCloseIconMouseLeave,
|
|
176
173
|
onMouseEnter: handleCloseIconMouseEnter,
|
|
177
|
-
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ?
|
|
174
|
+
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ? "titaui-pc-avator--enter" : ""),
|
|
178
175
|
style: {
|
|
179
176
|
left: "".concat(size.width - 14, "px")
|
|
180
177
|
}
|
|
@@ -188,10 +185,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
188
185
|
onClick: onClick,
|
|
189
186
|
onMouseEnter: onMouseEnter,
|
|
190
187
|
onMouseLeave: onMouseLeave
|
|
191
|
-
},
|
|
192
|
-
overlay: avatarTips,
|
|
193
|
-
placement: "top"
|
|
194
|
-
}, hasAvatar ? renderImgAvatar() : renderTextAvatar()), !avatarTips && (hasAvatar ? renderImgAvatar() : renderTextAvatar())), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
188
|
+
}, hasAvatar ? renderImgAvatar() : renderTextAvatar()), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
195
189
|
overlay: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
196
190
|
name: name,
|
|
197
191
|
id: userId
|
|
@@ -200,17 +194,14 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
200
194
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
201
195
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
202
196
|
style: {
|
|
203
|
-
|
|
197
|
+
width: textWidth
|
|
204
198
|
}
|
|
205
199
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
206
200
|
ref: textRef
|
|
207
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
208
|
-
name: name,
|
|
209
|
-
id: userId
|
|
210
|
-
})))) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
201
|
+
}, name))) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
211
202
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
212
203
|
style: {
|
|
213
|
-
|
|
204
|
+
width: textWidth
|
|
214
205
|
}
|
|
215
206
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
216
207
|
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: 13px;
|
|
17
17
|
padding: 0 12px;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -60,35 +60,21 @@
|
|
|
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
|
-
|
|
77
63
|
.titaui-rect-btn--cancel {
|
|
78
|
-
color: #
|
|
79
|
-
border: 1px solid #
|
|
80
|
-
background: #
|
|
64
|
+
color: #6F7886;
|
|
65
|
+
border: 1px solid #DFE3EA;
|
|
66
|
+
background: #FFFFFF;
|
|
81
67
|
}
|
|
82
68
|
|
|
83
69
|
.titaui-rect-btn--cancel:hover {
|
|
84
|
-
color: #
|
|
85
|
-
border: 1px solid #
|
|
70
|
+
color: #2879FF;
|
|
71
|
+
border: 1px solid #2879FF;
|
|
86
72
|
}
|
|
87
73
|
|
|
88
74
|
.titaui-rect-btn--delete {
|
|
89
|
-
background: #
|
|
90
|
-
color: #
|
|
91
|
-
border: 1px solid #
|
|
75
|
+
background: #FFFFFF;
|
|
76
|
+
color: #F05E5E;
|
|
77
|
+
border: 1px solid #F05E5E;
|
|
92
78
|
}
|
|
93
79
|
|
|
94
80
|
.titaui-rect-btn--delete:hover {
|
|
@@ -106,31 +92,11 @@
|
|
|
106
92
|
user-select: none;
|
|
107
93
|
}
|
|
108
94
|
|
|
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
|
-
|
|
129
95
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled {
|
|
130
|
-
background: #
|
|
96
|
+
background: #93BCFF;
|
|
131
97
|
opacity: 1;
|
|
132
98
|
}
|
|
133
99
|
|
|
134
100
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled:hover {
|
|
135
|
-
background: #
|
|
101
|
+
background: #93BCFF;
|
|
136
102
|
}
|
|
@@ -34,10 +34,7 @@ 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
|
|
38
|
-
children = props.children,
|
|
39
|
-
_props$loading = props.loading,
|
|
40
|
-
loading = _props$loading === void 0 ? false : _props$loading;
|
|
37
|
+
style = props.style;
|
|
41
38
|
|
|
42
39
|
var renderIcon = function renderIcon() {
|
|
43
40
|
if (typeof icon === 'string') {
|
|
@@ -53,19 +50,16 @@ function RectBtn(props) {
|
|
|
53
50
|
}, icon);
|
|
54
51
|
};
|
|
55
52
|
|
|
56
|
-
var onClickHandler = function onClickHandler(
|
|
57
|
-
if (disabled
|
|
58
|
-
|
|
59
|
-
if (onClick) {
|
|
60
|
-
onClick(e);
|
|
61
|
-
}
|
|
53
|
+
var onClickHandler = function onClickHandler() {
|
|
54
|
+
if (disabled) return;
|
|
55
|
+
onClick && onClick();
|
|
62
56
|
};
|
|
63
57
|
|
|
64
58
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
65
|
-
className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled
|
|
59
|
+
className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled), className),
|
|
66
60
|
style: style,
|
|
67
61
|
onClick: onClickHandler
|
|
68
|
-
}, icon && renderIcon(), children || text);
|
|
62
|
+
}, icon && renderIcon(), props.children || text);
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
var _default = RectBtn;
|
|
@@ -564,8 +564,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
564
564
|
}).join(','),
|
|
565
565
|
searchKr: okrPopType,
|
|
566
566
|
// 是否搜索KR:默认为0-不搜索,1-只有对齐目标弹层可以搜索KR
|
|
567
|
-
toUserId: toUserId
|
|
568
|
-
includeCreateFailApprovalOkr: false
|
|
567
|
+
toUserId: toUserId
|
|
569
568
|
}).then(function (res) {
|
|
570
569
|
_this4.pending = false;
|
|
571
570
|
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 #DFE3EA;
|
|
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,9 +351,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
351
351
|
setData: function setData(data) {
|
|
352
352
|
setOkrName(data.okrName);
|
|
353
353
|
setUser(data.user);
|
|
354
|
-
}
|
|
355
|
-
show: showCreateOkrModal,
|
|
356
|
-
hide: hideCreateOkrModal
|
|
354
|
+
}
|
|
357
355
|
};
|
|
358
356
|
});
|
|
359
357
|
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/v2/").concat(tenantId, "/").concat(userId, "/work/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;
|
|
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;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.titaui-dialog-confirm__btn-cancel-text {
|
|
@@ -49,9 +49,7 @@ function HeaderAction(_ref) {
|
|
|
49
49
|
_onClick = _ref.onClick,
|
|
50
50
|
className = _ref.className,
|
|
51
51
|
title = _ref.title,
|
|
52
|
-
children = _ref.children
|
|
53
|
-
approvalSetting = _ref.approvalSetting,
|
|
54
|
-
detailInfo = _ref.detailInfo;
|
|
52
|
+
children = _ref.children;
|
|
55
53
|
|
|
56
54
|
var _useState = (0, _react.useState)(false),
|
|
57
55
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -101,8 +99,6 @@ function HeaderAction(_ref) {
|
|
|
101
99
|
if (children && children.length > 0) {
|
|
102
100
|
content = /*#__PURE__*/_react["default"].createElement(_headerDrop["default"], {
|
|
103
101
|
visible: dropVisible,
|
|
104
|
-
detailInfo: detailInfo,
|
|
105
|
-
approvalSetting: approvalSetting,
|
|
106
102
|
onVisibleChange: function onVisibleChange(visible) {
|
|
107
103
|
active.current = visible;
|
|
108
104
|
!visible && setDropVisible(false);
|
|
@@ -9,8 +9,6 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _helper = require("../okr-detail/helper");
|
|
13
|
-
|
|
14
12
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -46,9 +44,7 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
46
44
|
colorInDrop = _ref.colorInDrop,
|
|
47
45
|
hoverColorInDrop = _ref.hoverColorInDrop,
|
|
48
46
|
_onClick = _ref.onClick,
|
|
49
|
-
onClose = _ref.onClose
|
|
50
|
-
approvalSetting = _ref.approvalSetting,
|
|
51
|
-
detailInfo = _ref.detailInfo;
|
|
47
|
+
onClose = _ref.onClose;
|
|
52
48
|
|
|
53
49
|
var _useState = (0, _react.useState)(false),
|
|
54
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -56,37 +52,7 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
56
52
|
setHover = _useState2[1];
|
|
57
53
|
|
|
58
54
|
var hasIcon = !!icon && typeof icon === "string";
|
|
59
|
-
|
|
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", {
|
|
55
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
90
56
|
className: "header-drop-item",
|
|
91
57
|
style: {
|
|
92
58
|
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
@@ -108,23 +74,19 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
108
74
|
}
|
|
109
75
|
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
110
76
|
className: icon
|
|
111
|
-
}) : icon), title)
|
|
77
|
+
}) : icon), title);
|
|
112
78
|
};
|
|
113
79
|
|
|
114
80
|
var HeaderDrop = function HeaderDrop(_ref2) {
|
|
115
81
|
var visible = _ref2.visible,
|
|
116
82
|
onVisibleChange = _ref2.onVisibleChange,
|
|
117
83
|
items = _ref2.items,
|
|
118
|
-
children = _ref2.children
|
|
119
|
-
approvalSetting = _ref2.approvalSetting,
|
|
120
|
-
detailInfo = _ref2.detailInfo;
|
|
84
|
+
children = _ref2.children;
|
|
121
85
|
var renderDrop = (0, _react.useMemo)(function () {
|
|
122
86
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
87
|
className: "titaui-drawer-header-action-drop-wrapper"
|
|
124
88
|
}, items.map(function (item) {
|
|
125
89
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropItem, _extends({}, item, {
|
|
126
|
-
detailInfo: detailInfo,
|
|
127
|
-
approvalSetting: approvalSetting,
|
|
128
90
|
onClose: function onClose() {
|
|
129
91
|
return onVisibleChange(false);
|
|
130
92
|
}
|
|
@@ -164,39 +164,6 @@
|
|
|
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
|
-
|
|
200
167
|
.drawer-left .drawer-content-wrapper,
|
|
201
168
|
.drawer-right .drawer-content-wrapper,
|
|
202
169
|
.drawer-left .drawer-content,
|
|
@@ -25,9 +25,7 @@ require("./index.css");
|
|
|
25
25
|
|
|
26
26
|
var _context = _interopRequireDefault(require("../drawer-manager/context"));
|
|
27
27
|
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex", "autoClosable"];
|
|
28
|
+
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex"];
|
|
31
29
|
|
|
32
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
31
|
|
|
@@ -72,8 +70,6 @@ var Drawer = function Drawer(props) {
|
|
|
72
70
|
bodyStyle = props.bodyStyle,
|
|
73
71
|
_props$zIndex = props.zIndex,
|
|
74
72
|
zIndex = _props$zIndex === void 0 ? 1200 : _props$zIndex,
|
|
75
|
-
_props$autoClosable = props.autoClosable,
|
|
76
|
-
autoClosable = _props$autoClosable === void 0 ? false : _props$autoClosable,
|
|
77
73
|
rest = _objectWithoutProperties(props, _excluded);
|
|
78
74
|
|
|
79
75
|
var handleAfterVisibleChange = (0, _react.useCallback)(function (opened) {
|
|
@@ -93,20 +89,6 @@ var Drawer = function Drawer(props) {
|
|
|
93
89
|
return children;
|
|
94
90
|
}
|
|
95
91
|
|
|
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
|
-
}, []);
|
|
110
92
|
return /*#__PURE__*/_react["default"].createElement(DrawerContext.Provider, {
|
|
111
93
|
value: {
|
|
112
94
|
close: function close() {
|
|
@@ -141,10 +123,7 @@ function DrawerHeader(_ref) {
|
|
|
141
123
|
content = _ref.content,
|
|
142
124
|
style = _ref.style,
|
|
143
125
|
onClose = _ref.onClose,
|
|
144
|
-
actionComponent = _ref.actionComponent
|
|
145
|
-
onlyShowContent = _ref.onlyShowContent,
|
|
146
|
-
approvalSetting = _ref.approvalSetting,
|
|
147
|
-
detailInfo = _ref.detailInfo;
|
|
126
|
+
actionComponent = _ref.actionComponent;
|
|
148
127
|
var drawer = (0, _react.useContext)(DrawerContext);
|
|
149
128
|
var manager = (0, _react.useContext)(_context["default"]);
|
|
150
129
|
var showClose = closable && (!!onClose || !!drawer);
|
|
@@ -173,11 +152,9 @@ function DrawerHeader(_ref) {
|
|
|
173
152
|
style: {
|
|
174
153
|
flex: 1
|
|
175
154
|
}
|
|
176
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null,
|
|
155
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
|
|
177
156
|
return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
|
|
178
157
|
}), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
|
|
179
|
-
approvalSetting: approvalSetting,
|
|
180
|
-
detailInfo: detailInfo,
|
|
181
158
|
title: (0, _getLocale.getLocale)('Mod_MoreOperate'),
|
|
182
159
|
icon: "tu-icon-10",
|
|
183
160
|
children: collapsedActions
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.titaui-dynamic-advertise-next-btn {
|
|
2
|
+
width: 24px;
|
|
3
|
+
height: 24px;
|
|
4
|
+
background: rgba(0, 0, 0, 0.4);
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 50%;
|
|
12
|
+
transform: translateY(-50%);
|
|
13
|
+
z-index: 1;
|
|
14
|
+
right: 16px;
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transition: all 0.3s linear;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.titaui-dynamic-advertise-next-btn__icon {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
transform: rotate(180deg);
|
|
22
|
+
color: #ffffff;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.titaui-dynamic-advertise-next-btn--hidden {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
require("./index.css");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
var prefix = "titaui-dynamic-advertise-next-btn";
|
|
19
|
+
|
|
20
|
+
var NextBtn = function NextBtn(_ref) {
|
|
21
|
+
var onClick = _ref.onClick,
|
|
22
|
+
isShow = _ref.isShow;
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--hidden"), !isShow)),
|
|
25
|
+
onClick: onClick
|
|
26
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
27
|
+
className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__icon"))
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var _default = NextBtn;
|
|
32
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.titaui-dynamic-advertise-pre-btn {
|
|
2
|
+
width: 24px;
|
|
3
|
+
height: 24px;
|
|
4
|
+
background: rgba(0, 0, 0, 0.4);
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 50%;
|
|
12
|
+
left: 16px;
|
|
13
|
+
transform: translateY(-50%);
|
|
14
|
+
z-index: 1;
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transition: all 0.3s linear;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.titaui-dynamic-advertise-pre-btn__icon {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
color: #ffffff;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.titaui-dynamic-advertise-pre-btn--hidden {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
require("./index.css");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
var prefix = "titaui-dynamic-advertise-pre-btn";
|
|
19
|
+
|
|
20
|
+
var PreBtn = function PreBtn(_ref) {
|
|
21
|
+
var onClick = _ref.onClick,
|
|
22
|
+
isShow = _ref.isShow;
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--hidden"), !isShow)),
|
|
25
|
+
onClick: onClick
|
|
26
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
27
|
+
className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__icon"))
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var _default = PreBtn;
|
|
32
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.tutaui-dynamic-advertise {
|
|
2
|
+
width: 278px;
|
|
3
|
+
border-radius: 12px;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tutaui-dynamic-advertise--not-empty {
|
|
8
|
+
box-shadow: 0px 2px 12px 0px rgba(127, 145, 180, 0.2);
|
|
9
|
+
margin-top: 10px;
|
|
10
|
+
height: 136px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tutaui-dynamic-advertise *:focus {
|
|
14
|
+
outline: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tutaui-dynamic-advertise__img {
|
|
18
|
+
border-radius: 12px;
|
|
19
|
+
width: 278px;
|
|
20
|
+
height: 136px;
|
|
21
|
+
}
|