@oceanbase/ui 1.0.0-alpha.2 → 1.0.0-alpha.20

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 (655) hide show
  1. package/dist/static/Inter-Medium.ea234620.woff2 +0 -0
  2. package/dist/static/Inter-Regular.34ba43c9.woff2 +0 -0
  3. package/dist/static/Inter-SemiBold.95439fb4.woff2 +0 -0
  4. package/dist/ui.min.css +1 -1
  5. package/dist/ui.min.js +1 -1
  6. package/es/Action/Group.d.ts +1 -2
  7. package/es/Action/Group.js +340 -62
  8. package/es/Action/Item.d.ts +6 -15
  9. package/es/Action/Item.js +86 -128
  10. package/es/Action/index.d.ts +6 -3
  11. package/es/Action/index.js +1 -0
  12. package/es/Action/style/index.d.ts +2 -2
  13. package/es/Action/style/index.js +8 -4
  14. package/es/BackgroundTaskManager/RefreshMan.js +1 -0
  15. package/es/BackgroundTaskManager/index.d.ts +2 -0
  16. package/es/BackgroundTaskManager/index.js +26 -4
  17. package/es/BasicLayout/Header.js +1 -0
  18. package/es/BasicLayout/index.d.ts +3 -1
  19. package/es/BasicLayout/index.js +63 -24
  20. package/es/BasicLayout/locale/en-US.d.ts +3 -0
  21. package/es/BasicLayout/locale/en-US.js +4 -1
  22. package/es/BasicLayout/locale/ja-JP.d.ts +16 -0
  23. package/es/BasicLayout/locale/ja-JP.js +15 -0
  24. package/es/BasicLayout/locale/zh-CN.d.ts +3 -0
  25. package/es/BasicLayout/locale/zh-CN.js +4 -1
  26. package/es/BasicLayout/locale/zh-TW.d.ts +3 -0
  27. package/es/BasicLayout/locale/zh-TW.js +4 -1
  28. package/es/BasicLayout/style/index.js +45 -25
  29. package/es/BatchOperationBar/index.d.ts +0 -1
  30. package/es/BatchOperationBar/index.js +33 -17
  31. package/es/BatchOperationBar/locale/en-US.d.ts +1 -0
  32. package/es/BatchOperationBar/locale/en-US.js +2 -1
  33. package/es/BatchOperationBar/locale/ja-JP.d.ts +8 -0
  34. package/es/BatchOperationBar/locale/ja-JP.js +7 -0
  35. package/es/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  36. package/es/BatchOperationBar/locale/zh-CN.js +2 -1
  37. package/es/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  38. package/es/BatchOperationBar/locale/zh-TW.js +2 -1
  39. package/es/BatchOperationBar/style/index.d.ts +10 -0
  40. package/es/BatchOperationBar/style/index.js +56 -0
  41. package/es/Boundary/Components/Code.js +13 -6
  42. package/es/Boundary/Components/Exception.js +86 -74
  43. package/es/Boundary/Components/Function.js +13 -6
  44. package/es/Boundary/index.d.ts +0 -1
  45. package/es/Boundary/index.js +1 -1
  46. package/es/Boundary/locale/en-US.js +1 -1
  47. package/es/Boundary/locale/ja-JP.d.ts +11 -0
  48. package/es/Boundary/locale/ja-JP.js +10 -0
  49. package/es/Boundary/locale/zh-CN.js +1 -1
  50. package/es/Boundary/locale/zh-TW.js +1 -1
  51. package/es/Boundary/style/index.d.ts +10 -0
  52. package/es/Boundary/style/index.js +48 -0
  53. package/es/ContentWithIcon/index.d.ts +0 -1
  54. package/es/ContentWithIcon/index.js +30 -29
  55. package/es/ContentWithIcon/style/index.d.ts +10 -0
  56. package/es/ContentWithIcon/style/index.js +26 -0
  57. package/es/ContentWithQuestion/index.js +1 -0
  58. package/es/DateRanger/EditableDateTimeInput.d.ts +23 -0
  59. package/es/DateRanger/EditableDateTimeInput.js +129 -0
  60. package/es/DateRanger/PickerPanel.js +37 -20
  61. package/es/DateRanger/Ranger.d.ts +4 -2
  62. package/es/DateRanger/Ranger.js +71 -49
  63. package/es/DateRanger/hooks/index.d.ts +4 -0
  64. package/es/DateRanger/hooks/index.js +2 -0
  65. package/es/DateRanger/hooks/useAutoWidthInput.d.ts +13 -0
  66. package/es/DateRanger/hooks/useAutoWidthInput.js +44 -0
  67. package/es/DateRanger/hooks/useSegmentedInput.d.ts +31 -0
  68. package/es/DateRanger/hooks/useSegmentedInput.js +304 -0
  69. package/es/DateRanger/index.js +1 -0
  70. package/es/DateRanger/locale/en-US.d.ts +2 -0
  71. package/es/DateRanger/locale/en-US.js +3 -1
  72. package/es/DateRanger/locale/ja-JP.d.ts +58 -0
  73. package/es/DateRanger/locale/ja-JP.js +22 -0
  74. package/es/DateRanger/locale/zh-CN.d.ts +2 -0
  75. package/es/DateRanger/locale/zh-CN.js +3 -1
  76. package/es/DateRanger/locale/zh-TW.d.ts +2 -0
  77. package/es/DateRanger/locale/zh-TW.js +3 -1
  78. package/es/DateRanger/style/index.d.ts +10 -0
  79. package/es/DateRanger/style/index.js +164 -0
  80. package/es/Dialog/Anchor.d.ts +2 -10
  81. package/es/Dialog/Anchor.js +68 -96
  82. package/es/Dialog/EventProxy.js +1 -0
  83. package/es/Dialog/index.d.ts +5 -1
  84. package/es/Dialog/index.js +599 -576
  85. package/es/Dialog/locale/en-US.d.ts +5 -0
  86. package/es/Dialog/locale/en-US.js +6 -1
  87. package/es/Dialog/locale/ja-JP.d.ts +10 -0
  88. package/es/Dialog/locale/ja-JP.js +9 -0
  89. package/es/Dialog/locale/zh-CN.d.ts +5 -0
  90. package/es/Dialog/locale/zh-CN.js +6 -1
  91. package/es/Dialog/locale/zh-TW.d.ts +5 -0
  92. package/es/Dialog/locale/zh-TW.js +6 -1
  93. package/es/Dialog/style/index.d.ts +10 -0
  94. package/es/Dialog/style/index.js +116 -0
  95. package/es/DocDialog/index.js +29 -9
  96. package/es/DocDialog/locale/en-US.d.ts +3 -1
  97. package/es/DocDialog/locale/en-US.js +3 -1
  98. package/es/DocDialog/locale/ja-JP.d.ts +4 -0
  99. package/es/DocDialog/locale/ja-JP.js +3 -0
  100. package/es/DocDialog/locale/zh-CN.d.ts +3 -1
  101. package/es/DocDialog/locale/zh-CN.js +3 -1
  102. package/es/DocDialog/locale/zh-TW.d.ts +3 -1
  103. package/es/DocDialog/locale/zh-TW.js +3 -1
  104. package/es/FooterToolbar/index.d.ts +7 -4
  105. package/es/FooterToolbar/index.js +28 -11
  106. package/es/FooterToolbar/locale/en-US.d.ts +4 -0
  107. package/es/FooterToolbar/locale/en-US.js +3 -0
  108. package/es/FooterToolbar/locale/ja-JP.d.ts +4 -0
  109. package/es/FooterToolbar/locale/ja-JP.js +3 -0
  110. package/es/FooterToolbar/locale/zh-CN.d.ts +4 -0
  111. package/es/FooterToolbar/locale/zh-CN.js +3 -0
  112. package/es/FooterToolbar/locale/zh-TW.d.ts +4 -0
  113. package/es/FooterToolbar/locale/zh-TW.js +3 -0
  114. package/es/FooterToolbar/style/index.d.ts +0 -2
  115. package/es/FooterToolbar/style/index.js +10 -19
  116. package/es/FullscreenBox/index.d.ts +0 -1
  117. package/es/FullscreenBox/index.js +62 -44
  118. package/es/FullscreenBox/locale/en-US.d.ts +4 -1
  119. package/es/FullscreenBox/locale/en-US.js +4 -1
  120. package/es/FullscreenBox/locale/ja-JP.d.ts +5 -0
  121. package/es/FullscreenBox/locale/ja-JP.js +4 -0
  122. package/es/FullscreenBox/locale/zh-CN.d.ts +4 -1
  123. package/es/FullscreenBox/locale/zh-CN.js +4 -1
  124. package/es/FullscreenBox/locale/zh-TW.d.ts +4 -1
  125. package/es/FullscreenBox/locale/zh-TW.js +4 -1
  126. package/es/FullscreenBox/style/index.d.ts +10 -0
  127. package/es/FullscreenBox/style/index.js +74 -0
  128. package/es/Highlight/DiffView/DiffCells.js +1 -0
  129. package/es/Highlight/DiffView/index.d.ts +0 -1
  130. package/es/Highlight/DiffView/index.js +6 -5
  131. package/es/Highlight/HighlightCell.js +1 -0
  132. package/es/Highlight/JsonView.d.ts +0 -1
  133. package/es/Highlight/JsonView.js +6 -5
  134. package/es/Highlight/index.d.ts +1 -2
  135. package/es/Highlight/index.js +33 -25
  136. package/es/Highlight/locale/en-US.d.ts +2 -0
  137. package/es/Highlight/locale/en-US.js +3 -1
  138. package/es/Highlight/locale/ja-JP.d.ts +6 -0
  139. package/es/Highlight/locale/ja-JP.js +5 -0
  140. package/es/Highlight/locale/zh-CN.d.ts +2 -0
  141. package/es/Highlight/locale/zh-CN.js +3 -1
  142. package/es/Highlight/locale/zh-TW.d.ts +2 -0
  143. package/es/Highlight/locale/zh-TW.js +3 -1
  144. package/es/Highlight/style/index.d.ts +10 -0
  145. package/es/Highlight/style/index.js +213 -0
  146. package/es/Highlight/useKeyDownCopyEvent.js +1 -0
  147. package/es/IconFont/index.js +1 -0
  148. package/es/LightFilter/index.d.ts +6 -2
  149. package/es/LightFilter/index.js +25 -8
  150. package/es/LightFilter/locale/en-US.d.ts +4 -0
  151. package/es/LightFilter/locale/en-US.js +3 -0
  152. package/es/LightFilter/locale/ja-JP.d.ts +4 -0
  153. package/es/LightFilter/locale/ja-JP.js +3 -0
  154. package/es/LightFilter/locale/zh-CN.d.ts +4 -0
  155. package/es/LightFilter/locale/zh-CN.js +3 -0
  156. package/es/LightFilter/locale/zh-TW.d.ts +4 -0
  157. package/es/LightFilter/locale/zh-TW.js +3 -0
  158. package/es/LocaleDropdown/index.js +5 -2
  159. package/es/Login/ActivateForm.d.ts +0 -1
  160. package/es/Login/ActivateForm.js +13 -9
  161. package/es/Login/LoginForm.d.ts +0 -1
  162. package/es/Login/LoginForm.js +21 -15
  163. package/es/Login/RegisterForm.d.ts +0 -1
  164. package/es/Login/RegisterForm.js +15 -11
  165. package/es/Login/index.d.ts +0 -1
  166. package/es/Login/index.js +25 -22
  167. package/es/Login/locale/ja-JP.d.ts +28 -0
  168. package/es/Login/locale/ja-JP.js +27 -0
  169. package/es/Login/locale/zh-CN.js +2 -2
  170. package/es/Login/style/index.d.ts +10 -0
  171. package/es/Login/style/index.js +182 -0
  172. package/es/Lottie/index.js +1 -0
  173. package/es/NavMenu/index.d.ts +5 -3
  174. package/es/NavMenu/index.js +39 -13
  175. package/es/NavMenu/locale/en-US.d.ts +4 -0
  176. package/es/NavMenu/locale/en-US.js +3 -0
  177. package/es/NavMenu/locale/ja-JP.d.ts +4 -0
  178. package/es/NavMenu/locale/ja-JP.js +3 -0
  179. package/es/NavMenu/locale/zh-CN.d.ts +4 -0
  180. package/es/NavMenu/locale/zh-CN.js +3 -0
  181. package/es/NavMenu/locale/zh-TW.d.ts +4 -0
  182. package/es/NavMenu/locale/zh-TW.js +3 -0
  183. package/es/NavMenu/style/index.d.ts +10 -0
  184. package/es/NavMenu/style/index.js +47 -0
  185. package/es/PageContainer/ItemRender.js +1 -0
  186. package/es/PageContainer/index.d.ts +2 -0
  187. package/es/PageContainer/index.js +124 -30
  188. package/es/PageContainer/locale/en-US.d.ts +1 -0
  189. package/es/PageContainer/locale/en-US.js +2 -1
  190. package/es/PageContainer/locale/ja-JP.d.ts +5 -0
  191. package/es/PageContainer/locale/ja-JP.js +4 -0
  192. package/es/PageContainer/locale/zh-CN.d.ts +1 -0
  193. package/es/PageContainer/locale/zh-CN.js +2 -1
  194. package/es/PageContainer/locale/zh-TW.d.ts +1 -0
  195. package/es/PageContainer/locale/zh-TW.js +2 -1
  196. package/es/PageContainer/style/index.js +42 -13
  197. package/es/PageLoading/index.js +1 -0
  198. package/es/Password/Content.d.ts +2 -0
  199. package/es/Password/Content.js +12 -3
  200. package/es/Password/index.d.ts +1 -0
  201. package/es/Password/index.js +19 -14
  202. package/es/Password/locale/en-US.d.ts +1 -0
  203. package/es/Password/locale/en-US.js +2 -1
  204. package/es/Password/locale/ja-JP.d.ts +14 -0
  205. package/es/Password/locale/ja-JP.js +13 -0
  206. package/es/Password/locale/zh-CN.d.ts +1 -0
  207. package/es/Password/locale/zh-CN.js +1 -0
  208. package/es/Password/locale/zh-TW.d.ts +1 -0
  209. package/es/Password/locale/zh-TW.js +2 -1
  210. package/es/ProCard/index.js +1 -0
  211. package/es/ProCard/style/index.d.ts +2 -2
  212. package/es/ProCard/style/index.js +12 -6
  213. package/es/ProTable/index.js +10 -2
  214. package/es/ProTable/style/index.d.ts +2 -2
  215. package/es/ProTable/style/index.js +10 -5
  216. package/es/Ranger/QuickPicker.js +9 -4
  217. package/es/Ranger/Ranger.d.ts +0 -1
  218. package/es/Ranger/Ranger.js +13 -9
  219. package/es/Ranger/index.js +1 -0
  220. package/es/Ranger/locale/ja-JP.d.ts +28 -0
  221. package/es/Ranger/locale/ja-JP.js +29 -0
  222. package/es/Ranger/style/index.d.ts +10 -0
  223. package/es/Ranger/style/index.js +44 -0
  224. package/es/SideTip/Dragger.js +3 -1
  225. package/es/SideTip/IconLoading.js +1 -0
  226. package/es/SideTip/index.d.ts +0 -1
  227. package/es/SideTip/index.js +62 -29
  228. package/es/SideTip/locale/en-US.d.ts +4 -1
  229. package/es/SideTip/locale/en-US.js +4 -1
  230. package/es/SideTip/locale/ja-JP.d.ts +5 -0
  231. package/es/SideTip/locale/ja-JP.js +4 -0
  232. package/es/SideTip/locale/zh-CN.d.ts +4 -1
  233. package/es/SideTip/locale/zh-CN.js +4 -1
  234. package/es/SideTip/locale/zh-TW.d.ts +4 -1
  235. package/es/SideTip/locale/zh-TW.js +4 -1
  236. package/es/SideTip/style/index.d.ts +10 -0
  237. package/es/SideTip/style/index.js +171 -0
  238. package/es/TagSelect/Group.d.ts +6 -6
  239. package/es/TagSelect/Group.js +11 -4
  240. package/es/TagSelect/Item.js +8 -4
  241. package/es/TagSelect/index.js +1 -0
  242. package/es/TreeSearch/index.js +1 -0
  243. package/es/Welcome/index.d.ts +0 -1
  244. package/es/Welcome/index.js +31 -26
  245. package/es/Welcome/locale/ja-JP.d.ts +5 -0
  246. package/es/Welcome/locale/ja-JP.js +4 -0
  247. package/es/Welcome/step/style/index.d.ts +10 -0
  248. package/es/Welcome/step/style/index.js +44 -0
  249. package/es/Welcome/step.d.ts +0 -1
  250. package/es/Welcome/step.js +18 -14
  251. package/es/Welcome/style/index.d.ts +10 -0
  252. package/es/Welcome/style/index.js +141 -0
  253. package/es/_util/genComponentStyleHook.d.ts +4 -3
  254. package/es/_util/genComponentStyleHook.js +1 -1
  255. package/es/_util/index.js +6 -0
  256. package/es/assets/logo/oceanbase_logo.svg +45 -29
  257. package/es/assets/logo/oceanbase_logo_dark.svg +45 -29
  258. package/es/assets/logo/oceanbase_watermark.svg +45 -31
  259. package/es/constant/index.js +1 -0
  260. package/es/index.d.ts +0 -5
  261. package/es/index.js +1 -3
  262. package/es/locale/LocaleWrapper.js +1 -0
  263. package/es/locale/en-US.js +6 -4
  264. package/es/locale/index.js +1 -0
  265. package/es/locale/ja-JP.d.ts +3 -0
  266. package/es/locale/ja-JP.js +44 -0
  267. package/es/locale/zh-CN.js +6 -4
  268. package/es/locale/zh-TW.js +6 -4
  269. package/lib/Action/Group.d.ts +1 -2
  270. package/lib/Action/Group.js +354 -121
  271. package/lib/Action/Item.d.ts +6 -15
  272. package/lib/Action/Item.js +81 -110
  273. package/lib/Action/index.d.ts +6 -3
  274. package/lib/Action/index.js +13 -36
  275. package/lib/Action/style/index.d.ts +2 -2
  276. package/lib/Action/style/index.js +38 -41
  277. package/lib/BackgroundTaskManager/RefreshMan.js +34 -60
  278. package/lib/BackgroundTaskManager/constants.js +10 -32
  279. package/lib/BackgroundTaskManager/index.d.ts +2 -0
  280. package/lib/BackgroundTaskManager/index.js +137 -135
  281. package/lib/BasicLayout/Header.js +238 -138
  282. package/lib/BasicLayout/index.d.ts +3 -1
  283. package/lib/BasicLayout/index.js +306 -292
  284. package/lib/BasicLayout/locale/en-US.d.ts +3 -0
  285. package/lib/BasicLayout/locale/en-US.js +19 -34
  286. package/lib/BasicLayout/locale/ja-JP.d.ts +16 -0
  287. package/lib/BasicLayout/locale/ja-JP.js +21 -0
  288. package/lib/BasicLayout/locale/zh-CN.d.ts +3 -0
  289. package/lib/BasicLayout/locale/zh-CN.js +19 -34
  290. package/lib/BasicLayout/locale/zh-TW.d.ts +3 -0
  291. package/lib/BasicLayout/locale/zh-TW.js +19 -34
  292. package/lib/BasicLayout/style/Header.js +41 -60
  293. package/lib/BasicLayout/style/index.js +201 -204
  294. package/lib/BatchOperationBar/index.d.ts +0 -1
  295. package/lib/BatchOperationBar/index.js +119 -132
  296. package/lib/BatchOperationBar/locale/en-US.d.ts +1 -0
  297. package/lib/BatchOperationBar/locale/en-US.js +11 -28
  298. package/lib/BatchOperationBar/locale/ja-JP.d.ts +8 -0
  299. package/lib/BatchOperationBar/locale/ja-JP.js +13 -0
  300. package/lib/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  301. package/lib/BatchOperationBar/locale/zh-CN.js +11 -28
  302. package/lib/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  303. package/lib/BatchOperationBar/locale/zh-TW.js +11 -28
  304. package/lib/BatchOperationBar/style/index.d.ts +10 -0
  305. package/lib/BatchOperationBar/style/index.js +71 -0
  306. package/lib/Boundary/Components/Code.js +57 -64
  307. package/lib/Boundary/Components/Exception.js +117 -117
  308. package/lib/Boundary/Components/Function.js +47 -51
  309. package/lib/Boundary/Components/index.js +36 -25
  310. package/lib/Boundary/IBoundary.js +4 -16
  311. package/lib/Boundary/constant.js +16 -38
  312. package/lib/Boundary/index.d.ts +0 -1
  313. package/lib/Boundary/index.js +11 -26
  314. package/lib/Boundary/locale/en-US.js +14 -32
  315. package/lib/Boundary/locale/ja-JP.d.ts +11 -0
  316. package/lib/Boundary/locale/ja-JP.js +16 -0
  317. package/lib/Boundary/locale/zh-CN.js +14 -32
  318. package/lib/Boundary/locale/zh-TW.js +14 -32
  319. package/lib/Boundary/style/index.d.ts +10 -0
  320. package/lib/Boundary/style/index.js +57 -0
  321. package/lib/Boundary/utils.js +9 -31
  322. package/lib/ContentWithIcon/index.d.ts +0 -1
  323. package/lib/ContentWithIcon/index.js +99 -102
  324. package/lib/ContentWithIcon/style/index.d.ts +10 -0
  325. package/lib/ContentWithIcon/style/index.js +38 -0
  326. package/lib/ContentWithQuestion/index.js +40 -48
  327. package/lib/ContentWithQuestion/style/index.js +16 -35
  328. package/lib/DateRanger/EditableDateTimeInput.d.ts +23 -0
  329. package/lib/DateRanger/EditableDateTimeInput.js +131 -0
  330. package/lib/DateRanger/PickerPanel.js +341 -294
  331. package/lib/DateRanger/Ranger.d.ts +4 -2
  332. package/lib/DateRanger/Ranger.js +376 -405
  333. package/lib/DateRanger/constant/index.js +188 -376
  334. package/lib/DateRanger/hooks/index.d.ts +4 -0
  335. package/lib/DateRanger/hooks/index.js +19 -0
  336. package/lib/DateRanger/hooks/useAutoWidthInput.d.ts +13 -0
  337. package/lib/DateRanger/hooks/useAutoWidthInput.js +37 -0
  338. package/lib/DateRanger/hooks/useSegmentedInput.d.ts +31 -0
  339. package/lib/DateRanger/hooks/useSegmentedInput.js +233 -0
  340. package/lib/DateRanger/index.js +45 -65
  341. package/lib/DateRanger/locale/en-US.d.ts +2 -0
  342. package/lib/DateRanger/locale/en-US.js +22 -47
  343. package/lib/DateRanger/locale/ja-JP.d.ts +58 -0
  344. package/lib/DateRanger/locale/ja-JP.js +24 -0
  345. package/lib/DateRanger/locale/zh-CN.d.ts +2 -0
  346. package/lib/DateRanger/locale/zh-CN.js +22 -47
  347. package/lib/DateRanger/locale/zh-TW.d.ts +2 -0
  348. package/lib/DateRanger/locale/zh-TW.js +22 -47
  349. package/lib/DateRanger/style/index.d.ts +10 -0
  350. package/lib/DateRanger/style/index.js +224 -0
  351. package/lib/DateRanger/typing.js +4 -16
  352. package/lib/Dialog/Anchor.d.ts +2 -10
  353. package/lib/Dialog/Anchor.js +80 -105
  354. package/lib/Dialog/Dock.js +14 -36
  355. package/lib/Dialog/EventProxy.js +21 -49
  356. package/lib/Dialog/index.d.ts +5 -1
  357. package/lib/Dialog/index.js +581 -519
  358. package/lib/Dialog/locale/en-US.d.ts +5 -0
  359. package/lib/Dialog/locale/en-US.js +13 -26
  360. package/lib/Dialog/locale/ja-JP.d.ts +10 -0
  361. package/lib/Dialog/locale/ja-JP.js +15 -0
  362. package/lib/Dialog/locale/zh-CN.d.ts +5 -0
  363. package/lib/Dialog/locale/zh-CN.js +13 -26
  364. package/lib/Dialog/locale/zh-TW.d.ts +5 -0
  365. package/lib/Dialog/locale/zh-TW.js +13 -26
  366. package/lib/Dialog/style/index.d.ts +10 -0
  367. package/lib/Dialog/style/index.js +137 -0
  368. package/lib/DocDialog/index.js +69 -81
  369. package/lib/DocDialog/locale/en-US.d.ts +3 -1
  370. package/lib/DocDialog/locale/en-US.js +7 -23
  371. package/lib/DocDialog/locale/ja-JP.d.ts +4 -0
  372. package/lib/DocDialog/locale/ja-JP.js +9 -0
  373. package/lib/DocDialog/locale/zh-CN.d.ts +3 -1
  374. package/lib/DocDialog/locale/zh-CN.js +7 -23
  375. package/lib/DocDialog/locale/zh-TW.d.ts +3 -1
  376. package/lib/DocDialog/locale/zh-TW.js +7 -23
  377. package/lib/FooterToolbar/index.d.ts +7 -4
  378. package/lib/FooterToolbar/index.js +48 -50
  379. package/lib/FooterToolbar/locale/en-US.d.ts +4 -0
  380. package/lib/FooterToolbar/locale/en-US.js +9 -0
  381. package/lib/FooterToolbar/locale/ja-JP.d.ts +4 -0
  382. package/lib/FooterToolbar/locale/ja-JP.js +9 -0
  383. package/lib/FooterToolbar/locale/zh-CN.d.ts +4 -0
  384. package/lib/FooterToolbar/locale/zh-CN.js +9 -0
  385. package/lib/FooterToolbar/locale/zh-TW.d.ts +4 -0
  386. package/lib/FooterToolbar/locale/zh-TW.js +9 -0
  387. package/lib/FooterToolbar/style/index.d.ts +0 -2
  388. package/lib/FooterToolbar/style/index.js +25 -54
  389. package/lib/FullscreenBox/index.d.ts +0 -1
  390. package/lib/FullscreenBox/index.js +159 -121
  391. package/lib/FullscreenBox/locale/en-US.d.ts +4 -1
  392. package/lib/FullscreenBox/locale/en-US.js +8 -23
  393. package/lib/FullscreenBox/locale/ja-JP.d.ts +5 -0
  394. package/lib/FullscreenBox/locale/ja-JP.js +10 -0
  395. package/lib/FullscreenBox/locale/zh-CN.d.ts +4 -1
  396. package/lib/FullscreenBox/locale/zh-CN.js +8 -23
  397. package/lib/FullscreenBox/locale/zh-TW.d.ts +4 -1
  398. package/lib/FullscreenBox/locale/zh-TW.js +8 -23
  399. package/lib/FullscreenBox/style/index.d.ts +10 -0
  400. package/lib/FullscreenBox/style/index.js +90 -0
  401. package/lib/Highlight/DiffView/DiffCells.js +35 -49
  402. package/lib/Highlight/DiffView/index.d.ts +0 -1
  403. package/lib/Highlight/DiffView/index.js +154 -149
  404. package/lib/Highlight/HighlightCell.js +29 -46
  405. package/lib/Highlight/JsonView.d.ts +0 -1
  406. package/lib/Highlight/JsonView.js +45 -74
  407. package/lib/Highlight/index.d.ts +1 -2
  408. package/lib/Highlight/index.js +204 -204
  409. package/lib/Highlight/languages/bash.js +7 -34
  410. package/lib/Highlight/languages/cpp.js +7 -34
  411. package/lib/Highlight/languages/css.js +7 -34
  412. package/lib/Highlight/languages/dockerfile.js +7 -34
  413. package/lib/Highlight/languages/go.js +7 -34
  414. package/lib/Highlight/languages/groovy.js +7 -34
  415. package/lib/Highlight/languages/http.js +7 -34
  416. package/lib/Highlight/languages/java.js +7 -34
  417. package/lib/Highlight/languages/javascript.js +7 -34
  418. package/lib/Highlight/languages/json.js +7 -34
  419. package/lib/Highlight/languages/markdown.js +7 -34
  420. package/lib/Highlight/languages/nginx.js +7 -34
  421. package/lib/Highlight/languages/python.js +7 -34
  422. package/lib/Highlight/languages/ruby.js +7 -34
  423. package/lib/Highlight/languages/solidity.js +7 -34
  424. package/lib/Highlight/languages/sql.js +7 -34
  425. package/lib/Highlight/languages/typescript.js +7 -34
  426. package/lib/Highlight/languages/xml.js +7 -34
  427. package/lib/Highlight/languages/yaml.js +7 -34
  428. package/lib/Highlight/locale/en-US.d.ts +2 -0
  429. package/lib/Highlight/locale/en-US.js +9 -25
  430. package/lib/Highlight/locale/ja-JP.d.ts +6 -0
  431. package/lib/Highlight/locale/ja-JP.js +11 -0
  432. package/lib/Highlight/locale/zh-CN.d.ts +2 -0
  433. package/lib/Highlight/locale/zh-CN.js +9 -25
  434. package/lib/Highlight/locale/zh-TW.d.ts +2 -0
  435. package/lib/Highlight/locale/zh-TW.js +9 -25
  436. package/lib/Highlight/style/index.d.ts +10 -0
  437. package/lib/Highlight/style/index.js +277 -0
  438. package/lib/Highlight/useKeyDownCopyEvent.js +40 -65
  439. package/lib/IconFont/index.js +23 -39
  440. package/lib/LightFilter/index.d.ts +6 -2
  441. package/lib/LightFilter/index.js +46 -43
  442. package/lib/LightFilter/locale/en-US.d.ts +4 -0
  443. package/lib/LightFilter/locale/en-US.js +9 -0
  444. package/lib/LightFilter/locale/ja-JP.d.ts +4 -0
  445. package/lib/LightFilter/locale/ja-JP.js +9 -0
  446. package/lib/LightFilter/locale/zh-CN.d.ts +4 -0
  447. package/lib/LightFilter/locale/zh-CN.js +9 -0
  448. package/lib/LightFilter/locale/zh-TW.d.ts +4 -0
  449. package/lib/LightFilter/locale/zh-TW.js +9 -0
  450. package/lib/LightFilter/style/index.js +15 -33
  451. package/lib/LocaleDropdown/index.js +44 -61
  452. package/lib/Login/ActivateForm.d.ts +0 -1
  453. package/lib/Login/ActivateForm.js +93 -119
  454. package/lib/Login/LoginForm.d.ts +0 -1
  455. package/lib/Login/LoginForm.js +135 -150
  456. package/lib/Login/RegisterForm.d.ts +0 -1
  457. package/lib/Login/RegisterForm.js +122 -163
  458. package/lib/Login/index.d.ts +0 -1
  459. package/lib/Login/index.js +156 -132
  460. package/lib/Login/locale/en-US.js +31 -49
  461. package/lib/Login/locale/ja-JP.d.ts +28 -0
  462. package/lib/Login/locale/ja-JP.js +33 -0
  463. package/lib/Login/locale/zh-CN.js +31 -49
  464. package/lib/Login/locale/zh-TW.js +30 -48
  465. package/lib/Login/style/index.d.ts +10 -0
  466. package/lib/Login/style/index.js +246 -0
  467. package/lib/Lottie/index.js +7 -25
  468. package/lib/NavMenu/index.d.ts +5 -3
  469. package/lib/NavMenu/index.js +118 -103
  470. package/lib/NavMenu/locale/en-US.d.ts +4 -0
  471. package/lib/NavMenu/locale/en-US.js +9 -0
  472. package/lib/NavMenu/locale/ja-JP.d.ts +4 -0
  473. package/lib/NavMenu/locale/ja-JP.js +9 -0
  474. package/lib/NavMenu/locale/zh-CN.d.ts +4 -0
  475. package/lib/NavMenu/locale/zh-CN.js +9 -0
  476. package/lib/NavMenu/locale/zh-TW.d.ts +4 -0
  477. package/lib/NavMenu/locale/zh-TW.js +9 -0
  478. package/lib/NavMenu/style/index.d.ts +10 -0
  479. package/lib/NavMenu/style/index.js +60 -0
  480. package/lib/PageContainer/ItemRender.js +27 -46
  481. package/lib/PageContainer/index.d.ts +2 -0
  482. package/lib/PageContainer/index.js +167 -97
  483. package/lib/PageContainer/locale/en-US.d.ts +1 -0
  484. package/lib/PageContainer/locale/en-US.js +8 -25
  485. package/lib/PageContainer/locale/ja-JP.d.ts +5 -0
  486. package/lib/PageContainer/locale/ja-JP.js +10 -0
  487. package/lib/PageContainer/locale/zh-CN.d.ts +1 -0
  488. package/lib/PageContainer/locale/zh-CN.js +8 -25
  489. package/lib/PageContainer/locale/zh-TW.d.ts +1 -0
  490. package/lib/PageContainer/locale/zh-TW.js +8 -25
  491. package/lib/PageContainer/style/index.js +69 -45
  492. package/lib/PageLoading/index.js +32 -64
  493. package/lib/Password/Content.d.ts +2 -0
  494. package/lib/Password/Content.js +99 -84
  495. package/lib/Password/index.d.ts +1 -0
  496. package/lib/Password/index.js +127 -141
  497. package/lib/Password/locale/en-US.d.ts +1 -0
  498. package/lib/Password/locale/en-US.js +15 -32
  499. package/lib/Password/locale/ja-JP.d.ts +14 -0
  500. package/lib/Password/locale/ja-JP.js +19 -0
  501. package/lib/Password/locale/zh-CN.d.ts +1 -0
  502. package/lib/Password/locale/zh-CN.js +16 -33
  503. package/lib/Password/locale/zh-TW.d.ts +1 -0
  504. package/lib/Password/locale/zh-TW.js +15 -32
  505. package/lib/ProCard/index.js +77 -98
  506. package/lib/ProCard/style/index.d.ts +2 -2
  507. package/lib/ProCard/style/index.js +32 -38
  508. package/lib/ProTable/index.js +102 -122
  509. package/lib/ProTable/style/index.d.ts +2 -2
  510. package/lib/ProTable/style/index.js +29 -37
  511. package/lib/Ranger/QuickPicker.js +91 -83
  512. package/lib/Ranger/Ranger.d.ts +0 -1
  513. package/lib/Ranger/Ranger.js +98 -128
  514. package/lib/Ranger/constant/index.js +115 -266
  515. package/lib/Ranger/index.js +61 -70
  516. package/lib/Ranger/locale/en-US.js +31 -49
  517. package/lib/Ranger/locale/ja-JP.d.ts +28 -0
  518. package/lib/Ranger/locale/ja-JP.js +35 -0
  519. package/lib/Ranger/locale/zh-CN.js +7 -25
  520. package/lib/Ranger/locale/zh-TW.js +7 -25
  521. package/lib/Ranger/style/index.d.ts +10 -0
  522. package/lib/Ranger/style/index.js +64 -0
  523. package/lib/Ranger/typing.js +4 -16
  524. package/lib/SideTip/Dragger.js +259 -219
  525. package/lib/SideTip/IconLoading.js +43 -75
  526. package/lib/SideTip/index.d.ts +0 -1
  527. package/lib/SideTip/index.js +160 -116
  528. package/lib/SideTip/locale/en-US.d.ts +4 -1
  529. package/lib/SideTip/locale/en-US.js +8 -23
  530. package/lib/SideTip/locale/ja-JP.d.ts +5 -0
  531. package/lib/SideTip/locale/ja-JP.js +10 -0
  532. package/lib/SideTip/locale/zh-CN.d.ts +4 -1
  533. package/lib/SideTip/locale/zh-CN.js +8 -23
  534. package/lib/SideTip/locale/zh-TW.d.ts +4 -1
  535. package/lib/SideTip/locale/zh-TW.js +8 -23
  536. package/lib/SideTip/style/index.d.ts +10 -0
  537. package/lib/SideTip/style/index.js +204 -0
  538. package/lib/SideTip/utils.js +40 -61
  539. package/lib/TagSelect/Group.d.ts +6 -6
  540. package/lib/TagSelect/Group.js +68 -79
  541. package/lib/TagSelect/Item.js +67 -86
  542. package/lib/TagSelect/TagSelectContext.js +7 -25
  543. package/lib/TagSelect/index.js +12 -36
  544. package/lib/TagSelect/style/index.js +41 -64
  545. package/lib/TreeSearch/index.js +133 -132
  546. package/lib/TreeSearch/util.js +52 -70
  547. package/lib/Welcome/index.d.ts +0 -1
  548. package/lib/Welcome/index.js +140 -84
  549. package/lib/Welcome/locale/en-US.js +8 -26
  550. package/lib/Welcome/locale/ja-JP.d.ts +5 -0
  551. package/lib/Welcome/locale/ja-JP.js +10 -0
  552. package/lib/Welcome/locale/zh-CN.js +8 -26
  553. package/lib/Welcome/locale/zh-TW.js +8 -26
  554. package/lib/Welcome/step/style/index.d.ts +10 -0
  555. package/lib/Welcome/step/style/index.js +58 -0
  556. package/lib/Welcome/step.d.ts +0 -1
  557. package/lib/Welcome/step.js +63 -49
  558. package/lib/Welcome/style/index.d.ts +10 -0
  559. package/lib/Welcome/style/index.js +176 -0
  560. package/lib/_util/genComponentStyleHook.d.ts +4 -3
  561. package/lib/_util/genComponentStyleHook.js +15 -43
  562. package/lib/_util/index.js +43 -44
  563. package/lib/_util/useNavigate.js +11 -26
  564. package/lib/assets/logo/oceanbase_logo.svg +45 -29
  565. package/lib/assets/logo/oceanbase_logo_dark.svg +45 -29
  566. package/lib/assets/logo/oceanbase_watermark.svg +45 -31
  567. package/lib/constant/index.js +23 -50
  568. package/lib/index.d.ts +0 -5
  569. package/lib/index.js +282 -136
  570. package/lib/interface.js +4 -16
  571. package/lib/locale/LocaleWrapper.js +52 -62
  572. package/lib/locale/en-US.js +43 -68
  573. package/lib/locale/index.js +5 -17
  574. package/lib/locale/ja-JP.d.ts +3 -0
  575. package/lib/locale/ja-JP.js +46 -0
  576. package/lib/locale/zh-CN.js +42 -67
  577. package/lib/locale/zh-TW.js +38 -63
  578. package/package.json +9 -12
  579. package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
  580. package/es/BatchOperationBar/index.less +0 -46
  581. package/es/BatchOperationBar/index.less.d.ts +0 -15
  582. package/es/Boundary/index.less +0 -36
  583. package/es/ContentWithIcon/index.less +0 -21
  584. package/es/DateRanger/index.less +0 -180
  585. package/es/Dialog/index.less +0 -116
  586. package/es/FullscreenBox/index.less +0 -49
  587. package/es/GraphToolbar/index.d.ts +0 -26
  588. package/es/GraphToolbar/index.js +0 -146
  589. package/es/GraphToolbar/index.less +0 -65
  590. package/es/GraphToolbar/locale/en-US.d.ts +0 -9
  591. package/es/GraphToolbar/locale/en-US.js +0 -8
  592. package/es/GraphToolbar/locale/zh-CN.d.ts +0 -9
  593. package/es/GraphToolbar/locale/zh-CN.js +0 -8
  594. package/es/GraphToolbar/locale/zh-TW.d.ts +0 -9
  595. package/es/GraphToolbar/locale/zh-TW.js +0 -8
  596. package/es/Highlight/index.less +0 -381
  597. package/es/Login/index.less +0 -268
  598. package/es/NavMenu/index.less +0 -50
  599. package/es/Ranger/index.less +0 -57
  600. package/es/SideTip/index.less +0 -180
  601. package/es/TaskGraph/Graph.d.ts +0 -24
  602. package/es/TaskGraph/Graph.js +0 -271
  603. package/es/TaskGraph/graph.less +0 -23
  604. package/es/TaskGraph/index.d.ts +0 -16
  605. package/es/TaskGraph/index.js +0 -178
  606. package/es/TaskGraph/index.less +0 -117
  607. package/es/TaskGraph/locale/en-US.d.ts +0 -13
  608. package/es/TaskGraph/locale/en-US.js +0 -12
  609. package/es/TaskGraph/locale/zh-CN.d.ts +0 -13
  610. package/es/TaskGraph/locale/zh-CN.js +0 -12
  611. package/es/TaskGraph/locale/zh-TW.d.ts +0 -13
  612. package/es/TaskGraph/locale/zh-TW.js +0 -12
  613. package/es/TaskGraph/register.d.ts +0 -7
  614. package/es/TaskGraph/register.js +0 -200
  615. package/es/Welcome/index.less +0 -185
  616. package/es/index.less +0 -1
  617. package/es/variable.less +0 -54
  618. package/lib/BatchOperationBar/index.less +0 -46
  619. package/lib/BatchOperationBar/index.less.d.ts +0 -15
  620. package/lib/Boundary/index.less +0 -36
  621. package/lib/ContentWithIcon/index.less +0 -21
  622. package/lib/DateRanger/index.less +0 -180
  623. package/lib/Dialog/index.less +0 -116
  624. package/lib/FullscreenBox/index.less +0 -49
  625. package/lib/GraphToolbar/index.d.ts +0 -26
  626. package/lib/GraphToolbar/index.js +0 -154
  627. package/lib/GraphToolbar/index.less +0 -65
  628. package/lib/GraphToolbar/locale/en-US.d.ts +0 -9
  629. package/lib/GraphToolbar/locale/en-US.js +0 -32
  630. package/lib/GraphToolbar/locale/zh-CN.d.ts +0 -9
  631. package/lib/GraphToolbar/locale/zh-CN.js +0 -32
  632. package/lib/GraphToolbar/locale/zh-TW.d.ts +0 -9
  633. package/lib/GraphToolbar/locale/zh-TW.js +0 -32
  634. package/lib/Highlight/index.less +0 -381
  635. package/lib/Login/index.less +0 -268
  636. package/lib/NavMenu/index.less +0 -50
  637. package/lib/Ranger/index.less +0 -57
  638. package/lib/SideTip/index.less +0 -180
  639. package/lib/TaskGraph/Graph.d.ts +0 -24
  640. package/lib/TaskGraph/Graph.js +0 -261
  641. package/lib/TaskGraph/graph.less +0 -23
  642. package/lib/TaskGraph/index.d.ts +0 -16
  643. package/lib/TaskGraph/index.js +0 -164
  644. package/lib/TaskGraph/index.less +0 -117
  645. package/lib/TaskGraph/locale/en-US.d.ts +0 -13
  646. package/lib/TaskGraph/locale/en-US.js +0 -36
  647. package/lib/TaskGraph/locale/zh-CN.d.ts +0 -13
  648. package/lib/TaskGraph/locale/zh-CN.js +0 -36
  649. package/lib/TaskGraph/locale/zh-TW.d.ts +0 -13
  650. package/lib/TaskGraph/locale/zh-TW.js +0 -36
  651. package/lib/TaskGraph/register.d.ts +0 -7
  652. package/lib/TaskGraph/register.js +0 -205
  653. package/lib/Welcome/index.less +0 -185
  654. package/lib/index.less +0 -1
  655. package/lib/variable.less +0 -54
