@titaui/pc 1.10.7 → 1.10.8-2.beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/.eslintrc.js +2 -2
  2. package/.prettierignore +4 -4
  3. package/lib/components/book-demo/utils.js +4 -0
  4. package/lib/components/button/default-button/index.css +10 -4
  5. package/lib/components/button/default-button/index.js +13 -2
  6. package/lib/components/change-okr-modal/index.js +3 -2
  7. package/lib/components/checkbox/index.css +1 -0
  8. package/lib/components/communication/CommunicationRecord.js +16 -16
  9. package/lib/components/communication/index.css +16 -15
  10. package/lib/components/communication/index.js +23 -6
  11. package/lib/components/communication/style.js +4 -4
  12. package/lib/components/create-okr-modal/fields/o-new-name.js +31 -21
  13. package/lib/components/create-okr-modal/fields/okr-parent.js +1 -5
  14. package/lib/components/create-okr-modal/kr-items/krDatas.js +16 -16
  15. package/lib/components/{dynamic/components/dangerous-html → dangerous-html}/index.js +0 -0
  16. package/lib/components/dialog/index.css +4 -1
  17. package/lib/components/dialog/index.js +1 -1
  18. package/lib/components/dialog-confirm/index.css +1 -1
  19. package/lib/components/drawer/index.js +3 -2
  20. package/lib/components/drawer-manager/index.js +6 -1
  21. package/lib/components/dynamic/components/first-level-tabs/index.css +12 -2
  22. package/lib/components/dynamic/components/first-level-tabs/index.js +19 -6
  23. package/lib/components/dynamic/components/obj-status/index.css +1 -0
  24. package/lib/components/dynamic/components/obj-status/utils.js +1 -1
  25. package/lib/components/dynamic/constant.js +12 -2
  26. package/lib/components/dynamic/dynamic-item/components/feed-operate/index.css +71 -0
  27. package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +112 -0
  28. package/lib/components/dynamic/dynamic-item/components/header/index.css +2 -1
  29. package/lib/components/dynamic/dynamic-item/components/header/index.js +2 -2
  30. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +27 -0
  31. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +13 -7
  32. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +10 -4
  33. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +1 -1
  34. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +1 -1
  35. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +5 -3
  36. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.css +4 -0
  37. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +102 -0
  38. package/lib/components/dynamic/dynamic-item/dynamic-chart/utils.js +61 -0
  39. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +12 -11
  40. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -5
  41. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +2 -2
  42. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -3
  43. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/dynamic-share-course.png +0 -0
  44. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/jiantou-right@3x.png +0 -0
  45. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/user-photo.png +0 -0
  46. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/index.css +2 -2
  47. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/index.js +6 -5
  48. package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +9 -2
  49. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +2 -2
  50. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +4 -2
  51. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +1 -1
  52. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +1 -1
  53. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +2 -6
  54. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -2
  55. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +2 -2
  56. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -1
  57. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +13 -7
  58. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +42 -6
  59. package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.css +14 -30
  60. package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.js +1 -1
  61. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +1 -1
  62. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +12 -3
  63. package/lib/components/dynamic/dynamic-item/dynamic-reward/img/reward.png +0 -0
  64. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +6 -1
  65. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +18 -51
  66. package/lib/components/dynamic/dynamic-item/dynamic-reward/utils.js +28 -0
  67. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +6 -2
  68. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +55 -2
  69. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +2 -2
  70. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
  71. package/lib/components/dynamic/dynamic-item/index.css +58 -3
  72. package/lib/components/dynamic/dynamic-item/index.js +124 -23
  73. package/lib/components/dynamic/dynamic-like-ranking/item.js +1 -1
  74. package/lib/components/dynamic/dynamic-list/index.js +11 -2
  75. package/lib/components/dynamic/dynamic-topping/item.js +8 -4
  76. package/lib/components/dynamic/dynamic.js +5 -2
  77. package/lib/components/dynamic/img/dynamic-operate.png +0 -0
  78. package/lib/components/dynamic/img/dynamic-point.svg +13 -0
  79. package/lib/components/dynamic/img/dynamic-reward-hover.svg +1 -0
  80. package/lib/components/dynamic/img/dynamic-reward-normal.svg +1 -0
  81. package/lib/components/dynamic/online-broadcast/data.js +13 -1
  82. package/lib/components/e-status-dropdown/index.css +3 -0
  83. package/lib/components/e-status-dropdown/index.js +94 -0
  84. package/lib/components/edit-kr-wight/style/index.js +2 -2
  85. package/lib/components/file-list/components/single-file/index.css +6 -5
  86. package/lib/components/file-list/components/single-file/index.js +1 -1
  87. package/lib/components/file-list/index.css +1 -0
  88. package/lib/components/follower-visitor/index.js +6 -4
  89. package/lib/components/grid-layout/okr-progress/index.js +20 -30
  90. package/lib/components/help-card/image/not-try.png +0 -0
  91. package/lib/components/help-card/image/try.png +0 -0
  92. package/lib/components/help-card/index.css +31 -2
  93. package/lib/components/help-card/index.js +54 -17
  94. package/lib/components/invite-people/img/invite-people.svg +62 -0
  95. package/lib/components/invite-people/index.css +1 -1
  96. package/lib/components/mblog/index.js +14 -5
  97. package/lib/components/menus/export-modules/demo-menus/index.js +2 -2
  98. package/lib/components/menus/export-modules/demo-menus/menu-highlight.js +25 -1
  99. package/lib/components/menus/export-modules/demo-menus/menus.js +60 -11
  100. package/lib/components/menus/export-modules/manage-menus/constant.js +1 -1
  101. package/lib/components/menus/export-modules/manage-menus/index.css +3 -0
  102. package/lib/components/menus/export-modules/okr-menus/subordinate-menus/index.js +34 -12
  103. package/lib/components/menus/images/okr-gongsi.svg +17 -0
  104. package/lib/components/nav-top/components/menu/index.css +24 -0
  105. package/lib/components/nav-top/components/menu/index.js +9 -1
  106. package/lib/components/nav-top/components/user-message/components/reply/index.js +9 -8
  107. package/lib/components/nav-top/components/user-message/components/reply/reply-item.js +15 -5
  108. package/lib/components/nav-top/components/user-message/index.css +4 -3
  109. package/lib/components/nav-top/components/user-message/index.js +33 -6
  110. package/lib/components/nav-top/request.apis.js +22 -8
  111. package/lib/components/nav-top/useGlobalValue.js +14 -0
  112. package/lib/components/okr-detail/components/header/o-name.js +11 -4
  113. package/lib/components/okr-detail/components/header/o-score.js +4 -6
  114. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.css +26 -12
  115. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +11 -5
  116. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +20 -7
  117. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +3 -1
  118. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +27 -6
  119. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +29 -10
  120. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +1 -1
  121. package/lib/components/okr-detail/detail-header/actions.js +40 -44
  122. package/lib/components/okr-detail/detail-header/index.css +2 -2
  123. package/lib/components/okr-detail/detail-header/index.js +207 -195
  124. package/lib/components/okr-detail/e-list/index.js +70 -24
  125. package/lib/components/okr-detail/e-list/util.js +11 -2
  126. package/lib/components/okr-detail/index.js +4 -0
  127. package/lib/components/okr-detail/okr-list/index.js +1 -5
  128. package/lib/components/okr-flow/export-modal/index.js +3 -3
  129. package/lib/components/okr-flow/root-node/index.js +14 -1
  130. package/lib/components/okr-progress-detail/index.css +11 -10
  131. package/lib/components/okr-progress-detail/index.js +5 -1
  132. package/lib/components/okr-progress-detail/utils.js +4 -4
  133. package/lib/components/okr-progress-modal/helper.js +20 -27
  134. package/lib/components/okr-share/common-painter/openDataPainter.js +34 -27
  135. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +40 -36
  136. package/lib/components/open-data-painter/index.js +5 -1
  137. package/lib/components/progress/circle-progress/index.js +1 -1
  138. package/lib/components/rich-editor/basic/schema.js +47 -0
  139. package/lib/components/rich-editor/consts/events.js +12 -0
  140. package/lib/components/rich-editor/enums.js +42 -0
  141. package/lib/components/rich-editor/index.js +58 -0
  142. package/lib/components/rich-editor/keymap.js +119 -0
  143. package/lib/components/rich-editor/keymaps/index.js +241 -0
  144. package/lib/components/rich-editor/models/controller.js +18 -0
  145. package/lib/components/rich-editor/models/editor.js +47 -0
  146. package/lib/components/rich-editor/models/plugin.js +20 -0
  147. package/lib/components/rich-editor/models/schema.js +121 -0
  148. package/lib/components/rich-editor/plugins/block/block-quote/commond.js +27 -0
  149. package/lib/components/rich-editor/plugins/block/block-quote/index.js +128 -0
  150. package/lib/components/rich-editor/plugins/block/heading/commonds.js +31 -0
  151. package/lib/components/rich-editor/plugins/block/heading/index.js +190 -0
  152. package/lib/components/rich-editor/plugins/block/index.js +57 -0
  153. package/lib/components/rich-editor/plugins/block/lists/actions/conversions.js +172 -0
  154. package/lib/components/rich-editor/plugins/block/lists/actions/indent-list-items-selected.js +163 -0
  155. package/lib/components/rich-editor/plugins/block/lists/actions/indent-list.js +59 -0
  156. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-forward.js +74 -0
  157. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/index.js +45 -0
  158. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +104 -0
  159. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +92 -0
  160. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +89 -0
  161. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-paragraph-with-list.js +48 -0
  162. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-sibling-list-items.js +61 -0
  163. package/lib/components/rich-editor/plugins/block/lists/actions/merge-lists.js +34 -0
  164. package/lib/components/rich-editor/plugins/block/lists/actions/outdent-list-items-selected.js +289 -0
  165. package/lib/components/rich-editor/plugins/block/lists/actions/wrap-and-join-lists.js +180 -0
  166. package/lib/components/rich-editor/plugins/block/lists/baseCommand.js +328 -0
  167. package/lib/components/rich-editor/plugins/block/lists/commond/indent-list.js +60 -0
  168. package/lib/components/rich-editor/plugins/block/lists/commond/index.js +396 -0
  169. package/lib/components/rich-editor/plugins/block/lists/commond/join-list-item-forward.js +45 -0
  170. package/lib/components/rich-editor/plugins/block/lists/commond/listBackspace.js +302 -0
  171. package/lib/components/rich-editor/plugins/block/lists/commond/outdent-list.js +43 -0
  172. package/lib/components/rich-editor/plugins/block/lists/index.js +224 -0
  173. package/lib/components/rich-editor/plugins/block/lists/messages.js +38 -0
  174. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/input-rule.js +152 -0
  175. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/keymap.js +33 -0
  176. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/main.js +94 -0
  177. package/lib/components/rich-editor/plugins/block/lists/styles.js +15 -0
  178. package/lib/components/rich-editor/plugins/block/lists/transforms.js +347 -0
  179. package/lib/components/rich-editor/plugins/block/lists/utils/analytics.js +48 -0
  180. package/lib/components/rich-editor/plugins/block/lists/utils/find.js +126 -0
  181. package/lib/components/rich-editor/plugins/block/lists/utils/indentation.js +87 -0
  182. package/lib/components/rich-editor/plugins/block/lists/utils/node.js +144 -0
  183. package/lib/components/rich-editor/plugins/block/lists/utils/replace-content.js +31 -0
  184. package/lib/components/rich-editor/plugins/block/lists/utils/selection.js +201 -0
  185. package/lib/components/rich-editor/plugins/block/lists/utils.js +52 -0
  186. package/lib/components/rich-editor/plugins/block/paragraph/index.js +91 -0
  187. package/lib/components/rich-editor/plugins/core/index.js +90 -0
  188. package/lib/components/rich-editor/plugins/core/pm-plugins/focus-handler.js +67 -0
  189. package/lib/components/rich-editor/plugins/core/pm-plugins/keymap.js +29 -0
  190. package/lib/components/rich-editor/plugins/core/pm-plugins/reactNodeView.js +80 -0
  191. package/lib/components/rich-editor/plugins/extension/alignment/commond.js +24 -0
  192. package/lib/components/rich-editor/plugins/extension/alignment/index.js +113 -0
  193. package/lib/components/rich-editor/plugins/extension/alignment/utils.js +19 -0
  194. package/lib/components/rich-editor/plugins/extension/index.js +18 -0
  195. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +126 -0
  196. package/lib/components/rich-editor/plugins/extension/placeholder/styles.js +19 -0
  197. package/lib/components/rich-editor/plugins/index.js +44 -0
  198. package/lib/components/rich-editor/plugins/inline/color/commond.js +128 -0
  199. package/lib/components/rich-editor/plugins/inline/color/consts.js +43 -0
  200. package/lib/components/rich-editor/plugins/inline/color/index.css +61 -0
  201. package/lib/components/rich-editor/plugins/inline/color/index.js +217 -0
  202. package/lib/components/rich-editor/plugins/inline/color/selector.js +252 -0
  203. package/lib/components/rich-editor/plugins/inline/color/util.js +25 -0
  204. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +149 -0
  205. package/lib/components/rich-editor/plugins/inline/em/index.js +93 -0
  206. package/lib/components/rich-editor/plugins/inline/index.js +83 -0
  207. package/lib/components/rich-editor/plugins/inline/link/commands.js +256 -0
  208. package/lib/components/rich-editor/plugins/inline/link/index.js +149 -0
  209. package/lib/components/rich-editor/plugins/inline/link/pm-plugins/fake-cursor-for-toolbar.js +77 -0
  210. package/lib/components/rich-editor/plugins/inline/link/pm-plugins/main.js +293 -0
  211. package/lib/components/rich-editor/plugins/inline/link/ui/index.css +84 -0
  212. package/lib/components/rich-editor/plugins/inline/link/ui/linkEditor.js +150 -0
  213. package/lib/components/rich-editor/plugins/inline/link/ui/linkToolbar.js +101 -0
  214. package/lib/components/rich-editor/plugins/inline/link/ui/toolbarBtn.js +117 -0
  215. package/lib/components/rich-editor/plugins/inline/link/utils.js +33 -0
  216. package/lib/components/rich-editor/plugins/inline/strong/index.js +139 -0
  217. package/lib/components/rich-editor/plugins/inline/under-line/index.js +147 -0
  218. package/lib/components/rich-editor/plugins/util.js +284 -0
  219. package/lib/components/rich-editor/react/reactNodeView.js +383 -0
  220. package/lib/components/rich-editor/react/uiProvider.js +185 -0
  221. package/lib/components/rich-editor/schemas/basic.js +309 -0
  222. package/lib/components/rich-editor/schemas/index.js +19 -0
  223. package/lib/components/rich-editor/schemas/list.js +342 -0
  224. package/lib/components/rich-editor/types/commond.js +5 -0
  225. package/lib/components/rich-editor/types/index.js +18 -0
  226. package/lib/components/rich-editor/ui/Popup/index.js +247 -0
  227. package/lib/components/rich-editor/ui/Popup/utils.js +399 -0
  228. package/lib/components/rich-editor/ui/editor/index.css +178 -0
  229. package/lib/components/rich-editor/ui/editor/index.js +153 -0
  230. package/lib/components/rich-editor/ui/normal-toolbar/index.css +34 -0
  231. package/lib/components/rich-editor/ui/normal-toolbar/index.js +109 -0
  232. package/lib/components/rich-editor/utils/browser.js +35 -0
  233. package/lib/components/rich-editor/utils/commands.js +266 -0
  234. package/lib/components/rich-editor/utils/document.js +211 -0
  235. package/lib/components/rich-editor/utils/event.js +79 -0
  236. package/lib/components/rich-editor/utils/helpers.js +16 -0
  237. package/lib/components/rich-editor/utils/mark.js +168 -0
  238. package/lib/components/rich-editor/utils/slice.js +85 -0
  239. package/lib/components/rich-editor/utils/toolbar.js +228 -0
  240. package/lib/components/scrollbar/index.js +67 -9
  241. package/lib/components/scrollbar/scroll-mask/index.css +29 -0
  242. package/lib/components/scrollbar/scroll-mask/index.js +152 -0
  243. package/lib/components/superset-charts/components/chart/index.js +54 -0
  244. package/lib/components/superset-charts/fetch-assets-and-append/append-assets.js +106 -0
  245. package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +142 -0
  246. package/lib/components/superset-charts/fetch-assets-and-append/index.js +79 -0
  247. package/lib/components/superset-charts/index.js +13 -0
  248. package/lib/components/superset-charts/interface.js +5 -0
  249. package/lib/components/superset-charts/utils/axios.js +102 -0
  250. package/lib/components/toast/index.js +5 -17
  251. package/lib/components/tree/index.css +3 -2
  252. package/lib/components/upload/index.js +4 -2
  253. package/lib/components/upload/util.js +2 -0
  254. package/lib/components/upload-photo-modal/request-api.js +1 -17
  255. package/lib/components/user-selector/empty/index.css +6 -6
  256. package/lib/components/user-selector/selected-panel/index.css +3 -3
  257. package/lib/components/{float-fixed-video-modal → video-modal/components/video-box}/index.css +118 -121
  258. package/lib/components/{float-fixed-video-modal → video-modal/components/video-box}/index.js +182 -182
  259. package/lib/components/{float-fixed-video-modal → video-modal}/img/close.png +0 -0
  260. package/lib/components/{float-fixed-video-modal → video-modal}/img/full.svg +0 -0
  261. package/lib/components/video-modal/img/muted.svg +8 -10
  262. package/lib/components/video-modal/img/not-muted.svg +17 -11
  263. package/lib/components/video-modal/img/pause.svg +7 -11
  264. package/lib/components/video-modal/img/play.svg +13 -11
  265. package/lib/components/video-modal/index.css +38 -168
  266. package/lib/components/video-modal/index.js +104 -244
  267. package/lib/components/video-modal/utils.js +2 -2
  268. package/lib/components/wechat-btn/index.css +10 -0
  269. package/lib/components/wechat-btn/index.js +232 -0
  270. package/lib/components/weekly-report/common-painter/openDataPainter.js +5 -1
  271. package/lib/hooks/useGlobalState.js +63 -0
  272. package/lib/index.js +39 -7
  273. package/lib/pages/aha2021/img/canceled.svg +13 -0
  274. package/lib/pages/aha2021/img/not-try.png +0 -0
  275. package/lib/pages/aha2021/img/try.png +0 -0
  276. package/lib/pages/aha2021/index.css +52 -0
  277. package/lib/pages/aha2021/index.js +73 -14
  278. package/lib/pages/group-management/tree/group-form/index.js +1 -1
  279. package/lib/pages/new-okr-list/header/index.js +2 -1
  280. package/lib/pages/new-okr-list/index.js +10 -13
  281. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -5
  282. package/lib/pages/pay/image/success.png +0 -0
  283. package/lib/pages/pay/index.css +79 -0
  284. package/lib/pages/pay/index.js +66 -0
  285. package/lib/pages/personal-info/request-api.js +1 -1
  286. package/lib/utils/auth.js +15 -5
  287. package/lib/utils/bs-global.js +8 -8
  288. package/lib/utils/helpers.js +7 -1
  289. package/lib/utils/open-data.js +82 -2
  290. package/package.json +121 -101
  291. package/lib/components/float-fixed-video-modal/img/muted.svg +0 -21
  292. package/lib/components/float-fixed-video-modal/img/pause.svg +0 -21
  293. package/lib/components/float-fixed-video-modal/img/play.svg +0 -22
  294. package/lib/components/float-fixed-video-modal/img/small.svg +0 -22
  295. package/lib/components/float-fixed-video-modal/img/smallFaQi.png +0 -0
  296. package/lib/components/float-fixed-video-modal/img/volume.svg +0 -21
  297. package/lib/components/float-fixed-video-modal/utils.js +0 -25
  298. package/lib/components/invite-people/img/invite-people.png +0 -0
  299. package/lib/components/video-modal/img/play.png +0 -0
