@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
@@ -0,0 +1,426 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _toast = _interopRequireDefault(require("../../toast"));
15
+
16
+ var _avatar = _interopRequireDefault(require("../../avatar"));
17
+
18
+ var _progress = _interopRequireDefault(require("../../progress"));
19
+
20
+ var _tooltip = _interopRequireDefault(require("../../tooltip"));
21
+
22
+ var _statusTime = _interopRequireDefault(require("../../status-time"));
23
+
24
+ var _drawerManager = _interopRequireDefault(require("../../drawer-manager"));
25
+
26
+ var _ePriority = _interopRequireDefault(require("../../e-priority"));
27
+
28
+ var _dialogConfirm = _interopRequireWildcard(require("../../dialog-confirm"));
29
+
30
+ var _eStatusDropdown = _interopRequireDefault(require("./e-status-dropdown"));
31
+
32
+ var _requestApis = require("../request-apis");
33
+
34
+ var _constant = require("./constant");
35
+
36
+ var _getProcessColor = _interopRequireDefault(require("./get-process-color"));
37
+
38
+ var _getLocale = require("../../../utils/getLocale");
39
+
40
+ var _platform = require("../../../utils/platform");
41
+
42
+ var _bsGlobal = require("../../../utils/bs-global");
43
+
44
+ var _helpers = require("../../../utils/helpers");
45
+
46
+ var _auth = require("../../../utils/auth");
47
+
48
+ var _precls = _interopRequireDefault(require("../precls"));
49
+
50
+ require("./index.css");
51
+
52
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
53
+
54
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
55
+
56
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
57
+
58
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
59
+
60
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
61
+
62
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
63
+
64
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
65
+
66
+ 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; }
67
+
68
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
69
+
70
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
71
+
72
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
73
+
74
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
75
+
76
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
77
+
78
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
79
+
80
+ var TooltipText = _tooltip["default"].Text; // status=3 已过期 status=2 已完成
81
+
82
+ function ETaskNode(props) {
83
+ var _okrInfo$authority;
84
+
85
+ var index = props.index,
86
+ title = props.title,
87
+ data = props.data,
88
+ _props$createUserId = props.createUserId,
89
+ createUserId = _props$createUserId === void 0 ? {} : _props$createUserId,
90
+ _props$krUser = props.krUser,
91
+ krUser = _props$krUser === void 0 ? {} : _props$krUser,
92
+ _props$hasProgress = props.hasProgress,
93
+ hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
94
+ _props$hasRelation = props.hasRelation,
95
+ hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
96
+ _props$isPushScreen = props.isPushScreen,
97
+ isPushScreen = _props$isPushScreen === void 0 ? true : _props$isPushScreen,
98
+ _props$hasPrinciple = props.hasPrinciple,
99
+ hasPrinciple = _props$hasPrinciple === void 0 ? true : _props$hasPrinciple;
100
+
101
+ var _useState = (0, _react.useState)(false),
102
+ _useState2 = _slicedToArray(_useState, 2),
103
+ unConnectVisible = _useState2[0],
104
+ setUnConnectVisible = _useState2[1];
105
+
106
+ var _useState3 = (0, _react.useState)(data.progress),
107
+ _useState4 = _slicedToArray(_useState3, 1),
108
+ progress = _useState4[0];
109
+
110
+ var _useState5 = (0, _react.useState)(data.principalUser || {}),
111
+ _useState6 = _slicedToArray(_useState5, 2),
112
+ user = _useState6[0],
113
+ setUser = _useState6[1];
114
+
115
+ var _useState7 = (0, _react.useState)(data.status === 2),
116
+ _useState8 = _slicedToArray(_useState7, 2),
117
+ isGray = _useState8[0],
118
+ setIsGray = _useState8[1];
119
+
120
+ var _useState9 = (0, _react.useState)(data.status === 4),
121
+ _useState10 = _slicedToArray(_useState9, 2),
122
+ isCancel = _useState10[0],
123
+ setIsCancel = _useState10[1];
124
+
125
+ var _useState11 = (0, _react.useState)("".concat(data.priority)),
126
+ _useState12 = _slicedToArray(_useState11, 2),
127
+ priority = _useState12[0],
128
+ setPriority = _useState12[1];
129
+
130
+ var _useState13 = (0, _react.useState)({
131
+ deadLine: data.deadLine,
132
+ isLongTerm: data.isLongTerm,
133
+ status: data.status,
134
+ riskLevel: data.riskLevel
135
+ }),
136
+ _useState14 = _slicedToArray(_useState13, 2),
137
+ dataInfo = _useState14[0],
138
+ setDataInfo = _useState14[1];
139
+
140
+ var _useState15 = (0, _react.useState)(function () {
141
+ return (0, _bsGlobal.getBSGlobal)("TaskAdvancedSetting").TaskFunctionSetting.TaskPriority;
142
+ }),
143
+ _useState16 = _slicedToArray(_useState15, 1),
144
+ isShowPriority = _useState16[0];
145
+
146
+ var okrInfo = {}; // extraEditAuth = new KRAuth({ user: krUser, createUserId }).hasAuth()
147
+ // || new OAuth({
148
+ // principalUser: okrInfo.principalUser,
149
+ // createUserId: okrInfo.createUserId,
150
+ // }).hasAuth()
151
+
152
+ var hasEditAuth = new _auth.EAuth({
153
+ principalUser: data.principalUser,
154
+ user: data.user
155
+ }).hasAuth() // || extraEditAuth
156
+ && data.status !== 5;
157
+ var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
158
+ var hasRelativeAuth = new _auth.KRAuth({
159
+ user: krUser,
160
+ createUserId: createUserId
161
+ }).hasAuth() || new _auth.OAuth({
162
+ principalUser: okrInfo.principalUser,
163
+ createUserId: okrInfo.createUserId
164
+ }).hasAuth();
165
+
166
+ var onEditUserHandler = function onEditUserHandler(_ref) {
167
+ var _ref2 = _slicedToArray(_ref, 1),
168
+ user = _ref2[0];
169
+
170
+ (0, _requestApis.updateTaskPrincipal)({
171
+ taskId: data.taskId,
172
+ toUserId: Number(user.id)
173
+ }).then(function (data) {
174
+ if (data.Code === 1) {
175
+ setUser(user.data);
176
+
177
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
178
+ canClose: false
179
+ });
180
+ } else {
181
+ _toast["default"].Error(data.Message, {
182
+ canClose: false
183
+ });
184
+ }
185
+ })["catch"](function () {
186
+ _toast["default"].Error("网络异常", {
187
+ canClose: false
188
+ });
189
+ });
190
+ };
191
+
192
+ var onEStatusChangeHandler = function onEStatusChangeHandler(statusType) {
193
+ (0, _requestApis.updateTaskStatus)({
194
+ taskId: data.taskId,
195
+ status: _constant.EStatusClass2StatusType[statusType]
196
+ }).then(function (resp) {
197
+ if (resp.Code === 1) {
198
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
199
+ canClose: false
200
+ });
201
+
202
+ setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
203
+ status: _constant.EStatusClass2StatusType[statusType]
204
+ }));
205
+ setIsGray(_constant.EStatusClass2StatusType[statusType] === 2);
206
+ setIsCancel(_constant.EStatusClass2StatusType[statusType] === 4);
207
+ } else {
208
+ _toast["default"].Error(resp.Message, {
209
+ canClose: false
210
+ });
211
+ }
212
+ })["catch"](function () {
213
+ _toast["default"].Error("网络异常", {
214
+ canClose: false
215
+ });
216
+ });
217
+ };
218
+
219
+ var onSureUnConnectHandler = function onSureUnConnectHandler() {
220
+ (0, _requestApis.cancelRel)({
221
+ krId: data.mileStoneId,
222
+ objType: data.objType,
223
+ okrId: okrInfo.workId,
224
+ taskId: data.taskId
225
+ }).then(function (resp) {
226
+ if (resp.Code === 1) {
227
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
228
+ canClose: false
229
+ });
230
+ } else {
231
+ _toast["default"].Error(resp.Message, {
232
+ canClose: false
233
+ });
234
+ }
235
+ })["catch"](function () {
236
+ _toast["default"].Error("网络异常", {
237
+ canClose: false
238
+ });
239
+ })["finally"](setUnConnectVisible(false));
240
+ };
241
+
242
+ var updateDateHandler = /*#__PURE__*/function () {
243
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(e) {
244
+ var res;
245
+ return regeneratorRuntime.wrap(function _callee$(_context) {
246
+ while (1) {
247
+ switch (_context.prev = _context.next) {
248
+ case 0:
249
+ if (!(!hasEditAuth || dataInfo.status === 2)) {
250
+ _context.next = 2;
251
+ break;
252
+ }
253
+
254
+ return _context.abrupt("return");
255
+
256
+ case 2:
257
+ _context.next = 4;
258
+ return window.openDatePicker(e.target, {
259
+ isShowCycleView: false,
260
+ rangepickerOptions: {
261
+ startDate: dataInfo.startDate,
262
+ endDate: dataInfo.deadLine
263
+ }
264
+ });
265
+
266
+ case 4:
267
+ res = _context.sent;
268
+ _context.next = 7;
269
+ return (0, _requestApis.updateTaskDate)({
270
+ taskId: data.taskId,
271
+ startDate: res.startDate,
272
+ endDate: res.endDate,
273
+ isLongTerm: res.isLongTerm
274
+ }).then(function (resp) {
275
+ if (resp.Code === 1) {
276
+ setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
277
+ deadLine: resp.Data.deadLine,
278
+ isLongTerm: resp.Data.isLongTerm,
279
+ status: resp.Data.status
280
+ }));
281
+
282
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
283
+ canClose: false
284
+ });
285
+ } else {
286
+ _toast["default"].Error(resp.Message, {
287
+ canClose: false
288
+ });
289
+ }
290
+ })["catch"](function () {
291
+ _toast["default"].Error("网络异常", {
292
+ canClose: false
293
+ });
294
+ });
295
+
296
+ case 7:
297
+ case "end":
298
+ return _context.stop();
299
+ }
300
+ }
301
+ }, _callee);
302
+ }));
303
+
304
+ return function updateDateHandler(_x) {
305
+ return _ref3.apply(this, arguments);
306
+ };
307
+ }();
308
+
309
+ var onEPriorityChangeHandler = function onEPriorityChangeHandler(selectPriority) {
310
+ (0, _requestApis.setTaskPriority)({
311
+ taskId: data.taskId,
312
+ priority: selectPriority
313
+ }).then(function (resp) {
314
+ if (resp.Code === 1) {
315
+ _toast["default"].Success(resp.Message);
316
+
317
+ setPriority(selectPriority);
318
+ } else {
319
+ _toast["default"].Error(resp.Message);
320
+ }
321
+ });
322
+ };
323
+
324
+ var handleShowTaskDetail = function handleShowTaskDetail() {
325
+ if ((0, _platform.isPlatform)("dd")) {
326
+ _drawerManager["default"].close();
327
+ }
328
+
329
+ if (isPushScreen) {
330
+ var _window$Talent, _window$Talent2;
331
+
332
+ (_window$Talent = window.Talent) === null || _window$Talent === void 0 ? void 0 : _window$Talent.app.vent.off("global-pull-screen:closed:".concat(data.taskId));
333
+ (_window$Talent2 = window.Talent) === null || _window$Talent2 === void 0 ? void 0 : _window$Talent2.app.vent.on("global-pull-screen:closed:".concat(data.taskId), function () {// refreshEList && refreshEList();
334
+ }); // 任务:打开推屏
335
+
336
+ window.Talent.app.vent.trigger("global-pull-screen", data.taskId, "task");
337
+ } else {
338
+ window.open("//".concat(window.location.host).concat(window.location.pathname, "#more/taskinfo?id=").concat(data.taskId));
339
+ }
340
+ };
341
+
342
+ return /*#__PURE__*/_react["default"].createElement("div", {
343
+ key: index,
344
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node"))
345
+ }, /*#__PURE__*/_react["default"].createElement("span", {
346
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-prefix"))
347
+ }, /*#__PURE__*/_react["default"].createElement(_eStatusDropdown["default"], {
348
+ onChange: onEStatusChangeHandler,
349
+ checked: _constant.EStatusStatus2ClassType[dataInfo.status],
350
+ hasAuth: hasEditAuth
351
+ })), isShowPriority && /*#__PURE__*/_react["default"].createElement("span", {
352
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority"))
353
+ }, /*#__PURE__*/_react["default"].createElement(_ePriority["default"], {
354
+ onChange: onEPriorityChangeHandler,
355
+ checked: priority,
356
+ hasAuth: hasEditAuth,
357
+ status: data.status
358
+ })), /*#__PURE__*/_react["default"].createElement("span", {
359
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-title ").concat(isCancel ? "".concat(_precls["default"], "__e-project-node-gray") : "")),
360
+ onClick: handleShowTaskDetail
361
+ }, /*#__PURE__*/_react["default"].createElement(TooltipText, {
362
+ text: (0, _helpers.escapeHtml)(title),
363
+ isPercent: true
364
+ })), /*#__PURE__*/_react["default"].createElement("span", {
365
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions"))
366
+ }, hasPrinciple && /*#__PURE__*/_react["default"].createElement("span", {
367
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-user"))
368
+ }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Text, {
369
+ name: user === null || user === void 0 ? void 0 : user.name,
370
+ id: user === null || user === void 0 ? void 0 : user.userId,
371
+ width: 92,
372
+ editable: dataInfo.status !== 2 && hasEditAuth,
373
+ onEditUser: onEditUserHandler,
374
+ isGetRoot: true,
375
+ showAvatar: true,
376
+ avatar: user === null || user === void 0 ? void 0 : user.avatar,
377
+ extraCls: (isCancel || isGray) && "".concat(_precls["default"], "__e-project-node-gray")
378
+ })), /*#__PURE__*/_react["default"].createElement("span", {
379
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-date")),
380
+ onClick: updateDateHandler
381
+ }, /*#__PURE__*/_react["default"].createElement(_statusTime["default"], {
382
+ deadLine: dataInfo.deadLine,
383
+ isLongTerm: dataInfo.isLongTerm,
384
+ isCancel: dataInfo.status === 4,
385
+ isComplete: dataInfo.status === 2
386
+ })), hasProgress && /*#__PURE__*/_react["default"].createElement("span", {
387
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-progress ").concat((isGray || isCancel) && "".concat(_precls["default"], "__e-project-node-gray")))
388
+ }, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
389
+ size: 22,
390
+ width: 3,
391
+ percent: progress,
392
+ linear: true,
393
+ linearId: data.taskId,
394
+ linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearStartColor", dataInfo.status),
395
+ linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearEndColor", dataInfo.status),
396
+ backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "backgroundColor", dataInfo.status)
397
+ })), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
398
+ overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
399
+ placement: "top"
400
+ }, /*#__PURE__*/_react["default"].createElement("span", {
401
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-connect")),
402
+ onClick: function onClick() {
403
+ return setUnConnectVisible(true);
404
+ }
405
+ }, /*#__PURE__*/_react["default"].createElement("span", {
406
+ className: "tu-icon-quxiaoguanlian e-node-status-icon"
407
+ }))) : null), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
408
+ visible: unConnectVisible,
409
+ type: "warning"
410
+ }, /*#__PURE__*/_react["default"].createElement("span", {
411
+ type: "title"
412
+ }, (0, _getLocale.getLocale)("OKR_MyO_Text_Cancelass")), /*#__PURE__*/_react["default"].createElement("span", {
413
+ type: "content"
414
+ }, (0, _getLocale.getLocale)("OKR_MyO_Text_TtasknotO")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
415
+ type: "button",
416
+ onClick: function onClick() {
417
+ return setUnConnectVisible(false);
418
+ }
419
+ }, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
420
+ type: "button",
421
+ onClick: onSureUnConnectHandler
422
+ }, (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"))));
423
+ }
424
+
425
+ var _default = ETaskNode;
426
+ exports["default"] = _default;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var getProcessColor = function getProcessColor(level, type, status) {
9
+ var cancelColor = {
10
+ linearStartColor: "#e1e5ec",
11
+ linearEndColor: "#bfc7d5",
12
+ backgroundColor: "rgba(40, 121, 255, 0.11)"
13
+ };
14
+
15
+ if (status === 2) {
16
+ return cancelColor[type];
17
+ }
18
+
19
+ if (status === 4) {
20
+ return cancelColor[type];
21
+ }
22
+
23
+ var processColor = {
24
+ 1: {
25
+ riskLevel: 1,
26
+ linearStartColor: "#9fbfff",
27
+ linearEndColor: "#2879ff",
28
+ backgroundColor: "rgba(40, 121, 255, 0.11)"
29
+ },
30
+ 2: {
31
+ riskLevel: 2,
32
+ linearStartColor: "#9fbfff",
33
+ linearEndColor: "#2879ff",
34
+ backgroundColor: "rgba(40, 121, 255, 0.11)"
35
+ },
36
+ 3: {
37
+ riskLevel: 3,
38
+ linearStartColor: "#FFA5A5",
39
+ linearEndColor: "#F05E5E",
40
+ backgroundColor: "rgba(222, 89, 89, 0.1)"
41
+ },
42
+ 4: {
43
+ riskLevel: 4,
44
+ linearStartColor: "#93eed2",
45
+ linearEndColor: "#5ad8a6",
46
+ backgroundColor: "rgba(40, 121, 255, 0.11)"
47
+ },
48
+ 5: {
49
+ riskLevel: 5,
50
+ linearStartColor: "#93eed2",
51
+ linearEndColor: "#5ad8a6",
52
+ backgroundColor: "rgba(40, 121, 255, 0.11)"
53
+ }
54
+ };
55
+ var color = processColor["".concat(level)];
56
+ if (level === 0) color = processColor["1"];
57
+ if (!color) return {};
58
+ return color[type];
59
+ };
60
+
61
+ var _default = getProcessColor;
62
+ exports["default"] = _default;