@oceanbase/ui 1.0.0-alpha.1 → 1.0.0-alpha.11

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 (495) 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.js +122 -15
  7. package/es/Action/Item.d.ts +6 -15
  8. package/es/Action/Item.js +86 -128
  9. package/es/Action/index.d.ts +6 -3
  10. package/es/Action/index.js +1 -0
  11. package/es/Action/style/index.d.ts +2 -2
  12. package/es/Action/style/index.js +8 -4
  13. package/es/BackgroundTaskManager/RefreshMan.js +1 -0
  14. package/es/BackgroundTaskManager/index.js +1 -0
  15. package/es/BasicLayout/Header.js +1 -0
  16. package/es/BasicLayout/index.js +1 -0
  17. package/es/BasicLayout/locale/ja-JP.d.ts +13 -0
  18. package/es/BasicLayout/locale/ja-JP.js +12 -0
  19. package/es/BasicLayout/style/index.js +35 -23
  20. package/es/BatchOperationBar/index.d.ts +0 -1
  21. package/es/BatchOperationBar/index.js +18 -13
  22. package/es/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  23. package/es/BatchOperationBar/locale/ja-JP.js +6 -0
  24. package/es/BatchOperationBar/style/index.d.ts +10 -0
  25. package/es/BatchOperationBar/style/index.js +51 -0
  26. package/es/Boundary/Components/Code.js +12 -5
  27. package/es/Boundary/Components/Exception.js +86 -74
  28. package/es/Boundary/Components/Function.js +12 -5
  29. package/es/Boundary/index.d.ts +0 -1
  30. package/es/Boundary/index.js +1 -1
  31. package/es/Boundary/locale/en-US.js +1 -1
  32. package/es/Boundary/locale/ja-JP.d.ts +11 -0
  33. package/es/Boundary/locale/ja-JP.js +10 -0
  34. package/es/Boundary/locale/zh-CN.js +1 -1
  35. package/es/Boundary/locale/zh-TW.js +1 -1
  36. package/es/Boundary/style/index.d.ts +10 -0
  37. package/es/Boundary/style/index.js +46 -0
  38. package/es/ContentWithIcon/index.d.ts +0 -1
  39. package/es/ContentWithIcon/index.js +30 -29
  40. package/es/ContentWithIcon/style/index.d.ts +10 -0
  41. package/es/ContentWithIcon/style/index.js +26 -0
  42. package/es/ContentWithQuestion/index.js +1 -0
  43. package/es/DateRanger/PickerPanel.js +6 -4
  44. package/es/DateRanger/Ranger.d.ts +4 -1
  45. package/es/DateRanger/Ranger.js +169 -19
  46. package/es/DateRanger/constant/index.js +1 -1
  47. package/es/DateRanger/index.js +1 -0
  48. package/es/DateRanger/locale/ja-JP.d.ts +56 -0
  49. package/es/DateRanger/locale/ja-JP.js +20 -0
  50. package/es/DateRanger/style/index.d.ts +10 -0
  51. package/es/DateRanger/style/index.js +126 -0
  52. package/es/Dialog/Anchor.d.ts +2 -10
  53. package/es/Dialog/Anchor.js +68 -96
  54. package/es/Dialog/EventProxy.js +1 -0
  55. package/es/Dialog/index.d.ts +0 -1
  56. package/es/Dialog/index.js +538 -578
  57. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  58. package/es/Dialog/locale/ja-JP.js +4 -0
  59. package/es/Dialog/locale/zh-CN.js +1 -1
  60. package/es/Dialog/locale/zh-TW.js +1 -1
  61. package/es/Dialog/style/index.d.ts +10 -0
  62. package/es/Dialog/style/index.js +97 -0
  63. package/es/DocDialog/index.js +1 -0
  64. package/es/DocDialog/locale/ja-JP.d.ts +2 -0
  65. package/es/DocDialog/locale/ja-JP.js +1 -0
  66. package/es/FooterToolbar/index.js +1 -0
  67. package/es/FooterToolbar/style/index.d.ts +0 -2
  68. package/es/FooterToolbar/style/index.js +7 -13
  69. package/es/FullscreenBox/index.d.ts +0 -1
  70. package/es/FullscreenBox/index.js +47 -37
  71. package/es/FullscreenBox/locale/ja-JP.d.ts +2 -0
  72. package/es/FullscreenBox/locale/ja-JP.js +1 -0
  73. package/es/FullscreenBox/style/index.d.ts +10 -0
  74. package/es/FullscreenBox/style/index.js +53 -0
  75. package/es/Highlight/DiffView/DiffCells.js +1 -0
  76. package/es/Highlight/DiffView/index.d.ts +0 -1
  77. package/es/Highlight/DiffView/index.js +6 -5
  78. package/es/Highlight/HighlightCell.js +1 -0
  79. package/es/Highlight/JsonView.d.ts +0 -1
  80. package/es/Highlight/JsonView.js +6 -5
  81. package/es/Highlight/index.d.ts +0 -1
  82. package/es/Highlight/index.js +24 -23
  83. package/es/Highlight/locale/ja-JP.d.ts +4 -0
  84. package/es/Highlight/locale/ja-JP.js +3 -0
  85. package/es/Highlight/style/index.d.ts +10 -0
  86. package/es/Highlight/style/index.js +213 -0
  87. package/es/Highlight/useKeyDownCopyEvent.js +1 -0
  88. package/es/IconFont/index.js +1 -0
  89. package/es/LightFilter/index.js +1 -0
  90. package/es/LocaleDropdown/index.js +5 -2
  91. package/es/Login/ActivateForm.d.ts +0 -1
  92. package/es/Login/ActivateForm.js +13 -9
  93. package/es/Login/LoginForm.d.ts +0 -1
  94. package/es/Login/LoginForm.js +21 -15
  95. package/es/Login/RegisterForm.d.ts +0 -1
  96. package/es/Login/RegisterForm.js +15 -11
  97. package/es/Login/index.d.ts +0 -1
  98. package/es/Login/index.js +25 -22
  99. package/es/Login/locale/ja-JP.d.ts +28 -0
  100. package/es/Login/locale/ja-JP.js +27 -0
  101. package/es/Login/locale/zh-CN.js +2 -2
  102. package/es/Login/style/index.d.ts +10 -0
  103. package/es/Login/style/index.js +182 -0
  104. package/es/Lottie/index.js +1 -0
  105. package/es/NavMenu/index.d.ts +1 -2
  106. package/es/NavMenu/index.js +12 -8
  107. package/es/NavMenu/style/index.d.ts +10 -0
  108. package/es/NavMenu/style/index.js +47 -0
  109. package/es/PageContainer/ItemRender.js +1 -0
  110. package/es/PageContainer/index.d.ts +2 -0
  111. package/es/PageContainer/index.js +103 -25
  112. package/es/PageContainer/locale/en-US.d.ts +1 -0
  113. package/es/PageContainer/locale/en-US.js +2 -1
  114. package/es/PageContainer/locale/ja-JP.d.ts +5 -0
  115. package/es/PageContainer/locale/ja-JP.js +4 -0
  116. package/es/PageContainer/locale/zh-CN.d.ts +1 -0
  117. package/es/PageContainer/locale/zh-CN.js +2 -1
  118. package/es/PageContainer/locale/zh-TW.d.ts +1 -0
  119. package/es/PageContainer/locale/zh-TW.js +2 -1
  120. package/es/PageContainer/style/index.js +41 -16
  121. package/es/PageLoading/index.js +1 -0
  122. package/es/Password/Content.js +1 -0
  123. package/es/Password/index.js +2 -1
  124. package/es/Password/locale/ja-JP.d.ts +13 -0
  125. package/es/Password/locale/ja-JP.js +12 -0
  126. package/es/ProCard/index.js +12 -3
  127. package/es/ProCard/style/index.d.ts +2 -2
  128. package/es/ProCard/style/index.js +13 -5
  129. package/es/ProTable/index.d.ts +1 -1
  130. package/es/ProTable/index.js +21 -7
  131. package/es/ProTable/style/index.d.ts +2 -2
  132. package/es/ProTable/style/index.js +12 -5
  133. package/es/Ranger/QuickPicker.js +9 -4
  134. package/es/Ranger/Ranger.d.ts +0 -1
  135. package/es/Ranger/Ranger.js +13 -9
  136. package/es/Ranger/index.js +1 -0
  137. package/es/Ranger/locale/ja-JP.d.ts +28 -0
  138. package/es/Ranger/locale/ja-JP.js +29 -0
  139. package/es/Ranger/style/index.d.ts +10 -0
  140. package/es/Ranger/style/index.js +44 -0
  141. package/es/SideTip/Dragger.js +1 -0
  142. package/es/SideTip/IconLoading.js +1 -0
  143. package/es/SideTip/index.d.ts +0 -1
  144. package/es/SideTip/index.js +25 -22
  145. package/es/SideTip/locale/ja-JP.d.ts +2 -0
  146. package/es/SideTip/locale/ja-JP.js +1 -0
  147. package/es/SideTip/style/index.d.ts +10 -0
  148. package/es/SideTip/style/index.js +162 -0
  149. package/es/TagSelect/Group.d.ts +6 -6
  150. package/es/TagSelect/Group.js +6 -3
  151. package/es/TagSelect/Item.js +6 -3
  152. package/es/TagSelect/index.js +1 -0
  153. package/es/TreeSearch/index.js +1 -0
  154. package/es/Welcome/index.d.ts +0 -1
  155. package/es/Welcome/index.js +31 -26
  156. package/es/Welcome/locale/ja-JP.d.ts +5 -0
  157. package/es/Welcome/locale/ja-JP.js +4 -0
  158. package/es/Welcome/step/style/index.d.ts +10 -0
  159. package/es/Welcome/step/style/index.js +44 -0
  160. package/es/Welcome/step.d.ts +0 -1
  161. package/es/Welcome/step.js +18 -14
  162. package/es/Welcome/style/index.d.ts +10 -0
  163. package/es/Welcome/style/index.js +141 -0
  164. package/es/_util/genComponentStyleHook.d.ts +4 -3
  165. package/es/_util/genComponentStyleHook.js +1 -1
  166. package/es/_util/index.js +1 -0
  167. package/es/constant/index.js +1 -0
  168. package/es/index.d.ts +0 -5
  169. package/es/index.js +1 -3
  170. package/es/locale/LocaleWrapper.js +1 -0
  171. package/es/locale/en-US.js +0 -4
  172. package/es/locale/index.js +1 -0
  173. package/es/locale/ja-JP.d.ts +3 -0
  174. package/es/locale/ja-JP.js +38 -0
  175. package/es/locale/zh-CN.js +0 -4
  176. package/es/locale/zh-TW.js +0 -4
  177. package/lib/Action/Group.js +211 -108
  178. package/lib/Action/Item.d.ts +6 -15
  179. package/lib/Action/Item.js +81 -109
  180. package/lib/Action/index.d.ts +6 -3
  181. package/lib/Action/index.js +13 -35
  182. package/lib/Action/style/index.d.ts +2 -2
  183. package/lib/Action/style/index.js +38 -41
  184. package/lib/BackgroundTaskManager/RefreshMan.js +34 -59
  185. package/lib/BackgroundTaskManager/constants.js +10 -32
  186. package/lib/BackgroundTaskManager/index.js +118 -135
  187. package/lib/BasicLayout/Header.js +238 -138
  188. package/lib/BasicLayout/index.js +264 -283
  189. package/lib/BasicLayout/locale/en-US.js +16 -34
  190. package/lib/BasicLayout/locale/ja-JP.d.ts +13 -0
  191. package/lib/BasicLayout/locale/ja-JP.js +18 -0
  192. package/lib/BasicLayout/locale/zh-CN.js +16 -34
  193. package/lib/BasicLayout/locale/zh-TW.js +16 -34
  194. package/lib/BasicLayout/style/Header.js +41 -60
  195. package/lib/BasicLayout/style/index.js +192 -204
  196. package/lib/BatchOperationBar/index.d.ts +0 -1
  197. package/lib/BatchOperationBar/index.js +108 -131
  198. package/lib/BatchOperationBar/locale/en-US.js +10 -28
  199. package/lib/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  200. package/lib/BatchOperationBar/locale/ja-JP.js +12 -0
  201. package/lib/BatchOperationBar/locale/zh-CN.js +10 -28
  202. package/lib/BatchOperationBar/locale/zh-TW.js +10 -28
  203. package/lib/BatchOperationBar/style/index.d.ts +10 -0
  204. package/lib/BatchOperationBar/style/index.js +66 -0
  205. package/lib/Boundary/Components/Code.js +57 -63
  206. package/lib/Boundary/Components/Exception.js +117 -116
  207. package/lib/Boundary/Components/Function.js +47 -50
  208. package/lib/Boundary/Components/index.js +36 -25
  209. package/lib/Boundary/IBoundary.js +4 -16
  210. package/lib/Boundary/constant.js +16 -38
  211. package/lib/Boundary/index.d.ts +0 -1
  212. package/lib/Boundary/index.js +11 -25
  213. package/lib/Boundary/locale/en-US.js +14 -32
  214. package/lib/Boundary/locale/ja-JP.d.ts +11 -0
  215. package/lib/Boundary/locale/ja-JP.js +16 -0
  216. package/lib/Boundary/locale/zh-CN.js +14 -32
  217. package/lib/Boundary/locale/zh-TW.js +14 -32
  218. package/lib/Boundary/style/index.d.ts +10 -0
  219. package/lib/Boundary/style/index.js +55 -0
  220. package/lib/Boundary/utils.js +9 -31
  221. package/lib/ContentWithIcon/index.d.ts +0 -1
  222. package/lib/ContentWithIcon/index.js +99 -101
  223. package/lib/ContentWithIcon/style/index.d.ts +10 -0
  224. package/lib/ContentWithIcon/style/index.js +38 -0
  225. package/lib/ContentWithQuestion/index.js +40 -47
  226. package/lib/ContentWithQuestion/style/index.js +16 -35
  227. package/lib/DateRanger/PickerPanel.js +322 -286
  228. package/lib/DateRanger/Ranger.d.ts +4 -1
  229. package/lib/DateRanger/Ranger.js +381 -292
  230. package/lib/DateRanger/constant/index.js +188 -376
  231. package/lib/DateRanger/index.js +45 -64
  232. package/lib/DateRanger/locale/en-US.js +20 -47
  233. package/lib/DateRanger/locale/ja-JP.d.ts +56 -0
  234. package/lib/DateRanger/locale/ja-JP.js +22 -0
  235. package/lib/DateRanger/locale/zh-CN.js +20 -47
  236. package/lib/DateRanger/locale/zh-TW.js +20 -47
  237. package/lib/DateRanger/style/index.d.ts +10 -0
  238. package/lib/DateRanger/style/index.js +174 -0
  239. package/lib/DateRanger/typing.js +4 -16
  240. package/lib/Dialog/Anchor.d.ts +2 -10
  241. package/lib/Dialog/Anchor.js +80 -104
  242. package/lib/Dialog/Dock.js +14 -36
  243. package/lib/Dialog/EventProxy.js +21 -48
  244. package/lib/Dialog/index.d.ts +0 -1
  245. package/lib/Dialog/index.js +526 -521
  246. package/lib/Dialog/locale/en-US.js +8 -26
  247. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  248. package/lib/Dialog/locale/ja-JP.js +10 -0
  249. package/lib/Dialog/locale/zh-CN.js +8 -26
  250. package/lib/Dialog/locale/zh-TW.js +8 -26
  251. package/lib/Dialog/style/index.d.ts +10 -0
  252. package/lib/Dialog/style/index.js +117 -0
  253. package/lib/DocDialog/index.js +51 -76
  254. package/lib/DocDialog/locale/en-US.js +5 -23
  255. package/lib/DocDialog/locale/ja-JP.d.ts +2 -0
  256. package/lib/DocDialog/locale/ja-JP.js +7 -0
  257. package/lib/DocDialog/locale/zh-CN.js +5 -23
  258. package/lib/DocDialog/locale/zh-TW.js +5 -23
  259. package/lib/FooterToolbar/index.js +27 -44
  260. package/lib/FooterToolbar/style/index.d.ts +0 -2
  261. package/lib/FooterToolbar/style/index.js +26 -52
  262. package/lib/FullscreenBox/index.d.ts +0 -1
  263. package/lib/FullscreenBox/index.js +151 -120
  264. package/lib/FullscreenBox/locale/en-US.js +5 -23
  265. package/lib/FullscreenBox/locale/ja-JP.d.ts +2 -0
  266. package/lib/FullscreenBox/locale/ja-JP.js +7 -0
  267. package/lib/FullscreenBox/locale/zh-CN.js +5 -23
  268. package/lib/FullscreenBox/locale/zh-TW.js +5 -23
  269. package/lib/FullscreenBox/style/index.d.ts +10 -0
  270. package/lib/FullscreenBox/style/index.js +68 -0
  271. package/lib/Highlight/DiffView/DiffCells.js +35 -48
  272. package/lib/Highlight/DiffView/index.d.ts +0 -1
  273. package/lib/Highlight/DiffView/index.js +154 -148
  274. package/lib/Highlight/HighlightCell.js +29 -45
  275. package/lib/Highlight/JsonView.d.ts +0 -1
  276. package/lib/Highlight/JsonView.js +45 -73
  277. package/lib/Highlight/index.d.ts +0 -1
  278. package/lib/Highlight/index.js +197 -203
  279. package/lib/Highlight/languages/bash.js +7 -34
  280. package/lib/Highlight/languages/cpp.js +7 -34
  281. package/lib/Highlight/languages/css.js +7 -34
  282. package/lib/Highlight/languages/dockerfile.js +7 -34
  283. package/lib/Highlight/languages/go.js +7 -34
  284. package/lib/Highlight/languages/groovy.js +7 -34
  285. package/lib/Highlight/languages/http.js +7 -34
  286. package/lib/Highlight/languages/java.js +7 -34
  287. package/lib/Highlight/languages/javascript.js +7 -34
  288. package/lib/Highlight/languages/json.js +7 -34
  289. package/lib/Highlight/languages/markdown.js +7 -34
  290. package/lib/Highlight/languages/nginx.js +7 -34
  291. package/lib/Highlight/languages/python.js +7 -34
  292. package/lib/Highlight/languages/ruby.js +7 -34
  293. package/lib/Highlight/languages/solidity.js +7 -34
  294. package/lib/Highlight/languages/sql.js +7 -34
  295. package/lib/Highlight/languages/typescript.js +7 -34
  296. package/lib/Highlight/languages/xml.js +7 -34
  297. package/lib/Highlight/languages/yaml.js +7 -34
  298. package/lib/Highlight/locale/en-US.js +7 -25
  299. package/lib/Highlight/locale/ja-JP.d.ts +4 -0
  300. package/lib/Highlight/locale/ja-JP.js +9 -0
  301. package/lib/Highlight/locale/zh-CN.js +7 -25
  302. package/lib/Highlight/locale/zh-TW.js +7 -25
  303. package/lib/Highlight/style/index.d.ts +10 -0
  304. package/lib/Highlight/style/index.js +277 -0
  305. package/lib/Highlight/useKeyDownCopyEvent.js +40 -64
  306. package/lib/IconFont/index.js +23 -38
  307. package/lib/LightFilter/index.js +29 -42
  308. package/lib/LightFilter/style/index.js +15 -33
  309. package/lib/LocaleDropdown/index.js +44 -60
  310. package/lib/Login/ActivateForm.d.ts +0 -1
  311. package/lib/Login/ActivateForm.js +93 -118
  312. package/lib/Login/LoginForm.d.ts +0 -1
  313. package/lib/Login/LoginForm.js +135 -149
  314. package/lib/Login/RegisterForm.d.ts +0 -1
  315. package/lib/Login/RegisterForm.js +122 -162
  316. package/lib/Login/index.d.ts +0 -1
  317. package/lib/Login/index.js +156 -132
  318. package/lib/Login/locale/en-US.js +31 -49
  319. package/lib/Login/locale/ja-JP.d.ts +28 -0
  320. package/lib/Login/locale/ja-JP.js +33 -0
  321. package/lib/Login/locale/zh-CN.js +31 -49
  322. package/lib/Login/locale/zh-TW.js +30 -48
  323. package/lib/Login/style/index.d.ts +10 -0
  324. package/lib/Login/style/index.js +246 -0
  325. package/lib/Lottie/index.js +7 -24
  326. package/lib/NavMenu/index.d.ts +1 -2
  327. package/lib/NavMenu/index.js +102 -101
  328. package/lib/NavMenu/style/index.d.ts +10 -0
  329. package/lib/NavMenu/style/index.js +60 -0
  330. package/lib/PageContainer/ItemRender.js +27 -45
  331. package/lib/PageContainer/index.d.ts +2 -0
  332. package/lib/PageContainer/index.js +154 -93
  333. package/lib/PageContainer/locale/en-US.d.ts +1 -0
  334. package/lib/PageContainer/locale/en-US.js +8 -25
  335. package/lib/PageContainer/locale/ja-JP.d.ts +5 -0
  336. package/lib/PageContainer/locale/ja-JP.js +10 -0
  337. package/lib/PageContainer/locale/zh-CN.d.ts +1 -0
  338. package/lib/PageContainer/locale/zh-CN.js +8 -25
  339. package/lib/PageContainer/locale/zh-TW.d.ts +1 -0
  340. package/lib/PageContainer/locale/zh-TW.js +8 -25
  341. package/lib/PageContainer/style/index.js +59 -49
  342. package/lib/PageLoading/index.js +32 -63
  343. package/lib/Password/Content.js +91 -83
  344. package/lib/Password/index.js +118 -138
  345. package/lib/Password/locale/en-US.js +14 -32
  346. package/lib/Password/locale/ja-JP.d.ts +13 -0
  347. package/lib/Password/locale/ja-JP.js +18 -0
  348. package/lib/Password/locale/zh-CN.js +15 -33
  349. package/lib/Password/locale/zh-TW.js +14 -32
  350. package/lib/ProCard/index.js +78 -96
  351. package/lib/ProCard/style/index.d.ts +2 -2
  352. package/lib/ProCard/style/index.js +35 -38
  353. package/lib/ProTable/index.d.ts +1 -1
  354. package/lib/ProTable/index.js +103 -112
  355. package/lib/ProTable/style/index.d.ts +2 -2
  356. package/lib/ProTable/style/index.js +36 -37
  357. package/lib/Ranger/QuickPicker.js +91 -82
  358. package/lib/Ranger/Ranger.d.ts +0 -1
  359. package/lib/Ranger/Ranger.js +98 -127
  360. package/lib/Ranger/constant/index.js +115 -266
  361. package/lib/Ranger/index.js +61 -69
  362. package/lib/Ranger/locale/en-US.js +31 -49
  363. package/lib/Ranger/locale/ja-JP.d.ts +28 -0
  364. package/lib/Ranger/locale/ja-JP.js +35 -0
  365. package/lib/Ranger/locale/zh-CN.js +7 -25
  366. package/lib/Ranger/locale/zh-TW.js +7 -25
  367. package/lib/Ranger/style/index.d.ts +10 -0
  368. package/lib/Ranger/style/index.js +64 -0
  369. package/lib/Ranger/typing.js +4 -16
  370. package/lib/SideTip/Dragger.js +259 -218
  371. package/lib/SideTip/IconLoading.js +43 -74
  372. package/lib/SideTip/index.d.ts +0 -1
  373. package/lib/SideTip/index.js +129 -114
  374. package/lib/SideTip/locale/en-US.js +5 -23
  375. package/lib/SideTip/locale/ja-JP.d.ts +2 -0
  376. package/lib/SideTip/locale/ja-JP.js +7 -0
  377. package/lib/SideTip/locale/zh-CN.js +5 -23
  378. package/lib/SideTip/locale/zh-TW.js +5 -23
  379. package/lib/SideTip/style/index.d.ts +10 -0
  380. package/lib/SideTip/style/index.js +195 -0
  381. package/lib/SideTip/utils.js +40 -61
  382. package/lib/TagSelect/Group.d.ts +6 -6
  383. package/lib/TagSelect/Group.js +64 -78
  384. package/lib/TagSelect/Item.js +67 -85
  385. package/lib/TagSelect/TagSelectContext.js +7 -25
  386. package/lib/TagSelect/index.js +12 -35
  387. package/lib/TagSelect/style/index.js +41 -64
  388. package/lib/TreeSearch/index.js +133 -132
  389. package/lib/TreeSearch/util.js +52 -70
  390. package/lib/Welcome/index.d.ts +0 -1
  391. package/lib/Welcome/index.js +140 -83
  392. package/lib/Welcome/locale/en-US.js +8 -26
  393. package/lib/Welcome/locale/ja-JP.d.ts +5 -0
  394. package/lib/Welcome/locale/ja-JP.js +10 -0
  395. package/lib/Welcome/locale/zh-CN.js +8 -26
  396. package/lib/Welcome/locale/zh-TW.js +8 -26
  397. package/lib/Welcome/step/style/index.d.ts +10 -0
  398. package/lib/Welcome/step/style/index.js +58 -0
  399. package/lib/Welcome/step.d.ts +0 -1
  400. package/lib/Welcome/step.js +63 -48
  401. package/lib/Welcome/style/index.d.ts +10 -0
  402. package/lib/Welcome/style/index.js +176 -0
  403. package/lib/_util/genComponentStyleHook.d.ts +4 -3
  404. package/lib/_util/genComponentStyleHook.js +15 -43
  405. package/lib/_util/index.js +38 -43
  406. package/lib/_util/useNavigate.js +11 -26
  407. package/lib/constant/index.js +23 -49
  408. package/lib/index.d.ts +0 -5
  409. package/lib/index.js +283 -136
  410. package/lib/interface.js +4 -16
  411. package/lib/locale/LocaleWrapper.js +52 -61
  412. package/lib/locale/en-US.js +37 -68
  413. package/lib/locale/index.js +5 -16
  414. package/lib/locale/ja-JP.d.ts +3 -0
  415. package/lib/locale/ja-JP.js +40 -0
  416. package/lib/locale/zh-CN.js +36 -67
  417. package/lib/locale/zh-TW.js +32 -63
  418. package/package.json +7 -10
  419. package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
  420. package/es/BatchOperationBar/index.less +0 -46
  421. package/es/BatchOperationBar/index.less.d.ts +0 -15
  422. package/es/Boundary/index.less +0 -36
  423. package/es/ContentWithIcon/index.less +0 -21
  424. package/es/DateRanger/index.less +0 -157
  425. package/es/Dialog/index.less +0 -116
  426. package/es/FullscreenBox/index.less +0 -49
  427. package/es/GraphToolbar/index.d.ts +0 -26
  428. package/es/GraphToolbar/index.js +0 -146
  429. package/es/GraphToolbar/index.less +0 -65
  430. package/es/GraphToolbar/locale/en-US.d.ts +0 -9
  431. package/es/GraphToolbar/locale/en-US.js +0 -8
  432. package/es/GraphToolbar/locale/zh-CN.d.ts +0 -9
  433. package/es/GraphToolbar/locale/zh-CN.js +0 -8
  434. package/es/GraphToolbar/locale/zh-TW.d.ts +0 -9
  435. package/es/GraphToolbar/locale/zh-TW.js +0 -8
  436. package/es/Highlight/index.less +0 -381
  437. package/es/Login/index.less +0 -268
  438. package/es/NavMenu/index.less +0 -50
  439. package/es/Ranger/index.less +0 -57
  440. package/es/SideTip/index.less +0 -180
  441. package/es/TaskGraph/Graph.d.ts +0 -24
  442. package/es/TaskGraph/Graph.js +0 -271
  443. package/es/TaskGraph/graph.less +0 -23
  444. package/es/TaskGraph/index.d.ts +0 -16
  445. package/es/TaskGraph/index.js +0 -178
  446. package/es/TaskGraph/index.less +0 -117
  447. package/es/TaskGraph/locale/en-US.d.ts +0 -13
  448. package/es/TaskGraph/locale/en-US.js +0 -12
  449. package/es/TaskGraph/locale/zh-CN.d.ts +0 -13
  450. package/es/TaskGraph/locale/zh-CN.js +0 -12
  451. package/es/TaskGraph/locale/zh-TW.d.ts +0 -13
  452. package/es/TaskGraph/locale/zh-TW.js +0 -12
  453. package/es/TaskGraph/register.d.ts +0 -7
  454. package/es/TaskGraph/register.js +0 -200
  455. package/es/Welcome/index.less +0 -185
  456. package/es/index.less +0 -1
  457. package/es/variable.less +0 -54
  458. package/lib/BatchOperationBar/index.less +0 -46
  459. package/lib/BatchOperationBar/index.less.d.ts +0 -15
  460. package/lib/Boundary/index.less +0 -36
  461. package/lib/ContentWithIcon/index.less +0 -21
  462. package/lib/DateRanger/index.less +0 -157
  463. package/lib/Dialog/index.less +0 -116
  464. package/lib/FullscreenBox/index.less +0 -49
  465. package/lib/GraphToolbar/index.d.ts +0 -26
  466. package/lib/GraphToolbar/index.js +0 -154
  467. package/lib/GraphToolbar/index.less +0 -65
  468. package/lib/GraphToolbar/locale/en-US.d.ts +0 -9
  469. package/lib/GraphToolbar/locale/en-US.js +0 -32
  470. package/lib/GraphToolbar/locale/zh-CN.d.ts +0 -9
  471. package/lib/GraphToolbar/locale/zh-CN.js +0 -32
  472. package/lib/GraphToolbar/locale/zh-TW.d.ts +0 -9
  473. package/lib/GraphToolbar/locale/zh-TW.js +0 -32
  474. package/lib/Highlight/index.less +0 -381
  475. package/lib/Login/index.less +0 -268
  476. package/lib/NavMenu/index.less +0 -50
  477. package/lib/Ranger/index.less +0 -57
  478. package/lib/SideTip/index.less +0 -180
  479. package/lib/TaskGraph/Graph.d.ts +0 -24
  480. package/lib/TaskGraph/Graph.js +0 -261
  481. package/lib/TaskGraph/graph.less +0 -23
  482. package/lib/TaskGraph/index.d.ts +0 -16
  483. package/lib/TaskGraph/index.js +0 -164
  484. package/lib/TaskGraph/index.less +0 -117
  485. package/lib/TaskGraph/locale/en-US.d.ts +0 -13
  486. package/lib/TaskGraph/locale/en-US.js +0 -36
  487. package/lib/TaskGraph/locale/zh-CN.d.ts +0 -13
  488. package/lib/TaskGraph/locale/zh-CN.js +0 -36
  489. package/lib/TaskGraph/locale/zh-TW.d.ts +0 -13
  490. package/lib/TaskGraph/locale/zh-TW.js +0 -36
  491. package/lib/TaskGraph/register.d.ts +0 -7
  492. package/lib/TaskGraph/register.js +0 -205
  493. package/lib/Welcome/index.less +0 -185
  494. package/lib/index.less +0 -1
  495. package/lib/variable.less +0 -54
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { GenerateStyle } from '@oceanbase/design/es/theme';
3
+ import type { OBToken } from '../../_util/genComponentStyleHook';
4
+ export type BoundaryToken = OBToken;
5
+ export declare const genBoundaryStyle: GenerateStyle<BoundaryToken>;
6
+ declare const _default: (prefixCls: string) => {
7
+ wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
8
+ hashId: string;
9
+ };
10
+ export default _default;
@@ -0,0 +1,46 @@
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 _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; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
+ import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
+ export var genBoundaryStyle = function genBoundaryStyle(token) {
7
+ var colorTextTertiary = token.colorTextTertiary;
8
+ return _defineProperty(_defineProperty({}, ".boundary-container", {
9
+ display: 'flex',
10
+ alignItems: 'center',
11
+ justifyContent: 'center',
12
+ height: '100%',
13
+ '.empty': {
14
+ display: 'flex',
15
+ flexDirection: 'column',
16
+ alignItems: 'center',
17
+ justifyContent: 'center',
18
+ paddingBottom: 60,
19
+ '> img': {
20
+ height: 102,
21
+ marginBottom: 24
22
+ },
23
+ '> h4': {
24
+ margin: 0,
25
+ fontSize: 18
26
+ },
27
+ '> span': {
28
+ marginTop: 8,
29
+ color: colorTextTertiary,
30
+ fontSize: 14,
31
+ textAlign: 'center'
32
+ },
33
+ '> button': {
34
+ marginTop: 24
35
+ }
36
+ }
37
+ }), ".boundary-code", {
38
+ minHeight: 'calc(100vh - 120px)'
39
+ });
40
+ };
41
+ export default (function (prefixCls) {
42
+ var useStyle = genComponentStyleHook('Boundary', function (token) {
43
+ return [genBoundaryStyle(token)];
44
+ });
45
+ return useStyle(prefixCls);
46
+ });
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import './index.less';
3
2
  export interface ContentWithIconProps {
4
3
  content?: React.ReactNode;
5
4
  tooltip?: any;
@@ -7,16 +7,14 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
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
8
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
- import React, { isValidElement } from 'react';
11
- import { Tooltip, Space, Popover } from 'antd';
10
+ "use client";
11
+ import React, { isValidElement, useContext } from 'react';
12
+ import { Tooltip, Space, Popover, ConfigProvider } from 'antd';
12
13
  import { ExclamationCircleFilled, InfoCircleFilled, InfoCircleOutlined, QuestionCircleOutlined } from '@oceanbase/icons';
13
14
  import classNames from 'classnames';
14
- import { getPrefix } from "../_util";
15
- import "./index.less";
15
+ import useStyle from "./style";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
- import { Fragment as _Fragment } from "react/jsx-runtime";
19
- var prefix = getPrefix('content-with-question');
20
18
  var ContentWithIcon = function ContentWithIcon(_ref) {
21
19
  var content = _ref.content,
22
20
  tooltip = _ref.tooltip,
@@ -38,6 +36,11 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
38
36
  _ref$exclamationColor = _ref.exclamationColor,
39
37
  exclamationColor = _ref$exclamationColor === void 0 ? '#FAAD14' : _ref$exclamationColor,
40
38
  restProps = _objectWithoutProperties(_ref, _excluded);
39
+ var _useContext = useContext(ConfigProvider.ConfigContext),
40
+ getPrefixCls = _useContext.getPrefixCls;
41
+ var prefixCls = getPrefixCls('content-with-icon');
42
+ var _useStyle = useStyle(prefixCls),
43
+ wrapSSR = _useStyle.wrapSSR;
41
44
  var defaultIconType = function defaultIconType() {
42
45
  if (iconType === 'question') {
43
46
  return /*#__PURE__*/_jsx(QuestionCircleOutlined, {
@@ -45,7 +48,7 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
45
48
  color: color === 'default' ? '#132039' : color,
46
49
  fontSize: size
47
50
  },
48
- className: "".concat(prefix, "-help")
51
+ className: "".concat(prefixCls, "-help")
49
52
  });
50
53
  }
51
54
  if (iconType === 'info') {
@@ -55,7 +58,7 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
55
58
  color: infoColor,
56
59
  fontSize: size
57
60
  },
58
- className: "".concat(prefix, "-help")
61
+ className: "".concat(prefixCls, "-help")
59
62
  });
