@titaui/pc 1.16.29 → 1.16.30-beta.2

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 (56) hide show
  1. package/lib/components/change-okr-modal/index.js +1 -2
  2. package/lib/components/create-okr-modal/index.js +15 -3
  3. package/lib/components/date-picker/BodyItem.js +3 -3
  4. package/lib/components/date-picker/CalendarHeader.js +3 -3
  5. package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
  6. package/lib/components/eReport/eReportLists/reportList.js +3 -3
  7. package/lib/components/emotions-selector/selector-pop.js +3 -3
  8. package/lib/components/ereport-list/index.js +3 -3
  9. package/lib/components/keyword-search/index.css +45 -27
  10. package/lib/components/keyword-search/index.js +69 -38
  11. package/lib/components/mblog/components/MblogAction.js +3 -3
  12. package/lib/components/menus/export-modules/skynet-dashboard-menu/index.js +5 -2
  13. package/lib/components/menus/export-modules/skynet-dashboard-menu/menus.js +13 -8
  14. package/lib/components/menus/export-modules/skynet-dashboard-menu/survey-front-menus.js +14 -16
  15. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
  16. package/lib/components/okr-detail/e-list/search-form/fields/e-status.js +1 -1
  17. package/lib/components/okr-excel-create/index.js +2 -2
  18. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -4
  19. package/lib/components/okr-review/components/ReviewItem/index.js +1 -1
  20. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
  21. package/lib/components/okr-review/index.js +1 -1
  22. package/lib/components/period-selector/components/selector/style.js +9 -9
  23. package/lib/components/period-selector/index.js +11 -6
  24. package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
  25. package/lib/components/rich-editor/models/schema.js +6 -6
  26. package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
  27. package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
  28. package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
  29. package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
  30. package/lib/components/rich-editor/plugins/core/index.js +4 -4
  31. package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
  32. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
  33. package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
  34. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
  35. package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
  36. package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
  37. package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
  38. package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
  39. package/lib/components/rich-editor/react/uiProvider.js +3 -3
  40. package/lib/components/rich-editor/ui/Popup/index.js +3 -3
  41. package/lib/components/search-input/index.css +22 -27
  42. package/lib/components/search-input/index.js +48 -58
  43. package/lib/components/select/Option.js +3 -3
  44. package/lib/components/table-excel-v2/index.css +0 -1
  45. package/lib/components/tita-chart/errorBoundary/index.js +3 -3
  46. package/lib/components-v1/animate/AnimateChild.js +3 -3
  47. package/lib/components-v1/avatar/index.js +3 -3
  48. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
  49. package/lib/components-v1/progress/CircleProgress.js +3 -3
  50. package/lib/components-v1/select/Option.js +3 -3
  51. package/lib/components-v1/textarea/index.js +0 -3
  52. package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
  53. package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
  54. package/lib/components-v1/userSelector/components/UserItem.js +3 -3
  55. package/lib/pages/new-okr-list/header/index.js +20 -20
  56. package/package.json +1 -1
