@titaui/pc 1.9.107 → 1.9.111

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.
Files changed (62) hide show
  1. package/.eslintrc.js +2 -2
  2. package/lib/components/book-demo/components/pc/components/checkbox/index.css +47 -0
  3. package/lib/components/book-demo/components/pc/components/checkbox/index.js +104 -0
  4. package/lib/components/book-demo/components/pc/components/content/index.css +112 -0
  5. package/lib/components/book-demo/components/pc/components/content/index.js +300 -0
  6. package/lib/components/book-demo/components/pc/components/drop-select/index.css +41 -0
  7. package/lib/components/book-demo/components/pc/components/drop-select/index.js +82 -0
  8. package/lib/components/book-demo/components/pc/components/error-info/index.css +6 -0
  9. package/lib/components/book-demo/components/pc/components/error-info/index.js +24 -0
  10. package/lib/components/book-demo/components/pc/components/input/index.css +40 -0
  11. package/lib/components/book-demo/components/pc/components/input/index.js +93 -0
  12. package/lib/components/book-demo/components/pc/components/phone/index.css +52 -0
  13. package/lib/components/book-demo/components/pc/components/phone/index.js +93 -0
  14. package/lib/components/book-demo/components/pc/components/verify-code/index.css +41 -0
  15. package/lib/components/book-demo/components/pc/components/verify-code/index.js +136 -0
  16. package/lib/components/book-demo/components/pc/index.css +22 -0
  17. package/lib/components/book-demo/components/pc/index.js +135 -0
  18. package/lib/components/book-demo/constant.js +794 -0
  19. package/lib/components/book-demo/img/demo-close.svg +16 -0
  20. package/lib/components/book-demo/img/demo-learning.jpg +0 -0
  21. package/lib/components/book-demo/img/demo-okr.jpg +0 -0
  22. package/lib/components/book-demo/img/demo-performance.jpg +0 -0
  23. package/lib/components/book-demo/img/demo-universal.jpg +0 -0
  24. package/lib/components/book-demo/index.js +22 -0
  25. package/lib/components/book-demo/interface.js +17 -0
  26. package/lib/components/book-demo/utils.js +32 -0
  27. package/lib/components/date-picker/BodyItem.js +3 -3
  28. package/lib/components/date-picker/CalendarHeader.js +3 -3
  29. package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
  30. package/lib/components/dialog/index.css +6 -6
  31. package/lib/components/drop-selector/index.css +1 -0
  32. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +12 -6
  33. package/lib/components/dynamic/dynamic-item/index.js +7 -6
  34. package/lib/components/dynamic/dynamic-list/index.js +10 -6
  35. package/lib/components/dynamic/online-broadcast/data.js +25 -186
  36. package/lib/components/eReport/eReportLists/reportList.js +3 -3
  37. package/lib/components/emotions-selector/selector-pop.js +3 -3
  38. package/lib/components/ereport-list/index.js +3 -3
  39. package/lib/components/help-card/index.js +72 -45
  40. package/lib/components/help-card/interface.js +19 -0
  41. package/lib/components/mblog/components/MblogAction.js +3 -3
  42. package/lib/components/nav-top/components/menu/index.css +1 -85
  43. package/lib/components/nav-top/components/menu/index.js +13 -66
  44. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
  45. package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
  46. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
  47. package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
  48. package/lib/components/select/Option.js +3 -3
  49. package/lib/components/tita-chart/errorBoundary/index.js +3 -3
  50. package/lib/components-v1/animate/AnimateChild.js +3 -3
  51. package/lib/components-v1/avatar/index.js +3 -3
  52. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
  53. package/lib/components-v1/progress/CircleProgress.js +3 -3
  54. package/lib/components-v1/select/Option.js +3 -3
  55. package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
  56. package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
  57. package/lib/components-v1/userSelector/components/UserItem.js +3 -3
  58. package/lib/index.js +8 -0
  59. package/lib/pages/aha2021/index.js +30 -3
  60. package/lib/utils/bs-global.js +1 -0
  61. package/lib/utils/helpers.js +1 -0
  62. package/package.json +1 -3
