@titaui/pc 1.12.22-beta.1 → 1.12.22-beta.13
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/attachments-preview/index.js +6 -2
- package/lib/components/color-date-picker/index.css +1 -2
- package/lib/components/dialog-upload/index.js +1 -1
- package/lib/components/dynamic/components/comments-dialog/img/curEfforts.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curGood.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curGreat.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/efforts.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/good.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/great.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/index.css +33 -3
- package/lib/components/dynamic/components/comments-dialog/index.js +18 -7
- package/lib/components/dynamic/dynamic-item/components/header/index.js +2 -1
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +3 -14
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +5 -29
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +0 -1
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +95 -48
- package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +17 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +15 -2
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +41 -31
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +72 -85
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +18 -1
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +80 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/request-api.js +16 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +92 -8
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +42 -23
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +42 -65
- package/lib/components/dynamic/dynamic-item/index.js +50 -44
- package/lib/components/import-modal/import-okr-modal/index.js +2 -1
- package/lib/components/import-modal/import-task-modal/search-form.js +4 -1
- package/lib/components/import-modal/request-api.js +1 -1
- package/lib/components/import-modal/search/task-relation.js +9 -5
- package/lib/components/import-modal/tree/okr-tree/index.js +15 -5
- package/lib/components/menus/components/search-colleague/index.js +3 -1
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +15 -11
- package/lib/components/menus/export-modules/summary-menus/menus.js +48 -36
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +2 -2
- package/lib/components/picker/components/panels/month-panel/index.js +2 -1
- package/lib/components/picker/components/panels/week-panel/index.js +6 -2
- package/lib/components/picker/components/panels/week-panel/utils.js +24 -2
- package/lib/components/picker/components/panels/week-panel/week-body.js +18 -10
- package/lib/components/picker/components/panels/week-panel/week-head.js +9 -7
- package/lib/components/picker/picker-panels.js +3 -3
- package/lib/components/picker/range-picker/components/select-input/index.js +9 -2
- package/lib/components/rate/index.css +3 -3
- package/lib/components/textarea/index.css +2 -2
- package/lib/components/textarea/index.js +1 -1
- package/lib/components/upvote/index.js +10 -4
- package/lib/components/write-summary-modal/index.css +1 -0
- package/lib/components/write-summary-modal/index.js +7 -6
- package/lib/utils/helpers.js +58 -3
- package/package.json +2 -2
|
@@ -17,7 +17,7 @@ var _requestApi = require("./request-api");
|
|
|
17
17
|
|
|
18
18
|
require("./index.css");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _utils = require("./utils");
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
@@ -121,7 +121,8 @@ var WriteSummaryModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
121
121
|
maskClosable: false
|
|
122
122
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
123
|
className: "".concat(prefix)
|
|
124
|
-
}, modalList.map(function (item
|
|
124
|
+
}, modalList.map(function (item) {
|
|
125
|
+
var randomColor = (0, _utils.getRandomColor)();
|
|
125
126
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
126
127
|
className: "".concat(prefix, "__content-item"),
|
|
127
128
|
onClick: function onClick() {
|
|
@@ -132,7 +133,7 @@ var WriteSummaryModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
132
133
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
134
|
className: "".concat(prefix, "__content-item-title-avatar"),
|
|
134
135
|
style: {
|
|
135
|
-
background:
|
|
136
|
+
background: randomColor.bg
|
|
136
137
|
}
|
|
137
138
|
}, item.name[0]), /*#__PURE__*/_react["default"].createElement("span", {
|
|
138
139
|
className: "".concat(prefix, "__content-item-title-name")
|
|
@@ -143,21 +144,21 @@ var WriteSummaryModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
143
144
|
}, (0, _getLocale.getLocale)("Rep_Tab_Mys_Workprogre")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
144
145
|
className: "".concat(prefix, "__content-item-desc-block"),
|
|
145
146
|
style: {
|
|
146
|
-
background:
|
|
147
|
+
background: randomColor.contentBg
|
|
147
148
|
}
|
|
148
149
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
149
150
|
className: "".concat(prefix, "__content-item-desc-text")
|
|
150
151
|
}, (0, _getLocale.getLocale)("Tasks_Tab_MyS_JobSummary")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
151
152
|
className: "".concat(prefix, "__content-item-desc-block"),
|
|
152
153
|
style: {
|
|
153
|
-
background:
|
|
154
|
+
background: randomColor.contentBg
|
|
154
155
|
}
|
|
155
156
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
156
157
|
className: "".concat(prefix, "__content-item-desc-text")
|
|
157
158
|
}, (0, _getLocale.getLocale)("Rep_Tab_Mys_NextWorkPlans")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
158
159
|
className: "".concat(prefix, "__content-item-desc-block"),
|
|
159
160
|
style: {
|
|
160
|
-
background:
|
|
161
|
+
background: randomColor.contentBg
|
|
161
162
|
}
|
|
162
163
|
})));
|
|
163
164
|
})));
|
package/lib/utils/helpers.js
CHANGED
|
@@ -6,13 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.cssSupport = cssSupport;
|
|
7
7
|
exports.escapeHtml = escapeHtml;
|
|
8
8
|
exports.getApiUrl = getApiUrl;
|
|
9
|
-
exports.getPreAndNextMonthDate = exports.getLoginUserInfo = void 0;
|
|
9
|
+
exports.getPreAndNextMonthDate = exports.getPointYearMonthWeeksRange = exports.getLoginUserInfo = void 0;
|
|
10
10
|
exports.getTenantInfo = getTenantInfo;
|
|
11
11
|
exports.getUploadMaxSize = getUploadMaxSize;
|
|
12
|
-
exports.isTencentHr = exports.isLocal = exports.isFeishu = exports.isDingDing = void 0;
|
|
12
|
+
exports.toTree = exports.isTencentHr = exports.isLocal = exports.isFeishu = exports.isDingDing = void 0;
|
|
13
13
|
|
|
14
14
|
var _bsGlobal = require("./bs-global");
|
|
15
15
|
|
|
16
|
+
var _cloneDeep = _interopRequireDefault(require("clone-deep"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
16
20
|
function cssSupport(attr, value) {
|
|
17
21
|
var element = document.createElement('div');
|
|
18
22
|
|
|
@@ -121,6 +125,57 @@ var getPreAndNextMonthDate = function getPreAndNextMonthDate() {
|
|
|
121
125
|
preDate: preDate,
|
|
122
126
|
nextDate: nextDate
|
|
123
127
|
};
|
|
128
|
+
}; //根据年月,计算这个月周的范围
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
exports.getPreAndNextMonthDate = getPreAndNextMonthDate;
|
|
132
|
+
|
|
133
|
+
var getPointYearMonthWeeksRange = function getPointYearMonthWeeksRange(year, month) {
|
|
134
|
+
var startDate = new Date("".concat(year, "/").concat(month, "/1"));
|
|
135
|
+
var calDays = new Date(startDate.valueOf());
|
|
136
|
+
calDays.setMonth(calDays.getMonth() + 1);
|
|
137
|
+
calDays.setDate(0);
|
|
138
|
+
var days = calDays.getDate();
|
|
139
|
+
var dayNum = 1 * 24 * 60 * 60 * 1000;
|
|
140
|
+
var result = [];
|
|
141
|
+
|
|
142
|
+
for (var i = 0; i < days; i++) {
|
|
143
|
+
var date = new Date(startDate.valueOf() + i * dayNum);
|
|
144
|
+
|
|
145
|
+
if (date.getDay() === 1) {
|
|
146
|
+
var endDate = new Date(date.valueOf() + 6 * dayNum);
|
|
147
|
+
result.push({
|
|
148
|
+
startTime: "".concat(date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : "0" + (date.getMonth() + 1), "/").concat(date.getDate() >= 10 ? date.getDate() : "0" + date.getDate()),
|
|
149
|
+
endTime: "".concat(endDate.getMonth() + 1 >= 10 ? endDate.getMonth() + 1 : "0" + (endDate.getMonth() + 1), "/").concat(endDate.getDate() >= 10 ? endDate.getDate() : "0" + endDate.getDate())
|
|
150
|
+
});
|
|
151
|
+
i += 6;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return result;
|
|
156
|
+
}; // 扁平数据转换为树
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
exports.getPointYearMonthWeeksRange = getPointYearMonthWeeksRange;
|
|
160
|
+
|
|
161
|
+
var toTree = function toTree(data) {
|
|
162
|
+
var cloneData = (0, _cloneDeep["default"])(data);
|
|
163
|
+
var map = {};
|
|
164
|
+
var res = [];
|
|
165
|
+
cloneData.forEach(function (item) {
|
|
166
|
+
return map[item.id] = item;
|
|
167
|
+
});
|
|
168
|
+
cloneData.forEach(function (item) {
|
|
169
|
+
var parent = map[item.parentId];
|
|
170
|
+
|
|
171
|
+
if (parent) {
|
|
172
|
+
if (!parent.children) parent.children = [];
|
|
173
|
+
parent.children.push(item);
|
|
174
|
+
} else {
|
|
175
|
+
res.push(item);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
return res;
|
|
124
179
|
};
|
|
125
180
|
|
|
126
|
-
exports.
|
|
181
|
+
exports.toTree = toTree;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.12.22-beta.
|
|
3
|
+
"version": "1.12.22-beta.13",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@titaui/rc-trigger": "5.2.5",
|
|
79
79
|
"@titaui/react-flow-renderer": "9.5.4",
|
|
80
80
|
"@titaui/request": "^1.0.1",
|
|
81
|
-
"@titaui/rich-editor": "^0.1.
|
|
81
|
+
"@titaui/rich-editor": "^0.1.50",
|
|
82
82
|
"@titaui/toast": "1.0.0",
|
|
83
83
|
"@types/color": "3.0.3",
|
|
84
84
|
"@types/prosemirror-commands": "1.0.4",
|