@@ -1,32 +1,28 @@
1
+ "use client";
1
2
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
- 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, _toPropertyKey(descriptor.key), descriptor); } }
6
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
- 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); }
8
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
9
- 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); }; }
10
- 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); }
11
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
12
- 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; } }
13
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
14
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
16
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ 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."); }
10
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
14
  import { CloseOutlined, ExpandAltOutlined, FullscreenExitOutlined, FullscreenOutlined, MinusOutlined } from '@oceanbase/icons';
18
- import React from 'react';
15
+ import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
16
+ import { ConfigProvider } from '@oceanbase/design';
19
17
  import { createPortal } from 'react-dom';
20
18
  import LocaleWrapper from "../locale/LocaleWrapper";
21
- import { getPrefix } from "../_util";
22
19
  import { Anchor } from "./Anchor";
23
20
  import { Dock } from "./Dock";
24
21
  import { EventProxy } from "./EventProxy";
25
22
  import zhCN from "./locale/zh-CN";
26
- import "./index.less";
23
+ import useStyle from "./style";
27
24
  import { jsx as _jsx } from "react/jsx-runtime";
28
25
  import { jsxs as _jsxs } from "react/jsx-runtime";
29
- var prefix = getPrefix('dialog');
30
26
  var DEFAULT_LEFT = 0.1;