@@ -47,7 +47,7 @@ var EmotionsSelectorPop = /*#__PURE__*/function (_PureComponent) {
47
47
  var _super = _createSuper(EmotionsSelectorPop);
48
48
 
49
49
  function EmotionsSelectorPop() {
50
- var _temp, _this;
50
+ var _this;
51
51
 
52
52
  _classCallCheck(this, EmotionsSelectorPop);
53
53
 
@@ -55,7 +55,7 @@ var EmotionsSelectorPop = /*#__PURE__*/function (_PureComponent) {
55
55
  args[_key] = arguments[_key];
56
56
  }
57
57
 
58
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
58
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
59
59
  setTimeout(function () {
60
60
  // @ts-ignore
61
61
  _this.refs.pop.show(_this.refs.trigger);
@@ -63,7 +63,7 @@ var EmotionsSelectorPop = /*#__PURE__*/function (_PureComponent) {
63
63
  }, _this.handleHide = function () {
64
64
  // @ts-ignore
65
65
  _this.refs.pop.hide();
66
- }, _temp));
66
+ }, _assertThisInitialized(_this)));
67
67
  }
68
68
 
69
69
  _createClass(EmotionsSelectorPop, [{
@@ -57,7 +57,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
57
57
  var _super = _createSuper(EReportList);
58
58
 
59
59
  function EReportList() {
60
- var _temp, _this;
60
+ var _this;
61
61
 
62
62
  _classCallCheck(this, EReportList);
63
63
 
@@ -65,7 +65,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
65
65
  args[_key] = arguments[_key];
66
66
  }
67
67
 
68
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
68
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
69
69
  selectedPeriodValue: "",
70
70
  showDatePick: false,
71
71
  eReportWeekList: [],
@@ -178,7 +178,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
178
178
  return _this.handlerEReportShareSubmit(submitStatus);
179
179
  }
180
180
  })));
181
- }, _temp));
181
+ }, _assertThisInitialized(_this)));
182
182
  }
183
183
 
