@titaui/pc 1.15.88 → 1.15.89-beta.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 (397) hide show
  1. package/lib/components/avatar/icon-avatar/index.js +1 -1
  2. package/lib/components/avatar/num-avatar/index.js +1 -1
  3. package/lib/components/book-demo/components/pc/components/content/index.js +1 -1
  4. package/lib/components/button/default-button/index.js +1 -1
  5. package/lib/components/button/icon-btn/index.js +1 -1
  6. package/lib/components/button/index.js +5 -4
  7. package/lib/components/cascader/index.js +1 -1
  8. package/lib/components/cascader/time.js +1 -1
  9. package/lib/components/change-okr-modal/Filter.js +72 -68
  10. package/lib/components/change-okr-modal/Item.js +2 -2
  11. package/lib/components/change-okr-modal/filterTab.js +2 -2
  12. package/lib/components/change-okr-modal/index.js +6 -4
  13. package/lib/components/common-share/publishMblog.js +4 -2
  14. package/lib/components/communication/CommunicationAttachments.js +2 -2
  15. package/lib/components/communication/ConvertUserName.js +2 -2
  16. package/lib/components/communication/index.js +2 -2
  17. package/lib/components/create-okr-modal/fields/okr-type-detail.js +4 -2
  18. package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +4 -2
  19. package/lib/components/create-okr-modal/index.js +4 -2
  20. package/lib/components/create-okr-modal/objectType.js +2 -2
  21. package/lib/components/create-okr-modal/request-api.js +16 -12
  22. package/lib/components/create-okr-modal/utils/helper.js +6 -2
  23. package/lib/components/date-picker/BodyItem.js +3 -3
  24. package/lib/components/date-picker/CalendarBody.js +3 -3
  25. package/lib/components/date-picker/CalendarHeader.js +3 -3
  26. package/lib/components/date-picker/index.js +2 -2
  27. package/lib/components/date-range-picker/index.js +2 -2
  28. package/lib/components/delete-confirm-pop/ConfirmPop.js +2 -2
  29. package/lib/components/dialog/index.js +1 -1
  30. package/lib/components/dialog-confirm/index.js +1 -1
  31. package/lib/components/dialog-qq-docs/index.js +11 -9
  32. package/lib/components/dialog-qq-docs/utils.js +6 -2
  33. package/lib/components/dialog-select/index.js +1 -1
  34. package/lib/components/dialog-upload/index.js +4 -2
  35. package/lib/components/dialog-upload-type/components/upload-type-item/index.js +1 -1
  36. package/lib/components/dialog-upload-type/index.js +1 -1
  37. package/lib/components/drawer/headerDrop.js +1 -1
  38. package/lib/components/drawer/index.js +1 -1
  39. package/lib/components/drawer-manager/drawerWrapper.js +5 -3
  40. package/lib/components/drawer-manager/index.js +1 -1
  41. package/lib/components/drop-selector/index.js +1 -1
  42. package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +4 -2
  43. package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +6 -4
  44. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
  45. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +1 -1
  46. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +1 -1
  47. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
  48. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +1 -1
  49. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +1 -1
  50. package/lib/components/dynamic/dynamic-item/dynamic-discovery/index.js +1 -1
  51. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +1 -1
  52. package/lib/components/dynamic/dynamic-item/dynamic-learning/index.js +1 -1
  53. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
  54. package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +1 -1
  55. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +1 -1
  56. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +1 -1
  57. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +1 -1
  58. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +1 -1
  59. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +1 -1
  60. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +1 -1
  61. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +1 -1
  62. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +1 -1
  63. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +1 -1
  64. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
  65. package/lib/components/dynamic/dynamic-item/index.js +1 -1
  66. package/lib/components/dynamic/dynamic-list/index.js +1 -1
  67. package/lib/components/eReport/eReportListEmpty.js +2 -2
  68. package/lib/components/eReport/eReportLists/reportList.js +2 -2
  69. package/lib/components/eReport/eReportShare/index.js +2 -2
  70. package/lib/components/eReport/eReportShare/toast/index.js +2 -2
  71. package/lib/components/edit-kr-wight/EditKrWightModal.js +30 -23
  72. package/lib/components/edit-kr-wight/FormItemV2.js +2 -2
  73. package/lib/components/emotions-selector/selector-content.js +2 -2
  74. package/lib/components/emotions-selector/selector-pop.js +2 -2
  75. package/lib/components/ereport-list/index.js +2 -2
  76. package/lib/components/error-boundary/index.js +2 -2
  77. package/lib/components/filter-buttons/department.js +1 -1
  78. package/lib/components/filter-buttons/index.js +1 -1
  79. package/lib/components/filter-buttons/name.js +1 -1
  80. package/lib/components/firework/index.js +6 -2
  81. package/lib/components/form/form-fields/date/index.js +1 -1
  82. package/lib/components/form/form-fields/dropdown/index.js +1 -1
  83. package/lib/components/form/form-fields/input/index.js +1 -1
  84. package/lib/components/form/form-fields/input-verification-code/index.js +4 -2
  85. package/lib/components/form/form-fields/user/index.js +1 -1
  86. package/lib/components/grid-layout/util/network.js +10 -6
  87. package/lib/components/guide-order/index.js +1 -1
  88. package/lib/components/guide-tip/index.js +1 -1
  89. package/lib/components/help-card/index.js +1 -1
  90. package/lib/components/import-modal/import-task-modal/index.js +1 -1
  91. package/lib/components/import-modal/tree/okr-tree/index.js +4 -2
  92. package/lib/components/import-modal/tree-node/index.js +1 -1
  93. package/lib/components/magnet/index.js +1 -1
  94. package/lib/components/mblog/components/ConfirmPop.js +2 -2
  95. package/lib/components/mblog/components/MblogAction.js +2 -2
  96. package/lib/components/mblog/components/MblogContent.js +2 -2
  97. package/lib/components/mblog/index.js +2 -2
  98. package/lib/components/menus/components/menu-tree/index.js +1 -1
  99. package/lib/components/menus/components/menu-tree/tree-node/index.js +1 -1
  100. package/lib/components/okr-detail/auth.js +2 -2
  101. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +4 -2
  102. package/lib/components/okr-detail/components/ao-nice/index.js +6 -4
  103. package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +2 -2
  104. package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +2 -2
  105. package/lib/components/okr-detail/components/base-okr-type/object-type.js +2 -2
  106. package/lib/components/okr-detail/components/header/edit-name.js +4 -2
  107. package/lib/components/okr-detail/components/header/o-avatar.js +4 -2
  108. package/lib/components/okr-detail/components/header/o-classify.js +4 -2
  109. package/lib/components/okr-detail/components/header/o-score.js +1 -1
  110. package/lib/components/okr-detail/components/icon-text/index.js +1 -1
  111. package/lib/components/okr-detail/components/o-classify.js +4 -2
  112. package/lib/components/okr-detail/components/o-progress-update/index.js +4 -2
  113. package/lib/components/okr-detail/components/okr-tree/index.js +1 -1
  114. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +4 -2
  115. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +5 -4
  116. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +6 -3
  117. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +6 -4
  118. package/lib/components/okr-detail/components/okr-tree/tree-node/index.js +1 -1
  119. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +4 -2
  120. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +2 -2
  121. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +3 -3
  122. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +4 -2
  123. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +8 -6
  124. package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +4 -2
  125. package/lib/components/okr-detail/detail-footer/index.js +4 -2
  126. package/lib/components/okr-detail/detail-header/index.js +12 -10
  127. package/lib/components/okr-detail/okr-list/index.js +4 -2
  128. package/lib/components/okr-detail/request-apis.js +6 -2
  129. package/lib/components/okr-excel/renders.js +8 -4
  130. package/lib/components/okr-excel-create/components/kr-confidence/index.css +18 -0
  131. package/lib/components/okr-excel-create/components/kr-confidence/index.js +61 -0
  132. package/lib/components/okr-excel-create/components/kr-weight/index.css +10 -0
  133. package/lib/components/okr-excel-create/components/kr-weight/index.js +114 -0
  134. package/lib/components/okr-excel-create/components/okr-align/index.css +49 -0
  135. package/lib/components/okr-excel-create/components/okr-align/index.js +139 -0
  136. package/lib/components/okr-excel-create/components/okr-classify/index.css +74 -0
  137. package/lib/components/okr-excel-create/components/okr-classify/index.js +117 -0
  138. package/lib/components/okr-excel-create/components/okr-cycle/index.css +40 -0
  139. package/lib/components/okr-excel-create/components/okr-cycle/index.js +85 -0
  140. package/lib/components/okr-excel-create/components/okr-name/index.css +48 -0
  141. package/lib/components/okr-excel-create/components/okr-name/index.js +116 -0
  142. package/lib/components/okr-excel-create/components/okr-principal/index.css +17 -0
  143. package/lib/components/okr-excel-create/components/okr-principal/index.js +107 -0
  144. package/lib/components/okr-excel-create/components/okr-progress/components/kr-progress/index.css +13 -0
  145. package/lib/components/okr-excel-create/components/okr-progress/components/kr-progress/index.js +46 -0
  146. package/lib/components/okr-excel-create/components/okr-progress/components/o-progress/index.css +13 -0
  147. package/lib/components/okr-excel-create/components/okr-progress/components/o-progress/index.js +47 -0
  148. package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/index.css +196 -0
  149. package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/index.js +319 -0
  150. package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/request-api.js +20 -0
  151. package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/util.js +134 -0
  152. package/lib/components/okr-excel-create/components/okr-progress/index.css +25 -0
  153. package/lib/components/okr-excel-create/components/okr-progress/index.js +90 -0
  154. package/lib/components/okr-excel-create/components/okr-progress/interface.js +5 -0
  155. package/lib/components/okr-excel-create/components/okr-type/base-okr-type/confirm/buttonv2.js +108 -0
  156. package/lib/components/okr-excel-create/components/okr-type/base-okr-type/confirm/confirm.js +166 -0
  157. package/lib/components/okr-excel-create/components/okr-type/base-okr-type/index.css +20 -0
  158. package/lib/components/okr-excel-create/components/okr-type/base-okr-type/index.js +76 -0
  159. package/lib/components/okr-excel-create/components/okr-type/base-okr-type/object-type.js +275 -0
  160. package/lib/components/okr-excel-create/components/okr-type/index.css +30 -0
  161. package/lib/components/okr-excel-create/components/okr-type/index.js +196 -0
  162. package/lib/components/okr-excel-create/components/okr-visibility/index.css +53 -0
  163. package/lib/components/okr-excel-create/components/okr-visibility/index.js +236 -0
  164. package/lib/components/okr-excel-create/components-new/kr-confidence/index.css +18 -0
  165. package/lib/components/okr-excel-create/components-new/kr-confidence/index.js +71 -0
  166. package/lib/components/okr-excel-create/components-new/kr-weight/index.css +10 -0
  167. package/lib/components/okr-excel-create/components-new/kr-weight/index.js +123 -0
  168. package/lib/components/okr-excel-create/components-new/okr-align/index.css +49 -0
  169. package/lib/components/okr-excel-create/components-new/okr-align/index.js +139 -0
  170. package/lib/components/okr-excel-create/components-new/okr-classify/index.css +74 -0
  171. package/lib/components/okr-excel-create/components-new/okr-classify/index.js +125 -0
  172. package/lib/components/okr-excel-create/components-new/okr-cycle/index.css +40 -0
  173. package/lib/components/okr-excel-create/components-new/okr-cycle/index.js +99 -0
  174. package/lib/components/okr-excel-create/components-new/okr-name/index.css +48 -0
  175. package/lib/components/okr-excel-create/components-new/okr-name/index.js +133 -0
  176. package/lib/components/okr-excel-create/components-new/okr-principal/index.css +17 -0
  177. package/lib/components/okr-excel-create/components-new/okr-principal/index.js +116 -0
  178. package/lib/components/okr-excel-create/components-new/okr-progress/components/kr-progress/index.css +13 -0
  179. package/lib/components/okr-excel-create/components-new/okr-progress/components/kr-progress/index.js +46 -0
  180. package/lib/components/okr-excel-create/components-new/okr-progress/components/o-progress/index.css +13 -0
  181. package/lib/components/okr-excel-create/components-new/okr-progress/components/o-progress/index.js +47 -0
  182. package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/index.css +196 -0
  183. package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/index.js +319 -0
  184. package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/request-api.js +20 -0
  185. package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/util.js +134 -0
  186. package/lib/components/okr-excel-create/components-new/okr-progress/index.css +25 -0
  187. package/lib/components/okr-excel-create/components-new/okr-progress/index.js +90 -0
  188. package/lib/components/okr-excel-create/components-new/okr-progress/interface.js +5 -0
  189. package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/confirm/buttonv2.js +108 -0
  190. package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/confirm/confirm.js +166 -0
  191. package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/index.css +20 -0
  192. package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/index.js +76 -0
  193. package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/object-type.js +275 -0
  194. package/lib/components/okr-excel-create/components-new/okr-type/index.css +30 -0
  195. package/lib/components/okr-excel-create/components-new/okr-type/index.js +205 -0
  196. package/lib/components/okr-excel-create/components-new/okr-visibility/index.css +53 -0
  197. package/lib/components/okr-excel-create/components-new/okr-visibility/index.js +248 -0
  198. package/lib/components/okr-excel-create/constant.js +14 -0
  199. package/lib/components/okr-excel-create/hooks.js +314 -0
  200. package/lib/components/okr-excel-create/img/base-info-add.svg +19 -0
  201. package/lib/components/okr-excel-create/img/desire.svg +61 -0
  202. package/lib/components/okr-excel-create/img/promise.svg +61 -0
  203. package/lib/components/okr-excel-create/index-old.js +258 -0
  204. package/lib/components/okr-excel-create/index.css +69 -0
  205. package/lib/components/okr-excel-create/index.js +221 -0
  206. package/lib/components/okr-excel-create/setting.js +21 -0
  207. package/lib/components/okr-excel-create/type.js +5 -0
  208. package/lib/components/okr-excel-create/utils.js +179 -0
  209. package/lib/components/okr-flow/child-node/fields/creator.js +4 -2
  210. package/lib/components/okr-flow/child-node/work-node.js +4 -2
  211. package/lib/components/okr-flow/export-modal/index.js +6 -43
  212. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +10 -8
  213. package/lib/components/okr-flow/request-apis.js +6 -2
  214. package/lib/components/okr-flow/root-node/index.js +4 -2
  215. package/lib/components/okr-progress/components/o-progress-update/index.js +4 -2
  216. package/lib/components/okr-progress-modal/index.js +4 -2
  217. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +16 -10
  218. package/lib/components/okr-review/ReviewPop/components/Toast/index.js +2 -2
  219. package/lib/components/okr-review/ReviewPop/index.js +2 -2
  220. package/lib/components/okr-review/components/ReviewItem/index.js +2 -2
  221. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +2 -2
  222. package/lib/components/okr-review/index.js +2 -2
  223. package/lib/components/okr-share/common-painter/darwAvatar.js +8 -4
  224. package/lib/components/okr-share/common-painter/openDataPainter.js +6 -2
  225. package/lib/components/okr-share/common-painter/utils.js +8 -4
  226. package/lib/components/okr-share/pink-card/drawDepartmentName.js +6 -2
  227. package/lib/components/okr-share/pink-card/drawKrs.js +6 -2
  228. package/lib/components/okr-share/pink-card/drawQuote.js +6 -2
  229. package/lib/components/okr-share/pink-card/drawUserName.js +6 -2
  230. package/lib/components/okr-share/pink-card/index.js +6 -2
  231. package/lib/components/okr-share/publishMblog.js +4 -2
  232. package/lib/components/okr-share/shareCardSelector.js +6 -4
  233. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
  234. package/lib/components/okrcase-library/server/network.js +24 -20
  235. package/lib/components/open-data-painter/index.js +6 -2
  236. package/lib/components/operation-records/OperationRecordItem.js +9 -5
  237. package/lib/components/operation-records/index.js +2 -2
  238. package/lib/components/pagination/pagination.js +1 -1
  239. package/lib/components/period-selector/components/button/index.js +1 -1
  240. package/lib/components/period-selector/helper/index.js +6 -2
  241. package/lib/components/picker/components/panels/date-panel/index.js +1 -1
  242. package/lib/components/picker/components/panels/month-panel/index.js +1 -1
  243. package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
  244. package/lib/components/picker/components/panels/week-panel/index.js +1 -1
  245. package/lib/components/picker/components/panels/year-panel/index.js +1 -1
  246. package/lib/components/picker/components/panels/year-panel/year-head.js +1 -1
  247. package/lib/components/picker/picker.js +1 -1
  248. package/lib/components/picker/range-picker/index.js +1 -1
  249. package/lib/components/point-demo/drop-down-box/index.js +1 -1
  250. package/lib/components/point-demo/input/index.js +3 -3
  251. package/lib/components/point-demo/popup/index.js +1 -1
  252. package/lib/components/popup/index.js +1 -1
  253. package/lib/components/popup-select/index.css +10 -0
  254. package/lib/components/popup-select/index.js +9 -3
  255. package/lib/components/praise-record/PraiseRecordItem.js +2 -2
  256. package/lib/components/praise-record/index.js +2 -2
  257. package/lib/components/range-picker-pop/index.js +3 -3
  258. package/lib/components/range-selector-pop/RangeList.js +2 -2
  259. package/lib/components/range-selector-pop/RangeSelectorPop.js +2 -2
  260. package/lib/components/rate/index.js +1 -1
  261. package/lib/components/rich-editor/models/schema.js +2 -2
  262. package/lib/components/rich-editor/plugins/block/block-quote/index.js +2 -2
  263. package/lib/components/rich-editor/plugins/block/heading/index.js +2 -2
  264. package/lib/components/rich-editor/plugins/block/lists/index.js +2 -2
  265. package/lib/components/rich-editor/plugins/block/paragraph/index.js +2 -2
  266. package/lib/components/rich-editor/plugins/core/index.js +2 -2
  267. package/lib/components/rich-editor/plugins/extension/alignment/index.js +2 -2
  268. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +2 -2
  269. package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
  270. package/lib/components/rich-editor/plugins/inline/color/index.js +2 -2
  271. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +2 -2
  272. package/lib/components/rich-editor/plugins/inline/em/index.js +2 -2
  273. package/lib/components/rich-editor/plugins/inline/link/index.js +2 -2
  274. package/lib/components/rich-editor/plugins/inline/strong/index.js +2 -2
  275. package/lib/components/rich-editor/plugins/inline/under-line/index.js +2 -2
  276. package/lib/components/rich-editor/react/reactNodeView.js +4 -4
  277. package/lib/components/rich-editor/react/uiProvider.js +2 -2
  278. package/lib/components/rich-editor/ui/Popup/index.js +2 -2
  279. package/lib/components/scroll-container/index.js +2 -2
  280. package/lib/components/scrollbar/index.js +1 -1
  281. package/lib/components/scrollbar/scroll-mask/index.js +1 -1
  282. package/lib/components/scrollbar/simplebar-react.js +1 -1
  283. package/lib/components/search-dropdown/index.js +1 -1
  284. package/lib/components/select/Option.js +3 -3
  285. package/lib/components/select/index.js +3 -3
  286. package/lib/components/select-layer/index.js +1 -1
  287. package/lib/components/select-tags/index.js +1 -1
  288. package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +6 -2
  289. package/lib/components/superset-charts/fetch-assets-and-append/index.js +8 -4
  290. package/lib/components/survey-model/request-api.js +6 -2
  291. package/lib/components/switch/index.js +1 -1
  292. package/lib/components/table/index.js +1 -1
  293. package/lib/components/table-excel-v2/index.css +55 -0
  294. package/lib/components/table-excel-v2/index.js +472 -0
  295. package/lib/components/table-excel-v2/utils.js +20 -0
  296. package/lib/components/tabs/index.js +1 -1
  297. package/lib/components/tag/index.js +1 -1
  298. package/lib/components/task-relation-modal/index.js +7 -5
  299. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +1 -1
  300. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +1 -1
  301. package/lib/components/task-relation-modal/tree/category-tree/index.js +4 -2
  302. package/lib/components/task-relation-modal/tree/okr-tree/index.js +4 -2
  303. package/lib/components/task-relation-modal/tree/work-tree/index.js +4 -2
  304. package/lib/components/task-relation-modal/tree-node/index.js +1 -1
  305. package/lib/components/task-relation-modal/work-relation/index.js +7 -5
  306. package/lib/components/task-tree/task-item-node/e-project.js +4 -2
  307. package/lib/components/task-tree/task-item-node/e-task.js +4 -2
  308. package/lib/components/task-tree/task-item-node/task-node-render.js +1 -1
  309. package/lib/components/task-tree/task-tree.js +1 -1
  310. package/lib/components/textarea/index.js +1 -1
  311. package/lib/components/time-picker/time-picker-selector.js +1 -1
  312. package/lib/components/time-picker/time-picker.js +1 -1
  313. package/lib/components/time-picker/timer-picker-input.js +1 -1
  314. package/lib/components/tita-chart/charts/liquid-ball.js +1 -1
  315. package/lib/components/tita-chart/charts/pie.js +1 -1
  316. package/lib/components/tita-chart/errorBoundary/index.js +2 -2
  317. package/lib/components/toast/index.js +12 -8
  318. package/lib/components/tooltip/error-tip.js +1 -1
  319. package/lib/components/tooltip/tooltip.js +1 -1
  320. package/lib/components/tree/index.js +1 -1
  321. package/lib/components/upload/components/uploadedPreview.js +2 -2
  322. package/lib/components/upload/index.js +6 -4
  323. package/lib/components/upload/index2.js +4 -2
  324. package/lib/components/upvote/index.js +7 -5
  325. package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.js +1 -1
  326. package/lib/components/user-selector/select-tree/choose-tree/index.js +1 -1
  327. package/lib/components/user-selector/select-tree/selected-tree/index.js +1 -1
  328. package/lib/components/version-change-modal/index.js +6 -4
  329. package/lib/components/version-change-modal/request-api.js +6 -2
  330. package/lib/components/viewer/ImageListRender.js +2 -2
  331. package/lib/components/viewer/index.js +2 -2
  332. package/lib/components/weekly-report/card.js +4 -12
  333. package/lib/components/weekly-report/common-painter/darwAvatar.js +10 -6
  334. package/lib/components/weekly-report/common-painter/drawName.js +6 -2
  335. package/lib/components/weekly-report/common-painter/openDataPainter.js +6 -2
  336. package/lib/components/weekly-report/index.js +6 -4
  337. package/lib/components-v1/animate/AnimateChild.js +2 -2
  338. package/lib/components-v1/animate/animate.js +2 -2
  339. package/lib/components-v1/avatar/index.js +2 -2
  340. package/lib/components-v1/buttonv2/ButtonOutlined.js +2 -2
  341. package/lib/components-v1/buttonv2/ButtonRounded.js +2 -2
  342. package/lib/components-v1/buttonv2/DefaultButton.js +2 -2
  343. package/lib/components-v1/confirm/index.js +2 -2
  344. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +2 -2
  345. package/lib/components-v1/dropDownSelector/dropDownSelector.js +2 -2
  346. package/lib/components-v1/input/Input.js +3 -3
  347. package/lib/components-v1/input/InputNumber.js +2 -2
  348. package/lib/components-v1/placement/placement.js +2 -2
  349. package/lib/components-v1/placement/placementInner.js +2 -2
  350. package/lib/components-v1/pop/Pop.js +2 -2
  351. package/lib/components-v1/pop/PopInner.js +2 -2
  352. package/lib/components-v1/portals/Portals.js +2 -2
  353. package/lib/components-v1/progress/CircleProgress.js +2 -2
  354. package/lib/components-v1/progress/LineProgress.js +2 -2
  355. package/lib/components-v1/progress/index.js +2 -2
  356. package/lib/components-v1/radio/radio.js +2 -2
  357. package/lib/components-v1/radio/radioGroup.js +2 -2
  358. package/lib/components-v1/search/index.js +2 -2
  359. package/lib/components-v1/select/Option.js +3 -3
  360. package/lib/components-v1/select/index.js +3 -3
  361. package/lib/components-v1/tabs/index.js +2 -2
  362. package/lib/components-v1/textarea/index.js +2 -2
  363. package/lib/components-v1/transition/index.js +2 -2
  364. package/lib/components-v1/userSelector/UserSelectorPop.js +2 -2
  365. package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +2 -2
  366. package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +2 -2
  367. package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +2 -2
  368. package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +2 -2
  369. package/lib/components-v1/userSelector/components/MultiMode/index.js +2 -2
  370. package/lib/components-v1/userSelector/components/SearchBar.js +2 -2
  371. package/lib/components-v1/userSelector/components/SingleMode.js +2 -2
  372. package/lib/components-v1/userSelector/components/UserItem.js +2 -2
  373. package/lib/components-v1/userSelector/index.js +2 -2
  374. package/lib/index.js +8 -0
  375. package/lib/pages/appointment-demo/drop-down-box/index.js +1 -1
  376. package/lib/pages/appointment-demo/input/index.js +3 -3
  377. package/lib/pages/appointment-demo/popup/index.js +1 -1
  378. package/lib/pages/group-management/components/input-form/index.js +3 -3
  379. package/lib/pages/group-management/components/radio/index.js +1 -1
  380. package/lib/pages/group-management/groupInterface.js +6 -2
  381. package/lib/pages/group-management/page-view/importGroupStaff/index.js +1 -1
  382. package/lib/pages/group-management/tree/index.js +1 -1
  383. package/lib/pages/new-okr-list/header/index.js +62 -12
  384. package/lib/pages/new-okr-list/header/operate-record.js +7 -49
  385. package/lib/pages/new-okr-list/index.js +1 -0
  386. package/lib/pages/new-okr-list/request-api.js +18 -14
  387. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +5 -3
  388. package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +1 -1
  389. package/lib/pages/okr-map/request-apis.js +6 -2
  390. package/lib/pages/okr-map/share-dialog/index.js +1 -1
  391. package/lib/utils/array.js +26 -0
  392. package/lib/utils/auth.js +2 -2
  393. package/lib/utils/helpers.js +6 -2
  394. package/lib/utils/open-data.js +6 -4
  395. package/lib/utils/request-v1.js +6 -2
  396. package/lib/utils/request.js +6 -2
  397. package/package.json +1 -1
