@titaui/pc 1.12.13 → 1.12.16

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 (95) hide show
  1. package/lib/components/communication/index.js +6 -0
  2. package/lib/components/drawer/index.css +9 -0
  3. package/lib/components/drawer/index.js +11 -8
  4. package/lib/components/dynamic/dynamic-item/index.js +9 -1
  5. package/lib/components/dynamic/dynamic-list/index.js +19 -2
  6. package/lib/components/form/form-fields/date/index.js +13 -13
  7. package/lib/components/help-card/image/liaojie1.svg +50 -0
  8. package/lib/components/help-card/index.css +4 -4
  9. package/lib/components/menus/export-modules/appraisal-menus/index.js +30 -12
  10. package/lib/components/menus/export-modules/appraisal-menus/menu-highlight.js +22 -6
  11. package/lib/components/menus/export-modules/appraisal-menus/menus.js +110 -9
  12. package/lib/components/menus/export-modules/okr-menus/menus.js +6 -3
  13. package/lib/components/nav-top/components/app-center/images/chart.svg +22 -0
  14. package/lib/components/nav-top/components/app-center/images/file.svg +20 -0
  15. package/lib/components/nav-top/components/app-center/images/interview.svg +20 -0
  16. package/lib/components/nav-top/components/app-center/images/learning.svg +23 -0
  17. package/lib/components/nav-top/components/app-center/images/okr.svg +22 -0
  18. package/lib/components/nav-top/components/app-center/images/performance.svg +22 -0
  19. package/lib/components/nav-top/components/app-center/images/plan.svg +22 -0
  20. package/lib/components/nav-top/components/app-center/images/project.svg +23 -0
  21. package/lib/components/nav-top/components/app-center/images/summary.svg +23 -0
  22. package/lib/components/nav-top/components/app-center/images/yuyue.png +0 -0
  23. package/lib/components/nav-top/components/app-center/index.css +170 -0
  24. package/lib/components/nav-top/components/app-center/index.js +211 -0
  25. package/lib/components/nav-top/components/app-center/interface.js +19 -0
  26. package/lib/components/nav-top/components/menu/index.js +2 -6
  27. package/lib/components/nav-top/components/user-message/images/bell-1.svg +13 -0
  28. package/lib/components/nav-top/components/user-message/index.js +21 -21
  29. package/lib/components/nav-top/images/app-center.png +0 -0
  30. package/lib/components/nav-top/images/home.svg +16 -0
  31. package/lib/components/nav-top/index.css +61 -8
  32. package/lib/components/nav-top/index.js +56 -35
  33. package/lib/components/nav-top/utils.js +464 -1
  34. package/lib/components/okr-detail/components/header/o-avatar.js +6 -0
  35. package/lib/components/okr-flow/export-modal/color.png +0 -0
  36. package/lib/components/okr-flow/export-modal/index.css +28 -13
  37. package/lib/components/okr-flow/export-modal/index.js +82 -34
  38. package/lib/components/okr-flow/export-modal/trans1.png +0 -0
  39. package/lib/components/order-have-award/img/award.png +0 -0
  40. package/lib/components/order-have-award/index.css +5 -0
  41. package/lib/components/order-have-award/index.js +83 -0
  42. package/lib/components/order-have-award/interface.js +19 -0
  43. package/lib/components/period-selector/components/button/style.js +1 -1
  44. package/lib/components/period-selector/index.css +1 -0
  45. package/lib/components/period-selector/index.js +7 -2
  46. package/lib/components/picker/components/panels/date-panel/date-body.js +19 -31
  47. package/lib/components/picker/components/panels/date-panel/date-head.js +8 -8
  48. package/lib/components/picker/components/panels/date-panel/index.js +1 -1
  49. package/lib/components/picker/components/panels/month-panel/index.css +0 -5
  50. package/lib/components/picker/components/panels/month-panel/index.js +2 -2
  51. package/lib/components/picker/components/panels/month-panel/month-body.js +5 -4
  52. package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
  53. package/lib/components/picker/components/panels/year-panel/index.css +0 -5
  54. package/lib/components/picker/components/panels/year-panel/index.js +1 -1
  55. package/lib/components/picker/components/panels/year-panel/year-body.js +3 -10
  56. package/lib/components/picker/components/picker-trigger/index.css +1 -6
  57. package/lib/components/picker/components/picker-trigger/index.js +11 -16
  58. package/lib/components/picker/context.js +2 -17
  59. package/lib/components/picker/index.css +1 -29
  60. package/lib/components/picker/index.js +0 -3
  61. package/lib/components/picker/picker-panels.js +64 -79
  62. package/lib/components/picker/picker.js +30 -44
  63. package/lib/components/picker/utils.js +11 -168
  64. package/lib/components/select-layer/index.js +22 -8
  65. package/lib/components/task-relation-modal/helper.js +1 -56
  66. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +1 -4
  67. package/lib/components/task-relation-modal/okr-relation/request-api.js +2 -6
  68. package/lib/components/task-relation-modal/request-api.js +5 -2
  69. package/lib/components/task-relation-modal/tree/work-tree/index.js +27 -31
  70. package/lib/components/task-relation-modal/tree/work-tree/search-form.js +22 -3
  71. package/lib/components/task-relation-modal/tree-node/work-node/index.js +11 -11
  72. package/lib/components/tooltip/tooltip.js +9 -4
  73. package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -1
  74. package/lib/components/user-selector/export-modules/field-tree-selector/index.css +11 -1
  75. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +21 -3
  76. package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
  77. package/lib/components/user-selector/request-apis.js +39 -9
  78. package/lib/components/user-selector/searched-panel/index.js +7 -1
  79. package/lib/pages/aha2021/index.css +7 -0
  80. package/lib/pages/aha2021/index.js +14 -8
  81. package/lib/pages/aha2021/new-menu-switcher/index.css +44 -0
  82. package/lib/pages/aha2021/new-menu-switcher/index.js +85 -0
  83. package/lib/pages/aha2021/new-menu-switcher/new-menu-bg.png +0 -0
  84. package/lib/pages/aha2021/request-api.js +15 -0
  85. package/lib/pages/okr-map/level2-search/user.js +1 -0
  86. package/package.json +1 -1
  87. package/lib/components/picker/components/cross.svg +0 -17
  88. package/lib/components/picker/range-picker/components/picker-trigger/index.css +0 -97
  89. package/lib/components/picker/range-picker/components/picker-trigger/index.js +0 -109
  90. package/lib/components/picker/range-picker/components/placeholder/index.js +0 -91
  91. package/lib/components/picker/range-picker/components/select-input/index.js +0 -72
  92. package/lib/components/picker/range-picker/components/shortcuts/index.js +0 -45
  93. package/lib/components/picker/range-picker/index.css +0 -158
  94. package/lib/components/picker/range-picker/index.js +0 -263
  95. package/lib/utils/planDataJson.js +0 -11115