184
184
  _createClass(EReportList, [{
@@ -13,7 +13,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
14
  var _popup = _interopRequireDefault(require("../popup"));
15
15
 
16
- var _pointDemo = _interopRequireDefault(require("../point-demo"));
16
+ var _bookDemo = _interopRequireDefault(require("../book-demo"));
17
17
 
18
18
  var _openData = require("../../utils/open-data");
19
19
 
@@ -23,6 +23,18 @@ var _requestApi = require("./request-api");
23
23
 
24
24
  var _tooltip = _interopRequireDefault(require("../tooltip"));
25
25
 
26
+ var _kefu = _interopRequireDefault(require("./image/kefu1.svg"));
27
+
28
+ var _yuyueyanshi = _interopRequireDefault(require("./image/yuyueyanshi.svg"));
29
+
30
+ var _helpzx = _interopRequireDefault(require("./image/helpzx.svg"));
31
+
32
+ var _upgrade = _interopRequireDefault(require("./image/upgrade.svg"));
33
+
34
+ var _okrShequ = _interopRequireDefault(require("./image/okr-shequ.svg"));
35
+
36
+ var _interface = require("./interface");
37
+
26
38
  require("./index.css");
27
39
 
28
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -60,30 +72,39 @@ var HelpCard = function HelpCard(_ref) {
60
72
  pageNum = _useState4[0],
61
73
  setPageNum = _useState4[1];
62
74
 
63
- var _useState5 = (0, _react.useState)(false),
75
+ var _useState5 = (0, _react.useState)([]),
64
76
  _useState6 = _slicedToArray(_useState5, 2),
65
- pointVisible = _useState6[0],
66
- setPointVisible = _useState6[1];
77
+ guessList = _useState6[0],
78
+ setGuessList = _useState6[1];
67
79
 
68
80
  var _useState7 = (0, _react.useState)([]),
69
81
  _useState8 = _slicedToArray(_useState7, 2),
70
- guessList = _useState8[0],
71
- setGuessList = _useState8[1];
82
+ recommendList = _useState8[0],
83
+ setRecommendList = _useState8[1];
72
84
 
73
- var _useState9 = (0, _react.useState)([]),
85
+ var _useState9 = (0, _react.useState)(0),
74
86
  _useState10 = _slicedToArray(_useState9, 2),
75
- recommendList = _useState10[0],
76
- setRecommendList = _useState10[1];
77
-
78
- var _useState11 = (0, _react.useState)(0),
79
- _useState12 = _slicedToArray(_useState11, 2),
80
- guessQuestionNum = _useState12[0],
81
- setGuessQuestionNum = _useState12[1];
87
+ guessQuestionNum = _useState10[0],
88
+ setGuessQuestionNum = _useState10[1];
82
89
 
83
- var isTrial = (0, _bsGlobal.getVersion)() == 1;
84
- var userId = window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0;
90
+ var bookDemoRef = (0, _react.useRef)();
91
+ var isTrial = (0, _bsGlobal.getVersion)() === 1;
85
92
  var kefuUrl = isTrial ? "https://wpa1.qq.com/vZYKN3kT?_type=wpa&qidian=true" : "https://wpa1.qq.com/o6X4XD1n?_type=wpa&qidian=true";
86
93
 
94
+ var getBookDemoVersion = function getBookDemoVersion() {
95
+ var menuVersion = window.BSGlobal.tenantAuthentication.MenuVersion;
96
+
97
+ if (menuVersion === _interface.ETrialVersion.OKR) {
98
+ return _bookDemo["default"].DemoType.TryOKR;
99
+ }
100
+
101
+ if (menuVersion === _interface.ETrialVersion.Performance) {
102
+ return _bookDemo["default"].DemoType.TryPerformance;
103
+ }
104
+
105
+ return _bookDemo["default"].DemoType.UniversalBookDemo;
106
+ };
107
+
87
108
  var handleSkip = function handleSkip(url) {
88
109
  setVisible(false);
89
110
  window.open(url);
@@ -108,14 +129,28 @@ var HelpCard = function HelpCard(_ref) {
108
129
 
109
130
  var handlePoint = function handlePoint() {
110
131
  setVisible(false);
111
- setPointVisible(true); // @ts-ignore
112
132
 
113
- window.titaTracker // @ts-ignore
114
- && window.titaTracker("action").record({
115
- actionName: "申请演示",
116
- actionGroup: "试用版-申请演示",
117
- productName: "系统内-申请演示"
118
- });
133
+ if (bookDemoRef.current) {
134
+ bookDemoRef.current.show();
135
+ }
136
+
137
+ if (window.titaTracker) {
138
+ window.titaTracker("action").record({
139
+ actionName: "申请演示",
140
+ actionGroup: "试用版-申请演示",
141
+ productName: "系统内-申请演示"
142
+ });
143
+ }
144
+ };
145
+
146
+ var handleClickTracker = function handleClickTracker(title) {
147
+ if (window.titaTracker) {
148
+ window.titaTracker("action").record({
149
+ actionName: "Tita\u5C0F\u52A9\u624B__".concat(title),
150
+ actionGroup: "Tita小助手",
151
+ productName: "Tita小助手"
152
+ });
153
+ }
119
154
  };
120
155
 
121
156
  var handleHelpCenter = function handleHelpCenter() {
@@ -150,16 +185,6 @@ var HelpCard = function HelpCard(_ref) {
150
185
  handleClickTracker("升级通知");
151
186
  };
152
187
 
153
- var handleClickTracker = function handleClickTracker(title) {
154
- // @ts-ignore
155
- window.titaTracker // @ts-ignore
156
- && window.titaTracker("action").record({
157
- actionName: "Tita\u5C0F\u52A9\u624B__".concat(title),
158
- actionGroup: "Tita小助手",
159
- productName: "Tita小助手"
160
- });
161
- };
162
-
163
188
  var chageBatch = function chageBatch() {
164
189
  if (guessQuestionNum > pageNum * 3) {
165
190
  setPageNum(pageNum + 1);
@@ -169,12 +194,12 @@ var HelpCard = function HelpCard(_ref) {
169
194
  };
170
195
 
171
196
  var renderKefu = function renderKefu() {
172
- if ((0, _openData.isPlatform)("feishu") || (0, _openData.isPlatform)("dd") || (0, _openData.isWxTrial)()) return;
197
+ if ((0, _openData.isPlatform)("feishu") || (0, _openData.isPlatform)("dd") || (0, _openData.isWxTrial)()) return /*#__PURE__*/_react["default"].createElement("span", null);
173
198
  return /*#__PURE__*/_react["default"].createElement("div", {
174
199
  className: "".concat(preCls, "__footer-item"),
175
200
  onClick: handleCustomerService
176
201
  }, /*#__PURE__*/_react["default"].createElement("img", {
177
- src: require("./image/kefu1.svg"),
202
+ src: _kefu["default"],
178
203
  alt: "\u8054\u7CFB\u5BA2\u670D"
179
204
  }), "\u8054\u7CFB\u5BA2\u670D");
180
205
  };
@@ -201,13 +226,13 @@ var HelpCard = function HelpCard(_ref) {
201
226
  className: "tu-icon-gengxin1"
202
227
  }), "\u6362\u4E00\u6279")), /*#__PURE__*/_react["default"].createElement("div", {
203
228
  className: "".concat(preCls, "__body-item-content")
204
- }, guessList.map(function (item, key) {
229
+ }, guessList.map(function (item) {
205
230
  return /*#__PURE__*/_react["default"].createElement("div", {
206
231
  className: "".concat(preCls, "__body-item-content-item"),
207
232
  onClick: function onClick() {
208
233
  return handleSkip(item.questionUrl);
209
234
  },
210
- key: key
235
+ key: item.questionUrl + item.questionName
211
236
  }, item.questionName);
212
237
  }))), /*#__PURE__*/_react["default"].createElement("div", {
213
238
  className: "".concat(preCls, "__body-item")
@@ -217,13 +242,13 @@ var HelpCard = function HelpCard(_ref) {
217
242
  className: "".concat(preCls, "__body-item-title-left")
218
243
  }, "\u63A8\u8350\u67E5\u770B")), /*#__PURE__*/_react["default"].createElement("div", {
219
244
  className: "".concat(preCls, "__body-item-content")
220
- }, recommendList.map(function (item, key) {
245
+ }, recommendList.map(function (item) {
221
246
  return /*#__PURE__*/_react["default"].createElement("div", {
222
247
  className: "".concat(preCls, "__body-item-content-item"),
223
248
  onClick: function onClick() {
224
249
  return handleSkip(item.questionUrl);
225
250
  },
226
- key: key
251
+ key: item.questionUrl + item.questionName
227
252
  }, item.questionName);
228
253
  })))), /*#__PURE__*/_react["default"].createElement("div", {
229
254
  className: "".concat(preCls, "__footer")
@@ -231,25 +256,25 @@ var HelpCard = function HelpCard(_ref) {
231
256
  className: "".concat(preCls, "__footer-item"),
232
257
  onClick: handlePoint
233
258
  }, /*#__PURE__*/_react["default"].createElement("img", {
234
- src: require("./image/yuyueyanshi.svg"),
259
+ src: _yuyueyanshi["default"],
235
260
  alt: "\u9884\u7EA6\u6F14\u793A"
236
261
  }), "\u9884\u7EA6\u6F14\u793A"), /*#__PURE__*/_react["default"].createElement("div", {
237
262
  className: "".concat(preCls, "__footer-item"),
238
263
  onClick: handleHelpCenter
239
264
  }, /*#__PURE__*/_react["default"].createElement("img", {
240
- src: require("./image/helpzx.svg"),
265
+ src: _helpzx["default"],
241
266
  alt: "\u5E2E\u52A9\u4E2D\u5FC3"
242
267
  }), "\u5E2E\u52A9\u4E2D\u5FC3"), !isTrial && /*#__PURE__*/_react["default"].createElement("div", {
243
268
  className: "".concat(preCls, "__footer-item"),
244
269
  onClick: handleUpgrade
245
270
  }, /*#__PURE__*/_react["default"].createElement("img", {
246
- src: require("./image/upgrade.svg"),
271
+ src: _upgrade["default"],
247
272
  alt: "\u5347\u7EA7\u901A\u77E5"
248
273
  }), "\u5347\u7EA7\u901A\u77E5"), !(0, _openData.isPlatform)("feishu") && /*#__PURE__*/_react["default"].createElement("div", {
249
274
  className: "".concat(preCls, "__footer-item"),
250
275
  onClick: handleKnowledgeCommunity
251
276
  }, /*#__PURE__*/_react["default"].createElement("img", {
252
- src: require("./image/okr-shequ.svg"),
277
+ src: _okrShequ["default"],
253
278
  alt: "\u77E5\u8BC6\u793E\u533A"
254
279
  }), "\u77E5\u8BC6\u793E\u533A"), renderKefu()));
255
280
  };
@@ -279,8 +304,10 @@ var HelpCard = function HelpCard(_ref) {
279
304
  className: (0, _classnames["default"])("home-fixed-kefu-image", {
280
305
  "home-fixed-kefu-canceled": visible
281
306
  })
282
- })))), pointVisible && /*#__PURE__*/_react["default"].createElement(_pointDemo["default"], {
283
- setVisible: setPointVisible
307
+ })))), /*#__PURE__*/_react["default"].createElement(_bookDemo["default"].BookDemoPC, {
308
+ visible: false,
309
+ ref: bookDemoRef,
310
+ type: getBookDemoVersion()
284
311
  }));
