@oceanbase/ui 1.0.0-alpha.8 → 1.0.0

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 (461) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Group.d.ts +1 -2
  3. package/es/Action/Group.js +292 -120
  4. package/es/Action/Item.js +1 -0
  5. package/es/Action/index.js +1 -0
  6. package/es/BackgroundTaskManager/RefreshMan.js +1 -0
  7. package/es/BackgroundTaskManager/index.d.ts +2 -0
  8. package/es/BackgroundTaskManager/index.js +26 -4
  9. package/es/BasicLayout/Header.js +1 -0
  10. package/es/BasicLayout/index.d.ts +3 -1
  11. package/es/BasicLayout/index.js +63 -24
  12. package/es/BasicLayout/locale/en-US.d.ts +3 -0
  13. package/es/BasicLayout/locale/en-US.js +4 -1
  14. package/es/BasicLayout/locale/ja-JP.d.ts +3 -0
  15. package/es/BasicLayout/locale/ja-JP.js +4 -1
  16. package/es/BasicLayout/locale/zh-CN.d.ts +3 -0
  17. package/es/BasicLayout/locale/zh-CN.js +4 -1
  18. package/es/BasicLayout/locale/zh-TW.d.ts +3 -0
  19. package/es/BasicLayout/locale/zh-TW.js +4 -1
  20. package/es/BasicLayout/style/index.js +11 -3
  21. package/es/BatchOperationBar/index.js +16 -4
  22. package/es/BatchOperationBar/locale/en-US.d.ts +1 -0
  23. package/es/BatchOperationBar/locale/en-US.js +2 -1
  24. package/es/BatchOperationBar/locale/ja-JP.d.ts +1 -0
  25. package/es/BatchOperationBar/locale/ja-JP.js +2 -1
  26. package/es/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  27. package/es/BatchOperationBar/locale/zh-CN.js +2 -1
  28. package/es/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  29. package/es/BatchOperationBar/locale/zh-TW.js +2 -1
  30. package/es/BatchOperationBar/style/index.js +6 -1
  31. package/es/Boundary/Components/Code.js +2 -1
  32. package/es/Boundary/Components/Exception.js +3 -2
  33. package/es/Boundary/Components/Function.js +2 -1
  34. package/es/Boundary/index.js +1 -0
  35. package/es/Boundary/style/index.js +5 -3
  36. package/es/ContentWithIcon/index.js +1 -0
  37. package/es/ContentWithQuestion/index.js +1 -0
  38. package/es/DateRanger/EditableDateTimeInput.d.ts +23 -0
  39. package/es/DateRanger/EditableDateTimeInput.js +129 -0
  40. package/es/DateRanger/PickerPanel.js +32 -16
  41. package/es/DateRanger/Ranger.d.ts +4 -1
  42. package/es/DateRanger/Ranger.js +59 -42
  43. package/es/DateRanger/hooks/index.d.ts +4 -0
  44. package/es/DateRanger/hooks/index.js +2 -0
  45. package/es/DateRanger/hooks/useAutoWidthInput.d.ts +13 -0
  46. package/es/DateRanger/hooks/useAutoWidthInput.js +44 -0
  47. package/es/DateRanger/hooks/useSegmentedInput.d.ts +31 -0
  48. package/es/DateRanger/hooks/useSegmentedInput.js +304 -0
  49. package/es/DateRanger/index.js +1 -0
  50. package/es/DateRanger/locale/en-US.d.ts +2 -0
  51. package/es/DateRanger/locale/en-US.js +3 -1
  52. package/es/DateRanger/locale/ja-JP.d.ts +2 -0
  53. package/es/DateRanger/locale/ja-JP.js +3 -1
  54. package/es/DateRanger/locale/zh-CN.d.ts +2 -0
  55. package/es/DateRanger/locale/zh-CN.js +3 -1
  56. package/es/DateRanger/locale/zh-TW.d.ts +2 -0
  57. package/es/DateRanger/locale/zh-TW.js +3 -1
  58. package/es/DateRanger/style/index.js +52 -14
  59. package/es/Dialog/Anchor.js +1 -0
  60. package/es/Dialog/EventProxy.js +1 -0
  61. package/es/Dialog/index.d.ts +5 -0
  62. package/es/Dialog/index.js +78 -14
  63. package/es/Dialog/locale/en-US.d.ts +5 -0
  64. package/es/Dialog/locale/en-US.js +6 -1
  65. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  66. package/es/Dialog/locale/ja-JP.js +6 -1
  67. package/es/Dialog/locale/zh-CN.d.ts +5 -0
  68. package/es/Dialog/locale/zh-CN.js +6 -1
  69. package/es/Dialog/locale/zh-TW.d.ts +5 -0
  70. package/es/Dialog/locale/zh-TW.js +6 -1
  71. package/es/Dialog/style/index.js +25 -6
  72. package/es/DocDialog/index.js +29 -9
  73. package/es/DocDialog/locale/en-US.d.ts +3 -1
  74. package/es/DocDialog/locale/en-US.js +3 -1
  75. package/es/DocDialog/locale/ja-JP.d.ts +3 -1
  76. package/es/DocDialog/locale/ja-JP.js +3 -1
  77. package/es/DocDialog/locale/zh-CN.d.ts +3 -1
  78. package/es/DocDialog/locale/zh-CN.js +3 -1
  79. package/es/DocDialog/locale/zh-TW.d.ts +3 -1
  80. package/es/DocDialog/locale/zh-TW.js +3 -1
  81. package/es/FooterToolbar/index.d.ts +7 -4
  82. package/es/FooterToolbar/index.js +28 -11
  83. package/es/FooterToolbar/locale/en-US.d.ts +4 -0
  84. package/es/FooterToolbar/locale/en-US.js +3 -0
  85. package/es/FooterToolbar/locale/ja-JP.d.ts +4 -0
  86. package/es/FooterToolbar/locale/ja-JP.js +3 -0
  87. package/es/FooterToolbar/locale/zh-CN.d.ts +4 -0
  88. package/es/FooterToolbar/locale/zh-CN.js +3 -0
  89. package/es/FooterToolbar/locale/zh-TW.d.ts +4 -0
  90. package/es/FooterToolbar/locale/zh-TW.js +3 -0
  91. package/es/FooterToolbar/style/index.js +3 -6
  92. package/es/FullscreenBox/index.js +19 -10
  93. package/es/FullscreenBox/locale/en-US.d.ts +4 -1
  94. package/es/FullscreenBox/locale/en-US.js +4 -1
  95. package/es/FullscreenBox/locale/ja-JP.d.ts +4 -1
  96. package/es/FullscreenBox/locale/ja-JP.js +4 -1
  97. package/es/FullscreenBox/locale/zh-CN.d.ts +4 -1
  98. package/es/FullscreenBox/locale/zh-CN.js +4 -1
  99. package/es/FullscreenBox/locale/zh-TW.d.ts +4 -1
  100. package/es/FullscreenBox/locale/zh-TW.js +4 -1
  101. package/es/FullscreenBox/style/index.js +32 -11
  102. package/es/Highlight/DiffView/DiffCells.js +1 -0
  103. package/es/Highlight/DiffView/index.js +1 -0
  104. package/es/Highlight/HighlightCell.js +1 -0
  105. package/es/Highlight/JsonView.js +1 -0
  106. package/es/Highlight/index.js +10 -2
  107. package/es/Highlight/locale/en-US.d.ts +2 -0
  108. package/es/Highlight/locale/en-US.js +3 -1
  109. package/es/Highlight/locale/ja-JP.d.ts +2 -0
  110. package/es/Highlight/locale/ja-JP.js +3 -1
  111. package/es/Highlight/locale/zh-CN.d.ts +2 -0
  112. package/es/Highlight/locale/zh-CN.js +3 -1
  113. package/es/Highlight/locale/zh-TW.d.ts +2 -0
  114. package/es/Highlight/locale/zh-TW.js +3 -1
  115. package/es/Highlight/style/index.js +1 -1
  116. package/es/Highlight/useKeyDownCopyEvent.js +1 -0
  117. package/es/IconFont/index.js +1 -0
  118. package/es/LightFilter/index.d.ts +6 -2
  119. package/es/LightFilter/index.js +25 -8
  120. package/es/LightFilter/locale/en-US.d.ts +4 -0
  121. package/es/LightFilter/locale/en-US.js +3 -0
  122. package/es/LightFilter/locale/ja-JP.d.ts +4 -0
  123. package/es/LightFilter/locale/ja-JP.js +3 -0
  124. package/es/LightFilter/locale/zh-CN.d.ts +4 -0
  125. package/es/LightFilter/locale/zh-CN.js +3 -0
  126. package/es/LightFilter/locale/zh-TW.d.ts +4 -0
  127. package/es/LightFilter/locale/zh-TW.js +3 -0
  128. package/es/LocaleDropdown/index.js +1 -0
  129. package/es/Login/ActivateForm.js +1 -0
  130. package/es/Login/LoginForm.js +1 -0
  131. package/es/Login/RegisterForm.js +1 -0
  132. package/es/Login/index.js +1 -0
  133. package/es/Login/style/index.js +1 -1
  134. package/es/Lottie/index.js +1 -0
  135. package/es/NavMenu/index.d.ts +5 -2
  136. package/es/NavMenu/index.js +28 -5
  137. package/es/NavMenu/locale/en-US.d.ts +4 -0
  138. package/es/NavMenu/locale/en-US.js +3 -0
  139. package/es/NavMenu/locale/ja-JP.d.ts +4 -0
  140. package/es/NavMenu/locale/ja-JP.js +3 -0
  141. package/es/NavMenu/locale/zh-CN.d.ts +4 -0
  142. package/es/NavMenu/locale/zh-CN.js +3 -0
  143. package/es/NavMenu/locale/zh-TW.d.ts +4 -0
  144. package/es/NavMenu/locale/zh-TW.js +3 -0
  145. package/es/PageContainer/ItemRender.js +1 -0
  146. package/es/PageContainer/index.js +62 -19
  147. package/es/PageContainer/style/index.js +26 -11
  148. package/es/PageLoading/index.js +1 -0
  149. package/es/Password/Content.d.ts +2 -0
  150. package/es/Password/Content.js +12 -3
  151. package/es/Password/index.d.ts +1 -0
  152. package/es/Password/index.js +18 -13
  153. package/es/Password/locale/en-US.d.ts +1 -0
  154. package/es/Password/locale/en-US.js +2 -1
  155. package/es/Password/locale/ja-JP.d.ts +1 -0
  156. package/es/Password/locale/ja-JP.js +1 -0
  157. package/es/Password/locale/zh-CN.d.ts +1 -0
  158. package/es/Password/locale/zh-CN.js +1 -0
  159. package/es/Password/locale/zh-TW.d.ts +1 -0
  160. package/es/Password/locale/zh-TW.js +2 -1
  161. package/es/ProCard/index.js +1 -0
  162. package/es/ProCard/style/index.js +9 -4
  163. package/es/ProTable/index.js +10 -2
  164. package/es/Ranger/QuickPicker.js +1 -0
  165. package/es/Ranger/Ranger.js +1 -0
  166. package/es/Ranger/index.js +1 -0
  167. package/es/Ranger/style/index.js +1 -1
  168. package/es/SideTip/Dragger.js +3 -1
  169. package/es/SideTip/IconLoading.js +1 -0
  170. package/es/SideTip/index.js +39 -8
  171. package/es/SideTip/locale/en-US.d.ts +4 -1
  172. package/es/SideTip/locale/en-US.js +4 -1
  173. package/es/SideTip/locale/ja-JP.d.ts +4 -1
  174. package/es/SideTip/locale/ja-JP.js +4 -1
  175. package/es/SideTip/locale/zh-CN.d.ts +4 -1
  176. package/es/SideTip/locale/zh-CN.js +4 -1
  177. package/es/SideTip/locale/zh-TW.d.ts +4 -1
  178. package/es/SideTip/locale/zh-TW.js +4 -1
  179. package/es/SideTip/style/index.js +10 -1
  180. package/es/TagSelect/Group.js +7 -2
  181. package/es/TagSelect/Item.js +3 -1
  182. package/es/TagSelect/index.js +1 -0
  183. package/es/TreeSearch/index.js +1 -0
  184. package/es/Welcome/index.js +1 -0
  185. package/es/Welcome/step.js +1 -0
  186. package/es/_util/genComponentStyleHook.d.ts +2 -1
  187. package/es/_util/index.js +6 -0
  188. package/es/assets/logo/oceanbase_logo.svg +45 -29
  189. package/es/assets/logo/oceanbase_logo_dark.svg +45 -29
  190. package/es/assets/logo/oceanbase_watermark.svg +45 -31
  191. package/es/constant/index.js +1 -0
  192. package/es/index.js +1 -0
  193. package/es/locale/LocaleWrapper.js +1 -0
  194. package/es/locale/en-US.js +6 -0
  195. package/es/locale/index.js +1 -0
  196. package/es/locale/ja-JP.js +6 -0
  197. package/es/locale/zh-CN.js +6 -0
  198. package/es/locale/zh-TW.js +6 -0
  199. package/lib/Action/Group.d.ts +1 -2
  200. package/lib/Action/Group.js +333 -176
  201. package/lib/Action/Item.js +47 -66
  202. package/lib/Action/index.js +13 -36
  203. package/lib/Action/style/index.js +25 -43
  204. package/lib/BackgroundTaskManager/RefreshMan.js +34 -51
  205. package/lib/BackgroundTaskManager/constants.js +10 -32
  206. package/lib/BackgroundTaskManager/index.d.ts +2 -0
  207. package/lib/BackgroundTaskManager/index.js +137 -126
  208. package/lib/BasicLayout/Header.js +242 -200
  209. package/lib/BasicLayout/index.d.ts +3 -1
  210. package/lib/BasicLayout/index.js +308 -317
  211. package/lib/BasicLayout/locale/en-US.d.ts +3 -0
  212. package/lib/BasicLayout/locale/en-US.js +19 -34
  213. package/lib/BasicLayout/locale/ja-JP.d.ts +3 -0
  214. package/lib/BasicLayout/locale/ja-JP.js +19 -34
  215. package/lib/BasicLayout/locale/zh-CN.d.ts +3 -0
  216. package/lib/BasicLayout/locale/zh-CN.js +19 -34
  217. package/lib/BasicLayout/locale/zh-TW.d.ts +3 -0
  218. package/lib/BasicLayout/locale/zh-TW.js +19 -34
  219. package/lib/BasicLayout/style/Header.js +41 -60
  220. package/lib/BasicLayout/style/index.js +186 -198
  221. package/lib/BatchOperationBar/index.js +120 -152
  222. package/lib/BatchOperationBar/locale/en-US.d.ts +1 -0
  223. package/lib/BatchOperationBar/locale/en-US.js +11 -28
  224. package/lib/BatchOperationBar/locale/ja-JP.d.ts +1 -0
  225. package/lib/BatchOperationBar/locale/ja-JP.js +11 -28
  226. package/lib/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  227. package/lib/BatchOperationBar/locale/zh-CN.js +11 -28
  228. package/lib/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  229. package/lib/BatchOperationBar/locale/zh-TW.js +11 -28
  230. package/lib/BatchOperationBar/style/index.js +35 -46
  231. package/lib/Boundary/Components/Code.js +57 -76
  232. package/lib/Boundary/Components/Exception.js +103 -124
  233. package/lib/Boundary/Components/Function.js +47 -63
  234. package/lib/Boundary/Components/index.js +36 -25
  235. package/lib/Boundary/IBoundary.js +4 -16
  236. package/lib/Boundary/constant.js +16 -38
  237. package/lib/Boundary/index.js +11 -25
  238. package/lib/Boundary/locale/en-US.js +14 -32
  239. package/lib/Boundary/locale/ja-JP.js +14 -32
  240. package/lib/Boundary/locale/zh-CN.js +14 -32
  241. package/lib/Boundary/locale/zh-TW.js +14 -32
  242. package/lib/Boundary/style/index.js +32 -49
  243. package/lib/Boundary/utils.js +9 -31
  244. package/lib/ContentWithIcon/index.js +101 -115
  245. package/lib/ContentWithIcon/style/index.js +17 -36
  246. package/lib/ContentWithQuestion/index.js +40 -53
  247. package/lib/ContentWithQuestion/style/index.js +16 -35
  248. package/lib/DateRanger/EditableDateTimeInput.d.ts +23 -0
  249. package/lib/DateRanger/EditableDateTimeInput.js +131 -0
  250. package/lib/DateRanger/PickerPanel.js +358 -329
  251. package/lib/DateRanger/Ranger.d.ts +4 -1
  252. package/lib/DateRanger/Ranger.js +446 -516
  253. package/lib/DateRanger/constant/index.js +188 -376
  254. package/lib/DateRanger/hooks/index.d.ts +4 -0
  255. package/lib/DateRanger/hooks/index.js +19 -0
  256. package/lib/DateRanger/hooks/useAutoWidthInput.d.ts +13 -0
  257. package/lib/DateRanger/hooks/useAutoWidthInput.js +37 -0
  258. package/lib/DateRanger/hooks/useSegmentedInput.d.ts +31 -0
  259. package/lib/DateRanger/hooks/useSegmentedInput.js +233 -0
  260. package/lib/DateRanger/index.js +45 -65
  261. package/lib/DateRanger/locale/en-US.d.ts +2 -0
  262. package/lib/DateRanger/locale/en-US.js +22 -47
  263. package/lib/DateRanger/locale/ja-JP.d.ts +2 -0
  264. package/lib/DateRanger/locale/ja-JP.js +22 -47
  265. package/lib/DateRanger/locale/zh-CN.d.ts +2 -0
  266. package/lib/DateRanger/locale/zh-CN.js +22 -47
  267. package/lib/DateRanger/locale/zh-TW.d.ts +2 -0
  268. package/lib/DateRanger/locale/zh-TW.js +22 -47
  269. package/lib/DateRanger/style/index.js +101 -72
  270. package/lib/DateRanger/typing.js +4 -16
  271. package/lib/Dialog/Anchor.js +70 -96
  272. package/lib/Dialog/Dock.js +14 -36
  273. package/lib/Dialog/EventProxy.js +21 -40
  274. package/lib/Dialog/index.d.ts +5 -0
  275. package/lib/Dialog/index.js +385 -371
  276. package/lib/Dialog/locale/en-US.d.ts +5 -0
  277. package/lib/Dialog/locale/en-US.js +13 -26
  278. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  279. package/lib/Dialog/locale/ja-JP.js +13 -26
  280. package/lib/Dialog/locale/zh-CN.d.ts +5 -0
  281. package/lib/Dialog/locale/zh-CN.js +13 -26
  282. package/lib/Dialog/locale/zh-TW.d.ts +5 -0
  283. package/lib/Dialog/locale/zh-TW.js +13 -26
  284. package/lib/Dialog/style/index.js +81 -79
  285. package/lib/DocDialog/index.js +69 -82
  286. package/lib/DocDialog/locale/en-US.d.ts +3 -1
  287. package/lib/DocDialog/locale/en-US.js +7 -23
  288. package/lib/DocDialog/locale/ja-JP.d.ts +3 -1
  289. package/lib/DocDialog/locale/ja-JP.js +7 -23
  290. package/lib/DocDialog/locale/zh-CN.d.ts +3 -1
  291. package/lib/DocDialog/locale/zh-CN.js +7 -23
  292. package/lib/DocDialog/locale/zh-TW.d.ts +3 -1
  293. package/lib/DocDialog/locale/zh-TW.js +7 -23
  294. package/lib/FooterToolbar/index.d.ts +7 -4
  295. package/lib/FooterToolbar/index.js +48 -51
  296. package/lib/FooterToolbar/locale/en-US.d.ts +4 -0
  297. package/lib/FooterToolbar/locale/en-US.js +9 -0
  298. package/lib/FooterToolbar/locale/ja-JP.d.ts +4 -0
  299. package/lib/FooterToolbar/locale/ja-JP.js +9 -0
  300. package/lib/FooterToolbar/locale/zh-CN.d.ts +4 -0
  301. package/lib/FooterToolbar/locale/zh-CN.js +9 -0
  302. package/lib/FooterToolbar/locale/zh-TW.d.ts +4 -0
  303. package/lib/FooterToolbar/locale/zh-TW.js +9 -0
  304. package/lib/FooterToolbar/style/index.js +22 -40
  305. package/lib/FullscreenBox/index.js +159 -139
  306. package/lib/FullscreenBox/locale/en-US.d.ts +4 -1
  307. package/lib/FullscreenBox/locale/en-US.js +8 -23
  308. package/lib/FullscreenBox/locale/ja-JP.d.ts +4 -1
  309. package/lib/FullscreenBox/locale/ja-JP.js +8 -23
  310. package/lib/FullscreenBox/locale/zh-CN.d.ts +4 -1
  311. package/lib/FullscreenBox/locale/zh-CN.js +8 -23
  312. package/lib/FullscreenBox/locale/zh-TW.d.ts +4 -1
  313. package/lib/FullscreenBox/locale/zh-TW.js +8 -23
  314. package/lib/FullscreenBox/style/index.js +52 -48
  315. package/lib/Highlight/DiffView/DiffCells.js +34 -55
  316. package/lib/Highlight/DiffView/index.js +165 -164
  317. package/lib/Highlight/HighlightCell.js +28 -48
  318. package/lib/Highlight/JsonView.js +45 -75
  319. package/lib/Highlight/index.js +206 -214
  320. package/lib/Highlight/languages/bash.js +7 -34
  321. package/lib/Highlight/languages/cpp.js +7 -34
  322. package/lib/Highlight/languages/css.js +7 -34
  323. package/lib/Highlight/languages/dockerfile.js +7 -34
  324. package/lib/Highlight/languages/go.js +7 -34
  325. package/lib/Highlight/languages/groovy.js +7 -34
  326. package/lib/Highlight/languages/http.js +7 -34
  327. package/lib/Highlight/languages/java.js +7 -34
  328. package/lib/Highlight/languages/javascript.js +7 -34
  329. package/lib/Highlight/languages/json.js +7 -34
  330. package/lib/Highlight/languages/markdown.js +7 -34
  331. package/lib/Highlight/languages/nginx.js +7 -34
  332. package/lib/Highlight/languages/python.js +7 -34
  333. package/lib/Highlight/languages/ruby.js +7 -34
  334. package/lib/Highlight/languages/solidity.js +7 -34
  335. package/lib/Highlight/languages/sql.js +7 -34
  336. package/lib/Highlight/languages/typescript.js +7 -34
  337. package/lib/Highlight/languages/xml.js +7 -34
  338. package/lib/Highlight/languages/yaml.js +7 -34
  339. package/lib/Highlight/locale/en-US.d.ts +2 -0
  340. package/lib/Highlight/locale/en-US.js +9 -25
  341. package/lib/Highlight/locale/ja-JP.d.ts +2 -0
  342. package/lib/Highlight/locale/ja-JP.js +9 -25
  343. package/lib/Highlight/locale/zh-CN.d.ts +2 -0
  344. package/lib/Highlight/locale/zh-CN.js +9 -25
  345. package/lib/Highlight/locale/zh-TW.d.ts +2 -0
  346. package/lib/Highlight/locale/zh-TW.js +9 -25
  347. package/lib/Highlight/style/index.js +129 -145
  348. package/lib/Highlight/useKeyDownCopyEvent.js +40 -65
  349. package/lib/IconFont/index.js +23 -29
  350. package/lib/LightFilter/index.d.ts +6 -2
  351. package/lib/LightFilter/index.js +46 -44
  352. package/lib/LightFilter/locale/en-US.d.ts +4 -0
  353. package/lib/LightFilter/locale/en-US.js +9 -0
  354. package/lib/LightFilter/locale/ja-JP.d.ts +4 -0
  355. package/lib/LightFilter/locale/ja-JP.js +9 -0
  356. package/lib/LightFilter/locale/zh-CN.d.ts +4 -0
  357. package/lib/LightFilter/locale/zh-CN.js +9 -0
  358. package/lib/LightFilter/locale/zh-TW.d.ts +4 -0
  359. package/lib/LightFilter/locale/zh-TW.js +9 -0
  360. package/lib/LightFilter/style/index.js +15 -33
  361. package/lib/LocaleDropdown/index.js +43 -54
  362. package/lib/Login/ActivateForm.js +93 -120
  363. package/lib/Login/LoginForm.js +149 -185
  364. package/lib/Login/RegisterForm.js +122 -164
  365. package/lib/Login/index.js +157 -163
  366. package/lib/Login/locale/en-US.js +31 -49
  367. package/lib/Login/locale/ja-JP.js +31 -49
  368. package/lib/Login/locale/zh-CN.js +31 -49
  369. package/lib/Login/locale/zh-TW.js +30 -48
  370. package/lib/Login/style/index.js +78 -99
  371. package/lib/Lottie/index.js +7 -25
  372. package/lib/NavMenu/index.d.ts +5 -2
  373. package/lib/NavMenu/index.js +121 -110
  374. package/lib/NavMenu/locale/en-US.d.ts +4 -0
  375. package/lib/NavMenu/locale/en-US.js +9 -0
  376. package/lib/NavMenu/locale/ja-JP.d.ts +4 -0
  377. package/lib/NavMenu/locale/ja-JP.js +9 -0
  378. package/lib/NavMenu/locale/zh-CN.d.ts +4 -0
  379. package/lib/NavMenu/locale/zh-CN.js +9 -0
  380. package/lib/NavMenu/locale/zh-TW.d.ts +4 -0
  381. package/lib/NavMenu/locale/zh-TW.js +9 -0
  382. package/lib/NavMenu/style/index.js +31 -49
  383. package/lib/PageContainer/ItemRender.js +28 -47
  384. package/lib/PageContainer/index.js +161 -142
  385. package/lib/PageContainer/locale/en-US.js +8 -26
  386. package/lib/PageContainer/locale/ja-JP.js +8 -26
  387. package/lib/PageContainer/locale/zh-CN.js +8 -26
  388. package/lib/PageContainer/locale/zh-TW.js +8 -26
  389. package/lib/PageContainer/style/index.js +55 -47
  390. package/lib/PageLoading/index.js +33 -55
  391. package/lib/Password/Content.d.ts +2 -0
  392. package/lib/Password/Content.js +100 -81
  393. package/lib/Password/index.d.ts +1 -0
  394. package/lib/Password/index.js +132 -161
  395. package/lib/Password/locale/en-US.d.ts +1 -0
  396. package/lib/Password/locale/en-US.js +15 -32
  397. package/lib/Password/locale/ja-JP.d.ts +1 -0
  398. package/lib/Password/locale/ja-JP.js +17 -34
  399. package/lib/Password/locale/zh-CN.d.ts +1 -0
  400. package/lib/Password/locale/zh-CN.js +16 -33
  401. package/lib/Password/locale/zh-TW.d.ts +1 -0
  402. package/lib/Password/locale/zh-TW.js +15 -32
  403. package/lib/ProCard/index.js +77 -99
  404. package/lib/ProCard/style/index.js +31 -38
  405. package/lib/ProTable/index.js +102 -123
  406. package/lib/ProTable/style/index.js +21 -38
  407. package/lib/Ranger/QuickPicker.js +92 -95
  408. package/lib/Ranger/Ranger.js +98 -134
  409. package/lib/Ranger/constant/index.js +115 -266
  410. package/lib/Ranger/index.js +61 -70
  411. package/lib/Ranger/locale/en-US.js +31 -49
  412. package/lib/Ranger/locale/ja-JP.js +31 -49
  413. package/lib/Ranger/locale/zh-CN.js +7 -25
  414. package/lib/Ranger/locale/zh-TW.js +7 -25
  415. package/lib/Ranger/style/index.js +22 -40
  416. package/lib/Ranger/typing.js +4 -16
  417. package/lib/SideTip/Dragger.js +259 -220
  418. package/lib/SideTip/IconLoading.js +43 -75
  419. package/lib/SideTip/index.js +155 -128
  420. package/lib/SideTip/locale/en-US.d.ts +4 -1
  421. package/lib/SideTip/locale/en-US.js +8 -23
  422. package/lib/SideTip/locale/ja-JP.d.ts +4 -1
  423. package/lib/SideTip/locale/ja-JP.js +8 -23
  424. package/lib/SideTip/locale/zh-CN.d.ts +4 -1
  425. package/lib/SideTip/locale/zh-CN.js +8 -23
  426. package/lib/SideTip/locale/zh-TW.d.ts +4 -1
  427. package/lib/SideTip/locale/zh-TW.js +8 -23
  428. package/lib/SideTip/style/index.js +85 -92
  429. package/lib/SideTip/utils.js +40 -61
  430. package/lib/TagSelect/Group.js +68 -84
  431. package/lib/TagSelect/Item.js +68 -92
  432. package/lib/TagSelect/TagSelectContext.js +7 -25
  433. package/lib/TagSelect/index.js +12 -36
  434. package/lib/TagSelect/style/index.js +41 -64
  435. package/lib/TreeSearch/index.js +133 -127
  436. package/lib/TreeSearch/util.js +52 -70
  437. package/lib/Welcome/index.js +142 -118
  438. package/lib/Welcome/locale/en-US.js +8 -26
  439. package/lib/Welcome/locale/ja-JP.js +8 -26
  440. package/lib/Welcome/locale/zh-CN.js +8 -26
  441. package/lib/Welcome/locale/zh-TW.js +8 -26
  442. package/lib/Welcome/step/style/index.js +24 -40
  443. package/lib/Welcome/step.js +63 -60
  444. package/lib/Welcome/style/index.js +58 -70
  445. package/lib/_util/genComponentStyleHook.d.ts +2 -1
  446. package/lib/_util/genComponentStyleHook.js +15 -43
  447. package/lib/_util/index.js +43 -44
  448. package/lib/_util/useNavigate.js +11 -26
  449. package/lib/assets/logo/oceanbase_logo.svg +45 -29
  450. package/lib/assets/logo/oceanbase_logo_dark.svg +45 -29
  451. package/lib/assets/logo/oceanbase_watermark.svg +45 -31
  452. package/lib/constant/index.js +23 -50
  453. package/lib/index.js +282 -129
  454. package/lib/interface.js +4 -16
  455. package/lib/locale/LocaleWrapper.js +50 -61
  456. package/lib/locale/en-US.js +43 -64
  457. package/lib/locale/index.js +5 -17
  458. package/lib/locale/ja-JP.js +43 -64
  459. package/lib/locale/zh-CN.js +42 -63
  460. package/lib/locale/zh-TW.js +38 -59
  461. package/package.json +6 -6