@@ -0,0 +1,61 @@
1
+ <svg width="18" height="20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
+ <defs>
3
+ <filter x="4.7%" y="-2%" width="90.6%" height="104%" filterUnits="objectBoundingBox" id="c">
4
+ <feOffset dy=".8" in="SourceAlpha" result="shadowOffsetInner1" />
5
+ <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1" />
6
+ <feColorMatrix values="0 0 0 0 1 0 0 0 0 0.962292402 0 0 0 0 0.761185213 0 0 0 1 0" in="shadowInnerInner1" />
7
+ </filter>
8
+ <filter x="6.7%" y="0%" width="86.6%" height="100%" filterUnits="objectBoundingBox" id="f">
9
+ <feOffset in="SourceAlpha" result="shadowOffsetInner1" />
10
+ <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1" />
11
+ <feColorMatrix values="0 0 0 0 1 0 0 0 0 0.952941176 0 0 0 0 0.701960784 0 0 0 1 0" in="shadowInnerInner1" />
12
+ </filter>
13
+ <filter x="6.7%" y="0%" width="86.6%" height="100%" filterUnits="objectBoundingBox" id="i">
14
+ <feOffset in="SourceAlpha" result="shadowOffsetInner1" />
15
+ <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1" />
16
+ <feColorMatrix values="0 0 0 0 1 0 0 0 0 0.952941176 0 0 0 0 0.701960784 0 0 0 1 0" in="shadowInnerInner1" />
17
+ </filter>
18
+ <filter x="-2.9%" y="-1.9%" width="109.6%" height="107.7%" filterUnits="objectBoundingBox" id="j">
19
+ <feOffset dy=".5" in="SourceAlpha" result="shadowOffsetOuter1" />
20
+ <feColorMatrix values="0 0 0 0 0.908231431 0 0 0 0 0.705834611 0 0 0 0 0.372153367 0 0 0 1 0" in="shadowOffsetOuter1" />
21
+ </filter>
22
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="a">
23
+ <stop stop-color="#F4CC55" offset="0%" />
24
+ <stop stop-color="#EC9400" offset="100%" />
25
+ </linearGradient>
26
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="98.509%" id="d">
27
+ <stop stop-color="#EAAD19" offset="0%" />
28
+ <stop stop-color="#EAB33D" offset="100%" />
29
+ </linearGradient>
30
+ <linearGradient x1="50%" y1="4.212%" x2="50%" y2="99.625%" id="g">
31
+ <stop stop-color="#F3C163" offset="0%" />
32
+ <stop stop-color="#F4CF7D" offset="99.968%" />
33
+ </linearGradient>
34
+ <path id="b" d="M10 0l8.66 5v10L10 20l-8.66-5V5z" />
35
+ <path id="e" d="M10 1.333l7.506 4.334v8.666L10 18.667l-7.506-4.334V5.667z" />
36
+ <path id="h" d="M10 2l6.928 4v8L10 18l-6.928-4V6z" />
37
+ <text id="k" font-family="PingFangSC-Medium, PingFang SC" font-size="9" font-weight="400" fill="#FFFBDC">
38
+ <tspan x="5.5" y="13">
39
+
40
+ </tspan>
41
+ </text>
42
+ </defs>
43
+ <g fill="none" fill-rule="evenodd">
44
+ <g transform="translate(-1)">
45
+ <use fill="url(#a)" xlink:href="#b" />
46
+ <use fill="#000" filter="url(#c)" xlink:href="#b" />
47
+ </g>
48
+ <g transform="translate(-1)">
49
+ <use fill="url(#d)" xlink:href="#e" />
50
+ <use fill="#000" filter="url(#f)" xlink:href="#e" />
51
+ </g>
52
+ <g transform="translate(-1)">
53
+ <use fill="url(#g)" xlink:href="#h" />
54
+ <use fill="#000" filter="url(#i)" xlink:href="#h" />
55
+ </g>
56
+ <g fill="#FFFBDC" transform="translate(-1)">
57
+ <use filter="url(#j)" xlink:href="#k" />
58
+ <use xlink:href="#k" />
59
+ </g>
60
+ </g>
61
+ </svg>
@@ -0,0 +1,258 @@
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 _tableExcel = _interopRequireDefault(require("../table-excel"));
13
+
14
+ var _hooks = require("./hooks");
15
+
16
+ var _hooks2 = require("../../utils/hooks");
17
+
18
+ var _popupSelect = _interopRequireDefault(require("../popup-select"));
19
+
20
+ var _utils = require("./utils");
21
+
22
+ var _krWeight = _interopRequireDefault(require("./components/kr-weight"));
23
+
24
+ var _okrAlign = _interopRequireDefault(require("./components/okr-align"));
25
+
26
+ var _okrCycle = _interopRequireDefault(require("./components/okr-cycle"));
27
+
28
+ var _okrPrincipal = _interopRequireDefault(require("./components/okr-principal"));
29
+
30
+ var _krConfidence = _interopRequireDefault(require("./components/kr-confidence"));
31
+
32
+ var _okrClassify = _interopRequireDefault(require("./components/okr-classify"));
33
+
34
+ var _okrType = _interopRequireDefault(require("./components/okr-type"));
35
+
36
+ var _okrVisibility = _interopRequireDefault(require("./components/okr-visibility"));
37
+
38
+ var _okrName = _interopRequireDefault(require("./components/okr-name"));
39
+
40
+ require("ag-grid-community/styles/ag-grid.css");
41
+
42
+ require("ag-grid-community/styles/ag-theme-material.css");
43
+
44
+ require("./index.css");
45
+
46
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
47
+
48
+ 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); }
49
+
50
+ 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; }
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
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
65
+
66
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
67
+
68
+ 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; }
69
+
70
+ var defaultColumnOption = {
71
+ resizable: true,
72
+ editable: false
73
+ };
74
+ var defaultSpanOption = {
75
+ rowSpan: function rowSpan(_ref) {
76
+ var _ref$data$rowSpan = _ref.data.rowSpan,
77
+ _rowSpan = _ref$data$rowSpan === void 0 ? 0 : _ref$data$rowSpan;
78
+
79
+ return _rowSpan;
80
+ },
81
+ cellClassRules: {
82
+ 'cell-span': 'data.rowSpan > 1'
83
+ }
84
+ };
85
+ var defaultColSpanOption = {
86
+ colSpan: function colSpan(_ref2) {
87
+ var _ref2$data$colSpan = _ref2.data.colSpan,
88
+ _colSpan = _ref2$data$colSpan === void 0 ? 0 : _ref2$data$colSpan;
89
+
90
+ return _colSpan;
91
+ },
92
+ cellClassRules: {
93
+ 'cell-span': 'data.colSpan > 1'
94
+ }
95
+ };
96
+ var dicData = (0, _hooks.dic)();
97
+ var preCls = 'tita-okr-excel-create';
98
+ var initDatas = [_utils.initData, _objectSpread(_objectSpread({}, JSON.parse(JSON.stringify(_utils.initData))), {}, {
99
+ workId: 1
100
+ }), _objectSpread(_objectSpread({}, JSON.parse(JSON.stringify(_utils.initData))), {}, {
101
+ workId: 2
102
+ })];
103
+
104
+ var OKRExcelCreate = function OKRExcelCreate() {
105
+ var data = (0, _react.useRef)(initDatas);
106
+
107
+ var _useState = (0, _react.useState)((0, _utils.formatDataToOKRExcelData)(data.current)),
108
+ _useState2 = _slicedToArray(_useState, 2),
109
+ excelData = _useState2[0],
110
+ setExcelData = _useState2[1];
111
+
112
+ var update = (0, _react.useCallback)(function (_ref3) {
113
+ var type = _ref3.type,
114
+ itemData = _ref3.itemData;
115
+
116
+ if (type === 'AddKR') {
117
+ var index = data.current.findIndex(function (item) {
118
+ return item.workId === itemData.workId;
119
+ });
120
+ var krs = data.current[index].Krs;
121
+ krs.splice(krs.length - 2, 0, _objectSpread(_objectSpread({}, JSON.parse(JSON.stringify(_utils.krItemData))), {}, {
122
+ mileStoneId: krs.length - 1
123
+ }));
124
+ }
125
+
126
+ setExcelData((0, _utils.formatDataToOKRExcelData)(JSON.parse(JSON.stringify(data.current))));
127
+ }, []);
128
+ var OkrColumnOptions = (0, _react.useMemo)(function () {
129
+ return [_objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
130
+ field: dicData['目标(O)'],
131
+ width: 400,
132
+ valueGetter: 'data.name',
133
+ pinned: 'left',
134
+ // autoHeight: true,
135
+ wrapText: true,
136
+ cellRenderer: (0, _okrName["default"])(update, true)
137
+ }), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
138
+ field: dicData['目标类型'],
139
+ valueGetter: 'data.okrType',
140
+ hide: false,
141
+ width: 100,
142
+ cellRenderer: (0, _okrType["default"])(update)
143
+ }), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
144
+ field: dicData['目标类别'],
145
+ valueGetter: 'data.okrClassify',
146
+ width: 120,
147
+ cellRenderer: (0, _okrClassify["default"])(update)
148
+ }), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
149
+ field: dicData['目标周期'],
150
+ valueGetter: 'data.cycle',
151
+ width: 120,
152
+ cellRenderer: (0, _okrCycle["default"])(update)
153
+ }), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
154
+ field: dicData['对齐目标'],
155
+ valueGetter: 'data.parentOKR.principalUser.name',
156
+ width: 100,
157
+ hide: false,
158
+ cellRenderer: (0, _okrAlign["default"])(update)
159
+ }), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
160
+ field: dicData['目标负责人'],
161
+ valueGetter: 'data.principalUser.name',
162
+ hide: false,
163
+ width: 100,
164
+ cellRenderer: (0, _okrPrincipal["default"])(update)
165
+ }), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultSpanOption), {}, {
166
+ field: dicData['可见范围'],
167
+ valueGetter: 'data.visibility',
168
+ width: 100,
169
+ hide: false,
170
+ cellRenderer: (0, _okrVisibility["default"])(update)
171
+ }), _objectSpread(_objectSpread(_objectSpread({}, defaultColumnOption), defaultColSpanOption), {}, {
172
+ field: dicData['关键成果(KR)'],
173
+ valueGetter: 'data.kr.name',
174
+ width: 400,
175
+ cellRenderer: (0, _okrName["default"])(update, false)
176
+ }), _objectSpread(_objectSpread({}, defaultColumnOption), {}, {
177
+ field: dicData['KR 负责人'],
178
+ valueGetter: 'data.kr.principalUser.name',
179
+ width: 100,
180
+ hide: false,
181
+ cellRenderer: (0, _okrPrincipal["default"])(update)
182
+ }), _objectSpread(_objectSpread({}, defaultColumnOption), {}, {
183
+ field: dicData['KR 权重'],
184
+ valueGetter: 'data.kr.weight',
185
+ width: 80,
186
+ hide: false,
187
+ cellRenderer: (0, _krWeight["default"])(update)
188
+ }), _objectSpread(_objectSpread({}, defaultColumnOption), {}, {
189
+ field: dicData['信心指数'],
190
+ valueGetter: 'data.kr.weight',
191
+ width: 80,
192
+ hide: false,
193
+ cellRenderer: (0, _krConfidence["default"])(update)
194
+ })];
195
+ }, []);
196
+
197
+ var _useOkrColumns = (0, _hooks.useOkrColumns)(OkrColumnOptions),
198
+ columnDefs = _useOkrColumns.columnDefs,
199
+ onColumnMoved = _useOkrColumns.onColumnMoved,
200
+ onColumnResized = _useOkrColumns.onColumnResized,
201
+ columnCtlData = _useOkrColumns.columnCtlData,
202
+ onColumnsHideOrShow = _useOkrColumns.onColumnsHideOrShow;
203
+
204
+ var getRowId = (0, _react.useMemo)(function () {
205
+ return function (params) {
206
+ var _params$data, _params$data$kr;
207
+
208
+ return (_params$data = params.data) === null || _params$data === void 0 ? void 0 : (_params$data$kr = _params$data.kr) === null || _params$data$kr === void 0 ? void 0 : _params$data$kr.mileStoneId;
209
+ };
210
+ }, []);
211
+ var onColumnMovedHandler = (0, _react.useCallback)(function (event) {
212
+ var moveField = event.column.colId;
213
+ var toIndex = event.toIndex;
214
+ onColumnMoved(moveField, toIndex);
215
+ }, [onColumnMoved]);
216
+ var onColumnResizedHandler = (0, _hooks2.useDebounceFn)(function (event) {
217
+ var _event$column = event.column,
218
+ actualWidth = _event$column.actualWidth,
219
+ colId = _event$column.colId;
220
+ onColumnResized(colId, actualWidth);
221
+ }, {
222
+ wait: 200
223
+ });
224
+ return /*#__PURE__*/_react["default"].createElement("div", {
225
+ className: preCls
226
+ }, /*#__PURE__*/_react["default"].createElement(_popupSelect["default"], {
227
+ menuData: columnCtlData,
228
+ popupPlacement: "bottomLeft",
229
+ action: "click",
230
+ mode: "checkbox",
231
+ height: 292,
232
+ onChange: onColumnsHideOrShow,
233
+ autoClose: false
234
+ }, /*#__PURE__*/_react["default"].createElement("div", {
235
+ className: "".concat(preCls, "__column-ctl")
236
+ }, /*#__PURE__*/_react["default"].createElement("span", {
237
+ className: "tu-icon-APP-shezhi"
238
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
239
+ className: "ag-theme-material"
240
+ }, /*#__PURE__*/_react["default"].createElement("div", {
241
+ className: "ag-theme-alpine"
242
+ }, /*#__PURE__*/_react["default"].createElement(_tableExcel["default"], {
243
+ headerHeight: 40,
244
+ rowHeight: 38,
245
+ rowData: excelData,
246
+ columnDefs: columnDefs,
247
+ getRowId: getRowId,
248
+ onColumnMoved: onColumnMovedHandler,
249
+ onColumnResized: onColumnResizedHandler.run,
250
+ suppressRowTransform: true,
251
+ enableRangeSelection: true,
252
+ detailRowAutoHeight: true,
253
+ domLayout: "autoHeight"
254
+ }))));
255
+ };
256
+
257
+ var _default = OKRExcelCreate;
258
+ exports["default"] = _default;
@@ -0,0 +1,69 @@
1
+ .tita-okr-excel-create {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100vw;
6
+ height: 100vh;
7
+ background-color: #f0f4fa;
8
+ }
9
+
10
+ .tita-okr-excel-create__add-o {
11
+ box-sizing: border-box;
12
+ height: 40px;
13
+ padding: 0 12px;
14
+ display: flex;
15
+ align-items: center;
16
+ background-color: #fff;
17
+ font-size: 14px;
18
+ font-weight: 400;
19
+ color: #6F7886;
20
+ line-height: 22px;
21
+ cursor: pointer;
22
+ border-bottom: 1px solid #e2e2e2;
23
+ border-radius: 0 0 12px 12px;
24
+ }
25
+
26
+ .tita-okr-excel-create__add-o > * + * {
27
+ margin-left: 4px;
28
+ }
29
+
30
+ .tita-okr-excel-create__table-excel-v2 {
31
+ border-radius: 12px 12px 0 0;
32
+ }
33
+
34
+ .tita-okr-excel-create .cell-span {
35
+ background-color: #fff;
36
+ display: flex;
37
+ align-items: center;
38
+ border-bottom: var(--ag-borders-row) var(--ag-row-border-color);
39
+ border-right: var(--ag-borders-row) var(--ag-row-border-color) !important;
40
+ }
41
+
42
+ .tita-okr-excel-create .cell-span.ag-cell-focus:not(.ag-cell-range-selected):focus-within {
43
+ border-color: #2879ff !important;
44
+ }
45
+
46
+ .tita-okr-excel-create__column-ctl {
47
+ position: absolute;
48
+ background-color: #f0f4fa;
49
+ right: 4px;
50
+ top: 4px;
51
+ width: 32px;
52
+ height: 32px;
53
+ border-radius: 8px;
54
+ z-index: 3;
55
+ display: flex;
56
+ justify-content: center;
57
+ align-items: center;
58
+ font-size: 16px;
59
+ cursor: pointer;
60
+ transition: background-color 0.3s;
61
+ }
62
+
63
+ .tita-okr-excel-create__column-ctl span {
64
+ color: #939aa6;
65
+ }
66
+
67
+ .tita-okr-excel-create__column-ctl:hover {
68
+ background-color: #e2e7ec;
69
+ }
@@ -0,0 +1,221 @@
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 _hooks = require("./hooks");
13
+
14
+ var _utils = require("./utils");
15
+
16
+ var _krWeight = _interopRequireDefault(require("./components-new/kr-weight"));
17
+
18
+ var _okrAlign = _interopRequireDefault(require("./components-new/okr-align"));
19
+
20
+ var _okrCycle = _interopRequireDefault(require("./components-new/okr-cycle"));
21
+
22
+ var _okrPrincipal = _interopRequireDefault(require("./components-new/okr-principal"));
23
+
24
+ var _krConfidence = _interopRequireDefault(require("./components-new/kr-confidence"));
25
+
26
+ var _okrClassify = _interopRequireDefault(require("./components-new/okr-classify"));
27
+
28
+ var _okrType = _interopRequireDefault(require("./components-new/okr-type"));
29
+
30
+ var _okrVisibility = _interopRequireDefault(require("./components-new/okr-visibility"));
31
+
32
+ var _okrName = _interopRequireDefault(require("./components-new/okr-name"));
33
+
34
+ var _tableExcelV = _interopRequireDefault(require("../table-excel-v2"));
35
+
36
+ var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
37
+
38
+ require("ag-grid-community/styles/ag-grid.css");
39
+
40
+ require("ag-grid-community/styles/ag-theme-material.css");
41
+
42
+ require("./index.css");
43
+
44
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
45
+
46
+ 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); }
47
+
48
+ 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; }
49
+
50
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
51
+
52
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
53
+
54
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
55
+
56
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
57
+
58
+ 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."); }
59
+
60
+ 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); }
61
+
62
+ 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; }
63
+
64
+ 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; }
65
+
66
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
67
+
68
+ var dicData = (0, _hooks.dic)();
69
+ var preCls = 'tita-okr-excel-create';
70
+ var getIitDatas = [(0, _utils.getIitData)(), (0, _utils.getIitData)(), (0, _utils.getIitData)()];
71
+
72
+ var OKRExcelCreate = function OKRExcelCreate(_ref) {
73
+ var _ref$className = _ref.className,
74
+ className = _ref$className === void 0 ? '' : _ref$className,
75
+ _ref$tableClassName = _ref.tableClassName,
76
+ tableClassName = _ref$tableClassName === void 0 ? '' : _ref$tableClassName,
77
+ okrData = _ref.okrData,
78
+ onChange = _ref.onChange;
79
+ var data = (0, _react.useRef)(okrData && okrData.length ? okrData : getIitDatas);
80
+
81
+ var _useState = (0, _react.useState)((0, _utils.formatDataToOKRExcelTableData)(data.current)),
82
+ _useState2 = _slicedToArray(_useState, 2),
83
+ excelTableData = _useState2[0],
84
+ setExcelTableData = _useState2[1];
85
+
86
+ var update = (0, _react.useCallback)(function (_ref2) {
87
+ var type = _ref2.type,
88
+ rootIdx = _ref2.rootIdx,
89
+ itemData = _ref2.itemData;
90
+ console.log(type, rootIdx, (0, _cloneDeep["default"])(itemData));
91
+
92
+ if (type === 'AddKR') {
93
+ var krs = data.current[rootIdx].Krs;
94
+ krs.push(_objectSpread(_objectSpread({}, (0, _utils.getKrItemData)()), {}, {
95
+ mileStoneId: krs.length - 1
96
+ }));
97
+ }
98
+
99
+ if (type === 'update') {
100
+ data.current[rootIdx] = itemData;
101
+ }
102
+
103
+ var newData = (0, _utils.formatDataToOKRExcelTableData)(data.current);
104
+ if (onChange) onChange(newData.map(function (item) {
105
+ return _objectSpread(_objectSpread({}, item), {}, {
106
+ childs: null
107
+ });
108
+ }));
109
+ setExcelTableData(newData);
110
+ }, []);
111
+ var columnsOption = (0, _react.useMemo)(function () {
112
+ return [{
113
+ title: dicData['目标(O)'],
114
+ dataIndex: 'name',
115
+ key: 'name',
116
+ width: 400,
117
+ render: (0, _okrName["default"])(update, true)
118
+ }, {
119
+ title: dicData['目标类型'],
120
+ dataIndex: 'okrType',
121
+ key: 'okrType',
122
+ width: 100,
123
+ render: (0, _okrType["default"])(update)
124
+ }, {
125
+ title: dicData['目标类别'],
126
+ dataIndex: 'okrClassify',
127
+ key: 'okrClassify',
128
+ width: 120,
129
+ render: (0, _okrClassify["default"])(update)
130
+ }, {
131
+ title: dicData['目标周期'],
132
+ dataIndex: 'cycle',
133
+ key: 'cycle',
134
+ width: 120,
135
+ render: (0, _okrCycle["default"])(update)
136
+ }, {
137
+ title: dicData['对齐目标'],
138
+ dataIndex: 'parentOKR.principalUser.name',
139
+ key: 'parentOKR.principalUser.name',
140
+ width: 300,
141
+ render: (0, _okrAlign["default"])(update)
142
+ }, {
143
+ title: dicData['目标负责人'],
144
+ dataIndex: 'principalUser.name',
145
+ key: 'principalUser.name',
146
+ width: 100,
147
+ render: (0, _okrPrincipal["default"])(update, true)
148
+ }, {
149
+ title: dicData['可见范围'],
150
+ dataIndex: 'visibility',
151
+ key: 'visibility',
152
+ width: 100,
153
+ render: (0, _okrVisibility["default"])(update)
154
+ }, {
155
+ title: dicData['关键成果(KR)'],
156
+ dataIndex: 'name',
157
+ key: 'kr.name',
158
+ width: 400,
159
+ level: 2,
160
+ render: (0, _okrName["default"])(update, false)
161
+ }, {
162
+ title: dicData['KR 负责人'],
163
+ dataIndex: 'principalUser.name',
164
+ key: 'kr.principalUser.name',
165
+ width: 100,
166
+ level: 2,
167
+ render: (0, _okrPrincipal["default"])(update, false)
168
+ }, {
169
+ title: dicData['KR 权重'],
170
+ dataIndex: 'krWeight',
171
+ key: 'krWeight',
172
+ width: 80,
173
+ level: 2,
174
+ render: (0, _krWeight["default"])(update)
175
+ }, {
176
+ title: dicData['信心指数'],
177
+ dataIndex: 'confidenceIndex',
178
+ key: 'confidenceIndex',
179
+ width: 80,
180
+ level: 2,
181
+ render: (0, _krConfidence["default"])(update)
182
+ }];
183
+ }, []);
184
+
185
+ var onAddOHandler = function onAddOHandler() {
186
+ data.current.push((0, _utils.getIitData)());
187
+ setExcelTableData((0, _utils.formatDataToOKRExcelTableData)(data.current));
188
+ }; // {/* <PopupSelect
189
+ // menuData={columnCtlData}
190
+ // popupPlacement="bottomLeft"
191
+ // action="click"
192
+ // mode="checkbox"
193
+ // height={292}
194
+ // onChange={onColumnsHideOrShow}
195
+ // autoClose={false}
196
+ // >
197
+ // <div className={`${preCls}__column-ctl`}>
198
+ // <span className="tu-icon-APP-shezhi" />
199
+ // </div>
200
+ // </PopupSelect> */}
201
+
202
+
203
+ return /*#__PURE__*/_react["default"].createElement("div", {
204
+ className: "ag-theme-material ".concat(className)
205
+ }, /*#__PURE__*/_react["default"].createElement("div", {
206
+ className: "ag-theme-alpine"
207
+ }, /*#__PURE__*/_react["default"].createElement(_tableExcelV["default"], {
208
+ className: "".concat(preCls, "__table-excel-v2 ").concat(tableClassName),
209
+ rowKey: "title",
210
+ columns: columnsOption,
211
+ dataSource: excelTableData
212
+ }), /*#__PURE__*/_react["default"].createElement("div", {
213
+ onClick: onAddOHandler,
214
+ className: "".concat(preCls, "__add-o")
215
+ }, /*#__PURE__*/_react["default"].createElement("i", {
216
+ className: "tu-icon-add1"
217
+ }), /*#__PURE__*/_react["default"].createElement("p", null, "\u6DFB\u52A0\u76EE\u6807 O"))));
218
+ };
219
+
220
+ var _default = OKRExcelCreate;
221
+ exports["default"] = _default;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.showKrWeight = exports.showKrProgress = exports.showKrConfidence = exports.showKrClassify = void 0;
7
+
8
+ var _config = require("../okr-flow/utils/config");
9
+
10
+ var showKrConfidence = (0, _config.getBSGlobal)('OkrAdvancedSetting').KRSetting.ShowKrConfidence; // 信心指数开关
11
+
12
+ exports.showKrConfidence = showKrConfidence;
13
+ var showKrProgress = (0, _config.getBSGlobal)('OkrAdvancedSetting').KRSetting.ShowKrProgress; // KR进展开关
14
+
15
+ exports.showKrProgress = showKrProgress;
16
+ var showKrWeight = (0, _config.getBSGlobal)('OkrAdvancedSetting').KRSetting.KrWeight; // KR权重开关
17
+
18
+ exports.showKrWeight = showKrWeight;
19
+ var showKrClassify = (0, _config.getBSGlobal)('OkrAdvancedSetting').KRSetting.OkrClassify; // 类型
20
+
21
+ exports.showKrClassify = showKrClassify;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });