@titaui/pc 1.11.33 → 1.11.35-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 (123) hide show
  1. package/lib/components/avatar/name-avatar/index.css +1 -0
  2. package/lib/components/avatar/name-avatar/index.js +22 -13
  3. package/lib/components/button/rect-btn/index.css +45 -11
  4. package/lib/components/button/rect-btn/index.js +12 -6
  5. package/lib/components/change-okr-modal/index.js +2 -1
  6. package/lib/components/checkbox/index.css +3 -3
  7. package/lib/components/create-okr-modal/index.js +48 -42
  8. package/lib/components/create-okr-modal/request-api.js +1 -1
  9. package/lib/components/dialog-confirm/index.css +2 -2
  10. package/lib/components/drawer/headerAction.js +5 -1
  11. package/lib/components/drawer/headerDrop.js +42 -4
  12. package/lib/components/drawer/index.css +33 -0
  13. package/lib/components/drawer/index.js +26 -3
  14. package/lib/components/dynamic/dynamic-list/index.js +14 -6
  15. package/lib/components/dynamic/index.js +9 -12
  16. package/lib/components/dynamic/request-api.js +7 -68
  17. package/lib/components/nav-top/index.js +8 -4
  18. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
  19. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
  20. package/lib/components/okr-detail/components/header/index.js +10 -3
  21. package/lib/components/okr-detail/components/header/o-name.js +10 -3
  22. package/lib/components/okr-detail/components/o-classify.js +5 -1
  23. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +13 -14
  24. package/lib/components/okr-detail/detail-header/constant.js +53 -0
  25. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +98 -43
  26. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +55 -0
  27. package/lib/components/okr-detail/detail-header/index.css +11 -0
  28. package/lib/components/okr-detail/detail-header/index.js +228 -234
  29. package/lib/components/okr-detail/helper.js +108 -0
  30. package/lib/components/okr-detail/index.js +21 -4
  31. package/lib/components/okr-detail/okr-list/index.js +8 -3
  32. package/lib/components/okr-detail/request-apis.js +10 -4
  33. package/lib/components/okr-flow/export-modal/index.js +13 -1
  34. package/lib/components/okr-period-selector/index.js +9 -5
  35. package/lib/components/okr-period-selector/select-cycle.js +23 -19
  36. package/lib/components/operation-records/index.js +1 -1
  37. package/lib/components/operation-records/style.js +1 -1
  38. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
  39. package/lib/components/task-relation-modal/request-api.js +2 -1
  40. package/lib/components/textarea/index.css +142 -0
  41. package/lib/components/textarea/index.js +259 -0
  42. package/lib/components/time-picker/time-picker.js +37 -93
  43. package/lib/components/toast/index.js +5 -3
  44. package/lib/index.js +40 -0
  45. package/lib/pages/new-okr-list/header/common.js +52 -0
  46. package/lib/pages/new-okr-list/header/index.css +45 -0
  47. package/lib/pages/new-okr-list/header/index.js +38 -16
  48. package/lib/{components/dynamic/dynamic-liking/index.js → pages/new-okr-list/header/operate-record.js} +91 -39
  49. package/lib/pages/new-okr-list/index.js +3 -1
  50. package/lib/pages/new-okr-list/list/index.js +19 -2
  51. package/lib/pages/new-okr-list/request-api.js +8 -2
  52. package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
  53. package/lib/utils/format-time.js +8 -1
  54. package/lib/utils/open-data.js +5 -1
  55. package/package.json +2 -2
  56. package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
  57. package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
  58. package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
  59. package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
  60. package/lib/components/dynamic/advertise/index.css +0 -21
  61. package/lib/components/dynamic/advertise/index.js +0 -126
  62. package/lib/components/dynamic/advertise/interface.js +0 -5
  63. package/lib/components/dynamic/advertise/util.js +0 -28
  64. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
  65. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
  66. package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
  67. package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
  68. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  69. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  70. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  71. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  72. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  73. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
  74. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
  75. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
  76. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  77. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  78. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  79. package/lib/components/dynamic/dynamic-liking/item.js +0 -75
  80. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  81. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
  82. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
  83. package/lib/components/dynamic/dynamic-topping/index.css +0 -141
  84. package/lib/components/dynamic/dynamic-topping/index.js +0 -82
  85. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  86. package/lib/components/dynamic/dynamic-topping/item.js +0 -153
  87. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  88. package/lib/components/dynamic/dynamic.css +0 -173
  89. package/lib/components/dynamic/dynamic.js +0 -428
  90. package/lib/components/dynamic/export-module/index.js +0 -37
  91. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  92. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  93. package/lib/components/dynamic/my-team/img/line.png +0 -0
  94. package/lib/components/dynamic/my-team/img/team.png +0 -0
  95. package/lib/components/dynamic/my-team/index.css +0 -184
  96. package/lib/components/dynamic/my-team/index.js +0 -263
  97. package/lib/components/dynamic/my-team/request-api.js +0 -52
  98. package/lib/components/dynamic/my-team/util.js +0 -20
  99. package/lib/components/dynamic/new-ui.css +0 -192
  100. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
  101. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
  102. package/lib/components/dynamic/online-broadcast/data.js +0 -77
  103. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
  104. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  105. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  106. package/lib/components/dynamic/online-broadcast/index.css +0 -46
  107. package/lib/components/dynamic/online-broadcast/index.js +0 -61
  108. package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
  109. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  110. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
  111. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  112. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
  113. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  114. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
  115. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  116. package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -44
  117. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  118. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  119. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  120. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  121. package/lib/components/dynamic/quick-operation/index.css +0 -51
  122. package/lib/components/dynamic/quick-operation/index.js +0 -120
  123. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
