@titaui/pc 1.10.46 → 1.10.47
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/checkbox/index.css +1 -0
- package/lib/components/dialog/index.css +4 -1
- package/lib/components/dialog/index.js +1 -1
- package/lib/components/mblog/index.js +14 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +8 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +19 -1
- package/lib/components/okr-share/common-painter/openDataPainter.js +34 -27
- package/lib/components/open-data-painter/index.js +5 -1
- package/lib/components/rich-editor/plugins/inline/color/index.js +10 -4
- package/lib/components/rich-editor/plugins/inline/color/util.js +25 -0
- package/lib/components/rich-editor/ui/normal-toolbar/index.css +1 -0
- package/lib/components/weekly-report/common-painter/openDataPainter.js +5 -1
- package/lib/pages/new-okr-list/index.js +3 -3
- package/package.json +2 -1
|
@@ -108,7 +108,7 @@ function _default(props) {
|
|
|
108
108
|
visible: visible,
|
|
109
109
|
className: (0, _classnames["default"])(preCls, _toConsumableArray(extraClass), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(preCls, "-no-head-line"), noHeadLine), _defineProperty(_classNames2, "".concat(preCls, "-no-footer-line"), noFooterLine), _defineProperty(_classNames2, "".concat(preCls, "-no-close"), noCloseIcon), _defineProperty(_classNames2, "".concat(preCls, "-no-footer"), noFooter), _classNames2)),
|
|
110
110
|
closeIcon: /*#__PURE__*/_react["default"].createElement("span", {
|
|
111
|
-
className: "tu-icon-
|
|
111
|
+
className: "tu-icon-canceled"
|
|
112
112
|
}),
|
|
113
113
|
animation: "slide-fade",
|
|
114
114
|
maskAnimation: "fade",
|
|
@@ -169,17 +169,23 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
_this.handlerDealAttachemntData = function (uploadSuccessFilesPath) {
|
|
172
|
+
var _this$refs$textEditor2;
|
|
173
|
+
|
|
172
174
|
var successFilesPath = uploadSuccessFilesPath.filter(function (item) {
|
|
173
175
|
return item !== "";
|
|
174
176
|
});
|
|
175
177
|
var successFilesPathLen = successFilesPath.length; // @ts-ignore
|
|
176
178
|
|
|
177
|
-
var
|
|
179
|
+
var _this$refs$textEditor = (_this$refs$textEditor2 = _this.refs.textEditor) === null || _this$refs$textEditor2 === void 0 ? void 0 : _this$refs$textEditor2.refs,
|
|
180
|
+
textareaInput = _this$refs$textEditor.textareaInput;
|
|
181
|
+
|
|
178
182
|
var textareaValue = _this.state.textareaValue; // textareaValue = dealWithLoadedFileTips(textareaValue, successFilesPathLen); // 更新输入框内容
|
|
179
183
|
|
|
180
184
|
localStorage.setItem(_this.state.localStroageKey, textareaValue); // 将输入框内容进行本地缓存
|
|
181
185
|
|
|
182
|
-
textareaInput
|
|
186
|
+
if (textareaInput) {
|
|
187
|
+
textareaInput.focus();
|
|
188
|
+
}
|
|
183
189
|
|
|
184
190
|
_this.setState({
|
|
185
191
|
textareaValue: textareaValue,
|
|
@@ -192,9 +198,12 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
192
198
|
_this.focus = function () {
|
|
193
199
|
// @ts-ignore
|
|
194
200
|
var textareaInput = _this.refs.textEditor.refs.textareaInput;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
201
|
+
|
|
202
|
+
if (textareaInput) {
|
|
203
|
+
setTimeout(function () {
|
|
204
|
+
textareaInput.focus();
|
|
205
|
+
}, 300);
|
|
206
|
+
}
|
|
198
207
|
};
|
|
199
208
|
|
|
200
209
|
_this.allowSubmit = function (content) {
|
|
@@ -120,6 +120,9 @@ function _default(props) {
|
|
|
120
120
|
window.open(window.location.href.replace(location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(data.id)));
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
+
var workApplyType = data.workApplyType,
|
|
124
|
+
workApplyStatus = data.workApplyStatus;
|
|
125
|
+
var isCreate = (workApplyStatus === 1 || workApplyStatus === 3 || workApplyStatus === 4) && workApplyType === 48;
|
|
123
126
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
127
|
key: index,
|
|
125
128
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node"))
|
|
@@ -130,10 +133,14 @@ function _default(props) {
|
|
|
130
133
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
131
134
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title ")),
|
|
132
135
|
onClick: openProjectDetail
|
|
136
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
137
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title-name "))
|
|
133
138
|
}, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
134
139
|
text: (0, _helpers.escapeHtml)(title),
|
|
135
140
|
isPercent: true
|
|
136
|
-
})), /*#__PURE__*/_react["default"].createElement("
|
|
141
|
+
})), isCreate && /*#__PURE__*/_react["default"].createElement("span", {
|
|
142
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title-approvaling"))
|
|
143
|
+
}, "\u7ACB\u9879\u4E2D")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
137
144
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions"))
|
|
138
145
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
139
146
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-user"))
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
.tita-okrdt-tree__e-project-node-title {
|
|
150
|
-
display: inline-
|
|
150
|
+
display: inline-flex;
|
|
151
151
|
font-size: 14px;
|
|
152
152
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
153
153
|
color: #3f4755;
|
|
@@ -158,6 +158,24 @@
|
|
|
158
158
|
flex: 1;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
.tita-okrdt-tree__e-project-node-title-name {
|
|
162
|
+
overflow: hidden;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.tita-okrdt-tree__e-project-node-title-approvaling {
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
justify-content: center;
|
|
169
|
+
min-width: 48px;
|
|
170
|
+
height: 20px;
|
|
171
|
+
font-size: 12px;
|
|
172
|
+
font-weight: 400;
|
|
173
|
+
color: #F05E5E;
|
|
174
|
+
background: rgba(240, 94, 94, 0.1);
|
|
175
|
+
border-radius: 10px;
|
|
176
|
+
margin-left: 8px;
|
|
177
|
+
}
|
|
178
|
+
|
|
161
179
|
.tita-okrdt-tree__e-project-node-gray {
|
|
162
180
|
color: #BFC7D5 !important;
|
|
163
181
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _openData = require("../../../utils/open-data");
|
|
9
9
|
|
|
@@ -13,12 +13,38 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
13
13
|
|
|
14
14
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15
15
|
|
|
16
|
-
function
|
|
17
|
-
|
|
16
|
+
var getOpenData = function getOpenData(_ref) {
|
|
17
|
+
var id = _ref.id,
|
|
18
|
+
name = _ref.name,
|
|
19
|
+
type = _ref.type;
|
|
20
|
+
var openId = (0, _openData.getOpenId)(id, type);
|
|
21
|
+
if (!window.WWOpenData || !openId) return Promise.resolve(name);
|
|
22
|
+
return new Promise(function (resolve, reject) {
|
|
23
|
+
window.WWOpenData.prefetch({
|
|
24
|
+
items: [{
|
|
25
|
+
id: openId,
|
|
26
|
+
type: type
|
|
27
|
+
}]
|
|
28
|
+
}, function (err, data) {
|
|
29
|
+
if (err) {
|
|
30
|
+
return reject(err);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (data && data.items[0]) {
|
|
34
|
+
resolve(data.items[0].data);
|
|
35
|
+
} else {
|
|
36
|
+
resolve(name);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
function openDataPainter(_x, _x2, _x3) {
|
|
43
|
+
return _openDataPainter.apply(this, arguments);
|
|
18
44
|
}
|
|
19
45
|
|
|
20
|
-
function
|
|
21
|
-
|
|
46
|
+
function _openDataPainter() {
|
|
47
|
+
_openDataPainter = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(ctx, openDataParams, lineHeight) {
|
|
22
48
|
var maxWidth,
|
|
23
49
|
name,
|
|
24
50
|
_ctx$measureText,
|
|
@@ -69,27 +95,8 @@ function _ref() {
|
|
|
69
95
|
}
|
|
70
96
|
}, _callee);
|
|
71
97
|
}));
|
|
72
|
-
return
|
|
98
|
+
return _openDataPainter.apply(this, arguments);
|
|
73
99
|
}
|
|
74
100
|
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
name = _ref2.name,
|
|
78
|
-
type = _ref2.type;
|
|
79
|
-
var openId = (0, _openData.getOpenId)(id, type);
|
|
80
|
-
if (!window.WWOpenData || !openId) return Promise.resolve(name);
|
|
81
|
-
return new Promise(function (resolve, reject) {
|
|
82
|
-
window.WWOpenData.prefetch({
|
|
83
|
-
items: [{
|
|
84
|
-
id: openId,
|
|
85
|
-
type: type
|
|
86
|
-
}]
|
|
87
|
-
}, function (err, data) {
|
|
88
|
-
if (err) {
|
|
89
|
-
return reject(err);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
resolve(data.items[0].data);
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
101
|
+
var _default = openDataPainter;
|
|
102
|
+
exports["default"] = _default;
|
|
@@ -19,6 +19,10 @@ var _selector = _interopRequireDefault(require("./selector"));
|
|
|
19
19
|
|
|
20
20
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
21
21
|
|
|
22
|
+
var _util = require("./util");
|
|
23
|
+
|
|
24
|
+
var _consts = require("./consts");
|
|
25
|
+
|
|
22
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
27
|
|
|
24
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -50,10 +54,11 @@ var colorReg = /^\s*(rgba\([^)]+\)|rgb\([^)]+\)|#[\d|a-f]{3,6})|\w*/i;
|
|
|
50
54
|
|
|
51
55
|
var getColorAttrs = function getColorAttrs(style) {
|
|
52
56
|
var color = style;
|
|
57
|
+
var key = (0, _util.findColor)(color, _consts.FontColor);
|
|
53
58
|
|
|
54
|
-
if (
|
|
59
|
+
if (key) {
|
|
55
60
|
return {
|
|
56
|
-
color:
|
|
61
|
+
color: _consts.FontColor[key]
|
|
57
62
|
};
|
|
58
63
|
}
|
|
59
64
|
|
|
@@ -107,10 +112,11 @@ var getBgAttrs = function getBgAttrs(style) {
|
|
|
107
112
|
var colorMatch = style.match(colorReg);
|
|
108
113
|
if (!colorMatch) return false;
|
|
109
114
|
var background = colorMatch[0];
|
|
115
|
+
var key = (0, _util.findColor)(background, _consts.BackgroundColor);
|
|
110
116
|
|
|
111
|
-
if (
|
|
117
|
+
if (key) {
|
|
112
118
|
return {
|
|
113
|
-
color:
|
|
119
|
+
color: _consts.BackgroundColor[key]
|
|
114
120
|
};
|
|
115
121
|
}
|
|
116
122
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.findColor = findColor;
|
|
7
|
+
exports.isColorEqual = isColorEqual;
|
|
8
|
+
|
|
9
|
+
var _color = _interopRequireDefault(require("color"));
|
|
10
|
+
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
|
|
13
|
+
function findColor(color, colorEnum) {
|
|
14
|
+
for (var key in colorEnum) {
|
|
15
|
+
if (isColorEqual(colorEnum[key], color)) {
|
|
16
|
+
return key;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function isColorEqual(a, b) {
|
|
24
|
+
return new _color["default"](a).contrast(new _color["default"](b)) === 1;
|
|
25
|
+
}
|
|
@@ -205,8 +205,8 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
205
205
|
params.Searchpage = 2;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
if (departmentId
|
|
209
|
-
params.keyWords =
|
|
208
|
+
if (departmentId !== 0) {
|
|
209
|
+
params.keyWords = "";
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
var request;
|
|
@@ -363,7 +363,7 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
363
363
|
className: "okr-list__check-filter-btn",
|
|
364
364
|
onClick: triggerAnimation
|
|
365
365
|
}, (0, _getLocale.getLocale)("OKR_MyO_Text_Check")), (0, _getLocale.getLocale)("OKR_MyO_Text_Topfiltercriteria")), /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
366
|
-
zIndex:
|
|
366
|
+
zIndex: 1200,
|
|
367
367
|
noHeadLine: true,
|
|
368
368
|
visible: casesVisible,
|
|
369
369
|
onClose: onCasesCloseHandler,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.47",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"@babel/core": "^7.11.1",
|
|
23
23
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
|
24
24
|
"@babel/plugin-proposal-decorators": "^7.10.5",
|
|
25
|
+
"@babel/plugin-proposal-numeric-separator": "^7.16.7",
|
|
25
26
|
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
|
|
26
27
|
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
|
|
27
28
|
"@babel/plugin-transform-runtime": "^7.11.0",
|