@@ -577,8 +577,7 @@ var _initialiseProps = function _initialiseProps() {
577
577
  data: isRefresh ? resData : [].concat(_toConsumableArray(data), _toConsumableArray(resData)),
578
578
  isEnd: res.Data.nextPage === 0
579
579
  }, function () {
580
- console.log(_this4.state.data);
581
-
580
+ // console.log(this.state.data)
582
581
  if (isRefresh) {
583
582
  _this4.scollListToTop();
584
583
  }
@@ -219,7 +219,13 @@ function CreateOkrModal(_ref, ref) {
219
219
  setOkrClassify = _useState20[1]; // 目标类别
220
220
 
221
221
 
222
- var _useState21 = (0, _react.useState)(2),
222
+ var _useState21 = (0, _react.useState)(function () {
223
+ if (window.BSGlobal.tenantInfo.isOpenInfo) {
224
+ return 1;
225
+ } else {
226
+ return 2;
227
+ }
228
+ }),
223
229
  _useState22 = _slicedToArray(_useState21, 2),
224
230
  visibility = _useState22[0],
225
231
  setVisibility = _useState22[1]; // 可见性
@@ -678,7 +684,13 @@ function CreateOkrModal(_ref, ref) {
678
684
  });
679
685
  setCycle(cycle);
680
686
  setOkrClassify(undefined);
681
- setVisibility(2);
687
+
688
+ if (window.BSGlobal.tenantInfo.isOpenInfo) {
689
+ setVisibility(1);
690
+ } else {
691
+ setVisibility(2);
692
+ }
693
+
682
694
  setParent({
683
695
  parentWorkId: 0,
684
696
  parentWorkName: '',
@@ -855,7 +867,7 @@ function CreateOkrModal(_ref, ref) {
855
867
  if (!isVisible) return; // @ts-ignore
856
868
 
857
869
  (0, _requestApi.getImageBase64ByUrl)(user.id).then(function (data) {
858
- console.log(data);
870
+ // console.log(data)
859
871
  setUserAvatarBase64Url(data.Data.obj);
860
872
  })["catch"](function (err) {
861
873
  _toast["default"].Error(err);
@@ -47,7 +47,7 @@ var BodyItem = /*#__PURE__*/function (_Component) {
47
47
  var _super = _createSuper(BodyItem);
48
48
 
49
49
  function BodyItem() {
50
- var _this;
50
+ var _temp, _this;
51
51
 
52
52
  _classCallCheck(this, BodyItem);
53
53
 
@@ -55,7 +55,7 @@ var BodyItem = /*#__PURE__*/function (_Component) {
55
55
  args[_key] = arguments[_key];
56
56
  }
57
57
 
58
- return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.getClass = function () {
58
+ return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.getClass = function () {
59
59
  var _this$props = _this.props,
60
60
  isAllowSelect = _this$props.isAllowSelect,
61
61
  date = _this$props.date,
@@ -86,7 +86,7 @@ var BodyItem = /*#__PURE__*/function (_Component) {
86
86
  if (_this.disabled) return;
87
87
 
88
88
  _this.props.onSelectDate((0, _moment["default"])(date.format("YYYY/MM/DD")));
89
- }, _assertThisInitialized(_this)));
89
+ }, _temp));
90
90
  }
91
91
 
92
92
  _createClass(BodyItem, [{
@@ -87,7 +87,7 @@ var CalendarHeader = /*#__PURE__*/function (_Component) {
87
87
  var _super = _createSuper(CalendarHeader);
88
88
 
89
89
  function CalendarHeader() {
90
- var _this;
90
+ var _temp, _this;
91
91
 
92
92
  _classCallCheck(this, CalendarHeader);
93
93
 
@@ -95,7 +95,7 @@ var CalendarHeader = /*#__PURE__*/function (_Component) {
95
95
  args[_key] = arguments[_key];
96
96
  }
97
97
 
98
- return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.setDate = function (func) {
98
+ return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.setDate = function (func) {
99
99
  var date = (0, _moment["default"])(_this.props.date);
100
100
 
101
101
  for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
@@ -113,7 +113,7 @@ var CalendarHeader = /*#__PURE__*/function (_Component) {
113
113
  }
114
114
 
115
115
  return years;
116
- }, _assertThisInitialized(_this)));
116
+ }, _temp));
117
117
  }
118
118
 
119
119
  _createClass(CalendarHeader, [{
@@ -49,7 +49,7 @@ var ConfirmPop = /*#__PURE__*/function (_PureComponent) {
49
49
  var _super = _createSuper(ConfirmPop);
50
50
 
51
51
  function ConfirmPop() {
52
- var _this;
52
+ var _temp, _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, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
60
+ return _possibleConstructorReturn(_this, (_temp = _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
- }, _assertThisInitialized(_this)));
66
+ }, _temp));
67
67
  }
68
68
 
69
69
  _createClass(ConfirmPop, [{
@@ -55,7 +55,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
55
55
  var _super = _createSuper(EReportList);
56
56
 
57
57
  function EReportList() {
58
- var _this;
58
+ var _temp, _this;
59
59
 
60
60
  _classCallCheck(this, EReportList);
61
61
 
@@ -63,7 +63,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
63
63
  args[_key] = arguments[_key];
64
64
  }
65
65
 
66
- return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
66
+ return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
67
67
  selectedPeriodValue: '',
68
68
  showDatePick: false,
69
69
  eReportWeekList: [],
@@ -178,7 +178,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
178
178
  return _this.handlerEReportShareSubmit(submitStatus);
179
179
  }
180
180
  })));
181
- }, _assertThisInitialized(_this)));
181
+ }, _temp));
182
182
  }
183
183
 
