@titaui/pc 1.11.11 → 1.11.13-beta.11
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/constant.js +9 -5
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.css +2 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
- package/lib/components/dynamic/new-ui.css +1 -0
- package/lib/components/e-priority/index.js +10 -4
- package/lib/components/nav-top/index.js +6 -3
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +1 -0
- package/lib/utils/open-data.js +38 -18
- package/package.json +1 -1
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getObjTypeMapText = 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
|
-
var _ObjTypeMapText;
|
|
11
|
-
|
|
12
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; }
|
|
13
11
|
|
|
14
12
|
var OkrRiskMapping = {
|
|
@@ -80,8 +78,14 @@ exports.EObjType = EObjType;
|
|
|
80
78
|
EObjType[EObjType["Report"] = 8] = "Report";
|
|
81
79
|
})(EObjType || (exports.EObjType = EObjType = {}));
|
|
82
80
|
|
|
83
|
-
var
|
|
84
|
-
|
|
81
|
+
var getObjTypeMapText = function getObjTypeMapText(key) {
|
|
82
|
+
var _data;
|
|
83
|
+
|
|
84
|
+
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);
|
|
85
|
+
return data[key];
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.getObjTypeMapText = getObjTypeMapText;
|
|
85
89
|
|
|
86
90
|
var ObjectType = function ObjectType() {
|
|
87
91
|
return {
|
|
@@ -71,7 +71,7 @@ var DynamicKr = function DynamicKr(_ref) {
|
|
|
71
71
|
className: "".concat(prefix, "__operate-desc")
|
|
72
72
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
73
73
|
className: "".concat(prefix, "__operate-desc-wrapper")
|
|
74
|
-
}, (0, _getLocale.getLocale)("Mod_InChargeof"), _constant.
|
|
74
|
+
}, (0, _getLocale.getLocale)("Mod_InChargeof"), (0, _constant.getObjTypeMapText)(data.obj.objType), /*#__PURE__*/_react["default"].createElement("span", {
|
|
75
75
|
className: "".concat(prefix, "__object-name"),
|
|
76
76
|
onClick: handleClickOTitle
|
|
77
77
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
@@ -114,7 +114,7 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
114
114
|
} else {
|
|
115
115
|
dom = /*#__PURE__*/_react["default"].createElement("span", {
|
|
116
116
|
className: "".concat(prefix, "__operate-desc-wrapper")
|
|
117
|
-
}, (0, _getLocale.getLocale)("Mod_InChargeof"), _constant2.
|
|
117
|
+
}, (0, _getLocale.getLocale)("Mod_InChargeof"), (0, _constant2.getObjTypeMapText)(obj.objType), /*#__PURE__*/_react["default"].createElement("span", {
|
|
118
118
|
className: "".concat(prefix, "__object-name"),
|
|
119
119
|
onClick: handleClickTitle
|
|
120
120
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -37,7 +37,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
37
37
|
|
|
38
38
|
var preCls = "tita-okrdt-tree";
|
|
39
39
|
|
|
40
|
-
function
|
|
40
|
+
var EPriority = function EPriority(props) {
|
|
41
41
|
var onChange = props.onChange,
|
|
42
42
|
checked = props.checked,
|
|
43
43
|
hasAuth = props.hasAuth,
|
|
@@ -50,7 +50,10 @@ function _default(props) {
|
|
|
50
50
|
|
|
51
51
|
var onMenuClickHandler = function onMenuClickHandler(name) {
|
|
52
52
|
setLevel(name);
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
if (onChange) {
|
|
55
|
+
onChange(name);
|
|
56
|
+
}
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
(0, _react.useEffect)(function () {
|
|
@@ -85,4 +88,7 @@ function _default(props) {
|
|
|
85
88
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
86
89
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p5 ").concat(preCls, "__e-task-node-select-priority"))
|
|
87
90
|
}), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Verylow")));
|
|
88
|
-
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var _default = EPriority;
|
|
94
|
+
exports["default"] = _default;
|
|
@@ -25,12 +25,14 @@ var _version = _interopRequireDefault(require("./components/version"));
|
|
|
25
25
|
|
|
26
26
|
var _utils = require("./utils");
|
|
27
27
|
|
|
28
|
-
require("./index.css");
|
|
29
|
-
|
|
30
28
|
var _request = require("../../utils/request");
|
|
31
29
|
|
|
32
30
|
var _toast = _interopRequireDefault(require("../toast"));
|
|
33
31
|
|
|
32
|
+
var _useGlobalValue = _interopRequireDefault(require("./useGlobalValue"));
|
|
33
|
+
|
|
34
|
+
require("./index.css");
|
|
35
|
+
|
|
34
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
37
|
|
|
36
38
|
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); }
|
|
@@ -171,4 +173,5 @@ var NavTop = function NavTop() {
|
|
|
171
173
|
};
|
|
172
174
|
|
|
173
175
|
var _default = NavTop;
|
|
174
|
-
exports["default"] = _default;
|
|
176
|
+
exports["default"] = _default;
|
|
177
|
+
NavTop.useGlobalValue = _useGlobalValue["default"];
|
|
@@ -303,6 +303,7 @@ function PayDialog(props) {
|
|
|
303
303
|
if (payCode === "wxPay") {
|
|
304
304
|
e.preventDefault();
|
|
305
305
|
var path = window.location.href.split("#")[0];
|
|
306
|
+
path = path.replace(/eLearningHome/, "Home");
|
|
306
307
|
var encode = encodeURIComponent("orderId=".concat(orderId, "&payCode=").concat(payCode, "&payName=").concat(payName));
|
|
307
308
|
window.open("".concat(path, "#/pay?").concat(encode), "_blank"); // postWxPayOrder({
|
|
308
309
|
// order_id: orderId,
|
package/lib/utils/open-data.js
CHANGED
|
@@ -263,9 +263,12 @@ var parseHtmlAndTextTag = function parseHtmlAndTextTag(str) {
|
|
|
263
263
|
var openDatareg = /\[(\w+?)\:(\w+?)\]/g;
|
|
264
264
|
var openDataStrReg = /\[\w+?\:\w+?\]/;
|
|
265
265
|
var openDataMatchStr = openDatareg.exec(str);
|
|
266
|
+
var hasMatchStr = false;
|
|
267
|
+
var renderData = [];
|
|
266
268
|
|
|
267
|
-
while (matchStr != null
|
|
269
|
+
while (matchStr != null) {
|
|
268
270
|
if (matchStr) {
|
|
271
|
+
hasMatchStr = true;
|
|
269
272
|
var OpenDataCompoent = matchStr[1] == "userId" ? OpenUserName : OpenDepartmentName;
|
|
270
273
|
|
|
271
274
|
if (!OpenDataCompoent) {
|
|
@@ -293,7 +296,24 @@ var parseHtmlAndTextTag = function parseHtmlAndTextTag(str) {
|
|
|
293
296
|
}
|
|
294
297
|
|
|
295
298
|
matchStr = reg.exec(str);
|
|
296
|
-
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (hasMatchStr) {
|
|
303
|
+
var commonStrs = str.split(strReg);
|
|
304
|
+
|
|
305
|
+
for (var i = 0; i < commonStrs.length; i++) {
|
|
306
|
+
renderData.push( /*#__PURE__*/_react["default"].createElement("span", {
|
|
307
|
+
dangerouslySetInnerHTML: {
|
|
308
|
+
__html: commonStrs[i]
|
|
309
|
+
}
|
|
310
|
+
}));
|
|
311
|
+
renderData.push(openDatas[i]);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
while (openDataMatchStr != null) {
|
|
316
|
+
if (openDataMatchStr) {
|
|
297
317
|
var _OpenDataCompoent = openDataMap[openDataMatchStr[2]];
|
|
298
318
|
|
|
299
319
|
if (!_OpenDataCompoent) {
|
|
@@ -304,32 +324,32 @@ var parseHtmlAndTextTag = function parseHtmlAndTextTag(str) {
|
|
|
304
324
|
})));
|
|
305
325
|
}
|
|
306
326
|
|
|
307
|
-
openDataMatchStr =
|
|
327
|
+
openDataMatchStr = openDatareg.exec(str);
|
|
308
328
|
}
|
|
309
329
|
}
|
|
310
330
|
|
|
311
|
-
var
|
|
312
|
-
var tempStrs = [];
|
|
313
|
-
commonStrs && commonStrs.forEach(function (item) {
|
|
314
|
-
tempStrs.push(item.split(openDataStrReg).filter(function (item) {
|
|
315
|
-
return item !== '';
|
|
316
|
-
}));
|
|
317
|
-
});
|
|
318
|
-
var renderData = [];
|
|
331
|
+
var newCommonStrs = str.split(openDataStrReg);
|
|
319
332
|
|
|
320
|
-
for (var
|
|
333
|
+
for (var _i = 0; _i < newCommonStrs.length; _i++) {
|
|
321
334
|
renderData.push( /*#__PURE__*/_react["default"].createElement("span", {
|
|
322
|
-
style: {
|
|
323
|
-
verticalAlign: 'middle'
|
|
324
|
-
},
|
|
325
335
|
dangerouslySetInnerHTML: {
|
|
326
|
-
__html:
|
|
336
|
+
__html: newCommonStrs[_i]
|
|
327
337
|
}
|
|
328
338
|
}));
|
|
329
|
-
renderData.push(openDatas[
|
|
339
|
+
renderData.push(openDatas[_i]);
|
|
330
340
|
}
|
|
331
341
|
|
|
332
|
-
return renderData
|
|
342
|
+
return renderData.filter(function (item) {
|
|
343
|
+
return item !== undefined;
|
|
344
|
+
}).map(function (item) {
|
|
345
|
+
if (typeof item === 'string') {
|
|
346
|
+
return item.replace(',', '');
|
|
347
|
+
} else {
|
|
348
|
+
return item;
|
|
349
|
+
}
|
|
350
|
+
}).filter(function (item) {
|
|
351
|
+
return item !== "";
|
|
352
|
+
});
|
|
333
353
|
};
|
|
334
354
|
|
|
335
355
|
exports.parseHtmlAndTextTag = parseHtmlAndTextTag;
|