285
312
  };
286
313
 
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.ETrialVersion = void 0;
7
+ var ETrialVersion;
8
+ exports.ETrialVersion = ETrialVersion;
9
+
10
+ (function (ETrialVersion) {
11
+ ETrialVersion[ETrialVersion["OKR"] = 9] = "OKR";
12
+ ETrialVersion[ETrialVersion["Performance"] = 8] = "Performance";
13
+ ETrialVersion[ETrialVersion["Pro"] = 6] = "Pro";
14
+ })(ETrialVersion || (exports.ETrialVersion = ETrialVersion = {}));
15
+
16
+ var _default = {
17
+ ETrialVersion: ETrialVersion
18
+ };
19
+ exports["default"] = _default;
@@ -83,7 +83,7 @@ var MblogAction = /*#__PURE__*/function (_PureComponent) {
83
83
  var _super = _createSuper(MblogAction);
84
84
 
85
85
  function MblogAction() {
86
- var _temp, _this;
86
+ var _this;
87
87
 
88
88
  _classCallCheck(this, MblogAction);
89
89
 
@@ -91,7 +91,7 @@ var MblogAction = /*#__PURE__*/function (_PureComponent) {
91
91
  args[_key] = arguments[_key];
92
92
  }
93
93
 
94
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
94
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
95
95
  isSendSms: false,
96
96
  // 是否短信通知
97
97
  isShowConfirmPop: false
@@ -121,7 +121,7 @@ var MblogAction = /*#__PURE__*/function (_PureComponent) {
121
121
  isSendSms: false
122
122
  });
123
123
  }
