@titaui/pc 1.11.4-0 → 1.11.4-0.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 (163) hide show
  1. package/lib/components/avatar/text-avatar/index.css +9 -2
  2. package/lib/components/avatar/text-avatar/index.js +34 -9
  3. package/lib/components/button/rect-btn/index.js +7 -7
  4. package/lib/components/change-okr-modal/Item.js +15 -15
  5. package/lib/components/communication/index.js +30 -29
  6. package/lib/components/drawer/index.js +7 -6
  7. package/lib/components/dynamic/constant.js +43 -36
  8. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +243 -0
  9. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +6 -2
  10. package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
  11. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
  12. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
  13. package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
  14. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
  15. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
  16. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
  17. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
  18. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +6 -6
  19. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +7 -7
  20. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +11 -11
  21. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +14 -14
  22. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -10
  23. package/lib/components/dynamic/dynamic-item/index.js +70 -41
  24. package/lib/components/dynamic/dynamic-list/index.js +5 -13
  25. package/lib/components/e-priority/index.js +18 -12
  26. package/lib/components/eReport/eReportShare/index.js +12 -12
  27. package/lib/components/file-list/components/single-file/index.js +11 -11
  28. package/lib/components/form/form-fields/date/index.css +24 -0
  29. package/lib/components/form/form-fields/date/index.js +102 -0
  30. package/lib/components/form/form-fields/input/index.js +10 -10
  31. package/lib/components/form/form-fields/user/index.css +23 -3
  32. package/lib/components/form/form-fields/user/index.js +18 -8
  33. package/lib/components/form/form-fields/user/user-input.js +15 -6
  34. package/lib/components/form/index.js +10 -3
  35. package/lib/components/grid-layout/sub-employee-okr/person-okr.js +11 -5
  36. package/lib/components/icon-button-list/index.css +2 -57
  37. package/lib/components/icon-button-list/index.js +10 -7
  38. package/lib/components/img-viewer/index.css +10 -3
  39. package/lib/components/img-viewer/index.js +57 -18
  40. package/lib/components/mblog/components/MblogContent.js +5 -2
  41. package/lib/components/mblog/index.js +31 -30
  42. package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
  43. package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
  44. package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
  45. package/lib/components/menus/components/menu-tree/index.css +4 -2
  46. package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
  47. package/lib/components/menus/export-modules/interview-menus/constant.js +23 -17
  48. package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +5 -5
  49. package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
  50. package/lib/components/menus/export-modules/interview-menus/index.js +5 -4
  51. package/lib/components/nav-top/components/menu/img/new.svg +30 -0
  52. package/lib/components/nav-top/components/menu/img/wecome-temp.png +0 -0
  53. package/lib/components/nav-top/components/menu/index.css +91 -0
  54. package/lib/components/nav-top/components/menu/index.js +80 -32
  55. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
  56. package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
  57. package/lib/components/nav-top/components/user-message/constant.js +1 -0
  58. package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
  59. package/lib/components/nav-top/components/user-message/index.js +23 -20
  60. package/lib/components/nav-top/request.apis.js +3 -1
  61. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
  62. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +3 -2
  63. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
  64. package/lib/components/okr-detail/detail-header/actions.js +62 -66
  65. package/lib/components/okr-detail/detail-header/index.css +2 -2
  66. package/lib/components/okr-detail/detail-header/index.js +205 -194
  67. package/lib/components/okr-detail/index.js +21 -19
  68. package/lib/components/okr-detail/okr-list/index.js +5 -3
  69. package/lib/components/okr-flow/child-node/index.css +68 -22
  70. package/lib/components/okr-flow/child-node/work-node.js +61 -24
  71. package/lib/components/okr-flow/empty/index.css +8 -1
  72. package/lib/components/okr-flow/export-modal/index.js +108 -21
  73. package/lib/components/okr-flow/export-modules/okr-search-panel/index.css +3 -1
  74. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +30 -24
  75. package/lib/components/okr-flow/images/loading-light.gif +0 -0
  76. package/lib/components/okr-flow/okr-map/index.js +43 -22
  77. package/lib/components/okr-flow/request-apis.js +15 -8
  78. package/lib/components/okr-flow/root-node/index.css +2 -2
  79. package/lib/components/okr-flow/root-node/index.js +26 -25
  80. package/lib/components/okr-flow/utils/index.js +45 -29
  81. package/lib/components/okr-flow/utils/tree-handler.js +29 -18
  82. package/lib/components/okrcase-library/index.css +6 -4
  83. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +36 -30
  84. package/lib/components/pagination/index.css +3 -3
  85. package/lib/components/pagination/select.css +58 -23
  86. package/lib/components/period-selector/index.css +9 -3
  87. package/lib/components/period-selector/index.js +14 -11
  88. package/lib/components/picker/components/panels/date-panel/date-body.js +21 -19
  89. package/lib/components/picker/components/panels/date-panel/date-head.js +29 -8
  90. package/lib/components/picker/components/panels/month-panel/month-body.js +6 -4
  91. package/lib/components/picker/components/picker-trigger/index.css +31 -0
  92. package/lib/components/picker/components/picker-trigger/index.js +24 -15
  93. package/lib/components/picker/picker-panels.js +1 -1
  94. package/lib/components/picker/picker.js +12 -13
  95. package/lib/components/popup/index.js +4 -4
  96. package/lib/components/radio/index.css +9 -9
  97. package/lib/components/scroll-container/index.js +423 -0
  98. package/lib/components/scroll-container/style.css +35 -0
  99. package/lib/components/scrollbar/scroll-mask/index.js +1 -1
  100. package/lib/components/superset-charts/components/chart/index.js +1 -1
  101. package/lib/components/superset-charts/utils/axios.js +5 -13
  102. package/lib/components/survey-model/contact.js +93 -0
  103. package/lib/components/survey-model/index.css +141 -0
  104. package/lib/components/survey-model/index.js +268 -0
  105. package/lib/components/survey-model/instance.js +86 -0
  106. package/lib/components/survey-model/request-api.js +80 -0
  107. package/lib/components/task-relation-modal/index.js +0 -1
  108. package/lib/components/task-tree/helper.js +61 -0
  109. package/lib/components/task-tree/images/P1.svg +15 -0
  110. package/lib/components/task-tree/images/P2.svg +15 -0
  111. package/lib/components/task-tree/images/P3.svg +15 -0
  112. package/lib/components/task-tree/images/P4.svg +15 -0
  113. package/lib/components/task-tree/images/P5.svg +15 -0
  114. package/lib/components/task-tree/images/arrow.svg +9 -0
  115. package/lib/components/task-tree/images/empty-131.png +0 -0
  116. package/lib/components/task-tree/images/followed.svg +33 -0
  117. package/lib/components/task-tree/images/nice.svg +108 -0
  118. package/lib/components/task-tree/images/struc12.png +0 -0
  119. package/lib/components/task-tree/images/struc2.png +0 -0
  120. package/lib/components/task-tree/images/xialat-s.svg +13 -0
  121. package/lib/components/task-tree/index.js +16 -0
  122. package/lib/components/task-tree/precls.js +8 -0
  123. package/lib/components/task-tree/request-apis.js +88 -0
  124. package/lib/components/task-tree/task-item-node/constant.js +45 -0
  125. package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
  126. package/lib/components/task-tree/task-item-node/e-project.js +212 -0
  127. package/lib/components/task-tree/task-item-node/e-status-dropdown.js +114 -0
  128. package/lib/components/task-tree/task-item-node/e-task.js +426 -0
  129. package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
  130. package/lib/components/task-tree/task-item-node/index.css +299 -0
  131. package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
  132. package/lib/components/task-tree/task-tree.css +16 -0
  133. package/lib/components/task-tree/task-tree.js +49 -0
  134. package/lib/components/time-picker/index.css +24 -0
  135. package/lib/components/time-picker/time-picker-selector.js +8 -12
  136. package/lib/components/time-picker/time-picker.js +94 -133
  137. package/lib/components/time-picker/timer-picker-input.js +3 -7
  138. package/lib/components/time-picker/utils.js +13 -2
  139. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
  140. package/lib/components/wechat-btn/index.css +14 -0
  141. package/lib/components/wechat-btn/index.js +338 -0
  142. package/lib/components-v1/radio/radio.js +3 -3
  143. package/lib/components-v1/radio/style/index.css +8 -8
  144. package/lib/index.js +99 -91
  145. package/lib/pages/okr-map/export-modules/okr-map/header/index.css +7 -2
  146. package/lib/pages/okr-map/export-modules/okr-map/header/index.js +73 -34
  147. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +65 -42
  148. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +26 -14
  149. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +58 -13
  150. package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +28 -20
  151. package/lib/pages/okr-map/number-select/index.css +12 -9
  152. package/lib/pages/okr-map/number-select/index.js +3 -3
  153. package/lib/utils/auth.js +65 -8
  154. package/lib/utils/bs-global.js +18 -6
  155. package/lib/utils/open-data.js +63 -43
  156. package/package.json +6 -2
  157. package/.eslintignore +0 -3
  158. package/.eslintrc.js +0 -223
  159. package/.husky/pre-commit +0 -4
  160. package/.prettierignore +0 -31
  161. package/.prettierrc.js +0 -90
  162. package/.vscode/settings.json +0 -5
  163. package/yarn-error.log +0 -22184
