@titaui/pc 1.7.86 → 1.7.90

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.
@@ -66,7 +66,7 @@ var _default = function _default(_ref) {
66
66
  return /*#__PURE__*/_react["default"].createElement(_style.Line, null, okrTemplateEnabled && !(0, _helpers.isLocal)() ? /*#__PURE__*/_react["default"].createElement(_style.CaseLink, {
67
67
  onClick: okrCaseClickHandler,
68
68
  className: "tu-icon-shoushi"
69
- }, "\u4ECEOKR\u6848\u4F8B\u5E93\u6DFB\u52A0") : null, okrTemplateEnabled && /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
69
+ }, "\u4ECE OKR \u6848\u4F8B\u5E93\u6DFB\u52A0") : null, okrTemplateEnabled && /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
70
70
  zIndex: 99999,
71
71
  noHeadLine: true,
72
72
  visible: visible,
@@ -818,7 +818,8 @@ function CreateOkrModal(_ref, ref) {
818
818
  visible: isVisible,
819
819
  onCancel: hideCreateOkrModal,
820
820
  maskClosable: false,
821
- footerLeftContent: renderFooterTeachWriteOKr
821
+ footerLeftContent: renderFooterTeachWriteOKr,
822
+ zIndex: 1200
822
823
  }, /*#__PURE__*/_react["default"].createElement(_style.Wrapper, {
823
824
  ref: wrapperRef
824
825
  }, /*#__PURE__*/_react["default"].createElement(_oNewName["default"], {
@@ -6,7 +6,7 @@
6
6
  display: flex;
7
7
  justify-content: center;
8
8
  align-items: center;
9
- z-index: 1300 !important;
9
+ z-index: 1299 !important;
10
10
  }
11
11
 
12
12
  .rc-dialog-mask {
@@ -50,7 +50,7 @@
50
50
  }
51
51
 
52
52
  .titaui-dialog .rc-dialog-header {
53
- padding: 16px 32px 16px 32px;
53
+ padding: 18px 32px;
54
54
  }
55
55
 
56
56
  .titaui-dialog .rc-dialog-body {
@@ -58,7 +58,7 @@
58
58
  }
59
59
 
60
60
  .titaui-dialog .rc-dialog-footer {
61
- padding: 12px 32px 18px;
61
+ padding: 20px 32px;
62
62
  display: flex;
63
63
  justify-content: flex-end;
64
64
  }
@@ -2,7 +2,7 @@
2
2
  display: inline-block;
3
3
  width: 360px;
4
4
  background: #ffffff;
5
- border-radius: 24px;
5
+ border-radius: 24px !important;
6
6
  }
7
7
 
8
8
  .titaui-dialog-confirm__btn {
@@ -93,7 +93,6 @@
93
93
 
94
94
  .titaui-dialog-confirm__body {
95
95
  position: relative;
96
- display: flex;
97
96
  }
98
97
 
99
98
  .titaui-dialog-confirm__body-icon {
@@ -15,7 +15,7 @@ require("rc-dialog/assets/index.css");
15
15
 
16
16
  require("./index.css");
17
17
 
18
- var _excluded = ["children", "visible", "type"];
18
+ var _excluded = ["children", "visible", "type", "className"];
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
21
 
@@ -73,6 +73,8 @@ var DialogConfirm = function DialogConfirm(props) {
73
73
  var children = props.children,
74
74
  visible = props.visible,
75
75
  type = props.type,
76
+ _props$className = props.className,
77
+ className = _props$className === void 0 ? "" : _props$className,
76
78
  restProps = _objectWithoutProperties(props, _excluded);
77
79
 
78
80
  var footer = [];
@@ -127,7 +129,7 @@ var DialogConfirm = function DialogConfirm(props) {
127
129
  };
128
130
 
129
131
  return /*#__PURE__*/_react["default"].createElement(_rcDialog["default"], _extends({
130
- className: (0, _classnames["default"])(preCls, "".concat(preCls, "--no-bottom-line")),
132
+ className: (0, _classnames["default"])(preCls, "".concat(preCls, "--no-bottom-line"), className),
131
133
  visible: visible,
132
134
  closeIcon: /*#__PURE__*/_react["default"].createElement("span", null),
133
135
  animation: "slide-fade",
@@ -23,6 +23,8 @@ var _drawerManager = _interopRequireDefault(require("../../../../../drawer-manag
23
23
 
24
24
  var _tools = require("../../../../../../utils/tools");
25
25
 
26
+ var _openData = require("../../../../../../utils/open-data");
27
+
26
28
  require("./index.css");
27
29
 
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -69,11 +71,13 @@ var Inform = function Inform(props) {
69
71
  }
70
72
 
71
73
  if (objType === _constant.EObjType.Task) {
74
+ // @ts-ignore
72
75
  window.Talent.app.vent.trigger('global-pull-screen', objId, 'task');
73
76
  return;
74
77
  }
75
78
 
76
79
  if (objType === _constant.EObjType.Remind) {
80
+ // @ts-ignore
77
81
  window.Talent.app.vent.trigger('global-daily-detail-pull-screen', objId);
78
82
  return;
79
83
  }
@@ -81,30 +85,12 @@ var Inform = function Inform(props) {
81
85
  if (messageType == 135) {
82
86
  var redisKey = item.content.match(/redisKey=(\S*?)"/)[1]; // @ts-ignore
83
87
 
84
- Talent.app.vent.trigger("open-weekly-report-modal", redisKey);
85
- return;
86
- }
87
-
88
- if (messageType === 99) {
89
- var _options = {
90
- width: 680,
91
- showScroll: false,
92
- type: 'message',
93
- // 推屏类型
94
- data: {
95
- type: 'okrDashBoard',
96
- // 消息类型
97
- objId: item.messageId,
98
- objType: messageType
99
- }
100
- }; // @ts-ignore
101
-
102
- Talent.app.vent.trigger('openReactScreenPush', _options);
88
+ Talent.app.vent.trigger('open-weekly-report-modal', redisKey);
103
89
  return;
104
90
  } // 处理合并的消息
105
91
 
106
92
 
107
- var isMessageMerging = messageType == 13018 || messageType == 30362 || messageType == 131;
93
+ var isMessageMerging = [83, 93, 94, 95, 96, 97, 98, 99, 100, 131, 136, 13018, 30362].includes(messageType);
108
94
 
109
95
  if (!isMessageMerging) {
110
96
  if (messageType === _constant.informType.details) {
@@ -145,7 +131,7 @@ var Inform = function Inform(props) {
145
131
  var _str = item.content.match(/\/\/.*?[\"|\']/gi);
146
132
 
147
133
  if (!_str) return;
148
- _str = _str.join("");
134
+ _str = _str.join('');
149
135
 
150
136
  var _url2 = _str.slice(0, _str.length - 1);
151
137
 
@@ -155,7 +141,7 @@ var Inform = function Inform(props) {
155
141
  var _str2 = item.content.match(/https:.*?[\"|\']/gi);
156
142
 
157
143
  if (!_str2) return;
158
- _str2 = _str2.join("");
144
+ _str2 = _str2.join('');
159
145
 
160
146
  var _url3 = _str2.slice(0, _str2.length - 1);
161
147
 
@@ -178,56 +164,37 @@ var Inform = function Inform(props) {
178
164
  }
179
165
  }
180
166
 
181
- var type = 'eReport'; // E-周报提醒消息合并
167
+ var notificationType = 'e-report'; // E-周报提醒消息合并
168
+
169
+ var content = domRef.current.textContent;
182
170
 
183
171
  if (messageType == '83') {
184
172
  // 项目,目标进展提醒消息合并
185
- type = 'objective';
173
+ notificationType = 'project-objective';
186
174
  } else if (Number(messageType) > 93 && Number(messageType) <= 100) {
187
175
  // OKR 仪表盘消息提醒
188
- type = 'okrDashBoard';
189
- } else if (messageType == 131) {
190
- type = 'performance';
176
+ notificationType = 'okr-dashBoard';
177
+ } else if (messageType == 131 || messageType == 136) {
178
+ notificationType = 'performance';
179
+ content = item.content;
191
180
  }
192
181
 
193
- var options = {
194
- width: 680,
195
- showScroll: true,
196
- type: 'message',
197
- // 推屏类型
198
- data: {
199
- type: type,
200
- // 消息类型
201
- objId: item.messageId,
202
- objType: messageType,
203
- startDate: '',
204
- endDate: ''
182
+ _drawerManager["default"].open('NotificationMergeDetail', {
183
+ config: {
184
+ content: content,
185
+ messageId: item.messageId,
186
+ messageType: item.messageType,
187
+ notificationDate: item.createTime,
188
+ notificationType: notificationType,
189
+ objId: item.objId,
190
+ objType: item.objType
205
191
  }
206
- };
207
-
208
- if (messageType == 83) {
209
- options.data.objType = messageType;
210
- options.data.startDate = item.createTime;
211
- } else if (messageType > 93 && messageType <= 100) {
212
- options.data.startDate = item.createTime;
213
- } else if (messageType == 131) {
214
- options.data.objType = item.objId.split('_')[0];
215
- options.data.startDate = item.objId.split('_')[1];
216
- options.data.endDate = item.objId.split('_')[2];
217
- } else {
218
- var regex = /\((.+?)\)/g,
219
- content = domRef.current.textContent;
220
- var date = [];
221
- date = content.match(regex);
222
- options.data.startDate = date[0].slice(1, date[0].length - 1).split('-')[0]; // @ts-ignore
223
-
224
- options.data.endDate = date[0].slice(1, date[0].length - 1).split('-')[1];
225
- } // @ts-ignore
226
-
227
-
228
- Talent.app.vent.trigger('openReactScreenPush', options);
192
+ }, {
193
+ width: 680
194
+ });
229
195
  };
230
196
 
197
+ ;
231
198
  return /*#__PURE__*/_react["default"].createElement("li", {
232
199
  className: (0, _classnames["default"])("".concat(preCls, "__item"), _defineProperty({}, "".concat(preCls, "__item--scroll"), informs.length >= 4)),
233
200
  key: item.messageId,
@@ -252,14 +219,17 @@ var Inform = function Inform(props) {
252
219
  className: (0, _classnames["default"])("".concat(preCls, "__item-right-name"))
253
220
  }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
254
221
  overlayClassName: "".concat(preCls, "__item-right-name-tooltip"),
255
- text: item.user.name,
222
+ text: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
223
+ id: item.user.userId,
224
+ name: item.user.name
225
+ }),
256
226
  maxWidth: 100,
257
227
  mouseEnterDelay: 0.8
258
228
  })), /*#__PURE__*/_react["default"].createElement("div", {
259
229
  className: (0, _classnames["default"])("".concat(preCls, "__item-right-content"))
260
230
  }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
261
231
  overlayClassName: "".concat(preCls, "__item-right-content-tooltip"),
262
- text: (0, _utils.deleteText)((0, _utils.htmlToText)(item.content)),
232
+ text: (0, _openData.parseString)((0, _utils.deleteText)((0, _utils.htmlToText)(item.content))),
263
233
  isPercent: true,
264
234
  mouseEnterDelay: 0.8
265
235
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -13,6 +13,8 @@ var _avatar = _interopRequireDefault(require("../../../../../../components/avata
13
13
 
14
14
  var _tooltipText = _interopRequireDefault(require("../../../../../tooltip/tooltip-text"));
15
15
 
16
+ var _openData = require("../../../../../../utils/open-data");
17
+
16
18
  var _constant = require("../../constant");
17
19
 
18
20
  var _utils = require("../../utils");
@@ -82,7 +84,10 @@ var Reply = function Reply(props) {
82
84
  className: (0, _classnames["default"])("".concat(preCls, "__item-right-header-name"))
83
85
  }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
84
86
  overlayClassName: "".concat(preCls, "__item-right-header-name-tooltip"),
85
- text: item.user.name,
87
+ text: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
88
+ id: item.user.userId,
89
+ name: item.user.name
90
+ }),
86
91
  maxWidth: 100,
87
92
  mouseEnterDelay: 0.8
88
93
  })), /*#__PURE__*/_react["default"].createElement("span", {
@@ -91,7 +96,7 @@ var Reply = function Reply(props) {
91
96
  className: (0, _classnames["default"])("".concat(preCls, "__item-right-content"))
92
97
  }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
93
98
  overlayClassName: "".concat(preCls, "__item-right-content-tooltip"),
94
- text: feedText(),
99
+ text: (0, _openData.parseString)(feedText()),
95
100
  isPercent: true,
96
101
  mouseEnterDelay: 0.8
97
102
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -17,6 +17,8 @@ var _utils = require("../../utils");
17
17
 
18
18
  var _tools = require("../../../../../../utils/tools");
19
19
 
20
+ var _openData = require("../../../../../../utils/open-data");
21
+
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
23
 
22
24
  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; }
@@ -64,7 +66,10 @@ var TodoItem = function TodoItem(props) {
64
66
  className: (0, _classnames["default"])("".concat(preCls, "__item-right-header-name"))
65
67
  }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
66
68
  overlayClassName: "".concat(preCls, "__item-right-header-name-tooltip"),
67
- text: item.User.name,
69
+ text: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
70
+ id: item.User.userId,
71
+ name: item.User.name
72
+ }),
68
73
  maxWidth: 100,
69
74
  mouseEnterDelay: 0.8
70
75
  })), /*#__PURE__*/_react["default"].createElement("span", {
@@ -73,7 +78,7 @@ var TodoItem = function TodoItem(props) {
73
78
  className: (0, _classnames["default"])("".concat(preCls, "__item-right-content"))
74
79
  }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
75
80
  overlayClassName: "".concat(preCls, "__item-right-content-tooltip"),
76
- text: (0, _utils.deleteText)((0, _utils.htmlToText)(item.content)),
81
+ text: (0, _openData.parseString)((0, _utils.deleteText)((0, _utils.htmlToText)(item.content))),
77
82
  isPercent: true,
78
83
  mouseEnterDelay: 0.8
79
84
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -267,8 +267,10 @@ var EditChildOkrWeight = function EditChildOkrWeight(props) {
267
267
  onChange: onChangeHandler
268
268
  })));
269
269
  }))), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
270
+ zIndex: 1299,
270
271
  visible: showDialogConfirm,
271
- type: "warning"
272
+ type: "warning",
273
+ className: "".concat(precls, "__confirm")
272
274
  }, /*#__PURE__*/_react["default"].createElement("span", {
273
275
  type: "title"
274
276
  }, "\u5F53\u524D\u5B50\u76EE\u6807\u6743\u91CD\u5408\u8BA1\u5C0F\u4E8E100%\uFF0C\u786E\u5B9A\u8981\u4FDD\u5B58\u5417\uFF1F"), /*#__PURE__*/_react["default"].createElement(CancelButton, {
@@ -150,3 +150,7 @@
150
150
  .child-okrs-weight__item-weight-suffix {
151
151
  color: #89919f;
152
152
  }
153
+
154
+ .child-okrs-weight__confirm .titaui-dialog-confirm__body {
155
+ display: flex;
156
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.7.86",
3
+ "version": "1.7.90",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
package/yarn-error.log DELETED
@@ -1,103 +0,0 @@
1
- Arguments:
2
- /usr/local/bin/node /usr/local/bin/yarn
3
-
4
- PATH:
5
- /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/opt/homebrew/bin:/opt/homebrew/sbin
6
-
7
- Yarn version:
8
- 1.22.10
9
-
10
- Node version:
11
- 12.22.1
12
-
13
- Platform:
14
- darwin x64
15
-
16
- Trace:
17
- SyntaxError: /Users/yang/tita/titaui-pc/package.json: Unexpected token < in JSON at position 26
18
- at JSON.parse (<anonymous>)
19
- at /usr/local/lib/node_modules/yarn/lib/cli.js:1625:59
20
- at Generator.next (<anonymous>)
21
- at step (/usr/local/lib/node_modules/yarn/lib/cli.js:310:30)
22
- at /usr/local/lib/node_modules/yarn/lib/cli.js:321:13
23
-
24
- npm manifest:
25
- {
26
- "name": "@titaui/pc",
27
- <<<<<<< HEAD
28
- "version": "1.2.22",
29
- =======
30
- "version": "1.2.13",
31
- >>>>>>> master
32
- "nameCN": "",
33
- "description": "",
34
- "main": "src/index.js",
35
- "scripts": {
36
- "storybook": "start-storybook -p 6006 --no-dll",
37
- "start": "dev_server=on webpack-dev-server --disableHostCheck=true --progress --colors --config webpack-stories.config.js",
38
- "build-storybook": "build-storybook --docs --no-dll",
39
- "build:es": "babel src -d es --ignore **/__tests__",
40
- "build:lib": "cross-env OUTPUT_MODULE=commonjs babel src -d lib --ignore **/__tests__",
41
- "build:umd": "webpack --config ./.scripts/webpack.umd.js",
42
- "build": "npm run build:lib && npm run build:es && npm run build:umd"
43
- },
44
- "author": "",
45
- "license": "ISC",
46
- "devDependencies": {
47
- "del": "^6.0.0",
48
- "gulp": "^3.x",
49
- "gulp-autoprefixer": "^7.0.1",
50
- "gulp-babel": "^8.0.0",
51
- "gulp-concat": "^2.6.1",
52
- "gulp-cssbeautify": "^3.0.0",
53
- "gulp-cssnano": "^2.1.3",
54
- "gulp-filesize": "0.0.6",
55
- "gulp-postcss": "^9.0.0",
56
- "gulp-rename": "^2.0.0",
57
- "gulp-replace": "^1.0.0",
58
- "gulp-sass": "^4.1.0",
59
- "gulp-sourcemaps": "^2.6.5",
60
- "sass-resources-loader": "^2.2.1"
61
- },
62
- "dependencies": {
63
- "@titaui/dagre": "^0.8.8-pre",
64
- "@titaui/rc-tree2": "^4.1.15",
65
- "@titaui/rc-trigger": "^5.2.5",
66
- "@titaui/react-flow-renderer": "9.5.4",
67
- "@titaui/toast": "^1.0.0",
68
- "axios": "^0.21.1",
69
- "classnames": "^2.2.6",
70
- "clone-deep": "^4.0.1",
71
- "d3-cloud": "^1.2.5",
72
- "dayjs": "^1.10.4",
73
- "html2canvas": "^1.0.0-rc.7",
74
- "moment": "^2.29.1",
75
- "qs": "^6.10.1",
76
- "rc-checkbox": "^2.3.2",
77
- "rc-dialog": "8.5.2",
78
- "rc-drawer": "^4.3.1",
79
- "rc-input-number": "^5.0.0",
80
- "rc-pagination": "^3.1.6",
81
- "rc-queue-anim": "1.4.1",
82
- "rc-select": "^12.1.7",
83
- "rc-switch": "^3.2.2",
84
- "rc-table": "^7.13.2",
85
- "rc-tabs": "^11.7.3",
86
- "rc-tooltip": "^5.1.1",
87
- "rc-tree": "^4.1.5",
88
- "rc-trigger": "^5.2.3",
89
- "rc-upload": "^4.2.0-alpha.0",
90
- "rc-util": "^5.13.1",
91
- "react-collapse": "^5.1.0",
92
- "react-perfect-scrollbar": "^1.5.2",
93
- "url-parse": "^1.5.1",
94
- "uuid": "^3.1.0",
95
- "wordcloud": "^1.2.2"
96
- }
97
- }
98
-
99
- yarn manifest:
100
- No manifest
101
-
102
- Lockfile:
103
- No lockfile