@@ -47,6 +47,8 @@ var _EditKrWightModal = _interopRequireDefault(require("../../../../../edit-kr-w
47
47
 
48
48
  var _okrProgressModal = _interopRequireDefault(require("../../../../../okr-progress-modal"));
49
49
 
50
+ var _helper = require("../../../../helper");
51
+
50
52
  var _getLocale = require("../../../../../../utils/getLocale");
51
53
 
52
54
  require("./index.css");
@@ -99,7 +101,8 @@ function _default(props) {
99
101
 
100
102
  var _useContext = (0, _react.useContext)(_context2.CommonContext),
101
103
  refreshAll = _useContext.refreshAll,
102
- okrInfo = _useContext.okrInfo;
104
+ okrInfo = _useContext.okrInfo,
105
+ approvalSetting = _useContext.approvalSetting;
103
106
 
104
107
  var _useState = (0, _react.useState)(data.confidenceIndex),
105
108
  _useState2 = _slicedToArray(_useState, 2),
@@ -220,17 +223,13 @@ function _default(props) {
220
223
  updateProgressWay: updateProgressWay
221
224
  }).then(function (res) {
222
225
  if (res.Code == 1) {
223
- _toast["default"].Success("修改成功", {
224
- top: 60
225
- });
226
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
226
227
 
227
228
  refreshAll();
228
229
  updateKrs();
229
230
  setKrModalVsible(false);
230
231
  } else {
231
- _toast["default"].Error(res.Message, {
232
- top: 60
233
- });
232
+ _toast["default"].Error(res.Message);
234
233
  }
235
234
  });
236
235
  };
@@ -252,7 +251,7 @@ function _default(props) {
252
251
  setDeleteModalVisible(false);
253
252
 
254
253
  if (!Message) {
255
- _toast["default"].Success((0, _getLocale.getLocale)("Pro_detail_Deletsuccess"));
254
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
256
255
 
257
256
  setTimeout(function () {
258
257
  refreshAll();
@@ -281,7 +280,7 @@ function _default(props) {
281
280
  workId: data.workId,
282
281
  workMileStoneId: data.mileStoneId
283
282
  }).then(function () {
284
- _toast["default"].Success("修改成功");
283
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
285
284
  });
286
285
  };
287
286
 
@@ -316,7 +315,7 @@ function _default(props) {
316
315
  }, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("span", {
317
316
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-title"))
318
317
  }, /*#__PURE__*/_react["default"].createElement(_editableInput["default"], {
319
- editable: krCanEdit,
318
+ editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, "changeOkrName", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes),
320
319
  defaultValue: krName,
321
320
  emptyMessage: "KR\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",
322
321
  onKeyDown: onKrNameChangeHandler,
@@ -330,10 +329,10 @@ function _default(props) {
330
329
  name: user.name,
331
330
  id: user.userId,
332
331
  width: 68,
333
- editable: krCanEdit,
332
+ editable: krCanEdit && okrInfo.applyState !== _helper.EApproveStatus.UnderApproval,
334
333
  onEditUser: onEditUserHandler,
335
334
  nameTips: function nameTips(name) {
336
- return /*#__PURE__*/_react["default"].createElement("span", null, "\u8D1F\u8D23\u4EBA\uFF1A", name);
335
+ return /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_Text_Owner'), name);
337
336
  }
338
337
  })), showKrWeight && /*#__PURE__*/_react["default"].createElement(OkrRowColumn, {
339
338
  width: 60,
@@ -349,7 +348,7 @@ function _default(props) {
349
348
  marginLeft: 16
350
349
  }, /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
351
350
  data: data,
352
- editable: krCanEdit
351
+ editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, "changeOkrTime", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes)
353
352
  })), /*#__PURE__*/_react["default"].createElement("div", {
354
353
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-actions"))
355
354
  }, showHeart && /*#__PURE__*/_react["default"].createElement("div", {
@@ -378,7 +377,7 @@ function _default(props) {
378
377
  evaluateValue: evaluateValue,
379
378
  setEvaluateValue: onEvaluateChangeHanler,
380
379
  isEvaluate: isEvaluate
381
- })), krCanEdit && /*#__PURE__*/_react["default"].createElement("div", {
380
+ })), krCanEdit && okrInfo.applyState !== _helper.EApproveStatus.UnderApproval && /*#__PURE__*/_react["default"].createElement("div", {
382
381
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-delete")),
383
382
  onClick: function onClick() {
384
383
  return setDeleteModalVisible(true);
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getApproveStatusTextMap = exports.ApproveStatusColor = exports.ApproveStatus = void 0;
7
+
8
+ var _getLocale = require("../../../utils/getLocale");
9
+
10
+ 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; }
11
+
12
+ var ApproveStatus;
13
+ exports.ApproveStatus = ApproveStatus;
14
+
15
+ (function (ApproveStatus) {
16
+ ApproveStatus[ApproveStatus["None"] = 0] = "None";
17
+ ApproveStatus[ApproveStatus["WaitCommit"] = 6] = "WaitCommit";
18
+ ApproveStatus[ApproveStatus["Rejected"] = 3] = "Rejected";
19
+ ApproveStatus[ApproveStatus["UnderApproval"] = 1] = "UnderApproval";
20
+ ApproveStatus[ApproveStatus["ApproveAgree"] = 2] = "ApproveAgree";
21
+ ApproveStatus[ApproveStatus["WithDraw"] = 4] = "WithDraw";
22
+ ApproveStatus[ApproveStatus["Done"] = 5] = "Done";
23
+ })(ApproveStatus || (exports.ApproveStatus = ApproveStatus = {}));
24
+
25
+ var getApproveStatusTextMap = function getApproveStatusTextMap(status) {
26
+ var _ApproveStatusTextMap;
27
+
28
+ var ApproveStatusTextMap = (_ApproveStatusTextMap = {}, _defineProperty(_ApproveStatusTextMap, ApproveStatus.WaitCommit, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Rejected, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.UnderApproval, (0, _getLocale.getLocale)('Pro_detail_Approval')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.ApproveAgree, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.WithDraw, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.None, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Done, ''), _ApproveStatusTextMap);
29
+ return ApproveStatusTextMap[status];
30
+ };
31
+
32
+ exports.getApproveStatusTextMap = getApproveStatusTextMap;
33
+
34
+ var ApproveStatusColor = function ApproveStatusColor(status) {
35
+ var _ApprovalStatusColorM;
36
+
37
+ var ApprovalStatusColorMap = (_ApprovalStatusColorM = {}, _defineProperty(_ApprovalStatusColorM, ApproveStatus.WaitCommit, {
38
+ color: '#F0A326',
39
+ bgColor: 'rgba(240, 163, 38, 0.1)'
40
+ }), _defineProperty(_ApprovalStatusColorM, ApproveStatus.Rejected, {
41
+ color: '#F0A326',
42
+ bgColor: 'rgba(240, 163, 38, 0.1)'
43
+ }), _defineProperty(_ApprovalStatusColorM, ApproveStatus.UnderApproval, {
44
+ color: '#2879FF',
45
+ bgColor: 'rgba(40, 121, 255, 0.1)'
46
+ }), _defineProperty(_ApprovalStatusColorM, ApproveStatus.ApproveAgree, {
47
+ color: '#ffffff',
48
+ bgColor: '#ffffff'
49
+ }), _ApprovalStatusColorM);
50
+ return ApprovalStatusColorMap[status];
51
+ };
52
+
53
+ exports.ApproveStatusColor = ApproveStatusColor;
@@ -9,14 +9,16 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _titaUi = require("tita-ui");
13
-
14
- var _style = require("./style");
12
+ var _classnames = _interopRequireDefault(require("classnames"));
15
13
 
16
14
  var _tooltip = _interopRequireDefault(require("../../../tooltip"));
17
15
 
18
16
  var _getLocale = require("../../../../utils/getLocale");
19
17
 
18
+ var _dialogConfirm = _interopRequireDefault(require("../../../dialog-confirm"));
19
+
20
+ require("./index.css");
21
+
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
23
 
22
24
  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); }
@@ -35,61 +37,114 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
35
37
 
36
38
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
39
 
40
+ var prefix = 'okr-detail-delete-confirm';
41
+
38
42
  var getDeleteOptions = function getDeleteOptions() {
39
43
  return [{
40
44
  id: 0,
41
- text: "不删除目标下的任务",
42
- tips: ""
45
+ text: (0, _getLocale.getLocale)('OKR_MyO_Text_OdeletionNTask'),
46
+ tips: ''
43
47
  }, {
44
48
  id: 1,
45
- text: "同时删除目标下所有任务",
46
- tips: (0, _getLocale.getLocale)("Pro_detail_Tasksapproval")
49
+ text: (0, _getLocale.getLocale)('OKR_MyO_Text_OdeletionTask'),
50
+ tips: (0, _getLocale.getLocale)('Pro_detail_Tasksapproval')
47
51
  }, {
48
52
  id: 2,
49
- text: (0, _getLocale.getLocale)("Pro_detail_Attheametime"),
50
- tips: (0, _getLocale.getLocale)("Pro_detail_Tasksapproval")
53
+ text: (0, _getLocale.getLocale)('Pro_detail_Attheametime'),
54
+ tips: (0, _getLocale.getLocale)('Pro_detail_Tasksapproval')
51
55
  }];
52
56
  };
53
57
 
54
- function OkrDeleteConfirm(_ref) {
55
- var onConfirm = _ref.onConfirm,
56
- onCancel = _ref.onCancel;
58
+ var OkrDeletePop = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
59
+ var onCancel = _ref.onCancel,
60
+ onConfirm = _ref.onConfirm,
61
+ approvalSetting = _ref.approvalSetting,
62
+ okrInfo = _ref.okrInfo;
57
63
 
58
- var _useState = (0, _react.useState)(0),
64
+ var _useState = (0, _react.useState)(false),
59
65
  _useState2 = _slicedToArray(_useState, 2),
60
- selected = _useState2[0],
61
- setSelected = _useState2[1];
66
+ showConfirmPop = _useState2[0],
67
+ setShowConfirmPop = _useState2[1];
62
68
 
63
- return /*#__PURE__*/_react["default"].createElement(_style.DeleteWrapper, {
64
- onClick: function onClick(e) {
65
- return e.stopPropagation();
66
- }
67
- }, /*#__PURE__*/_react["default"].createElement(_style.DeleteTitle, null, "\u76EE\u6807\u5220\u9664\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\uFF01\u8BF7\u8C28\u614E\u64CD\u4F5C"), /*#__PURE__*/_react["default"].createElement("div", null, getDeleteOptions().map(function (option) {
68
- return /*#__PURE__*/_react["default"].createElement(_style.Options, {
69
- key: option.id,
70
- onClick: function onClick() {
71
- return setSelected(option.id);
72
- }
73
- }, /*#__PURE__*/_react["default"].createElement(_style.Icon, {
74
- className: selected == option.id ? "tu-icon-singlebox-avtive" : "tu-icon-singlebox-have"
75
- }), /*#__PURE__*/_react["default"].createElement("p", null, option.text), option.tips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
76
- overlay: option.tips,
77
- placement: "top",
78
- zIndex: 15000
79
- }, /*#__PURE__*/_react["default"].createElement(_style.Icon, {
80
- className: "tu-icon-warning"
81
- })));
82
- })), /*#__PURE__*/_react["default"].createElement(_style.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
83
- onClick: function onClick() {
69
+ var _useState3 = (0, _react.useState)(0),
70
+ _useState4 = _slicedToArray(_useState3, 2),
71
+ selected = _useState4[0],
72
+ setSelected = _useState4[1];
73
+
74
+ var handleCancelClick = function handleCancelClick() {
75
+ if (onCancel) {
84
76
  onCancel();
85
77
  }
86
- }, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
87
- type: "primary",
88
- onClick: function onClick() {
89
- return onConfirm(selected);
78
+
79
+ setShowConfirmPop(false);
80
+ };
81
+
82
+ var handleConfirmClick = function handleConfirmClick() {
83
+ if (onConfirm) {
84
+ onConfirm(selected);
90
85
  }
91
- }, (0, _getLocale.getLocale)("Pro_detail_Submission"))));
92
- }
93
86
 
