@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.
@@ -11,6 +11,7 @@
11
11
 
12
12
  .titaui-checkbox--checked {
13
13
  background: url(./checked.svg) transparent no-repeat 50% 50%;
14
+ border: none;
14
15
  }
15
16
 
16
17
  .titaui-checkbox--disabled {
@@ -28,7 +28,10 @@
28
28
  }
29
29
 
30
30
  .titaui-dialog .rc-dialog-close {
31
- top: 16px;
31
+ padding: 0;
32
+ font-size: 20px;
33
+ right: 30px;
34
+ top: 20px;
32
35
  cursor: pointer;
33
36
  opacity: 1 !important;
34
37
  z-index: 2;
@@ -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-close"
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 textareaInput = _this.refs.textEditor.refs.textareaInput;
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.focus();
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
- setTimeout(function () {
196
- textareaInput.focus();
197
- }, 300);
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("div", {
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-block;
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"] = _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 _default(_x, _x2, _x3) {
17
- return _ref.apply(this, arguments);
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 _ref() {
21
- _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(ctx, openDataParams, lineHeight) {
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 _ref.apply(this, arguments);
98
+ return _openDataPainter.apply(this, arguments);
73
99
  }
74
100
 
75
- var getOpenData = function getOpenData(_ref2) {
76
- var id = _ref2.id,
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;
@@ -90,7 +90,11 @@ var getOpenData = function getOpenData(_ref2) {
90
90
  return reject(err);
91
91
  }
92
92
 
93
- resolve(data.items[0].data);
93
+ if (data && data.items[0]) {
94
+ resolve(data.items[0].data);
95
+ } else {
96
+ resolve(name);
97
+ }
94
98
  });
95
99
  });
96
100
  };
@@ -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 (color) {
59
+ if (key) {
55
60
  return {
56
- color: 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 (background) {
117
+ if (key) {
112
118
  return {
113
- color: background
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
+ }
@@ -1,6 +1,7 @@
1
1
  .tita-rich-editor-normal-toolbar {
2
2
  display: flex;
3
3
  align-items: center;
4
+ padding: 12px 0;
4
5
  }
5
6
 
6
7
  .tita-rich-editor-normal-toolbar-item {
@@ -89,7 +89,11 @@ var getOpenData = function getOpenData(_ref2) {
89
89
  return reject(err);
90
90
  }
91
91
 
92
- resolve(data.items[0].data);
92
+ if (data && data.items[0]) {
93
+ resolve(data.items[0].data);
94
+ } else {
95
+ resolve(name);
96
+ }
93
97
  });
94
98
  });
95
99
  };
@@ -205,8 +205,8 @@ var NewOkrList = function NewOkrList(props) {
205
205
  params.Searchpage = 2;
206
206
  }
207
207
 
208
- if (departmentId != 0) {
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: 99999,
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.46",
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",