@titaui/pc 1.12.0-beta.1 → 1.12.1

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 (218) 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/avatar/text-avatar/index.css +2 -2
  4. package/lib/components/avatar/text-avatar/index.js +6 -6
  5. package/lib/components/button/images/blue.svg +21 -0
  6. package/lib/components/button/images/red.svg +21 -0
  7. package/lib/components/button/images/white.svg +19 -0
  8. package/lib/components/button/rect-btn/index.css +45 -11
  9. package/lib/components/button/rect-btn/index.js +12 -6
  10. package/lib/components/change-okr-modal/index.js +7 -6
  11. package/lib/components/checkbox/index.css +7 -3
  12. package/lib/{pages/aha2021 → components/contact-kefu}/img/canceled.svg +0 -0
  13. package/lib/{pages/aha2021 → components/contact-kefu}/img/kefu.svg +0 -0
  14. package/lib/{pages/aha2021 → components/contact-kefu}/img/not-try.png +0 -0
  15. package/lib/components/contact-kefu/img/notice.png +0 -0
  16. package/lib/{pages/aha2021 → components/contact-kefu}/img/try.png +0 -0
  17. package/lib/components/contact-kefu/index.css +95 -0
  18. package/lib/components/{dynamic/advertise → contact-kefu}/index.js +59 -77
  19. package/lib/components/create-okr-modal/index.js +48 -42
  20. package/lib/components/create-okr-modal/request-api.js +1 -1
  21. package/lib/components/dialog-confirm/index.css +2 -2
  22. package/lib/components/drawer/headerAction.js +5 -1
  23. package/lib/components/drawer/headerDrop.js +42 -4
  24. package/lib/components/drawer/index.css +33 -0
  25. package/lib/components/drawer/index.js +26 -3
  26. package/lib/components/dynamic/constant.js +38 -33
  27. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +48 -10
  28. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +4 -2
  29. package/lib/components/dynamic/dynamic-list/index.js +14 -7
  30. package/lib/components/dynamic/index.js +9 -12
  31. package/lib/components/dynamic/request-api.js +7 -68
  32. package/lib/components/e-priority/index.css +4 -4
  33. package/lib/components/e-priority/index.js +10 -2
  34. package/lib/components/form/form-fields/radios/index.css +4 -0
  35. package/lib/components/form/form-fields/radios/index.js +4 -3
  36. package/lib/components/mblog/components/MblogContent.js +5 -2
  37. package/lib/components/nav-top/components/menu/img/new.svg +30 -0
  38. package/lib/components/nav-top/components/menu/img/wecome-temp.png +0 -0
  39. package/lib/components/nav-top/components/menu/index.css +91 -0
  40. package/lib/components/nav-top/components/menu/index.js +72 -24
  41. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +2 -1
  42. package/lib/components/nav-top/components/user-message/components/todos/index.css +1 -0
  43. package/lib/components/nav-top/index.js +8 -4
  44. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
  45. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
  46. package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
  47. package/lib/components/okr-detail/components/base-okr-type/index.css +4 -0
  48. package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -0
  49. package/lib/components/okr-detail/components/header/index.js +10 -3
  50. package/lib/components/okr-detail/components/header/o-name.js +10 -3
  51. package/lib/components/okr-detail/components/o-classify.js +5 -1
  52. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +16 -16
  53. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
  54. package/lib/components/okr-detail/detail-header/constant.js +53 -0
  55. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +111 -54
  56. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +63 -0
  57. package/lib/components/okr-detail/detail-header/index.css +11 -0
  58. package/lib/components/okr-detail/detail-header/index.js +228 -234
  59. package/lib/components/okr-detail/e-list/index.js +2 -2
  60. package/lib/components/okr-detail/helper.js +108 -0
  61. package/lib/components/okr-detail/index.js +21 -4
  62. package/lib/components/okr-detail/okr-list/index.js +13 -6
  63. package/lib/components/okr-detail/request-apis.js +14 -8
  64. package/lib/components/okr-flow/child-node/index.css +1 -1
  65. package/lib/components/okr-flow/export-modal/index.js +66 -3
  66. package/lib/components/okr-period-selector/index.js +9 -5
  67. package/lib/components/okr-period-selector/select-cycle.js +23 -19
  68. package/lib/components/operation-records/index.js +1 -1
  69. package/lib/components/operation-records/style.js +1 -1
  70. package/lib/components/period-selector/interface.js +7 -0
  71. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
  72. package/lib/components/radio/index.css +3 -3
  73. package/lib/components/search-input/index.css +1 -1
  74. package/lib/components/select-layer/index.css +1 -1
  75. package/lib/components/survey-model/index.js +3 -0
  76. package/lib/components/task-relation-modal/helper.js +139 -2
  77. package/lib/components/task-relation-modal/image/loading.gif +0 -0
  78. package/lib/components/task-relation-modal/index.js +9 -1
  79. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
  80. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +262 -0
  81. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
  82. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
  83. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +129 -0
  84. package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
  85. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
  86. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +185 -0
  87. package/lib/components/task-relation-modal/request-api.js +30 -3
  88. package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
  89. package/lib/components/task-relation-modal/search/principal.js +36 -19
  90. package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
  91. package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
  92. package/lib/components/{dynamic/dynamic-topping/index.js → task-relation-modal/search/task-relation.js} +45 -44
  93. package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
  94. package/lib/components/{dynamic/dynamic-liking/index.js → task-relation-modal/search/work-relation.js} +43 -39
  95. package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
  96. package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
  97. package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
  98. package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
  99. package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
  100. package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
  101. package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
  102. package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
  103. package/lib/components/task-relation-modal/tree-node/category-node/index.css +0 -11
  104. package/lib/components/task-relation-modal/tree-node/category-node/index.js +1 -3
  105. package/lib/components/task-relation-modal/tree-node/kr-node/index.css +0 -16
  106. package/lib/components/task-relation-modal/tree-node/kr-node/index.js +0 -6
  107. package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +0 -16
  108. package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +0 -4
  109. package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
  110. package/lib/components/task-relation-modal/work-relation/index.css +0 -0
  111. package/lib/components/task-relation-modal/work-relation/index.js +256 -0
  112. package/lib/components/task-tree/index.js +1 -7
  113. package/lib/components/task-tree/task-item-node/constant.js +39 -22
  114. package/lib/components/task-tree/task-item-node/e-status-dropdown.js +38 -8
  115. package/lib/components/task-tree/task-item-node/e-task.js +24 -24
  116. package/lib/components/task-tree/task-item-node/index.css +28 -18
  117. package/lib/components/task-tree/task-tree.css +1 -1
  118. package/lib/components/textarea/index.css +142 -0
  119. package/lib/components/textarea/index.js +262 -0
  120. package/lib/components/time-picker/time-picker.js +34 -102
  121. package/lib/components/time-picker/timer-picker-input.js +0 -6
  122. package/lib/components/toast/index.js +5 -3
  123. package/lib/components/tooltip/index.js +3 -0
  124. package/lib/components/tooltip/tooltip-rows/index.css +26 -0
  125. package/lib/components/tooltip/tooltip-rows/index.js +106 -0
  126. package/lib/components/user-selector/category-selector-panel/index.js +6 -1
  127. package/lib/components/{dynamic/quick-operation/components/create-task/index.js → user-selector/category-selector-panel/subordinate-tree.js} +37 -20
  128. package/lib/components/user-selector/constant.js +10 -2
  129. package/lib/components/user-selector/empty/index.css +5 -0
  130. package/lib/components/user-selector/empty/index.js +9 -3
  131. package/lib/components/user-selector/export-modules/depart-search-selector/index.js +45 -17
  132. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
  133. package/lib/components/user-selector/images/no-auth.png +0 -0
  134. package/lib/components/user-selector/request-apis.js +28 -9
  135. package/lib/components/user-selector/searched-panel/index.js +21 -7
  136. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
  137. package/lib/components-v1/radio/radio.js +1 -1
  138. package/lib/index.js +48 -0
  139. package/lib/pages/aha2021/index.css +1 -26
  140. package/lib/pages/aha2021/index.js +3 -82
  141. package/lib/pages/new-okr-list/header/common.js +52 -0
  142. package/lib/pages/new-okr-list/header/index.css +45 -0
  143. package/lib/pages/new-okr-list/header/index.js +40 -16
  144. package/lib/pages/new-okr-list/header/operate-record.js +136 -0
  145. package/lib/pages/new-okr-list/index.js +4 -2
  146. package/lib/pages/new-okr-list/list/index.js +19 -2
  147. package/lib/pages/new-okr-list/request-api.js +8 -2
  148. package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
  149. package/lib/utils/format-time.js +8 -1
  150. package/lib/utils/open-data.js +5 -1
  151. package/lib/utils/planDataJson.js +11115 -0
  152. package/package.json +2 -2
  153. package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
  154. package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
  155. package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
  156. package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
  157. package/lib/components/dynamic/advertise/index.css +0 -21
  158. package/lib/components/dynamic/advertise/interface.js +0 -5
  159. package/lib/components/dynamic/advertise/util.js +0 -28
  160. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
  161. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
  162. package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
  163. package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
  164. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  165. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  166. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  167. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  168. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  169. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
  170. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
  171. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
  172. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  173. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  174. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  175. package/lib/components/dynamic/dynamic-liking/item.js +0 -75
  176. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  177. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
  178. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
  179. package/lib/components/dynamic/dynamic-topping/index.css +0 -141
  180. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  181. package/lib/components/dynamic/dynamic-topping/item.js +0 -153
  182. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  183. package/lib/components/dynamic/dynamic.css +0 -173
  184. package/lib/components/dynamic/dynamic.js +0 -428
  185. package/lib/components/dynamic/export-module/index.js +0 -37
  186. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  187. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  188. package/lib/components/dynamic/my-team/img/line.png +0 -0
  189. package/lib/components/dynamic/my-team/img/team.png +0 -0
  190. package/lib/components/dynamic/my-team/index.css +0 -184
  191. package/lib/components/dynamic/my-team/index.js +0 -263
  192. package/lib/components/dynamic/my-team/request-api.js +0 -52
  193. package/lib/components/dynamic/my-team/util.js +0 -20
  194. package/lib/components/dynamic/new-ui.css +0 -192
  195. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
  196. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
  197. package/lib/components/dynamic/online-broadcast/data.js +0 -77
  198. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
  199. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  200. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  201. package/lib/components/dynamic/online-broadcast/index.css +0 -46
  202. package/lib/components/dynamic/online-broadcast/index.js +0 -61
  203. package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
  204. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  205. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
  206. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  207. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
  208. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  209. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
  210. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  211. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  212. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  213. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  214. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  215. package/lib/components/dynamic/quick-operation/index.css +0 -51
  216. package/lib/components/dynamic/quick-operation/index.js +0 -120
  217. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
  218. package/lib/components/task-tree/mock.js +0 -944
