@titaui/pc 1.7.76 → 1.7.77
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/dynamic/dynamic-item/dynamic-share-to-dynamic/img/guanlian.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.css +0 -4
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.js +54 -7
- package/lib/components/dynamic/dynamic-item/index.js +13 -5
- package/lib/components/nav-top/components/menu/img/new.png +0 -0
- package/lib/components/nav-top/components/menu/index.css +88 -0
- package/lib/components/nav-top/components/menu/index.js +78 -8
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +64 -27
- package/lib/components/nav-top/index.js +12 -1
- package/lib/components/okrcase-library/okrcases-components/caseLibrary-cardList/okrcase-card.js +6 -1
- package/package.json +1 -1
- package/yarn-error.log +103 -0
|
Binary file
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.titaui-dynamic-share-to-dynamic__operate-desc {
|
|
2
2
|
margin-left: 4px;
|
|
3
3
|
font-size: 14px;
|
|
4
|
-
font-family: OPPOSans-R, OPPOSans;
|
|
5
4
|
font-weight: normal;
|
|
6
5
|
color: #89919f;
|
|
7
6
|
line-height: 22px;
|
|
@@ -14,7 +13,6 @@
|
|
|
14
13
|
box-sizing: border-box;
|
|
15
14
|
margin-top: 16px;
|
|
16
15
|
font-size: 14px;
|
|
17
|
-
font-family: OPPOSans-R, OPPOSans;
|
|
18
16
|
font-weight: normal;
|
|
19
17
|
color: #3f4755;
|
|
20
18
|
line-height: 24px;
|
|
@@ -55,7 +53,6 @@
|
|
|
55
53
|
.titaui-dynamic-share-to-dynamic__share-right-title {
|
|
56
54
|
display: block;
|
|
57
55
|
font-size: 16px;
|
|
58
|
-
font-family: OPPOSans-B, OPPOSans;
|
|
59
56
|
font-weight: normal;
|
|
60
57
|
color: #141c28;
|
|
61
58
|
line-height: 24px;
|
|
@@ -64,7 +61,6 @@
|
|
|
64
61
|
|
|
65
62
|
.titaui-dynamic-share-to-dynamic__share-right-content {
|
|
66
63
|
font-size: 14px;
|
|
67
|
-
font-family: OPPOSans-R, OPPOSans;
|
|
68
64
|
font-weight: normal;
|
|
69
65
|
color: #3f4755;
|
|
70
66
|
line-height: 24px;
|
|
@@ -23,7 +23,9 @@ var _util = require("../../util");
|
|
|
23
23
|
|
|
24
24
|
var _tools = require("../../../../utils/tools");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _bsGlobal = require("../../../../utils/bs-global");
|
|
27
|
+
|
|
28
|
+
var _guanlian = _interopRequireDefault(require("./img/guanlian.png"));
|
|
27
29
|
|
|
28
30
|
require("./index.css");
|
|
29
31
|
|
|
@@ -37,11 +39,24 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
37
39
|
|
|
38
40
|
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); }
|
|
39
41
|
|
|
42
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
+
|
|
44
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
45
|
+
|
|
46
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
47
|
+
|
|
48
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
49
|
+
|
|
50
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
+
|
|
52
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
+
|
|
40
54
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
41
55
|
|
|
42
56
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
43
57
|
|
|
44
58
|
var prefix = "titaui-dynamic-share-to-dynamic";
|
|
59
|
+
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
45
60
|
|
|
46
61
|
var DynamicShare = function DynamicShare(_ref) {
|
|
47
62
|
var data = _ref.data,
|
|
@@ -59,22 +74,53 @@ var DynamicShare = function DynamicShare(_ref) {
|
|
|
59
74
|
feedTypeColor = _getFeedTypeAndTypeCo.feedTypeColor;
|
|
60
75
|
|
|
61
76
|
var isPublisher = data.publishUser.userId === window.BSGlobal.loginUserInfo.Id;
|
|
77
|
+
|
|
78
|
+
var _useState = (0, _react.useState)(),
|
|
79
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
80
|
+
title = _useState2[0],
|
|
81
|
+
setTitle = _useState2[1];
|
|
82
|
+
|
|
83
|
+
var _useState3 = (0, _react.useState)(),
|
|
84
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
85
|
+
content = _useState4[0],
|
|
86
|
+
setContent = _useState4[1];
|
|
87
|
+
|
|
62
88
|
var renderDesc = (0, _react.useMemo)(function () {
|
|
63
89
|
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
64
90
|
className: prefix + "__operate-desc"
|
|
65
|
-
}, "\u5206\u4EAB\u4E86\u4E00\
|
|
91
|
+
}, "\u5206\u4EAB\u4E86\u4E00\u5802\u597D\u8BFE"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
92
|
className: prefix + "-desc-operate-type",
|
|
67
93
|
style: {
|
|
68
94
|
background: feedTypeColor
|
|
69
95
|
}
|
|
70
96
|
}));
|
|
71
97
|
}, []);
|
|
98
|
+
|
|
99
|
+
var htmlToText = function htmlToText(text) {
|
|
100
|
+
var div = document.createElement('div');
|
|
101
|
+
div.innerHTML = text;
|
|
102
|
+
text = div.innerText || div.textContent;
|
|
103
|
+
return text;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var handleClick = function handleClick() {
|
|
107
|
+
window.open("".concat(window.location.origin, "/").concat(userId, "/eLearningHome").concat(data.shareUrl));
|
|
108
|
+
};
|
|
109
|
+
|
|
72
110
|
(0, _react.useEffect)(function () {
|
|
73
111
|
(0, _tools.highLightWord)({
|
|
74
112
|
parentDom: contentRef.current,
|
|
75
113
|
keyWord: searchKeyWord
|
|
76
114
|
});
|
|
77
115
|
}, [data, searchKeyWord]);
|
|
116
|
+
(0, _react.useEffect)(function () {
|
|
117
|
+
if (data.shareContent !== null) {
|
|
118
|
+
if (data.shareContent.charAt(0) === "{") {
|
|
119
|
+
setTitle(JSON.parse(data.shareContent).title);
|
|
120
|
+
setContent(htmlToText(JSON.parse(data.shareContent).content));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}, []);
|
|
78
124
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
125
|
className: prefix
|
|
80
126
|
}, /*#__PURE__*/_react["default"].createElement(_header["default"], _extends({
|
|
@@ -91,19 +137,20 @@ var DynamicShare = function DynamicShare(_ref) {
|
|
|
91
137
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
138
|
ref: contentRef
|
|
93
139
|
}, /*#__PURE__*/_react["default"].createElement(_dangerousHtml["default"], {
|
|
94
|
-
htmlText:
|
|
140
|
+
htmlText: data.content
|
|
95
141
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
|
-
className: (0, _classnames["default"])("".concat(prefix, "__share"))
|
|
142
|
+
className: (0, _classnames["default"])("".concat(prefix, "__share")),
|
|
143
|
+
onClick: handleClick
|
|
97
144
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
98
|
-
src:
|
|
145
|
+
src: _guanlian["default"],
|
|
99
146
|
className: (0, _classnames["default"])("".concat(prefix, "__share-img"))
|
|
100
147
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
101
148
|
className: (0, _classnames["default"])("".concat(prefix, "__share-right"))
|
|
102
149
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
103
150
|
className: (0, _classnames["default"])("".concat(prefix, "__share-right-title"))
|
|
104
|
-
},
|
|
151
|
+
}, title), /*#__PURE__*/_react["default"].createElement("span", {
|
|
105
152
|
className: (0, _classnames["default"])("".concat(prefix, "__share-right-content"))
|
|
106
|
-
},
|
|
153
|
+
}, content))));
|
|
107
154
|
};
|
|
108
155
|
|
|
109
156
|
var _default = DynamicShare;
|
|
@@ -47,6 +47,8 @@ var _dynamicReward = _interopRequireDefault(require("./dynamic-reward"));
|
|
|
47
47
|
|
|
48
48
|
var _dynamicMilestone = _interopRequireDefault(require("./dynamic-milestone"));
|
|
49
49
|
|
|
50
|
+
var _dynamicShareToDynamic = _interopRequireDefault(require("./dynamic-share-to-dynamic"));
|
|
51
|
+
|
|
50
52
|
var _bsGlobal = require("../../../utils/bs-global");
|
|
51
53
|
|
|
52
54
|
var _avatar = _interopRequireDefault(require("../../avatar"));
|
|
@@ -226,11 +228,17 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
226
228
|
});
|
|
227
229
|
|
|
228
230
|
case _constant.EFeedType.Share:
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
if (data.shareType === 0) {
|
|
232
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicShare["default"], {
|
|
233
|
+
data: data,
|
|
234
|
+
onDeleteFeed: onDeleteFeed,
|
|
235
|
+
hasDynamicOpereateAuth: hasDynamicOpereateAuth
|
|
236
|
+
});
|
|
237
|
+
} else {
|
|
238
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicShareToDynamic["default"], {
|
|
239
|
+
data: data
|
|
240
|
+
});
|
|
241
|
+
}
|
|
234
242
|
|
|
235
243
|
case _constant.EFeedType.Assessment:
|
|
236
244
|
return /*#__PURE__*/_react["default"].createElement(_dynamicAssessment["default"], {
|
|
Binary file
|
|
@@ -92,3 +92,91 @@
|
|
|
92
92
|
max-width: 100%;
|
|
93
93
|
position: relative;
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
.titaui-nav-top-menu__tips {
|
|
97
|
+
position: relative;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.titaui-nav-top-menu__tips-new {
|
|
101
|
+
width: 36px;
|
|
102
|
+
height: 26px;
|
|
103
|
+
position: absolute;
|
|
104
|
+
top: 6px;
|
|
105
|
+
right: -8px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.titaui-nav-top-menu__tips-box {
|
|
109
|
+
width: 308px;
|
|
110
|
+
height: 142px;
|
|
111
|
+
box-sizing: border-box;
|
|
112
|
+
padding: 16px;
|
|
113
|
+
background: #2879ff;
|
|
114
|
+
box-shadow: 0px -4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
115
|
+
border: 1px solid #eff0f1;
|
|
116
|
+
border-radius: 12px;
|
|
117
|
+
z-index: 99;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.titaui-nav-top-menu__tips-box-title {
|
|
121
|
+
display: block;
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
color: #ffffff;
|
|
124
|
+
line-height: 18px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.titaui-nav-top-menu__tips-box-content {
|
|
128
|
+
font-size: 12px;
|
|
129
|
+
color: #ffffff;
|
|
130
|
+
line-height: 22px;
|
|
131
|
+
margin-top: 10px;
|
|
132
|
+
margin-left: 20px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.titaui-nav-top-menu__tips-box-ok {
|
|
136
|
+
width: 64px;
|
|
137
|
+
height: 28px;
|
|
138
|
+
margin-top: 8px;
|
|
139
|
+
margin-left: 210px;
|
|
140
|
+
background: #ffffff;
|
|
141
|
+
box-shadow: 0px -4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
142
|
+
border-radius: 14px;
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
padding: 3px 18px;
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
color: #2879FF;
|
|
147
|
+
line-height: 22px;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.titaui-nav-top-menu__tips-triangle {
|
|
152
|
+
position: absolute;
|
|
153
|
+
top: -4px;
|
|
154
|
+
left: 50%;
|
|
155
|
+
margin-left: -4px;
|
|
156
|
+
width: 0;
|
|
157
|
+
height: 0;
|
|
158
|
+
border-left: 5px solid transparent;
|
|
159
|
+
border-right: 5px solid transparent;
|
|
160
|
+
border-bottom: 5px solid #fff;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.titaui-nav-top-menu__tips-triangle::after {
|
|
164
|
+
content: "";
|
|
165
|
+
width: 0;
|
|
166
|
+
height: 0;
|
|
167
|
+
position: absolute;
|
|
168
|
+
left: -4px;
|
|
169
|
+
top: 2px;
|
|
170
|
+
border-left: solid 4px transparent;
|
|
171
|
+
border-right: solid 4px transparent;
|
|
172
|
+
border-bottom: solid 4px #2879ff;
|
|
173
|
+
z-index: 99;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.titaui-nav-top-menu__tips-hide {
|
|
177
|
+
display: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.titaui-nav-top-menu .rc-overflow-item {
|
|
181
|
+
position: relative;
|
|
182
|
+
}
|
|
@@ -15,6 +15,10 @@ var _popup = _interopRequireDefault(require("../../../popup"));
|
|
|
15
15
|
|
|
16
16
|
var _rcOverflow = _interopRequireDefault(require("rc-overflow"));
|
|
17
17
|
|
|
18
|
+
var _conditionRender = _interopRequireDefault(require("../../../../components/condition-render"));
|
|
19
|
+
|
|
20
|
+
var _new = _interopRequireDefault(require("./img/new.png"));
|
|
21
|
+
|
|
18
22
|
require("./index.css");
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -37,7 +41,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
37
41
|
|
|
38
42
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
43
|
|
|
40
|
-
var prefix =
|
|
44
|
+
var prefix = 'titaui-nav-top-menu';
|
|
41
45
|
var popupAlign = {
|
|
42
46
|
offset: [0, 5],
|
|
43
47
|
overflow: {
|
|
@@ -49,16 +53,24 @@ var popupAlign = {
|
|
|
49
53
|
|
|
50
54
|
var Menu = function Menu(_ref) {
|
|
51
55
|
var menus = _ref.menus,
|
|
52
|
-
activeMenuId = _ref.activeMenuId
|
|
56
|
+
activeMenuId = _ref.activeMenuId,
|
|
57
|
+
isShowTips = _ref.isShowTips;
|
|
53
58
|
|
|
54
59
|
var _useState = (0, _react.useState)(false),
|
|
55
60
|
_useState2 = _slicedToArray(_useState, 2),
|
|
56
61
|
popupVisible = _useState2[0],
|
|
57
62
|
setPopupVisible = _useState2[1];
|
|
58
63
|
|
|
64
|
+
var _useState3 = (0, _react.useState)(false),
|
|
65
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
|
+
isKnow = _useState4[0],
|
|
67
|
+
setIsKonw = _useState4[1];
|
|
68
|
+
|
|
59
69
|
var containerRef = (0, _react.useRef)(); // @ts-ignore
|
|
60
70
|
|
|
61
|
-
var apiPath = BSGlobal.apiPath;
|
|
71
|
+
var apiPath = BSGlobal.apiPath; // @ts-ignore
|
|
72
|
+
|
|
73
|
+
var userId = BSGlobal.loginUserInfo.Id;
|
|
62
74
|
|
|
63
75
|
var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
|
|
64
76
|
setPopupVisible(visible);
|
|
@@ -74,9 +86,40 @@ var Menu = function Menu(_ref) {
|
|
|
74
86
|
});
|
|
75
87
|
};
|
|
76
88
|
|
|
89
|
+
var handleClick = function handleClick() {
|
|
90
|
+
setIsKonw(true);
|
|
91
|
+
localStorage.setItem("isKonwLearning", "true");
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var popupAlign2 = {
|
|
95
|
+
offset: [104, -5],
|
|
96
|
+
overflow: {
|
|
97
|
+
adjustX: true,
|
|
98
|
+
adjustY: true
|
|
99
|
+
},
|
|
100
|
+
targetOffset: [0, 0]
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
|
+
className: "".concat(prefix, "__tips")
|
|
105
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
|
+
className: (0, _classnames["default"])("".concat(prefix, "__tips-box"), _defineProperty({}, "".concat(prefix, "__tips-hide"), isKnow))
|
|
107
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
108
|
+
className: "".concat(prefix, "__tips-box-title")
|
|
109
|
+
}, "\uD83C\uDF89 Tita Learning \u4E0A\u7EBF\u5566"), /*#__PURE__*/_react["default"].createElement("p", {
|
|
110
|
+
className: "".concat(prefix, "__tips-box-content")
|
|
111
|
+
}, "OKR \u5B66\u4E60\u8D44\u6599\uFF0COKR \u63A8\u8FDB\u65B9\u6CD5\uFF0COKR\u6559\u7EC3\u5728\u7EBF", /*#__PURE__*/_react["default"].createElement("br", null), "\u6307\u5BFC\uFF0C\u901A\u901A\u90FD\u5728\u8FD9\u91CC\uFF01\u5FEB\u6765\u770B\u770B\u5427\uFF01"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: "".concat(prefix, "__tips-box-ok"),
|
|
113
|
+
onClick: handleClick
|
|
114
|
+
}, "\u597D\u54D2")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
115
|
+
className: (0, _classnames["default"])("".concat(prefix, "__tips-triangle"), _defineProperty({}, "".concat(prefix, "__tips-hide"), isKnow))
|
|
116
|
+
}));
|
|
117
|
+
|
|
77
118
|
var renderRawItem = function renderRawItem(menu) {
|
|
78
119
|
return /*#__PURE__*/_react["default"].createElement(_rcOverflow["default"].Item, {
|
|
79
120
|
component: "span"
|
|
121
|
+
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
122
|
+
condition: menu.id !== 44312
|
|
80
123
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
81
124
|
className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId == menu.id)),
|
|
82
125
|
href: "".concat(menu.href),
|
|
@@ -84,7 +127,25 @@ var Menu = function Menu(_ref) {
|
|
|
84
127
|
onClick: function onClick() {
|
|
85
128
|
return handleTracker(menu);
|
|
86
129
|
}
|
|
87
|
-
}, menu.title))
|
|
130
|
+
}, menu.title)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
131
|
+
condition: menu.id === 44312
|
|
132
|
+
}, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
133
|
+
popupVisible: isShowTips,
|
|
134
|
+
popup: popup,
|
|
135
|
+
mask: false,
|
|
136
|
+
action: ['focus'],
|
|
137
|
+
popupAlign: popupAlign2
|
|
138
|
+
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
139
|
+
className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId == menu.id)),
|
|
140
|
+
href: "".concat(apiPath, "/").concat(userId, "/eLearningHome#/"),
|
|
141
|
+
target: "_self",
|
|
142
|
+
onClick: function onClick() {
|
|
143
|
+
return handleTracker(menu);
|
|
144
|
+
}
|
|
145
|
+
}, menu.title)), /*#__PURE__*/_react["default"].createElement("img", {
|
|
146
|
+
src: _new["default"],
|
|
147
|
+
className: "".concat(prefix, "__tips-new")
|
|
148
|
+
})));
|
|
88
149
|
};
|
|
89
150
|
|
|
90
151
|
var renderRest = function renderRest(items) {
|
|
@@ -96,12 +157,21 @@ var Menu = function Menu(_ref) {
|
|
|
96
157
|
var popContent = /*#__PURE__*/_react["default"].createElement("div", {
|
|
97
158
|
className: "".concat(prefix, "__hide-menus")
|
|
98
159
|
}, items.map(function (menu) {
|
|
99
|
-
return /*#__PURE__*/_react["default"].createElement("
|
|
160
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
161
|
+
condition: menu.id !== 44312
|
|
162
|
+
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
100
163
|
className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId == menu.id)),
|
|
101
164
|
href: "".concat(menu.href),
|
|
102
165
|
key: menu.id,
|
|
103
166
|
target: "_self"
|
|
104
|
-
}, menu.title)
|
|
167
|
+
}, menu.title)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
168
|
+
condition: menu.id === 44312
|
|
169
|
+
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
170
|
+
className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId == menu.id)),
|
|
171
|
+
href: "".concat(apiPath, "/").concat(userId, "/eLearningHome#/"),
|
|
172
|
+
key: menu.id,
|
|
173
|
+
target: "_self"
|
|
174
|
+
}, menu.title)));
|
|
105
175
|
}));
|
|
106
176
|
|
|
107
177
|
return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
@@ -111,7 +181,7 @@ var Menu = function Menu(_ref) {
|
|
|
111
181
|
popupPlacement: "bottomLeft",
|
|
112
182
|
popupAlign: popupAlign
|
|
113
183
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
114
|
-
className: (0, _classnames["default"])(
|
|
184
|
+
className: (0, _classnames["default"])('tu-icon-diot', "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
|
|
115
185
|
}));
|
|
116
186
|
};
|
|
117
187
|
|
|
@@ -122,7 +192,7 @@ var Menu = function Menu(_ref) {
|
|
|
122
192
|
data: menus,
|
|
123
193
|
renderRawItem: renderRawItem,
|
|
124
194
|
renderRest: renderRest,
|
|
125
|
-
maxCount:
|
|
195
|
+
maxCount: 'responsive'
|
|
126
196
|
}));
|
|
127
197
|
};
|
|
128
198
|
|
|
@@ -76,12 +76,30 @@ var Inform = function Inform(props) {
|
|
|
76
76
|
if (messageType == 135) {
|
|
77
77
|
var redisKey = item.content.match(/redisKey=(\S*?)"/)[1]; // @ts-ignore
|
|
78
78
|
|
|
79
|
-
Talent.app.vent.trigger(
|
|
79
|
+
Talent.app.vent.trigger("open-weekly-report-modal", redisKey);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (messageType === 99) {
|
|
84
|
+
var _options = {
|
|
85
|
+
width: 680,
|
|
86
|
+
showScroll: false,
|
|
87
|
+
type: 'message',
|
|
88
|
+
// 推屏类型
|
|
89
|
+
data: {
|
|
90
|
+
type: 'okrDashBoard',
|
|
91
|
+
// 消息类型
|
|
92
|
+
objId: item.messageId,
|
|
93
|
+
objType: messageType
|
|
94
|
+
}
|
|
95
|
+
}; // @ts-ignore
|
|
96
|
+
|
|
97
|
+
Talent.app.vent.trigger('openReactScreenPush', _options);
|
|
80
98
|
return;
|
|
81
99
|
} // 处理合并的消息
|
|
82
100
|
|
|
83
101
|
|
|
84
|
-
var isMessageMerging =
|
|
102
|
+
var isMessageMerging = messageType == 13018 || messageType == 30362 || messageType == 131;
|
|
85
103
|
|
|
86
104
|
if (!isMessageMerging) {
|
|
87
105
|
if (messageType === _constant.informType.details) {
|
|
@@ -93,11 +111,11 @@ var Inform = function Inform(props) {
|
|
|
93
111
|
} else if (objType === 0) {
|
|
94
112
|
var str = item.content.match(/\/\/.*?[\"|\']/gi);
|
|
95
113
|
if (!str) return;
|
|
96
|
-
str = str.join(
|
|
114
|
+
str = str.join("");
|
|
97
115
|
var url = str.slice(0, str.length - 1);
|
|
98
116
|
|
|
99
117
|
if (url) {
|
|
100
|
-
if (item.content.indexOf(
|
|
118
|
+
if (item.content.indexOf("点击此处下载") !== -1) {
|
|
101
119
|
window.open(url, '_self');
|
|
102
120
|
}
|
|
103
121
|
|
|
@@ -120,7 +138,7 @@ var Inform = function Inform(props) {
|
|
|
120
138
|
var _str = item.content.match(/\/\/.*?[\"|\']/gi);
|
|
121
139
|
|
|
122
140
|
if (!_str) return;
|
|
123
|
-
_str = _str.join(
|
|
141
|
+
_str = _str.join("");
|
|
124
142
|
|
|
125
143
|
var _url2 = _str.slice(0, _str.length - 1);
|
|
126
144
|
|
|
@@ -130,7 +148,7 @@ var Inform = function Inform(props) {
|
|
|
130
148
|
var _str2 = item.content.match(/https:.*?[\"|\']/gi);
|
|
131
149
|
|
|
132
150
|
if (!_str2) return;
|
|
133
|
-
_str2 = _str2.join(
|
|
151
|
+
_str2 = _str2.join("");
|
|
134
152
|
|
|
135
153
|
var _url3 = _str2.slice(0, _str2.length - 1);
|
|
136
154
|
|
|
@@ -153,37 +171,56 @@ var Inform = function Inform(props) {
|
|
|
153
171
|
}
|
|
154
172
|
}
|
|
155
173
|
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
var content = domRef.current.textContent;
|
|
174
|
+
var type = 'eReport'; // E-周报提醒消息合并
|
|
159
175
|
|
|
160
176
|
if (messageType == '83') {
|
|
161
177
|
// 项目,目标进展提醒消息合并
|
|
162
|
-
|
|
178
|
+
type = 'objective';
|
|
163
179
|
} else if (Number(messageType) > 93 && Number(messageType) <= 100) {
|
|
164
180
|
// OKR 仪表盘消息提醒
|
|
165
|
-
|
|
166
|
-
} else if (messageType == 131
|
|
167
|
-
|
|
168
|
-
content = item.content;
|
|
181
|
+
type = 'okrDashBoard';
|
|
182
|
+
} else if (messageType == 131) {
|
|
183
|
+
type = 'performance';
|
|
169
184
|
}
|
|
170
185
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
var options = {
|
|
187
|
+
width: 680,
|
|
188
|
+
showScroll: true,
|
|
189
|
+
type: 'message',
|
|
190
|
+
// 推屏类型
|
|
191
|
+
data: {
|
|
192
|
+
type: type,
|
|
193
|
+
// 消息类型
|
|
194
|
+
objId: item.messageId,
|
|
195
|
+
objType: messageType,
|
|
196
|
+
startDate: '',
|
|
197
|
+
endDate: ''
|
|
180
198
|
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
if (messageType == 83) {
|
|
202
|
+
options.data.objType = messageType;
|
|
203
|
+
options.data.startDate = item.createTime;
|
|
204
|
+
} else if (messageType > 93 && messageType <= 100) {
|
|
205
|
+
options.data.startDate = item.createTime;
|
|
206
|
+
} else if (messageType == 131) {
|
|
207
|
+
options.data.objType = item.objId.split('_')[0];
|
|
208
|
+
options.data.startDate = item.objId.split('_')[1];
|
|
209
|
+
options.data.endDate = item.objId.split('_')[2];
|
|
210
|
+
} else {
|
|
211
|
+
var regex = /\((.+?)\)/g,
|
|
212
|
+
content = domRef.current.textContent;
|
|
213
|
+
var date = [];
|
|
214
|
+
date = content.match(regex);
|
|
215
|
+
options.data.startDate = date[0].slice(1, date[0].length - 1).split('-')[0]; // @ts-ignore
|
|
216
|
+
|
|
217
|
+
options.data.endDate = date[0].slice(1, date[0].length - 1).split('-')[1];
|
|
218
|
+
} // @ts-ignore
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
Talent.app.vent.trigger('openReactScreenPush', options);
|
|
184
222
|
};
|
|
185
223
|
|
|
186
|
-
;
|
|
187
224
|
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
188
225
|
className: (0, _classnames["default"])("".concat(preCls, "__item"), _defineProperty({}, "".concat(preCls, "__item--scroll"), informs.length >= 4)),
|
|
189
226
|
key: item.messageId,
|
|
@@ -72,6 +72,11 @@ var NavTop = function NavTop() {
|
|
|
72
72
|
activeMenuId = _useState4[0],
|
|
73
73
|
setActiveMenuId = _useState4[1];
|
|
74
74
|
|
|
75
|
+
var _useState5 = (0, _react.useState)(true),
|
|
76
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
77
|
+
isShowTips = _useState6[0],
|
|
78
|
+
setIsShowTips = _useState6[1];
|
|
79
|
+
|
|
75
80
|
var ua = navigator.userAgent.toLowerCase();
|
|
76
81
|
var showWxInvite = (0, _bsGlobal.getTenantInfo)().mainCorpId && ua.indexOf("micromessenger") != -1;
|
|
77
82
|
var openWxInvite = (0, _react.useCallback)(function () {
|
|
@@ -130,6 +135,11 @@ var NavTop = function NavTop() {
|
|
|
130
135
|
(0, _react.useEffect)(function () {
|
|
131
136
|
handleHashChange();
|
|
132
137
|
window.addEventListener("hashchange", handleHashChange);
|
|
138
|
+
|
|
139
|
+
if (!localStorage.getItem("isKonwLearning")) {
|
|
140
|
+
setIsShowTips(false);
|
|
141
|
+
}
|
|
142
|
+
|
|
133
143
|
return function () {
|
|
134
144
|
window.removeEventListener("hashchange", handleHashChange);
|
|
135
145
|
};
|
|
@@ -153,7 +163,8 @@ var NavTop = function NavTop() {
|
|
|
153
163
|
className: (0, _classnames["default"])("".concat(preCls, "__middle"))
|
|
154
164
|
}, /*#__PURE__*/_react["default"].createElement(_menu["default"], {
|
|
155
165
|
menus: menu,
|
|
156
|
-
activeMenuId: activeMenuId
|
|
166
|
+
activeMenuId: activeMenuId,
|
|
167
|
+
isShowTips: isShowTips
|
|
157
168
|
})), showWxInvite && /*#__PURE__*/_react["default"].createElement("div", {
|
|
158
169
|
className: (0, _classnames["default"])("".concat(preCls, "__invite")),
|
|
159
170
|
onClick: openWxInvite
|
package/lib/components/okrcase-library/okrcases-components/caseLibrary-cardList/okrcase-card.js
CHANGED
|
@@ -147,7 +147,12 @@ var OkrCaseCard = function OkrCaseCard(props) {
|
|
|
147
147
|
}, " ", item.name));
|
|
148
148
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
149
149
|
className: "okr-cases-library__cardList__card__footer"
|
|
150
|
-
}, /*#__PURE__*/_react["default"].createElement("div", null, usedNumber, "\u6B21\u5957\u7528"), /*#__PURE__*/_react["default"].createElement("div",
|
|
150
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, usedNumber, "\u6B21\u5957\u7528"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
151
|
+
style: {
|
|
152
|
+
display: 'flex',
|
|
153
|
+
alignItems: 'center'
|
|
154
|
+
}
|
|
155
|
+
}, hasLike ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
151
156
|
src: require("../../image/thumb-up.svg"),
|
|
152
157
|
onClick: function onClick() {
|
|
153
158
|
return handleLikeClick(hasLike, id);
|
package/package.json
CHANGED
package/yarn-error.log
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Arguments:
|
|
2
|
+
/usr/local/bin/node /usr/local/bin/yarn
|
|
3
|
+
|
|
4
|
+
PATH:
|
|
5
|
+
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/opt/homebrew/bin:/opt/homebrew/sbin
|
|
6
|
+
|
|
7
|
+
Yarn version:
|
|
8
|
+
1.22.10
|
|
9
|
+
|
|
10
|
+
Node version:
|
|
11
|
+
12.22.1
|
|
12
|
+
|
|
13
|
+
Platform:
|
|
14
|
+
darwin x64
|
|
15
|
+
|
|
16
|
+
Trace:
|
|
17
|
+
SyntaxError: /Users/yang/tita/titaui-pc/package.json: Unexpected token < in JSON at position 26
|
|
18
|
+
at JSON.parse (<anonymous>)
|
|
19
|
+
at /usr/local/lib/node_modules/yarn/lib/cli.js:1625:59
|
|
20
|
+
at Generator.next (<anonymous>)
|
|
21
|
+
at step (/usr/local/lib/node_modules/yarn/lib/cli.js:310:30)
|
|
22
|
+
at /usr/local/lib/node_modules/yarn/lib/cli.js:321:13
|
|
23
|
+
|
|
24
|
+
npm manifest:
|
|
25
|
+
{
|
|
26
|
+
"name": "@titaui/pc",
|
|
27
|
+
<<<<<<< HEAD
|
|
28
|
+
"version": "1.2.22",
|
|
29
|
+
=======
|
|
30
|
+
"version": "1.2.13",
|
|
31
|
+
>>>>>>> master
|
|
32
|
+
"nameCN": "",
|
|
33
|
+
"description": "",
|
|
34
|
+
"main": "src/index.js",
|
|
35
|
+
"scripts": {
|
|
36
|
+
"storybook": "start-storybook -p 6006 --no-dll",
|
|
37
|
+
"start": "dev_server=on webpack-dev-server --disableHostCheck=true --progress --colors --config webpack-stories.config.js",
|
|
38
|
+
"build-storybook": "build-storybook --docs --no-dll",
|
|
39
|
+
"build:es": "babel src -d es --ignore **/__tests__",
|
|
40
|
+
"build:lib": "cross-env OUTPUT_MODULE=commonjs babel src -d lib --ignore **/__tests__",
|
|
41
|
+
"build:umd": "webpack --config ./.scripts/webpack.umd.js",
|
|
42
|
+
"build": "npm run build:lib && npm run build:es && npm run build:umd"
|
|
43
|
+
},
|
|
44
|
+
"author": "",
|
|
45
|
+
"license": "ISC",
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"del": "^6.0.0",
|
|
48
|
+
"gulp": "^3.x",
|
|
49
|
+
"gulp-autoprefixer": "^7.0.1",
|
|
50
|
+
"gulp-babel": "^8.0.0",
|
|
51
|
+
"gulp-concat": "^2.6.1",
|
|
52
|
+
"gulp-cssbeautify": "^3.0.0",
|
|
53
|
+
"gulp-cssnano": "^2.1.3",
|
|
54
|
+
"gulp-filesize": "0.0.6",
|
|
55
|
+
"gulp-postcss": "^9.0.0",
|
|
56
|
+
"gulp-rename": "^2.0.0",
|
|
57
|
+
"gulp-replace": "^1.0.0",
|
|
58
|
+
"gulp-sass": "^4.1.0",
|
|
59
|
+
"gulp-sourcemaps": "^2.6.5",
|
|
60
|
+
"sass-resources-loader": "^2.2.1"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@titaui/dagre": "^0.8.8-pre",
|
|
64
|
+
"@titaui/rc-tree2": "^4.1.15",
|
|
65
|
+
"@titaui/rc-trigger": "^5.2.5",
|
|
66
|
+
"@titaui/react-flow-renderer": "9.5.4",
|
|
67
|
+
"@titaui/toast": "^1.0.0",
|
|
68
|
+
"axios": "^0.21.1",
|
|
69
|
+
"classnames": "^2.2.6",
|
|
70
|
+
"clone-deep": "^4.0.1",
|
|
71
|
+
"d3-cloud": "^1.2.5",
|
|
72
|
+
"dayjs": "^1.10.4",
|
|
73
|
+
"html2canvas": "^1.0.0-rc.7",
|
|
74
|
+
"moment": "^2.29.1",
|
|
75
|
+
"qs": "^6.10.1",
|
|
76
|
+
"rc-checkbox": "^2.3.2",
|
|
77
|
+
"rc-dialog": "8.5.2",
|
|
78
|
+
"rc-drawer": "^4.3.1",
|
|
79
|
+
"rc-input-number": "^5.0.0",
|
|
80
|
+
"rc-pagination": "^3.1.6",
|
|
81
|
+
"rc-queue-anim": "1.4.1",
|
|
82
|
+
"rc-select": "^12.1.7",
|
|
83
|
+
"rc-switch": "^3.2.2",
|
|
84
|
+
"rc-table": "^7.13.2",
|
|
85
|
+
"rc-tabs": "^11.7.3",
|
|
86
|
+
"rc-tooltip": "^5.1.1",
|
|
87
|
+
"rc-tree": "^4.1.5",
|
|
88
|
+
"rc-trigger": "^5.2.3",
|
|
89
|
+
"rc-upload": "^4.2.0-alpha.0",
|
|
90
|
+
"rc-util": "^5.13.1",
|
|
91
|
+
"react-collapse": "^5.1.0",
|
|
92
|
+
"react-perfect-scrollbar": "^1.5.2",
|
|
93
|
+
"url-parse": "^1.5.1",
|
|
94
|
+
"uuid": "^3.1.0",
|
|
95
|
+
"wordcloud": "^1.2.2"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
yarn manifest:
|
|
100
|
+
No manifest
|
|
101
|
+
|
|
102
|
+
Lockfile:
|
|
103
|
+
No lockfile
|