@titaui/pc 1.11.4-1 → 1.11.4-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/lib/components/date-picker/BodyItem.js +3 -3
  2. package/lib/components/date-picker/CalendarHeader.js +3 -3
  3. package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
  4. package/lib/components/dynamic/constant.js +31 -30
  5. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +21 -6
  6. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +4 -4
  7. package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +19 -7
  8. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
  9. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
  10. package/{es/pages/group-management/page-view/loading → lib/components/dynamic/dynamic-item/dynamic-interview-share}/index.js +33 -11
  11. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
  12. package/lib/components/dynamic/dynamic-item/index.js +41 -32
  13. package/lib/components/eReport/eReportLists/reportList.js +3 -3
  14. package/lib/components/emotions-selector/selector-pop.js +3 -3
  15. package/lib/components/ereport-list/index.js +3 -3
  16. package/lib/components/mblog/components/MblogAction.js +3 -3
  17. package/lib/components/menus/export-modules/interview-menus/constant.js +12 -12
  18. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
  19. package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
  20. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
  21. package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
  22. package/lib/components/rich-editor/models/schema.js +6 -6
  23. package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
  24. package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
  25. package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
  26. package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
  27. package/lib/components/rich-editor/plugins/core/index.js +4 -4
  28. package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
  29. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
  30. package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
  31. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
  32. package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
  33. package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
  34. package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
  35. package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
  36. package/lib/components/rich-editor/react/uiProvider.js +3 -3
  37. package/lib/components/rich-editor/ui/Popup/index.js +3 -3
  38. package/lib/components/select/Option.js +3 -3
  39. package/lib/components/task-tree/helper.js +61 -0
  40. package/lib/components/task-tree/images/P1.svg +15 -0
  41. package/lib/components/task-tree/images/P2.svg +15 -0
  42. package/lib/components/task-tree/images/P3.svg +15 -0
  43. package/lib/components/task-tree/images/P4.svg +15 -0
  44. package/lib/components/task-tree/images/P5.svg +15 -0
  45. package/lib/components/task-tree/images/arrow.svg +9 -0
  46. package/lib/components/task-tree/images/empty-131.png +0 -0
  47. package/lib/components/task-tree/images/followed.svg +33 -0
  48. package/lib/components/task-tree/images/nice.svg +108 -0
  49. package/lib/components/task-tree/images/struc12.png +0 -0
  50. package/lib/components/task-tree/images/struc2.png +0 -0
  51. package/lib/components/task-tree/images/xialat-s.svg +13 -0
  52. package/lib/components/task-tree/index.js +27 -0
  53. package/lib/components/task-tree/mock.js +944 -0
  54. package/{es/components/okr-detail/components/okr-tree → lib/components/task-tree}/precls.js +1 -1
  55. package/lib/components/task-tree/request-apis.js +88 -0
  56. package/lib/components/task-tree/task-item-node/constant.js +45 -0
  57. package/{es/components/okr-detail/components/okr-tree/tree-node/default-node.js → lib/components/task-tree/task-item-node/e-empty.js} +13 -6
  58. package/{es/components/okr-detail/components/okr-tree/tree-node/e-node → lib/components/task-tree/task-item-node}/e-project.js +29 -34
  59. package/{es/components/e-status-dropdown/index.js → lib/components/task-tree/task-item-node/e-status-dropdown.js} +3 -3
  60. package/{es/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js → lib/components/task-tree/task-item-node/e-task.js} +140 -121
  61. package/{es/components/okr-detail/components/okr-tree/tree-node → lib/components/task-tree/task-item-node}/get-process-color.js +3 -3
  62. package/lib/components/task-tree/task-item-node/index.css +290 -0
  63. package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
  64. package/lib/components/task-tree/task-tree.css +8 -0
  65. package/{es/components/okr-detail/components/okr-tree/index.js → lib/components/task-tree/task-tree.js} +17 -16
  66. package/lib/components/tita-chart/errorBoundary/index.js +3 -3
  67. package/lib/components-v1/animate/AnimateChild.js +3 -3
  68. package/lib/components-v1/avatar/index.js +3 -3
  69. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
  70. package/lib/components-v1/progress/CircleProgress.js +3 -3
  71. package/lib/components-v1/select/Option.js +3 -3
  72. package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
  73. package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
  74. package/lib/components-v1/userSelector/components/UserItem.js +3 -3
  75. package/lib/index.js +8 -0
  76. package/package.json +1 -1
  77. package/yarn-error.log +6356 -5424
  78. package/es/components/cascader/time.js +0 -31
  79. package/es/components/common-share/request-apis.js +0 -56
  80. package/es/components/confidence/heart.js +0 -66
  81. package/es/components/create-okr-modal/fields/index.js +0 -17
  82. package/es/components/create-okr-modal/utils/getCreateOkrSurpassPercent.js +0 -154
  83. package/es/components/date-picker/BodyItem.js +0 -121
  84. package/es/components/date-picker/CalendarBody.js +0 -157
  85. package/es/components/date-picker/CalendarHeader.js +0 -187
  86. package/es/components/date-picker/index.js +0 -157
  87. package/es/components/date-range-picker/index.js +0 -210
  88. package/es/components/dialog/index.js +0 -119
  89. package/es/components/dialog-confirm/index.js +0 -154
  90. package/es/components/drop-selector/icon-item.js +0 -40
  91. package/es/components/drop-selector/index.js +0 -179
  92. package/es/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  93. package/es/components/dynamic/dynamic-liking/mock.js +0 -83
  94. package/es/components/dynamic/dynamic-topping/request-api.js +0 -36
  95. package/es/components/e-priority/index.js +0 -88
  96. package/es/components/grid-layout/commen-components/index.js +0 -73
  97. package/es/components/grid-layout/image/could.js +0 -8
  98. package/es/components/grid-layout/image/lv.js +0 -8
  99. package/es/components/grid-layout/image/tita-mask.js +0 -8
  100. package/es/components/help-card/request-api.js +0 -35
  101. package/es/components/icon-button-list/index.js +0 -65
  102. package/es/components/menus/context.js +0 -18
  103. package/es/components/menus/precls.js +0 -8
  104. package/es/components/okr-detail/auth.js +0 -197
  105. package/es/components/okr-detail/components/ao-nice/index.js +0 -245
  106. package/es/components/okr-detail/components/block-line/index.js +0 -20
  107. package/es/components/okr-detail/components/header/index.js +0 -211
  108. package/es/components/okr-detail/components/icon-text/index.js +0 -116
  109. package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +0 -88
  110. package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-status-dropdown.js +0 -98
  111. package/es/components/okr-detail/components/okr-tree/tree-node/index.js +0 -90
  112. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/get-process-color.js +0 -46
  113. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +0 -421
  114. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/index.js +0 -54
  115. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +0 -62
  116. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +0 -94
  117. package/es/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +0 -273
  118. package/es/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +0 -207
  119. package/es/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +0 -236
  120. package/es/components/okr-detail/components/padding-layout.js +0 -22
  121. package/es/components/okr-detail/components/tab-panel-content/index.js +0 -27
  122. package/es/components/okr-detail/context.js +0 -30
  123. package/es/components/okr-detail/e-list/index.js +0 -243
  124. package/es/components/okr-detail/e-list/precls.js +0 -8
  125. package/es/components/okr-detail/e-list/search-form/fields/e-order.js +0 -172
  126. package/es/components/okr-detail/e-list/search-form/fields/e-status.js +0 -99
  127. package/es/components/okr-detail/e-list/search-form/fields/e-user.js +0 -49
  128. package/es/components/okr-detail/e-list/search-form/index.js +0 -143
  129. package/es/components/okr-detail/error-page/index.js +0 -33
  130. package/es/components/okr-detail/index.js +0 -428
  131. package/es/components/okr-detail/loading/index.js +0 -28
  132. package/es/components/okr-detail/okr-list/add-parent-okr.js +0 -37
  133. package/es/components/okr-detail/okr-list/create-kr-item/heart.js +0 -38
  134. package/es/components/okr-detail/okr-list/drag-order-kr.js +0 -62
  135. package/es/components/okr-detail/okr-list/empty/index.js +0 -48
  136. package/es/components/okr-detail/okr-list/index.js +0 -524
  137. package/es/components/okr-detail/okr-list/warp-parent-okr.js +0 -21
  138. package/es/components/okr-detail/store.js +0 -1
  139. package/es/components/okr-flow/child-node/fields/creator.js +0 -175
  140. package/es/components/okr-flow/child-node/fields/okrClassify.js +0 -31
  141. package/es/components/okr-flow/child-node/fields/okrType.js +0 -21
  142. package/es/components/okr-flow/child-node/helper.js +0 -35
  143. package/es/components/okr-flow/child-node/index.js +0 -110
  144. package/es/components/okr-flow/child-node/kr-node.js +0 -75
  145. package/es/components/okr-flow/child-node/work-node.js +0 -242
  146. package/es/components/okr-flow/context.js +0 -14
  147. package/es/components/okr-flow/empty/index.js +0 -29
  148. package/es/components/okr-flow/export-modules/okr-search-panel/index.js +0 -394
  149. package/es/components/okr-flow/index.js +0 -24
  150. package/es/components/okr-flow/mini-map/index.js +0 -112
  151. package/es/components/okr-flow/mini-map/map.js +0 -145
  152. package/es/components/okr-flow/mini-map/mini-node.js +0 -57
  153. package/es/components/okr-flow/mini-map/utils.js +0 -79
  154. package/es/components/okr-flow/okr-map/index.js +0 -192
  155. package/es/components/okr-flow/open-data/index.js +0 -115
  156. package/es/components/okr-flow/precls.js +0 -8
  157. package/es/components/okr-flow/request-apis.js +0 -118
  158. package/es/components/okr-flow/root-node/index.js +0 -229
  159. package/es/components/okr-flow/utils/config.js +0 -18
  160. package/es/components/okr-flow/utils/helper.js +0 -36
  161. package/es/components/okr-flow/utils/index.js +0 -66
  162. package/es/components/okr-flow/utils/tree-handler.js +0 -323
  163. package/es/components/okr-progress-modal/helper.js +0 -156
  164. package/es/components/okr-progress-modal/request-apis.js +0 -34
  165. package/es/components/okr-share/request-apis.js +0 -56
  166. package/es/components/okrcase-library/server/network.js +0 -407
  167. package/es/components/pagination/locale/en_US.js +0 -22
  168. package/es/components/pagination/locale/zh_CN.js +0 -22
  169. package/es/components/point-demo/drop-down-box/index.js +0 -159
  170. package/es/components/point-demo/index.js +0 -533
  171. package/es/components/point-demo/input/index.js +0 -176
  172. package/es/components/point-demo/point-demo.js +0 -75
  173. package/es/components/point-demo/popup/index.js +0 -113
  174. package/es/components/point-demo/popup/placement.js +0 -44
  175. package/es/components/range-picker-pop/index.js +0 -273
  176. package/es/components/scrollbar/simplebar/helpers.js +0 -59
  177. package/es/components/scrollbar/simplebar/index.js +0 -91
  178. package/es/components/scrollbar/simplebar/scrollbar-width.js +0 -47
  179. package/es/components/scrollbar/simplebar/simplebar.js +0 -852
  180. package/es/components/scrollbar/simplebar-react.js +0 -163
  181. package/es/components/search-dropdown/index.js +0 -40
  182. package/es/components/search-input/index.js +0 -126
  183. package/es/components/select/Option.js +0 -94
  184. package/es/components/select/index.js +0 -330
  185. package/es/components/selector-input/debounce.js +0 -36
  186. package/es/components/selector-input/index.js +0 -109
  187. package/es/components/slider-input/index.js +0 -119
  188. package/es/components/switch/index.js +0 -39
  189. package/es/components/table/index.js +0 -275
  190. package/es/components/tabs/index.js +0 -63
  191. package/es/components/task-relation-modal/tree-node/index.js +0 -58
  192. package/es/components/tita-chart/charts/img/could.js +0 -8
  193. package/es/components/tooltip/error-tip.js +0 -24
  194. package/es/components/tooltip/index.js +0 -21
  195. package/es/components/tree/index.js +0 -79
  196. package/es/components/tree/precls.js +0 -8
  197. package/es/components/upvote/request-apis.js +0 -45
  198. package/es/components/user-selector/action-btns/btn-cancel.js +0 -21
  199. package/es/components/user-selector/action-btns/btn-ok.js +0 -21
  200. package/es/components/user-selector/action-btns/index.js +0 -27
  201. package/es/components/user-selector/context.js +0 -18
  202. package/es/components/user-selector/empty/group.js +0 -55
  203. package/es/components/user-selector/empty/index.js +0 -28
  204. package/es/components/user-selector/export-modules/depart-search-selector/result-part.js +0 -41
  205. package/es/components/user-selector/export-modules/group-selector/index.js +0 -170
  206. package/es/components/user-selector/export-modules/group-selector/searched-panel.js +0 -68
  207. package/es/components/user-selector/export-modules/multiple-user-selector--bak/index.js +0 -246
  208. package/es/components/user-selector/index.js +0 -25
  209. package/es/components/user-selector/layout/index.js +0 -25
  210. package/es/components/user-selector/loading/index.js +0 -18
  211. package/es/components/user-selector/request-apis.js +0 -180
  212. package/es/components/user-selector/searched-panel/index.js +0 -139
  213. package/es/components/user-selector/searched-panel/result-part.js +0 -43
  214. package/es/components/user-selector/select-tree/selected-tree/index.js +0 -91
  215. package/es/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +0 -48
  216. package/es/components/user-selector/select-tree/tree-nodes/tree-duties-node/index.js +0 -27
  217. package/es/components/user-selector/select-tree/tree-nodes/tree-group-node/index.js +0 -57
  218. package/es/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +0 -93
  219. package/es/components/user-selector/utils.js +0 -139
  220. package/es/components/viewer/ImageListRender.js +0 -143
  221. package/es/components/viewer/index.js +0 -168
  222. package/es/components/word-cloud/index.js +0 -109
  223. package/es/components/word-cloud/request-apis.js +0 -26
  224. package/es/components-v1/animate/AnimateChild.js +0 -76
  225. package/es/components-v1/animate/animate.js +0 -148
  226. package/es/components-v1/animate/index.js +0 -13
  227. package/es/components-v1/dom/index.js +0 -30
  228. package/es/components-v1/placement/index.js +0 -13
  229. package/es/components-v1/placement/placement.js +0 -111
  230. package/es/components-v1/placement/placementInner.js +0 -139
  231. package/es/components-v1/pop/Pop.js +0 -246
  232. package/es/components-v1/pop/PopInner.js +0 -163
  233. package/es/components-v1/pop/index.js +0 -13
  234. package/es/components-v1/progress/CircleProgress.js +0 -152
  235. package/es/components-v1/progress/LineProgress.js +0 -83
  236. package/es/components-v1/progress/index.js +0 -80
  237. package/es/components-v1/select/Option.js +0 -94
  238. package/es/components-v1/select/index.js +0 -330
  239. package/es/components-v1/utils/animate/animate.js +0 -103
  240. package/es/components-v1/utils/animate/event.js +0 -79
  241. package/es/components-v1/utils/dom/index.js +0 -30
  242. package/es/components-v1/utils/placement/autoAdjustPlacement.js +0 -93
  243. package/es/components-v1/utils/placement/getContainerVisibleArea.js +0 -22
  244. package/es/components-v1/utils/placement/getExpectPlacement.js +0 -49
  245. package/es/components-v1/utils/placement/getPlacementInContainer.js +0 -26
  246. package/es/components-v1/utils/placement/placement.js +0 -76
  247. package/es/index.js +0 -777
  248. package/es/pages/appointment-demo/drop-down-box/index.js +0 -159
  249. package/es/pages/appointment-demo/index.js +0 -649
  250. package/es/pages/appointment-demo/input/index.js +0 -176
  251. package/es/pages/appointment-demo/popup/index.js +0 -113
  252. package/es/pages/appointment-demo/popup/placement.js +0 -44
  253. package/es/pages/group-management/components/checkbox/index.js +0 -28
  254. package/es/pages/group-management/components/input-form/index.js +0 -174
  255. package/es/pages/group-management/components/radio/index.js +0 -21
  256. package/es/pages/group-management/components/table/index.js +0 -174
  257. package/es/pages/group-management/groupInterface.js +0 -293
  258. package/es/pages/group-management/index.js +0 -13
  259. package/es/pages/group-management/page-view/empty.js +0 -111
  260. package/es/pages/group-management/page-view/group-empty.js +0 -66
  261. package/es/pages/group-management/page-view/importGroupStaff/index.js +0 -208
  262. package/es/pages/group-management/page-view/index.js +0 -412
  263. package/es/pages/group-management/table/index.js +0 -104
  264. package/es/pages/group-management/tree/add-group-dialog/index.js +0 -153
  265. package/es/pages/group-management/tree/delete-group-dialog/index.js +0 -82
  266. package/es/pages/group-management/tree/edit-group-dialog/index.js +0 -155
  267. package/es/pages/group-management/tree/group-form/index.js +0 -207
  268. package/es/pages/group-management/tree/index.js +0 -168
  269. package/es/pages/group-management/tree/operation-panel.js +0 -41
  270. package/es/pages/group-management/tree/trigger-render.js +0 -99
  271. package/es/pages/like-ranking/mock.js +0 -366
  272. package/es/pages/okr-map/export-modules/index.js +0 -1
  273. package/es/pages/okr-map/export-modules/okr-map/header/index.js +0 -182
  274. package/es/pages/okr-map/export-modules/okr-map/header/show-kr-confirm.js +0 -47
  275. package/es/pages/okr-map/export-modules/okr-map/okr-map.js +0 -497
  276. package/es/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -69
  277. package/es/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +0 -168
  278. package/es/pages/okr-map/hooks/useStorage.js +0 -96
  279. package/es/pages/okr-map/index.js +0 -18
  280. package/es/pages/okr-map/level2-search/depart.js +0 -53
  281. package/es/pages/okr-map/level2-search/group.js +0 -69
  282. package/es/pages/okr-map/level2-search/index.js +0 -51
  283. package/es/pages/okr-map/level2-search/level2-input.js +0 -46
  284. package/es/pages/okr-map/level2-search/user.js +0 -54
  285. package/es/pages/okr-map/no-okr/index.js +0 -24
  286. package/es/pages/okr-map/number-select/index.js +0 -81
  287. package/es/pages/okr-map/open-data/index.js +0 -115
  288. package/es/pages/okr-map/precls.js +0 -8
  289. package/es/pages/okr-map/request-apis.js +0 -76
  290. package/es/pages/okr-map/share-dialog/index.js +0 -122
  291. package/es/pages/okr-map/unsupport-ie/index.js +0 -83
  292. package/es/pages/okr-map/utils.js +0 -51
  293. package/es/utils/auth.js +0 -294
  294. package/es/utils/bs-global.js +0 -114
  295. package/es/utils/local-storage.js +0 -42
  296. package/es/utils/mblog.js +0 -33
  297. package/es/utils/mock-bsglobal.js +0 -1837
  298. package/es/utils/open-data.js +0 -341
  299. package/es/utils/request-v1.js +0 -115
  300. package/es/utils/request.js +0 -183
  301. package/es/utils/tools.js +0 -286
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getWords = void 0;
7
-
8
- var _axios = _interopRequireDefault(require("axios"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var tenantId = BSGlobal && BSGlobal.tenantInfo.Id || 0;
13
- var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
14
-
15
- var requestDomain = function requestDomain() {
16
- if (!window.location.hostname.match(/dev/)) return "";
17
- return "http://www.tita.gift";
18
- };
19
-
20
- var getWords = function getWords() {
21
- return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/wordCloud/get?num=250")).then(function (words) {
22
- return words.data;
23
- });
24
- };
25
-
26
- exports.getWords = getWords;
@@ -1,76 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _reactDom = require("react-dom");
11
-
12
- var _animate = _interopRequireDefault(require("../utils/animate/animate"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
-
16
- 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); }
17
-
18
- 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; }
19
-
20
- 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); }
21
-
22
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
-
24
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
25
-
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
-
28
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
-
30
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
-
32
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
33
-
34
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
35
-
36
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
-
38
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
-
40
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
-
42
- var AnimateChild = /*#__PURE__*/function (_Component) {
43
- _inherits(AnimateChild, _Component);
44
-
45
- var _super = _createSuper(AnimateChild);
46
-
47
- function AnimateChild() {
48
- var _temp, _this;
49
-
50
- _classCallCheck(this, AnimateChild);
51
-
52
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
53
- args[_key] = arguments[_key];
54
- }
55
-
56
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.componentWillEnter = function (done) {
57
- _this.transition("enter", done);
58
- }, _this.componentWillLeave = function (done) {
59
- _this.transition("leave", done);
60
- }, _this.transition = function (animationType, done) {
61
- var name = _typeof(_this.props.transitionName) === "object" ? _this.props.transitionName[animationType] : "".concat(_this.props.transitionName, "-").concat(animationType);
62
- (0, _animate["default"])((0, _reactDom.findDOMNode)(_assertThisInitialized(_this)), name, done);
63
- }, _temp));
64
- }
65
-
66
- _createClass(AnimateChild, [{
67
- key: "render",
68
- value: function render() {
69
- return this.props.children;
70
- }
71
- }]);
72
-
73
- return AnimateChild;
74
- }(_react.Component);
75
-
76
- exports["default"] = AnimateChild;
@@ -1,148 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _AnimateChild = _interopRequireDefault(require("./AnimateChild"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
- 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); }
15
-
16
- 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; }
17
-
18
- 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); }
19
-
20
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
-
22
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
23
-
24
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
-
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
-
28
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
-
30
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
31
-
32
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
33
-
34
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
35
-
36
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
37
-
38
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
39
-
40
- var animate = /*#__PURE__*/function (_Component) {
41
- _inherits(animate, _Component);
42
-
43
- var _super = _createSuper(animate);
44
-
45
- function animate(props) {
46
- var _this;
47
-
48
- _classCallCheck(this, animate);
49
-
50
- _this = _super.call(this, props);
51
-
52
- _this.willEnter = function () {
53
- var onEnter = _this.props.onEnter;
54
-
55
- if (_typeof(onEnter) !== "object") {
56
- return;
57
- }
58
-
59
- onEnter.start && onEnter.start();
60
- };
61
-
62
- _this.willLeave = function () {
63
- var onLeave = _this.props.onLeave;
64
-
65
- if (_typeof(onLeave) !== "object") {
66
- return;
67
- }
68
-
69
- onLeave.start && onLeave.start();
70
- };
71
-
72
- _this.enterIsDone = function () {
73
- var onEnter = _this.props.onEnter;
74
- var end = onEnter;
75
-
76
- if (_typeof(onEnter) === "object") {
77
- end = onEnter.end;
78
- }
79
-
80
- end && end();
81
- };
82
-
83
- _this.leaveIsDone = function () {
84
- var onLeave = _this.props.onLeave;
85
- var end = onLeave;
86
-
87
- if (_typeof(onLeave) === "object") {
88
- end = onLeave.end;
89
- }
90
-
91
- _this.setState({
92
- children: _this.props.children
93
- });
94
-
95
- end && end();
96
- };
97
-
98
- _this.childRef = /*#__PURE__*/_react["default"].createRef();
99
- _this.state = {
100
- children: props.children
101
- };
102
- return _this;
103
- }
104
-
105
- _createClass(animate, [{
106
- key: "componentWillReceiveProps",
107
- value: function componentWillReceiveProps(nextProp) {
108
- var prevProps = this.props;
109
- var isWillShow = !!nextProp.children;
110
- var isAlreadyShow = !!prevProps.children;
111
-
112
- if (isWillShow) {
113
- this.setState({
114
- children: nextProp.children
115
- });
116
- }
117
-
118
- if (isWillShow === isAlreadyShow) {
119
- return;
120
- }
121
-
122
- this.animationType = isWillShow ? "Enter" : "Leave";
123
- }
124
- }, {
125
- key: "componentDidUpdate",
126
- value: function componentDidUpdate() {
127
- if (this.animationType) {
128
- this.refs.child["componentWill".concat(this.animationType)]({
129
- start: this["will".concat(this.animationType)],
130
- end: this["".concat(this.animationType.toLowerCase(), "IsDone")]
131
- });
132
- this.animationType = null;
133
- }
134
- }
135
- }, {
136
- key: "render",
137
- value: function render() {
138
- return /*#__PURE__*/_react["default"].createElement(_AnimateChild["default"], {
139
- transitionName: this.props.transitionName,
140
- ref: "child"
141
- }, this.state.children);
142
- }
143
- }]);
144
-
145
- return animate;
146
- }(_react.Component);
147
-
148
- exports["default"] = animate;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _animate = _interopRequireDefault(require("./animate"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var _default = _animate["default"];
13
- exports["default"] = _default;
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.addClass = addClass;
7
- exports.removeClass = removeClass;
8
-
9
- /*
10
- * @Author: lianghaosen
11
- * @Date: 2018-12-03 15:49:28
12
- * @Last Modified by: lianghaosen
13
- * @Last Modified time: 2018-12-04 11:16:16
14
- */
15
- function addClass(node, className) {
16
- node.className += " ".concat(className);
17
- }
18
-
19
- function removeClass(node, className) {
20
- var arr = className.split(/\s+/);
21
- var nArr = node.className.split(/\s+/);
22
- arr.forEach(function (a) {
23
- var index = nArr.indexOf(a);
24
-
25
- if (index !== -1) {
26
- nArr.splice(index, 1);
27
- }
28
- });
29
- node.className = nArr.join(" ");
30
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _placement = _interopRequireDefault(require("./placement"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var _default = _placement["default"];
13
- exports["default"] = _default;
@@ -1,111 +0,0 @@
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 _reactDom = _interopRequireDefault(require("react-dom"));
13
-
14
- var _placementInner = _interopRequireDefault(require("./placementInner"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
-
24
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
25
-
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
-
28
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
-
30
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
-
32
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
33
-
34
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
35
-
36
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
-
38
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
-
40
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
-
42
- var Placement = /*#__PURE__*/function (_Component) {
43
- _inherits(Placement, _Component);
44
-
45
- var _super = _createSuper(Placement);
46
-
47
- function Placement(props) {
48
- var _this;
49
-
50
- _classCallCheck(this, Placement);
51
-
52
- _this = _super.call(this, props);
53
-
54
- _this.getEl = function () {
55
- return _this.wrapper;
56
- };
57
-
58
- _this.resetPosition = function () {
59
- _this.el.caculPosition();
60
- };
61
-
62
- _this.container = props.container || document.body;
63
- _this.wrapper = document.createElement("div");
64
- _this.wrapper.style.cssText += ";position:absolute;top:0;left:0;z-index:2000";
65
-
66
- _this.wrapper.setAttribute("data-uId", _this.props.uid);
67
-
68
- _this.container.appendChild(_this.wrapper);
69
-
70
- return _this;
71
- }
72
-
73
- _createClass(Placement, [{
74
- key: "componentDidMount",
75
- value: function componentDidMount() {}
76
- }, {
77
- key: "render",
78
- value: function render() {
79
- var _this2 = this;
80
-
81
- var children = /*#__PURE__*/_react["default"].createElement(_placementInner["default"], {
82
- autoAdjust: this.props.autoAdjust,
83
- className: this.props.className,
84
- style: this.props.style,
85
- ref: function ref(rl) {
86
- _this2.el = rl;
87
- },
88
- container: this.container,
89
- align: this.props.align,
90
- getBindNode: this.props.getBindNode,
91
- dragCls: this.props.dragCls,
92
- cover: this.props.cover
93
- }, this.props.children);
94
-
95
- return /*#__PURE__*/_reactDom["default"].createPortal(children, this.wrapper);
96
- }
97
- }, {
98
- key: "componentWillUnmount",
99
- value: function componentWillUnmount() {
100
- this.wrapper.parentNode && this.wrapper.parentNode.removeChild(this.wrapper);
101
- }
102
- }]);
103
-
104
- return Placement;
105
- }(_react.Component);
106
-
107
- exports["default"] = Placement;
108
- Placement.defaultProps = {
109
- align: "bottom",
110
- autoAdjust: "x y"
111
- };
@@ -1,139 +0,0 @@
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 _reactDom = require("react-dom");
13
-
14
- var _placement = _interopRequireDefault(require("../utils/placement/placement"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- function 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; }
23
-
24
- 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; }
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
-
30
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
31
-
32
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
33
-
34
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
35
-
36
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
37
-
38
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
39
-
40
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
41
-
42
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
43
-
44
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
45
-
46
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
47
-
48
- var placementInner = /*#__PURE__*/function (_Component) {
49
- _inherits(placementInner, _Component);
50
-
51
- var _super = _createSuper(placementInner);
52
-
53
- function placementInner(props) {
54
- var _this;
55
-
56
- _classCallCheck(this, placementInner);
57
-
58
- _this = _super.call(this, props);
59
- _this.dragging = false;
60
- _this.startDragPos = {};
61
- _this.startPos = {};
62
-
63
- _this.caculPosition = function () {
64
- var el = (0, _reactDom.findDOMNode)(_assertThisInitialized(_this));
65
- var res = (0, _placement["default"])(el, _this.props.container, _this.props.align, _this.props.getBindNode(), _this.props.autoAdjust, _this.props.cover);
66
-
67
- if (res.adjust.x || res.adjust.y) {
68
- _this.props.onAdjust && _this.props.onAdjust(res.adjust);
69
- }
70
-
71
- el.style.top = "".concat(res.placement.top, "px");
72
- el.style.left = "".concat(res.placement.left, "px");
73
- };
74
-
75
- _this.handleDragStart = function (e) {
76
- var dragCls = _this.props.dragCls;
77
- if (!dragCls || e.target.className.indexOf(dragCls) == -1) return false;
78
- var el = (0, _reactDom.findDOMNode)(_assertThisInitialized(_this));
79
- _this.dragging = true;
80
- _this.startDragPos = {
81
- top: e.screenY,
82
- left: e.screenX
83
- };
84
- _this.startPos = {
85
- top: el.style.top.replace("px", "") - 0,
86
- left: el.style.left.replace("px", "") - 0
87
- };
88
- };
89
-
90
- _this.handleDragging = function (e) {
91
- var dragCls = _this.props.dragCls;
92
- if (!dragCls || !_this.dragging) return;
93
- var el = (0, _reactDom.findDOMNode)(_assertThisInitialized(_this));
94
- var top = el.style.top.replace("px", "") - 0;
95
- var left = el.style.left.replace("px", "") - 0;
96
- el.style.top = "".concat(_this.startPos.top + (e.screenY - _this.startDragPos.top), "px");
97
- el.style.left = "".concat(_this.startPos.left + (e.screenX - _this.startDragPos.left), "px");
98
- };
99
-
100
- _this.state = {
101
- position: {}
102
- };
103
- return _this;
104
- }
105
-
106
- _createClass(placementInner, [{
107
- key: "componentDidMount",
108
- value: function componentDidMount() {
109
- this.caculPosition();
110
- }
111
- }, {
112
- key: "render",
113
- value: function render() {
114
- var _this2 = this;
115
-
116
- var style = this.props.style;
117
- return /*#__PURE__*/_react["default"].createElement("div", {
118
- ref: "wrapper",
119
- className: "".concat(this.props.className, " document-mouse-event-ignore"),
120
- style: _objectSpread(_objectSpread({}, {
121
- zIndex: 9999,
122
- position: "absolute"
123
- }), style),
124
- onMouseDown: this.handleDragStart,
125
- onMouseMove: this.handleDragging,
126
- onMouseLeave: function onMouseLeave() {
127
- return _this2.dragging = false;
128
- },
129
- onMouseUp: function onMouseUp() {
130
- return _this2.dragging = false;
131
- }
132
- }, this.props.children);
133
- }
134
- }]);
135
-
136
- return placementInner;
137
- }(_react.Component);
138
-
139
- exports["default"] = placementInner;