60
63
  } else {
61
64
  return /*#__PURE__*/_jsx(InfoCircleOutlined, {
@@ -63,7 +66,7 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
63
66
  color: '3333333',
64
67
  fontSize: size
65
68
  },
66
- className: "".concat(prefix, "-help")
69
+ className: "".concat(prefixCls, "-help")
67
70
  });
68
71
  }
69
72
  }
@@ -73,7 +76,7 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
73
76
  color: exclamationColor,
74
77
  fontSize: size
75
78
  },
76
- className: "".concat(prefix, "-help")
79
+ className: "".concat(prefixCls, "-help")
77
80
  });
78
81
  }
79
82
  };
@@ -102,24 +105,22 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
102
105
  children: /*#__PURE__*/isValidElement(iconConfig) ? iconConfig : defaultIconType()
103
106
  })) : null;
104
107
  };
105
- return /*#__PURE__*/_jsx(_Fragment, {
106
- children: /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({
107
- className: classNames(_defineProperty(_defineProperty({}, "".concat(prefix, "-item"), true), className, !!className))
108
- }, restProps), {}, {
109
- children: /*#__PURE__*/_jsxs(Space, {
110
- size: 4,
111
- children: [getIcon(
112
- // 图标在文字前
113
- prefixIcon === true ? defaultIconType() : prefixIcon), /*#__PURE__*/_jsx("span", {
114
- "data-testid": "content",
115
- style: {
116
- color: color === 'default' ? '#5C6B8A' : color,
117
- fontSize: size
118
- },
119
- children: content !== null && content !== void 0 ? content : children
120
- }), getIcon(suffixIcon)]
121
- })
122
- }))
123
- });
108
+ return wrapSSR( /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({
109
+ className: classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-item"), true), className, !!className))
110
+ }, restProps), {}, {
111
+ children: /*#__PURE__*/_jsxs(Space, {
112
+ size: 4,
113
+ children: [getIcon(
114
+ // 图标在文字前
115
+ prefixIcon === true ? defaultIconType() : prefixIcon), /*#__PURE__*/_jsx("span", {
116
+ "data-testid": "content",
117
+ style: {
118
+ color: color === 'default' ? '#5C6B8A' : color,
119
+ fontSize: size
120
+ },
121
+ children: content !== null && content !== void 0 ? content : children
122
+ }), getIcon(suffixIcon)]
123
+ })
124
+ })));
124
125
  };
125
126
  export default ContentWithIcon;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { GenerateStyle } from '@oceanbase/design/es/theme';
3
+ import type { OBToken } from '../../_util/genComponentStyleHook';
4
+ export type ContentWithIconToken = OBToken;
5
+ export declare const genContentWithIconStyle: GenerateStyle<ContentWithIconToken>;
6
+ declare const _default: (prefixCls: string) => {
7
+ wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
8
+ hashId: string;
9
+ };
10
+ export default _default;
@@ -0,0 +1,26 @@
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 _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; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
+ import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
+ export var genContentWithIconStyle = function genContentWithIconStyle(token) {
7
+ var componentCls = token.componentCls;
8
+ return _defineProperty({}, "".concat(componentCls, "-item"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
9
+ display: 'inline-flex',
10
+ alignItems: 'center'
11
+ }, "".concat(componentCls, "-prefix"), {
12
+ marginRight: 8
13
+ }), "".concat(componentCls, "-suffix"), {
14
+ marginLeft: 8
15
+ }), "".concat(componentCls, "-help"), {
16
+ cursor: 'help'
17
+ }), "".concat(componentCls, "-color"), {
18
+ color: 'red'
19
+ }));
20
+ };
21
+ export default (function (prefixCls) {
22
+ var useStyle = genComponentStyleHook('ContentWithIcon', function (token) {
23
+ return [genContentWithIconStyle(token)];
24
+ });
25
+ return useStyle(prefixCls);
26
+ });
@@ -7,6 +7,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
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
8
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ "use client";
10
11
  import { QuestionCircleOutlined } from '@oceanbase/icons';