@@ -0,0 +1,212 @@
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 _precls = _interopRequireDefault(require("../precls"));
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 _dialogConfirm = _interopRequireWildcard(require("../../dialog-confirm"));
27
+
28
+ var _requestApis = require("../request-apis");
29
+
30
+ var _getProcessColor = _interopRequireDefault(require("./get-process-color"));
31
+
32
+ var _getLocale = require("../../../utils/getLocale");
33
+
34
+ var _platform = require("../../../utils/platform");
35
+
36
+ var _helpers = require("../../../utils/helpers");
37
+
38
+ var _auth = require("../../../utils/auth");
39
+
40
+ require("./index.css");
41
+
42
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
43
+
44
+ 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); }
45
+
46
+ 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; }
47
+
48
+ 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); } }
49
+
50
+ 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); }); }; }
51
+
52
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
53
+
54
+ 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."); }
55
+
56
+ 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); }
57
+
58
+ 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; }
59
+
60
+ 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; }
61
+
62
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
63
+
64
+ var TooltipText = _tooltip["default"].Text;
65
+
66
+ var _default = function _default(props) {
67
+ var _okrInfo$authority, _data$principalUser, _data$principalUser2, _data$principalUser3;
68
+
69
+ var index = props.index,
70
+ title = props.title,
71
+ data = props.data,
72
+ createUserId = props.createUserId,
73
+ _props$hasProgress = props.hasProgress,
74
+ hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
75
+ _props$hasRelation = props.hasRelation,
76
+ hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
77
+ _props$hasPrinciple = props.hasPrinciple,
78
+ hasPrinciple = _props$hasPrinciple === void 0 ? true : _props$hasPrinciple;
79
+
80
+ var _useState = (0, _react.useState)(false),
81
+ _useState2 = _slicedToArray(_useState, 2),
82
+ unConnectVisible = _useState2[0],
83
+ setUnConnectVisible = _useState2[1];
84
+
85
+ var _useState3 = (0, _react.useState)(data.status === 2),
86
+ _useState4 = _slicedToArray(_useState3, 1),
87
+ isGray = _useState4[0];
88
+
89
+ var okrInfo = {};
90
+ var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
91
+ var hasRelativeAuth = new _auth.KRAuth({
92
+ user: data.user,
93
+ createUserId: createUserId
94
+ }).hasAuth() || new _auth.OAuth({
95
+ principalUser: okrInfo.principalUser,
96
+ createUserId: okrInfo.createUserId
97
+ }).hasAuth();
98
+
99
+ var onSureUnConnectHandler = /*#__PURE__*/function () {
100
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
101
+ return regeneratorRuntime.wrap(function _callee$(_context) {
102
+ while (1) {
103
+ switch (_context.prev = _context.next) {
104
+ case 0:
105
+ _context.next = 2;
106
+ return (0, _requestApis.cancelRel)({
107
+ krId: data.mileStoneId,
108
+ objType: data.objType,
109
+ okrId: okrInfo.workId,
110
+ taskId: data.id
111
+ });
112
+
113
+ case 2:
114
+ setUnConnectVisible(false);
115
+
116
+ case 3:
117
+ case "end":
118
+ return _context.stop();
119
+ }
120
+ }
121
+ }, _callee);
122
+ }));
123
+
124
+ return function onSureUnConnectHandler() {
125
+ return _ref.apply(this, arguments);
126
+ };
127
+ }();
128
+
129
+ var openProjectDetail = function openProjectDetail() {
130
+ if ((0, _platform.isPlatform)("dd")) {
131
+ _drawerManager["default"].close();
132
+ }
133
+
134
+ window.open(window.location.href.replace(location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(data.id)));
135
+ };
136
+
137
+ var workApplyType = data.workApplyType,
138
+ workApplyStatus = data.workApplyStatus;
139
+ var isCreate = (workApplyStatus === 1 || workApplyStatus === 3 || workApplyStatus === 4) && workApplyType === 48;
140
+ return /*#__PURE__*/_react["default"].createElement("div", {
141
+ key: index,
142
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node"))
143
+ }, /*#__PURE__*/_react["default"].createElement("span", {
144
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-prefix"))
145
+ }, /*#__PURE__*/_react["default"].createElement("span", {
146
+ className: "tu-icon-Add-xiangmu"
147
+ })), /*#__PURE__*/_react["default"].createElement("span", {
148
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title ")),
149
+ onClick: openProjectDetail
150
+ }, /*#__PURE__*/_react["default"].createElement("span", {
151
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title-name "))
152
+ }, /*#__PURE__*/_react["default"].createElement(TooltipText, {
153
+ text: (0, _helpers.escapeHtml)(title),
154
+ isPercent: true
155
+ })), isCreate && /*#__PURE__*/_react["default"].createElement("span", {
156
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title-approvaling"))
157
+ }, (0, _getLocale.getLocale)("Pro_MyS_Establishment"))), /*#__PURE__*/_react["default"].createElement("div", {
158
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions"))
159
+ }, hasPrinciple && /*#__PURE__*/_react["default"].createElement("span", {
160
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-user"))
161
+ }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Text, {
162
+ name: data === null || data === void 0 ? void 0 : (_data$principalUser = data.principalUser) === null || _data$principalUser === void 0 ? void 0 : _data$principalUser.name,
163
+ id: data === null || data === void 0 ? void 0 : (_data$principalUser2 = data.principalUser) === null || _data$principalUser2 === void 0 ? void 0 : _data$principalUser2.userId,
164
+ width: 92,
165
+ showAvatar: true,
166
+ avatar: data === null || data === void 0 ? void 0 : (_data$principalUser3 = data.principalUser) === null || _data$principalUser3 === void 0 ? void 0 : _data$principalUser3.avatar,
167
+ extraCls: isGray && "".concat(_precls["default"], "__e-project-node-gray")
168
+ })), /*#__PURE__*/_react["default"].createElement("span", {
169
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-date"))
170
+ }, /*#__PURE__*/_react["default"].createElement(_statusTime["default"], {
171
+ deadLine: data.deadLine,
172
+ isComplete: data.status === 2
173
+ })), hasProgress && /*#__PURE__*/_react["default"].createElement("span", {
174
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-progress ").concat(isGray && "".concat(_precls["default"], "__e-project-node-gray")))
175
+ }, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
176
+ size: 22,
177
+ width: 3,
178
+ percent: data.progress,
179
+ linear: true,
180
+ linearId: data.taskId,
181
+ linearStartColor: (0, _getProcessColor["default"])(data.riskLevel, "linearStartColor", data.status),
182
+ linearEndColor: (0, _getProcessColor["default"])(data.riskLevel, "linearEndColor", data.status),
183
+ backgroundColor: (0, _getProcessColor["default"])(data.riskLevel, "backgroundColor", data.status)
184
+ })), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
185
+ overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
186
+ placement: "top"
187
+ }, /*#__PURE__*/_react["default"].createElement("span", {
188
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-connect")),
189
+ onClick: function onClick() {
190
+ return setUnConnectVisible(true);
191
+ }
192
+ }, /*#__PURE__*/_react["default"].createElement("span", {
193
+ className: "tu-icon-quxiaoguanlian e-node-status-icon"
194
+ }))) : null), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
195
+ visible: unConnectVisible,
196
+ type: "warning"
197
+ }, /*#__PURE__*/_react["default"].createElement("span", {
198
+ type: "title"
199
+ }, (0, _getLocale.getLocale)("OKR_MyO_Text_Cancelass")), /*#__PURE__*/_react["default"].createElement("span", {
200
+ type: "content"
201
+ }, (0, _getLocale.getLocale)("OKR_MyO_Text_TitemnotO")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
202
+ type: "button",
203
+ onClick: function onClick() {
204
+ return setUnConnectVisible(false);
205
+ }
206
+ }, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
207
+ type: "button",
208
+ onClick: onSureUnConnectHandler
209
+ }, (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"))));
210
+ };
211
+
212
+ exports["default"] = _default;
@@ -0,0 +1,114 @@
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 _dropSelector = _interopRequireWildcard(require("../../drop-selector"));
15
+
16
+ var _getLocale = require("../../../utils/getLocale");
17
+
18
+ require("./index.css");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ 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); }
23
+
24
+ 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; }
25
+
26
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
+
28
+ 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."); }
29
+
30
+ 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); }
31
+
32
+ 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; }
33
+
34
+ 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; }
35
+
36
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
+
38
+ var EStatusDropdown = function EStatusDropdown(props) {
39
+ // eslint-disable-next-line react/prop-types
40
+ var onChange = props.onChange,
41
+ checked = props.checked,
42
+ hasAuth = props.hasAuth;
43
+
44
+ var _useState = (0, _react.useState)("tu-icon-notstart"),
45
+ _useState2 = _slicedToArray(_useState, 2),
46
+ status = _useState2[0],
47
+ setStatus = _useState2[1];
48
+
49
+ var onMenuClickHandler = function onMenuClickHandler(name) {
50
+ setStatus(name);
51
+
52
+ if (onChange) {
53
+ onChange(name);
54
+ }
55
+ };
56
+
57
+ (0, _react.useEffect)(function () {
58
+ setStatus(checked);
59
+ }, [checked]);
60
+
61
+ if (!hasAuth) {
62
+ return /*#__PURE__*/_react["default"].createElement("span", {
63
+ style: {
64
+ color: "#89919F",
65
+ fontSize: 16,
66
+ marginRight: 4,
67
+ verticalAlign: "baseline"
68
+ },
69
+ className: (0, _classnames["default"])(status)
70
+ });
71
+ }
72
+
73
+ return /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
74
+ onChange: onMenuClickHandler,
75
+ checked: status,
76
+ canEdit: hasAuth,
77
+ trigger: /*#__PURE__*/_react["default"].createElement("span", {
78
+ style: {
79
+ color: "#89919F",
80
+ fontSize: 16,
81
+ marginRight: 4,
82
+ verticalAlign: "baseline"
83
+ },
84
+ className: (0, _classnames["default"])(status)
85
+ })
86
+ }, /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
87
+ name: "tu-icon-finished",
88
+ icon: "tu-icon-finished",
89
+ exIconClass: "e-node-status-icon"
90
+ }, (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
91
+ name: "tu-icon-running",
92
+ icon: "tu-icon-running",
93
+ exIconClass: "e-node-status-icon"
94
+ }, (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
95
+ name: "tu-icon-canceled",
96
+ icon: "tu-icon-canceled",
97
+ exIconClass: "e-node-status-icon"
98
+ }, (0, _getLocale.getLocale)("OKR_MyO_E_From_Cancelled")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
99
+ name: "tu-icon-deferred",
100
+ icon: "tu-icon-deferred",
101
+ exIconClass: "e-node-status-icon"
102
+ }, (0, _getLocale.getLocale)("OKR_MyO_E_From_Delayed")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
103
+ name: "tu-icon-paused",
104
+ icon: "tu-icon-paused",
105
+ exIconClass: "e-node-status-icon"
106
+ }, (0, _getLocale.getLocale)("OKR_MyO_E_From_Suspended")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
107
+ name: "tu-icon-notstart",
108
+ icon: "tu-icon-notstart",
109
+ exIconClass: "e-node-status-icon"
110
+ }, (0, _getLocale.getLocale)("OKR_MyO_E_From_NotStarted")));
111
+ };
112
+
113
+ var _default = EStatusDropdown;
114
+ exports["default"] = _default;