@titaui/pc 1.11.27-beta.8 → 1.11.29

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 (270) hide show
  1. package/lib/components/avatar/name-avatar/index.css +0 -1
  2. package/lib/components/avatar/name-avatar/index.js +13 -22
  3. package/lib/components/avatar/text-avatar/index.css +7 -0
  4. package/lib/components/avatar/text-avatar/index.js +32 -7
  5. package/lib/components/button/icon-btn/index.js +17 -8
  6. package/lib/components/button/rect-btn/index.css +11 -45
  7. package/lib/components/button/rect-btn/index.js +13 -19
  8. package/lib/components/change-okr-modal/Item.js +14 -14
  9. package/lib/components/change-okr-modal/index.js +1 -2
  10. package/lib/components/create-okr-modal/index.js +1 -3
  11. package/lib/components/create-okr-modal/request-api.js +1 -1
  12. package/lib/components/dialog-confirm/index.css +2 -2
  13. package/lib/components/drawer/headerAction.js +1 -5
  14. package/lib/components/drawer/headerDrop.js +4 -42
  15. package/lib/components/drawer/index.css +0 -33
  16. package/lib/components/drawer/index.js +3 -26
  17. package/lib/components/drop-selector/index.js +25 -10
  18. package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
  19. package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
  20. package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
  21. package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
  22. package/lib/components/dynamic/advertise/index.css +21 -0
  23. package/lib/components/dynamic/advertise/index.js +126 -0
  24. package/lib/components/dynamic/advertise/interface.js +5 -0
  25. package/lib/components/dynamic/advertise/util.js +28 -0
  26. package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
  27. package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
  28. package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
  29. package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
  30. package/lib/components/dynamic/constant.js +33 -32
  31. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
  32. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
  33. package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
  34. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
  35. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
  36. package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
  37. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
  38. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
  39. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
  40. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
  41. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
  42. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
  43. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
  44. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
  45. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
  46. package/lib/components/dynamic/dynamic-item/index.js +50 -32
  47. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
  48. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  49. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  50. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  51. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  52. package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
  53. package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
  54. package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
  55. package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
  56. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
  57. package/lib/components/dynamic/dynamic-liking/index.css +81 -0
  58. package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
  59. package/lib/components/dynamic/dynamic-liking/item.js +75 -0
  60. package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
  61. package/lib/components/dynamic/dynamic-list/index.js +7 -15
  62. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
  63. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
  64. package/lib/components/dynamic/dynamic-topping/index.css +141 -0
  65. package/lib/components/dynamic/dynamic-topping/index.js +82 -0
  66. package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
  67. package/lib/components/dynamic/dynamic-topping/item.js +153 -0
  68. package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
  69. package/lib/components/dynamic/dynamic.css +173 -0
  70. package/lib/components/dynamic/dynamic.js +428 -0
  71. package/lib/components/dynamic/export-module/index.js +37 -0
  72. package/lib/components/dynamic/img/dynamic-top.svg +14 -0
  73. package/lib/components/dynamic/index.js +12 -9
  74. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  75. package/lib/components/dynamic/my-team/img/line.png +0 -0
  76. package/lib/components/dynamic/my-team/img/team.png +0 -0
  77. package/lib/components/dynamic/my-team/index.css +184 -0
  78. package/lib/components/dynamic/my-team/index.js +263 -0
  79. package/lib/components/dynamic/my-team/request-api.js +52 -0
  80. package/lib/components/dynamic/my-team/util.js +20 -0
  81. package/lib/components/dynamic/new-ui.css +192 -0
  82. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
  83. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
  84. package/lib/components/dynamic/online-broadcast/data.js +77 -0
  85. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
  86. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  87. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  88. package/lib/components/dynamic/online-broadcast/index.css +46 -0
  89. package/lib/components/dynamic/online-broadcast/index.js +61 -0
  90. package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
  91. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
  92. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
  93. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
  94. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
  95. package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
  96. package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
  97. package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
  98. package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
  99. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  100. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  101. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  102. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  103. package/lib/components/dynamic/quick-operation/index.css +51 -0
  104. package/lib/components/dynamic/quick-operation/index.js +120 -0
  105. package/lib/components/dynamic/request-api.js +68 -7
  106. package/lib/components/e-priority/index.js +8 -8
  107. package/lib/components/eReport/eReportShare/index.js +11 -11
  108. package/lib/components/form/form-fields/date/index.css +24 -0
  109. package/lib/components/form/form-fields/date/index.js +102 -0
  110. package/lib/components/form/form-fields/input/index.js +10 -10
  111. package/lib/components/form/form-fields/user/index.css +23 -3
  112. package/lib/components/form/form-fields/user/index.js +18 -8
  113. package/lib/components/form/form-fields/user/user-input.js +15 -6
  114. package/lib/components/form/index.js +10 -3
  115. package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
  116. package/lib/components/icon-button-list/index.js +3 -3
  117. package/lib/components/img-viewer/index.css +3 -3
  118. package/lib/components/img-viewer/index.js +11 -11
  119. package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
  120. package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
  121. package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
  122. package/lib/components/menus/components/menu-tree/index.css +4 -2
  123. package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
  124. package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
  125. package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
  126. package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
  127. package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
  128. package/lib/components/menus/index.js +11 -5
  129. package/lib/components/nav-top/components/menu/index.js +14 -14
  130. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
  131. package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
  132. package/lib/components/nav-top/components/user-message/constant.js +1 -0
  133. package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
  134. package/lib/components/nav-top/components/user-message/index.js +23 -20
  135. package/lib/components/nav-top/index.js +4 -8
  136. package/lib/components/nav-top/request.apis.js +3 -1
  137. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
  138. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
  139. package/lib/components/okr-detail/components/header/index.js +3 -10
  140. package/lib/components/okr-detail/components/header/o-name.js +3 -10
  141. package/lib/components/okr-detail/components/o-classify.js +1 -5
  142. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
  143. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
  144. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
  145. package/lib/components/okr-detail/detail-header/actions.js +23 -23
  146. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
  147. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
  148. package/lib/components/okr-detail/detail-header/index.css +0 -11
  149. package/lib/components/okr-detail/detail-header/index.js +234 -228
  150. package/lib/components/okr-detail/index.js +21 -40
  151. package/lib/components/okr-detail/okr-list/index.js +8 -11
  152. package/lib/components/okr-detail/request-apis.js +4 -10
  153. package/lib/components/okr-flow/child-node/index.css +6 -6
  154. package/lib/components/okr-flow/child-node/work-node.js +21 -21
  155. package/lib/components/okr-flow/export-modal/index.js +33 -19
  156. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
  157. package/lib/components/okr-flow/okr-map/index.js +5 -5
  158. package/lib/components/okr-flow/request-apis.js +4 -4
  159. package/lib/components/okr-flow/root-node/index.js +25 -24
  160. package/lib/components/okr-flow/utils/index.js +5 -5
  161. package/lib/components/okr-flow/utils/tree-handler.js +17 -17
  162. package/lib/components/okr-period-selector/index.js +5 -9
  163. package/lib/components/okr-period-selector/select-cycle.js +19 -23
  164. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
  165. package/lib/components/operation-records/index.js +1 -1
  166. package/lib/components/operation-records/style.js +1 -1
  167. package/lib/components/pagination/index.css +3 -3
  168. package/lib/components/pagination/select.css +58 -23
  169. package/lib/components/period-selector/index.css +3 -3
  170. package/lib/components/period-selector/index.js +11 -11
  171. package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
  172. package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
  173. package/lib/components/picker/components/panels/date-panel/index.css +14 -0
  174. package/lib/components/picker/components/panels/date-panel/index.js +49 -0
  175. package/lib/components/picker/components/panels/month-panel/index.css +27 -0
  176. package/lib/components/picker/components/panels/month-panel/index.js +63 -0
  177. package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
  178. package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
  179. package/lib/components/picker/components/panels/panel-body/index.js +53 -0
  180. package/lib/components/picker/components/panels/panel-head/index.js +48 -0
  181. package/lib/components/picker/components/panels/year-panel/index.css +23 -0
  182. package/lib/components/picker/components/panels/year-panel/index.js +65 -0
  183. package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
  184. package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
  185. package/lib/components/picker/components/picker-trigger/index.css +57 -0
  186. package/lib/components/picker/components/picker-trigger/index.js +94 -0
  187. package/lib/components/picker/context.js +15 -0
  188. package/lib/components/picker/index.css +121 -0
  189. package/lib/components/picker/index.js +13 -0
  190. package/lib/components/picker/picker-panels.js +182 -0
  191. package/lib/components/picker/picker.js +132 -0
  192. package/lib/components/picker/type.js +5 -0
  193. package/lib/components/picker/utils.js +28 -0
  194. package/lib/components/popup/index.js +4 -4
  195. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
  196. package/lib/components/radio/index.css +9 -9
  197. package/lib/components/scrollbar/scroll-mask/index.js +1 -1
  198. package/lib/components/superset-charts/utils/axios.js +5 -5
  199. package/lib/components/survey-model/index.css +18 -18
  200. package/lib/components/survey-model/instance.js +1 -1
  201. package/lib/components/task-relation-modal/request-api.js +1 -2
  202. package/lib/components/task-tree/helper.js +61 -0
  203. package/lib/components/task-tree/images/P1.svg +15 -0
  204. package/lib/components/task-tree/images/P2.svg +15 -0
  205. package/lib/components/task-tree/images/P3.svg +15 -0
  206. package/lib/components/task-tree/images/P4.svg +15 -0
  207. package/lib/components/task-tree/images/P5.svg +15 -0
  208. package/lib/components/task-tree/images/arrow.svg +9 -0
  209. package/lib/components/task-tree/images/empty-131.png +0 -0
  210. package/lib/components/task-tree/images/followed.svg +33 -0
  211. package/lib/components/task-tree/images/nice.svg +108 -0
  212. package/lib/components/task-tree/images/struc12.png +0 -0
  213. package/lib/components/task-tree/images/struc2.png +0 -0
  214. package/lib/components/task-tree/images/xialat-s.svg +13 -0
  215. package/lib/components/task-tree/index.js +22 -0
  216. package/lib/components/task-tree/mock.js +944 -0
  217. package/lib/components/task-tree/precls.js +8 -0
  218. package/lib/components/task-tree/request-apis.js +88 -0
  219. package/lib/components/task-tree/task-item-node/constant.js +45 -0
  220. package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
  221. package/lib/components/task-tree/task-item-node/e-project.js +212 -0
  222. package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
  223. package/lib/components/task-tree/task-item-node/e-task.js +426 -0
  224. package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
  225. package/lib/components/task-tree/task-item-node/index.css +289 -0
  226. package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
  227. package/lib/components/task-tree/task-tree.css +16 -0
  228. package/lib/components/task-tree/task-tree.js +49 -0
  229. package/lib/components/time-picker/index.css +123 -0
  230. package/lib/components/time-picker/index.js +13 -0
  231. package/lib/components/time-picker/time-picker-selector.js +138 -0
  232. package/lib/components/time-picker/time-picker.js +336 -0
  233. package/lib/components/time-picker/timer-picker-input.js +96 -0
  234. package/lib/components/time-picker/utils.js +52 -0
  235. package/lib/components/toast/index.js +3 -5
  236. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
  237. package/lib/components-v1/radio/radio.js +3 -3
  238. package/lib/components-v1/radio/style/index.css +8 -8
  239. package/lib/index.js +0 -40
  240. package/lib/pages/aha2021/index.js +5 -1
  241. package/lib/pages/new-okr-list/header/index.css +0 -45
  242. package/lib/pages/new-okr-list/header/index.js +16 -38
  243. package/lib/pages/new-okr-list/index.js +1 -3
  244. package/lib/pages/new-okr-list/list/index.js +2 -19
  245. package/lib/pages/new-okr-list/request-api.js +2 -8
  246. package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
  247. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
  248. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
  249. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
  250. package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
  251. package/lib/pages/okr-map/number-select/index.js +2 -2
  252. package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
  253. package/lib/utils/auth.js +6 -6
  254. package/lib/utils/bs-global.js +12 -12
  255. package/lib/utils/format-time.js +1 -8
  256. package/lib/utils/hooks.js +72 -0
  257. package/lib/utils/open-data.js +27 -31
  258. package/package.json +6 -3
  259. package/.eslintignore +0 -3
  260. package/.eslintrc.js +0 -223
  261. package/.husky/pre-commit +0 -4
  262. package/.prettierignore +0 -31
  263. package/.prettierrc.js +0 -90
  264. package/.vscode/settings.json +0 -5
  265. package/lib/components/okr-detail/detail-header/constant.js +0 -53
  266. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
  267. package/lib/components/okr-detail/helper.js +0 -108
  268. package/lib/components/textarea/index.css +0 -142
  269. package/lib/components/textarea/index.js +0 -259
  270. package/lib/pages/new-okr-list/header/common.js +0 -52
