@titaui/pc 1.11.39-beta.1 → 1.11.40
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/avatar/text-avatar/index.css +1 -1
- package/lib/components/avatar/text-avatar/index.js +4 -4
- 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 +41 -45
- 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/constant.js +38 -33
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +48 -10
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +4 -2
- package/lib/components/dynamic/new-ui.css +4 -4
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +2 -1
- package/lib/components/nav-top/index.js +2 -6
- 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 +14 -13
- 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 +4 -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-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/task-relation-modal/request-api.js +1 -2
- package/lib/components/task-tree/task-item-node/constant.js +26 -21
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +26 -16
- package/lib/components/task-tree/task-item-node/e-task.js +21 -21
- package/lib/components/task-tree/task-item-node/index.css +2 -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 +1 -1
- 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
- package/lib/pages/new-okr-list/header/operate-record.js +0 -131
|
@@ -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
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getObjTypeMapText = exports.PlanReportType = exports.OkrRiskMapping = exports.ObjectType = exports.EStatusStatus2ClassType = exports.EShareType = exports.EObjType = exports.EFeedType = void 0;
|
|
6
|
+
exports.getObjTypeMapText = exports.PlanReportType = exports.PlanReportTrackActionNameMap = exports.OkrRiskMapping = exports.ObjectType = exports.EStatusStatus2ClassType = exports.EShareType = exports.EObjType = exports.EFeedType = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../utils/getLocale");
|
|
9
9
|
|
|
10
10
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
11
|
|
|
12
12
|
var OkrRiskMapping = {
|
|
13
|
-
0:
|
|
13
|
+
0: "normal",
|
|
14
14
|
// 正常推进
|
|
15
|
-
1:
|
|
15
|
+
1: "normal",
|
|
16
16
|
// 正常推进
|
|
17
|
-
2:
|
|
17
|
+
2: "risk",
|
|
18
18
|
// 注意风险
|
|
19
|
-
3:
|
|
19
|
+
3: "delay",
|
|
20
20
|
// 已有风险
|
|
21
|
-
4:
|
|
21
|
+
4: "end",
|
|
22
22
|
// kr及o全都完成
|
|
23
|
-
5:
|
|
23
|
+
5: "delay",
|
|
24
24
|
// 延期完成
|
|
25
|
-
6:
|
|
25
|
+
6: "normal" // 正常推进
|
|
26
26
|
|
|
27
27
|
};
|
|
28
28
|
exports.OkrRiskMapping = OkrRiskMapping;
|
|
@@ -82,7 +82,7 @@ exports.EObjType = EObjType;
|
|
|
82
82
|
var getObjTypeMapText = function getObjTypeMapText(key) {
|
|
83
83
|
var _data;
|
|
84
84
|
|
|
85
|
-
var data = (_data = {}, _defineProperty(_data, EObjType.Project, (0, _getLocale.getLocale)(
|
|
85
|
+
var data = (_data = {}, _defineProperty(_data, EObjType.Project, (0, _getLocale.getLocale)("Menu_Title_Projects")), _defineProperty(_data, EObjType.Task, (0, _getLocale.getLocale)("Mod_Tasks")), _defineProperty(_data, EObjType.O, (0, _getLocale.getLocale)("Mod_Objective")), _defineProperty(_data, EObjType.Kr, (0, _getLocale.getLocale)("Mod_KeyResults")), _defineProperty(_data, EObjType.MileStone, (0, _getLocale.getLocale)("Pro_page_Plan_Milestone")), _defineProperty(_data, EObjType.KanBan, (0, _getLocale.getLocale)("Pro_page_V_Tab_Kanban")), _defineProperty(_data, EObjType.Report, "总结"), _data);
|
|
86
86
|
return data[key];
|
|
87
87
|
};
|
|
88
88
|
|
|
@@ -90,34 +90,39 @@ exports.getObjTypeMapText = getObjTypeMapText;
|
|
|
90
90
|
|
|
91
91
|
var ObjectType = function ObjectType() {
|
|
92
92
|
return {
|
|
93
|
-
1: (0, _getLocale.getLocale)(
|
|
94
|
-
4: (0, _getLocale.getLocale)(
|
|
95
|
-
5: (0, _getLocale.getLocale)(
|
|
96
|
-
6: (0, _getLocale.getLocale)(
|
|
97
|
-
7: (0, _getLocale.getLocale)(
|
|
98
|
-
8: (0, _getLocale.getLocale)(
|
|
99
|
-
10: (0, _getLocale.getLocale)(
|
|
100
|
-
11: (0, _getLocale.getLocale)(
|
|
101
|
-
12: (0, _getLocale.getLocale)(
|
|
102
|
-
62: (0, _getLocale.getLocale)(
|
|
103
|
-
65: (0, _getLocale.getLocale)(
|
|
104
|
-
70: (0, _getLocale.getLocale)(
|
|
105
|
-
79: (0, _getLocale.getLocale)(
|
|
106
|
-
80: (0, _getLocale.getLocale)(
|
|
107
|
-
42: (0, _getLocale.getLocale)(
|
|
93
|
+
1: (0, _getLocale.getLocale)("Mod_sannouncement"),
|
|
94
|
+
4: (0, _getLocale.getLocale)("Menu_Title_Projects"),
|
|
95
|
+
5: (0, _getLocale.getLocale)("Mod_sPerformanceForm"),
|
|
96
|
+
6: (0, _getLocale.getLocale)("Mod_sPerformanceGoals"),
|
|
97
|
+
7: (0, _getLocale.getLocale)("Mod_stasks"),
|
|
98
|
+
8: (0, _getLocale.getLocale)("Mod_sDailySummary"),
|
|
99
|
+
10: (0, _getLocale.getLocale)("Feed_sFeed"),
|
|
100
|
+
11: (0, _getLocale.getLocale)("Pro_page_Plan"),
|
|
101
|
+
12: (0, _getLocale.getLocale)("Feed_OperationTasks"),
|
|
102
|
+
62: (0, _getLocale.getLocale)("Mod_sobjective"),
|
|
103
|
+
65: (0, _getLocale.getLocale)("Feed_Keyresults"),
|
|
104
|
+
70: (0, _getLocale.getLocale)("OKR_MyO_KRP_Review"),
|
|
105
|
+
79: (0, _getLocale.getLocale)("Mod_skeyprogress"),
|
|
106
|
+
80: (0, _getLocale.getLocale)("Feed_sAnnouncement"),
|
|
107
|
+
42: (0, _getLocale.getLocale)("OKR_MyO_E_Reward")
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
exports.ObjectType = ObjectType;
|
|
112
112
|
var EStatusStatus2ClassType = {
|
|
113
|
-
2:
|
|
114
|
-
1:
|
|
115
|
-
4:
|
|
116
|
-
3:
|
|
117
|
-
6:
|
|
118
|
-
0:
|
|
119
|
-
5:
|
|
113
|
+
2: "tu-icon-finished",
|
|
114
|
+
1: "tu-icon-running",
|
|
115
|
+
4: "tu-icon-canceled",
|
|
116
|
+
3: "tu-icon-deferred",
|
|
117
|
+
6: "tu-icon-paused",
|
|
118
|
+
0: "tu-icon-notstart",
|
|
119
|
+
5: "tu-icon-jiantou-right"
|
|
120
120
|
};
|
|
121
121
|
exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
|
|
122
|
-
var PlanReportType = [
|
|
123
|
-
exports.PlanReportType = PlanReportType;
|
|
122
|
+
var PlanReportType = ["titaPlanReport", "titaPlanManagerReport"];
|
|
123
|
+
exports.PlanReportType = PlanReportType;
|
|
124
|
+
var PlanReportTrackActionNameMap = {
|
|
125
|
+
titaPlanReport: "动态日报推送",
|
|
126
|
+
titaPlanManagerReport: "动态日报推送-管理者"
|
|
127
|
+
};
|
|
128
|
+
exports.PlanReportTrackActionNameMap = PlanReportTrackActionNameMap;
|
|
@@ -29,6 +29,8 @@ var _getLocale = require("../../../../utils/getLocale");
|
|
|
29
29
|
|
|
30
30
|
var _context = require("../../context");
|
|
31
31
|
|
|
32
|
+
var _constant = require("../../constant");
|
|
33
|
+
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
35
|
|
|
34
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -61,12 +63,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
61
63
|
|
|
62
64
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
63
65
|
|
|
64
|
-
var prefix =
|
|
66
|
+
var prefix = "titaui-dynamic-item";
|
|
65
67
|
|
|
66
68
|
var DynamicFooter = function DynamicFooter(_ref) {
|
|
67
69
|
var _getBSGlobal;
|
|
68
70
|
|
|
69
|
-
var data = _ref.data
|
|
71
|
+
var data = _ref.data,
|
|
72
|
+
dailyReportType = _ref.dailyReportType;
|
|
70
73
|
var feedId = data.feedId,
|
|
71
74
|
feedComments = data.feedComments,
|
|
72
75
|
praiseType = data.praiseType,
|
|
@@ -95,8 +98,9 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
95
98
|
setUpvoteModalVisible = _useState8[1];
|
|
96
99
|
|
|
97
100
|
var communicationRef = (0, _react.useRef)();
|
|
98
|
-
var
|
|
99
|
-
|
|
101
|
+
var productName = _constant.PlanReportTrackActionNameMap[dailyReportType];
|
|
102
|
+
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)("WebHead")) !== null && _getBSGlobal !== void 0 && _getBSGlobal.AppHead.find(function (item) {
|
|
103
|
+
return item.AppId === "950";
|
|
100
104
|
}));
|
|
101
105
|
|
|
102
106
|
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
@@ -108,16 +112,18 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
108
112
|
};
|
|
109
113
|
|
|
110
114
|
var onChangeParse = function onChangeParse(type) {
|
|
111
|
-
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)(
|
|
115
|
+
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)("loginUserInfo"),
|
|
112
116
|
Id = _getBSGlobal2.Id;
|
|
113
117
|
|
|
114
118
|
var data = _toConsumableArray(praiseData).filter(function (item) {
|
|
115
119
|
return Number("".concat(item.userId)) !== Number("".concat(Id));
|
|
116
120
|
});
|
|
117
121
|
|
|
122
|
+
var actionName = "";
|
|
123
|
+
|
|
118
124
|
if (type) {
|
|
119
|
-
var avatar = (0, _bsGlobal.getBSGlobal)(
|
|
120
|
-
var name = (0, _bsGlobal.getBSGlobal)(
|
|
125
|
+
var avatar = (0, _bsGlobal.getBSGlobal)("loginUserInfo").UserAvatar;
|
|
126
|
+
var name = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Name;
|
|
121
127
|
avatar.color = avatar.Color;
|
|
122
128
|
avatar.medium = avatar.Medium;
|
|
123
129
|
var parseUser = {
|
|
@@ -127,8 +133,18 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
127
133
|
praiseType: type
|
|
128
134
|
};
|
|
129
135
|
setPraiseData([parseUser].concat(_toConsumableArray(data)));
|
|
136
|
+
actionName = "点赞总结feed";
|
|
130
137
|
} else {
|
|
131
138
|
setPraiseData(data);
|
|
139
|
+
actionName = "取消总结feed点赞";
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (window.titaTracker) {
|
|
143
|
+
window.titaTracker("action").record({
|
|
144
|
+
actionName: actionName,
|
|
145
|
+
actionGroup: "互动",
|
|
146
|
+
productName: productName
|
|
147
|
+
});
|
|
132
148
|
}
|
|
133
149
|
};
|
|
134
150
|
|
|
@@ -143,6 +159,14 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
143
159
|
};
|
|
144
160
|
|
|
145
161
|
if (window.util) {
|
|
162
|
+
if (window.titaTracker) {
|
|
163
|
+
window.titaTracker("action").record({
|
|
164
|
+
actionName: "打开打赏弹层",
|
|
165
|
+
actionGroup: "互动",
|
|
166
|
+
productName: productName
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
146
170
|
window.util.rewardGetFile(function (myReward) {
|
|
147
171
|
myReward.renderPayReward(data);
|
|
148
172
|
});
|
|
@@ -151,12 +175,25 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
151
175
|
|
|
152
176
|
var renderUpvoteCount = function renderUpvoteCount(type, count) {
|
|
153
177
|
if (count === 0) {
|
|
154
|
-
return
|
|
178
|
+
return "";
|
|
155
179
|
}
|
|
156
180
|
|
|
157
181
|
return count || type;
|
|
158
182
|
};
|
|
159
183
|
|
|
184
|
+
var handleReply = function handleReply(_ref2) {
|
|
185
|
+
var submitType = _ref2.submitType;
|
|
186
|
+
var actionName = submitType === "delete" ? "删除总结feed评论" : "评论总结feed";
|
|
187
|
+
|
|
188
|
+
if (window.titaTracker) {
|
|
189
|
+
window.titaTracker("action").record({
|
|
190
|
+
actionName: actionName,
|
|
191
|
+
actionGroup: "互动",
|
|
192
|
+
productName: productName
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
160
197
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
198
|
className: (0, _classnames["default"])("".concat(prefix, "__footer"))
|
|
162
199
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -189,7 +226,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
189
226
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
190
227
|
condition: hasRewardBtn
|
|
191
228
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
192
|
-
overlay: (0, _getLocale.getLocale)(
|
|
229
|
+
overlay: (0, _getLocale.getLocale)("Feed_Approval"),
|
|
193
230
|
align: {
|
|
194
231
|
offset: [0, 0]
|
|
195
232
|
},
|
|
@@ -199,7 +236,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
199
236
|
className: (0, _classnames["default"])("".concat(prefix, "__footer-icon"), "".concat(prefix, "__footer-icon-redenvelopes"))
|
|
200
237
|
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
201
238
|
onClick: handleCommentClick,
|
|
202
|
-
className: (0, _classnames["default"])(
|
|
239
|
+
className: (0, _classnames["default"])("tu-icon-pinglun-m", "".concat(prefix, "__footer-icon"))
|
|
203
240
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
204
241
|
condition: feedComments.total > 0
|
|
205
242
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -234,6 +271,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
234
271
|
usePropsComment: usePropsComment,
|
|
235
272
|
communication: feedComments.comments,
|
|
236
273
|
totalCommunicationNum: feedComments.total,
|
|
274
|
+
onReplyChange: handleReply,
|
|
237
275
|
showUser: true,
|
|
238
276
|
showDefaultInput: true
|
|
239
277
|
}))));
|
|
@@ -17,7 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
|
-
var prefixCls =
|
|
20
|
+
var prefixCls = "titaui-dynamic-item";
|
|
21
21
|
|
|
22
22
|
var DynamicAIDialy = function DynamicAIDialy(_ref) {
|
|
23
23
|
var data = _ref.data;
|
|
@@ -26,12 +26,14 @@ var DynamicAIDialy = function DynamicAIDialy(_ref) {
|
|
|
26
26
|
return (0, _utils.getChartProps)(data.biId);
|
|
27
27
|
}, [data.biId]);
|
|
28
28
|
|
|
29
|
+
var type = chartQuery.type;
|
|
29
30
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
31
|
className: prefixCls
|
|
31
32
|
}, /*#__PURE__*/_react["default"].createElement(_supersetCharts["default"], _extends({
|
|
32
33
|
feedData: data
|
|
33
34
|
}, chartQuery)), /*#__PURE__*/_react["default"].createElement(_dynamicFooter["default"], {
|
|
34
|
-
data: data
|
|
35
|
+
data: data,
|
|
36
|
+
dailyReportType: type
|
|
35
37
|
}));
|
|
36
38
|
};
|
|
37
39
|
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.titaui-new-ui-dynamic__no-more-data::before {
|
|
132
|
-
content:
|
|
132
|
+
content: "";
|
|
133
133
|
display: inline-block;
|
|
134
134
|
margin-right: 12px;
|
|
135
135
|
width: 192px;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.titaui-new-ui-dynamic__no-more-data::after {
|
|
142
|
-
content:
|
|
142
|
+
content: "";
|
|
143
143
|
display: inline-block;
|
|
144
144
|
margin-left: 12px;
|
|
145
145
|
width: 192px;
|
|
@@ -150,8 +150,8 @@
|
|
|
150
150
|
|
|
151
151
|
.titaui-new-ui-dynamic__go-to-top {
|
|
152
152
|
position: fixed;
|
|
153
|
-
bottom:
|
|
154
|
-
right:
|
|
153
|
+
bottom: 128px;
|
|
154
|
+
right: 24px;
|
|
155
155
|
display: flex;
|
|
156
156
|
align-items: center;
|
|
157
157
|
justify-content: center;
|
|
@@ -84,7 +84,8 @@ function Inform(props) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
if (objType === _constant.EObjType.Interview) {
|
|
87
|
-
(0, _tools.openPage)(
|
|
87
|
+
messageType !== 153 && (0, _tools.openPage)( // 153:删除面谈的通知类型
|
|
88
|
+
"".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/interview?reactRouterName=detail&hideNavTop=true&recordId=").concat(objId, "&toUserId=").concat(user === null || user === void 0 ? void 0 : user.userId));
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
91
|
|
|
@@ -15,8 +15,6 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
15
15
|
|
|
16
16
|
var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"));
|
|
17
17
|
|
|
18
|
-
var _useGlobalValue = _interopRequireDefault(require("./useGlobalValue"));
|
|
19
|
-
|
|
20
18
|
var _menu = _interopRequireDefault(require("./components/menu"));
|
|
21
19
|
|
|
22
20
|
var _userMessage = _interopRequireDefault(require("./components/user-message"));
|
|
@@ -172,7 +170,5 @@ var NavTop = function NavTop() {
|
|
|
172
170
|
}, /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null)));
|
|
173
171
|
};
|
|
174
172
|
|
|
175
|
-
var _default = NavTop;
|
|
176
|
-
|
|
177
|
-
exports["default"] = _default;
|
|
178
|
-
NavTop.useGlobalValue = _useGlobalValue["default"];
|
|
173
|
+
var _default = NavTop;
|
|
174
|
+
exports["default"] = _default;
|
|
@@ -13,10 +13,6 @@ var _okrPeriodSelector = _interopRequireDefault(require("../../../../okr-period-
|
|
|
13
13
|
|
|
14
14
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
15
15
|
|
|
16
|
-
var _context = require("../../../context");
|
|
17
|
-
|
|
18
|
-
var _helper = require("../../../helper");
|
|
19
|
-
|
|
20
16
|
require("./index.css");
|
|
21
17
|
|
|
22
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -44,22 +40,14 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
44
40
|
_ref$canEdit = _ref.canEdit,
|
|
45
41
|
canEdit = _ref$canEdit === void 0 ? false : _ref$canEdit;
|
|
46
42
|
|
|
47
|
-
var _useContext = (0, _react.useContext)(_context.CommonContext),
|
|
48
|
-
okrInfo = _useContext.okrInfo,
|
|
49
|
-
approvalSetting = _useContext.approvalSetting;
|
|
50
|
-
|
|
51
|
-
var canCycleEdit = canEdit && (0, _helper.getApprovalOkr)(approvalSetting, "changeOkrTime", okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes);
|
|
52
|
-
|
|
53
43
|
var _useState = (0, _react.useState)(false),
|
|
54
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
55
45
|
isFocus = _useState2[0],
|
|
56
46
|
setIsFocus = _useState2[1];
|
|
57
47
|
|
|
58
48
|
var handleButtonFocus = (0, _react.useCallback)(function () {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
}, [canCycleEdit]);
|
|
49
|
+
canEdit && setIsFocus(true);
|
|
50
|
+
}, [canEdit]);
|
|
63
51
|
var handleButtonBlur = (0, _react.useCallback)(function () {
|
|
64
52
|
setIsFocus(false);
|
|
65
53
|
}, []);
|
|
@@ -69,10 +57,9 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
69
57
|
clickCallback = _ref2.clickCallback,
|
|
70
58
|
text = _ref2.text;
|
|
71
59
|
return /*#__PURE__*/_react["default"].createElement("button", {
|
|
72
|
-
type: "button",
|
|
73
60
|
onFocus: handleButtonFocus,
|
|
74
61
|
onBlur: handleButtonBlur,
|
|
75
|
-
className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!
|
|
62
|
+
className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!canEdit && "base-info-date-cycle__button--disable"),
|
|
76
63
|
ref: btnRef,
|
|
77
64
|
onClick: clickCallback
|
|
78
65
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -91,13 +78,10 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
91
78
|
cycle: cycle,
|
|
92
79
|
setCycle: setCycle,
|
|
93
80
|
okrId: okrId,
|
|
94
|
-
canEdit:
|
|
81
|
+
canEdit: canEdit,
|
|
95
82
|
getCycleRange: true
|
|
96
83
|
}));
|
|
97
84
|
};
|
|
98
85
|
|
|
99
|
-
DateCycle.defaultProps = {
|
|
100
|
-
canEdit: false
|
|
101
|
-
};
|
|
102
86
|
var _default = DateCycle;
|
|
103
87
|
exports["default"] = _default;
|
|
@@ -21,10 +21,6 @@ var _popConfirm = _interopRequireDefault(require("../../../../../components-v1/p
|
|
|
21
21
|
|
|
22
22
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
23
23
|
|
|
24
|
-
var _context2 = require("../../../context");
|
|
25
|
-
|
|
26
|
-
var _helper = require("../../../helper");
|
|
27
|
-
|
|
28
24
|
require("./index.css");
|
|
29
25
|
|
|
30
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -64,10 +60,6 @@ var Principal = function Principal(_ref) {
|
|
|
64
60
|
selectUser = _useState2[0],
|
|
65
61
|
setSelectUser = _useState2[1];
|
|
66
62
|
|
|
67
|
-
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
68
|
-
okrInfo = _useContext.okrInfo,
|
|
69
|
-
approvalSetting = _useContext.approvalSetting;
|
|
70
|
-
|
|
71
63
|
var handleSelected = function handleSelected(_ref2) {
|
|
72
64
|
var _ref3 = _slicedToArray(_ref2, 1),
|
|
73
65
|
user = _ref3[0];
|
|
@@ -122,7 +114,7 @@ var Principal = function Principal(_ref) {
|
|
|
122
114
|
}, (0, _getLocale.getLocale)("Mod_Owner")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
115
|
className: "base-info-other-infos__principal-user",
|
|
124
116
|
ref: selectUserRef
|
|
125
|
-
}, canEdit
|
|
117
|
+
}, canEdit ? /*#__PURE__*/_react["default"].createElement(_popConfirm["default"], {
|
|
126
118
|
ref: popConfirmRef,
|
|
127
119
|
showArrow: false,
|
|
128
120
|
style: {
|