@titaui/pc 1.11.53 → 1.11.56
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/contact-kefu/index.js +7 -1
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +1 -1
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +10 -4
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +2 -2
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +4 -4
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +1 -1
- package/lib/components/task-relation-modal/search/task-relation.js +83 -0
- package/lib/components/task-relation-modal/tree/work-list/index.css +1 -1
- package/lib/components/task-relation-modal/tree/work-list/index.js +1 -1
- package/package.json +1 -1
|
@@ -46,6 +46,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
46
46
|
var preCls = "contact-kefu";
|
|
47
47
|
|
|
48
48
|
var ContactKefu = function ContactKefu() {
|
|
49
|
+
var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$ten;
|
|
50
|
+
|
|
49
51
|
var _useState = (0, _react.useState)(false),
|
|
50
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
51
53
|
visible = _useState2[0],
|
|
@@ -55,7 +57,11 @@ var ContactKefu = function ContactKefu() {
|
|
|
55
57
|
setVisible(true);
|
|
56
58
|
};
|
|
57
59
|
|
|
58
|
-
var isTrial = window.BSGlobal.tenantAuthentication.Version === 1 && (0, _platform.isOfficialSite)();
|
|
60
|
+
var isTrial = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Version) === 1 && (0, _platform.isOfficialSite)();
|
|
61
|
+
|
|
62
|
+
if (!((_window$BSGlobal2 = window.BSGlobal) !== null && _window$BSGlobal2 !== void 0 && (_window$BSGlobal2$ten = _window$BSGlobal2.tenantAuthentication) !== null && _window$BSGlobal2$ten !== void 0 && _window$BSGlobal2$ten.Version)) {
|
|
63
|
+
isTrial = true;
|
|
64
|
+
}
|
|
59
65
|
|
|
60
66
|
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
61
67
|
className: "".concat(preCls, "__popup")
|
|
@@ -160,9 +160,15 @@ function OkrRelationTaskModal(props) {
|
|
|
160
160
|
if (res) {
|
|
161
161
|
var tasks = res.tasks,
|
|
162
162
|
_total = res.total;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
|
|
164
|
+
if (tasks !== null && tasks !== void 0 && tasks.length) {
|
|
165
|
+
var newData = formatData(tasks);
|
|
166
|
+
setTaskData(newData);
|
|
167
|
+
setTotal(_total);
|
|
168
|
+
} else {
|
|
169
|
+
setTaskData([]);
|
|
170
|
+
setTotal(0);
|
|
171
|
+
}
|
|
166
172
|
}
|
|
167
173
|
});
|
|
168
174
|
};
|
|
@@ -241,7 +247,7 @@ function OkrRelationTaskModal(props) {
|
|
|
241
247
|
data: taskData,
|
|
242
248
|
multiple: true,
|
|
243
249
|
pageSize: pageSize
|
|
244
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
250
|
+
})), !!total && /*#__PURE__*/_react["default"].createElement("div", {
|
|
245
251
|
className: "".concat(preCls, "__content-pagination")
|
|
246
252
|
}, /*#__PURE__*/_react["default"].createElement(_pagination["default"], {
|
|
247
253
|
size: "sm",
|
|
@@ -19,7 +19,7 @@ var _searchDropdown = _interopRequireDefault(require("../../search/search-dropdo
|
|
|
19
19
|
|
|
20
20
|
var _taskStatusSelect = _interopRequireDefault(require("../../search/task-status-select"));
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _taskRelation = _interopRequireDefault(require("../../search/task-relation"));
|
|
23
23
|
|
|
24
24
|
var _helper = require("../../helper");
|
|
25
25
|
|
|
@@ -116,7 +116,7 @@ function SearchForm(props) {
|
|
|
116
116
|
initValue: status
|
|
117
117
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
118
|
className: "rel-okr-tree__search-item"
|
|
119
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
119
|
+
}, /*#__PURE__*/_react["default"].createElement(_taskRelation["default"], {
|
|
120
120
|
onChange: setRelation,
|
|
121
121
|
initValue: relation
|
|
122
122
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.okr-relation-tree__empty {
|
|
2
|
-
height:
|
|
2
|
+
height: 384px;
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
position: relative;
|
|
14
14
|
display: flex;
|
|
15
15
|
align-items: center;
|
|
16
|
-
margin-bottom:
|
|
16
|
+
margin-bottom: 11px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.okr-relation-tree__header-name {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
.okr-relation-tree__content {
|
|
51
51
|
margin-right: -32px;
|
|
52
52
|
margin-left: -4px;
|
|
53
|
-
height:
|
|
53
|
+
height: 305px;
|
|
54
54
|
font-size: 14px;
|
|
55
55
|
font-weight: 400;
|
|
56
56
|
line-height: 22px;
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.okr-relation-tree__content-item:nth-of-type(1) {
|
|
69
|
-
margin-top:
|
|
69
|
+
margin-top: 9px;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
.okr-relation-tree__content-item:hover {
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
13
|
+
|
|
14
|
+
var _selectLayer = _interopRequireDefault(require("../../select-layer"));
|
|
15
|
+
|
|
16
|
+
require("./search-dropdown/index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
|
|
26
|
+
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."); }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
|
|
36
|
+
function Relation(props) {
|
|
37
|
+
var onChange = props.onChange,
|
|
38
|
+
initValue = props.initValue;
|
|
39
|
+
|
|
40
|
+
var _useState = (0, _react.useState)((0, _getLocale.getLocale)("Pro_page_Plan_FullRange")),
|
|
41
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
42
|
+
selectText = _useState2[0],
|
|
43
|
+
setSelectText = _useState2[1];
|
|
44
|
+
|
|
45
|
+
(0, _react.useEffect)(function () {
|
|
46
|
+
if (initValue === 0) {
|
|
47
|
+
setSelectText((0, _getLocale.getLocale)("Pro_page_Plan_FullRange"));
|
|
48
|
+
}
|
|
49
|
+
}, [initValue]);
|
|
50
|
+
|
|
51
|
+
var onChangeHandler = function onChangeHandler(key) {
|
|
52
|
+
setSelectText(key.label);
|
|
53
|
+
onChange(key.value);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var selectOptions = [{
|
|
57
|
+
label: (0, _getLocale.getLocale)("Pro_page_Plan_FullRange"),
|
|
58
|
+
value: 0
|
|
59
|
+
}, {
|
|
60
|
+
label: (0, _getLocale.getLocale)("OKR_Menu_Title03_Owned"),
|
|
61
|
+
value: 1
|
|
62
|
+
}, {
|
|
63
|
+
label: (0, _getLocale.getLocale)("OKR_Menu_Title_Collaborator"),
|
|
64
|
+
value: 2
|
|
65
|
+
}, {
|
|
66
|
+
label: (0, _getLocale.getLocale)("Data_Idistributed"),
|
|
67
|
+
value: 3
|
|
68
|
+
}];
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
70
|
+
onChangeSelect: onChangeHandler,
|
|
71
|
+
items: selectOptions,
|
|
72
|
+
initValue: initValue
|
|
73
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
|
+
className: "titaui-search-dropdown"
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
+
className: "titaui-search-dropdown__text"
|
|
77
|
+
}, selectText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
|
+
className: "tu-icon-sort-down"
|
|
79
|
+
})));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
var _default = Relation;
|
|
83
|
+
exports["default"] = _default;
|
|
@@ -161,7 +161,7 @@ function WorkList(props) {
|
|
|
161
161
|
multiple: multiple,
|
|
162
162
|
isWork: true,
|
|
163
163
|
pageSize: pageSize
|
|
164
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
164
|
+
})), !!total && /*#__PURE__*/_react["default"].createElement("div", {
|
|
165
165
|
className: "".concat(preCls, "__content-pagination")
|
|
166
166
|
}, /*#__PURE__*/_react["default"].createElement(_pagination["default"], {
|
|
167
167
|
size: "sm",
|