@@ -55,5 +55,4 @@
55
55
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
56
56
  color: #6F7886;
57
57
  line-height: 20px;
58
- margin-left: 4px;
59
58
  }
@@ -58,10 +58,7 @@ var NameAvatar = function NameAvatar(props) {
58
58
  onDelUser = props.onDelUser,
59
59
  _props$textWidth = props.textWidth,
60
60
  textWidth = _props$textWidth === void 0 ? 42 : _props$textWidth,
61
- textClass = props.textClass,
62
- renderRightTopCmp = props.renderRightTopCmp,
63
- _props$avatarTips = props.avatarTips,
64
- avatarTips = _props$avatarTips === void 0 ? '' : _props$avatarTips;
61
+ textClass = props.textClass;
65
62
  var hasAvatar = src && !src.match(/default\w*.jpg$/);
66
63
 
67
64
  var _useState = (0, _react.useState)(false),
@@ -106,7 +103,7 @@ var NameAvatar = function NameAvatar(props) {
106
103
  style: {
107
104
  width: size.width,
108
105
  height: size.width,
109
- verticalAlign: 'top'
106
+ verticalAlign: "top"
110
107
  },
111
108
  src: src
112
109
  });
@@ -123,11 +120,11 @@ var NameAvatar = function NameAvatar(props) {
123
120
  }