184
184
  _createClass(EReportList, [{
@@ -47,7 +47,7 @@ var EmotionsSelectorPop = /*#__PURE__*/function (_PureComponent) {
47
47
  var _super = _createSuper(EmotionsSelectorPop);
48
48
 
49
49
  function EmotionsSelectorPop() {
50
- var _this;
50
+ var _temp, _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, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
58
+ return _possibleConstructorReturn(_this, (_temp = _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
- }, _assertThisInitialized(_this)));
66
+ }, _temp));
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 _this;
60
+ var _temp, _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, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
68
+ return _possibleConstructorReturn(_this, (_temp = _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
- }, _assertThisInitialized(_this)));
181
+ }, _temp));
182
182
  }
183
183
 
184
184
  _createClass(EReportList, [{
@@ -1,53 +1,71 @@
1
1
  .titaui-keyword-search {
2
- background: #fff;
2
+ width: 36px;
3
3
  height: 36px;
4
4
  padding: 8px;
5
- box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
6
- display: flex;
7
5
  border-radius: 18px;
6
+ box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
7
+ transition: all 0.4s cubic-bezier(0.17, 0.63, 0.32, 1.27);
8
+ background-color: #ffffff;
8
9
  box-sizing: border-box;
10
+ display: flex;
9
11
  align-items: center;
12
+ position: relative;
10
13
  }
11
14
 
12
- .titaui-keyword-search--active {
13
- box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1), 0px 0px 4px 0px rgba(40, 121, 255, 0.3);
14
- border: 1px solid #2879ff;
15
+ .titaui-keyword-search--activated {
16
+ width: 190px;
17
+ border: none;
18
+ box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
15
19
  }
16
20
 
17
- .titaui-keyword-search__del-icon {
18
- font-size: 20px;
19
- color: #89919f;
20
- margin-right: 4px;
21
+ .titaui-keyword-search--activated .titaui-keyword-search__input {
22
+ opacity: 1;
23
+ visibility: visible;
21
24
  }
22
25
 
23
- .titaui-keyword-search__del-icon:hover {
24
- cursor: pointer;
25
- color: #f05e5e;
26
+ .titaui-keyword-search__input {
27
+ width: 120px;
28
+ padding-right: 52px;
29
+ opacity: 0;
30
+ visibility: hidden;
26
31
  }
27
32
 
28
- .titaui-keyword-search__search-icon.tu-icon-search {
29
- font-size: 20px !important;
33
+ .titaui-keyword-search__input input {
34
+ width: 100%;
35
+ border: none;
36
+ }
37
+
38
+ .titaui-keyword-search__del-icon {
39
+ font-size: 19px;
40
+ opacity: 0;
41
+ transform: scale(0);
42
+ transition: all .3s ease;
43
+ color: #c2cbd1;
30
44
  cursor: pointer;
45
+ visibility: hidden;
46
+ position: absolute;
47
+ right: 32px;
31
48
  }
32
49
 
33
- .titaui-keyword-search__search-icon.tu-icon-search:hover {
34
- color: #2879ff;
50
+ .titaui-keyword-search__del-icon--visible {
51
+ opacity: 1;
52
+ transform: scale(1);
53
+ visibility: visible;
35
54
  }
36
55
 
37
- .titaui-keyword-search__input {
38
- width: 0;
39
- animation: shrink 0.1s ease;
56
+ .titaui-keyword-search__del-icon:hover {
57
+ color: #f05e5e;
40
58
  }
41
59
 
42
- .titaui-keyword-search__input input {
43
- width: 100%;
44
- border: none;
60
+ .titaui-keyword-search__search-icon {
61
+ font-size: 20px !important;
62
+ cursor: pointer;
63
+ position: absolute;
64
+ right: 8px;
45
65
  }
46
66
 
47
- .titaui-keyword-search--active .titaui-keyword-search__input {
48
- width: 120px;
49
- margin-right: 12px;
50
- animation: grow 0.1s ease;
67
+ .titaui-keyword-search__search-icon:hover {
68
+ color: #2879ff;
51
69
  }
52
70
 
53
71
  @keyframes grow {
@@ -9,7 +9,7 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _classnames2 = _interopRequireDefault(require("classnames"));
12
+ var _classnames3 = _interopRequireDefault(require("classnames"));
13
13
 
14
14
  var _getLocale = require("../../utils/getLocale");
15
15
 
@@ -35,79 +35,110 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
35
35
 
36
36
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
37
 
38
- var precls = "titaui-keyword-search";
38
+ var precls = 'titaui-keyword-search';
39
39
 
40
40
  function KeywordSearch(props) {
41
- var onSearch = props.onSearch;
42
- var inputRef = (0, _react.useRef)();
41
+ var onSearch = props.onSearch,
42
+ _props$placeholder = props.placeholder,
43
+ placeholder = _props$placeholder === void 0 ? (0, _getLocale.getLocale)('Mod_Enterkeywords') : _props$placeholder,
44
+ _props$value = props.value,
45
+ value = _props$value === void 0 ? '' : _props$value;
43
46
 
44
47
  var _useState = (0, _react.useState)(false),
45
48
  _useState2 = _slicedToArray(_useState, 2),
46
- active = _useState2[0],
47
- setActive = _useState2[1];
49
+ activated = _useState2[0],
50
+ setActivated = _useState2[1];
48
51
 
49
- var _useState3 = (0, _react.useState)(""),
52
+ var _useState3 = (0, _react.useState)(''),
50
53
  _useState4 = _slicedToArray(_useState3, 2),
51
54
  keyword = _useState4[0],
52
55
  setKeyword = _useState4[1];
53
56
 
54
- var handleSearchClick = function handleSearchClick() {
55
- if (!active) {
57
+ var _useState5 = (0, _react.useState)(false),
58
+ _useState6 = _slicedToArray(_useState5, 2),
59
+ searchWhenClear = _useState6[0],
60
+ setSearchWhenClear = _useState6[1];
61
+
62
+ var inputRef = (0, _react.useRef)();
63
+ var timerRef = (0, _react.useRef)();
64
+
65
+ var focus = function focus() {
66
+ clearTimeout(timerRef.current);
67
+ timerRef.current = setTimeout(function () {
56
68
  var _inputRef$current;
57
69
 
58
- setActive(true);
59
70
  inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
60
- } else {
61
- handleSearch();
62
- }
71
+ });
63
72
  };
64
73
 
65
74
  var handleSearch = function handleSearch() {
66
- onSearch && onSearch({
75
+ setSearchWhenClear(!!keyword);
76
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch({
67
77
  keyWords: keyword
68
78
  });
69
79
  };
70
80
 
71
- var handleOnBlur = function handleOnBlur(e) {
72
- if (!keyword.length) setActive(false);
73
- };
81
+ var handleClearKeyword = function handleClearKeyword() {
82
+ focus();
83
+ setKeyword('');
74
84
 
75
- var changeValue = function changeValue(e) {
76
- setKeyword(e.target.value);
85
+ if (searchWhenClear || value) {
86
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch({
87
+ keyWords: ''
88
+ });
89
+ setSearchWhenClear(false);
90
+ }
77
91
  };
78
92
 
79
- var handleOnKeyDown = function handleOnKeyDown(e) {
80
- if (e.keyCode == 13) {
93
+ var handleSearchClick = function handleSearchClick() {
94
+ setActivated(true);
95
+ focus();
96
+
97
+ if (activated && keyword || searchWhenClear) {
81
98
  handleSearch();
82
99
  }
83
100
  };
84
101
 
85
- var clearKeyword = function clearKeyword(e) {
86
- var _inputRef$current2;
102
+ var onBlurHandler = function onBlurHandler() {
103
+ if (keyword.length) return;
104
+ clearTimeout(timerRef.current);
105
+ timerRef.current = setTimeout(function () {
106
+ setActivated(false);
107
+ }, 300);
108
+ };
87
109
 
88
- setKeyword("");
89
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
90
- onSearch && onSearch({
91
- keyWords: ""
92
- });
110
+ var onChangeHandler = function onChangeHandler(e) {
111
+ return setKeyword(e.target.value);
112
+ };
113
+
114
+ var onKeyDownHandler = function onKeyDownHandler(e) {
115
+ if (e.keyCode !== 13) return;
116
+ handleSearch();
93
117
  };
94
118
 
119
+ (0, _react.useEffect)(function () {
120
+ setKeyword(value);
121
+ setActivated(!!value);
122
+ return function () {
123
+ return clearTimeout(timerRef.current);
124
+ };
125
+ }, []);
95
126
  return /*#__PURE__*/_react["default"].createElement("div", {
96
- className: (0, _classnames2["default"])(precls, _defineProperty({}, "".concat(precls, "--active"), active))
127
+ className: (0, _classnames3["default"])(precls, _defineProperty({}, "".concat(precls, "--activated"), activated))
97
128
  }, /*#__PURE__*/_react["default"].createElement("span", {
98
129
  className: "".concat(precls, "__input")
99
130
  }, /*#__PURE__*/_react["default"].createElement("input", {
100
- value: keyword,
101
- onKeyUp: handleOnKeyDown,
102
- onChange: changeValue,
131
+ onBlur: onBlurHandler,
132
+ onChange: onChangeHandler,
133
+ onKeyUp: onKeyDownHandler,
134
+ placeholder: placeholder,
103
135
  ref: inputRef,
104
- onBlur: handleOnBlur,
105
- placeholder: (0, _getLocale.getLocale)("Mod_Enterkeywords")
106
- })), keyword.length > 0 && /*#__PURE__*/_react["default"].createElement("span", {
107
- className: (0, _classnames2["default"])("tu-icon-cross", "".concat(precls, "__del-icon")),
108
- onClick: clearKeyword
136
+ value: keyword
137
+ })), /*#__PURE__*/_react["default"].createElement("span", {
138
+ className: (0, _classnames3["default"])('tu-icon-cross', "".concat(precls, "__del-icon"), _defineProperty({}, "".concat(precls, "__del-icon--visible"), !!keyword)),
139
+ onClick: handleClearKeyword
109
140
  }), /*#__PURE__*/_react["default"].createElement("span", {
110
- className: (0, _classnames2["default"])("tu-icon-search", "".concat(precls, "__search-icon")),
141
+ className: (0, _classnames3["default"])('tu-icon-search', "".concat(precls, "__search-icon")),
111
142
  onClick: handleSearchClick
112
143
  }));
113
144
  }
@@ -83,7 +83,7 @@ var MblogAction = /*#__PURE__*/function (_PureComponent) {
83
83
  var _super = _createSuper(MblogAction);
84
84
 
85
85
  function MblogAction() {
86
- var _this;
86
+ var _temp, _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, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
94
+ return _possibleConstructorReturn(_this, (_temp = _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
- }, _assertThisInitialized(_this)));
124
+ }, _temp));
125
125
  }
126
126
 
127
127
  _createClass(MblogAction, [{
@@ -48,7 +48,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
48
48
  function SurveyMenus(props) {
49
49
  var _props$onSelect = props.onSelect,
50
50
  onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
51
- history = props.history;
51
+ history = props.history,
52
+ _props$defaultMenus = props.defaultMenus,
53
+ defaultMenus = _props$defaultMenus === void 0 ? [] : _props$defaultMenus;
52
54
 
53
55
  var _useState = (0, _react.useState)({}),
54
56
  _useState2 = _slicedToArray(_useState, 2),
@@ -108,7 +110,8 @@ function SurveyMenus(props) {
108
110
  }, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_surveyFrontMenus["default"], {
109
111
  ref: surveyFrontMenu,
110
112
  onSelect: onSelect,
111
- history: history
113
+ history: history,
114
+ defaultMenus: defaultMenus
112
115
  })), /*#__PURE__*/_react["default"].createElement("div", {
113
116
  className: (0, _classnames["default"])("tita-bootstrap__scrollbar")
114
117
  }))));
@@ -29,14 +29,19 @@ var surveyMenus = /*#__PURE__*/function () {
29
29
  function surveyMenus(props) {
30
30
  _classCallCheck(this, surveyMenus);
31
31
 
32
- this.menus = [{
33
- icon: 'survey-involved',
34
- label: '活跃度统计',
35
- key: PAGE_SURVEY_MY_INVOLVED,
36
- type: _index.MENU_ITEM_NOE,
37
- href: '#/skynet-dashboard',
38
- isShow: true
39
- }];
32
+ // this.menus = [
33
+ // {
34
+ // icon: 'survey-involved',
35
+ // label: '活跃度统计',
36
+ // key: PAGE_SURVEY_MY_INVOLVED,
37
+ // type: MENU_ITEM_NOE,
38
+ // href: '#/skynet-dashboard',
39
+ // isShow: true,
40
+ // },
41
+ // ]
42
+ var _props$defaultMenus = props.defaultMenus,
43
+ defaultMenus = _props$defaultMenus === void 0 ? [] : _props$defaultMenus;
44
+ this.menus = defaultMenus;
40
45
  }
41
46
 
42
47
  _createClass(surveyMenus, [{
@@ -19,8 +19,6 @@ var _menus = _interopRequireWildcard(require("./menus"));
19
19
 
20
20
  var _menuHighlight = _interopRequireDefault(require("./menu-highlight"));
21
21
 
22
- var _auth = require("../../../../utils/auth");
23
-
24
22
  require("../../index.css");
25
23
 
26
24
  require("./index.css");
@@ -48,9 +46,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
48
46
  var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
49
47
  var _props$onSelect = props.onSelect,
50
48
  onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
51
- history = props.history;
52
- var baseAuth = new _auth.BaseAuth();
53
- var isShowSurveyManage = baseAuth.isBoss() || baseAuth.isSurveyManager();
49
+ history = props.history,
50
+ _props$defaultMenus = props.defaultMenus,
51
+ defaultMenus = _props$defaultMenus === void 0 ? [] : _props$defaultMenus;
54
52
 
55
53
  var _useState = (0, _react.useState)(function () {
56
54
  return document.body.offsetHeight - 198;
@@ -77,7 +75,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
77
75
 
78
76
  var _useState7 = (0, _react.useState)(function () {
79
77
  surveyMenusData.current = new _menus["default"]({
80
- isShowSurveyManage: isShowSurveyManage
78
+ defaultMenus: defaultMenus
81
79
  });
82
80
  return surveyMenusData.current.getMenus();
83
81
  }),
@@ -93,22 +91,24 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
93
91
  });
94
92
  var pathname = history.location.pathname;
95
93
  var firstMenuHref = menus[0].data.href;
96
- if (firstMenuHref.split('#')[1] === pathname) return; //当前路由与二级菜单第一项相同时直接return
94
+ if (firstMenuHref.split('#')[1] === pathname) return; // 当前路由与二级菜单第一项相同时直接return
97
95
 
98
96
  var menusHrefArr = ['/survey/manage', '/survey/my-involved'];
99
97
  var isIncludeMenu = menusHrefArr.find(function (item) {
100
- //表示当前路由是否是左侧二级菜单的选项
101
- return item.includes(pathname);
98
+ return (// 表示当前路由是否是左侧二级菜单的选项
99
+ item.includes(pathname)
100
+ );
102
101
  });
103
- if (!isIncludeMenu) return; //如果不是二级菜单选项直接return
102
+ if (!isIncludeMenu) return; // 如果不是二级菜单选项直接return
104
103
 
105
104
  var isShowMenuItem = menus.find(function (item) {
106
- //判断当前路由是否有权限被展示
107
- return item.data.href.split('#')[1].includes(pathname);
105
+ return (// 判断当前路由是否有权限被展示
106
+ item.data.href.split('#')[1].includes(pathname)
107
+ );
108
108
  });
109
109
 
110
110
  if (!isShowMenuItem) {
111
- //如果当前路由没有权限展示的话,则跳转到有权限二级路由的第一项
111
+ // 如果当前路由没有权限展示的话,则跳转到有权限二级路由的第一项
112
112
  window.location.href = firstMenuHref;
113
113
  }
114
114
  }, [history.location.pathname, history.location.search]);
@@ -122,9 +122,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
122
122
  var node = _ref.node;
123
123
  onSelect(node); // 处理菜单选中
124
124
 
125
- if (!selectedKyes.length) {
126
- return;
127
- } else {
125
+ if (!selectedKyes.length) {} else {
128
126
  setSelectedMenuKeys(selectedKyes);
129
127
  }
130
128
  };
@@ -81,7 +81,7 @@ var EditPop = /*#__PURE__*/function (_PureComponent) {
81
81
  var _super = _createSuper(EditPop);
82
82
 
83
83
  function EditPop() {
84
- var _this;
84
+ var _temp, _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, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
92
+ return _possibleConstructorReturn(_this, (_temp = _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
- }, _assertThisInitialized(_this)));
155
+ }, _temp));
156
156
  }
157
157
 
158
158
  _createClass(EditPop, [{
@@ -89,7 +89,7 @@ function _default(props) {
89
89
  name: "doing"
90
90
  }, (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
91
91
  name: "finish"
92
- }, (0, _getLocale.getLocale)("OKR_MyO_Butt_Hasended")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
92
+ }, (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
93
93
  name: "delay"
94
94
  }, (0, _getLocale.getLocale)("OKR_MyO_E_From_Delayed")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
95
95
  name: "cancel"