@@ -0,0 +1,304 @@
1
+ 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
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ 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."); }
7
+ 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); }
8
+ 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; }
9
+ 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; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import { useRef, useCallback, useState, useMemo, useEffect } from 'react';
12
+ import dayjs from 'dayjs';
13
+ import 'dayjs/locale/en';
14
+ import 'dayjs/locale/zh-cn';
15
+ import moment from 'moment';
16
+ // 常量
17
+ var RANGE_SEPARATORS = [' ~ ', '~', ' - ', ' – ', ' — '];
18
+ var TIMEZONE_PATTERN = /(\s*\(?(?:UTC|GMT)[+-]?\d*\)?)\s*$/i;
19
+
20
+ // 格式化日期值,确保使用正确的 locale
21
+ var formatDateValue = function formatDateValue(date, formatStr, isMoment, isCn) {
22
+ if (!date) return '';
23
+ var locale = isCn ? 'zh-cn' : 'en';
24
+ if (isMoment || moment.isMoment(date)) {
25
+ return date.locale(locale).format(formatStr);
26
+ } else {
27
+ var dayjsInstance = dayjs.isDayjs(date) ? date : dayjs(date);
28
+ return dayjsInstance.locale(locale).format(formatStr);
29
+ }
30
+ };
31
+
32
+ // 解析粘贴文本,提取开始和结束时间字符串
33
+ var parsePastedText = function parsePastedText(text) {
34
+ for (var _i = 0, _RANGE_SEPARATORS = RANGE_SEPARATORS; _i < _RANGE_SEPARATORS.length; _i++) {
35
+ var sep = _RANGE_SEPARATORS[_i];
36
+ if (text.includes(sep)) {
37
+ var parts = text.split(sep);
38
+ if (parts.length === 2) {
39
+ return [parts[0].trim(), parts[1].trim()];
40
+ }
41
+ }
42
+ }
43
+ // 如果没有找到分隔符,使用整个文本作为开始和结束时间
44
+ return [text, text];
45
+ };
46
+
47
+ // 解析日期字符串
48
+ var parseDateString = function parseDateString(dateStr, formatStr, isMoment) {
49
+ var strictParsed = isMoment ? moment(dateStr, formatStr, true) : dayjs(dateStr, formatStr, true);
50
+
51
+ // 如果严格解析失败,尝试宽松解析
52
+ if (strictParsed.isValid()) {
53
+ return strictParsed;
54
+ }
55
+ return isMoment ? moment(dateStr) : dayjs(dateStr);
56
+ };
57
+ export var useSegmentedInput = function useSegmentedInput(options) {
58
+ var value = options.value,
59
+ onChange = options.onChange,
60
+ format = options.format,
61
+ baseFormat = options.baseFormat,
62
+ _options$isMoment = options.isMoment,
63
+ isMoment = _options$isMoment === void 0 ? false : _options$isMoment,
64
+ _options$isCn = options.isCn,
65
+ isCn = _options$isCn === void 0 ? true : _options$isCn,
66
+ onClick = options.onClick,
67
+ _options$open = options.open,
68
+ open = _options$open === void 0 ? false : _options$open;
69
+ var inputRef = useRef(null);
70
+ var _useState = useState(false),
71
+ _useState2 = _slicedToArray(_useState, 2),
72
+ isEditing = _useState2[0],
73
+ setIsEditing = _useState2[1];
74
+ // 粘贴值:仅作为预览,只有确认后才触发 onChange
75
+ var _useState3 = useState(null),
76
+ _useState4 = _slicedToArray(_useState3, 2),
77
+ pastedValue = _useState4[0],
78
+ setPastedValue = _useState4[1];
79
+
80
+ // 根据语言环境设置分隔符
81
+ var rangeSeparator = useMemo(function () {
82
+ return isCn ? ' ~ ' : ' - ';
83
+ }, [isCn]);
84
+
85
+ // 显示值:有粘贴值时显示粘贴值(预览),否则显示原始 value
86
+ var _useState5 = useState(''),
87
+ _useState6 = _slicedToArray(_useState5, 2),
88
+ displayValue = _useState6[0],
89
+ setDisplayValue = _useState6[1];
90
+
91
+ // 同步更新显示值
92
+ useEffect(function () {
93
+ var displayDate = pastedValue || value;
94
+ var startDate = displayDate === null || displayDate === void 0 ? void 0 : displayDate[0];
95
+ var endDate = displayDate === null || displayDate === void 0 ? void 0 : displayDate[1];
96
+ var startValue = formatDateValue(startDate, baseFormat, isMoment, isCn);
97
+ var endValue = formatDateValue(endDate, format, isMoment, isCn);
98
+ if (!startValue && !endValue) {
99
+ setDisplayValue('');
100
+ } else {
101
+ setDisplayValue("".concat(startValue).concat(rangeSeparator).concat(endValue));
102
+ }
103
+ }, [pastedValue, value, baseFormat, format, rangeSeparator, isMoment, isCn]);
104
+
105
+ // 当 value 更新为 pastedValue 时,清除 pastedValue(说明确定按钮已生效)
106
+ useEffect(function () {
107
+ if (pastedValue && value) {
108
+ var _pastedValue$, _value$, _pastedValue$2, _value$2;
109
+ var isSameAsPasted = ((_pastedValue$ = pastedValue[0]) === null || _pastedValue$ === void 0 ? void 0 : _pastedValue$.valueOf()) === ((_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.valueOf()) && ((_pastedValue$2 = pastedValue[1]) === null || _pastedValue$2 === void 0 ? void 0 : _pastedValue$2.valueOf()) === ((_value$2 = value[1]) === null || _value$2 === void 0 ? void 0 : _value$2.valueOf());
110
+ if (isSameAsPasted) {
111
+ setPastedValue(null);
112
+ setIsEditing(false);
113
+ }
114
+ }
115
+ }, [value, pastedValue]);
116
+
117
+ // 确认粘贴:触发 onChange,清除粘贴状态
118
+ var confirmPastedValue = useCallback(function () {
119
+ if (pastedValue) {
120
+ onChange === null || onChange === void 0 || onChange(pastedValue);
121
+ setPastedValue(null);
122
+ setIsEditing(false);
123
+ }
124
+ }, [pastedValue, onChange]);
125
+
126
+ // 取消粘贴:清除粘贴值,回到初始值
127
+ var cancelPastedValue = useCallback(function () {
128
+ var _inputRef$current;
129
+ setPastedValue(null);
130
+ setIsEditing(false);
131
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || (_inputRef$current = _inputRef$current.input) === null || _inputRef$current === void 0 || _inputRef$current.blur();
132
+ }, []);
133
+
134
+ // 单击获取焦点
135
+ var handleClick = useCallback(function (e) {
136
+ e.stopPropagation();
137
+ setIsEditing(true);
138
+ // 让 input 获得焦点
139
+ setTimeout(function () {
140
+ var _inputRef$current2;
141
+ (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || (_inputRef$current2 = _inputRef$current2.input) === null || _inputRef$current2 === void 0 || _inputRef$current2.focus();
142
+ }, 0);
143
+ onClick === null || onClick === void 0 || onClick();
144
+ }, [onClick]);
145
+
146
+ // 双击获取焦点并全选
147
+ var handleDoubleClick = useCallback(function (e) {
148
+ var _inputRef$current3;
149
+ e.stopPropagation();
150
+ setIsEditing(true);
151
+ (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || (_inputRef$current3 = _inputRef$current3.input) === null || _inputRef$current3 === void 0 || _inputRef$current3.select();
152
+ }, []);
153
+
154
+ // 面板打开时,让 input 获得焦点
155
+ useEffect(function () {
156
+ if (open) {
157
+ // 延迟获取焦点,确保面板已渲染
158
+ var timer = setTimeout(function () {
159
+ var _inputRef$current4;
160
+ (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 || (_inputRef$current4 = _inputRef$current4.input) === null || _inputRef$current4 === void 0 || _inputRef$current4.focus();
161
+ }, 100);
162
+ return function () {
163
+ return clearTimeout(timer);
164
+ };
165
+ }
166
+ }, [open]);
167
+
168
+ // 检查焦点是否在面板内(参考 ant-design 的实现)
169
+ var isFocusInPanel = useCallback(function (relatedTarget) {
170
+ if (!relatedTarget) return false;
171
+ var panelElement = document.querySelector('.ant-picker-dropdown, .ant-dropdown, [class*="ranger-picker-panel"]');
172
+ return panelElement ? panelElement.contains(relatedTarget) : false;
173
+ }, []);
174
+
175
+ // 失去焦点处理(如果焦点在面板内,直接返回,不处理)
176
+ var handleBlur = useCallback(function (e) {
177
+ var relatedTarget = e.relatedTarget;
178
+
179
+ // 不强制重新获取焦点,允许用户在面板中的 input 正常编辑
180
+ if (isFocusInPanel(relatedTarget)) {
181
+ return;
182
+ }
183
+
184
+ // 焦点不在面板内,清除粘贴值
185
+ // 但是,如果 value 已经更新为 pastedValue,说明确定按钮已经生效,不应该清除
186
+ if (pastedValue) {
187
+ var _pastedValue$3, _value$3, _pastedValue$4, _value$4;
188
+ // 检查 value 是否已经更新为 pastedValue
189
+ var isValueUpdated = value && ((_pastedValue$3 = pastedValue[0]) === null || _pastedValue$3 === void 0 ? void 0 : _pastedValue$3.valueOf()) === ((_value$3 = value[0]) === null || _value$3 === void 0 ? void 0 : _value$3.valueOf()) && ((_pastedValue$4 = pastedValue[1]) === null || _pastedValue$4 === void 0 ? void 0 : _pastedValue$4.valueOf()) === ((_value$4 = value[1]) === null || _value$4 === void 0 ? void 0 : _value$4.valueOf());
190
+
191
+ // 只有当 value 还没有更新为 pastedValue 时,才清除 pastedValue
192
+ // 这样可以避免在确定按钮点击后,失去焦点时清除已确认的值
193
+ if (!isValueUpdated) {
194
+ setPastedValue(null);
195
+ setIsEditing(false);
196
+ }
197
+ }
198
+ }, [isFocusInPanel, pastedValue, value]);
199
+
200
+ // 解析粘贴文本并设置预览值
201
+ var processPaste = useCallback( /*#__PURE__*/function () {
202
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(pastedText) {
203
+ var _parsePastedText, _parsePastedText2, startStr, endStr, formatWithoutTimezone, parsedStart, parsedEnd;
204
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
205
+ while (1) switch (_context.prev = _context.next) {
206
+ case 0:
207
+ if (pastedText.trim()) {
208
+ _context.next = 2;
209
+ break;
210
+ }
211
+ return _context.abrupt("return");
212
+ case 2:
213
+ _parsePastedText = parsePastedText(pastedText.trim()), _parsePastedText2 = _slicedToArray(_parsePastedText, 2), startStr = _parsePastedText2[0], endStr = _parsePastedText2[1];
214
+ formatWithoutTimezone = format.replace(TIMEZONE_PATTERN, '');
215
+ parsedStart = parseDateString(startStr, baseFormat, isMoment);
216
+ parsedEnd = parseDateString(endStr, formatWithoutTimezone, isMoment);
217
+ if (parsedStart.isValid() && parsedEnd.isValid()) {
218
+ setPastedValue([parsedStart, parsedEnd]);
219
+ setIsEditing(true);
220
+ }
221
+ case 7:
222
+ case "end":
223
+ return _context.stop();
224
+ }
225
+ }, _callee);
226
+ }));
227
+ return function (_x) {
228
+ return _ref.apply(this, arguments);
229
+ };
230
+ }(), [isMoment, format, baseFormat]);
231
+
232
+ // 键盘事件:Ctrl+V 粘贴,Enter 确认,Escape 取消
233
+ var handleKeyDown = useCallback( /*#__PURE__*/function () {
234
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
235
+ var text;
236
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
237
+ while (1) switch (_context2.prev = _context2.next) {
238
+ case 0:
239
+ if (!((e.ctrlKey || e.metaKey) && e.key === 'v')) {
240
+ _context2.next = 14;
241
+ break;
242
+ }
243
+ e.preventDefault();
244
+ _context2.prev = 2;
245
+ _context2.next = 5;
246
+ return navigator.clipboard.readText();
247
+ case 5:
248
+ text = _context2.sent;
249
+ _context2.next = 8;
250
+ return processPaste(text);
251
+ case 8:
252
+ _context2.next = 13;
253
+ break;
254
+ case 10:
255
+ _context2.prev = 10;
256
+ _context2.t0 = _context2["catch"](2);
257
+ console.warn('Failed to read clipboard:', _context2.t0);
258
+ case 13:
259
+ return _context2.abrupt("return");
260
+ case 14:
261
+ if (pastedValue) {
262
+ _context2.next = 16;
263
+ break;
264
+ }
265
+ return _context2.abrupt("return");
266
+ case 16:
267
+ // Enter 确认粘贴
268
+ if (e.key === 'Enter') {
269
+ e.preventDefault();
270
+ confirmPastedValue();
271
+ }
272
+ // Escape 取消粘贴
273
+ else if (e.key === 'Escape') {
274
+ e.preventDefault();
275
+ cancelPastedValue();
276
+ }
277
+ case 17:
278
+ case "end":
279
+ return _context2.stop();
280
+ }
281
+ }, _callee2, null, [[2, 10]]);
282
+ }));
283
+ return function (_x2) {
284
+ return _ref2.apply(this, arguments);
285
+ };
286
+ }(), [pastedValue, confirmPastedValue, cancelPastedValue, processPaste]);
287
+ // 获取粘贴值
288
+ var getPastedValue = useCallback(function () {
289
+ return pastedValue;
290
+ }, [pastedValue]);
291
+ return {
292
+ inputRef: inputRef,
293
+ isEditing: isEditing,
294
+ displayValue: displayValue,
295
+ handleClick: handleClick,
296
+ handleDoubleClick: handleDoubleClick,
297
+ handleBlur: handleBlur,
298
+ handleKeyDown: handleKeyDown,
299
+ confirmPastedValue: confirmPastedValue,
300
+ hasPastedValue: !!pastedValue,
301
+ getPastedValue: getPastedValue
302
+ };
303
+ };
304
+ export default useSegmentedInput;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { LAST_1_DAY, LAST_3_DAYS, LAST_7_DAYS, LAST_30_DAYS, LAST_MONTH, LAST_WEEK, LAST_YEAR, NEAR_10_MINUTES, NEAR_12_HOURS, NEAR_1_HOURS, NEAR_1_MINUTES, NEAR_20_MINUTES, NEAR_2_HOURS, NEAR_30_MINUTES, NEAR_3_HOURS, NEAR_5_MINUTES, NEAR_6_HOURS, NEXT_YEAR, THIS_MONTH, THIS_WEEK, THIS_YEAR, TODAY, YESTERDAY } from "./constant";
2
3
  import InternalDateRanger from "./Ranger";