124
121
  }, /*#__PURE__*/_react["default"].createElement("div", {
125
122
  style: {
126
- display: 'inline-block',
123
+ display: "inline-block",
127
124
  width: "".concat(size.fontSize, "px"),
128
- margin: '0 auto',
129
- overflow: 'hidden',
130
- whiteSpace: 'nowrap',
125
+ margin: "0 auto",
126
+ overflow: "hidden",
127
+ whiteSpace: "nowrap",
131
128
  fontSize: "".concat(size.fontSize, "px"),
132
129
  lineHeight: "".concat(size.width, "px")
133
130
  }
@@ -137,7 +134,7 @@ var NameAvatar = function NameAvatar(props) {
137
134
  })));
138
135
  }
139
136
 
140
- var cuttedName = '';
137
+ var cuttedName = "";
141
138
  var cuttedNameLen = 0;
142
139
 
143
140
  for (var i = 0, lent = name.length; i < lent; i++) {
@@ -170,11 +167,11 @@ var NameAvatar = function NameAvatar(props) {
170
167
  className: "titaui-pc-avator__name-avatar-container",
171
168
  onMouseEnter: handleMouseEnter,
172
169
  onMouseLeave: handleMouseLeave
173
- }, renderRightTopCmp, /*#__PURE__*/_react["default"].createElement("div", {
170
+ }, /*#__PURE__*/_react["default"].createElement("div", {
174
171
  onClick: handleDelUser,
175
172
  onMouseLeave: handleCloseIconMouseLeave,
176
173
  onMouseEnter: handleCloseIconMouseEnter,
177
- className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ? 'titaui-pc-avator--enter' : ''),
174
+ className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ? "titaui-pc-avator--enter" : ""),
178
175
  style: {
179
176
  left: "".concat(size.width - 14, "px")
180
177
  }
@@ -188,10 +185,7 @@ var NameAvatar = function NameAvatar(props) {
188
185
  onClick: onClick,
189
186
  onMouseEnter: onMouseEnter,
190
187
  onMouseLeave: onMouseLeave
191
- }, avatarTips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
192
- overlay: avatarTips,
193
- placement: "top"
194
- }, hasAvatar ? renderImgAvatar() : renderTextAvatar()), !avatarTips && (hasAvatar ? renderImgAvatar() : renderTextAvatar())), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
188
+ }, hasAvatar ? renderImgAvatar() : renderTextAvatar()), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
195
189
  overlay: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