124
- }, _temp));
124
+ }, _assertThisInitialized(_this)));
125
125
  }
126
126
 
127
127
  _createClass(MblogAction, [{
@@ -28,7 +28,7 @@
28
28
  .titaui-nav-top-menu__menu-show--active::after {
29
29
  position: absolute;
30
30
  display: inline-block;
31
- content: "";
31
+ content: '';
32
32
  width: 30px;
33
33
  height: 10px;
34
34
  background: linear-gradient(180deg, #ffffff 0%, rgba(40, 121, 255, 0) 100%);
@@ -93,90 +93,6 @@
93
93
  position: relative;
94
94
  }
95
95
 
96
- .titaui-nav-top-menu__tips {
97
- position: relative;
98
- }
99
-
100
- .titaui-nav-top-menu__tips-new {
101
- width: 36px;
102
- height: 26px;
103
- position: absolute;
104
- top: 6px;
105
- right: -8px;
106
- }
107
-
108
- .titaui-nav-top-menu__tips-box {
109
- width: 308px;
110
- height: 142px;
111
- box-sizing: border-box;
112
- padding: 16px;
113
- background: #2879ff;
114
- box-shadow: 0px -4px 12px 0px rgba(127, 145, 180, 0.2);
115
- border: 1px solid #eff0f1;
116
- border-radius: 12px;
117
- z-index: 99;
118
- }
119
-
120
- .titaui-nav-top-menu__tips-box-title {
121
- display: block;
122
- font-size: 14px;
123
- color: #ffffff;
124
- line-height: 22px;
125
- font-weight: 600;
126
- }
127
-
128
- .titaui-nav-top-menu__tips-box-content {
129
- font-size: 12px;
130
- color: #ffffff;
131
- line-height: 18px;
132
- margin-top: 10px;
133
- margin-left: 20px;
134
- }
135
-
136
- .titaui-nav-top-menu__tips-box-ok {
137
- height: 28px;
138
- margin-top: 8px;
139
- margin-left: 210px;
140
- background: #ffffff;
141
- box-shadow: 0px -4px 12px 0px rgba(127, 145, 180, 0.2);
142
- border-radius: 14px;
143
- box-sizing: border-box;
144
- padding: 3px 17px;
145
- font-size: 14px;
146
- color: #2879FF;
147
- line-height: 22px;
148
- cursor: pointer;
149
- }
150
-
151
- .titaui-nav-top-menu__tips-triangle {
152
- position: absolute;
153
- top: -4px;
154
- left: 50%;
155
- margin-left: -4px;
156
- width: 0;
157
- height: 0;
158
- border-left: 5px solid transparent;
159
- border-right: 5px solid transparent;
160
- border-bottom: 5px solid #fff;
161
- }
162
-
163
- .titaui-nav-top-menu__tips-triangle::after {
164
- content: "";
165
- width: 0;
166
- height: 0;
167
- position: absolute;
168
- left: -4px;
169
- top: 2px;
170
- border-left: solid 4px transparent;
171
- border-right: solid 4px transparent;
172
- border-bottom: solid 4px #2879ff;
173
- z-index: 99;
174
- }
175
-
176
- .titaui-nav-top-menu__tips-hide {
177
- display: none;
178
- }
179
-
180
96
  .titaui-nav-top-menu .rc-overflow-item {
181
97
  position: relative;
182
98
  }
@@ -19,8 +19,6 @@ var _popup = _interopRequireDefault(require("../../../popup"));
19
19
 
20
20
  var _conditionRender = _interopRequireDefault(require("../../../../components/condition-render"));
21
21
 
22
- var _new = _interopRequireDefault(require("./img/new.png"));
23
-
24
22
  require("./index.css");
25
23
 
26
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -62,11 +60,6 @@ var Menu = function Menu(_ref) {
62
60
  popupVisible = _useState2[0],
63
61
  setPopupVisible = _useState2[1];
64
62
 
65
- var _useState3 = (0, _react.useState)(false),
66
- _useState4 = _slicedToArray(_useState3, 2),
67
- isKnow = _useState4[0],
68
- setIsKonw = _useState4[1];
69
-
70
63
  var containerRef = (0, _react.useRef)();
71
64
  var apiPath = (0, _bsGlobal.getBSGlobal)("apiPath");
72
65
  var userId = (0, _bsGlobal.getUserInfo)().Id;
@@ -76,63 +69,26 @@ var Menu = function Menu(_ref) {
76
69
  };
77
70
 
78
71
  var handleTracker = function handleTracker(menu) {
79
- // @ts-ignore
80
- window.titaTracker // @ts-ignore
81
- && window.titaTracker("action").record({
82
- actionName: "\u5BFC\u822A\u83DC\u5355__".concat(menu.title),
83
- actionGroup: "导航菜单",
84
- productName: "导航菜单"
85
- });
86
- };
87
-
88
- var handleClick = function handleClick() {
89
- setIsKonw(true);
90
- localStorage.setItem("isKonwLearning".concat(userId), "".concat(userId));
91
- };
92
-
93
- var popupAlign2 = {
94
- offset: [104, -5],
95
- overflow: {
96
- adjustX: true,
97
- adjustY: true
98
- },
99
- targetOffset: [0, 0]
72
+ if (window.titaTracker) {
73
+ window.titaTracker("action").record({
74
+ actionName: "\u5BFC\u822A\u83DC\u5355__".concat(menu.title),
75
+ actionGroup: "导航菜单",
76
+ productName: "导航菜单"
77
+ });
78
+ }
100
79
  };
101
80
 
102
81
  var handleClickToLearning = function handleClickToLearning() {
103
82
  window.open("".concat(apiPath, "/").concat(userId, "/eLearningHome#/"), "_self");
104
83
  };
105
84
 
106
- (0, _react.useEffect)(function () {
107
- var isKnow = localStorage.getItem("isKonwLearning".concat(userId));
108
-
109
- if (isKnow) {
110
- setIsKonw(true);
111
- }
112
- }, []);
113
-
114
- var popup = /*#__PURE__*/_react["default"].createElement("div", {
115
- className: "".concat(prefix, "__tips")
116
- }, /*#__PURE__*/_react["default"].createElement("div", {
117
- className: (0, _classnames["default"])("".concat(prefix, "__tips-box"), _defineProperty({}, "".concat(prefix, "__tips-hide"), isKnow))
118
- }, /*#__PURE__*/_react["default"].createElement("span", {
119
- className: "".concat(prefix, "__tips-box-title")
120
- }, "\uD83C\uDF89 Tita Learning \u4E0A\u7EBF\u5566"), /*#__PURE__*/_react["default"].createElement("p", {
121
- className: "".concat(prefix, "__tips-box-content")
122
- }, "OKR \u5B66\u4E60\u8D44\u6599\uFF0COKR \u63A8\u8FDB\u65B9\u6CD5\uFF0COKR\u6559\u7EC3\u5728\u7EBF\u6307\u5BFC\uFF0C\u901A\u901A\u90FD\u5728\u8FD9\u91CC\uFF01\u5FEB\u6765\u770B\u770B\u5427\uFF01"), /*#__PURE__*/_react["default"].createElement("div", {
123
- className: "".concat(prefix, "__tips-box-ok"),
124
- onClick: handleClick
125
- }, "\u597D\u54D2")), /*#__PURE__*/_react["default"].createElement("div", {
126
- className: (0, _classnames["default"])("".concat(prefix, "__tips-triangle"), _defineProperty({}, "".concat(prefix, "__tips-hide"), isKnow))
127
- }));
128
-
129
85
  var renderRawItem = function renderRawItem(menu) {
130
86
  return /*#__PURE__*/_react["default"].createElement(_rcOverflow["default"].Item, {
131
87
  component: "span"
132
88
  }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
133
89
  condition: menu.title !== "Learning"
134
90
  }, /*#__PURE__*/_react["default"].createElement("a", {
135
- className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId == menu.id)),
91
+ className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
136
92
  href: "".concat(menu.href),
137
93
  target: "_self",
138
94
  onClick: function onClick() {
@@ -140,28 +96,19 @@ var Menu = function Menu(_ref) {
140
96
  }
141
97
  }, menu.title)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
142
98
  condition: menu.title === "Learning"
143
- }, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
144
- popupVisible: !isKnow,
145
- popup: popup,
146
- mask: false,
147
- action: ["focus"],
148
- popupAlign: popupAlign2
149
99
  }, /*#__PURE__*/_react["default"].createElement("span", {
150
- className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId == menu.id)),
100
+ className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
151
101
  onClick: function onClick() {
152
102
  handleTracker(menu);
153
103
  handleClickToLearning();
154
104
  }
155
- }, menu.title)), /*#__PURE__*/_react["default"].createElement("img", {
156
- src: _new["default"],
157
- className: "".concat(prefix, "__tips-new")
158
- })));
105
+ }, menu.title)));
159
106
  };