31
27
  var DEFAULT_TOP = 0.1;
32
28
  var MINIMIZE_HEIGHT = 36;
@@ -37,598 +33,625 @@ var DEFAULT_HEIGHT_MEMBER = 600;
37
33
  var DEFAULT_BORDER_WIDTH = 24;
38
34
  // 预留滚动条宽度
39
35
  var SCROLL_BAR_WIDTH = 1;
40
- var DialogComp = /*#__PURE__*/function (_React$PureComponent) {
41
- _inherits(DialogComp, _React$PureComponent);
42
- var _super = _createSuper(DialogComp);
43
- function DialogComp() {
44
- var _this$props$width, _this$props$height, _this$props$left, _this$props$width2, _this$props$top, _this$props$height2;
45
- var _this;
46
- _classCallCheck(this, DialogComp);
47
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
48
- args[_key] = arguments[_key];
49
- }
50
- _this = _super.call.apply(_super, [this].concat(args));
51
- _defineProperty(_assertThisInitialized(_this), "state", {
52
- mask: true,
53
- width: (_this$props$width = _this.props.width) !== null && _this$props$width !== void 0 ? _this$props$width : DEFAULT_WIDTH_MEMBER,
54
- height: (_this$props$height = _this.props.height) !== null && _this$props$height !== void 0 ? _this$props$height : DEFAULT_HEIGHT_MEMBER,
55
- left: (_this$props$left = _this.props.left) !== null && _this$props$left !== void 0 ? _this$props$left : _this.props.clientWidth - ((_this$props$width2 = _this.props.width) !== null && _this$props$width2 !== void 0 ? _this$props$width2 : DEFAULT_WIDTH_MEMBER) - DEFAULT_BORDER_WIDTH,
56
- top: (_this$props$top = _this.props.top) !== null && _this$props$top !== void 0 ? _this$props$top : _this.props.clientHeight - ((_this$props$height2 = _this.props.height) !== null && _this$props$height2 !== void 0 ? _this$props$height2 : DEFAULT_HEIGHT_MEMBER) - DEFAULT_BORDER_WIDTH,
57
- moveX: 0,
58
- moveY: 0,
59
- maximization: _this.props.isEmbed,
36
+ // Static container for portal
37
+ var _container = null;
38
+ var getContainer = function getContainer() {
39
+ if (!_container) {
40
+ _container = document.createElement('div');
41
+ document.body.appendChild(_container);
42
+ }
43
+ return _container;
44
+ };
45
+ var DialogComp = function DialogComp(props) {
46
+ var className = props.className,
47
+ visible = props.visible,
48
+ children = props.children,
49
+ _props$min = props.min,
50
+ min = _props$min === void 0 ? DEFAULT_MIN : _props$min,
51
+ max = props.max,
52
+ width = props.width,
53
+ height = props.height,
54
+ left = props.left,
55
+ top = props.top,
56
+ title = props.title,
57
+ onClose = props.onClose,
58
+ clientWidth = props.clientWidth,
59
+ clientHeight = props.clientHeight,
60
+ _props$resizable = props.resizable,
61
+ resizable = _props$resizable === void 0 ? true : _props$resizable,
62
+ _props$draggable = props.draggable,
63
+ draggable = _props$draggable === void 0 ? true : _props$draggable,
64
+ _props$enableMaximiza = props.enableMaximization,
65
+ enableMaximization = _props$enableMaximiza === void 0 ? true : _props$enableMaximiza,
66
+ locale = props.locale,
67
+ extLink = props.extLink,
68
+ setRootWidth = props.setRootWidth,
69
+ _props$isEmbed = props.isEmbed,
70
+ isEmbed = _props$isEmbed === void 0 ? false : _props$isEmbed;
71
+ var titleId = React.useId();
72
+ var dialogRootRef = useRef(null);
73
+ var _useContext = useContext(ConfigProvider.ConfigContext),
74
+ getPrefixCls = _useContext.getPrefixCls;
75
+ var prefixCls = getPrefixCls('dialog');
76
+ var _useStyle = useStyle(prefixCls),
77
+ wrapSSR = _useStyle.wrapSSR;
78
+
79
+ // Refs for instance properties
80
+ var hostRef = useRef(null);
81
+ var clientXRef = useRef(0);
82
+ var clientYRef = useRef(0);
83
+ var isPointDownRef = useRef(false);
84
+ var originInfoRef = useRef({});
85
+
86
+ // State
87
+ var _useState = useState(true),
88
+ _useState2 = _slicedToArray(_useState, 2),
89
+ mask = _useState2[0],
90
+ setMask = _useState2[1];
91
+ var _useState3 = useState(width !== null && width !== void 0 ? width : DEFAULT_WIDTH_MEMBER),
92
+ _useState4 = _slicedToArray(_useState3, 2),
93
+ dialogWidth = _useState4[0],
94
+ setDialogWidth = _useState4[1];
95
+ var _useState5 = useState(height !== null && height !== void 0 ? height : DEFAULT_HEIGHT_MEMBER),
96
+ _useState6 = _slicedToArray(_useState5, 2),
97
+ dialogHeight = _useState6[0],
98
+ setDialogHeight = _useState6[1];
99
+ var _useState7 = useState(left !== null && left !== void 0 ? left : clientWidth - (width !== null && width !== void 0 ? width : DEFAULT_WIDTH_MEMBER) - DEFAULT_BORDER_WIDTH),
100
+ _useState8 = _slicedToArray(_useState7, 2),
101
+ dialogLeft = _useState8[0],
102
+ setDialogLeft = _useState8[1];
103
+ var _useState9 = useState(top !== null && top !== void 0 ? top : clientHeight - (height !== null && height !== void 0 ? height : DEFAULT_HEIGHT_MEMBER) - DEFAULT_BORDER_WIDTH),
104
+ _useState10 = _slicedToArray(_useState9, 2),
105
+ dialogTop = _useState10[0],
106
+ setDialogTop = _useState10[1];
107
+ var _useState11 = useState(0),
108
+ _useState12 = _slicedToArray(_useState11, 2),
109
+ moveX = _useState12[0],
110
+ setMoveX = _useState12[1];
111
+ var _useState13 = useState(0),
112
+ _useState14 = _slicedToArray(_useState13, 2),
113
+ moveY = _useState14[0],
114
+ setMoveY = _useState14[1];
115
+ var _useState15 = useState(isEmbed),
116
+ _useState16 = _slicedToArray(_useState15, 2),
117
+ maximization = _useState16[0],
118
+ setMaximization = _useState16[1];
119
+ var _useState17 = useState(false),
120
+ _useState18 = _slicedToArray(_useState17, 2),
121
+ minimize = _useState18[0],
122
+ setMinimize = _useState18[1];
123
+ var _useState19 = useState({}),
124
+ _useState20 = _slicedToArray(_useState19, 2),
125
+ headerStyle = _useState20[0],
126
+ setHeaderStyle = _useState20[1];
127
+
128
+ // Computed values
129
+ var maxSize = useMemo(function () {
130
+ if (max) return max;
131
+ return [clientWidth, clientHeight];
132
+ }, [max, clientWidth, clientHeight]);
133
+ var minSize = useMemo(function () {
134
+ return min;
135
+ }, [min]);
136
+ var getDefaultEmbedState = useCallback(function () {
137
+ return {
138
+ width: width !== null && width !== void 0 ? width : DEFAULT_WIDTH_MEMBER,
139
+ height: height !== null && height !== void 0 ? height : DEFAULT_HEIGHT_MEMBER,
140
+ left: left !== null && left !== void 0 ? left : clientWidth - (width !== null && width !== void 0 ? width : DEFAULT_WIDTH_MEMBER) - DEFAULT_BORDER_WIDTH,
141
+ top: top !== null && top !== void 0 ? top : clientHeight - (height !== null && height !== void 0 ? height : DEFAULT_HEIGHT_MEMBER) - DEFAULT_BORDER_WIDTH
142
+ };
143
+ }, [width, height, left, top, clientWidth, clientHeight]);
144
+ var setRootWidthInEmbedMode = useCallback(function (newWidth) {
145
+ var restWidth = !!newWidth ? newWidth + SCROLL_BAR_WIDTH : 0;
146
+ var rootWidth = (clientWidth - restWidth) / clientWidth;
147
+ setRootWidth === null || setRootWidth === void 0 || setRootWidth("".concat(rootWidth * 100, "%"));
148
+ }, [clientWidth, setRootWidth]);
149
+ var compatClonedModel = useCallback(function (model) {
150
+ return _objectSpread({
151
+ left: DEFAULT_LEFT,
152
+ top: DEFAULT_TOP,
153
+ width: DEFAULT_WIDTH_MEMBER / clientWidth,
154
+ height: DEFAULT_HEIGHT_MEMBER / clientHeight,
60
155
  minimize: false,
61
- headerStyle: {}
62
- });
63
- _defineProperty(_assertThisInitialized(_this), "clientX", 0);
64
- _defineProperty(_assertThisInitialized(_this), "clientY", 0);
65
- _defineProperty(_assertThisInitialized(_this), "getDefaultEmbedState", function () {
66
- var _this$props = _this.props,
67
- clientHeight = _this$props.clientHeight,
68
- clientWidth = _this$props.clientWidth,
69
- width = _this$props.width,
70
- height = _this$props.height,
71
- left = _this$props.left,
72
- top = _this$props.top;
73
- return {
74
- width: width !== null && width !== void 0 ? width : DEFAULT_WIDTH_MEMBER,
75
- height: height !== null && height !== void 0 ? height : DEFAULT_HEIGHT_MEMBER,
76
- left: left !== null && left !== void 0 ? left : clientWidth - (width !== null && width !== void 0 ? width : DEFAULT_WIDTH_MEMBER) - DEFAULT_BORDER_WIDTH,
77
- top: top !== null && top !== void 0 ? top : clientHeight - (height !== null && height !== void 0 ? height : DEFAULT_HEIGHT_MEMBER) - DEFAULT_BORDER_WIDTH
78
- };
79
- });
80
- _defineProperty(_assertThisInitialized(_this), "host", document.createElement('div'));
81
- _defineProperty(_assertThisInitialized(_this), "isPointDown", false);
82
- _defineProperty(_assertThisInitialized(_this), "onDragStart", function (event) {
83
- if (!_this.props.draggable) return;
84
- var maximization = _this.state.maximization;
85
- if (maximization) return;
86
- _this.setState(_objectSpread(_objectSpread({
87
- mask: true
88
- }, _this.state.left === undefined ? {
89
- left: DEFAULT_LEFT
90
- } : {}), _this.state.top === undefined ? {
91
- top: DEFAULT_TOP
92
- } : {}));
93
- _this.clientX = event.clientX;
94
- _this.clientY = event.clientY;
95
- _this.isPointDown = true;
96
- });
97
- _defineProperty(_assertThisInitialized(_this), "onDragMove", function (event) {
98
- if (!_this.props.draggable || !_this.isPointDown) return;
99
- event.preventDefault();
100
- _this.setState({
101
- moveX: event.clientX - _this.clientX,
102
- moveY: event.clientY - _this.clientY
103
- });
104
- });
105
- _defineProperty(_assertThisInitialized(_this), "onDragEnd", function () {
106
- var draggable = _this.props.draggable;
107
- if (!draggable) return;
108
- _this.isPointDown = false;
109
- if (_this.state.moveX === 0 && _this.state.moveY === 0) return;
110
- _this.setState({
111
- mask: false,
112
- left: _this.state.left + _this.state.moveX,
113
- top: _this.state.top + _this.state.moveY,
114
- moveX: 0,
115
- moveY: 0
116
- });
117
- });
118
- _defineProperty(_assertThisInitialized(_this), "toggleMinimize", function () {
119
- _this.setState({
120
- maximization: false,
121
- minimize: !_this.state.minimize
122
- });
123
- });
124
- _defineProperty(_assertThisInitialized(_this), "toggleMaximization", function () {
125
- // 嵌入模式不支持toggleMaximization
126
- var enable = _this.props.resizable && _this.props.enableMaximization && !_this.props.isEmbed;
127
- if (!enable) return;
128
- _this.setState({
129
- maximization: !_this.state.maximization,
130
- minimize: false
131
- });
132
- });
133
- _defineProperty(_assertThisInitialized(_this), "onClose", function (event) {
134
- var _this$props$onClose, _this$props2;
135
- event.stopPropagation();
136
- (_this$props$onClose = (_this$props2 = _this.props).onClose) === null || _this$props$onClose === void 0 || _this$props$onClose.call(_this$props2);
137
- });
138
- _defineProperty(_assertThisInitialized(_this), "getBaseStyle", function () {
139
- var visible = _this.props.visible;
140
- // 通过样式控制显隐
141
- var baseStyle = {
142
- visibility: visible ? 'visible' : 'hidden',
143
- opacity: visible ? 1 : 0
144
- };
145
- return baseStyle;
146
- });
147
- _defineProperty(_assertThisInitialized(_this), "getStyle", function () {
148
- var _this$state = _this.state,
149
- maximization = _this$state.maximization,
150
- minimize = _this$state.minimize,
151
- headerStyle = _this$state.headerStyle;
152
- var transform = "translate(".concat(_this.state.moveX, "px, ").concat(_this.state.moveY, "px)");
153
- var baseStyle = _this.getBaseStyle();
154
- if (maximization && !_this.props.isEmbed) {
155
- return _objectSpread(_objectSpread({}, baseStyle), {}, {
156
- top: 0,
157
- bottom: 0,
158
- right: 0,
159
- width: _this.props.width || DEFAULT_WIDTH_MEMBER,
160
- height: 'auto',
161
- borderRadius: 0
162
- });
163
- } else if (minimize) {
164
- var _ref = headerStyle,
165
- height = _ref.height;
166
- return _objectSpread(_objectSpread(_objectSpread({}, baseStyle), _this.getCompatAbsPostion(_this.state)), {}, {
167
- width: MINIMIZE_WIDTH,
168
- height: height || MINIMIZE_HEIGHT,
169
- transform: transform
170
- });
171
- } else {
172
- return _objectSpread(_objectSpread(_objectSpread({}, baseStyle), _this.getCompatAbsPostion(_this.state)), {}, {
173
- transform: transform
156
+ maximization: false
157
+ }, model);
158
+ }, [clientWidth, clientHeight]);
159
+ var checkSize = function checkSize(w, h) {
160
+ var newModel = {};
161
+ var result = {
162
+ widthShouldChange: true,
163
+ heightShouldChange: true
164
+ };
165
+ if (minSize && w < minSize[0]) {
166
+ newModel.width = minSize[0];
167
+ result.widthShouldChange = false;
168
+ }
169
+ if (minSize && h < minSize[1]) {
170
+ newModel.height = minSize[1];
171
+ result.heightShouldChange = false;
172
+ }
173
+ if (maxSize && w > maxSize[0]) {
174
+ newModel.width = maxSize[0];
175
+ result.widthShouldChange = false;
176
+ }
177
+ if (maxSize && h > maxSize[1]) {
178
+ newModel.height = maxSize[1];
179
+ result.heightShouldChange = false;
180
+ }
181
+ return result;
182
+ };
183
+
184
+ // componentDidMount
185
+ useEffect(function () {
186
+ var host = document.createElement('div');
187
+ hostRef.current = host;
188
+ getContainer().appendChild(host);
189
+ return function () {
190
+ if (hostRef.current && getContainer().contains(hostRef.current)) {
191
+ getContainer().removeChild(hostRef.current);
192
+ }
193
+ };
194
+ }, []);
195
+
196
+ // componentDidUpdate
197
+ useEffect(function () {
198
+ if (!visible) {
199
+ setRootWidthInEmbedMode(0);
200
+ return;
201
+ }
202
+ var tempState = getDefaultEmbedState();
203
+ setDialogWidth(tempState.width);
204
+ setDialogHeight(tempState.height);
205
+ setDialogLeft(tempState.left);
206
+ setDialogTop(tempState.top);
207
+ setRootWidthInEmbedMode(tempState.width);
208
+ }, [visible, clientWidth, clientHeight, getDefaultEmbedState, setRootWidthInEmbedMode]);
209
+ useEffect(function () {
210
+ if (!visible) return;
211
+ var frame = requestAnimationFrame(function () {
212
+ if (!minimize) {
213
+ var _dialogRootRef$curren;
214
+ (_dialogRootRef$curren = dialogRootRef.current) === null || _dialogRootRef$curren === void 0 || _dialogRootRef$curren.focus({
215
+ preventScroll: true
174
216
  });
175
217
  }
176
218
  });
177
- _defineProperty(_assertThisInitialized(_this), "compatClonedModel", function (model) {
178
- return _objectSpread({
179
- left: DEFAULT_LEFT,
180
- top: DEFAULT_TOP,
181
- width: DEFAULT_WIDTH_MEMBER / _this.props.clientWidth,
182
- height: DEFAULT_HEIGHT_MEMBER / _this.props.clientHeight,
183
- minimize: false,
184
- maximization: false
185
- }, model);
186
- });
187
- _defineProperty(_assertThisInitialized(_this), "detectPointUp", function () {
188
- _this.setState({
189
- mask: false
190
- });
219
+ return function () {
220
+ return cancelAnimationFrame(frame);
221
+ };
222
+ }, [visible, minimize]);
223
+ useEffect(function () {
224
+ if (!visible) return;
225
+ var onDocKeyDown = function onDocKeyDown(e) {
226
+ if (e.key !== 'Escape') return;
227
+ var root = dialogRootRef.current;
228
+ var target = e.target;
229
+ if (root && target && !root.contains(target)) return;
230
+ onClose === null || onClose === void 0 || onClose();
231
+ };
232
+ document.addEventListener('keydown', onDocKeyDown);
233
+ return function () {
234
+ return document.removeEventListener('keydown', onDocKeyDown);
235
+ };
236
+ }, [visible, onClose]);
237
+ useEffect(function () {
238
+ if (isEmbed) {
239
+ setMinimize(false);
240
+ setMaximization(true);
241
+ } else {
242
+ setMinimize(false);
243
+ setMaximization(false);
244
+ if (height) setDialogHeight(height);
245
+ if (width) setDialogWidth(width);
246
+ if (top !== undefined) setDialogTop(top);
247
+ if (left !== undefined) setDialogLeft(left);
248
+ }
249
+ }, [isEmbed, height, width, top, left]);
250
+
251
+ // Drag handlers
252
+ var onDragStart = function onDragStart(event) {
253
+ if (!draggable) return;
254
+ if (maximization) return;
255
+ setMask(true);
256
+ if (dialogLeft === undefined) {
257
+ setDialogLeft(DEFAULT_LEFT);
258
+ }
259
+ if (dialogTop === undefined) {
260
+ setDialogTop(DEFAULT_TOP);
261
+ }
262
+ clientXRef.current = event.clientX;
263
+ clientYRef.current = event.clientY;
264
+ isPointDownRef.current = true;
265
+ };
266
+ var onDragMove = function onDragMove(event) {
267
+ if (!draggable || !isPointDownRef.current) return;
268
+ event.preventDefault();
269
+ setMoveX(event.clientX - clientXRef.current);
270
+ setMoveY(event.clientY - clientYRef.current);
271
+ };
272
+ var onDragEnd = function onDragEnd() {
273
+ if (!draggable) return;
274
+ isPointDownRef.current = false;
275
+ if (moveX === 0 && moveY === 0) return;
276
+ setMask(false);
277
+ setDialogLeft(function (prev) {
278
+ return (prev !== null && prev !== void 0 ? prev : 0) + moveX;
191
279
  });
192
- _defineProperty(_assertThisInitialized(_this), "originInfo", void 0);
193
- _defineProperty(_assertThisInitialized(_this), "setRootWidthInEmbedMode", function (newWidth) {
194
- var setRootWidth = _this.props.setRootWidth;
195
- var restWidth = !!newWidth ? newWidth + SCROLL_BAR_WIDTH : 0;
196
- var rootWidth = (_this.props.clientWidth - restWidth) / _this.props.clientWidth;
197
- setRootWidth === null || setRootWidth === void 0 || setRootWidth("".concat(rootWidth * 100, "%"));
280
+ setDialogTop(function (prev) {
281
+ return (prev !== null && prev !== void 0 ? prev : 0) + moveY;
198
282
  });
199
- _defineProperty(_assertThisInitialized(_this), "onResizeStart", function () {
200
- if (_this.state.minimize || !_this.props.resizable) return;
201
- _this.originInfo = _this.compatClonedModel(_this.state);
202
- _this.setState({
203
- mask: true
204
- });
283
+ setMoveX(0);
284
+ setMoveY(0);
285
+ };
286
+ var detectPointUp = function detectPointUp() {
287
+ setMask(false);
288
+ };
289
+
290
+ // Resize handlers
291
+ var onResizeStart = function onResizeStart() {
292
+ if (minimize || !resizable) return;
293
+ originInfoRef.current = compatClonedModel({
294
+ width: dialogWidth,
295
+ height: dialogHeight,
296
+ left: dialogLeft,
297
+ top: dialogTop,
298
+ minimize: minimize,
299
+ maximization: maximization
205
300
  });
206
- _defineProperty(_assertThisInitialized(_this), "onResizeMove", function (event) {
207
- var resizable = _this.props.resizable;
208
- event.preventDefault();
209
- if (_this.state.minimize || !resizable) return;
210
- // 以下PointerEvent没有moveRight属性,通过event传递,所以加上了ts-ignore
301
+ setMask(true);
302
+ };
303
+ var onResizeMove = function onResizeMove(event) {
304
+ event.preventDefault();
305
+ if (minimize || !resizable) return;
306
+ // @ts-ignore
307
+ var newWidth = originInfoRef.current.width + event.moveRight;
308
+ // @ts-ignore
309
+ var newHeight = originInfoRef.current.height + event.moveBottom;
310
+ var checkResult = checkSize(newWidth, newHeight);
311
+ if (checkResult.widthShouldChange) {
312
+ setRootWidthInEmbedMode(newWidth);
313
+ }
314
+ if (checkResult.widthShouldChange) {
211
315
  // @ts-ignore
212
- var newWidth = _this.originInfo.width + event.moveRight;
316
+ setDialogLeft(originInfoRef.current.left + event.moveLeft);
317
+ setDialogWidth(newWidth);
318
+ }
319
+ if (checkResult.heightShouldChange) {
213
320
  // @ts-ignore
214
- var newHeight = _this.originInfo.height + event.moveBottom;
215
- var checkResult = _this.checkSize(newWidth, newHeight);
321
+ setDialogTop(originInfoRef.current.top + event.moveTop);
322
+ setDialogHeight(newHeight);
323
+ }
324
+ };
325
+ var onResizeEnd = function onResizeEnd() {
326
+ if (!mask || !resizable) return;
327
+ setMask(false);
328
+ };
216
329
 
217
- // 只在宽度允许发生改变时设置外部width
218
- if (checkResult.widthShouldChange) {
219
- _this.setRootWidthInEmbedMode(newWidth);
220
- }
221
- _this.setState(_objectSpread(_objectSpread({}, checkResult.widthShouldChange ? {
222
- // @ts-ignore
223
- left: _this.originInfo.left + event.moveLeft,
224
- width: newWidth
225
- } : {}), checkResult.heightShouldChange ? {
226
- // @ts-ignore
227
- top: _this.originInfo.top + event.moveTop,
228
- height: newHeight
229
- } : {}));
330
+ // Toggle handlers
331
+ var toggleMinimize = function toggleMinimize() {
332
+ setMaximization(false);
333
+ setMinimize(function (prev) {
334
+ return !prev;
230
335
  });
231
- _defineProperty(_assertThisInitialized(_this), "onResizeEnd", function () {
232
- var mask = _this.state.mask;
233
- if (!mask || !_this.props.resizable) return;
234
- _this.setState({
235
- mask: false
236
- });
336
+ };
337
+ var toggleMaximization = function toggleMaximization() {
338
+ var enable = resizable && enableMaximization && !isEmbed;
339
+ if (!enable) return;
340
+ setMaximization(function (prev) {
341
+ return !prev;
237
342
  });
238
- return _this;
239
- }
240
- _createClass(DialogComp, [{
241
- key: "componentDidMount",
242
- value: function componentDidMount() {
243
- DialogComp.container.appendChild(this.host);
343
+ setMinimize(false);
344
+ };
345
+ var handleClose = function handleClose(event) {
346
+ event.stopPropagation();
347
+ onClose === null || onClose === void 0 || onClose();
348
+ };
349
+
350
+ // Style calculations
351
+ var getBaseStyle = useCallback(function () {
352
+ return {
353
+ visibility: visible ? 'visible' : 'hidden',
354
+ opacity: visible ? 1 : 0
355
+ };
356
+ }, [visible]);
357
+ var getCompatAbsPostion = useCallback(function (info) {
358
+ var compatInfo = compatClonedModel(info);
359
+ var isMinimize = compatInfo.minimize;
360
+ var ret = {};
361
+ ['left', 'width', 'top', 'height'].forEach(function (key) {
362
+ ret[key] = compatInfo[key];
363
+ });
364
+
365
+ // Apply min/max constraints
366
+ if (maxSize && ret.width > maxSize[0]) {
367
+ ret.width = maxSize[0];
244
368
  }
245
- }, {
246
- key: "componentDidUpdate",
247
- value: function componentDidUpdate(prevProps, _) {
248
- var preVisible = prevProps.visible,
249
- preClientWidth = prevProps.clientWidth,
250
- preClientHeight = prevProps.clientHeight,
251
- preIsEmbed = prevProps.isEmbed;
252
- var _this$props3 = this.props,
253
- visible = _this$props3.visible,
254
- isEmbed = _this$props3.isEmbed,
255
- clientWidth = _this$props3.clientWidth,
256
- clientHeight = _this$props3.clientHeight,
257
- height = _this$props3.height,
258
- width = _this$props3.width,
259
- top = _this$props3.top,
260
- left = _this$props3.left;
261
- // 嵌入式切换非嵌入式,属性重置
262
- if (preIsEmbed && !isEmbed) {
263
- this.setRootWidthInEmbedMode(0);
264
- this.setState(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
265
- minimize: false,
266
- maximization: false
267
- }, height ? {
268
- height: height
269
- } : {}), width ? {
270
- width: width
271
- } : {}), top ? {
272
- top: top
273
- } : {}), left ? {
274
- left: left
275
- } : {}));
276
- return;
277
- }
278
- // 非嵌入式切换嵌入式,属性重置
279
- if (!preIsEmbed && isEmbed) {
280
- this.setState({
281
- minimize: false,
282
- maximization: true
283
- });
284
- }
285
- if (visible) {
286
- if (!preVisible || clientWidth !== preClientWidth || clientHeight !== preClientHeight) {
287
- var tempState = this.getDefaultEmbedState();
288
- this.setState(tempState);
289
- this.setRootWidthInEmbedMode(tempState === null || tempState === void 0 ? void 0 : tempState.width);
290
- }
291
- } else if (preVisible && !visible) {
292
- this.setRootWidthInEmbedMode(0);
293
- }
369
+ if (maxSize && ret.height > maxSize[1]) {
370
+ ret.height = maxSize[1];
294
371
  }
295
- }, {
296
- key: "componentWillUnmount",
297
- value: function componentWillUnmount() {
298
- DialogComp.container.removeChild(this.host);
372
+ if (minSize && ret.width < minSize[0]) {
373
+ ret.width = minSize[0];
299
374
  }
300
- }, {
301
- key: "max",
302
- get: function get() {
303
- var max = this.props.max;
304
- if (!max) {
305
- var _this$props4 = this.props,
306
- clientWidth = _this$props4.clientWidth,
307
- clientHeight = _this$props4.clientHeight;
308
- max = [clientWidth, clientHeight];
309
- }
310
- return max;
375
+ if (minSize && ret.height < minSize[1]) {
376
+ ret.height = minSize[1];
311
377
  }
312
- }, {
313
- key: "min",
314
- get: function get() {
315
- return this.props.min;
378
+ ret.width = isMinimize ? MINIMIZE_WIDTH : ret.width;
379
+ ret.height = isMinimize ? MINIMIZE_HEIGHT : ret.height;
380
+
381
+ // Adjust position if out of bounds (calculate but don't setState here)
382
+ if (ret.left + ret.width > clientWidth) {
383
+ ret.left = clientWidth - ret.width;
316
384
  }
317
- }, {
318
- key: "hasMask",
319
- get: function get() {
320
- return this.state.mask;
385
+ if (ret.left < 0) {
386
+ ret.left = 0;
321
387
  }
322
- }, {
323
- key: "renderHeader",
324
- value: function renderHeader() {
325
- var _this$props5 = this.props,
326
- locale = _this$props5.locale,
327
- title = _this$props5.title,
328
- isEmbed = _this$props5.isEmbed;
329
- var _this$state2 = this.state,
330
- headerStyle = _this$state2.headerStyle,
331
- minimize = _this$state2.minimize;
332
- var style = _objectSpread(_objectSpread(_objectSpread({}, headerStyle), minimize ? {
333
- boxShadow: '0 2px 20px 0 rgba(4, 1, 30, 0.07)'
334
- } : {}), isEmbed ? {
335
- cursor: 'initial'
336
- } : {});
337
- return /*#__PURE__*/_jsxs("header", {
338
- className: "".concat(prefix, "-header"),
339
- style: style,
340
- onPointerDown: this.onDragStart,
341
- onDoubleClick: this.toggleMaximization,
342
- children: [/*#__PURE__*/_jsx("span", {
343
- className: "".concat(prefix, "-title"),
344
- children: title || locale.helpDocument
345
- }), this.renderControls()]
346
- });
388
+ if (ret.top < 0) {
389
+ ret.top = 0;
347
390
  }
348
- }, {
349
- key: "renderControlLink",
350
- value: function renderControlLink() {
351
- var extLink = this.props.extLink;
352
- return /*#__PURE__*/_jsx("span", {
353
- className: "".concat(prefix, "-item"),
354
- children: /*#__PURE__*/_jsx("a", {
355
- className: "".concat(prefix, "-item-link"),
356
- href: extLink === null || extLink === void 0 ? void 0 : extLink.link,
357
- target: "_blank",
358
- rel: "noopener noreferrer",
359
- children: /*#__PURE__*/_jsx("svg", {
360
- // t="1679557306532"
361
- className: "icon",
362
- viewBox: "0 0 1024 1024",
363
- version: "1.1",
364
- xmlns: "http://www.w3.org/2000/svg"
365
- // p-id="2545"
366
- ,
367
- width: "16",
368
- height: "16",
369
- children: /*#__PURE__*/_jsx("path", {
370
- d: "M880.0256 912.0256H144.0256a31.9488 31.9488 0 0 1-32.0512-32V144.0256c0-17.7152 14.336-32.0512 32.0512-32.0512h359.936c4.4544 0 8.0384 3.584 8.0384 8.0384v56.0128c0 4.352-3.584 7.9872-7.9872 7.9872h-320v655.9744h655.9744v-320c0-4.4032 3.584-7.9872 8.0384-7.9872h55.9616c4.4032 0 8.0384 3.584 8.0384 7.9872v359.9872c0 17.7152-14.336 32-32 32zM770.8672 199.1168l-52.224-52.224a8.0384 8.0384 0 0 1 4.7104-13.568l179.4048-20.992c5.12-0.6144 9.5232 3.6864 8.9088 8.9088l-20.992 179.4048a8.0384 8.0384 0 0 1-13.6192 4.6592L824.6784 252.928l-256.2048 256.2048c-3.072 3.072-8.192 3.072-11.264 0l-42.4448-42.3936a8.0384 8.0384 0 0 1 0-11.264l256.1024-256.3584z"
371
- // p-id="2546"
372
- })
373
- })
374
- })
375
- });
391
+ if (ret.top + ret.height > clientHeight) {
392
+ ret.top = clientHeight - ret.height;
376
393
  }
377
- }, {
378
- key: "renderControls",
379
- value: function renderControls() {
380
- var _this$state3 = this.state,
381
- maximization = _this$state3.maximization,
382
- minimize = _this$state3.minimize;
383
- var _this$props6 = this.props,
384
- enableMaximization = _this$props6.enableMaximization,
385
- isEmbed = _this$props6.isEmbed;
386
- if (isEmbed) {
387
- return /*#__PURE__*/_jsxs("span", {
388
- className: "".concat(prefix, "-controls"),
389
- children: [this.renderControlLink(), /*#__PURE__*/_jsx("span", {
390
- className: "".concat(prefix, "-item"),
391
- onClick: this.onClose,
392
- children: /*#__PURE__*/_jsx(CloseOutlined, {})
393
- })]
394
- });
395
- }
396
- return /*#__PURE__*/_jsxs("span", {
397
- className: "".concat(prefix, "-controls"),
398
- children: [this.renderControlLink(), /*#__PURE__*/_jsx("span", {
399
- className: "".concat(prefix, "-item"),
400
- onClick: this.toggleMinimize,
401
- children: minimize ? /*#__PURE__*/_jsx(ExpandAltOutlined, {}) : /*#__PURE__*/_jsx(MinusOutlined, {})
402
- }), enableMaximization && /*#__PURE__*/_jsx("span", {
403
- className: "".concat(prefix, "-item"),
404
- onClick: this.toggleMaximization,
405
- children: maximization ? /*#__PURE__*/_jsx(FullscreenExitOutlined, {}) : /*#__PURE__*/_jsx(FullscreenOutlined, {})
406
- }), /*#__PURE__*/_jsx("span", {
407
- className: "".concat(prefix, "-item"),
408
- onClick: this.onClose,
409
- children: /*#__PURE__*/_jsx(CloseOutlined, {})
410
- })]
411
- });
394
+ return ret;
395
+ }, [maxSize, minSize, clientWidth, clientHeight, compatClonedModel]);
396
+
397
+ // Adjust position if out of bounds
398
+ useEffect(function () {
399
+ if (!visible) return;
400
+ var adjusted = getCompatAbsPostion({
401
+ width: dialogWidth,
402
+ height: dialogHeight,
403
+ left: dialogLeft,
404
+ top: dialogTop,
405
+ minimize: minimize
406
+ });
407
+ if (adjusted.left !== dialogLeft) {
408
+ setDialogLeft(adjusted.left);
412
409
  }
413
- }, {
414
- key: "renderContent",
415
- value: function renderContent() {
416
- var children = this.props.children;
417
- return /*#__PURE__*/_jsxs("main", {
418
- className: "".concat(prefix, "-main"),
419
- style: this.state.minimize ? {
420
- visibility: 'hidden'
421
- } : {},
422
- children: [this.renderMask(), children]
423
- });
410
+ if (adjusted.top !== dialogTop) {
411
+ setDialogTop(adjusted.top);
424
412
  }
425
- }, {
426
- key: "renderMask",
427
- value: function renderMask() {
428
- if (!this.hasMask) return;
429
- return /*#__PURE__*/_jsx("div", {
430
- className: "".concat(prefix, "-mask")
413
+ }, [dialogWidth, dialogHeight, dialogLeft, dialogTop, minimize, visible, getCompatAbsPostion]);
414
+ var getStyle = useMemo(function () {
415
+ var transform = "translate(".concat(moveX, "px, ").concat(moveY, "px)");
416
+ var baseStyle = getBaseStyle();
417
+ if (maximization && !isEmbed) {
418
+ return _objectSpread(_objectSpread({}, baseStyle), {}, {
419
+ top: 0,
420
+ bottom: 0,
421
+ right: 0,
422
+ width: width || DEFAULT_WIDTH_MEMBER,
423
+ height: 'auto',
424
+ borderRadius: 0
431
425
  });
432
- }
433
- }, {
434
- key: "getCompatAbsPostion",
435
- value:
436
- // 将比例转换为绝对数值,各个端的渲染依据视口大小会有不同
437
- function getCompatAbsPostion(info) {
438
- var compatInfo = this.compatClonedModel(info);
439
- var minimize = compatInfo.minimize;
440
- var _this$props7 = this.props,
441
- clientWidth = _this$props7.clientWidth,
442
- clientHeight = _this$props7.clientHeight;
443
- var ret = {};
444
- ['left', 'width', 'top', 'height'].forEach(function (key) {
445
- ret[key] = compatInfo[key];
426
+ } else if (minimize) {
427
+ var _ref = headerStyle,
428
+ headerHeight = _ref.height;
429
+ var position = getCompatAbsPostion({
430
+ width: dialogWidth,
431
+ height: dialogHeight,
432
+ left: dialogLeft,
433
+ top: dialogTop,
434
+ minimize: minimize
446
435
  });
447
- var max = this.max;
448
- var min = this.min;
449
- // 最小宽度
450
- if (max && ret.width > max[0]) {
451
- ret.width = max[0];
452
- }
453
- if (max && ret.height > max[1]) {
454
- ret.height = max[1];
455
- }
456
- if (min && ret.width < min[0]) {
457
- ret.width = min[0];
458
- }
459
- if (min && ret.height < min[1]) {
460
- ret.height = min[1];
461
- }
462
- ret.width = minimize ? MINIMIZE_WIDTH : ret.width;
463
- ret.height = minimize ? MINIMIZE_HEIGHT : ret.height;
464
- if (ret.left + ret.width > clientWidth) {
465
- ret.left = clientWidth - ret.width;
466
- this.setState({
467
- left: ret.left
468
- });
469
- }
470
- if (ret.left < 0) {
471
- this.setState({
472
- left: 0
473
- });
474
- }
475
- if (ret.top < 0) {
476
- this.setState({
477
- top: 0
478
- });
479
- }
480
- if (ret.top + ret.height > clientHeight) {
481
- ret.top = clientHeight - ret.height;
482
- this.setState({
483
- top: ret.top
484
- });
485
- }
486
- return ret;
487
- }
488
- }, {
489
- key: "renderDialog",
490
- value: function renderDialog() {
491
- var style = this.getStyle();
492
- var _this$props8 = this.props,
493
- className = _this$props8.className,
494
- isEmbed = _this$props8.isEmbed;
495
- return /*#__PURE__*/_jsx(React.Fragment, {
496
- children: /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
497
- className: "".concat(prefix, "-container ").concat(className, " ").concat(isEmbed ? "".concat(prefix, "-container-embed") : ''),
498
- style: style
499
- }, this.state.minimize ? {} : {
500
- tabIndex: 0
501
- }), {}, {
502
- children: [this.renderHeader(), this.renderContent(), isEmbed ? this.renderEmbedBorders() : this.renderBorders(), /*#__PURE__*/_jsx(EventProxy, {
503
- onPointerMove: this.onDragMove,
504
- onPointerUp: this.onDragEnd
505
- }), /*#__PURE__*/_jsx(EventProxy, {
506
- onPointerUp: this.detectPointUp
507
- })]
508
- }))
436
+ return _objectSpread(_objectSpread(_objectSpread({}, baseStyle), position), {}, {
437
+ width: MINIMIZE_WIDTH,
438
+ height: headerHeight || MINIMIZE_HEIGHT,
439
+ transform: transform
509
440
  });
510
- }
511
- }, {
512
- key: "checkSize",
513
- value:
514
- /**
515
- * width,height 是否在最大最小值的范围内
516
- */
517
- function checkSize(width, height) {
518
- var max = this.max;
519
- var min = this.min;
520
- var newModel = {};
521
- var result = {
522
- widthShouldChange: true,
523
- heightShouldChange: true
524
- };
525
- if (min && width < min[0]) {
526
- newModel.width = min[0];
527
- result.widthShouldChange = false;
528
- }
529
- if (min && height < min[1]) {
530
- newModel.height = min[1];
531
- result.heightShouldChange = false;
532
- }
533
- if (max && width > max[0]) {
534
- newModel.width = max[0];
535
- result.widthShouldChange = false;
536
- }
537
- if (max && height > max[1]) {
538
- newModel.height = max[1];
539
- result.heightShouldChange = false;
540
- }
541
- return result;
542
- }
543
- }, {
544
- key: "renderEmbedBorders",
545
- value: function renderEmbedBorders() {
546
- return /*#__PURE__*/_jsx(React.Fragment, {
547
- children: /*#__PURE__*/_jsx(Anchor, {
548
- dock: Dock.left,
549
- onStart: this.onResizeStart,
550
- onMove: this.onResizeMove,
551
- onEnd: this.onResizeEnd
552
- })
441
+ } else {
442
+ var _position = getCompatAbsPostion({
443
+ width: dialogWidth,
444
+ height: dialogHeight,
445
+ left: dialogLeft,
446
+ top: dialogTop
553
447
  });
554
- }
555
- }, {
556
- key: "renderBorders",
557
- value: function renderBorders() {
558
- return /*#__PURE__*/_jsxs(React.Fragment, {
559
- children: [/*#__PURE__*/_jsx(Anchor, {
560
- dock: Dock.top,
561
- onStart: this.onResizeStart,
562
- onMove: this.onResizeMove,
563
- onEnd: this.onResizeEnd
564
- }), /*#__PURE__*/_jsx(Anchor, {
565
- dock: Dock.right,
566
- onStart: this.onResizeStart,
567
- onMove: this.onResizeMove,
568
- onEnd: this.onResizeEnd
569
- }), /*#__PURE__*/_jsx(Anchor, {
570
- dock: Dock.bottom,
571
- onStart: this.onResizeStart,
572
- onMove: this.onResizeMove,
573
- onEnd: this.onResizeEnd
574
- }), /*#__PURE__*/_jsx(Anchor, {
575
- dock: Dock.left,
576
- onStart: this.onResizeStart,
577
- onMove: this.onResizeMove,
578
- onEnd: this.onResizeEnd
579
- }), /*#__PURE__*/_jsx(Anchor, {
580
- dock: Dock.topLeft,
581
- onStart: this.onResizeStart,
582
- onMove: this.onResizeMove,
583
- onEnd: this.onResizeEnd
584
- }), /*#__PURE__*/_jsx(Anchor, {
585
- dock: Dock.topRight,
586
- onStart: this.onResizeStart,
587
- onMove: this.onResizeMove,
588
- onEnd: this.onResizeEnd
589
- }), /*#__PURE__*/_jsx(Anchor, {
590
- dock: Dock.bottomLeft,
591
- onStart: this.onResizeStart,
592
- onMove: this.onResizeMove,
593
- onEnd: this.onResizeEnd
594
- }), /*#__PURE__*/_jsx(Anchor, {
595
- dock: Dock.bottomRight,
596
- onStart: this.onResizeStart,
597
- onMove: this.onResizeMove,
598
- onEnd: this.onResizeEnd
599
- })]
448
+ return _objectSpread(_objectSpread(_objectSpread({}, baseStyle), _position), {}, {
449
+ transform: transform
600
450
  });
601
451
  }
602
- }, {
603
- key: "render",
604
- value: function render() {
605
- var _this$props9 = this.props,
606
- visible = _this$props9.visible,
607
- isEmbed = _this$props9.isEmbed;
608
- // 嵌入模式通过style控制显隐
609
- if (!visible && !isEmbed) return /*#__PURE__*/_jsx(React.Fragment, {});
610
- return /*#__PURE__*/createPortal(this.renderDialog(), DialogComp.container);
452
+ }, [maximization, isEmbed, minimize, moveX, moveY, width, headerStyle, dialogWidth, dialogHeight, dialogLeft, dialogTop, getCompatAbsPostion, getBaseStyle]);
453
+
454
+ // Render methods
455
+ var renderControlLink = function renderControlLink() {
456
+ if (!(extLink !== null && extLink !== void 0 && extLink.link)) {
457
+ return null;
611
458
  }
612
- }], [{
613
- key: "container",
614
- get: function get() {
615
- if (!this._container) {
616
- this._container = document.createElement('div');
617
- document.body.appendChild(this._container);
618
- }
619
- return this._container;
459
+ var linkText = extLink.text || (locale === null || locale === void 0 ? void 0 : locale.openHelpCenter);
460
+ return /*#__PURE__*/_jsx("span", {
461
+ className: "".concat(prefixCls, "-item"),
462
+ children: /*#__PURE__*/_jsxs("a", {
463
+ className: "".concat(prefixCls, "-item-link"),
464
+ href: extLink.link,
465
+ target: "_blank",
466
+ rel: "noopener noreferrer",
467
+ children: [/*#__PURE__*/_jsx("span", {
468
+ className: "".concat(prefixCls, "-item-link-text"),
469
+ children: linkText
470
+ }), /*#__PURE__*/_jsx("svg", {
471
+ className: "icon",
472
+ viewBox: "0 0 1024 1024",
473
+ version: "1.1",
474
+ xmlns: "http://www.w3.org/2000/svg",
475
+ width: "16",
476
+ height: "16",
477
+ "aria-hidden": true,
478
+ children: /*#__PURE__*/_jsx("path", {
479
+ d: "M880.0256 912.0256H144.0256a31.9488 31.9488 0 0 1-32.0512-32V144.0256c0-17.7152 14.336-32.0512 32.0512-32.0512h359.936c4.4544 0 8.0384 3.584 8.0384 8.0384v56.0128c0 4.352-3.584 7.9872-7.9872 7.9872h-320v655.9744h655.9744v-320c0-4.4032 3.584-7.9872 8.0384-7.9872h55.9616c4.4032 0 8.0384 3.584 8.0384 7.9872v359.9872c0 17.7152-14.336 32-32 32zM770.8672 199.1168l-52.224-52.224a8.0384 8.0384 0 0 1 4.7104-13.568l179.4048-20.992c5.12-0.6144 9.5232 3.6864 8.9088 8.9088l-20.992 179.4048a8.0384 8.0384 0 0 1-13.6192 4.6592L824.6784 252.928l-256.2048 256.2048c-3.072 3.072-8.192 3.072-11.264 0l-42.4448-42.3936a8.0384 8.0384 0 0 1 0-11.264l256.1024-256.3584z"
480
+ })
481
+ })]
482
+ })
483
+ });
484
+ };
485
+ var renderControls = function renderControls() {
486
+ if (isEmbed) {
487
+ return /*#__PURE__*/_jsxs("span", {
488
+ className: "".concat(prefixCls, "-controls"),
489
+ children: [renderControlLink(), /*#__PURE__*/_jsx("button", {
490
+ type: "button",
491
+ className: "".concat(prefixCls, "-item"),
492
+ "aria-label": locale === null || locale === void 0 ? void 0 : locale.closeDialog,
493
+ onClick: handleClose,
494
+ children: /*#__PURE__*/_jsx("span", {
495
+ "aria-hidden": true,
496
+ children: /*#__PURE__*/_jsx(CloseOutlined, {})
497
+ })
498
+ })]
499
+ });
620
500
  }
621
- }]);
622
- return DialogComp;
623
- }(React.PureComponent);
624
- _defineProperty(DialogComp, "defaultProps", {
625
- min: DEFAULT_MIN,
626
- resizable: true,
627
- draggable: true,
628
- enableMaximization: true,
629
- isEmbed: false
630
- });
631
- _defineProperty(DialogComp, "_container", void 0);
501
+ return /*#__PURE__*/_jsxs("span", {
502
+ className: "".concat(prefixCls, "-controls"),
503
+ children: [renderControlLink(), /*#__PURE__*/_jsx("button", {
504
+ type: "button",
505
+ className: "".concat(prefixCls, "-item"),
506
+ "aria-label": minimize ? locale === null || locale === void 0 ? void 0 : locale.restoreWindow : locale === null || locale === void 0 ? void 0 : locale.minimize,
507
+ onClick: toggleMinimize,
508
+ children: /*#__PURE__*/_jsx("span", {
509
+ "aria-hidden": true,
510
+ children: minimize ? /*#__PURE__*/_jsx(ExpandAltOutlined, {}) : /*#__PURE__*/_jsx(MinusOutlined, {})
511
+ })
512
+ }), enableMaximization && /*#__PURE__*/_jsx("button", {
513
+ type: "button",
514
+ className: "".concat(prefixCls, "-item"),
515
+ "aria-label": maximization ? locale === null || locale === void 0 ? void 0 : locale.exitFullscreen : locale === null || locale === void 0 ? void 0 : locale.maximize,
516
+ onClick: toggleMaximization,
517
+ children: /*#__PURE__*/_jsx("span", {
518
+ "aria-hidden": true,
519
+ children: maximization ? /*#__PURE__*/_jsx(FullscreenExitOutlined, {}) : /*#__PURE__*/_jsx(FullscreenOutlined, {})
520
+ })
521
+ }), /*#__PURE__*/_jsx("button", {
522
+ type: "button",
523
+ className: "".concat(prefixCls, "-item"),
524
+ "aria-label": locale === null || locale === void 0 ? void 0 : locale.closeDialog,
525
+ onClick: handleClose,
526
+ children: /*#__PURE__*/_jsx("span", {
527
+ "aria-hidden": true,
528
+ children: /*#__PURE__*/_jsx(CloseOutlined, {})
529
+ })
530
+ })]
531
+ });
532
+ };
533
+ var renderHeader = function renderHeader() {
534
+ var headerStyleObj = _objectSpread(_objectSpread(_objectSpread({}, headerStyle), minimize ? {
535
+ boxShadow: '0 2px 20px 0 rgba(4, 1, 30, 0.07)'
536
+ } : {}), isEmbed ? {
537
+ cursor: 'initial'
538
+ } : {});
539
+ return /*#__PURE__*/_jsxs("header", {
540
+ className: "".concat(prefixCls, "-header"),
541
+ style: headerStyleObj,
542
+ onPointerDown: onDragStart,
543
+ onDoubleClick: toggleMaximization,
544
+ children: [/*#__PURE__*/_jsx("span", {
545
+ className: "".concat(prefixCls, "-title"),
546
+ id: titleId,
547
+ children: title || (locale === null || locale === void 0 ? void 0 : locale.helpDocument)
548
+ }), renderControls()]
549
+ });
550
+ };
551
+ var renderMask = function renderMask() {
552
+ if (!mask) return null;
553
+ return /*#__PURE__*/_jsx("div", {
554
+ className: "".concat(prefixCls, "-mask")
555
+ });
556
+ };
557
+ var renderContent = function renderContent() {
558
+ return /*#__PURE__*/_jsxs("main", {
559
+ className: "".concat(prefixCls, "-main"),
560
+ style: minimize ? {
561
+ visibility: 'hidden'
562
+ } : {},
563
+ children: [renderMask(), children]
564
+ });
565
+ };
566
+ var renderEmbedBorders = function renderEmbedBorders() {
567
+ return /*#__PURE__*/_jsx(React.Fragment, {
568
+ children: /*#__PURE__*/_jsx(Anchor, {
569
+ prefixCls: prefixCls,
570
+ dock: Dock.left,
571
+ onStart: onResizeStart,
572
+ onMove: onResizeMove,
573
+ onEnd: onResizeEnd
574
+ })
575
+ });
576
+ };
577
+ var renderBorders = function renderBorders() {
578
+ return /*#__PURE__*/_jsxs(React.Fragment, {
579
+ children: [/*#__PURE__*/_jsx(Anchor, {
580
+ prefixCls: prefixCls,
581
+ dock: Dock.top,
582
+ onStart: onResizeStart,
583
+ onMove: onResizeMove,
584
+ onEnd: onResizeEnd
585
+ }), /*#__PURE__*/_jsx(Anchor, {
586
+ prefixCls: prefixCls,
587
+ dock: Dock.right,
588
+ onStart: onResizeStart,
589
+ onMove: onResizeMove,
590
+ onEnd: onResizeEnd
591
+ }), /*#__PURE__*/_jsx(Anchor, {
592
+ prefixCls: prefixCls,
593
+ dock: Dock.bottom,
594
+ onStart: onResizeStart,
595
+ onMove: onResizeMove,
596
+ onEnd: onResizeEnd
597
+ }), /*#__PURE__*/_jsx(Anchor, {
598
+ prefixCls: prefixCls,
599
+ dock: Dock.left,
600
+ onStart: onResizeStart,
601
+ onMove: onResizeMove,
602
+ onEnd: onResizeEnd
603
+ }), /*#__PURE__*/_jsx(Anchor, {
604
+ prefixCls: prefixCls,
605
+ dock: Dock.topLeft,
606
+ onStart: onResizeStart,
607
+ onMove: onResizeMove,
608
+ onEnd: onResizeEnd
609
+ }), /*#__PURE__*/_jsx(Anchor, {
610
+ prefixCls: prefixCls,
611
+ dock: Dock.topRight,
612
+ onStart: onResizeStart,
613
+ onMove: onResizeMove,
614
+ onEnd: onResizeEnd
615
+ }), /*#__PURE__*/_jsx(Anchor, {
616
+ prefixCls: prefixCls,
617
+ dock: Dock.bottomLeft,
618
+ onStart: onResizeStart,
619
+ onMove: onResizeMove,
620
+ onEnd: onResizeEnd
621
+ }), /*#__PURE__*/_jsx(Anchor, {
622
+ prefixCls: prefixCls,
623
+ dock: Dock.bottomRight,
624
+ onStart: onResizeStart,
625
+ onMove: onResizeMove,
626
+ onEnd: onResizeEnd
627
+ })]
628
+ });
629
+ };
630
+ var renderDialog = function renderDialog() {
631
+ var style = getStyle;
632
+ return wrapSSR( /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
633
+ ref: dialogRootRef,
634
+ className: "".concat(prefixCls, "-container ").concat(className || '', " ").concat(isEmbed ? "".concat(prefixCls, "-container-embed") : ''),
635
+ style: style,
636
+ role: "dialog",
637
+ "aria-modal": "true",
638
+ "aria-labelledby": titleId
639
+ }, minimize ? {} : {
640
+ tabIndex: -1
641
+ }), {}, {
642
+ children: [renderHeader(), renderContent(), isEmbed ? renderEmbedBorders() : renderBorders(), /*#__PURE__*/_jsx(EventProxy, {
643
+ onPointerMove: onDragMove,
644
+ onPointerUp: onDragEnd
645
+ }), /*#__PURE__*/_jsx(EventProxy, {
646
+ onPointerUp: detectPointUp
647
+ })]
648
+ })));
649
+ };
650
+
651
+ // 嵌入模式通过style控制显隐
652
+ if (!visible && !isEmbed) return /*#__PURE__*/_jsx(React.Fragment, {});
653
+ return /*#__PURE__*/createPortal(renderDialog(), getContainer());
654
+ };
632
655
  export default LocaleWrapper({
633
656
  componentName: 'Dialog',
634
657
  defaultLocale: zhCN