@@ -1,213 +1,83 @@
1
- .titaui-pc-video-modal__box {
1
+ .titaui-pc-video-modal__full {
2
2
  position: relative;
3
- height: 471px;
4
- border-bottom-left-radius: 24px;
5
- border-bottom-right-radius: 24px;
6
- overflow: hidden;
7
- cursor: pointer;
8
- }
9
-
10
- .titaui-pc-video-modal__mask1 {
11
- opacity: 0;
12
- transition: 0.5s;
13
- position: absolute;
14
- top: 0;
15
- width: 840px;
16
- height: 62px;
17
- background: linear-gradient(0deg, rgba(20, 28, 40, 0) 0%, #5a6068 100%);
18
- }
19
-
20
- .titaui-pc-video-modal__mask1--show {
21
- opacity: 1;
22
- transition: 0.5s;
23
- }
24
-
25
- .titaui-pc-video-modal__mask2 {
26
- opacity: 0;
27
- transition: 0.5s;
28
- position: absolute;
29
- bottom: 0;
30
- width: 840px;
31
- height: 62px;
32
- background: linear-gradient(180deg, rgba(20, 28, 40, 0) 0%, #5a6068 100%);
33
- }
34
-
35
- .titaui-pc-video-modal__mask2--show {
36
- opacity: 1;
37
- transition: 0.5s;
38
- }
39
-
40
- .titaui-pc-video-modal__video {
41
- width: 840px;
42
- height: 471px;
43
- }
44
-
45
- .titaui-pc-video-modal__controls {
46
- opacity: 0;
47
- transition: 0.5s;
48
- width: 100%;
49
- display: flex;
50
- align-items: center;
51
- justify-content: space-between;
52
- padding: 16px 32px 16px 32px;
53
- box-sizing: border-box;
54
- position: absolute;
55
- bottom: 0;
56
- z-index: 2;
57
- }
58
-
59
- .titaui-pc-video-modal__controls--show {
60
- opacity: 1;
61
- transition: 0.5s;
62
3
  }
63
4
 
64
- .titaui-pc-video-modal__controls-left {
5
+ .titaui-pc-video-modal__full-control {
65
6
  display: inline-flex;
66
- align-items: center;
67
- justify-content: center;
68
- }
69
-
70
- .titaui-pc-video-modal__controls-button {
7
+ cursor: pointer;
8
+ margin-left: 6px;
71
9
  width: 24px;
72
10
  height: 24px;
73
11
  border-radius: 12px;
74
- display: inline-flex;
75
12
  align-items: center;
76
13
  justify-content: center;
14
+ z-index: 2;
77
15
  }
78
16
 
79
- .titaui-pc-video-modal__controls-button:hover {
17
+ .titaui-pc-video-modal__full-control:hover {
80
18
  background: rgba(20, 28, 40, 0.6);
81
19
  }
82
20
 
83
- .titaui-pc-video-modal__controls-play {
84
- width: 16px;
85
- height: 16px;
86
- cursor: pointer;
87
- }
88
-
89
- .titaui-pc-video-modal__controls-time {
90
- font-size: 12px;
91
- color: #ffffff;
92
- line-height: 18px;
93
- }
94
-
95
- .titaui-pc-video-modal__controls-time:nth-of-type(1) {
96
- margin-left: 6px;
97
- }
98
-
99
- .titaui-pc-video-modal__controls-muted {
21
+ .titaui-pc-video-modal__full-control > img {
100
22
  width: 16px;
101
23
  height: 16px;
102
24
  }
103
25
 
104
- .titaui-pc-video-modal__controls-volume {
105
- display: inline-flex;
106
- align-items: center;
107
- justify-content: space-between;
108
- padding: 0 8px;
109
- box-sizing: border-box;
110
- width: 72px;
111
- height: 22px;
112
- background: rgba(20, 28, 40, 0.6);
113
- border-radius: 12px;
114
- }
115
-
116
- .titaui-pc-video-modal__controls-volume-progress {
26
+ .titaui-pc-video-modal__small {
27
+ width: 360px;
28
+ height: 200px;
117
29
  position: relative;
118
- width: 34px;
119
- height: 2px;
120
- background: rgba(255, 255, 255, 0.4);
121
- border-radius: 1px;
122
- }
123
-
124
- .titaui-pc-video-modal__controls-volume-progress--hidden {
125
- display: none;
126
- }
127
-
128
- .titaui-pc-video-modal__controls-volume-current {
129
- position: absolute;
130
- bottom: 0;
131
- left: 0;
132
- height: 2px;
133
- background: rgba(255, 255, 255, 0.6);
134
- border-radius: 1px;
135
- }
136
-
137
- .titaui-pc-video-modal__controls-volume-current::after {
138
- content: '';
139
- position: absolute;
140
- right: 0;
141
- bottom: -1px;
142
- width: 4px;
143
- height: 4px;
144
- border-radius: 50%;
145
- background: #ffffff;
146
- }
147
-
148
- .titaui-pc-video-modal__controls-volume-current--hidden {
149
- display: none;
30
+ position: fixed;
31
+ bottom: 20px;
32
+ right: 72px;
33
+ border-radius: 12px;
34
+ overflow: hidden;
35
+ box-shadow: 0px 2px 12px 0px rgba(127, 145, 180, 0.2);
36
+ z-index: 12;
150
37
  }
151
38
 
152
- .titaui-pc-video-modal__controls-right {
39
+ .titaui-pc-video-modal__small-enlarge {
153
40
  display: inline-flex;
154
- align-items: center;
155
- }
156
-
157
- .titaui-pc-video-modal__controls-right-shrink {
41
+ cursor: pointer;
158
42
  margin-left: 6px;
159
43
  width: 24px;
160
44
  height: 24px;
161
45
  border-radius: 12px;
162
- display: inline-flex;
163
46
  align-items: center;
164
47
  justify-content: center;
48
+ z-index: 2;
165
49
  }
166
50
 
167
- .titaui-pc-video-modal__controls-right-shrink:hover {
51
+ .titaui-pc-video-modal__small-enlarge:hover {
168
52
  background: rgba(20, 28, 40, 0.6);
169
53
  }
170
54
 
171
- .titaui-pc-video-modal__controls-right-shrink > img {
55
+ .titaui-pc-video-modal__small-enlarge > img {
172
56
  width: 16px;
173
57
  height: 16px;
174
58
  }
175
59
 
176
- .titaui-pc-video-modal__progress {
177
- opacity: 0;
178
- transition: 0.5s;
179
- position: absolute;
180
- bottom: 56px;
181
- width: 100%;
182
- height: 2px;
183
- background: #ffffff;
60
+ .titaui-pc-video-modal__small-close {
61
+ display: inline-flex;
62
+ cursor: pointer;
63
+ margin-left: 6px;
64
+ width: 24px;
65
+ height: 24px;
66
+ border-radius: 12px;
67
+ align-items: center;
68
+ justify-content: center;
184
69
  z-index: 2;
185
70
  }
186
71
 
187
- .titaui-pc-video-modal__progress:hover {
188
- height: 4px;
189
- }
190
-
191
- .titaui-pc-video-modal__progress--show {
192
- opacity: 1;
193
- transition: 0.5s;
72
+ .titaui-pc-video-modal__small-close:hover {
73
+ background: rgba(20, 28, 40, 0.6);
194
74
  }
195
75
 
196
- .titaui-pc-video-modal__progress-current {
197
- position: absolute;
198
- left: 0;
199
- bottom: 0;
200
- background: #77be16;
201
- height: 100%;
202
- z-index: 3;
76
+ .titaui-pc-video-modal__small-close > img {
77
+ width: 16px;
78
+ height: 16px;
203
79
  }
204
80
 
205
- .titaui-pc-video-modal__progress-current-dot {
206
- position: absolute;
207
- right: 0;
208
- bottom: -2px;
209
- width: 8px;
210
- height: 8px;
211
- border-radius: 50%;
212
- background: #77be16;
81
+ .titaui-pc-video-modal__small .titaui-pc-video-box__box {
82
+ border-radius: 0 !important;
213
83
  }
@@ -9,23 +9,19 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
12
  var _dialog = _interopRequireDefault(require("../dialog"));
15
13
 
16
- var _utils = _interopRequireDefault(require("./utils"));
17
-
18
- var _play = _interopRequireDefault(require("./img/play.svg"));
14
+ var _videoBox = _interopRequireDefault(require("./components/video-box"));
19
15
 
20
- var _pause = _interopRequireDefault(require("./img/pause.svg"));
16
+ var _conditionRender = _interopRequireDefault(require("../condition-render"));
21
17
 
22
- var _muted = _interopRequireDefault(require("./img/muted.svg"));
18
+ var _bsGlobal = require("../../utils/bs-global");
23
19
 
24
- var _notMuted = _interopRequireDefault(require("./img/not-muted.svg"));
20
+ var _full = _interopRequireDefault(require("./img/full.svg"));
25
21
 
26
22
  var _small = _interopRequireDefault(require("./img/small.svg"));
27
23
 
28
- var _bigFaqi = _interopRequireDefault(require("./img/bigFaqi.png"));
24
+ var _close = _interopRequireDefault(require("./img/close.png"));
29
25
 
30
26
  require("./index.css");
31
27
 
@@ -35,8 +31,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
35
31
 
36
32
  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; }
37
33
 
38
- 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; }
39
-
40
34
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
41
35
 
42
36
  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."); }
@@ -50,195 +44,89 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
50
44
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
51
45
 
52
46
  var preCls = "titaui-pc-video-modal";
53
-
54
- var VideoModal = function VideoModal(props) {
55
- var visible = props.visible,
56
- _onClose = props.onClose,
47
+ var userId = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Id;
48
+ var VideoModal = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
49
+ var videoSrc = props.videoSrc,
57
50
  title = props.title,
58
- videoSrc = props.videoSrc,
59
- _props$canMini = props.canMini,
60
- canMini = _props$canMini === void 0 ? false : _props$canMini,
61
- _props$showSmallVideo = props.showSmallVideo,
62
- showSmallVideo = _props$showSmallVideo === void 0 ? function () {} : _props$showSmallVideo,
63
- _props$onCancel = props.onCancel,
64
- onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel;
65
-
66
- var _useState = (0, _react.useState)(false),
51
+ videoPoster = props.videoPoster,
52
+ visible = props.visible,
53
+ onClose = props.onClose,
54
+ onOpen = props.onOpen,
55
+ _props$hasextraButton = props.hasextraButton,
56
+ hasextraButton = _props$hasextraButton === void 0 ? true : _props$hasextraButton;
57
+
58
+ var _useState = (0, _react.useState)(true),
67
59
  _useState2 = _slicedToArray(_useState, 2),
68
- isOverModal = _useState2[0],
69
- setIsOverModal = _useState2[1];
60
+ smallVideoVisible = _useState2[0],
61
+ setSmallVideoVisible = _useState2[1];
70
62
 
71
- var _useState3 = (0, _react.useState)(true),
63
+ var _useState3 = (0, _react.useState)("0"),
72
64
  _useState4 = _slicedToArray(_useState3, 2),
73
- isPlay = _useState4[0],
74
- setIsPlay = _useState4[1];
75
-
76
- var _useState5 = (0, _react.useState)(true),
77
- _useState6 = _slicedToArray(_useState5, 2),
78
- isMuted = _useState6[0],
79
- setIsMuted = _useState6[1];
80
-
81
- var _useState7 = (0, _react.useState)(false),
82
- _useState8 = _slicedToArray(_useState7, 2),
83
- isMouseDown = _useState8[0],
84
- setIsMouseDown = _useState8[1];
85
-
86
- var _useState9 = (0, _react.useState)(false),
87
- _useState10 = _slicedToArray(_useState9, 2),
88
- showDot = _useState10[0],
89
- setShowDot = _useState10[1];
90
-
91
- var _useState11 = (0, _react.useState)("00:00"),
92
- _useState12 = _slicedToArray(_useState11, 2),
93
- totalTime = _useState12[0],
94
- setTotalTime = _useState12[1];
95
-
96
- var _useState13 = (0, _react.useState)("00:00"),
97
- _useState14 = _slicedToArray(_useState13, 2),
98
- currentTime = _useState14[0],
99
- setCurrentTime = _useState14[1];
100
-
101
- var videoRef = (0, _react.useRef)(document.createElement("video"));
102
- var totalProgressRef = (0, _react.useRef)(document.createElement("div"));
103
- var progressRef = (0, _react.useRef)(document.createElement("div"));
104
- var boxRef = (0, _react.useRef)(document.createElement("div"));
105
- var volumeRef = (0, _react.useRef)(document.createElement("div")); // 播放/暂停
106
-
107
- var handlePlayVideo = function handlePlayVideo() {
108
- setIsPlay(!isPlay);
109
-
110
- if (isPlay) {
111
- videoRef.current.pause();
112
- } else {
113
- videoRef.current.play();
114
- }
115
- }; // 音量
65
+ time = _useState4[0],
66
+ setTime = _useState4[1];
116
67
 
68
+ var modalVideoRef = (0, _react.useRef)(document.createElement("div"));
69
+ var smallVideoRef = (0, _react.useRef)(document.createElement("div")); // 关闭小窗口视频
117
70
 
118
- var handleChangeVolumeMuted = function handleChangeVolumeMuted() {
119
- setIsMuted(!isMuted);
120
- videoRef.current.muted = !videoRef.current.muted;
121
- }; // 鼠标移入移出进度条区域
71
+ var handleClickCloseSmallVideo = function handleClickCloseSmallVideo() {
72
+ setSmallVideoVisible(false); // @ts-ignore
122
73
 
74
+ smallVideoRef.current.closeVideo();
75
+ localStorage.setItem("hide_performance_small_video_".concat(userId), "true");
76
+ }; // 打开dialog弹层 关闭小窗口
123
77
 
124
- var handleMouseEnterProgress = function handleMouseEnterProgress() {
125
- setShowDot(true);
126
- };
127
78
 
128
- var handleMouseLeaveProgress = function handleMouseLeaveProgress() {
129
- setShowDot(false);
130
- }; // 获得点击进度条 进度条的宽度
79
+ var handleClickToFull = function handleClickToFull() {
80
+ // @ts-ignore
81
+ setTime(smallVideoRef.current.getCurrentTime());
82
+ onOpen(); // @ts-ignore
131
83
 
84
+ smallVideoRef.current.closeVideo();
85
+ setSmallVideoVisible(false);
86
+ }; // 关闭dialog弹层 打开小窗口
132
87
 
133
- var getCurrentProgressWidth = function getCurrentProgressWidth(e) {
134
- var currentWidth = e.clientX - (document.documentElement.offsetWidth - 840) / 2;
135
- progressRef.current.style.width = "".concat(currentWidth, "px");
136
- videoRef.current.currentTime = videoRef.current.duration * currentWidth / 840;
137
- }; // 点击音量 音量进度条宽度
138
-
139
-
140
- var getCurrentVolumeWidth = function getCurrentVolumeWidth(e) {
141
- var currentWidth;
142
-
143
- if (canMini) {
144
- currentWidth = e.clientX - (document.documentElement.offsetWidth - 840) / 2 - 712;
145
- } else {
146
- currentWidth = e.clientX - (document.documentElement.offsetWidth - 840) / 2 - 742;
147
- }
148
-
149
- if (currentWidth <= 0) {
150
- setIsMuted(true);
151
- videoRef.current.muted = true;
152
- } else if (currentWidth >= 34) {
153
- volumeRef.current.style.width = "34px";
154
- videoRef.current.volume = 1;
155
- } else {
156
- volumeRef.current.style.width = "".concat(currentWidth, "px");
157
- videoRef.current.volume = currentWidth / 34;
158
- }
159
- }; // 点击进度条
160
88
 
89
+ var handleClickToSmall = function handleClickToSmall() {
90
+ onClose(); // @ts-ignore
161
91
 
162
- var handleClickTotalProgress = function handleClickTotalProgress(e) {
163
- getCurrentProgressWidth(e);
164
- }; // 拖动进度条
92
+ setTime(modalVideoRef.current.getCurrentTime());
93
+ setSmallVideoVisible(true);
94
+ }; // 关闭过一次自动播放小窗口 之后不再出现
165
95
 
166
96
 
167
- var handleMouseDownProgress = function handleMouseDownProgress() {
168
- setIsMouseDown(true);
169
- };
97
+ (0, _react.useEffect)(function () {
98
+ if (localStorage.getItem("hide_performance_small_video_".concat(userId)) === "true") {
99
+ setSmallVideoVisible(false); // @ts-ignore
170
100
 
171
- var handleMouseMoveProgress = function handleMouseMoveProgress(e) {
172
- if (isMouseDown) {
173
- getCurrentProgressWidth(e);
101
+ smallVideoRef.current.closeVideo();
174
102
  }
175
- };
176
-
177
- var handleMouseUpProgress = function handleMouseUpProgress() {
178
- setIsMouseDown(false);
179
- }; // 点击音量进度条
180
-
181
-
182
- var handleMouseClickVolume = function handleMouseClickVolume(e) {
183
- getCurrentVolumeWidth(e);
184
- }; // 鼠标移入移出视频区域
185
-
186
-
187
- var handleMouseOverVideoModal = function handleMouseOverVideoModal() {
188
- setIsOverModal(true);
189
- };
103
+ }, []);
104
+ (0, _react.useEffect)(function () {
105
+ if (visible) {
106
+ setSmallVideoVisible(false);
107
+ }
108
+ }, [visible]); // *---提供给父组件调用(因为有时间的联动,视频默认从0开始需要手动调用此方法)---*
190
109
 
191
- var handleMouseLeaveVideoModal = function handleMouseLeaveVideoModal() {
192
- setIsOverModal(false);
110
+ var handleSetDefaultTime = function handleSetDefaultTime() {
111
+ setTime("0");
193
112
  };
194
113
 
195
- var handleCloseAndOpenSmallVideo = function handleCloseAndOpenSmallVideo() {
196
- onCancel();
197
- videoRef.current.pause();
198
- showSmallVideo();
199
- }; // 初始获得总时间
200
-
201
-
202
- (0, _react.useEffect)(function () {
203
- videoRef.current.onloadedmetadata = function () {
204
- setTotalTime(videoRef.current.duration.toString());
114
+ (0, _react.useImperativeHandle)(ref, function () {
115
+ return {
116
+ setDefaultTime: handleSetDefaultTime
205
117
  };
206
- }, [videoRef.current.onloadedmetadata]); // 实时播放时间
207
-
118
+ });
208
119
  (0, _react.useEffect)(function () {
209
- videoRef.current.ontimeupdate = function () {
210
- setCurrentTime(videoRef.current.currentTime.toString());
211
- progressRef.current.style.width = "".concat(840 * videoRef.current.currentTime / videoRef.current.duration, "px");
212
- };
213
- }, [videoRef.current.ontimeupdate]); // 初始获得音量宽度
214
-
215
- (0, _react.useEffect)(function () {
216
- volumeRef.current.style.width = "".concat(34 * videoRef.current.volume, "px");
217
- }, [videoRef.current.onloadedmetadata]);
218
- (0, _react.useEffect)(function () {
219
- if (visible) {
220
- videoRef.current.play();
221
- videoRef.current.muted = true;
222
- setIsMuted(true);
223
- setIsPlay(true);
224
- } else {
225
- videoRef.current.pause();
226
- videoRef.current.muted = true;
227
- setIsMuted(true);
228
- setIsPlay(false);
120
+ if (!hasextraButton) {
121
+ setSmallVideoVisible(false);
229
122
  }
230
- }, [visible]);
231
- return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
123
+ }, []);
124
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
125
+ condition: !smallVideoVisible
126
+ }, /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
232
127
  visible: visible,
233
128
  title: title,
234
- onClose: function onClose() {
235
- _onClose();
236
-
237
- videoRef.current.pause();
238
- videoRef.current.muted = true;
239
- setIsMuted(true);
240
- setIsPlay(false);
241
- },
129
+ onClose: onClose,
242
130
  style: {
243
131
  width: "840px",
244
132
  borderRadius: "24px"
@@ -246,77 +134,49 @@ var VideoModal = function VideoModal(props) {
246
134
  noHeadLine: true,
247
135
  noFooterLine: true,
248
136
  noFooter: true,
249
- ref: boxRef
250
- }, /*#__PURE__*/_react["default"].createElement("div", {
251
- className: "".concat(preCls, "__box"),
252
- onMouseOver: handleMouseOverVideoModal,
253
- onMouseLeave: handleMouseLeaveVideoModal,
254
- onFocus: handleMouseOverVideoModal
255
- }, /*#__PURE__*/_react["default"].createElement("video", {
256
- ref: videoRef,
257
- src: videoSrc,
258
- loop: true,
259
- autoPlay: true,
260
- muted: true,
261
- poster: _bigFaqi["default"],
262
- className: "".concat(preCls, "__video")
263
- }), /*#__PURE__*/_react["default"].createElement("div", {
264
- className: (0, _classnames["default"])("".concat(preCls, "__progress"), _defineProperty({}, "".concat(preCls, "__progress--show"), isOverModal)),
265
- onMouseEnter: handleMouseEnterProgress,
266
- onMouseLeave: handleMouseLeaveProgress,
267
- ref: totalProgressRef,
268
- onClick: handleClickTotalProgress,
269
- onMouseDown: handleMouseDownProgress,
270
- onMouseMove: handleMouseMoveProgress,
271
- onMouseUp: handleMouseUpProgress
272
- }, /*#__PURE__*/_react["default"].createElement("div", {
273
- className: "".concat(preCls, "__progress-current"),
274
- ref: progressRef
275
- }, /*#__PURE__*/_react["default"].createElement("div", {
276
- className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__progress-current-dot"), showDot))
277
- }))), /*#__PURE__*/_react["default"].createElement("div", {
278
- className: (0, _classnames["default"])("".concat(preCls, "__controls"), _defineProperty({}, "".concat(preCls, "__controls--show"), isOverModal))
279
- }, /*#__PURE__*/_react["default"].createElement("div", {
280
- className: "".concat(preCls, "__controls-left")
137
+ destroyOnClose: true
281
138
  }, /*#__PURE__*/_react["default"].createElement("div", {
282
- className: "".concat(preCls, "__controls-button"),
283
- onClick: handlePlayVideo
284
- }, /*#__PURE__*/_react["default"].createElement("img", {
285
- src: isPlay ? _pause["default"] : _play["default"],
286
- className: "".concat(preCls, "__controls-play"),
287
- alt: "\u64AD\u653E/\u6682\u505C"
288
- })), /*#__PURE__*/_react["default"].createElement("span", {
289
- className: "".concat(preCls, "__controls-time")
290
- }, (0, _utils["default"])(currentTime)), /*#__PURE__*/_react["default"].createElement("span", {
291
- className: "".concat(preCls, "__controls-time")
292
- }, " / ".concat((0, _utils["default"])(totalTime)))), /*#__PURE__*/_react["default"].createElement("div", {
293
- className: "".concat(preCls, "__controls-right")
139
+ className: "".concat(preCls, "__full")
140
+ }, /*#__PURE__*/_react["default"].createElement(_videoBox["default"], {
141
+ videoSrc: videoSrc,
142
+ containerWidth: 840,
143
+ ref: modalVideoRef,
144
+ extraButton: hasextraButton ? /*#__PURE__*/_react["default"].createElement("div", {
145
+ className: "".concat(preCls, "__full-control"),
146
+ onClick: handleClickToSmall
147
+ }, /*#__PURE__*/_react["default"].createElement("img", {
148
+ src: _small["default"],
149
+ alt: "\u7F29\u5C0F"
150
+ })) : "",
151
+ videoPoster: videoPoster,
152
+ time: time
153
+ })))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
154
+ condition: smallVideoVisible
294
155
  }, /*#__PURE__*/_react["default"].createElement("div", {
295
- className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-button"), isMuted), _defineProperty({}, "".concat(preCls, "__controls-volume"), !isMuted))
296
- }, /*#__PURE__*/_react["default"].createElement("div", {
297
- className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-volume-progress--hidden"), isMuted), "".concat(preCls, "__controls-volume-progress")),
298
- onClick: handleMouseClickVolume
299
- }, /*#__PURE__*/_react["default"].createElement("div", {
300
- className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-volume-current--hidden"), isMuted), "".concat(preCls, "__controls-volume-current")),
301
- ref: volumeRef
302
- })), /*#__PURE__*/_react["default"].createElement("div", {
303
- onClick: handleChangeVolumeMuted
304
- }, /*#__PURE__*/_react["default"].createElement("img", {
305
- src: isMuted ? _muted["default"] : _notMuted["default"],
306
- className: "".concat(preCls, "__controls-play"),
307
- alt: "\u97F3\u91CF"
308
- }))), canMini && /*#__PURE__*/_react["default"].createElement("div", {
309
- className: "".concat(preCls, "__controls-right-shrink"),
310
- onClick: handleCloseAndOpenSmallVideo
311
- }, /*#__PURE__*/_react["default"].createElement("img", {
312
- src: _small["default"],
313
- alt: "small"
314
- })))), /*#__PURE__*/_react["default"].createElement("div", {
315
- className: (0, _classnames["default"])("".concat(preCls, "__mask1"), _defineProperty({}, "".concat(preCls, "__mask1--show"), isOverModal))
316
- }), /*#__PURE__*/_react["default"].createElement("div", {
317
- className: (0, _classnames["default"])("".concat(preCls, "__mask2"), _defineProperty({}, "".concat(preCls, "__mask2--show"), isOverModal))
156
+ className: "".concat(preCls, "__small")
157
+ }, /*#__PURE__*/_react["default"].createElement(_videoBox["default"], {
158
+ videoSrc: videoSrc,
159
+ containerWidth: 360,
160
+ hasHead: true,
161
+ title: title,
162
+ extraButton: /*#__PURE__*/_react["default"].createElement("div", {
163
+ className: "".concat(preCls, "__small-enlarge"),
164
+ onClick: handleClickToFull
165
+ }, /*#__PURE__*/_react["default"].createElement("img", {
166
+ src: _full["default"],
167
+ alt: "\u5168\u5C4F"
168
+ })),
169
+ videoPoster: videoPoster,
170
+ headButton: /*#__PURE__*/_react["default"].createElement("div", {
171
+ className: "".concat(preCls, "__small-close"),
172
+ onClick: handleClickCloseSmallVideo
173
+ }, /*#__PURE__*/_react["default"].createElement("img", {
174
+ src: _close["default"],
175
+ alt: "\u5173\u95ED"
176
+ })),
177
+ ref: smallVideoRef,
178
+ time: time
318
179
  }))));
319
- };
320
-
180
+ });
321
181
  var _default = VideoModal;
322
182
  exports["default"] = _default;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
 
8
- var formatSecToDate = function formatSecToDate(value) {
8
+ var formatSecToTime = function formatSecToTime(value) {
9
9
  var result = parseInt(value, 10);
10
10
  var m = Math.floor(result / 60 % 60) < 10 ? "0".concat(Math.floor(result / 60 % 60)) : Math.floor(result / 60 % 60);
11
11
  var s = Math.floor(result % 60) < 10 ? "0".concat(Math.floor(result % 60)) : Math.floor(result % 60);
@@ -21,5 +21,5 @@ var formatSecToDate = function formatSecToDate(value) {
21
21
  return res;
22
22
  };
23
23
 
24
- var _default = formatSecToDate;
24
+ var _default = formatSecToTime;
25
25
  exports["default"] = _default;