160
107
 
161
108
  var renderRest = function renderRest(items) {
162
109
  if (items.length === 0) return null;
163
110
  var isActiveHideMeun = items.filter(function (item) {
164
- return item.id == activeMenuId;
111
+ return item.id === activeMenuId;
165
112
  }).length > 0;
166
113
 
167
114
  var popContent = /*#__PURE__*/_react["default"].createElement("div", {
@@ -170,14 +117,14 @@ var Menu = function Menu(_ref) {
170
117
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
171
118
  condition: menu.title !== "Learning"
172
119
  }, /*#__PURE__*/_react["default"].createElement("a", {
173
- className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId == menu.id)),
120
+ className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId === menu.id)),
174
121
  href: "".concat(menu.href),
175
122
  key: menu.id,
176
123
  target: "_self"
177
124
  }, menu.title)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
178
125
  condition: menu.title === "Learning"
179
126
  }, /*#__PURE__*/_react["default"].createElement("a", {
180
- className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId == menu.id)),
127
+ className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId === menu.id)),
181
128
  href: "".concat(apiPath, "/").concat(userId, "/eLearningHome#/"),
182
129
  key: menu.id,
183
130
  target: "_self"
@@ -81,7 +81,7 @@ var EditPop = /*#__PURE__*/function (_PureComponent) {
81
81
  var _super = _createSuper(EditPop);
82
82
 
83
83
  function EditPop() {
84
- var _temp, _this;
84
+ var _this;
85
85
 
86
86
  _classCallCheck(this, EditPop);
87
87
 
@@ -89,7 +89,7 @@ var EditPop = /*#__PURE__*/function (_PureComponent) {
89
89
  args[_key] = arguments[_key];
90
90
  }
91
91
 
92
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
92
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
93
93
  value: _this.props.value,
94
94
  showError: false,
95
95
  errMsg: "",
@@ -152,7 +152,7 @@ var EditPop = /*#__PURE__*/function (_PureComponent) {
152
152
  errMsg: (0, _i18nFrontTranslate.inputWordTrans)(value.length, maxLength),
153
153
  disable: !!(maxLength && value.length > maxLength && disable)
154
154
  });
155
- }, _temp));
155
+ }, _assertThisInitialized(_this)));
156
156
  }