3
4
  export * from "./Ranger";
@@ -52,5 +52,7 @@ declare const _default: {
52
52
  current: string;
53
53
  jumpBack: string;
54
54
  jumpForward: string;
55
+ syncToCurrent: string;
56
+ zoomOutRange: string;
55
57
  };
56
58
  export default _default;
@@ -16,5 +16,7 @@ export default _objectSpread({
16
16
  confirm: 'Confirm',
17
17
  current: 'Current',
18
18
  jumpBack: 'Previous Interval',
19
- jumpForward: 'Next Interval'
19
+ jumpForward: 'Next Interval',
20
+ syncToCurrent: 'Sync to current time',
21
+ zoomOutRange: 'Expand time range'
20
22
  }, en_US);
@@ -52,5 +52,7 @@ declare const _default: {
52
52
  current: string;
53
53
  jumpBack: string;
54
54
  jumpForward: string;
55
+ syncToCurrent: string;
56
+ zoomOutRange: string;
55
57
  };
56
58
  export default _default;
@@ -16,5 +16,7 @@ export default _objectSpread({
16
16
  confirm: 'OK',
17
17
  current: '現在',
18
18
  jumpBack: '前の期間へ',
19
- jumpForward: '次の期間へ'
19
+ jumpForward: '次の期間へ',
20
+ syncToCurrent: '現在時刻に同期',
21
+ zoomOutRange: '時間範囲を拡大'
20
22
  }, ja_JP);