11
12
  import { ConfigProvider, Space, Tooltip } from '@oceanbase/design';
12
13
  import classNames from 'classnames';
@@ -8,18 +8,18 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
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
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
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
11
+ "use client";
12
+ import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
12
13
  import dayjsGenerateConfig from 'rc-picker/es/generate/dayjs';
13
14
  import momentGenerateConfig from 'rc-picker/es/generate/moment';
14
15
  import useCSSVarCls from 'antd/es/config-provider/hooks/useCSSVarCls';
15
16
  import useStyle from 'antd/es/date-picker/style/index';
16
17
  import { PickerPanel } from 'rc-picker';
17
18
  import classNames from 'classnames';
18
- import { Alert, Button, Col, DatePicker, Divider, Form, Row, Space, TimePicker } from '@oceanbase/design';
19
+ import { Alert, Button, Col, ConfigProvider, DatePicker, Divider, Form, Row, Space, TimePicker } from '@oceanbase/design';
19
20
  import { noop } from 'lodash';
20
21
  import moment from 'moment';
21
22
  import dayjs from 'dayjs';
22
- import { getPrefix } from "../_util";
23
23
  import { DATE_TIME_MONTH_FORMAT, DATE_TIME_MONTH_FORMAT_CN } from "./constant";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
25
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -46,7 +46,6 @@ var useClickFSA = function useClickFSA() {
46
46
  };
