@titaui/pc 1.15.14 → 1.15.18
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.
|
@@ -15,6 +15,8 @@ var _popup = _interopRequireDefault(require("../popup"));
|
|
|
15
15
|
|
|
16
16
|
var _button = _interopRequireDefault(require("../button"));
|
|
17
17
|
|
|
18
|
+
var _getLocale = require("../../utils/getLocale");
|
|
19
|
+
|
|
18
20
|
require("./index.css");
|
|
19
21
|
|
|
20
22
|
var _excluded = ["type", "width", "time", "children", "popupPlacement", "classnames", "content", "onClickClose", "buttonTitle", "visible"];
|
|
@@ -50,7 +52,7 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
50
52
|
_props$onClickClose = props.onClickClose,
|
|
51
53
|
onClickClose = _props$onClickClose === void 0 ? function () {} : _props$onClickClose,
|
|
52
54
|
_props$buttonTitle = props.buttonTitle,
|
|
53
|
-
buttonTitle = _props$buttonTitle === void 0 ? '
|
|
55
|
+
buttonTitle = _props$buttonTitle === void 0 ? (0, _getLocale.getLocale)('TopMenu_button_InvitColleagues') : _props$buttonTitle,
|
|
54
56
|
_props$visible = props.visible,
|
|
55
57
|
visible = _props$visible === void 0 ? false : _props$visible,
|
|
56
58
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
@@ -47,6 +47,8 @@ var _request2 = require("./request.apis");
|
|
|
47
47
|
|
|
48
48
|
var _auth = require("../../utils/auth");
|
|
49
49
|
|
|
50
|
+
var _getLocale = require("../../utils/getLocale");
|
|
51
|
+
|
|
50
52
|
var _invitePoint = _interopRequireDefault(require("./images/invite-point.png"));
|
|
51
53
|
|
|
52
54
|
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
@@ -327,7 +329,7 @@ var NavTop = function NavTop() {
|
|
|
327
329
|
|
|
328
330
|
var renderInviteContent = (0, _react.useCallback)(function () {
|
|
329
331
|
if (!inviteVisible) return;
|
|
330
|
-
var title = '
|
|
332
|
+
var title = (0, _getLocale.getLocale)('TopMenu_tips_ManageCompany');
|
|
331
333
|
if (!inviteAuth) return /*#__PURE__*/_react["default"].createElement("div", {
|
|
332
334
|
className: "".concat(preCls, "__invite-guide-content")
|
|
333
335
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -339,8 +341,8 @@ var NavTop = function NavTop() {
|
|
|
339
341
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
340
342
|
className: "".concat(preCls, "__invite-guide-content-title")
|
|
341
343
|
}, title)));
|
|
342
|
-
title = showMangeAdd ? '
|
|
343
|
-
var subtitle =
|
|
344
|
+
title = showMangeAdd ? (0, _getLocale.getLocale)('TopMenu_Title_ManageCompany') : (0, _getLocale.getLocale)('TopMenu_Title_InviteColleagues');
|
|
345
|
+
var subtitle = (0, _getLocale.getLocale)('TopMenu_Content_InviteColleagues');
|
|
344
346
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
345
347
|
className: "".concat(preCls, "__invite-guide-content")
|
|
346
348
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -361,12 +363,10 @@ var NavTop = function NavTop() {
|
|
|
361
363
|
var okrIndex = (0, _bsGlobal.getBSGlobal)('WebHead').AppHead.findIndex(function (item) {
|
|
362
364
|
return item.AppId === '113';
|
|
363
365
|
});
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
return
|
|
367
|
-
}
|
|
368
|
-
return false;
|
|
369
|
-
}
|
|
366
|
+
var newNavigation = (0, _bsGlobal.getBSGlobal)('newNavigation');
|
|
367
|
+
return newNavigation.findIndex(function (v) {
|
|
368
|
+
return v.appId === 113;
|
|
369
|
+
}) !== -1 && okrIndex;
|
|
370
370
|
};
|
|
371
371
|
|
|
372
372
|
(0, _react.useEffect)(function () {
|
|
@@ -424,7 +424,7 @@ var NavTop = function NavTop() {
|
|
|
424
424
|
menus: menu,
|
|
425
425
|
activeMenuId: activeMenuId
|
|
426
426
|
})), showWxInvite && (staffCount > 3 ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
427
|
-
overlay: '
|
|
427
|
+
overlay: (0, _getLocale.getLocale)('TopMenu_tips_InvitColleagues'),
|
|
428
428
|
placement: "bottom",
|
|
429
429
|
align: {
|
|
430
430
|
offset: [0, 5]
|
|
@@ -452,7 +452,7 @@ var NavTop = function NavTop() {
|
|
|
452
452
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
453
453
|
className: (0, _classnames["default"])('tu-icon-add-people', "".concat(preCls, "__invite-icon"))
|
|
454
454
|
})))), showMangeAdd && (staffCount > 3 && inviteAuth ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
455
|
-
overlay: '
|
|
455
|
+
overlay: (0, _getLocale.getLocale)('TopMenu_tips_AddEmployees'),
|
|
456
456
|
placement: "bottom",
|
|
457
457
|
align: {
|
|
458
458
|
offset: [0, 5]
|
|
@@ -271,6 +271,8 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
271
271
|
_this._handlerStandardModeProblemChange = function (value) {
|
|
272
272
|
var data = _objectSpread({}, _this.state.data);
|
|
273
273
|
|
|
274
|
+
console.log((0, _mblog.htmlEncodeByRegExp)(value));
|
|
275
|
+
|
|
274
276
|
_this._updateReviewData(data, "Drawback", value);
|
|
275
277
|
};
|
|
276
278
|
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _i18nFrontTranslate = require("../../utils/i18n-front-translate");
|
|
13
13
|
|
|
14
|
+
var _mblog = require("../../utils/mblog");
|
|
15
|
+
|
|
14
16
|
var _style = require("./style");
|
|
15
17
|
|
|
16
18
|
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); }
|
|
@@ -147,6 +149,7 @@ var TextareaView = /*#__PURE__*/function (_PureComponent) {
|
|
|
147
149
|
isFocus = _this$state.isFocus,
|
|
148
150
|
isHasPlaceholder = _this$state.isHasPlaceholder;
|
|
149
151
|
var valueLen = value.length;
|
|
152
|
+
console.log(123, (0, _mblog.htmlDecodeByRegExp)(value));
|
|
150
153
|
return /*#__PURE__*/_react["default"].createElement(_style.TextareaWrapper, {
|
|
151
154
|
className: className,
|
|
152
155
|
style: style
|
package/lib/utils/mblog.js
CHANGED
|
@@ -22,7 +22,8 @@ function htmlEncodeByRegExp(str) {
|
|
|
22
22
|
function htmlDecodeByRegExp(str) {
|
|
23
23
|
var temp = "";
|
|
24
24
|
if (str.length == 0) return "";
|
|
25
|
-
temp = str.replace(
|
|
25
|
+
temp = str.replace(/<br\/>/g, "\n");
|
|
26
|
+
temp = temp.replace(/&/g, "&");
|
|
26
27
|
temp = temp.replace(/</g, "<");
|
|
27
28
|
temp = temp.replace(/>/g, ">");
|
|
28
29
|
temp = temp.replace(/ /g, " ");
|