196
190
  name: name,
197
191
  id: userId
@@ -200,17 +194,14 @@ var NameAvatar = function NameAvatar(props) {
200
194
  }, /*#__PURE__*/_react["default"].createElement("span", {
201
195
  className: "titaui-pc-avator__name ".concat(textClass),
202
196
  style: {
203
- maxWidth: textWidth
197
+ width: textWidth
204
198
  }
205
199
  }, /*#__PURE__*/_react["default"].createElement("span", {
206
200
  ref: textRef
207
- }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
208
- name: name,
209
- id: userId
210
- })))) : /*#__PURE__*/_react["default"].createElement("span", {
201
+ }, name))) : /*#__PURE__*/_react["default"].createElement("span", {
211
202
  className: "titaui-pc-avator__name ".concat(textClass),
212
203
  style: {
213
- maxWidth: textWidth
204
+ width: textWidth
214
205
  }
215
206
  }, /*#__PURE__*/_react["default"].createElement("span", {
216
207
  ref: textRef
@@ -24,6 +24,13 @@
24
24
  background-size: contain;
25
25
  }
26
26
 
27
+ .titaui-text-avatar__img {
28
+ margin-right: 4px;
29
+ display: inline-block;
30
+ vertical-align: middle;
31
+ height: 24px;
32
+ }
33
+
27
34
  .titaui-text-avatar__name {
28
35
  vertical-align: middle;
29
36
  }
@@ -17,6 +17,8 @@ var _tooltip = _interopRequireDefault(require("../../tooltip"));
17
17
 
18
18
  var _userSelector = _interopRequireDefault(require("../../user-selector"));
19
19
 
20
+ var _default2 = _interopRequireDefault(require("../default"));
21
+
20
22
  require("./index.css");
21
23
 
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -56,7 +58,11 @@ function TextAvatar(props) {
56
58
  _props$nameTips = props.nameTips,
57
59
  nameTips = _props$nameTips === void 0 ? function (name) {
58
60
  return name;
59
- } : _props$nameTips;
61
+ } : _props$nameTips,
62
+ _props$showAvatar = props.showAvatar,
63
+ showAvatar = _props$showAvatar === void 0 ? false : _props$showAvatar,
64
+ _props$avatar = props.avatar,
65
+ avatar = _props$avatar === void 0 ? {} : _props$avatar;
60
66
 
61
67
  var _useState = (0, _react.useState)(false),
62
68
  _useState2 = _slicedToArray(_useState, 2),
@@ -78,6 +84,29 @@ function TextAvatar(props) {
78
84
 
79
85
 
80
86
  var FieldPerson = editable ? _userSelector["default"] : "span";
87
+
88
+ var renderAvatar = function renderAvatar() {
89
+ if (showAvatar) {
90
+ return /*#__PURE__*/_react["default"].createElement("span", {
91
+ className: "".concat(preCls, "__img")
92
+ }, /*#__PURE__*/_react["default"].createElement(_default2["default"], {
93
+ userId: id,
94
+ src: avatar !== null && avatar !== void 0 && avatar.HasAvatar || avatar !== null && avatar !== void 0 && avatar.hasAvatar ? avatar.medium : "",
95
+ color: avatar === null || avatar === void 0 ? void 0 : avatar.color,
96
+ name: name,
97
+ size: {
98
+ fontSize: 12,
99
+ width: 24,
100
+ textNum: 1
101
+ }
102
+ }));
103
+ }
104
+
105
+ return /*#__PURE__*/_react["default"].createElement("span", {
106
+ className: "".concat(preCls, "__icon")
107
+ });
108
+ };
109
+
81
110
  return /*#__PURE__*/_react["default"].createElement(FieldPerson, {
82
111
  multiple: false,
83
112
  selectNodes: {},
@@ -105,9 +134,7 @@ function TextAvatar(props) {
105
134
  style: {
106
135
  maxWidth: width
107
136
  }
108
- }, /*#__PURE__*/_react["default"].createElement("span", {
109
- className: "".concat(preCls, "__icon")
110
- }), /*#__PURE__*/_react["default"].createElement("span", {
137
+ }, renderAvatar(), /*#__PURE__*/_react["default"].createElement("span", {
111
138
  ref: text,
112
139
  className: "".concat(preCls, "__name")
113
140
  }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
@@ -118,9 +145,7 @@ function TextAvatar(props) {
118
145
  style: {
119
146
  maxWidth: width
120
147
  }
121
- }, /*#__PURE__*/_react["default"].createElement("span", {
122
- className: "".concat(preCls, "__icon")
123
- }), /*#__PURE__*/_react["default"].createElement("span", {
148
+ }, renderAvatar(), /*#__PURE__*/_react["default"].createElement("span", {
124
149
  ref: text,
125
150
  className: "".concat(preCls, "__name")
126
151
  }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
@@ -11,11 +11,19 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  require("./index.css");
13
13
 
14
+ var _excluded = ["border", "theme", "onClick", "disabled", "icon"];
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
 
18
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
+
16
20
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
21
 
18
- var precls = "titaui-icon-btn";
22
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23
+
24
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
+
26
+ var precls = 'titaui-icon-btn';
19
27
 
20
28
  function IconBtn(props) {
21
29
  var _classNames;
@@ -24,15 +32,16 @@ function IconBtn(props) {
24
32
  theme = props.theme,
25
33
  onClick = props.onClick,
26
34
  disabled = props.disabled,
27
- icon = props.icon;
35
+ icon = props.icon,
36
+ restProps = _objectWithoutProperties(props, _excluded);
28
37
 
29
38
  var onClickHandler = function onClickHandler() {
30
39
  if (disabled) return;
31
- onClick && onClick();
40
+ onClick === null || onClick === void 0 ? void 0 : onClick();
32
41
  };
33
42
 
34
43
  var renderIcon = function renderIcon() {
35
- if (typeof icon === "string") {
44
+ if (typeof icon === 'string') {
36
45
  return /*#__PURE__*/_react["default"].createElement("span", {
37
46
  className: "".concat(precls, "__icon")
38
47
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -45,18 +54,18 @@ function IconBtn(props) {
45
54
  }, icon);
46
55
  };
47
56
 
48
- return /*#__PURE__*/_react["default"].createElement("span", {
57
+ return /*#__PURE__*/_react["default"].createElement("span", _extends({
49
58
  className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(theme), (_classNames = {}, _defineProperty(_classNames, "".concat(precls, "--border"), border), _defineProperty(_classNames, "".concat(precls, "--disabled"), disabled), _classNames)),
50
59
  onClick: onClickHandler
51
- }, renderIcon());
60
+ }, restProps), renderIcon());
52
61
  }
53
62
 
54
63
  IconBtn.defaultProps = {
55
64
  border: false,
56
- theme: "gray",
65
+ theme: 'gray',
57
66
  onClick: function onClick() {},
58
67
  disabled: false,
59
- icon: "tu-icon-smile"
68
+ icon: 'tu-icon-smile'
60
69
  };
61
70
  var _default = IconBtn;
62
71
  exports["default"] = _default;
@@ -13,7 +13,7 @@
13
13
  align-items: center;
14
14
  justify-content: center;
15
15
  min-width: 64px;
16
- font-size: 14px;
16
+ font-size: 13px;
17
17
  padding: 0 12px;
18
18
  }
19
19
 
@@ -60,35 +60,21 @@
60
60
  background: #5c8eff;
61
61
  }
62
62
 
63
- .titaui-rect-btn--secondary {
64
- font-size: 14px;
65
- font-weight: normal;
66
- color: #2879ff;
67
- line-height: 28px;
68
- background: rgba(40, 121, 255, 0.2);
69
- margin-right: 16px;
70
- }
71
-
72
- .titaui-rect-btn--secondary:hover {
73
- color: #fff;
74
- background-color: #2879ff;
75
- }
76
-
77
63
  .titaui-rect-btn--cancel {
78
- color: #6f7886;
79
- border: 1px solid #dfe3ea;
80
- background: #ffffff;
64
+ color: #6F7886;
65
+ border: 1px solid #DFE3EA;
66
+ background: #FFFFFF;
81
67
  }
82
68
 
83
69
  .titaui-rect-btn--cancel:hover {
84
- color: #2879ff;
85
- border: 1px solid #2879ff;
70
+ color: #2879FF;
71
+ border: 1px solid #2879FF;
86
72
  }
87
73
 
88
74
  .titaui-rect-btn--delete {
89
- background: #ffffff;
90
- color: #f05e5e;
91
- border: 1px solid #f05e5e;
75
+ background: #FFFFFF;
76
+ color: #F05E5E;
77
+ border: 1px solid #F05E5E;
92
78
  }
93
79
 
94
80
  .titaui-rect-btn--delete:hover {
@@ -106,31 +92,11 @@
106
92
  user-select: none;
107
93
  }
108
94
 
109
- .titaui-rect-btn--disabled:hover .titaui-rect-btn--default:hover {
110
- background: #fff;
111
- }
112
-
113
- .titaui-rect-btn--disabled:hover .titaui-rect-btn--primary:hover {
114
- background: #2879ff;
115
- }
116
-
117
- .titaui-rect-btn--disabled:hover .titaui-rect-btn--secondary:hover {
118
- background: rgba(40, 121, 255, 0.2);
119
- }
120
-
121
- .titaui-rect-btn--disabled:hover .titaui-rect-btn--cancel:hover {
122
- background: #ffffff;
123
- }
124
-
125
- .titaui-rect-btn--disabled:hover .titaui-rect-btn--delete:hover {
126
- background: #ffffff;
127
- }
128
-
129
95
  .titaui-rect-btn--primary.titaui-rect-btn--disabled {
130
- background: #93bcff;
96
+ background: #93BCFF;
131
97
  opacity: 1;
132
98
  }
133
99
 
134
100
  .titaui-rect-btn--primary.titaui-rect-btn--disabled:hover {
135
- background: #93bcff;
101
+ background: #93BCFF;
136
102
  }
@@ -17,30 +17,27 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
17
17
 
18
18
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
19
 
20
- var precls = "titaui-rect-btn";
20
+ var precls = 'titaui-rect-btn';
21
21
 
22
22
  function RectBtn(props) {
23
23
  var _props$type = props.type,
24
- type = _props$type === void 0 ? "default" : _props$type,
24
+ type = _props$type === void 0 ? 'default' : _props$type,
25
25
  _props$icon = props.icon,
26
- icon = _props$icon === void 0 ? "" : _props$icon,
26
+ icon = _props$icon === void 0 ? '' : _props$icon,
27
27
  _props$text = props.text,
28
- text = _props$text === void 0 ? (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine") : _props$text,
28
+ text = _props$text === void 0 ? (0, _getLocale.getLocale)('OKR_MyO_Butt_Determine') : _props$text,
29
29
  _props$size = props.size,
30
- size = _props$size === void 0 ? "normal" : _props$size,
30
+ size = _props$size === void 0 ? 'normal' : _props$size,
31
31
  _props$onClick = props.onClick,
32
32
  onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
33
33
  _props$className = props.className,
34
- className = _props$className === void 0 ? "" : _props$className,
34
+ className = _props$className === void 0 ? '' : _props$className,
35
35
  _props$disabled = props.disabled,
36
36
  disabled = _props$disabled === void 0 ? false : _props$disabled,
37
- style = props.style,
38
- children = props.children,
39
- _props$loading = props.loading,
40
- loading = _props$loading === void 0 ? false : _props$loading;
37
+ style = props.style;
41
38
 
42
39
  var renderIcon = function renderIcon() {
43
- if (typeof icon === "string") {
40
+ if (typeof icon === 'string') {
44
41
  return /*#__PURE__*/_react["default"].createElement("span", {
45
42
  className: "".concat(precls, "__icon")
46
43
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -53,19 +50,16 @@ function RectBtn(props) {
53
50
  }, icon);
54
51
  };
55
52
 
56
- var onClickHandler = function onClickHandler(e) {
57
- if (disabled || loading) return;
58
-
59
- if (onClick) {
60
- onClick(e);
61
- }
53
+ var onClickHandler = function onClickHandler() {
54
+ if (disabled) return;
55
+ onClick && onClick();
62
56
  };
63
57
 
64
58
  return /*#__PURE__*/_react["default"].createElement("span", {
65
- className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled || loading), className),
59
+ className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled), className),
66
60
  style: style,
67
61
  onClick: onClickHandler
68
- }, icon && renderIcon(), children || text);
62
+ }, icon && renderIcon(), props.children || text);
69
63
  }
70
64
 
71
65
  var _default = RectBtn;
@@ -54,27 +54,27 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
54
54
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
55
55
 
56
56
  var colorMap = {
57
- 1: "132,117,255",
58
- 2: "79,115,255",
59
- 3: "46,156,255",
60
- 4: "12,192,201"
57
+ 1: '132,117,255',
58
+ 2: '79,115,255',
59
+ 3: '46,156,255',
60
+ 4: '12,192,201'
61
61
  };
62
62
 
63
63
  var formatKeywordsFunc = function formatKeywordsFunc(str, key) {
64
- var reg = new RegExp("(".concat(key, ")"), "g");
64
+ var reg = new RegExp("(".concat(key, ")"), 'g');
65
65
  var newstr = str.replace(reg, "<span style=\"color: #2879ff;\">".concat(key, "</span>"));
66
66
  return newstr;
67
67
  };
68
68
 
69
69
  var unFormatKeywordsFunc = function unFormatKeywordsFunc(str, key) {
70
70
  var regExpKey = "<span style=\"color: #2879ff;\">".concat(key, "</span>");
71
- var reg = new RegExp("(".concat(regExpKey, ")"), "g");
71
+ var reg = new RegExp("(".concat(regExpKey, ")"), 'g');
72
72
  var newstr = str.replace(reg, key);
73
73
  return newstr;
74
74
  };
75
75
 
76
76
  var htmlToText = function htmlToText(text) {
77
- var div = document.createElement("div");
77
+ var div = document.createElement('div');
78
78
  div.innerHTML = text;
79
79
  var newtext = div.innerText || div.textContent;
80
80
  return newtext;
@@ -153,11 +153,11 @@ var Item = /*#__PURE__*/function (_PureComponent) {
153
153
 
154
154
  _this.getCycleText = function () {
155
155
  var data = _this.props.data;
156
- var hzNum = [(0, _getLocale.getLocale)("OKR_MyO_Pop_1stQuarter"), (0, _getLocale.getLocale)("OKR_MyO_Pop_2ndQuarter"), (0, _getLocale.getLocale)("OKR_MyO_Pop_3rdQuarter"), (0, _getLocale.getLocale)("OKR_MyO_Pop_4thQuarter")];
156
+ var hzNum = [(0, _getLocale.getLocale)('OKR_MyO_Pop_1stQuarter'), (0, _getLocale.getLocale)('OKR_MyO_Pop_2ndQuarter'), (0, _getLocale.getLocale)('OKR_MyO_Pop_3rdQuarter'), (0, _getLocale.getLocale)('OKR_MyO_Pop_4thQuarter')];
157
157
 
158
158
  switch (data.cycleType) {
159
159
  case 1:
160
- return "".concat(data.annualNum).concat(_getLocale.isEn ? "" : "");
160
+ return "".concat(data.annualNum).concat(_getLocale.isEn ? '' : '');
161
161
 
162
162
  case 2:
163
163
  return hzNum[data.yqmnum - 1];
@@ -169,10 +169,10 @@ var Item = /*#__PURE__*/function (_PureComponent) {
169
169
  return "".concat((0, _constant2.getMonth)()[data.yqmnum - 1], "-").concat((0, _constant2.getMonth)()[((data.yqmnum + 1) % 12 || 12) - 1]);
170
170
 
171
171
  case 5:
172
- return data.yqmnum === 1 ? (0, _getLocale.getLocale)("OKR_MyO_Pop_Firsthalf") : (0, _getLocale.getLocale)("OKR_MyO_Pop_Secondhalf");
172
+ return data.yqmnum === 1 ? (0, _getLocale.getLocale)('OKR_MyO_Pop_Firsthalf') : (0, _getLocale.getLocale)('OKR_MyO_Pop_Secondhalf');
173
173
 
174
174
  default:
175
- return (0, _getLocale.getLocale)("Mod_Customization");
175
+ return (0, _getLocale.getLocale)('Mod_Customization');
176
176
  }
177
177
  };
178
178
 
@@ -230,7 +230,7 @@ var Item = /*#__PURE__*/function (_PureComponent) {
230
230
  }))));
231
231
  }
232
232
 
233
- return "";
233
+ return '';
234
234
  });
235
235
  }
236
236
 
@@ -290,12 +290,12 @@ var Item = /*#__PURE__*/function (_PureComponent) {
290
290
  __html: okrData.workName
291
291
  }
292
292
  }))), this.isObjectiveRelevanceKr && isShowKr && data.Krs.length > 0 && /*#__PURE__*/_react["default"].createElement("span", {
293
- className: "".concat(isExpand ? "tu-icon-arrow-up" : "tu-icon-arrow-down")
293
+ className: "".concat(isExpand ? 'tu-icon-arrow-up' : 'tu-icon-arrow-down')
294
294
  })), /*#__PURE__*/_react["default"].createElement(_styledComponents.ItemBottom, null, !isShowKr && [/*#__PURE__*/_react["default"].createElement("span", null, (0, _constant.getTypeMap)()[data.okrType]), /*#__PURE__*/_react["default"].createElement(_styledComponents.Separator, null)], /*#__PURE__*/_react["default"].createElement(_styledComponents.PricipleName, null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
295
295
  name: data.principalUser.name,
296
296
  id: data.principalUser.userId
297
297
  })), /*#__PURE__*/_react["default"].createElement(_styledComponents.Separator, null), /*#__PURE__*/_react["default"].createElement("span", null, data.startDate, "-", data.endDate), isShowKr && [/*#__PURE__*/_react["default"].createElement(_styledComponents.Separator, null), /*#__PURE__*/_react["default"].createElement("span", null, data.statusName)])), isShowKr && (this.isObjectiveRelevanceKr || !this.isObjectiveRelevanceKr && okrData.hasSub) && /*#__PURE__*/_react["default"].createElement(_styledComponents.ItemKrContainer, {
298
- className: "".concat(isExpand ? "slideIn" : "slideOut")
298
+ className: "".concat(isExpand ? 'slideIn' : 'slideOut')
299
299
  }, this.renderItemKr()));