47
47
  return [state, next];
48
48
  };
49
- var prefix = getPrefix('ranger-picker-panel');
50
49
  var prefixCls = 'ant-picker';
51
50
  var TIME_FORMAT = 'HH:mm:ss';
52
51
  var InternalPickerPanel = function InternalPickerPanel(props) {
@@ -63,6 +62,9 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
63
62
  onCancel = _props$onCancel === void 0 ? noop : _props$onCancel,
64
63
  disabledDate = props.disabledDate,
65
64
  hideSecond = props.hideSecond;
65
+ var _useContext = useContext(ConfigProvider.ConfigContext),
66
+ getPrefixCls = _useContext.getPrefixCls;
67
+ var prefix = getPrefixCls('ranger-picker-panel');
66
68
  var rootCls = useCSSVarCls(prefixCls);
67
69
  var _useStyle = useStyle(prefixCls, rootCls),
68
70
  _useStyle2 = _slicedToArray(_useStyle, 3),
@@ -5,9 +5,9 @@ import type { Dayjs } from 'dayjs';
5
5
  import type { Moment } from 'moment';
6
6
  import type { RangeOption } from './typing';
7
7
  import type { Rule } from './PickerPanel';
8
- import './index.less';
9
8
  export type RangeName = 'customize' | string;
10
9
  export type RangeValue = [Moment, Moment] | [Dayjs, Dayjs] | [] | null;
10
+ export type RangeValueFormat = [string, string] | [] | null;
11
11
  export type RangeDateValue = {
12
12
  name: RangeName;
13
13
  range: RangeValue;
@@ -20,6 +20,9 @@ export interface DateRangerProps extends Omit<RangePickerProps, 'mode' | 'picker
20
20
  hasSync?: boolean;
21
21
  hasForward?: boolean;
22
22
  hasZoomOut?: boolean;
23
+ history?: boolean | {
24
+ capacity: number;
25
+ };
23
26
  hasTagInPicker?: boolean;
24
27
  tip?: string;
25
28
  rules?: Rule[];
@@ -1,5 +1,4 @@
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
- var _excluded = ["selects", "value", "defaultValue", "defaultQuickValue", "hasRewind", "hasPlay", "hasSync", "hasForward", "hasZoomOut", "hasTagInPicker", "pastOnly", "simpleMode", "hideYear", "hideSecond", "autoCalcRange", "onChange", "disabledDate", "locale", "size", "stickRangeName", "tooltipProps", "isMoment", "rules", "tip", "autoAdjustOverflow", "overlayClassName", "overlayStyle", "getPopupContainer"];
1
+ var _excluded = ["selects", "value", "defaultValue", "defaultQuickValue", "hasRewind", "hasPlay", "hasSync", "hasForward", "hasZoomOut", "hasTagInPicker", "pastOnly", "simpleMode", "hideYear", "hideSecond", "autoCalcRange", "history", "onChange", "disabledDate", "locale", "size", "stickRangeName", "tooltipProps", "isMoment", "rules", "tip", "autoAdjustOverflow", "overlayClassName", "overlayStyle", "getPopupContainer"];
3
2
  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; }
4
3
  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; }
