@titaui/pc 1.5.78 → 1.5.82

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 (316) hide show
  1. package/lib/components/avatar/index.js +1 -9
  2. package/lib/components/change-okr/Filter.js +65 -133
  3. package/lib/components/change-okr/Item.js +0 -6
  4. package/lib/components/change-okr/filterTab.js +0 -2
  5. package/lib/components/change-okr/index.js +2 -2
  6. package/lib/components/checkbox/index.js +3 -4
  7. package/lib/components/communication/CommunicationRecord.js +161 -116
  8. package/lib/components/communication/ConvertUserName.js +1 -1
  9. package/lib/components/communication/index.js +28 -53
  10. package/lib/components/communication/style.js +25 -21
  11. package/lib/components/dropdown-layer/icon-item.js +3 -5
  12. package/lib/components/dropdown-layer/index.css +0 -16
  13. package/lib/components/dropdown-layer/index.js +14 -21
  14. package/lib/components/emotionsSelector/style.js +1 -1
  15. package/lib/components/form/form-fields/input/index.css +0 -11
  16. package/lib/components/form/form-fields/input/index.js +1 -3
  17. package/lib/components/grid-page/personal-info/index.js +4 -4
  18. package/lib/components/mblog/components/MblogAction.js +6 -10
  19. package/lib/components/mblog/index.js +11 -24
  20. package/lib/components/mblog/style.js +8 -8
  21. package/lib/components/okr-detail/components/header/index.css +0 -4
  22. package/lib/components/okr-detail/components/header/o-cycle.js +2 -2
  23. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +8 -15
  24. package/lib/components/okr-flow/child-node/work-node.js +1 -7
  25. package/lib/components/okr-period-selector/select-cycle.js +151 -139
  26. package/lib/components/okr-progress-detail/index.css +0 -1
  27. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +5 -5
  28. package/lib/components/okr-review/ReviewPop/index.js +4 -4
  29. package/lib/components/period-selector/common.js +4 -149
  30. package/lib/components/period-selector/components/selector/index.js +38 -103
  31. package/lib/components/period-selector/components/selector/style.js +9 -23
  32. package/lib/components/period-selector/index.js +28 -29
  33. package/lib/components/popup/index.js +1 -3
  34. package/lib/components/radio/index.css +0 -5
  35. package/lib/components/radio/radio.js +4 -12
  36. package/lib/components/table/index.css +1 -0
  37. package/lib/components/upload/components/uploadedPreview.js +54 -62
  38. package/lib/components/upload/index.js +57 -89
  39. package/lib/components/upload/style.js +7 -7
  40. package/lib/components/upload/type.js +15 -15
  41. package/lib/components/upvote/index.js +14 -37
  42. package/lib/components/user-selector/export-modules/field-tree-selector/index.css +0 -4
  43. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +24 -50
  44. package/lib/components/user-selector/export-modules/field-tree-selector/single-selector/index.js +2 -11
  45. package/lib/components/user-selector/layout/index.css +1 -1
  46. package/lib/index.js +5 -49
  47. package/lib/pages/home-page/components/data-list/nav-selector/index.js +0 -18
  48. package/lib/pages/home-page/components/data-list/table/utils-function.js +3 -6
  49. package/lib/utils/auth.js +5 -46
  50. package/lib/utils/bs-global.js +2 -26
  51. package/lib/utils/tools.js +20 -140
  52. package/package.json +2 -2
  53. package/lib/components/avatar/icon-avatar/index.css +0 -15
  54. package/lib/components/avatar/icon-avatar/index.js +0 -50
  55. package/lib/components/avatar/num-avatar/index.css +0 -12
  56. package/lib/components/avatar/num-avatar/index.js +0 -34
  57. package/lib/components/button/admin-button/default.js +0 -35
  58. package/lib/components/button/admin-button/drop-down-arrow.js +0 -93
  59. package/lib/components/button/admin-button/index.css +0 -86
  60. package/lib/components/button/admin-button/index.js +0 -40
  61. package/lib/components/button/admin-button/primary.js +0 -33
  62. package/lib/components/button/admin-button/secondary.js +0 -35
  63. package/lib/components/button/default-button/index.css +0 -49
  64. package/lib/components/button/default-button/index.js +0 -51
  65. package/lib/components/button/export-button/index.css +0 -51
  66. package/lib/components/button/export-button/index.js +0 -81
  67. package/lib/components/button/images/daoru.svg +0 -18
  68. package/lib/components/button/index.js +0 -23
  69. package/lib/components/button/interface.js +0 -5
  70. package/lib/components/communication/index.css +0 -63
  71. package/lib/components/create-okr/animation/check-animation.js +0 -2746
  72. package/lib/components/create-okr/constant.js +0 -27
  73. package/lib/components/create-okr/createCycle.js +0 -171
  74. package/lib/components/create-okr/createSuccessCmp.js +0 -233
  75. package/lib/components/create-okr/createSuccessCmpWrapper.js +0 -20
  76. package/lib/components/create-okr/fields/date-cycle.js +0 -98
  77. package/lib/components/create-okr/fields/index.css +0 -346
  78. package/lib/components/create-okr/fields/index.js +0 -17
  79. package/lib/components/create-okr/fields/input-with-err-popup.js +0 -57
  80. package/lib/components/create-okr/fields/o-new-name.js +0 -197
  81. package/lib/components/create-okr/fields/okr-case.js +0 -98
  82. package/lib/components/create-okr/fields/okr-classify.js +0 -51
  83. package/lib/components/create-okr/fields/okr-create-suggest.js +0 -147
  84. package/lib/components/create-okr/fields/okr-new-user-selector.js +0 -106
  85. package/lib/components/create-okr/fields/okr-parent.js +0 -157
  86. package/lib/components/create-okr/fields/okr-type-detail.js +0 -196
  87. package/lib/components/create-okr/fields/okr-type.js +0 -131
  88. package/lib/components/create-okr/fields/okr-visibility-detail.js +0 -224
  89. package/lib/components/create-okr/fields/okr-visibility.js +0 -169
  90. package/lib/components/create-okr/img/check-normal.svg +0 -29
  91. package/lib/components/create-okr/img/check-right.svg +0 -16
  92. package/lib/components/create-okr/img/check-wrong.svg +0 -29
  93. package/lib/components/create-okr/img/create-success-head.png +0 -0
  94. package/lib/components/create-okr/img/create-success-left-quotation.svg +0 -14
  95. package/lib/components/create-okr/img/create-success-message.svg +0 -1
  96. package/lib/components/create-okr/img/create-success-right-quotation.svg +0 -14
  97. package/lib/components/create-okr/img/create-success-shadow.svg +0 -23
  98. package/lib/components/create-okr/img/example.svg +0 -11
  99. package/lib/components/create-okr/img/hand.svg +0 -12
  100. package/lib/components/create-okr/img/kr-add.svg +0 -12
  101. package/lib/components/create-okr/img/left-quotation.svg +0 -12
  102. package/lib/components/create-okr/img/light.svg +0 -1
  103. package/lib/components/create-okr/img/pack-up.js +0 -28
  104. package/lib/components/create-okr/img/qr-code.png +0 -0
  105. package/lib/components/create-okr/img/right-quotation.svg +0 -12
  106. package/lib/components/create-okr/img/shower.png +0 -0
  107. package/lib/components/create-okr/img/target.svg +0 -19
  108. package/lib/components/create-okr/img/teach-okr.svg +0 -17
  109. package/lib/components/create-okr/img/wave.png +0 -0
  110. package/lib/components/create-okr/img/weight.svg +0 -12
  111. package/lib/components/create-okr/index.css +0 -446
  112. package/lib/components/create-okr/index.js +0 -911
  113. package/lib/components/create-okr/interface.js +0 -5
  114. package/lib/components/create-okr/kr-items/index.css +0 -180
  115. package/lib/components/create-okr/kr-items/kr-item-weight.js +0 -194
  116. package/lib/components/create-okr/kr-items/krDatas.js +0 -299
  117. package/lib/components/create-okr/kr-items/krItem.js +0 -167
  118. package/lib/components/create-okr/objectType.js +0 -273
  119. package/lib/components/create-okr/request-api.js +0 -220
  120. package/lib/components/create-okr/style.js +0 -100
  121. package/lib/components/create-okr/utils/getCreateOkrSurpassPercent.js +0 -124
  122. package/lib/components/create-okr/utils/helper.js +0 -99
  123. package/lib/components/create-okr/utils/index.js +0 -23
  124. package/lib/components/dynamic/components/condition-render/index.js +0 -20
  125. package/lib/components/dynamic/components/dangerous-html/index.js +0 -22
  126. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -78
  127. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -192
  128. package/lib/components/dynamic/components/obj-status/index.css +0 -22
  129. package/lib/components/dynamic/components/obj-status/index.js +0 -38
  130. package/lib/components/dynamic/components/percent/index.css +0 -21
  131. package/lib/components/dynamic/components/percent/index.js +0 -38
  132. package/lib/components/dynamic/components/title/index.css +0 -35
  133. package/lib/components/dynamic/components/title/index.js +0 -59
  134. package/lib/components/dynamic/constant.js +0 -96
  135. package/lib/components/dynamic/context/index.js +0 -13
  136. package/lib/components/dynamic/dynamic-item/components/header/index.css +0 -101
  137. package/lib/components/dynamic/dynamic-item/components/header/index.js +0 -294
  138. package/lib/components/dynamic/dynamic-item/components/icon/index.css +0 -10
  139. package/lib/components/dynamic/dynamic-item/components/icon/index.js +0 -35
  140. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +0 -22
  141. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +0 -22
  142. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +0 -95
  143. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +0 -173
  144. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +0 -54
  145. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +0 -107
  146. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +0 -48
  147. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +0 -89
  148. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +0 -96
  149. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +0 -171
  150. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +0 -67
  151. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +0 -110
  152. package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +0 -16
  153. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
  154. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +0 -111
  155. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +0 -158
  156. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +0 -95
  157. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +0 -215
  158. package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +0 -16
  159. package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
  160. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +0 -91
  161. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +0 -125
  162. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +0 -22
  163. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +0 -95
  164. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +0 -192
  165. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +0 -138
  166. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +0 -183
  167. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +0 -153
  168. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +0 -138
  169. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +0 -97
  170. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +0 -207
  171. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +0 -54
  172. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +0 -107
  173. package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +0 -50
  174. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
  175. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
  176. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
  177. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
  178. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
  179. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
  180. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
  181. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +0 -111
  182. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +0 -164
  183. package/lib/components/dynamic/dynamic-item/index.css +0 -128
  184. package/lib/components/dynamic/dynamic-item/index.js +0 -352
  185. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  186. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  187. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  188. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  189. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -126
  190. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -157
  191. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -107
  192. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  193. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  194. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  195. package/lib/components/dynamic/dynamic-liking/index.js +0 -76
  196. package/lib/components/dynamic/dynamic-liking/item.js +0 -90
  197. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  198. package/lib/components/dynamic/dynamic-list/index.css +0 -36
  199. package/lib/components/dynamic/dynamic-list/index.js +0 -61
  200. package/lib/components/dynamic/dynamic-topping/image/quotationMark.svg +0 -16
  201. package/lib/components/dynamic/dynamic-topping/image/topIcon.svg +0 -30
  202. package/lib/components/dynamic/dynamic-topping/index.css +0 -130
  203. package/lib/components/dynamic/dynamic-topping/index.js +0 -78
  204. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  205. package/lib/components/dynamic/dynamic-topping/item.js +0 -138
  206. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  207. package/lib/components/dynamic/dynamic.css +0 -204
  208. package/lib/components/dynamic/dynamic.js +0 -391
  209. package/lib/components/dynamic/export-module/index.js +0 -33
  210. package/lib/components/dynamic/img/dynamic-P1.svg +0 -15
  211. package/lib/components/dynamic/img/dynamic-P2.svg +0 -15
  212. package/lib/components/dynamic/img/dynamic-P3.svg +0 -15
  213. package/lib/components/dynamic/img/dynamic-P4.svg +0 -15
  214. package/lib/components/dynamic/img/dynamic-P5.svg +0 -15
  215. package/lib/components/dynamic/img/dynamic-delay.svg +0 -17
  216. package/lib/components/dynamic/img/dynamic-desire.svg +0 -61
  217. package/lib/components/dynamic/img/dynamic-empty.png +0 -0
  218. package/lib/components/dynamic/img/dynamic-end.svg +0 -17
  219. package/lib/components/dynamic/img/dynamic-left-quoto.svg +0 -13
  220. package/lib/components/dynamic/img/dynamic-loading.gif +0 -0
  221. package/lib/components/dynamic/img/dynamic-normal.svg +0 -17
  222. package/lib/components/dynamic/img/dynamic-promise.svg +0 -61
  223. package/lib/components/dynamic/img/dynamic-reword.svg +0 -24
  224. package/lib/components/dynamic/img/dynamic-right-quoto.svg +0 -13
  225. package/lib/components/dynamic/img/dynamic-risk.svg +0 -17
  226. package/lib/components/dynamic/img/dynamic-submit-delay.svg +0 -16
  227. package/lib/components/dynamic/img/dynamic-submit-normal.svg +0 -18
  228. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  229. package/lib/components/dynamic/index.js +0 -27
  230. package/lib/components/dynamic/interface.js +0 -5
  231. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  232. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -37
  233. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  234. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -37
  235. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  236. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -37
  237. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  238. package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -42
  239. package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
  240. package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
  241. package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
  242. package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
  243. package/lib/components/dynamic/quick-operation/index.css +0 -51
  244. package/lib/components/dynamic/quick-operation/index.js +0 -112
  245. package/lib/components/dynamic/request-api.js +0 -92
  246. package/lib/components/dynamic/util.js +0 -140
  247. package/lib/components/file-list/components/single-file/index.css +0 -84
  248. package/lib/components/file-list/components/single-file/index.js +0 -115
  249. package/lib/components/file-list/img/new-file-list-doc.svg +0 -1
  250. package/lib/components/file-list/img/new-file-list-other.svg +0 -1
  251. package/lib/components/file-list/img/new-file-list-pdf.svg +0 -1
  252. package/lib/components/file-list/img/new-file-list-ppt.svg +0 -1
  253. package/lib/components/file-list/img/new-file-list-radio.svg +0 -1
  254. package/lib/components/file-list/img/new-file-list-video.svg +0 -1
  255. package/lib/components/file-list/img/new-file-list-xls.svg +0 -1
  256. package/lib/components/file-list/index.css +0 -5
  257. package/lib/components/file-list/index.js +0 -61
  258. package/lib/components/file-list/interface.js +0 -5
  259. package/lib/components/file-list/util.js +0 -78
  260. package/lib/components/img-viewer/icon/enlarge.js +0 -30
  261. package/lib/components/img-viewer/icon/left-rotate.js +0 -46
  262. package/lib/components/img-viewer/icon/right-rotate.js +0 -44
  263. package/lib/components/img-viewer/icon/shrink.js +0 -37
  264. package/lib/components/img-viewer/image/loading.gif +0 -0
  265. package/lib/components/img-viewer/index.css +0 -155
  266. package/lib/components/img-viewer/index.js +0 -228
  267. package/lib/components/img-viewer/interface.js +0 -5
  268. package/lib/components/img-viewer/util.js +0 -16
  269. package/lib/components/publish-dynamic-modal/index.js +0 -13
  270. package/lib/components/publish-dynamic-modal/interface.js +0 -5
  271. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.css +0 -3
  272. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +0 -191
  273. package/lib/components/publish-dynamic-modal/requist-api.js +0 -48
  274. package/lib/components/search-key-handle/index.js +0 -39
  275. package/lib/components/upload/img/doc.svg +0 -1
  276. package/lib/components/upload/img/other.svg +0 -1
  277. package/lib/components/upload/img/pdf.svg +0 -1
  278. package/lib/components/upload/img/ppt.svg +0 -1
  279. package/lib/components/upload/img/radio.svg +0 -1
  280. package/lib/components/upload/img/video.svg +0 -1
  281. package/lib/components/upload/img/xls.svg +0 -1
  282. package/lib/components/upload/index.css +0 -26
  283. package/lib/components/upload/util.js +0 -102
  284. package/lib/components-v1/buttonv2/ButtonLinked.js +0 -35
  285. package/lib/components-v1/buttonv2/ButtonOutlined.js +0 -64
  286. package/lib/components-v1/buttonv2/ButtonRounded.js +0 -101
  287. package/lib/components-v1/buttonv2/DefaultButton.js +0 -86
  288. package/lib/components-v1/buttonv2/index.js +0 -37
  289. package/lib/components-v1/buttonv2/style/style.js +0 -53
  290. package/lib/components-v1/buttonv2/style/theme.css +0 -3
  291. package/lib/components-v1/confirm/index.js +0 -158
  292. package/lib/pages/dynamic/index.css +0 -5
  293. package/lib/pages/dynamic/index.js +0 -25
  294. package/lib/pages/like-ranking/column.js +0 -141
  295. package/lib/pages/like-ranking/filter-buttons/department.js +0 -44
  296. package/lib/pages/like-ranking/filter-buttons/group.js +0 -34
  297. package/lib/pages/like-ranking/filter-buttons/index.css +0 -19
  298. package/lib/pages/like-ranking/filter-buttons/index.js +0 -44
  299. package/lib/pages/like-ranking/filter-buttons/modular.js +0 -110
  300. package/lib/pages/like-ranking/filter-buttons/name.js +0 -73
  301. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +0 -27
  302. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +0 -38
  303. package/lib/pages/like-ranking/filter-buttons/timer.js +0 -56
  304. package/lib/pages/like-ranking/image/dynamic-empty.png +0 -0
  305. package/lib/pages/like-ranking/image/loading.gif +0 -0
  306. package/lib/pages/like-ranking/image/ranking-1.png +0 -0
  307. package/lib/pages/like-ranking/image/ranking-2.png +0 -0
  308. package/lib/pages/like-ranking/image/ranking-3.png +0 -0
  309. package/lib/pages/like-ranking/index.css +0 -185
  310. package/lib/pages/like-ranking/index.js +0 -252
  311. package/lib/pages/like-ranking/mock.js +0 -366
  312. package/lib/pages/like-ranking/request-api.js +0 -15
  313. package/lib/utils/format-time.js +0 -161
  314. package/lib/utils/helpers.js +0 -41
  315. package/lib/utils/roundWeight.js +0 -105
  316. package/yarn-error.log +0 -15894