@@ -52,5 +52,7 @@ declare const _default: {
52
52
  current: string;
53
53
  jumpBack: string;
54
54
  jumpForward: string;
55
+ syncToCurrent: string;
56
+ zoomOutRange: string;
55
57
  };
56
58
  export default _default;
@@ -16,5 +16,7 @@ export default _objectSpread({
16
16
  confirm: '确定',
17
17
  current: '当前',
18
18
  jumpBack: '向前跳转一个时间区间',
19
- jumpForward: '向后跳转一个时间区间'
19
+ jumpForward: '向后跳转一个时间区间',
20
+ syncToCurrent: '同步到当前时间',
21
+ zoomOutRange: '放大时间范围'
20
22
  }, zh_CN);
@@ -52,5 +52,7 @@ declare const _default: {
52
52
  current: string;
53
53
  jumpBack: string;
54
54
  jumpForward: string;
55
+ syncToCurrent: string;
56
+ zoomOutRange: string;
55
57
  };
56
58
  export default _default;
@@ -16,5 +16,7 @@ export default _objectSpread({
16
16
  confirm: '確定',
17
17
  current: '當前',
18
18
  jumpBack: '向前跳轉一個時間區間',
19
- jumpForward: '向後跳轉一個時間區間'
19
+ jumpForward: '向後跳轉一個時間區間',
20
+ syncToCurrent: '同步到當前時間',
21
+ zoomOutRange: '放大時間範圍'
20
22
  }, zh_TW);