5
4
  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; }
@@ -9,6 +8,7 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
9
8
  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."); }
10
9
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
10
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
11
+ 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); }
12
12
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
13
  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."); }
14
14
  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); }
@@ -17,25 +17,32 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
19
19
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
- import React, { useEffect, useState, useImperativeHandle, useRef } from 'react';
21
- import { Button, DatePicker, Divider, Dropdown, Radio, Space, Tooltip, theme } from '@oceanbase/design';
22
- import { LeftOutlined, RightOutlined, ZoomOutOutlined, SyncOutlined } from '@oceanbase/icons';
20
+ "use client";
21
+ import React, { useContext, useEffect, useRef, useState, useImperativeHandle, useMemo } from 'react';
22
+ import { Button, ConfigProvider, DatePicker, Divider, Dropdown, Flex, Menu, Radio, Space, Tooltip, message, theme } from '@oceanbase/design';
23
+ import { LeftOutlined, RightOutlined, ZoomOutOutlined, SyncOutlined, ArrowLeftOutlined, CopyOutlined, DeleteOutlined } from '@oceanbase/icons';
23
24
  import dayjs from 'dayjs';
24
- import { findIndex, isNil, noop, omit } from 'lodash';
25
+ import { findIndex, isEqual as _isEqual, isNil, noop, omit } from 'lodash';
25
26
  import moment from 'moment';
