@titaui/pc 1.7.80 → 1.7.84
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/index.css +20 -1
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.js +14 -14
- package/lib/components/nav-top/components/menu/index.css +3 -2
- package/lib/components/nav-top/components/menu/index.js +17 -17
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +7 -0
- package/lib/components/nav-top/index.js +1 -12
- package/package.json +1 -1
|
@@ -30,6 +30,17 @@
|
|
|
30
30
|
height: 12px;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
.titaui-dynamic-share-to-dynamic__content-title {
|
|
34
|
+
width: 100%;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
text-overflow: ellipsis;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.titaui-dynamic-share-to-dynamic__content-title a, .titaui-dynamic-share-to-dynamic__content-title b {
|
|
41
|
+
color: #2879ff;
|
|
42
|
+
}
|
|
43
|
+
|
|
33
44
|
.titaui-dynamic-share-to-dynamic__share {
|
|
34
45
|
box-sizing: border-box;
|
|
35
46
|
height: 104px;
|
|
@@ -47,6 +58,14 @@
|
|
|
47
58
|
height: 80px;
|
|
48
59
|
border-radius: 8px;
|
|
49
60
|
margin-right: 12px;
|
|
61
|
+
background-color: #E9F1FF;
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
padding: 16px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.titaui-dynamic-share-to-dynamic__share-img > img {
|
|
67
|
+
width: 48px;
|
|
68
|
+
height: 48px;
|
|
50
69
|
}
|
|
51
70
|
|
|
52
71
|
.titaui-dynamic-share-to-dynamic__share-right {
|
|
@@ -56,7 +75,7 @@
|
|
|
56
75
|
.titaui-dynamic-share-to-dynamic__share-right-title {
|
|
57
76
|
display: block;
|
|
58
77
|
font-size: 16px;
|
|
59
|
-
font-weight:
|
|
78
|
+
font-weight: 700;
|
|
60
79
|
color: #141c28;
|
|
61
80
|
line-height: 24px;
|
|
62
81
|
margin-bottom: 8px;
|
|
@@ -55,7 +55,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
55
55
|
|
|
56
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; }
|
|
57
57
|
|
|
58
|
-
var prefix =
|
|
58
|
+
var prefix = 'titaui-dynamic-share-to-dynamic';
|
|
59
59
|
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
60
60
|
|
|
61
61
|
var DynamicShare = function DynamicShare(_ref) {
|
|
@@ -87,9 +87,9 @@ var DynamicShare = function DynamicShare(_ref) {
|
|
|
87
87
|
|
|
88
88
|
var renderDesc = (0, _react.useMemo)(function () {
|
|
89
89
|
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
90
|
-
className: prefix +
|
|
90
|
+
className: prefix + '__operate-desc'
|
|
91
91
|
}, "\u5206\u4EAB\u4E86\u4E00\u5802\u597D\u8BFE"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
92
|
-
className: prefix +
|
|
92
|
+
className: prefix + '-desc-operate-type',
|
|
93
93
|
style: {
|
|
94
94
|
background: feedTypeColor
|
|
95
95
|
}
|
|
@@ -114,11 +114,9 @@ var DynamicShare = function DynamicShare(_ref) {
|
|
|
114
114
|
});
|
|
115
115
|
}, [data, searchKeyWord]);
|
|
116
116
|
(0, _react.useEffect)(function () {
|
|
117
|
-
if (data.shareContent
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
setContent(htmlToText(JSON.parse(data.shareContent).content));
|
|
121
|
-
}
|
|
117
|
+
if (data.shareContent && typeof data.shareContent === 'string' && data.shareContent.substr(0, 1) === '{') {
|
|
118
|
+
setTitle(JSON.parse(data.shareContent).title);
|
|
119
|
+
setContent(htmlToText(JSON.parse(data.shareContent).content));
|
|
122
120
|
}
|
|
123
121
|
}, []);
|
|
124
122
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -130,21 +128,23 @@ var DynamicShare = function DynamicShare(_ref) {
|
|
|
130
128
|
showTopping: hasDynamicOpereateAuth,
|
|
131
129
|
user: data.publishUser
|
|
132
130
|
}, restProps)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
|
-
className: prefix +
|
|
131
|
+
className: prefix + '__content'
|
|
134
132
|
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("img", {
|
|
135
|
-
className: (0, _classnames["default"])(prefix +
|
|
133
|
+
className: (0, _classnames["default"])(prefix + '__content-quoto', prefix + '__content-quoto--left'),
|
|
136
134
|
src: _dynamicLeftQuoto["default"]
|
|
137
135
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
138
|
-
ref: contentRef
|
|
136
|
+
ref: contentRef,
|
|
137
|
+
className: "".concat(prefix, "__content-title")
|
|
139
138
|
}, /*#__PURE__*/_react["default"].createElement(_dangerousHtml["default"], {
|
|
140
139
|
htmlText: data.content
|
|
141
140
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
141
|
className: (0, _classnames["default"])("".concat(prefix, "__share")),
|
|
143
142
|
onClick: handleClick
|
|
144
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
145
|
-
src: _guanlian["default"],
|
|
143
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
146
144
|
className: (0, _classnames["default"])("".concat(prefix, "__share-img"))
|
|
147
|
-
}
|
|
145
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
146
|
+
src: _guanlian["default"]
|
|
147
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
148
148
|
className: (0, _classnames["default"])("".concat(prefix, "__share-right"))
|
|
149
149
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
150
150
|
className: (0, _classnames["default"])("".concat(prefix, "__share-right-title"))
|
|
@@ -121,13 +121,14 @@
|
|
|
121
121
|
display: block;
|
|
122
122
|
font-size: 14px;
|
|
123
123
|
color: #ffffff;
|
|
124
|
-
line-height:
|
|
124
|
+
line-height: 22px;
|
|
125
|
+
font-weight: 600;
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
.titaui-nav-top-menu__tips-box-content {
|
|
128
129
|
font-size: 12px;
|
|
129
130
|
color: #ffffff;
|
|
130
|
-
line-height:
|
|
131
|
+
line-height: 18px;
|
|
131
132
|
margin-top: 10px;
|
|
132
133
|
margin-left: 20px;
|
|
133
134
|
}
|
|
@@ -44,7 +44,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
44
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
45
|
|
|
46
46
|
var prefix = 'titaui-nav-top-menu';
|
|
47
|
-
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
48
47
|
var popupAlign = {
|
|
49
48
|
offset: [0, 5],
|
|
50
49
|
overflow: {
|
|
@@ -56,8 +55,7 @@ var popupAlign = {
|
|
|
56
55
|
|
|
57
56
|
var Menu = function Menu(_ref) {
|
|
58
57
|
var menus = _ref.menus,
|
|
59
|
-
activeMenuId = _ref.activeMenuId
|
|
60
|
-
isShowTips = _ref.isShowTips;
|
|
58
|
+
activeMenuId = _ref.activeMenuId;
|
|
61
59
|
|
|
62
60
|
var _useState = (0, _react.useState)(false),
|
|
63
61
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -69,11 +67,9 @@ var Menu = function Menu(_ref) {
|
|
|
69
67
|
isKnow = _useState4[0],
|
|
70
68
|
setIsKonw = _useState4[1];
|
|
71
69
|
|
|
72
|
-
var containerRef = (0, _react.useRef)();
|
|
73
|
-
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
var userId = BSGlobal.loginUserInfo.Id;
|
|
70
|
+
var containerRef = (0, _react.useRef)();
|
|
71
|
+
var apiPath = (0, _bsGlobal.getBSGlobal)("apiPath");
|
|
72
|
+
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
77
73
|
|
|
78
74
|
var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
|
|
79
75
|
setPopupVisible(visible);
|
|
@@ -102,6 +98,11 @@ var Menu = function Menu(_ref) {
|
|
|
102
98
|
},
|
|
103
99
|
targetOffset: [0, 0]
|
|
104
100
|
};
|
|
101
|
+
|
|
102
|
+
var handleClickToLearning = function handleClickToLearning() {
|
|
103
|
+
window.open("".concat(apiPath, "/").concat(userId, "/eLearningHome#/"), "_self");
|
|
104
|
+
};
|
|
105
|
+
|
|
105
106
|
(0, _react.useEffect)(function () {
|
|
106
107
|
var isKnow = localStorage.getItem("isKonwLearning".concat(userId));
|
|
107
108
|
|
|
@@ -129,7 +130,7 @@ var Menu = function Menu(_ref) {
|
|
|
129
130
|
return /*#__PURE__*/_react["default"].createElement(_rcOverflow["default"].Item, {
|
|
130
131
|
component: "span"
|
|
131
132
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
132
|
-
condition: menu.
|
|
133
|
+
condition: menu.title !== "Learning"
|
|
133
134
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
134
135
|
className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId == menu.id)),
|
|
135
136
|
href: "".concat(menu.href),
|
|
@@ -138,19 +139,18 @@ var Menu = function Menu(_ref) {
|
|
|
138
139
|
return handleTracker(menu);
|
|
139
140
|
}
|
|
140
141
|
}, menu.title)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
141
|
-
condition: menu.
|
|
142
|
+
condition: menu.title === "Learning"
|
|
142
143
|
}, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
143
|
-
popupVisible:
|
|
144
|
+
popupVisible: !isKnow,
|
|
144
145
|
popup: popup,
|
|
145
146
|
mask: false,
|
|
146
147
|
action: ['focus'],
|
|
147
148
|
popupAlign: popupAlign2
|
|
148
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
149
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
149
150
|
className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId == menu.id)),
|
|
150
|
-
href: "".concat(apiPath, "/").concat(userId, "/eLearningHome#/"),
|
|
151
|
-
target: "_self",
|
|
152
151
|
onClick: function onClick() {
|
|
153
|
-
|
|
152
|
+
handleTracker(menu);
|
|
153
|
+
handleClickToLearning();
|
|
154
154
|
}
|
|
155
155
|
}, menu.title)), /*#__PURE__*/_react["default"].createElement("img", {
|
|
156
156
|
src: _new["default"],
|
|
@@ -168,14 +168,14 @@ var Menu = function Menu(_ref) {
|
|
|
168
168
|
className: "".concat(prefix, "__hide-menus")
|
|
169
169
|
}, items.map(function (menu) {
|
|
170
170
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
171
|
-
condition: menu.
|
|
171
|
+
condition: menu.title !== "Learning"
|
|
172
172
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
173
173
|
className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId == menu.id)),
|
|
174
174
|
href: "".concat(menu.href),
|
|
175
175
|
key: menu.id,
|
|
176
176
|
target: "_self"
|
|
177
177
|
}, menu.title)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
178
|
-
condition: menu.
|
|
178
|
+
condition: menu.title === "Learning"
|
|
179
179
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
180
180
|
className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId == menu.id)),
|
|
181
181
|
href: "".concat(apiPath, "/").concat(userId, "/eLearningHome#/"),
|
|
@@ -63,6 +63,11 @@ var Inform = function Inform(props) {
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
if (objType === _constant.EObjType.Project) {
|
|
67
|
+
(0, _tools.openPage)("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/messages?messageType=2&tabAppId=1&tabAppType=1&isRead=2&messageSubNav=1"));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
66
71
|
if (objType === _constant.EObjType.Task) {
|
|
67
72
|
window.Talent.app.vent.trigger('global-pull-screen', objId, 'task');
|
|
68
73
|
return;
|
|
@@ -108,6 +113,8 @@ var Inform = function Inform(props) {
|
|
|
108
113
|
} else if (messageType === _constant.informType.todayJob) {
|
|
109
114
|
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#plan?tag_id=0&tag_type=0&filter=1"));
|
|
110
115
|
return;
|
|
116
|
+
} else if (objType === 0 && messageType === 93) {
|
|
117
|
+
(0, _tools.openPage)("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/messages?messageType=2&tabAppId=1&tabAppType=1&isRead=2&messageSubNav=1"));
|
|
111
118
|
} else if (objType === 0) {
|
|
112
119
|
var str = item.content.match(/\/\/.*?[\"|\']/gi);
|
|
113
120
|
if (!str) return;
|
|
@@ -72,11 +72,6 @@ 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
|
-
|
|
80
75
|
var ua = navigator.userAgent.toLowerCase();
|
|
81
76
|
var showWxInvite = (0, _bsGlobal.getTenantInfo)().mainCorpId && ua.indexOf("micromessenger") != -1;
|
|
82
77
|
var openWxInvite = (0, _react.useCallback)(function () {
|
|
@@ -135,11 +130,6 @@ var NavTop = function NavTop() {
|
|
|
135
130
|
(0, _react.useEffect)(function () {
|
|
136
131
|
handleHashChange();
|
|
137
132
|
window.addEventListener("hashchange", handleHashChange);
|
|
138
|
-
|
|
139
|
-
if (!localStorage.getItem("isKonwLearning")) {
|
|
140
|
-
setIsShowTips(false);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
133
|
return function () {
|
|
144
134
|
window.removeEventListener("hashchange", handleHashChange);
|
|
145
135
|
};
|
|
@@ -163,8 +153,7 @@ var NavTop = function NavTop() {
|
|
|
163
153
|
className: (0, _classnames["default"])("".concat(preCls, "__middle"))
|
|
164
154
|
}, /*#__PURE__*/_react["default"].createElement(_menu["default"], {
|
|
165
155
|
menus: menu,
|
|
166
|
-
activeMenuId: activeMenuId
|
|
167
|
-
isShowTips: isShowTips
|
|
156
|
+
activeMenuId: activeMenuId
|
|
168
157
|
})), showWxInvite && /*#__PURE__*/_react["default"].createElement("div", {
|
|
169
158
|
className: (0, _classnames["default"])("".concat(preCls, "__invite")),
|
|
170
159
|
onClick: openWxInvite
|