300
300
  }
301
301
  }]);
@@ -564,8 +564,7 @@ var _initialiseProps = function _initialiseProps() {
564
564
  }).join(','),
565
565
  searchKr: okrPopType,
566
566
  // 是否搜索KR:默认为0-不搜索,1-只有对齐目标弹层可以搜索KR
567
- toUserId: toUserId,
568
- includeCreateFailApprovalOkr: false
567
+ toUserId: toUserId
569
568
  }).then(function (res) {
570
569
  _this4.pending = false;
571
570
  var resData = res && res.Data && res.Data.works || [];
@@ -351,9 +351,7 @@ function CreateOkrModal(_ref, ref) {
351
351
  setData: function setData(data) {
352
352
  setOkrName(data.okrName);
353
353
  setUser(data.user);
354
- },
355
- show: showCreateOkrModal,
356
- hide: hideCreateOkrModal
354
+ }
357
355
  };
358
356
  });
359
357
  var handleOnSuccess = (0, _react.useCallback)(function () {
@@ -46,7 +46,7 @@ var createWidthKr = /*#__PURE__*/function () {
46
46
  while (1) {
47
47
  switch (_context.prev = _context.next) {
48
48
  case 0:
49
- url = "".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/createWithKr");
49
+ url = "".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/work/createWithKr");
50
50
  _context.next = 3;
51
51
  return _axios["default"].post(url, _objectSpread({
52
52
  workType: 6
@@ -33,13 +33,13 @@
33
33
 
34
34
  .titaui-dialog-confirm__btn-cancel {
35
35
  background: #ffffff;
36
- border: 1px solid #dfe3ea !important;
36
+ border: 1px solid #dfe3ea;
37
37
  color: #6f7886;
38
38
  }
39
39
 
40
40
  .titaui-dialog-confirm__btn-cancel:hover {
41
41
  color: #2879ff;
42
- border: 1px solid #2879ff !important;
42
+ border: 1px solid #2879ff;
43
43
  }
44
44
 
45
45
  .titaui-dialog-confirm__btn-cancel-text {
@@ -49,9 +49,7 @@ function HeaderAction(_ref) {
49
49
  _onClick = _ref.onClick,
50
50
  className = _ref.className,
51
51
  title = _ref.title,
52
- children = _ref.children,
53
- approvalSetting = _ref.approvalSetting,
54
- detailInfo = _ref.detailInfo;
52
+ children = _ref.children;
55
53
 
56
54
  var _useState = (0, _react.useState)(false),
57
55
  _useState2 = _slicedToArray(_useState, 2),
@@ -101,8 +99,6 @@ function HeaderAction(_ref) {
101
99
  if (children && children.length > 0) {
102
100
  content = /*#__PURE__*/_react["default"].createElement(_headerDrop["default"], {
103
101
  visible: dropVisible,
104
- detailInfo: detailInfo,
105
- approvalSetting: approvalSetting,
106
102
  onVisibleChange: function onVisibleChange(visible) {
107
103
  active.current = visible;
108
104
  !visible && setDropVisible(false);
@@ -9,8 +9,6 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _helper = require("../okr-detail/helper");
13
-
14
12
  var _popup = _interopRequireDefault(require("../popup"));
15
13
 
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -46,9 +44,7 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
46
44
  colorInDrop = _ref.colorInDrop,
47
45
  hoverColorInDrop = _ref.hoverColorInDrop,
48
46
  _onClick = _ref.onClick,
49
- onClose = _ref.onClose,
50
- approvalSetting = _ref.approvalSetting,
51
- detailInfo = _ref.detailInfo;
47
+ onClose = _ref.onClose;
52
48
 
53
49
  var _useState = (0, _react.useState)(false),
54
50
  _useState2 = _slicedToArray(_useState, 2),
@@ -56,37 +52,7 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
56
52
  setHover = _useState2[1];
57
53
 
58
54
  var hasIcon = !!icon && typeof icon === "string";
59
- var applyState = detailInfo === null || detailInfo === void 0 ? void 0 : detailInfo.applyState;
60
- var OkrAndKrApprovalTypes = detailInfo === null || detailInfo === void 0 ? void 0 : detailInfo.OkrAndKrApprovalTypes;
61
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, icon === 'tu-icon-del' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _helper.getApprovalOkr)(approvalSetting, 'deleteOkr', applyState, OkrAndKrApprovalTypes) ? /*#__PURE__*/_react["default"].createElement("div", {
62
- className: "header-drop-item",
63
- style: {
64
- color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
65
- },
66
- onClick: function onClick(e) {
67
- _onClick && _onClick(e);
68
- onClose(false);
69
- },
70
- onMouseOver: function onMouseOver() {
71
- return setHover(true);
72
- },
73
- onMouseOut: function onMouseOut() {
74
- return setHover(false);
75
- }
76
- }, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
77
- className: "header-drop-item-icon",
78
- style: {
79
- color: hover ? hoverIconColorInDrop || hoverColorInDrop || hoverColor : iconColorInDrop || colorInDrop || color
80
- }
81
- }, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
82
- className: icon
83
- }) : icon), title) : /*#__PURE__*/_react["default"].createElement("div", {
84
- className: "header-drop-item-approval"
85
- }, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
86
- className: "header-drop-item-icon"
87
- }, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
88
- className: icon
89
- }) : icon), title)) : /*#__PURE__*/_react["default"].createElement("div", {
55
+ return /*#__PURE__*/_react["default"].createElement("div", {
90
56
  className: "header-drop-item",
91
57
  style: {
92
58
  color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
@@ -108,23 +74,19 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
108
74
  }
109
75
  }, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
110
76
  className: icon
111
- }) : icon), title));
77
+ }) : icon), title);
112
78
  };
113
79
 
114
80
  var HeaderDrop = function HeaderDrop(_ref2) {
115
81
  var visible = _ref2.visible,
116
82
  onVisibleChange = _ref2.onVisibleChange,
117
83
  items = _ref2.items,
118
- children = _ref2.children,
119
- approvalSetting = _ref2.approvalSetting,
120
- detailInfo = _ref2.detailInfo;
84
+ children = _ref2.children;
121
85
  var renderDrop = (0, _react.useMemo)(function () {
122
86
  return /*#__PURE__*/_react["default"].createElement("div", {
123
87
  className: "titaui-drawer-header-action-drop-wrapper"
124
88
  }, items.map(function (item) {
125
89
  return /*#__PURE__*/_react["default"].createElement(HeaderDropItem, _extends({}, item, {
126
- detailInfo: detailInfo,
127
- approvalSetting: approvalSetting,
128
90
  onClose: function onClose() {
129
91
  return onVisibleChange(false);
130
92
  }