26
27
  import classNames from 'classnames';
27
28
  import LocaleWrapper from "../locale/LocaleWrapper";
28
- import { getPrefix } from "../_util";
29
29
  import { CUSTOMIZE, DATE_TIME_FORMAT, NEAR_1_MINUTES, NEAR_30_MINUTES, NEAR_1_HOURS, NEAR_3_HOURS, NEAR_6_HOURS, TODAY, YEAR_DATE_TIME_FORMAT, LAST_3_DAYS, DATE_TIME_SECOND_FORMAT, YEAR_DATE_TIME_SECOND_FORMAT, DATE_TIME_FORMAT_CN, DATE_TIME_SECOND_FORMAT_CN, YEAR_DATE_TIME_FORMAT_CN, YEAR_DATE_TIME_SECOND_FORMAT_CN } from "./constant";
30
30
  import InternalPickerPanel from "./PickerPanel";
31
31
  import zhCN from "./locale/zh-CN";
32
- import "./index.less";
32
+ import useStyle from "./style";
33
33
  import { useClickAway } from 'ahooks';
34
+ import { useLocalStorageState } from '@oceanbase/util';
34
35
  import { jsx as _jsx } from "react/jsx-runtime";
35
36
  import { jsxs as _jsxs } from "react/jsx-runtime";
36
- var prefix = getPrefix('date-ranger');
37
+ var DefaultMaxHistoryCapacity = 20;
37
38
  var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
38
39
  var _selects$;
40
+ var _useContext = useContext(ConfigProvider.ConfigContext),
41
+ getPrefixCls = _useContext.getPrefixCls;
42
+ var prefixCls = getPrefixCls('date-ranger');
43
+ var _useStyle = useStyle(prefixCls),
44
+ wrapSSR = _useStyle.wrapSSR;
45
+ var prefix = prefixCls;
39
46
  var _props$selects = props.selects,
40
47
  selects = _props$selects === void 0 ? [NEAR_1_MINUTES, NEAR_30_MINUTES, NEAR_1_HOURS, NEAR_3_HOURS, NEAR_6_HOURS, TODAY, LAST_3_DAYS] : _props$selects,
41
48
  value = props.value,
@@ -63,6 +70,8 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
63
70
  hideSecond = _props$hideSecond === void 0 ? false : _props$hideSecond,
64
71
  _props$autoCalcRange = props.autoCalcRange,
65
72
  autoCalcRange = _props$autoCalcRange === void 0 ? false : _props$autoCalcRange,
73
+ _props$history = props.history,
74
+ historyProp = _props$history === void 0 ? false : _props$history,
66
75
  _props$onChange = props.onChange,
67
76
  onChange = _props$onChange === void 0 ? noop : _props$onChange,
68
77
  disabledDate = props.disabledDate,
@@ -116,15 +125,60 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
116
125
  _useState10 = _slicedToArray(_useState9, 2),
117
126
  backRadioFocused = _useState10[0],
118
127
  setBackRadioFocused = _useState10[1];
128
+ var _useState11 = useState(false),
129
+ _useState12 = _slicedToArray(_useState11, 2),
130
+ historyMenuVisible = _useState12[0],
131
+ setHistoryMenuVisible = _useState12[1];
119
132
  var rangeRef = useRef(null);
120
133
  var popRef = useRef(null);
121
134
  var labelRef = useRef(null);
122
135
 
123
136
  // 没有 selects 时,回退到普通 RangePicker, 当前时间选项为自定义时,应该显示 RangePicker
124
- var _useState11 = useState(rangeName !== CUSTOMIZE),
125
- _useState12 = _slicedToArray(_useState11, 2),
126
- isPlay = _useState12[0],
127
- setIsPlay = _useState12[1];
137
+ var _useState13 = useState(rangeName !== CUSTOMIZE),
138
+ _useState14 = _slicedToArray(_useState13, 2),
139
+ isPlay = _useState14[0],
140
+ setIsPlay = _useState14[1];
141
+ var history = useMemo(function () {
142
+ if (historyProp) {
143
+ return {
144
+ capacity: _typeof(historyProp) === 'object' ? historyProp.capacity : DefaultMaxHistoryCapacity
145
+ };
146
+ }
147
+ return false;
148
+ }, [historyProp]);
149
+ var localStorageKey = "".concat(prefixCls, "-date-ranger-history");
150
+ var _useLocalStorageState = useLocalStorageState(localStorageKey, {
151
+ defaultValue: [],
152
+ listenStorageChange: true
153
+ }),
154
+ _useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 2),
155
+ rangeHistory = _useLocalStorageState2[0],
156
+ setRangeHistory = _useLocalStorageState2[1];
157
+ var updateRangeHistory = function updateRangeHistory(range) {
158
+ if (!range) {
159
+ return;
160
+ }
161
+ if (range.length < 2 || !history) {
162
+ return;
163
+ }
164
+ var formattedValue = [range[0].format(YEAR_DATE_TIME_SECOND_FORMAT_CN), range[1].format(YEAR_DATE_TIME_SECOND_FORMAT_CN)];
165
+ if (rangeHistory.find(function (item) {
166
+ return _isEqual(item, formattedValue);
167
+ })) {
168
+ return;
169
+ }
170
+ var updatedValue = [formattedValue].concat(_toConsumableArray(rangeHistory));
171
+ if (updatedValue.length > history.capacity) {
172
+ updatedValue.splice(0, history.capacity);
173
+ }
174
+ setRangeHistory(updatedValue);
175
+ };
176
+ var delRangeHistory = function delRangeHistory(range) {
177
+ var updatedValue = rangeHistory.filter(function (item) {
178
+ return !_isEqual(item, range);
179
+ });
180
+ setRangeHistory(updatedValue);
181
+ };
128
182
  var compare = function compare(m1, m2) {
129
183
  if (Array.isArray(m1) && !Array.isArray(m2)) return false;
130
184
  if (Array.isArray(m2) && !Array.isArray(m1)) return false;
@@ -159,6 +213,7 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
159
213
  var rangeChange = function rangeChange(range) {
160
214
  setInnerValue(range);
161
215
  onChange(range);
216
+ updateRangeHistory(range);
162
217
  };
163
218
  var datePickerChange = function datePickerChange(range) {
164
219
  rangeChange(range);
@@ -221,6 +276,9 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
221
276
  }
222
277
  return isEN ? "Nearly ".concat(differenceSeconds, " seconds") : "\u8FD1 ".concat(differenceSeconds, " \u79D2");
223
278
  };