@@ -79,49 +79,42 @@ var TimePicker = function TimePicker(props) {
79
79
  var mInputRef = (0, _react.useRef)();
80
80
  var minuteRef = (0, _react.useRef)((0, _moment["default"])(value || '00:00', timeFormat).format('mm'));
81
81
  var triggerRef = (0, _react.useRef)();
82
- var timerRef = (0, _react.useRef)();
83
82
  var hours = (0, _utils.getHours)(hourStep);
84
83
  var minutes = (0, _utils.getMinutes)(minuteStep);
85
84
 
86
85
  var onTimeChange = function onTimeChange() {
87
- onChange === null || onChange === void 0 ? void 0 : onChange("".concat(hourRef.current, ":").concat(minuteRef.current));
88
- }; // const onInputClick = (type) => {
89
- // clearTimeout(timerRef.current)
90
- // timerRef.current = setTimeout(() => {
91
- // if (type === 'hour') {
92
- // hInputRef.current?.focus()
93
- // } else {
94
- // mInputRef.current?.focus()
95
- // }
96
- // setTimeSettingType(() => type)
97
- // }, 0)
98
- // }
99
-
100
-
101
- var showSelectorPop = function showSelectorPop() {
102
- return setVisible(true);
86
+ return onChange === null || onChange === void 0 ? void 0 : onChange("".concat(hourRef.current, ":").concat(minuteRef.current));
103
87
  };
104
88
 
105
- var onFocusHandler = function onFocusHandler(type) {
106
- setTimeSettingType(function () {
89
+ var onInputClickHandler = function onInputClickHandler(type) {
90
+ return setTimeSettingType(function () {
107
91
  return type;
108
92
  });
109
93
  };
110
94
 
111
- var onHourInputBlur = function onHourInputBlur() {
112
- // setHour((prevHour) => {
113
- // const prevHour = hourRef.current;
114
- // let nextHour = (Array(2).join("0") + prevHour).slice(-2);
115
- // if (Number(prevHour) > Number(hours[hours.length - 1])) {
116
- // nextHour = `0${prevHour.slice(0, 1)}`;
117
- // }
118
- // hourRef.current = nextHour;
119
- // });
120
- // if (timeSetType === "hour" && hInputRef.current) {
121
- // hInputRef.current.focus();
122
- // }
123
- // onTimeChange();
124
- setTimeSettingType('');
95
+ var onKeyDownHandler = function onKeyDownHandler(e) {
96
+ var keyCode = e.keyCode;
97
+
98
+ if ([_utils.KEYCODE.directionLeft, _utils.KEYCODE.directionRight].includes(keyCode)) {
99
+ setTimeSettingType(_utils.TargetMapByKeyCode[keyCode]);
100
+ }
101
+
102
+ if ([_utils.KEYCODE.directionUp, _utils.KEYCODE.directionDown].includes(keyCode)) {
103
+ switch (timeSetingtType) {
104
+ case 'hour':
105
+ hourRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'hour', hourRef.current);
106
+ break;
107
+
108
+ case 'minute':
109
+ minuteRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'minute', minuteRef.current);
110
+ break;
111
+
112
+ default:
113
+ break;
114
+ }
115
+
116
+ onTimeChange();
117
+ }
125
118
  };
126
119
 
127
120
  var onHourInputChange = function onHourInputChange(e) {
@@ -139,32 +132,6 @@ var TimePicker = function TimePicker(props) {
139
132
  }
140
133
  };
141
134
 
142
- var onMinuteInputBlur = function onMinuteInputBlur() {
143
- // setMinute((prevMinute) => {
144
- // let nextMinute = minuteRef.current;
145
- // minutes.forEach((m, i) => {
146
- // const mNum = Number(m);
147
- // const nextMinuteNum = Number(nextMinute);
148
- // if (mNum === nextMinuteNum) {
149
- // nextMinute = m;
150
- // } else if (
151
- // mNum < nextMinuteNum
152
- // && Number(minutes[i + 1]) > nextMinuteNum
153
- // ) {
154
- // nextMinute = m;
155
- // } else if (nextMinuteNum > Number(minutes[minutes.length - 1])) {
156
- // nextMinute = "00";
157
- // }
158
- // });
159
- // minuteRef.current = nextMinute;
160
- // });
161
- // if (timeSetType === "minute" && mInputRef.current) {
162
- // mInputRef.current.focus();
163
- // }
164
- // onTimeChange();
165
- setTimeSettingType('');
166
- };
167
-
168
135
  var onMinuteInputChange = function onMinuteInputChange(e) {
169
136
  var v = e.target.value;
170
137
 
@@ -225,39 +192,10 @@ var TimePicker = function TimePicker(props) {
225
192
  return currTime;
226
193
  };
227
194
 
228
- var handleKeyDown = function handleKeyDown(e) {
229
- var keyCode = e.keyCode;
230
-
231
- if ([_utils.KEYCODE.directionLeft, _utils.KEYCODE.directionRight].includes(keyCode)) {
232
- setTimeSettingType(_utils.TargetMapByKeyCode[keyCode]);
233
- }
234
-
235
- if ([_utils.KEYCODE.directionUp, _utils.KEYCODE.directionDown].includes(keyCode)) {
236
- switch (timeSetingtType) {
237
- case 'hour':
238
- hourRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'hour', hourRef.current);
239
- break;
240
-
241
- case 'minute':
242
- minuteRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'minute', minuteRef.current);
243
- break;
244
-
245
- default:
246
- break;
247
- }
248
-
249
- onTimeChange();
250
- }
195
+ var showSelectorPop = function showSelectorPop() {
196
+ return setVisible(true);
251
197
  };
252
198
 
253
- (0, _react.useEffect)(function () {
254
- document.removeEventListener('keydown', handleKeyDown);
255
- enableKeyBoard && timeSetingtType && document.addEventListener('keydown', handleKeyDown);
256
- return function () {
257
- clearTimeout(timerRef.current);
258
- document.removeEventListener('keydown', handleKeyDown);
259
- };
260
- }, [timeSetingtType]);
261
199
  return /*#__PURE__*/_react["default"].createElement("div", {
262
200
  className: _utils.TimePickerClass
263
201
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -268,36 +206,30 @@ var TimePicker = function TimePicker(props) {
268
206
  onClick: function onClick() {
269
207
  return !enableKeyBoard && showSelectorPop();
270
208
  }
271
- }, /*#__PURE__*/_react["default"].createElement(_timerPickerInput["default"], {
209
+ }, /*#__PURE__*/_react["default"].createElement(_timerPickerInput["default"], _extends({
272
210
  className: (0, _classnames["default"])("".concat(_utils.TimePickerClass, "-input"), {
273
211
  active: enableKeyBoard && timeSetingtType === 'hour'
274
212
  }),
275
213
  disabled: disabled,
276
214
  maxLength: 2,
277
- onBlur: onHourInputBlur,
278
215
  onChange: onHourInputChange,
279
216
  onClick: function onClick() {
280
- return !enableKeyBoard && showSelectorPop();
281
- },
282
- onFocus: function onFocus() {
283
- return onFocusHandler('hour');
217
+ return onInputClickHandler('hour');
284
218
  },
219
+ onKeyDown: onKeyDownHandler,
285
220
  ref: hInputRef,
286
221
  value: hourRef.current
287
- }), /*#__PURE__*/_react["default"].createElement("span", null, ":"), /*#__PURE__*/_react["default"].createElement(_timerPickerInput["default"], {
222
+ }, restProps)), /*#__PURE__*/_react["default"].createElement("span", null, ":"), /*#__PURE__*/_react["default"].createElement(_timerPickerInput["default"], {
288
223
  className: (0, _classnames["default"])("".concat(_utils.TimePickerClass, "-input"), {
289
224
  active: enableKeyBoard && timeSetingtType === 'minute'
290
225
  }),
291
226
  disabled: disabled,
292
227
  maxLength: 2,
293
- onBlur: onMinuteInputBlur,
294
228
  onChange: onMinuteInputChange,
295
229
  onClick: function onClick() {
296
- return !enableKeyBoard && showSelectorPop();
297
- },
298
- onFocus: function onFocus() {
299
- return onFocusHandler('minute');
230
+ return onInputClickHandler('minute');
300
231
  },
232
+ onKeyDown: onKeyDownHandler,
301
233
  ref: mInputRef,
302
234
  value: minuteRef.current
303
235
  })), !disabled && /*#__PURE__*/_react["default"].createElement(_timePickerSelector["default"], _extends({
@@ -57,11 +57,6 @@ var TimePickerInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
57
57
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
58
58
  };
59
59
 
60
- var onFocusHandler = function onFocusHandler(e) {
61
- setSelectionRange(0);
62
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
63
- };
64
-
65
60
  var onChangeHandler = function onChangeHandler(e) {
66
61
  return onChange === null || onChange === void 0 ? void 0 : onChange(e);
67
62
  };
@@ -86,7 +81,6 @@ var TimePickerInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
86
81
  maxLength: maxLength,
87
82
  onClick: onClickHandler,
88
83
  onChange: onChangeHandler,
89
- onFocus: onFocusHandler,
90
84
  ref: inputRef,
91
85
  type: type,
92
86
  value: value
@@ -168,6 +168,7 @@ var Toast = /*#__PURE__*/function () {
168
168
  var options,
169
169
  key,
170
170
  ins,
171
+ canClose,
171
172
  _args3 = arguments;
172
173
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
173
174
  while (1) {
@@ -180,14 +181,15 @@ var Toast = /*#__PURE__*/function () {
180
181
 
181
182
  case 4:
182
183
  ins = _context3.sent;
184
+ canClose = options.canClose !== undefined ? options.canClose : false;
183
185
  ins.notice({
184
- content: (0, _SuccessRender.RenderError)(msg, key, options.canClose, ins),
186
+ content: (0, _SuccessRender.RenderError)(msg, key, canClose, ins),
185
187
  style: options.style,
186
- duration: options.duration || options.canClose === false ? 3 : 3000,
188
+ duration: options.duration || canClose === false ? 3 : 3000,
187
189
  key: key
188
190
  });
189
191
 
190
- case 6:
192
+ case 7:
191
193
  case "end":
192
194
  return _context3.stop();
193
195
  }
@@ -11,11 +11,14 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
11
11
 
12
12
  var _tooltipText = _interopRequireDefault(require("./tooltip-text"));
13
13
 
14
+ var _tooltipRows = _interopRequireDefault(require("./tooltip-rows"));
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
 
16
18
  // export const TooltipText = _TooltipText;
17
19
  // export const ErrorToolTip = _ErrorTip;
18
20
  _tooltip["default"].Text = _tooltipText["default"];
19
21
  _tooltip["default"].Error = _errorTip["default"];
22
+ _tooltip["default"].Rows = _tooltipRows["default"];
20
23
  var _default = _tooltip["default"];
21
24
  exports["default"] = _default;
@@ -0,0 +1,26 @@
1
+ .tooltip-rows {
2
+ width: 100%;
3
+ position: relative;
4
+ }
5
+
6
+ .tooltip-rows-wrapper {
7
+ width: 100%;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .tooltip-rows-wrapper--hidden {
12
+ position: absolute;
13
+ visibility: hidden;
14
+ }
15
+
16
+ .tooltip-rows-wrapper--normal-chirdren {
17
+ margin-right: 4px;
18
+ }
19
+
20
+ .tooltip-rows-wrapper-suffix {
21
+ position: absolute;
22
+ bottom: 0;
23
+ right: 0;
24
+ padding: 0 4px 0 14px;
25
+ background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 20%);
26
+ }
@@ -0,0 +1,106 @@
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 _tooltip = _interopRequireDefault(require("../tooltip"));
13
+
14
+ require("./index.css");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ 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); }
19
+
20
+ 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; }
21
+
22
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
23
+
24
+ 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."); }
25
+
26
+ 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); }
27
+
28
+ 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; }
29
+
30
+ 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; }
31
+
32
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
33
+
34
+ var TooltipText = function TooltipText(_ref) {
35
+ var _ref$overlayText = _ref.overlayText,
36
+ overlayText = _ref$overlayText === void 0 ? "" : _ref$overlayText,
37
+ _ref$exClass = _ref.exClass,
38
+ exClass = _ref$exClass === void 0 ? "" : _ref$exClass,
39
+ _ref$isPercent = _ref.isPercent,
40
+ isPercent = _ref$isPercent === void 0 ? false : _ref$isPercent,
41
+ _ref$overlayClassName = _ref.overlayClassName,
42
+ overlayClassName = _ref$overlayClassName === void 0 ? "" : _ref$overlayClassName,
43
+ _ref$mouseEnterDelay = _ref.mouseEnterDelay,
44
+ mouseEnterDelay = _ref$mouseEnterDelay === void 0 ? 0 : _ref$mouseEnterDelay,
45
+ _ref$lineHeight = _ref.lineHeight,
46
+ lineHeight = _ref$lineHeight === void 0 ? 22 : _ref$lineHeight,
47
+ _ref$rowNum = _ref.rowNum,
48
+ rowNum = _ref$rowNum === void 0 ? 2 : _ref$rowNum,
49
+ _ref$suffix = _ref.suffix,
50
+ suffix = _ref$suffix === void 0 ? null : _ref$suffix,
51
+ _ref$suffixClass = _ref.suffixClass,
52
+ suffixClass = _ref$suffixClass === void 0 ? "" : _ref$suffixClass,
53
+ children = _ref.children;
54
+
55
+ var _useState = (0, _react.useState)(false),
56
+ _useState2 = _slicedToArray(_useState, 2),
57
+ hasTooltip = _useState2[0],
58
+ setHasTooltip = _useState2[1];
59
+
60
+ var domRef = (0, _react.useRef)();
61
+ (0, _react.useEffect)(function () {
62
+ if (isPercent) {
63
+ var _console = console,
64
+ log = _console.log;
65
+ log(domRef.current.getBoundingClientRect());
66
+ var domClient = domRef.current ? domRef.current.getBoundingClientRect() : {
67
+ height: 0,
68
+ width: 0
69
+ };
70
+ var height = domClient.height;
71
+
72
+ if (height > rowNum * lineHeight) {
73
+ setHasTooltip(true);
74
+ }
75
+ }
76
+ }, []);
77
+ return /*#__PURE__*/_react["default"].createElement("div", {
78
+ className: "tooltip-rows"
79
+ }, hasTooltip && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
80
+ overlayClassName: overlayClassName,
81
+ overlay: overlayText || children,
82
+ placement: "top",
83
+ mouseEnterDelay: mouseEnterDelay
84
+ }, /*#__PURE__*/_react["default"].createElement("div", {
85
+ className: "tooltip-rows-wrapper ".concat(exClass),
86
+ style: {
87
+ height: rowNum * lineHeight,
88
+ lineHeight: "".concat(lineHeight, "px")
89
+ }
90
+ }, children, /*#__PURE__*/_react["default"].createElement("div", {
91
+ className: "tooltip-rows-wrapper-suffix ".concat(suffixClass)
92
+ }, !!suffix && suffix))), !hasTooltip && /*#__PURE__*/_react["default"].createElement("div", {
93
+ className: "tooltip-rows-wrapper ".concat(exClass)
94
+ }, /*#__PURE__*/_react["default"].createElement("span", {
95
+ className: "tooltip-rows-wrapper--normal-chirdren"
96
+ }, children), suffix), /*#__PURE__*/_react["default"].createElement("span", {
97
+ className: "tooltip-rows-wrapper tooltip-rows-wrapper--hidden ".concat(exClass),
98
+ ref: domRef,
99
+ style: {
100
+ lineHeight: "".concat(lineHeight, "px")
101
+ }
102
+ }, children));
103
+ };
104
+
105
+ var _default = TooltipText;
106
+ exports["default"] = _default;
@@ -39,7 +39,12 @@ function _default(props) {
39
39
  multiple = props.multiple;
40
40
 
41
41
  var _useContext = (0, _react.useContext)(_context.CommonContext),
42
- panes = _useContext.panes;
42
+ panes = _useContext.panes,
43
+ departOnly = _useContext.departOnly;
44
+
45
+ if (departOnly) {
46
+ panes.subordinate = false;
47
+ }
43
48
 
44
49
  var _useState = (0, _react.useState)(function () {
45
50
  var panelCount = 0;
@@ -9,9 +9,11 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _newTask = _interopRequireDefault(require("../../img/new-task.png"));
12
+ var _chooseTree = _interopRequireDefault(require("../select-tree/choose-tree"));
13
13
 
14
- var _getLocale = require("../../../../../utils/getLocale");
14
+ var _requestApis = require("../request-apis");
15
+
16
+ var _context = require("../context");
15
17
 
16
18
  require("./index.css");
17
19
 
@@ -21,24 +23,39 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
23
 
22
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; }
23
25
 
24
- var prefix = "titaui-pc-create-task";
25
- var CreateTask = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
26
- var onClick = _ref.onClick;
27
-
28
- var handleCreateTaskClick = function handleCreateTaskClick() {
29
- onClick && onClick();
26
+ var SubordinateTree = function SubordinateTree(props) {
27
+ var onSelect = props.onSelect,
28
+ selected = props.selected,
29
+ multiple = props.multiple,
30
+ itemHeight = props.itemHeight,
31
+ height = props.height;
32
+
33
+ var _useContext = (0, _react.useContext)(_context.CommonContext),
34
+ auth = _useContext.auth,
35
+ authType = _useContext.authType,
36
+ isGetRoot = _useContext.isGetRoot;
37
+
38
+ var onGetTreeData = function onGetTreeData() {
39
+ return (0, _requestApis.getSubordinateData)({
40
+ auth: auth,
41
+ authType: authType
42
+ });
30
43
  };
31
44
 
32
- return /*#__PURE__*/_react["default"].createElement("div", {
33
- className: prefix,
34
- onClick: handleCreateTaskClick,
35
- ref: ref
36
- }, /*#__PURE__*/_react["default"].createElement("img", {
37
- className: "".concat(prefix, "__img animate__rubberBand"),
38
- src: _newTask["default"]
39
- }), /*#__PURE__*/_react["default"].createElement("span", {
40
- className: "".concat(prefix, "__text")
41
- }, (0, _getLocale.getLocale)("Feed_Set_Pop_Butt_Newtask")));
42
- });
43
- var _default = CreateTask;
45
+ return /*#__PURE__*/_react["default"].createElement(_context.TreeNodeContext.Provider, {
46
+ value: {}
47
+ }, /*#__PURE__*/_react["default"].createElement(_chooseTree["default"], {
48
+ onSelect: onSelect,
49
+ selected: selected,
50
+ multiple: multiple,
51
+ virtual: true,
52
+ asyncData: true,
53
+ height: height,
54
+ isGetRoot: isGetRoot,
55
+ itemHeight: itemHeight,
56
+ getTreeData: onGetTreeData
57
+ }));
58
+ };
59
+
60
+ var _default = SubordinateTree;
44
61
  exports["default"] = _default;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getPanesConfig = void 0;
6
+ exports.getPanesConfig = exports["default"] = void 0;
7
7
 
8
8
  var _getLocale = require("../../utils/getLocale");
9
9
 
@@ -11,6 +11,8 @@ var _departTree = _interopRequireDefault(require("./category-selector-panel/depa
11
11
 
12
12
  var _groupTree = _interopRequireDefault(require("./category-selector-panel/group-tree"));
13
13
 
14
+ var _subordinateTree = _interopRequireDefault(require("./category-selector-panel/subordinate-tree"));
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
 
16
18
  var getPanesConfig = function getPanesConfig() {
@@ -22,8 +24,14 @@ var getPanesConfig = function getPanesConfig() {
22
24
  group: {
23
25
  label: (0, _getLocale.getLocale)("Mod_Groups"),
24
26
  Component: _groupTree["default"]
27
+ },
28
+ subordinate: {
29
+ label: (0, _getLocale.getLocale)("OKR_MyO_Butt_Subordinate"),
30
+ Component: _subordinateTree["default"]
25
31
  }
26
32
  };
27
33
  };
28
34
 
29
- exports.getPanesConfig = getPanesConfig;
35
+ exports.getPanesConfig = getPanesConfig;
36
+ var _default = getPanesConfig;
37
+ exports["default"] = _default;
@@ -12,6 +12,11 @@
12
12
  background: url(../images/empty-131.png) transparent no-repeat 50% 50%;
13
13
  }
14
14
 
15
+ .persel-empty > span.empty-special {
16
+ background-image: url("../images/no-auth.png");
17
+ background-size: contain;
18
+ }
19
+
15
20
  .add-group {
16
21
  display: inline-block;
17
22
  color: #2879ff;
@@ -7,13 +7,17 @@ exports["default"] = _default;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
10
12
  var _getLocale = require("../../../utils/getLocale");
11
13
 
12
14
  require("./index.css");
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
 
16
- function _default() {
18
+ function _default(_ref) {
19
+ var _ref$errorTip = _ref.errorTip,
20
+ errorTip = _ref$errorTip === void 0 ? "" : _ref$errorTip;
17
21
  return /*#__PURE__*/_react["default"].createElement("div", {
18
22
  style: {
19
23
  textAlign: "center"
@@ -21,8 +25,10 @@ function _default() {
21
25
  }, /*#__PURE__*/_react["default"].createElement("div", {
22
26
  className: "persel-empty"
23
27
  }, /*#__PURE__*/_react["default"].createElement("span", {
24
- className: "icon"
28
+ className: (0, _classnames["default"])("icon", {
29
+ "empty-special": !!errorTip
30
+ })
25
31
  })), /*#__PURE__*/_react["default"].createElement("span", {
26
32
  className: "empty-tip"
27
- }, (0, _getLocale.getLocale)("OKR_MyO_Thnothinghere")));
33
+ }, errorTip || (0, _getLocale.getLocale)("OKR_MyO_Thnothinghere")));
28
34
  }