@@ -19,8 +19,6 @@ var _popup = _interopRequireDefault(require("../../../popup"));
19
19
 
20
20
  var _conditionRender = _interopRequireDefault(require("../../../../components/condition-render"));
21
21
 
22
- var _useGlobalValue3 = _interopRequireDefault(require("../../useGlobalValue"));
23
-
24
22
  var _new = _interopRequireDefault(require("./img/new.svg"));
25
23
 
26
24
  require("./index.css");
@@ -76,12 +74,10 @@ var Menu = function Menu(_ref) {
76
74
  var _useState3 = (0, _react.useState)(false),
77
75
  _useState4 = _slicedToArray(_useState3, 2),
78
76
  popupVisible = _useState4[0],
79
- setPopupVisible = _useState4[1];
77
+ setPopupVisible = _useState4[1]; // const [feedNum] = useGlobalValue();
80
78
 
81
- var _useGlobalValue = (0, _useGlobalValue3["default"])(),
82
- _useGlobalValue2 = _slicedToArray(_useGlobalValue, 1),
83
- feedNum = _useGlobalValue2[0];
84
79
 
80
+ var feedNum = 20;
85
81
  var containerRef = (0, _react.useRef)();
86
82
  var apiPath = (0, _bsGlobal.getBSGlobal)("apiPath");
87
83
  var userId = (0, _bsGlobal.getUserInfo)().Id;
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>切片</title>
4
+ <g id="导航" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="试用版-滑出一级菜单1" transform="translate(-967.000000, -16.000000)" stroke="#FFFFFF" stroke-width="1.6">
6
+ <g id="消息" transform="translate(964.000000, 10.000000)">
7
+ <g id="bell" transform="translate(3.000000, 6.000000)">
8
+ <path d="M11.0147551,3.73333333 C11.2716347,3.73333333 11.5100213,3.81274976 11.7063493,3.94879059 C11.9087141,4.0890144 12.0668261,4.28879775 12.1546337,4.5230515 C13.7164592,5.35127212 14.628956,6.03022217 15.271064,6.91744287 C15.8964201,7.78151685 16.2647551,8.84360493 16.2647551,9.99166667 L16.2647551,9.99166667 L16.2647551,14.1995335 L17.2351572,15.7271908 L13.1381228,16.3419612 C13.0764552,16.9803581 12.7329879,17.5356623 12.2344854,17.8838935 C11.8888575,18.1253335 11.4682834,18.2666667 11.0147551,18.2666667 C10.5612267,18.2666667 10.1406527,18.1253335 9.79502475,17.8838935 C9.29652228,17.5356623 8.95305493,16.9803581 8.89138739,16.3419612 L8.89138739,16.3419612 L5.13199196,16.3416667 L5.76475508,14.1995335 L5.76475508,9.99166667 C5.76475508,8.84366279 6.13305178,7.78162343 6.75832153,6.91759709 C7.40033245,6.03043703 8.31267653,5.35153921 9.37484426,5.00264003 C9.9622003,4.2892328 10.1205014,4.08920232 10.3230866,3.94883346 C10.5194668,3.81276391 10.7578617,3.73333333 11.0147551,3.73333333 Z"></path>
9
+ </g>
10
+ </g>
11
+ </g>
12
+ </g>
13
+ </svg>
@@ -25,7 +25,7 @@ var _redPack = _interopRequireDefault(require("./components/red-pack"));
25
25
 
26
26
  var _request = require("../../request.apis");
27
27
 
28
- var _bell3x = _interopRequireDefault(require("./images/bell@3x.png"));
28
+ var _bell = _interopRequireDefault(require("./images/bell-1.svg"));
29
29
 
30
30
  var _useGlobalValue = _interopRequireDefault(require("../../useGlobalValue"));
31
31
 
@@ -51,7 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
51
51
 
52
52
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
53
 
54
- var prefixCls = 'titaui-user-message';
54
+ var prefixCls = "titaui-user-message";
55
55
 
56
56
  function UserMessage() {
57
57
  var _useState = (0, _react.useState)(0),
@@ -79,7 +79,7 @@ function UserMessage() {
79
79
  preData = _useState10[0],
80
80
  setPreData = _useState10[1];
81
81
 
82
- var _useState11 = (0, _react.useState)('todos'),
82
+ var _useState11 = (0, _react.useState)("todos"),
83
83
  _useState12 = _slicedToArray(_useState11, 2),
84
84
  firstTab = _useState12[0],
85
85
  setFirstTab = _useState12[1];
@@ -96,16 +96,16 @@ function UserMessage() {
96
96
  setAllData(res.Data.indicators);
97
97
  var indicators = res.Data.indicators;
98
98
  var todos = indicators.find(function (item) {
99
- return item.type === 'todoIndicator';
99
+ return item.type === "todoIndicator";
100
100
  });
101
101
  var informs = indicators.find(function (item) {
102
- return item.type === 'messageIndicator';
102
+ return item.type === "messageIndicator";
103
103
  });
104
104
  var replys = indicators.find(function (item) {
105
- return item.type === 'mLeaveandComment';
105
+ return item.type === "mLeaveandComment";
106
106
  });
107
107
  var reminds = indicators.find(function (item) {
108
- return item.type === 'Tx';
108
+ return item.type === "Tx";
109
109
  });
110
110
  var total = 0; // @与回复的数量在通知里面包含了
111
111
 
@@ -125,17 +125,17 @@ function UserMessage() {
125
125
  setInfosNum(total);
126
126
 
127
127
  if (todos && todos.value) {
128
- setFirstTab('todos');
128
+ setFirstTab("todos");
129
129
  } else if (informs && !replys && informs.value) {
130
- setFirstTab('informs');
130
+ setFirstTab("informs");
131
131
  } else if (replys && informs.value - replys.value === 0) {
132
- setFirstTab('replys');
132
+ setFirstTab("replys");
133
133
  } else if (replys && informs.value - replys.value > 0) {
134
- setFirstTab('informs');
134
+ setFirstTab("informs");
135
135
  } else if (reminds && reminds.value) {
136
- setFirstTab('reminds');
136
+ setFirstTab("reminds");
137
137
  } else {
138
- setFirstTab('todos');
138
+ setFirstTab("todos");
139
139
  } // 判断是企业勋章
140
140
 
141
141
 
@@ -148,7 +148,7 @@ function UserMessage() {
148
148
  } // upaas 勋章
149
149
 
150
150
 
151
- var medalDetail = (0, _bsGlobal.getBSGlobal)('medalDetail');
151
+ var medalDetail = (0, _bsGlobal.getBSGlobal)("medalDetail");
152
152
 
153
153
  if (medalDetail) {
154
154
  window.util.upaasMedal()(medalDetail);
@@ -156,7 +156,7 @@ function UserMessage() {
156
156
 
157
157
 
158
158
  var mRedPackIndicator = indicators.filter(function (item) {
159
- return item.type === 'mRedPackIndicator';
159
+ return item.type === "mRedPackIndicator";
160
160
  });
161
161
 
162
162
  if (mRedPackIndicator.length > 0) {
@@ -165,10 +165,10 @@ function UserMessage() {
165
165
 
166
166
 
167
167
  var blessIndicator = indicators.filter(function (item) {
168
- return item.type === 'mZhufu';
168
+ return item.type === "mZhufu";
169
169
  });
170
170
  var weeklyReportIndicator = indicators.filter(function (item) {
171
- return item.type === 'mWeekStatisticIndicator';
171
+ return item.type === "mWeekStatisticIndicator";
172
172
  });
173
173
 
174
174
  if (blessIndicator.length === 1) {
@@ -185,11 +185,11 @@ function UserMessage() {
185
185
  if (weeklyReportIndicator.length) {
186
186
  var _window;
187
187
 
188
- (_window = window) === null || _window === void 0 ? void 0 : _window.Talent.app.vent.trigger('open-weekly-report-modal');
188
+ (_window = window) === null || _window === void 0 ? void 0 : _window.Talent.app.vent.trigger("open-weekly-report-modal");
189
189
  }
190
190
 
191
191
  var feedInfo = indicators.find(function (item) {
192
- return item.type === 'feedAboutMeIndicator';
192
+ return item.type === "feedAboutMeIndicator";
193
193
  });
194
194
 
195
195
  if (feedInfo) {
@@ -230,8 +230,8 @@ function UserMessage() {
230
230
  condition: infosNum !== 0
231
231
  }, /*#__PURE__*/_react["default"].createElement("div", {
232
232
  className: (0, _classnames["default"])("".concat(prefixCls, "__msg-total"))
233
- }, infosNum > 100 ? '99+' : infosNum)), /*#__PURE__*/_react["default"].createElement("img", {
234
- src: _bell3x["default"],
233
+ }, infosNum > 100 ? "99+" : infosNum)), /*#__PURE__*/_react["default"].createElement("img", {
234
+ src: _bell["default"],
235
235
  className: (0, _classnames["default"])(_defineProperty({}, "".concat(prefixCls, "__msg-dot"), infosNum !== preData)),
236
236
  alt: ""
237
237
  }))), /*#__PURE__*/_react["default"].createElement(_redPack["default"], {
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>切片</title>
4
+ <g id="导航" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="试用版-滑出一级菜单1" transform="translate(-835.000000, -16.000000)">
6
+ <g id="个人首页" transform="translate(832.000000, 13.000000)">
7
+ <g id="home" transform="translate(3.000000, 3.000000)">
8
+ <g id="首页" transform="translate(3.025000, 2.383333)">
9
+ <path d="M7.975,1.31064196 C8.2909739,1.31064196 8.60694781,1.41143718 8.87195063,1.61302763 L8.87195063,1.61302763 L14.332463,5.766897 C14.8849137,6.18715208 15.2092593,6.84141097 15.2092593,7.53554073 L15.2092593,7.53554073 L15.2092593,13.7203704 C15.2092593,14.3340201 14.9605286,14.8895756 14.5583854,15.2917188 C14.1562423,15.6938619 13.6006868,15.9425926 12.987037,15.9425926 L12.987037,15.9425926 L2.96296296,15.9425926 C2.34931324,15.9425926 1.79375769,15.6938619 1.39161456,15.2917188 C0.989471435,14.8895756 0.740740741,14.3340201 0.740740741,13.7203704 L0.740740741,13.7203704 L0.740740741,7.53554073 C0.740740741,6.84141097 1.06508631,6.18715208 1.61753702,5.766897 L1.61753702,5.766897 L7.07804937,1.61302763 C7.34305219,1.41143718 7.6590261,1.31064196 7.975,1.31064196 Z" id="矩形" stroke="#FFFFFF" stroke-width="1.48148148"></path>
10
+ <path d="M5.40833333,11.3666667 L10.5416667,11.3666667 C10.9466755,11.3666667 11.275,11.6949912 11.275,12.1 C11.275,12.5050088 10.9466755,12.8333333 10.5416667,12.8333333 L5.40833333,12.8333333 C5.00332452,12.8333333 4.675,12.5050088 4.675,12.1 C4.675,11.6949912 5.00332452,11.3666667 5.40833333,11.3666667 Z" id="矩形" fill="#FFFFFF"></path>
11
+ </g>
12
+ </g>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </svg>
@@ -10,22 +10,26 @@
10
10
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
11
11
  }
12
12
 
13
+ .titaui-nav-top--position {
14
+ position: relative;
15
+ z-index: 1201;
16
+ }
17
+
13
18
  .titaui-nav-top__left {
14
19
  display: inline-flex;
15
20
  justify-content: space-between;
16
21
  align-items: center;
17
- min-width: 204px;
22
+ width: 120px;
18
23
  height: 54px;
19
24
  border-radius: 0px 0px 0px 24px;
20
- box-sizing: border-box;
21
- padding: 0 10px 0 20px;
25
+ padding: 0 20px;
22
26
  cursor: default;
23
27
  }
24
28
 
25
29
  .titaui-nav-top__left-home {
26
30
  display: inline-flex;
27
31
  border-radius: 4px;
28
- padding: 4px;
32
+ margin-right: 24px;
29
33
  }
30
34
 
31
35
  .titaui-nav-top__left-home--active {
@@ -33,8 +37,8 @@
33
37
  }
34
38
 
35
39
  .titaui-nav-top__left-home-img {
36
- width: 20px;
37
- height: 20px;
40
+ width: 24px;
41
+ height: 24px;
38
42
  }
39
43
 
40
44
  .titaui-nav-top__left-home--hover:hover {
@@ -50,6 +54,55 @@
50
54
  cursor: pointer;
51
55
  }
52
56
 
57
+ .titaui-nav-top__left-dynamic, .titaui-nav-top__left-app-center {
58
+ display: inline-block;
59
+ width: 24px;
60
+ height: 24px;
61
+ background: url("./images/app-center.png") no-repeat;
62
+ background-size: contain;
63
+ color: #ffffff;
64
+ padding: 2px;
65
+ border-radius: 8px;
66
+ transition: transform 0.3s;
67
+ cursor: pointer;
68
+ }
69
+
70
+ .titaui-nav-top__left-dynamic:hover, .titaui-nav-top__left-app-center:hover {
71
+ background-color: rgba(255, 255, 255, 0.2);
72
+ }
73
+
74
+ .titaui-nav-top__left-dynamic--active, .titaui-nav-top__left-app-center--active {
75
+ transform: rotate(-90deg);
76
+ }
77
+
78
+ .titaui-nav-top__left-dynamic {
79
+ position: relative;
80
+ margin-right: -6px;
81
+ margin-left: 20px;
82
+ }
83
+
84
+ .titaui-nav-top__left-dynamic-feed-num {
85
+ position: absolute;
86
+ right: -6px;
87
+ top: -2px;
88
+ background: #fe5042;
89
+ border-radius: 18px;
90
+ height: 16px;
91
+ font-size: 12px;
92
+ color: #ffffff;
93
+ line-height: 18px;
94
+ padding: 0 4px;
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ min-width: 8px;
99
+ font-weight: 400;
100
+ }
101
+
102
+ .titaui-nav-top__left-app-center {
103
+ margin-right: 12px;
104
+ }
105
+
53
106
  .titaui-nav-top__line {
54
107
  width: 1px;
55
108
  min-width: 1px;
@@ -68,8 +121,8 @@
68
121
 
69
122
  .titaui-nav-top__msg {
70
123
  margin-right: 24px;
71
- width: 20px;
72
- height: 20px;
124
+ width: 24px;
125
+ height: 24px;
73
126
  cursor: pointer;
74
127
  display: inline-flex;
75
128
  }
@@ -11,25 +11,27 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
+ var _toast = _interopRequireDefault(require("../toast"));
15
+
14
16
  var _bsGlobal = require("../../utils/bs-global");
15
17
 
16
- var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"));
18
+ var _request = require("../../utils/request");
17
19
 
18
- var _useGlobalValue = _interopRequireDefault(require("./useGlobalValue"));
20
+ var _appCenter = _interopRequireDefault(require("./components/app-center"));
21
+
22
+ var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"));
19
23
 
20
24
  var _menu = _interopRequireDefault(require("./components/menu"));
21
25
 
22
26
  var _userMessage = _interopRequireDefault(require("./components/user-message"));
23
27
 
24
- var _home = _interopRequireDefault(require("./images/home.png"));
25
-
26
28
  var _version = _interopRequireDefault(require("./components/version"));
27
29
 
28
- var _utils = require("./utils");
30
+ var _useGlobalValue = _interopRequireDefault(require("./useGlobalValue"));
29
31
 
30
- var _request = require("../../utils/request");
32
+ var _home = _interopRequireDefault(require("./images/home.svg"));
31
33
 
32
- var _toast = _interopRequireDefault(require("../toast"));
34
+ var _utils = require("./utils");
33
35
 
34
36
  require("./index.css");
35
37
 
@@ -61,11 +63,17 @@ var hasOKRApp = newNavigation.find(function (item) {
61
63
  var preCls = "titaui-nav-top";
62
64
 
63
65
  var NavTop = function NavTop() {
64
- var _classNames2;
66
+ var _classNames3;
65
67
 
66
- var _useState = (0, _react.useState)((0, _utils.getMenus)()),
67
- _useState2 = _slicedToArray(_useState, 1),
68
- menu = _useState2[0];
68
+ var isUseNewMenu = window.BSGlobal.isUseNewMenu;
69
+
70
+ var _useState = (0, _react.useState)(function () {
71
+ if (isUseNewMenu) return [];
72
+ return (0, _utils.getMenus)();
73
+ }),
74
+ _useState2 = _slicedToArray(_useState, 2),
75
+ menu = _useState2[0],
76
+ setMenu = _useState2[1];
69
77
 
70
78
  var versionInfo = (0, _bsGlobal.getBSGlobal)("tenantAuthentication");
71
79
 
@@ -74,6 +82,11 @@ var NavTop = function NavTop() {
74
82
  activeMenuId = _useState4[0],
75
83
  setActiveMenuId = _useState4[1];
76
84
 
85
+ var _useState5 = (0, _react.useState)(false),
86
+ _useState6 = _slicedToArray(_useState5, 2),
87
+ appCenterVisible = _useState6[0],
88
+ setAppCenterVisible = _useState6[1];
89
+
77
90
  var ua = navigator.userAgent.toLowerCase();
78
91
  var showWxInvite = (0, _bsGlobal.getTenantInfo)().mainCorpId && ua.indexOf("micromessenger") !== -1;
79
92
  var openWxInvite = (0, _react.useCallback)(function () {
@@ -84,15 +97,9 @@ var NavTop = function NavTop() {
84
97
  mode: "multi",
85
98
  // 必填,选择模式,single表示单选,multi表示多选
86
99
  selectedContextContact: 0 // 是否勾选当前环境的参与者。例如在群+号聊天附件栏打开,默认勾选当前群成员。
87
- // "selectedOpenUserIds"["xxx","yyy"], // 非必填,已选用户OpenID列表。single模式忽略该参数。
88
- // "selectedTickets"["ticket1","ticket2"] // 非必填,已选ticket列表。single模式忽略该参数
89
100
 
90
101
  }, function (res) {
91
102
  if (res.err_msg === "selectPrivilegedContact:ok") {
92
- // var selectedUserList = res.result.userList; // 已选的成员列表
93
- // for (var i = 0; i < selectedUserList.length; i++) {
94
- // var openUserId = selectedUserList[i].openUserId; //成员openUserId
95
- // }
96
103
  var selectedTicket = res.result.selectedTicket.replace(/['"]/g, ""); // 已选的集合Ticket
97
104
 
98
105
  (0, _request.rpost)("v1")("wx/send/templateMessage?selectedTickets=".concat(selectedTicket)).then(function () {
@@ -107,6 +114,7 @@ var NavTop = function NavTop() {
107
114
  }, []);
108
115
 
109
116
  var handleHashChange = function handleHashChange() {
117
+ setAppCenterVisible(false);
110
118
  var hash = window.location.hash.split("?")[0] || "";
111
119
 
112
120
  if (hash) {
@@ -135,41 +143,54 @@ var NavTop = function NavTop() {
135
143
  return function () {
136
144
  window.removeEventListener("hashchange", handleHashChange);
137
145
  };
138
- }, []);
146
+ }, [menu]);
139
147
  return /*#__PURE__*/_react["default"].createElement("div", {
140
- className: (0, _classnames["default"])("".concat(preCls))
148
+ className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "--position"), appCenterVisible))
141
149
  }, /*#__PURE__*/_react["default"].createElement("a", {
142
- className: (0, _classnames["default"])("".concat(preCls, "__left")),
143
- href: hasOKRApp ? "#homepage" : ""
150
+ className: "".concat(preCls, "__left"),
151
+ href: "#dynamic"
144
152
  }, /*#__PURE__*/_react["default"].createElement("img", {
145
153
  alt: "logo",
146
154
  src: Logo,
147
- className: (0, _classnames["default"])("".concat(preCls, "__left-logo"), _defineProperty({}, "".concat(preCls, "__left-logo--hover"), hasOKRApp))
148
- }), hasOKRApp && /*#__PURE__*/_react["default"].createElement("span", {
149
- className: (0, _classnames["default"])("".concat(preCls, "__left-home"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(preCls, "__left-home--active"), activeMenuId === 99999), _defineProperty(_classNames2, "".concat(preCls, "__left-home--hover"), hasOKRApp), _classNames2))
150
- }, /*#__PURE__*/_react["default"].createElement("img", {
151
- alt: "home-img",
152
- src: _home["default"],
153
- className: (0, _classnames["default"])("".concat(preCls, "__left-home-img"))
154
- }))), /*#__PURE__*/_react["default"].createElement("div", {
155
+ className: "".concat(preCls, "__left-logo")
156
+ })), isUseNewMenu && /*#__PURE__*/_react["default"].createElement("span", {
157
+ className: (0, _classnames["default"])("".concat(preCls, "__left-app-center"), "document-mouse-event-ignore", _defineProperty({}, "".concat(preCls, "__left-app-center--active"), appCenterVisible)),
158
+ onClick: function onClick() {
159
+ return setAppCenterVisible(!appCenterVisible);
160
+ }
161
+ }), /*#__PURE__*/_react["default"].createElement("div", {
155
162
  className: (0, _classnames["default"])("".concat(preCls, "__line"))
156
163
  }), /*#__PURE__*/_react["default"].createElement("div", {
157
164
  className: (0, _classnames["default"])("".concat(preCls, "__middle"))
158
165
  }, /*#__PURE__*/_react["default"].createElement(_menu["default"], {
159
166
  menus: menu,
160
167
  activeMenuId: activeMenuId
161
- })), showWxInvite && /*#__PURE__*/_react["default"].createElement("div", {
162
- className: (0, _classnames["default"])("".concat(preCls, "__invite")),
168
+ })), hasOKRApp && /*#__PURE__*/_react["default"].createElement("div", {
169
+ className: (0, _classnames["default"])("".concat(preCls, "__left-home"), (_classNames3 = {}, _defineProperty(_classNames3, "".concat(preCls, "__left-home--active"), activeMenuId === 99999), _defineProperty(_classNames3, "".concat(preCls, "__left-home--hover"), hasOKRApp), _classNames3))
170
+ }, /*#__PURE__*/_react["default"].createElement("a", {
171
+ href: "#homepage"
172
+ }, /*#__PURE__*/_react["default"].createElement("img", {
173
+ alt: "home-img",
174
+ src: _home["default"],
175
+ className: "".concat(preCls, "__left-home-img")
176
+ }))), showWxInvite && /*#__PURE__*/_react["default"].createElement("div", {
177
+ className: "".concat(preCls, "__invite"),
163
178
  onClick: openWxInvite
164
179
  }, /*#__PURE__*/_react["default"].createElement("i", {
165
180
  className: (0, _classnames["default"])("tu-icon-add-people", "".concat(preCls, "__invite-icon"))
166
181
  })), /*#__PURE__*/_react["default"].createElement("div", {
167
- className: (0, _classnames["default"])("".concat(preCls, "__msg"))
182
+ className: "".concat(preCls, "__msg")
168
183
  }, /*#__PURE__*/_react["default"].createElement(_userMessage["default"], null)), versionInfo.Version === 1 && /*#__PURE__*/_react["default"].createElement("div", {
169
- className: (0, _classnames["default"])("".concat(preCls, "__version"))
184
+ className: "".concat(preCls, "__version")
170
185
  }, /*#__PURE__*/_react["default"].createElement(_version["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
171
- className: (0, _classnames["default"])("".concat(preCls, "__photo"))
172
- }, /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null)));
186
+ className: "".concat(preCls, "__photo")
187
+ }, /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null)), isUseNewMenu && /*#__PURE__*/_react["default"].createElement(_appCenter["default"], {
188
+ appCenterVisible: appCenterVisible,
189
+ closeAppCenter: function closeAppCenter() {
190
+ return setAppCenterVisible(false);
191
+ },
192
+ setMenu: setMenu
193
+ }));
173
194
  };
174
195
 
175
196
  var _default = NavTop; // @ts-ignore