94
- var _default = OkrDeleteConfirm;
87
+ setShowConfirmPop(false);
88
+ };
89
+
90
+ var show = function show() {
91
+ setShowConfirmPop(true);
92
+ };
93
+
94
+ var hide = function hide() {
95
+ setShowConfirmPop(false);
96
+ };
97
+
98
+ var showApprovalCmp = (0, _react.useMemo)(function () {
99
+ var _okrInfo$OkrAndKrAppr;
100
+
101
+ return approvalSetting.isOpen && !(okrInfo !== null && okrInfo !== void 0 && (_okrInfo$OkrAndKrAppr = okrInfo.OkrAndKrApprovalTypes) !== null && _okrInfo$OkrAndKrAppr !== void 0 && _okrInfo$OkrAndKrAppr.includes(53));
102
+ }, [approvalSetting, okrInfo]);
103
+ (0, _react.useImperativeHandle)(ref, function () {
104
+ return {
105
+ show: show,
106
+ hide: hide
107
+ };
108
+ });
109
+ var renderDialogConfirm = (0, _react.useMemo)(function () {
110
+ return /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
111
+ zIndex: 1200,
112
+ visible: showConfirmPop,
113
+ type: "warning"
114
+ }, /*#__PURE__*/_react["default"].createElement("span", {
115
+ type: "title"
116
+ }, showApprovalCmp ? (0, _getLocale.getLocale)('OKR_MyO_Deleteoapproval') : (0, _getLocale.getLocale)('OKR_MyO_Determinedeletiono')), /*#__PURE__*/_react["default"].createElement("span", {
117
+ type: "content"
118
+ }, !showApprovalCmp && (0, _getLocale.getLocale)('OKR_MyO_Text_Odeletion'), /*#__PURE__*/_react["default"].createElement("div", null, getDeleteOptions().map(function (option) {
119
+ return /*#__PURE__*/_react["default"].createElement("div", {
120
+ className: "".concat(prefix, "__option"),
121
+ key: option.id,
122
+ onClick: function onClick() {
123
+ return setSelected(option.id);
124
+ }
125
+ }, /*#__PURE__*/_react["default"].createElement("span", {
126
+ className: (0, _classnames["default"])("".concat(prefix, "__icon"), {
127
+ 'tu-icon-singlebox-avtive': selected == option.id,
128
+ 'tu-icon-singlebox-have': selected != option.id
129
+ })
130
+ }), /*#__PURE__*/_react["default"].createElement("span", {
131
+ className: "".concat(prefix, "__option-text")
132
+ }, option.text, option.tips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
133
+ overlay: option.tips,
134
+ placement: "top",
135
+ zIndex: 15000
136
+ }, /*#__PURE__*/_react["default"].createElement("span", {
137
+ className: "".concat(prefix, "__icon tu-icon-warning")
138
+ }))));
139
+ }))), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"].CancelButton, {
140
+ type: "button",
141
+ onClick: handleCancelClick
142
+ }, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"].SureButton, {
143
+ type: "button",
144
+ onClick: handleConfirmClick
145
+ }, showApprovalCmp ? (0, _getLocale.getLocale)('OKR_MyO_Submittedapproval') : (0, _getLocale.getLocale)('Pro_detail_Submission')));
146
+ }, [showConfirmPop, selected]);
147
+ return renderDialogConfirm;
148
+ });
149
+ var _default = OkrDeletePop;
95
150
  exports["default"] = _default;
