@titaui/pc 1.9.43 → 1.9.44
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/communication/ConvertUserName.js +2 -3
- package/lib/components/stop-taking-modal/index.css +6 -1
- package/lib/components/stop-taking-modal/index.js +2 -1
- package/lib/utils/open-data.js +11 -9
- package/package.json +1 -1
- package/src/components/communication/ConvertUserName.tsx +2 -3
- package/src/components/stop-taking-modal/index.scss +5 -1
- package/src/components/stop-taking-modal/index.tsx +1 -1
- package/src/utils/open-data.js +21 -11
|
@@ -62,9 +62,8 @@ var ConvertUserName = /*#__PURE__*/function (_PureComponent) {
|
|
|
62
62
|
|
|
63
63
|
if (userId) {
|
|
64
64
|
// const iframeBoxUrl = `${getBSGlobal('apiPath')}/u/${getUserInfo().Id}/Home#`;
|
|
65
|
-
return /*#__PURE__*/_react["default"].createElement("
|
|
66
|
-
className: (0, _classnames["default"])(className, "titaui-communication__communication-content__user-link")
|
|
67
|
-
target: "_blank" // href={`${iframeBoxUrl}${encodeURIComponent("widget/italent?iTalentFrameType=iframe&iTalentFrame=&iTalentFrame=" + encodeURIComponent(getBSGlobal('titaHost') + "/" + getUserInfo().Id + "/PageBuilderForEdit#/view?to_user_id=" + userId))}`}
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
|
+
className: (0, _classnames["default"])(className, "titaui-communication__communication-content__user-link") // href={`${iframeBoxUrl}${encodeURIComponent("widget/italent?iTalentFrameType=iframe&iTalentFrame=&iTalentFrame=" + encodeURIComponent(getBSGlobal('titaHost') + "/" + getUserInfo().Id + "/PageBuilderForEdit#/view?to_user_id=" + userId))}`}
|
|
68
67
|
|
|
69
68
|
}, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
70
69
|
name: userName,
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
width: 17px;
|
|
25
25
|
height: 17px;
|
|
26
26
|
font-size: 17px;
|
|
27
|
-
color: #
|
|
27
|
+
color: #fff;
|
|
28
28
|
position: absolute;
|
|
29
29
|
right: 3px;
|
|
30
30
|
top: -68px;
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
.tt-stop-taking-model__head {
|
|
35
35
|
margin-top: 18px;
|
|
36
36
|
font-size: 24px;
|
|
37
|
+
font-weight: 600;
|
|
37
38
|
color: #141C28;
|
|
38
39
|
line-height: 34px;
|
|
39
40
|
letter-spacing: 2px;
|
|
@@ -70,3 +71,7 @@
|
|
|
70
71
|
justify-content: center;
|
|
71
72
|
cursor: pointer;
|
|
72
73
|
}
|
|
74
|
+
|
|
75
|
+
.tt-stop-taking-model__action:hover {
|
|
76
|
+
background: #5C8EFF;
|
|
77
|
+
}
|
|
@@ -76,7 +76,8 @@ function StopTakingModel() {
|
|
|
76
76
|
className: "".concat(preCls, "__content-line3")
|
|
77
77
|
}, "\u5347\u7EA7\u65F6\u95F4\uFF1A", /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
78
|
style: {
|
|
79
|
-
color: '#2879ff'
|
|
79
|
+
color: '#2879ff',
|
|
80
|
+
fontWeight: 500
|
|
80
81
|
}
|
|
81
82
|
}, "1.21 (\u5468\u4E94) 23:00 - 1.22 (\u5468\u516D) 23:59"))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
83
|
className: "".concat(preCls, "__action"),
|
package/lib/utils/open-data.js
CHANGED
|
@@ -156,29 +156,31 @@ exports.isPlatform = isPlatform;
|
|
|
156
156
|
var parseTag = function parseTag(str) {
|
|
157
157
|
var source = window.BSGlobal.tenantInfo.Source,
|
|
158
158
|
ua = navigator.userAgent.toLowerCase();
|
|
159
|
-
if (source != 860 && ua.indexOf('micromessenger') == -1) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
160
|
-
dangerouslySetInnerHTML: {
|
|
161
|
-
'__html': str
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
159
|
var reg = /<\w+[\w\W]*?(userId|departmentId)=["'](\S+?)["'][\w\W]*?>@([\w\W]*?)<\/\w+>/g;
|
|
165
160
|
var strReg = /<\w+[\w\s"'\/=\:\.]*?(?:userId|departmentId)=["']\S+?["'][\w\s"'\/=\:\.]*?>[\w\W]*?<\/\w+?>/;
|
|
166
161
|
var openDatas = [];
|
|
167
|
-
var matchStr = reg.exec(str);
|
|
162
|
+
var matchStr = reg.exec(str); // if (source != 860 && ua.indexOf('micromessenger') == -1)
|
|
163
|
+
// return <span dangerouslySetInnerHTML={{ '__html': str }} />;
|
|
168
164
|
|
|
169
165
|
while (matchStr != null) {
|
|
170
|
-
var OpenDataCompoent = matchStr[1] ==
|
|
166
|
+
var OpenDataCompoent = matchStr[1] == "userId" ? OpenUserName : OpenDepartmentName;
|
|
171
167
|
|
|
172
168
|
if (!OpenDataCompoent) {
|
|
173
169
|
openDatas.push( /*#__PURE__*/_react["default"].createElement("span", {
|
|
174
170
|
dangerouslySetInnerHTML: {
|
|
175
|
-
|
|
171
|
+
__html: matchStr[0]
|
|
172
|
+
},
|
|
173
|
+
onClick: function onClick(e) {
|
|
174
|
+
return e.stopPropagation();
|
|
176
175
|
}
|
|
177
176
|
}));
|
|
178
177
|
} else {
|
|
179
178
|
openDatas.push( /*#__PURE__*/_react["default"].createElement("span", {
|
|
180
179
|
style: {
|
|
181
|
-
|
|
180
|
+
color: "#1890ff"
|
|
181
|
+
},
|
|
182
|
+
onClick: function onClick(e) {
|
|
183
|
+
return e.stopPropagation();
|
|
182
184
|
}
|
|
183
185
|
}, "@", /*#__PURE__*/_react["default"].createElement(OpenDataCompoent, {
|
|
184
186
|
id: matchStr[2],
|
package/package.json
CHANGED
|
@@ -14,18 +14,17 @@ export default class ConvertUserName extends PureComponent<Props> {
|
|
|
14
14
|
if (userId) {
|
|
15
15
|
// const iframeBoxUrl = `${getBSGlobal('apiPath')}/u/${getUserInfo().Id}/Home#`;
|
|
16
16
|
return (
|
|
17
|
-
<
|
|
17
|
+
<span
|
|
18
18
|
className={classNames(
|
|
19
19
|
className,
|
|
20
20
|
"titaui-communication__communication-content__user-link"
|
|
21
21
|
)}
|
|
22
|
-
target="_blank"
|
|
23
22
|
// href={`${iframeBoxUrl}${encodeURIComponent("widget/italent?iTalentFrameType=iframe&iTalentFrame=&iTalentFrame=" + encodeURIComponent(getBSGlobal('titaHost') + "/" + getUserInfo().Id + "/PageBuilderForEdit#/view?to_user_id=" + userId))}`}
|
|
24
23
|
>
|
|
25
24
|
<span>
|
|
26
25
|
<OpenUserName name={userName} id={userId} />
|
|
27
26
|
</span>
|
|
28
|
-
</
|
|
27
|
+
</span>
|
|
29
28
|
);
|
|
30
29
|
}
|
|
31
30
|
return <span className={className}>{userName}</span>;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
width: 17px;
|
|
22
22
|
height: 17px;
|
|
23
23
|
font-size: 17px;
|
|
24
|
-
color: #
|
|
24
|
+
color: #fff;
|
|
25
25
|
position: absolute;
|
|
26
26
|
right: 3px;
|
|
27
27
|
top: -68px;
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
&__head {
|
|
32
32
|
margin-top: 18px;
|
|
33
33
|
font-size: 24px;
|
|
34
|
+
font-weight: 600;
|
|
34
35
|
color: #141C28;
|
|
35
36
|
line-height: 34px;
|
|
36
37
|
letter-spacing: 2px;
|
|
@@ -65,5 +66,8 @@
|
|
|
65
66
|
align-items: center;
|
|
66
67
|
justify-content: center;
|
|
67
68
|
cursor: pointer;
|
|
69
|
+
&:hover{
|
|
70
|
+
background: #5C8EFF;
|
|
71
|
+
}
|
|
68
72
|
}
|
|
69
73
|
}
|
|
@@ -39,7 +39,7 @@ function StopTakingModel(): ReactElement {
|
|
|
39
39
|
</div>
|
|
40
40
|
<div className={`${preCls}__content-line3`}>
|
|
41
41
|
升级时间:
|
|
42
|
-
<span style={{color:'#2879ff'}}>1.21 (周五) 23:00 - 1.22 (周六) 23:59</span>
|
|
42
|
+
<span style={{color:'#2879ff',fontWeight:500}}>1.21 (周五) 23:00 - 1.22 (周六) 23:59</span>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
<div className={`${preCls}__action`} onClick={()=>window.open('https://wiki.tita.com/x/RICeAQ')} >了解详情</div>
|
package/src/utils/open-data.js
CHANGED
|
@@ -109,23 +109,31 @@ export const parseTag = (str) => {
|
|
|
109
109
|
var source = window.BSGlobal.tenantInfo.Source,
|
|
110
110
|
ua = navigator.userAgent.toLowerCase();
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const strReg = /<\w+[\w\s"'\/=\:\.]*?(?:userId|departmentId)=["']\S+?["'][\w\s"'\/=\:\.]*?>[\w\W]*?<\/\w+?>/;
|
|
112
|
+
const reg =
|
|
113
|
+
/<\w+[\w\W]*?(userId|departmentId)=["'](\S+?)["'][\w\W]*?>@([\w\W]*?)<\/\w+>/g;
|
|
114
|
+
const strReg =
|
|
115
|
+
/<\w+[\w\s"'\/=\:\.]*?(?:userId|departmentId)=["']\S+?["'][\w\s"'\/=\:\.]*?>[\w\W]*?<\/\w+?>/;
|
|
117
116
|
const openDatas = [];
|
|
118
117
|
let matchStr = reg.exec(str);
|
|
119
118
|
|
|
119
|
+
// if (source != 860 && ua.indexOf('micromessenger') == -1)
|
|
120
|
+
// return <span dangerouslySetInnerHTML={{ '__html': str }} />;
|
|
121
|
+
|
|
120
122
|
while (matchStr != null) {
|
|
121
|
-
const OpenDataCompoent =
|
|
123
|
+
const OpenDataCompoent =
|
|
124
|
+
matchStr[1] == "userId" ? OpenUserName : OpenDepartmentName;
|
|
122
125
|
if (!OpenDataCompoent) {
|
|
123
|
-
openDatas.push(
|
|
126
|
+
openDatas.push(
|
|
127
|
+
<span
|
|
128
|
+
dangerouslySetInnerHTML={{ __html: matchStr[0] }}
|
|
129
|
+
onClick={(e) => e.stopPropagation()}
|
|
130
|
+
/>
|
|
131
|
+
);
|
|
124
132
|
} else {
|
|
125
133
|
openDatas.push(
|
|
126
|
-
<span style={{
|
|
134
|
+
<span style={{ color: "#1890ff" }} onClick={(e) => e.stopPropagation()}>
|
|
127
135
|
@<OpenDataCompoent id={matchStr[2]} name={matchStr[3]} />
|
|
128
|
-
</span
|
|
136
|
+
</span>
|
|
129
137
|
);
|
|
130
138
|
}
|
|
131
139
|
matchStr = reg.exec(str);
|
|
@@ -135,12 +143,14 @@ export const parseTag = (str) => {
|
|
|
135
143
|
const renderData = [];
|
|
136
144
|
|
|
137
145
|
for (let i = 0; i < commonStrs.length; i++) {
|
|
138
|
-
renderData.push(
|
|
146
|
+
renderData.push(
|
|
147
|
+
<span dangerouslySetInnerHTML={{ __html: commonStrs[i] }} />
|
|
148
|
+
);
|
|
139
149
|
renderData.push(openDatas[i]);
|
|
140
150
|
}
|
|
141
151
|
|
|
142
152
|
return renderData;
|
|
143
|
-
}
|
|
153
|
+
};
|
|
144
154
|
|
|
145
155
|
export const parseString = (str) => {
|
|
146
156
|
//@ts-ignore
|