157
157
 
158
158
  _createClass(EditPop, [{
@@ -45,7 +45,7 @@ var ReviewItem = /*#__PURE__*/function (_PureComponent) {
45
45
  var _super = _createSuper(ReviewItem);
46
46
 
47
47
  function ReviewItem() {
48
- var _temp, _this;
48
+ var _this;
49
49
 
50
50
  _classCallCheck(this, ReviewItem);
51
51
 
@@ -53,14 +53,14 @@ var ReviewItem = /*#__PURE__*/function (_PureComponent) {
53
53
  args[_key] = arguments[_key];
54
54
  }
55
55
 
56
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this._handlerLinkToReviewDetail = function () {
56
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this._handlerLinkToReviewDetail = function () {
57
57
  var _this$props = _this.props,
58
58
  feedId = _this$props.feedId,
59
59
  reviewItemData = _this$props.reviewItemData,
60
60
  krIndex = _this$props.krIndex,
61
61
  editAble = _this$props.editAble;
62
62
  window.open("".concat(location.pathname, "#okr/reviewDetail?okrId=8077&back=").concat(location.hash, "&replayId=").concat(reviewItemData.replayId, "&feedId=").concat(feedId, "&krIndex=").concat(krIndex, "&editAble=").concat(editAble));
63
- }, _temp));
63
+ }, _assertThisInitialized(_this)));
64
64
  }