@@ -0,0 +1,55 @@
1
+ .okr-detail-delete-confirm__option {
2
+ cursor: pointer;
3
+ display: flex;
4
+ margin-top: 10px;
5
+ }
6
+
7
+ .okr-detail-delete-confirm__option-text {
8
+ font-size: 14px;
9
+ color: #3F4755;
10
+ line-height: 22px;
11
+ margin-left: 6px;
12
+ }
13
+
14
+ .okr-detail-delete-confirm__option-text:hover {
15
+ color: #2879ff;
16
+ }
17
+
18
+ .okr-detail-delete-confirm__icon {
19
+ font-size: 12px;
20
+ color: #89919f;
21
+ vertical-align: middle;
22
+ }
23
+
24
+ .okr-detail-delete-confirm__icon.tu-icon-singlebox-have, .okr-detail-delete-confirm__icon.tu-icon-singlebox-avtive {
25
+ margin-top: 4px;
26
+ font-size: 16px;
27
+ color: #2879ff;
28
+ }
29
+
30
+ .okr-detail-delete-confirm__icon.tu-icon-warning {
31
+ font-size: 14px;
32
+ color: #acb7bf;
33
+ margin-left: 4px;
34
+ vertical-align: text-top;
35
+ }
36
+
37
+ .isApprovalDisabled {
38
+ margin-bottom: 0;
39
+ padding: 5px 24px;
40
+ font-size: 14px;
41
+ line-height: 22px;
42
+ transition: all .3s ease-in;
43
+ color: #BFC7D5;
44
+ cursor: pointer;
45
+ display: flex;
46
+ align-items: center;
47
+ white-space: nowrap;
48
+ }
49
+
50
+ .isApprovalDisabled .options-icon {
51
+ margin-right: 12px;
52
+ font-size: 14px;
53
+ transition: all .3s ease-in;
54
+ color: #89919f;
55
+ }
@@ -25,3 +25,14 @@
25
25
  .okr-detail-head-parent > span:hover {
26
26
  color: #2879ff;
27
27
  }
28
+
29
+ .okr-detail-header-status {
30
+ display: inline-flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ border-radius: 16px;
34
+ width: 68px;
35
+ height: 28px;
36
+ margin-right: 18px;
37
+ font-size: 12px;
38
+ }