@@ -1,100 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DeleteKr = exports.DateLine = exports.CreateCycleWrapper = exports.TimeSapn = exports.DropDownContent = exports.SelectBtn = exports.WeightInputWrpper = exports.WeightWrapper = exports.KrNameInput = exports.InputWrapper = exports.KrEditWrapper = exports.KrItemWrapper = exports.AddKrBtn = exports.BlueBar = exports.Space = exports.ItemWrapper = exports.CaseLink = exports.TitleLine = exports.Line = exports.Wrapper = void 0;
7
-
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
-
16
- var Wrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 449px;\n padding: 0 32px;\n overflow: auto;\n"])));
17
-
18
- exports.Wrapper = Wrapper;
19
-
20
- var Line = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])));
21
-
22
- exports.Line = Line;
23
- var TitleLine = (0, _styledComponents["default"])(Line)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 14px;\n font-weight: 500;\n text-align: left;\n color: #3f4755;\n padding: 15px 0 2px;\n line-height: 22px;\n"])));
24
- exports.TitleLine = TitleLine;
25
-
26
- var CaseLink = _styledComponents["default"].a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: #2879ff;\n font-weight: 400;\n font-size: 14px;\n margin-right: 34px;\n ::before {\n margin-right: 4px;\n }\n transition: color 0.5s;\n :hover {\n color: #5c8eff;\n }\n /* letter-spacing: 2px; */\n"])));
27
-
28
- exports.CaseLink = CaseLink;
29
-
30
- var ItemWrapper = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex-direction: column;\n align-items: flex-start;\n flex: 1;\n"])));
31
-
32
- exports.ItemWrapper = ItemWrapper;
33
-
34
- var Space = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 12px;\n"])));
35
-
36
- exports.Space = Space;
37
-
38
- var BlueBar = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 4px;\n height: 16px;\n border-radius: 2px;\n margin-right: 6px;\n background: linear-gradient(90deg, #4e90ff, #2879ff);\n"])));
39
-
40
- exports.BlueBar = BlueBar;
41
-
42
- var AddKrBtn = _styledComponents["default"].a(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-size: 14px;\n font-weight: 400;\n color: #2879ff;\n line-height: 22px;\n display: flex;\n align-items: center;\n ::before {\n margin-right: 6px;\n font-size: 12px;\n font-weight: 600;\n }\n"])));
43
-
44
- exports.AddKrBtn = AddKrBtn;
45
-
46
- var KrItemWrapper = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n"])));
47
-
48
- exports.KrItemWrapper = KrItemWrapper;
49
-
50
- var KrEditWrapper = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n height: 36px;\n background: #ffffff;\n border: 1px solid ", ";\n border-radius: 4px;\n ", "\n display: flex;\n align-items: center;\n flex: 1;\n padding: 0 10px;\n transition: border 0.2s ease 0.2s, box-shadow 0.2s ease 0.2s;\n > span {\n font-size: 13px;\n font-weight: 400;\n text-align: left;\n color: #6f7886;\n margin-left: 18px;\n }\n :hover {\n border: 1px solid #2879ff;\n }\n"])), function (p) {
51
- return p.active ? "#2879ff" : "#f0f2f5";
52
- }, function (p) {
53
- return p.active ? "box-shadow: 0px 0px 6px 0px rgba(40, 121, 255, 0.3) inset;" : "";
54
- });
55
-
56
- exports.KrEditWrapper = KrEditWrapper;
57
-
58
- var InputWrapper = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n height: 36px;\n background: #ffffff;\n border: 1px solid ", ";\n border-radius: 4px;\n ", "\n display: flex;\n align-items: center;\n flex: 1;\n padding: 0 10px;\n transition: border 0.2s ease 0.2s, box-shadow 0.2s ease 0.2s;\n :hover {\n border: 1px solid #2879ff;\n }\n > input {\n flex: 1;\n border: none;\n padding: 0;\n margin: 0;\n }\n"])), function (p) {
59
- return p.active ? "#2879ff" : "#f0f2f5";
60
- }, function (p) {
61
- return p.active ? "box-shadow: 0px 0px 6px 0px rgba(40, 121, 255, 0.3) inset;" : "";
62
- });
63
-
64
- exports.InputWrapper = InputWrapper;
65
-
66
- var KrNameInput = _styledComponents["default"].input(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n flex: 1;\n color: #3f4755;\n padding-left: 12px;\n border: none;\n ::-webkit-input-placeholder {\n color: #bfc7d5;\n }\n :-ms-input-placeholder {\n color: #bfc7d5;\n }\n :-moz-input-placeholder {\n color: #bfc7d5;\n }\n"])));
67
-
68
- exports.KrNameInput = KrNameInput;
69
-
70
- var WeightWrapper = _styledComponents["default"].div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-left: 18px;\n"])));
71
-
72
- exports.WeightWrapper = WeightWrapper;
73
-
74
- var WeightInputWrpper = _styledComponents["default"].div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n > span {\n color: transparent;\n }\n > input {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n border: none;\n padding: 0;\n margin: 0;\n }\n"])));
75
-
76
- exports.WeightInputWrpper = WeightInputWrpper;
77
-
78
- var SelectBtn = _styledComponents["default"].div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n height: 36px;\n width: 100%;\n border: 1px solid #e6eaef;\n border-radius: 3px;\n display: flex;\n padding: 0 12px;\n align-items: center;\n box-sizing: border-box;\n cursor: pointer;\n transition: border 0.2s ease;\n > .tu-icon-cross {\n color: #bfc7d5;\n margin: 0 20px;\n }\n :hover {\n border: 1px solid #2879ff;\n }\n > i {\n font-size: 12px;\n }\n > span {\n flex: 1;\n width: 0;\n text-align: left;\n text-overflow: ellipsis;\n white-space: nowrap;\n word-break: break-all;\n overflow: hidden;\n }\n"])));
79
-
80
- exports.SelectBtn = SelectBtn;
81
-
82
- var DropDownContent = _styledComponents["default"].div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n /* \u5468\u671F\u9009\u62E9\u7EC4\u4EF6 */\n display: flex;\n align-items: center;\n padding-right: 28px;\n margin-bottom: 10px;\n transition: 300ms;\n .has-underline {\n border-bottom: 1px solid rgb(227, 230, 234);\n justify-content: space-between;\n height: 17px;\n }\n"])));
83
-
84
- exports.DropDownContent = DropDownContent;
85
-
86
- var TimeSapn = _styledComponents["default"].span(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n > i {\n margin-left: 12px;\n color: #bfc7d5;\n }\n"])));
87
-
88
- exports.TimeSapn = TimeSapn;
89
-
90
- var CreateCycleWrapper = _styledComponents["default"].div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n padding: 15px 20px 20px;\n width: 262px;\n"])));
91
-
92
- exports.CreateCycleWrapper = CreateCycleWrapper;
93
-
94
- var DateLine = _styledComponents["default"].div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n padding: 12px 0;\n font-size: 12px;\n color: #89919f;\n line-height: 17px;\n text-align: left;\n span {\n color: #3f4755;\n }\n"])));
95
-
96
- exports.DateLine = DateLine;
97
-
98
- var DeleteKr = _styledComponents["default"].a(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n color: #000000;\n font-size: 14px;\n margin-left: 7px;\n margin-right: 8px;\n :hover {\n color: #f05e5e;\n }\n"])));
99
-
100
- exports.DeleteKr = DeleteKr;
@@ -1,124 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var getRandomNum = function getRandomNum(baseNum) {
9
- return Math.floor(Math.random() * baseNum);
10
- };
11
-
12
- var getKrNumberAndMeasurableScore = function getKrNumberAndMeasurableScore(krNum, krMeasurableNums) {
13
- if (krNum === 0) {
14
- return 0;
15
- }
16
-
17
- if (krNum === 1) {
18
- if (krMeasurableNums === 1) {
19
- return 25;
20
- }
21
-
22
- return 20;
23
- }
24
-
25
- if (krNum === 2) {
26
- if (krMeasurableNums === 1) {
27
- return 40;
28
- } else if (krMeasurableNums === 2) {
29
- return 50;
30
- }
31
-
32
- return 35;
33
- }
34
-
35
- if (krNum === 3) {
36
- if (krMeasurableNums === 1) {
37
- return 50;
38
- } else if (krMeasurableNums === 2) {
39
- return 60;
40
- } else if (krMeasurableNums === 3) {
41
- return 60;
42
- }
43
-
44
- return 45;
45
- }
46
-
47
- if (krNum === 4) {
48
- if (krMeasurableNums === 1) {
49
- return 50;
50
- } else if (krMeasurableNums === 2) {
51
- return 55;
52
- } else if (krMeasurableNums === 3) {
53
- return 60;
54
- } else if (krMeasurableNums === 4) {
55
- return 70;
56
- }
57
-
58
- return 45;
59
- }
60
-
61
- if (krNum === 5) {
62
- if (krMeasurableNums === 1) {
63
- return 50;
64
- } else if (krMeasurableNums === 2) {
65
- return 55;
66
- } else if (krMeasurableNums === 3) {
67
- return 60;
68
- } else if (krMeasurableNums === 4) {
69
- return 65;
70
- } else if (krMeasurableNums === 5) {
71
- return 70;
72
- }
73
-
74
- return 45;
75
- }
76
-
77
- if (krNum > 5) {
78
- if (krMeasurableNums === 0) {
79
- return 40;
80
- } else if (krMeasurableNums === 1) {
81
- return 45;
82
- } else if (krMeasurableNums === 2) {
83
- return 50;
84
- } else if (krMeasurableNums === 3) {
85
- return 55;
86
- }
87
-
88
- return 60;
89
- }
90
- }; // 参考 https://doc.weixin.qq.com/txdoc/excel?scode=AOEAFQeYAA0Nbxe0lHABkAGgaGACY&docid=e2_AJcATAaKACYmPDc9BjaSnWjBmFCGo&type=1&tab=BB08J2
91
-
92
-
93
- var _default = function _default(oNameLength, okrHasWtWords, krNum, krMeasurableNums, krAvarageLength) {
94
- var totalScore = 0;
95
-
96
- if (okrHasWtWords) {
97
- totalScore += 5;
98
- } // 计算目标名称长度
99
-
100
-
101
- if (oNameLength < 5) {
102
- totalScore += 2;
103
- } else if (oNameLength < 9) {
104
- totalScore += 15;
105
- } else if (oNameLength < 31) {
106
- totalScore += 20;
107
- } else {
108
- totalScore += 15;
109
- }
110
-
111
- totalScore += getKrNumberAndMeasurableScore(krNum, krMeasurableNums);
112
-
113
- if (krAvarageLength < 5) {
114
- return Number((totalScore * (getRandomNum(5) + 3) / 100).toFixed(1));
115
- } else if (krAvarageLength < 9) {
116
- return Number((totalScore * (getRandomNum(15) + 70) / 100).toFixed(1));
117
- } else if (krAvarageLength < 31) {
118
- return Number((totalScore * (getRandomNum(15) + 90) / 100).toFixed(1));
119
- } else {
120
- return Number((totalScore * (getRandomNum(10) + 80) / 100).toFixed(1));
121
- }
122
- };
123
-
124
- exports["default"] = _default;
@@ -1,99 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.taker = taker;
7
- exports.getApiUrl = getApiUrl;
8
-
9
- var _bsGlobal = require("../../../utils/bs-global");
10
-
11
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
12
-
13
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
14
-
15
- 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; }
16
-
17
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
18
-
19
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
20
-
21
- function taker(_x, _x2, _x3) {
22
- return _taker.apply(this, arguments);
23
- }
24
-
25
- function _taker() {
26
- _taker = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(url, method, body) {
27
- var header,
28
- settings,
29
- bodyStr,
30
- key,
31
- response,
32
- data,
33
- _args = arguments;
34
- return regeneratorRuntime.wrap(function _callee$(_context) {
35
- while (1) {
36
- switch (_context.prev = _context.next) {
37
- case 0:
38
- header = _args.length > 3 && _args[3] !== undefined ? _args[3] : {};
39
- settings = {};
40
-
41
- if (method) {
42
- settings.headers = _objectSpread(_objectSpread({}, {
43
- Accept: "application/json, application/xml, text/play, text/html, *.*",
44
- "Content-Type": "application/json; charset=utf-8"
45
- }), header);
46
- settings.method = method;
47
- }
48
-
49
- if (body) settings.body = JSON.stringify(body);
50
-
51
- if (settings.headers) {
52
- if (settings.headers["Content-Type"] == "application/x-www-form-urlencoded") {
53
- bodyStr = "";
54
-
55
- for (key in body) {
56
- bodyStr += "".concat(key, "=").concat(body[key], "&");
57
- }
58
-
59
- bodyStr.substring(0, bodyStr.length - 1);
60
- settings.body = bodyStr;
61
- }
62
- }
63
-
64
- settings.credentials = "same-origin";
65
- _context.prev = 6;
66
- _context.next = 9;
67
- return fetch(url, settings);
68
-
69
- case 9:
70
- response = _context.sent;
71
- _context.next = 12;
72
- return response.json();
73
-
74
- case 12:
75
- data = _context.sent;
76
- return _context.abrupt("return", data);
77
-
78
- case 16:
79
- _context.prev = 16;
80
- _context.t0 = _context["catch"](6);
81
- _context.next = 20;
82
- return Promise.reject(_context.t0);
83
-
84
- case 20:
85
- case "end":
86
- return _context.stop();
87
- }
88
- }
89
- }, _callee, null, [[6, 16]]);
90
- }));
91
- return _taker.apply(this, arguments);
92
- }
93
-
94
- function getApiUrl(url) {
95
- var uid = (0, _bsGlobal.getUserInfo)().Id;
96
- var tid = (0, _bsGlobal.getTenantInfo)().Id;
97
- var apiServer = (0, _bsGlobal.getBSGlobal)("apiPath");
98
- return apiServer + "/api/v1/" + tid + "/" + uid + "/" + url;
99
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.KrWeightValidator = KrWeightValidator;
7
-
8
- function KrWeightValidator(value) {
9
- // 首先得是数字
10
- var _value = Number(value); //
11
-
12
-
13
- if ("".concat(value).trim() == "") return false; // required
14
-
15
- if (isNaN(_value)) return false; // 不是数字
16
-
17
- if (!Number.isInteger(_value) && "".concat(_value).split(".")[1].length > 1) return false; // 小数点超出一位
18
-
19
- if (_value > 100) return false; // 允许输入超过 100 的数字
20
-
21
- if (_value < 0) return false;
22
- return true;
23
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var ConditionRender = function ConditionRender(_ref) {
9
- var condition = _ref.condition,
10
- children = _ref.children;
11
-
12
- if (!condition) {
13
- return null;
14
- }
15
-
16
- return children;
17
- };
18
-
19
- var _default = ConditionRender;
20
- exports["default"] = _default;
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var DangerousHtml = function DangerousHtml(_ref) {
13
- var htmlText = _ref.htmlText;
14
- return /*#__PURE__*/_react["default"].createElement("span", {
15
- dangerouslySetInnerHTML: {
16
- __html: htmlText
17
- }
18
- });
19
- };
20
-
21
- var _default = DangerousHtml;
22
- exports["default"] = _default;
@@ -1,78 +0,0 @@
1
- .titaui-dynamic-search-input {
2
- display: flex;
3
- align-items: center;
4
- width: 240px;
5
- height: 32px;
6
- background: #FFFFFF;
7
- border-radius: 16px;
8
- border: 1px solid #E9ECF0;
9
- padding: 5px 12px 5px 14px;
10
- box-sizing: border-box;
11
- }
12
-
13
- .titaui-dynamic-search-input__popup {
14
- width: 68px;
15
- height: 96px;
16
- background: #FFFFFF;
17
- box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
18
- border: 1px solid #F0F2F5;
19
- padding: 16px 0px 16px 0px;
20
- box-sizing: border-box;
21
- border-radius: 6px;
22
- user-select: none;
23
- }
24
-
25
- .titaui-dynamic-search-input__popup-item {
26
- display: flex;
27
- align-items: center;
28
- justify-content: center;
29
- height: 32px;
30
- font-size: 14px;
31
- color: #3F4755;
32
- line-height: 22px;
33
- cursor: pointer;
34
- }
35
-
36
- .titaui-dynamic-search-input__popup-item--active {
37
- color: #2879FF;
38
- }
39
-
40
- .titaui-dynamic-search-input__popup-item:hover {
41
- color: #2879FF;
42
- background: #f7f8fa;
43
- }
44
-
45
- .titaui-dynamic-search-input__icon {
46
- margin: 0 8px;
47
- }
48
-
49
- .titaui-dynamic-search-input__select-type {
50
- display: flex;
51
- align-items: center;
52
- cursor: pointer;
53
- }
54
-
55
- .titaui-dynamic-search-input__input {
56
- border: none;
57
- outline: none;
58
- width: 130px;
59
- margin-right: 4px;
60
- overflow: hidden;
61
- text-overflow: ellipsis;
62
- }
63
-
64
- .titaui-dynamic-search-input__input::placeholder {
65
- font-size: 14px;
66
- color: #BFC7D5;
67
- line-height: 22px;
68
- }
69
-
70
- .titaui-dynamic-search-input__input-clear {
71
- color: #BFC7D5;
72
- font-size: 14px;
73
- }
74
-
75
- .titaui-dynamic-search-input__input-clear:hover {
76
- cursor: pointer;
77
- color: #f05e5e;
78
- }
@@ -1,192 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
- var _popup = _interopRequireDefault(require("../../../popup"));
15
-
16
- var _userSelector = require("../../../user-selector");
17
-
18
- require("./index.css");
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
-
22
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
-
24
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- function _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; }
27
-
28
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
29
-
30
- 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."); }
31
-
32
- 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); }
33
-
34
- 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; }
35
-
36
- 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; }
37
-
38
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
-
40
- var prefix = "titaui-dynamic-search-input";
41
- var SearchType = {
42
- dynamic: "动态",
43
- person: "姓名"
44
- };
45
-
46
- var DynamicSearchInput = function DynamicSearchInput(_ref) {
47
- var setSearchKey = _ref.setSearchKey,
48
- setSearchKeyType = _ref.setSearchKeyType,
49
- setSearchUser = _ref.setSearchUser;
50
-
51
- var _useState = (0, _react.useState)("dynamic"),
52
- _useState2 = _slicedToArray(_useState, 2),
53
- searchDynamicType = _useState2[0],
54
- setSearchDynamicType = _useState2[1];
55
-
56
- var _useState3 = (0, _react.useState)(""),
57
- _useState4 = _slicedToArray(_useState3, 2),
58
- searchInputValue = _useState4[0],
59
- setSearchInputValue = _useState4[1];
60
-
61
- var _useState5 = (0, _react.useState)(false),
62
- _useState6 = _slicedToArray(_useState5, 2),
63
- isMouseEnter = _useState6[0],
64
- setIsMouseEnter = _useState6[1];
65
-
66
- var popupRef = (0, _react.useRef)();
67
- var selectorRef = (0, _react.useRef)();
68
- var inputRef = (0, _react.useRef)();
69
-
70
- var handleInputChange = function handleInputChange(e) {
71
- setSearchInputValue(e.target.value);
72
-
73
- if (searchDynamicType === "person") {
74
- // @ts-ignore
75
- selectorRef.current && selectorRef.current.open();
76
- }
77
- };
78
-
79
- var handleKeyUp = function handleKeyUp(e) {
80
- // 按回车
81
- if (e.keyCode === 13 && searchDynamicType !== 'person') {
82
- setSearchKey(searchInputValue);
83
- setSearchKeyType(searchDynamicType);
84
- }
85
- };
86
-
87
- var handleChangeSearchDynamicType = function handleChangeSearchDynamicType(type) {
88
- setSearchDynamicType(type);
89
- setSearchKeyType; // @ts-ignore
90
-
91
- popupRef.current && popupRef.current.close();
92
- };
93
-
94
- var handleSelected = function handleSelected(_ref2) {
95
- var _ref3 = _slicedToArray(_ref2, 1),
96
- user = _ref3[0];
97
-
98
- setSearchInputValue(user.data.name);
99
- setSearchUser(user.data);
100
- setSearchKeyType(searchDynamicType);
101
- };
102
-
103
- var handleMouseEnter = function handleMouseEnter() {
104
- setIsMouseEnter(true);
105
- };
106
-
107
- var handleMouseLeave = function handleMouseLeave() {
108
- setIsMouseEnter(false);
109
- };
110
-
111
- var handleClearSearchValue = function handleClearSearchValue() {
112
- setSearchInputValue('');
113
- setSearchKey('');
114
- setSearchUser(null);
115
- setSearchKeyType(searchDynamicType);
116
- };
117
-
118
- var PopupContent = function PopupContent() {
119
- return /*#__PURE__*/_react["default"].createElement("div", {
120
- className: prefix + "__popup"
121
- }, /*#__PURE__*/_react["default"].createElement("div", {
122
- className: (0, _classnames["default"])(prefix + "__popup-item", _defineProperty({}, prefix + "__popup-item--active", searchDynamicType === "dynamic")),
123
- onClick: function onClick() {
124
- handleChangeSearchDynamicType("dynamic");
125
- }
126
- }, "\u52A8\u6001"), /*#__PURE__*/_react["default"].createElement("div", {
127
- className: (0, _classnames["default"])(prefix + "__popup-item", _defineProperty({}, prefix + "__popup-item--active", searchDynamicType === "person")),
128
- onClick: function onClick() {
129
- handleChangeSearchDynamicType("person");
130
- }
131
- }, "\u59D3\u540D"));
132
- };
133
-
134
- return /*#__PURE__*/_react["default"].createElement("div", {
135
- className: prefix,
136
- ref: inputRef,
137
- onMouseEnter: handleMouseEnter,
138
- onMouseLeave: handleMouseLeave
139
- }, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
140
- popup: PopupContent,
141
- popupPlacement: "bottom",
142
- ref: popupRef,
143
- popupAlign: {
144
- offset: [-10, 2],
145
- overflow: {
146
- adjustX: true,
147
- adjustY: true
148
- },
149
- targetOffset: [0, 0]
150
- }
151
- }, /*#__PURE__*/_react["default"].createElement("span", {
152
- className: prefix + "__select-type"
153
- }, /*#__PURE__*/_react["default"].createElement("span", null, SearchType[searchDynamicType]), /*#__PURE__*/_react["default"].createElement("i", {
154
- className: (0, _classnames["default"])("tu-icon-sort-down", prefix + "__icon")
155
- }))), /*#__PURE__*/_react["default"].createElement("input", {
156
- className: prefix + "__input",
157
- value: searchInputValue,
158
- onChange: handleInputChange,
159
- onKeyUp: handleKeyUp,
160
- placeholder: searchDynamicType === 'dynamic' ? '按关键词搜索' : '按姓名搜索'
161
- }), isMouseEnter && searchInputValue && /*#__PURE__*/_react["default"].createElement("i", {
162
- onClick: handleClearSearchValue,
163
- className: (0, _classnames["default"])("tu-icon-circle", prefix + "__input-clear")
164
- }), /*#__PURE__*/_react["default"].createElement(_userSelector.FieldPersonSelector, {
165
- ref: selectorRef,
166
- multiple: false,
167
- position: "bottomRight",
168
- onSelect: handleSelected,
169
- disabledDepartSelect: true,
170
- showSearchInput: false,
171
- searchWord: searchInputValue,
172
- trigger: /*#__PURE__*/_react["default"].createElement("span", null),
173
- getPopupContainer: function getPopupContainer() {
174
- return inputRef.current;
175
- },
176
- panes: {
177
- depart: false,
178
- group: false
179
- },
180
- popupAlign: {
181
- offset: [17, 15],
182
- overflow: {
183
- adjustX: true,
184
- adjustY: true
185
- },
186
- targetOffset: [0, 0]
187
- }
188
- }));
189
- };
190
-
191
- var _default = DynamicSearchInput;
192
- exports["default"] = _default;