@@ -4,16 +4,16 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
4
4
  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); }
5
5
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
6
  export var genDateRangerStyle = function genDateRangerStyle(token) {
7
+ var _ref;
7
8
  var componentCls = token.componentCls,
8
9
  antCls = token.antCls,
9
10
  colorBgContainer = token.colorBgContainer,
10
11
  colorBorder = token.colorBorder,
11
12
  borderRadius = token.borderRadius,
12
- colorPrimaryBorderHover = token.colorPrimaryBorderHover,
13
13
  colorTextSecondary = token.colorTextSecondary,
14
14
  colorFillSecondary = token.colorFillSecondary,
15
15
  colorFill = token.colorFill;
16
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
16
+ return _ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
17
17
  cursor: 'pointer'
18
18
  }, "".concat(componentCls, "-wrapper"), _defineProperty(_defineProperty({
19
19
  backgroundColor: colorBgContainer,
@@ -37,12 +37,12 @@ export var genDateRangerStyle = function genDateRangerStyle(token) {
37
37
  }), "".concat(antCls, "-picker-input > input"), {
38
38
  cursor: 'pointer'
39
39
  })), '&:hover', {
40
- borderColor: colorPrimaryBorderHover
40
+ borderColor: token.gray7
41
41
  })), "".concat(componentCls, "-wrapper-has-jumper"), {
42
42
  borderTopRightRadius: 0,
43
43
  borderBottomRightRadius: 0
44
44
  }), "".concat(componentCls, "-play"), {
45
- padding: '4px 11px 4px'
45
+ padding: '3px 11px 3px'
46
46
  }), "".concat(componentCls, "-picker-input"), {
47
47
  maxWidth: 125
48
48
  }), "".concat(componentCls, "-date-picker"), _defineProperty(_defineProperty({}, "".concat(antCls, "-select-selector"), {
@@ -59,7 +59,7 @@ export var genDateRangerStyle = function genDateRangerStyle(token) {
59
59
  gap: 4,
60
60
  backgroundColor: colorBgContainer,
61
61
  backgroundClip: 'padding-box',
62
- borderRadius: 8,
62
+ borderRadius: token.borderRadiusMD,
63
63
  outline: 'none',
64
64
  boxShadow: '0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05)'
65
65
  }, "".concat(antCls, "-dropdown-menu"), {
@@ -85,24 +85,32 @@ export var genDateRangerStyle = function genDateRangerStyle(token) {
85
85
  color: colorTextSecondary,
86
86
  transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
87
87
  '&:hover': {
88
- borderColor: colorPrimaryBorderHover,
88
+ borderColor: token.gray7,
89
+ zIndex: 1,
89
90
  '&::before': {
90
- backgroundColor: colorPrimaryBorderHover
91
+ backgroundColor: token.gray7
91
92
  }
92
93
  }
93
94
  }))), "".concat(componentCls, "-label"), {
95
+ fontSize: token.fontSizeSM,
96
+ lineHeight: token.lineHeightSM,
94
97
  backgroundColor: colorFillSecondary,
95
98
  color: colorTextSecondary,
96
99
  display: 'inline-block',
97
- width: 60,
98
- padding: '4px 0',
99
- borderRadius: 4,
100
- lineHeight: 1,
100
+ width: 52,
101
+ borderRadius: token.borderRadiusSM,
101
102
  textAlign: 'center'
102
- }), "".concat(componentCls, "-back-radio-focused"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-wrapper"), {
103
- borderRightColor: colorPrimaryBorderHover
103
+ }), "".concat(componentCls, "-dashed"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-wrapper"), {
104
+ borderStyle: 'dashed'
105
+ }), "".concat(componentCls, "-playback-control"), _defineProperty({}, "".concat(antCls, "-radio-button-wrapper"), {
106
+ borderStyle: 'dashed',
107
+ '&::before': {
108
+ borderStyle: 'dashed'
109
+ }
110
+ }))), "".concat(componentCls, "-back-radio-focused"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-wrapper"), {
111
+ borderRightColor: token.gray7
104
112
  }), "".concat(componentCls, "-playback-control"), _defineProperty({}, "".concat(antCls, "-radio-button-wrapper:first-child"), _defineProperty({}, "+ ".concat(antCls, "-radio-button-wrapper::before"), {
105
- backgroundColor: colorPrimaryBorderHover
113
+ backgroundColor: token.gray7
106
114
  })))), "".concat(componentCls, "-history-menu-item"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-menu-text-btn-wrapper"), {
107
115
  justifyContent: 'space-between',
108
116
  height: 0,
@@ -116,6 +124,36 @@ export var genDateRangerStyle = function genDateRangerStyle(token) {
116
124
  '&:hover': {
117
125
  backgroundColor: "".concat(colorFill, " !important")
118
126
  }
127
+ }), "".concat(componentCls, "-editable-wrapper"), {
128
+ display: 'inline-flex',
129
+ alignItems: 'center'
130
+ }), "".concat(componentCls, "-range-editable"), {
131
+ position: 'relative',
132
+ display: 'inline-flex',
133
+ alignItems: 'center',
134
+ cursor: 'text',
135
+ '&-disabled': {
136
+ cursor: 'not-allowed',
137
+ opacity: 0.6
138
+ }
139
+ }), _defineProperty(_defineProperty(_ref, "".concat(componentCls, "-range-editable-sizer"), {
140
+ position: 'absolute',
141
+ top: 0,
142
+ left: 0,
143
+ height: 0,
144
+ overflow: 'hidden',
145
+ whiteSpace: 'pre',
146
+ visibility: 'hidden',
147
+ pointerEvents: 'none'
148
+ }), "".concat(componentCls, "-range-editable-input"), {
149
+ minWidth: 80,
150
+ maxWidth: '100%',
151
+ cursor: 'text',
152
+ caretColor: 'transparent',
153
+ fontVariantNumeric: 'tabular-nums',
154
+ '&:focus, &:focus-within': _defineProperty({}, "".concat(antCls, "-input"), {
155
+ caretColor: token.colorPrimary
156
+ })
119
157
  });
120
158
  };
121
159
  export default (function (prefixCls) {
@@ -1,3 +1,4 @@
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
  var _excluded = ["children", "style", "dock", "prefixCls", "onStart", "onMove", "onEnd"];
3
4
  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; }
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
@@ -3,6 +3,11 @@ import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
3
  export interface DialogLocale {
4
4
  helpDocument: string;
5
5
  openHelpCenter: string;
6
+ closeDialog: string;
7
+ minimize: string;
8
+ restoreWindow: string;
9
+ maximize: string;
10
+ exitFullscreen: string;
6
11
  }
7
12
  export interface DialogExtLink {
8
13
  text?: string;