279
+ var getHistoryTitle = function getHistoryTitle() {
280
+ return isEN ? 'History records' : '历史记录';
281
+ };
224
282
  var setNow = function setNow() {
225
283
  var selected = selects.find(function (item) {
226
284
  return item.name === rangeName;
@@ -257,7 +315,7 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
257
315
  var diffMs = e.diff(s);
258
316
  return diffMs > differenceMs;
259
317
  }) : selects[rangeNameIndex + 1];
260
- return /*#__PURE__*/_jsxs(Space, {
318
+ return wrapSSR( /*#__PURE__*/_jsxs(Space, {
261
319
  className: classNames(rest.className, _defineProperty(_defineProperty(_defineProperty({}, prefix, true), "".concat(prefix, "-show-range"), true), "".concat(prefix, "-back-radio-focused"), backRadioFocused)),
262
320
  style: rest.style,
263
321
  children: [/*#__PURE__*/_jsxs(Space, {
@@ -284,7 +342,99 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
284
342
  ref: popRef,
285
343
  className: classNames("".concat(prefix, "-dropdown-picker"), overlayClassName),
286
344
  style: overlayStyle,
287
- children: [originNode, /*#__PURE__*/_jsx(Divider, {
345
+ children: [/*#__PURE__*/_jsxs(Flex, {
346
+ vertical: true,
347
+ justify: "space-between",
348
+ children: [!historyMenuVisible && /*#__PURE__*/_jsx("div", {
349
+ className: "options",
350
+ children: originNode
351
+ }), history && historyMenuVisible && /*#__PURE__*/_jsxs("div", {
352
+ className: "history",
353
+ children: [/*#__PURE__*/_jsxs(Button, {
354
+ type: "link",
355
+ style: {
356
+ paddingLeft: 8,
357
+ color: token.colorTextBase
358
+ },
359
+ onClick: function onClick(e) {
360
+ setHistoryMenuVisible(false);
361
+ e.stopPropagation();
362
+ },
363
+ children: [/*#__PURE__*/_jsx(ArrowLeftOutlined, {
364
+ color: token.colorTextLabel
365
+ }), getHistoryTitle()]
366
+ }), /*#__PURE__*/_jsx(Menu, {
367
+ onClick: function onClick(_ref4) {
368
+ var rangeString = _ref4.key;
369
+ var vList = rangeString.split(',').map(function (v) {
370
+ return v.trim();
371
+ });
372
+ rangeChange(vList.map(function (v) {
373
+ return isMoment ? moment(v) : dayjs(v);
374
+ }));
375
+ handleNameChange(CUSTOMIZE);
376
+ },
377
+ style: {
378
+ maxHeight: 480,
379
+ overflowY: 'auto'
380
+ },
381
+ items: rangeHistory.map(function (range) {
382
+ return {
383
+ key: String(range),
384
+ label: /*#__PURE__*/_jsxs(Flex, {
385
+ className: "".concat(prefix, "-history-menu-item"),
386
+ vertical: true,
387
+ children: [/*#__PURE__*/_jsxs("span", {
388
+ children: [(isMoment ? moment(range[0]) : dayjs(range[0])).format(YEAR_DATE_TIME_SECOND_FORMAT_CN), "~"]
389
+ }), /*#__PURE__*/_jsx("span", {
390
+ children: (isMoment ? moment(range[1]) : dayjs(range[1])).format(YEAR_DATE_TIME_SECOND_FORMAT_CN)
391
+ }), /*#__PURE__*/_jsxs(Space, {
392
+ className: "".concat(prefix, "-menu-text-btn-wrapper"),
393
+ children: [/*#__PURE__*/_jsx(Button, {
394
+ className: "".concat(prefix, "-menu-text-btn"),
395
+ type: "text",
396
+ color: "default",
397
+ variant: "filled",
398
+ size: "small",
399
+ onClick: function onClick(e) {
400
+ e.stopPropagation();
401
+ var vList = range.map(function (v) {
402
+ return v;
403
+ });
404
+ var text = "".concat(vList.join('~'));
405
+ navigator.clipboard.writeText(text);
406
+ message.success(text);
407
+ },
408
+ children: /*#__PURE__*/_jsx(CopyOutlined, {})
409
+ }), /*#__PURE__*/_jsx(Button, {
410
+ className: "".concat(prefix, "-menu-text-btn"),
411
+ type: "text",
412
+ color: "default",
413
+ variant: "filled",
414
+ size: "small",
415
+ onClick: function onClick(e) {
416
+ e.stopPropagation();
417
+ delRangeHistory(range);
418
+ },
419
+ children: /*#__PURE__*/_jsx(DeleteOutlined, {})
420
+ })]
421
+ })]
422
+ }, String(range))
423
+ };
424
+ })
425
+ })]
426
+ }), history && !historyMenuVisible && /*#__PURE__*/_jsxs(Button, {
427
+ type: "link",
428
+ style: {
429
+ width: 'max-content'
430
+ },
431
+ onClick: function onClick(e) {
432
+ setHistoryMenuVisible(true);
433
+ e.stopPropagation();
434
+ },
435
+ children: [getHistoryTitle(), /*#__PURE__*/_jsx(RightOutlined, {})]
436
+ })]
437
+ }), /*#__PURE__*/_jsx(Divider, {
288
438
  type: "vertical",
289
439
  style: {
290
440
  height: 'auto',
@@ -317,9 +467,9 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
317
467
  menu: {
318
468
  selectable: true,
319
469
  defaultSelectedKeys: [rangeName],
320
- onClick: function onClick(_ref4) {
321
- var key = _ref4.key,
322
- domEvent = _ref4.domEvent;
470
+ onClick: function onClick(_ref5) {
471
+ var key = _ref5.key,
472
+ domEvent = _ref5.domEvent;
323
473
  var selected = selects.find(function (_item) {
324
474
  return _item.name === key;
325
475
  });
@@ -487,7 +637,7 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
487
637
  },
488
638
  icon: /*#__PURE__*/_jsx(ZoomOutOutlined, {})
489
639
  })]
490
- });
640
+ }));
491
641
  });
492
642
  export default LocaleWrapper({
493
643
  componentName: 'DateRanger',
@@ -192,7 +192,7 @@ export var THIS_WEEK = {
192
192
  export var LAST_WEEK = {
193
193
  label: '上周',
194
194
  enLabel: 'Last week',
195
- rangeLabel: 'last week',
195
+ rangeLabel: '1w',
196
196
  name: 'LAST_WEEK',
197
197
  range: function range() {
198
198
  var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : moment();
@@ -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";
@@ -0,0 +1,56 @@
1
+ declare const _default: {
2
+ locale: string;
3
+ dateFormat?: string;
4
+ dateTimeFormat?: string;
5
+ fieldDateTimeFormat?: string;
6
+ fieldDateFormat?: string;
7
+ fieldTimeFormat?: string;
8
+ fieldMonthFormat?: string;
9
+ fieldYearFormat?: string;
10
+ fieldWeekFormat?: string;
11
+ fieldQuarterFormat?: string;
12
+ monthBeforeYear?: boolean;
13
+ yearFormat?: string;
14
+ monthFormat?: string;
15
+ cellYearFormat?: string;
16
+ cellQuarterFormat?: string;
17
+ dayFormat?: string;
18
+ cellDateFormat?: string;
19
+ cellMeridiemFormat?: string;
20
+ today: string;
21
+ now: string;
22
+ backToToday: string;
23
+ ok: string;
24
+ timeSelect: string;
25
+ dateSelect: string;
26
+ weekSelect?: string;
27
+ clear: string;
28
+ week: string;
29
+ month: string;
30
+ year: string;
31
+ previousMonth: string;
32
+ nextMonth: string;
33
+ monthSelect: string;
34
+ yearSelect: string;
35
+ decadeSelect: string;
36
+ previousYear: string;
37
+ nextYear: string;
38
+ previousDecade: string;
39
+ nextDecade: string;
40
+ previousCentury: string;
41
+ nextCentury: string;
42
+ shortWeekDays?: string[];
43
+ shortMonths?: string[];
44
+ customize: string;
45
+ customTime: string;
46
+ startDate: string;
47
+ startTime: string;
48
+ endDate: string;
49
+ endTime: string;
50
+ cancel: string;
51
+ confirm: string;
52
+ current: string;
53
+ jumpBack: string;
54
+ jumpForward: string;
55
+ };
56
+ export default _default;