@titaui/pc 1.7.73 → 1.7.74

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.
@@ -76,12 +76,30 @@ var Inform = function Inform(props) {
76
76
  if (messageType == 135) {
77
77
  var redisKey = item.content.match(/redisKey=(\S*?)"/)[1]; // @ts-ignore
78
78
 
79
- Talent.app.vent.trigger('open-weekly-report-modal', redisKey);
79
+ Talent.app.vent.trigger("open-weekly-report-modal", redisKey);
80
+ return;
81
+ }
82
+
83
+ if (messageType === 99) {
84
+ var _options = {
85
+ width: 680,
86
+ showScroll: false,
87
+ type: 'message',
88
+ // 推屏类型
89
+ data: {
90
+ type: 'okrDashBoard',
91
+ // 消息类型
92
+ objId: item.messageId,
93
+ objType: messageType
94
+ }
95
+ }; // @ts-ignore
96
+
97
+ Talent.app.vent.trigger('openReactScreenPush', _options);
80
98
  return;
81
99
  } // 处理合并的消息
82
100
 
83
101
 
84
- var isMessageMerging = [83, 93, 94, 95, 96, 97, 98, 99, 100, 131, 136, 13018, 30362].includes(messageType);
102
+ var isMessageMerging = messageType == 13018 || messageType == 30362 || messageType == 131;
85
103
 
86
104
  if (!isMessageMerging) {
87
105
  if (messageType === _constant.informType.details) {
@@ -93,11 +111,11 @@ var Inform = function Inform(props) {
93
111
  } else if (objType === 0) {
94
112
  var str = item.content.match(/\/\/.*?[\"|\']/gi);
95
113
  if (!str) return;
96
- str = str.join('');
114
+ str = str.join("");
97
115
  var url = str.slice(0, str.length - 1);
98
116
 
99
117
  if (url) {
100
- if (item.content.indexOf('点击此处下载') !== -1) {
118
+ if (item.content.indexOf("点击此处下载") !== -1) {
101
119
  window.open(url, '_self');
102
120
  }
103
121
 
@@ -120,7 +138,7 @@ var Inform = function Inform(props) {
120
138
  var _str = item.content.match(/\/\/.*?[\"|\']/gi);
121
139
 
122
140
  if (!_str) return;
123
- _str = _str.join('');
141
+ _str = _str.join("");
124
142
 
125
143
  var _url2 = _str.slice(0, _str.length - 1);
126
144
 
@@ -130,7 +148,7 @@ var Inform = function Inform(props) {
130
148
  var _str2 = item.content.match(/https:.*?[\"|\']/gi);
131
149
 
132
150
  if (!_str2) return;
133
- _str2 = _str2.join('');
151
+ _str2 = _str2.join("");
134
152
 
135
153
  var _url3 = _str2.slice(0, _str2.length - 1);
136
154
 
@@ -153,37 +171,56 @@ var Inform = function Inform(props) {
153
171
  }
154
172
  }
155
173
 
156
- var notificationType = 'e-report'; // E-周报提醒消息合并
157
-
158
- var content = domRef.current.textContent;
174
+ var type = 'eReport'; // E-周报提醒消息合并
159
175
 
160
176
  if (messageType == '83') {
161
177
  // 项目,目标进展提醒消息合并
162
- notificationType = 'project-objective';
178
+ type = 'objective';
163
179
  } else if (Number(messageType) > 93 && Number(messageType) <= 100) {
164
180
  // OKR 仪表盘消息提醒
165
- notificationType = 'okr-dashBoard';
166
- } else if (messageType == 131 || messageType == 136) {
167
- notificationType = 'performance';
168
- content = item.content;
181
+ type = 'okrDashBoard';
182
+ } else if (messageType == 131) {
183
+ type = 'performance';
169
184
  }
170
185
 
171
- _drawerManager["default"].open('NotificationMergeDetail', {
172
- config: {
173
- content: content,
174
- messageId: item.messageId,
175
- messageType: item.messageType,
176
- notificationDate: item.createTime,
177
- notificationType: notificationType,
178
- objId: item.objId,
179
- objType: item.objType
186
+ var options = {
187
+ width: 680,
188
+ showScroll: true,
189
+ type: 'message',
190
+ // 推屏类型
191
+ data: {
192
+ type: type,
193
+ // 消息类型
194
+ objId: item.messageId,
195
+ objType: messageType,
196
+ startDate: '',
197
+ endDate: ''
180
198
  }
181
- }, {
182
- width: 680
183
- });
199
+ };
200
+
201
+ if (messageType == 83) {
202
+ options.data.objType = messageType;
203
+ options.data.startDate = item.createTime;
204
+ } else if (messageType > 93 && messageType <= 100) {
205
+ options.data.startDate = item.createTime;
206
+ } else if (messageType == 131) {
207
+ options.data.objType = item.objId.split('_')[0];
208
+ options.data.startDate = item.objId.split('_')[1];
209
+ options.data.endDate = item.objId.split('_')[2];
210
+ } else {
211
+ var regex = /\((.+?)\)/g,
212
+ content = domRef.current.textContent;
213
+ var date = [];
214
+ date = content.match(regex);
215
+ options.data.startDate = date[0].slice(1, date[0].length - 1).split('-')[0]; // @ts-ignore
216
+
217
+ options.data.endDate = date[0].slice(1, date[0].length - 1).split('-')[1];
218
+ } // @ts-ignore
219
+
220
+
221
+ Talent.app.vent.trigger('openReactScreenPush', options);
184
222
  };
185
223
 
186
- ;
187
224
  return /*#__PURE__*/_react["default"].createElement("li", {
188
225
  className: (0, _classnames["default"])("".concat(preCls, "__item"), _defineProperty({}, "".concat(preCls, "__item--scroll"), informs.length >= 4)),
189
226
  key: item.messageId,
@@ -50,6 +50,7 @@ function PeriodSelector(_ref) {
50
50
  _ref$isFetch = _ref.isFetch,
51
51
  isFetch = _ref$isFetch === void 0 ? true : _ref$isFetch,
52
52
  onChange = _ref.onChange,
53
+ getPopupContainer = _ref.getPopupContainer,
53
54
  selected = _ref.selected,
54
55
  selectorClass = _ref.selectorClass,
55
56
  _ref$showCustom = _ref.showCustom,
@@ -163,6 +164,7 @@ function PeriodSelector(_ref) {
163
164
  className: (0, _classnames["default"])("titaui-period-selector"),
164
165
  style: style
165
166
  }, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
167
+ getPopupContainer: getPopupContainer,
166
168
  popupVisible: visible,
167
169
  popupPlacement: align,
168
170
  extraClass: popClass,
@@ -54,6 +54,8 @@ var Principal = function Principal(props) {
54
54
  selectText = _useState6[0],
55
55
  setSelectText = _useState6[1];
56
56
 
57
+ var userSelectorRef = (0, _react.useRef)(document.createElement('div'));
58
+
57
59
  var onSelectUser = function onSelectUser(_ref) {
58
60
  var users = _ref.users;
59
61
  return setUsers(users);
@@ -83,24 +85,29 @@ var Principal = function Principal(props) {
83
85
 
84
86
  isInit && onChange(users);
85
87
  }, [users]);
86
- return /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
88
+ return /*#__PURE__*/_react["default"].createElement("div", {
89
+ ref: userSelectorRef
90
+ }, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
87
91
  multiple: true,
88
92
  selectNodes: {
89
93
  users: users
90
94
  },
91
95
  onOk: onSelectUser,
92
- position: "bottomLeft",
96
+ position: "bottom",
93
97
  disabledDepartSelect: true,
94
98
  panes: {
95
99
  depart: true
96
100
  },
101
+ getPopupContainer: function getPopupContainer() {
102
+ return userSelectorRef.current;
103
+ },
97
104
  searchedPanes: {
98
105
  user: true
99
106
  },
100
107
  popClass: "pull-screen-ignore"
101
108
  }, /*#__PURE__*/_react["default"].createElement(_searchDropdown["default"], null, /*#__PURE__*/_react["default"].createElement("span", {
102
109
  className: "titaui-search-dropdown__principal-text"
103
- }, selectText)));
110
+ }, selectText))));
104
111
  };
105
112
 
106
113
  var _default = Principal;
@@ -82,6 +82,7 @@ var SearchForm = function SearchForm(props) {
82
82
  relation = _useState10[0],
83
83
  setRelation = _useState10[1];
84
84
 
85
+ var dilagRef = (0, _react.useRef)(document.createElement('div'));
85
86
  (0, _react.useEffect)(function () {
86
87
  onChange(_objectSpread({
87
88
  okrType: okrType,
@@ -93,12 +94,17 @@ var SearchForm = function SearchForm(props) {
93
94
  relation: relation
94
95
  }, cycle));
95
96
  }, [okrType, users, keyWords, cycle, relation]);
96
- return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
97
+ return /*#__PURE__*/_react["default"].createElement("div", {
98
+ ref: dilagRef
99
+ }, /*#__PURE__*/_react["default"].createElement("div", {
97
100
  className: "rel-okr-tree__search-item"
98
101
  }, /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
99
102
  selected: cycle,
100
103
  yearsRange: [2019, 2030],
101
104
  onChange: setCycle,
105
+ getPopupContainer: function getPopupContainer() {
106
+ return dilagRef.current;
107
+ },
102
108
  popClass: "pull-screen-ignore"
103
109
  }, /*#__PURE__*/_react["default"].createElement(_searchDropdown["default"], null, (0, _common.formatPeriod)(cycle)))), /*#__PURE__*/_react["default"].createElement("div", {
104
110
  className: "rel-okr-tree__search-item"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.7.73",
3
+ "version": "1.7.74",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
package/yarn-error.log ADDED
@@ -0,0 +1,103 @@
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