65
65
 
66
66
  _createClass(ReviewItem, [{
@@ -49,7 +49,7 @@ var ConfirmPop = /*#__PURE__*/function (_PureComponent) {
49
49
  var _super = _createSuper(ConfirmPop);
50
50
 
51
51
  function ConfirmPop() {
52
- var _temp, _this;
52
+ var _this;
53
53
 
54
54
  _classCallCheck(this, ConfirmPop);
55
55
 
@@ -57,13 +57,13 @@ var ConfirmPop = /*#__PURE__*/function (_PureComponent) {
57
57
  args[_key] = arguments[_key];
58
58
  }
59
59
 
60
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
60
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
61
61
  // @ts-ignore
62
62
  _this.refs.pop.show(_this.refs.trigger);
63
63
  }, _this.handleHide = function () {
64
64
  // @ts-ignore
65
65
  _this.refs.pop.hide();
66
- }, _temp));
66
+ }, _assertThisInitialized(_this)));
67
67
  }
68
68
 
69
69
  _createClass(ConfirmPop, [{
@@ -45,7 +45,7 @@ var RangeSelectorPop = /*#__PURE__*/function (_PureComponent) {
45
45
  var _super = _createSuper(RangeSelectorPop);
46
46
 
47
47
  function RangeSelectorPop() {
48
- var _temp, _this;
48
+ var _this;
49
49
 
50
50
  _classCallCheck(this, RangeSelectorPop);
51
51
 
@@ -53,7 +53,7 @@ var RangeSelectorPop = /*#__PURE__*/function (_PureComponent) {
53
53
  args[_key] = arguments[_key];
54
54
  }
55
55
 
56
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
56
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
57
57
  var isDisabled = _this.props.isDisabled;
58
58
  if (isDisabled) return; // @ts-ignore
59
59
 
@@ -61,7 +61,7 @@ var RangeSelectorPop = /*#__PURE__*/function (_PureComponent) {
61
61
  }, _this.handleHide = function () {
62
62
  // @ts-ignore
63
63
  _this.refs.pop.hide();
64
- }, _temp));
64
+ }, _assertThisInitialized(_this)));
65
65
  }
66
66
 
67
67
  _createClass(RangeSelectorPop, [{