@oceanbase/ui 1.0.0-alpha.0 → 1.0.0-alpha.10

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 (386) 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 +121 -15
  7. package/es/Action/Item.d.ts +6 -15
  8. package/es/Action/Item.js +85 -128
  9. package/es/Action/index.d.ts +6 -3
  10. package/es/Action/style/index.d.ts +2 -2
  11. package/es/Action/style/index.js +8 -4
  12. package/es/BasicLayout/locale/ja-JP.d.ts +13 -0
  13. package/es/BasicLayout/locale/ja-JP.js +12 -0
  14. package/es/BasicLayout/style/index.js +35 -23
  15. package/es/BatchOperationBar/index.d.ts +0 -1
  16. package/es/BatchOperationBar/index.js +17 -13
  17. package/es/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  18. package/es/BatchOperationBar/locale/ja-JP.js +6 -0
  19. package/es/BatchOperationBar/style/index.d.ts +10 -0
  20. package/es/BatchOperationBar/style/index.js +51 -0
  21. package/es/Boundary/Components/Code.js +11 -5
  22. package/es/Boundary/Components/Exception.js +85 -74
  23. package/es/Boundary/Components/Function.js +11 -5
  24. package/es/Boundary/index.d.ts +0 -1
  25. package/es/Boundary/index.js +0 -1
  26. package/es/Boundary/locale/en-US.js +1 -1
  27. package/es/Boundary/locale/ja-JP.d.ts +11 -0
  28. package/es/Boundary/locale/ja-JP.js +10 -0
  29. package/es/Boundary/locale/zh-CN.js +1 -1
  30. package/es/Boundary/locale/zh-TW.js +1 -1
  31. package/es/Boundary/style/index.d.ts +10 -0
  32. package/es/Boundary/style/index.js +46 -0
  33. package/es/ContentWithIcon/index.d.ts +0 -1
  34. package/es/ContentWithIcon/index.js +29 -29
  35. package/es/ContentWithIcon/style/index.d.ts +10 -0
  36. package/es/ContentWithIcon/style/index.js +26 -0
  37. package/es/DateRanger/PickerPanel.js +5 -4
  38. package/es/DateRanger/Ranger.d.ts +4 -1
  39. package/es/DateRanger/Ranger.js +168 -19
  40. package/es/DateRanger/constant/index.js +1 -1
  41. package/es/DateRanger/locale/ja-JP.d.ts +56 -0
  42. package/es/DateRanger/locale/ja-JP.js +20 -0
  43. package/es/DateRanger/style/index.d.ts +10 -0
  44. package/es/DateRanger/style/index.js +126 -0
  45. package/es/Dialog/Anchor.d.ts +2 -10
  46. package/es/Dialog/Anchor.js +67 -96
  47. package/es/Dialog/index.d.ts +0 -1
  48. package/es/Dialog/index.js +537 -578
  49. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  50. package/es/Dialog/locale/ja-JP.js +4 -0
  51. package/es/Dialog/locale/zh-CN.js +1 -1
  52. package/es/Dialog/locale/zh-TW.js +1 -1
  53. package/es/Dialog/style/index.d.ts +10 -0
  54. package/es/Dialog/style/index.js +97 -0
  55. package/es/DocDialog/locale/ja-JP.d.ts +2 -0
  56. package/es/DocDialog/locale/ja-JP.js +1 -0
  57. package/es/FooterToolbar/style/index.d.ts +0 -2
  58. package/es/FooterToolbar/style/index.js +7 -13
  59. package/es/FullscreenBox/index.d.ts +0 -1
  60. package/es/FullscreenBox/index.js +46 -37
  61. package/es/FullscreenBox/locale/ja-JP.d.ts +2 -0
  62. package/es/FullscreenBox/locale/ja-JP.js +1 -0
  63. package/es/FullscreenBox/style/index.d.ts +10 -0
  64. package/es/FullscreenBox/style/index.js +53 -0
  65. package/es/Highlight/DiffView/index.d.ts +0 -1
  66. package/es/Highlight/DiffView/index.js +5 -5
  67. package/es/Highlight/JsonView.d.ts +0 -1
  68. package/es/Highlight/JsonView.js +5 -5
  69. package/es/Highlight/index.d.ts +0 -1
  70. package/es/Highlight/index.js +23 -23
  71. package/es/Highlight/locale/ja-JP.d.ts +4 -0
  72. package/es/Highlight/locale/ja-JP.js +3 -0
  73. package/es/Highlight/style/index.d.ts +10 -0
  74. package/es/Highlight/style/index.js +213 -0
  75. package/es/LocaleDropdown/index.js +4 -2
  76. package/es/Login/ActivateForm.d.ts +0 -1
  77. package/es/Login/ActivateForm.js +12 -9
  78. package/es/Login/LoginForm.d.ts +0 -1
  79. package/es/Login/LoginForm.js +20 -15
  80. package/es/Login/RegisterForm.d.ts +0 -1
  81. package/es/Login/RegisterForm.js +14 -11
  82. package/es/Login/index.d.ts +0 -1
  83. package/es/Login/index.js +24 -22
  84. package/es/Login/locale/ja-JP.d.ts +28 -0
  85. package/es/Login/locale/ja-JP.js +27 -0
  86. package/es/Login/locale/zh-CN.js +2 -2
  87. package/es/Login/style/index.d.ts +10 -0
  88. package/es/Login/style/index.js +182 -0
  89. package/es/NavMenu/index.d.ts +1 -2
  90. package/es/NavMenu/index.js +11 -8
  91. package/es/NavMenu/style/index.d.ts +10 -0
  92. package/es/NavMenu/style/index.js +47 -0
  93. package/es/PageContainer/index.d.ts +2 -0
  94. package/es/PageContainer/index.js +102 -25
  95. package/es/PageContainer/locale/en-US.d.ts +1 -0
  96. package/es/PageContainer/locale/en-US.js +2 -1
  97. package/es/PageContainer/locale/ja-JP.d.ts +5 -0
  98. package/es/PageContainer/locale/ja-JP.js +4 -0
  99. package/es/PageContainer/locale/zh-CN.d.ts +1 -0
  100. package/es/PageContainer/locale/zh-CN.js +2 -1
  101. package/es/PageContainer/locale/zh-TW.d.ts +1 -0
  102. package/es/PageContainer/locale/zh-TW.js +2 -1
  103. package/es/PageContainer/style/index.js +41 -16
  104. package/es/Password/index.js +1 -1
  105. package/es/Password/locale/ja-JP.d.ts +13 -0
  106. package/es/Password/locale/ja-JP.js +12 -0
  107. package/es/ProCard/index.d.ts +2 -1
  108. package/es/ProCard/index.js +20 -8
  109. package/es/ProCard/style/index.d.ts +2 -2
  110. package/es/ProCard/style/index.js +13 -5
  111. package/es/ProTable/index.d.ts +1 -1
  112. package/es/ProTable/index.js +23 -8
  113. package/es/ProTable/style/index.d.ts +2 -2
  114. package/es/ProTable/style/index.js +12 -5
  115. package/es/Ranger/QuickPicker.js +8 -4
  116. package/es/Ranger/Ranger.d.ts +0 -1
  117. package/es/Ranger/Ranger.js +12 -9
  118. package/es/Ranger/locale/ja-JP.d.ts +28 -0
  119. package/es/Ranger/locale/ja-JP.js +29 -0
  120. package/es/Ranger/style/index.d.ts +10 -0
  121. package/es/Ranger/style/index.js +44 -0
  122. package/es/SideTip/index.d.ts +0 -1
  123. package/es/SideTip/index.js +24 -22
  124. package/es/SideTip/locale/ja-JP.d.ts +2 -0
  125. package/es/SideTip/locale/ja-JP.js +1 -0
  126. package/es/SideTip/style/index.d.ts +10 -0
  127. package/es/SideTip/style/index.js +162 -0
  128. package/es/TagSelect/Group.d.ts +6 -6
  129. package/es/TagSelect/Group.js +5 -3
  130. package/es/TagSelect/Item.js +5 -3
  131. package/es/Welcome/index.d.ts +0 -1
  132. package/es/Welcome/index.js +30 -26
  133. package/es/Welcome/locale/ja-JP.d.ts +5 -0
  134. package/es/Welcome/locale/ja-JP.js +4 -0
  135. package/es/Welcome/step/style/index.d.ts +10 -0
  136. package/es/Welcome/step/style/index.js +44 -0
  137. package/es/Welcome/step.d.ts +0 -1
  138. package/es/Welcome/step.js +17 -14
  139. package/es/Welcome/style/index.d.ts +10 -0
  140. package/es/Welcome/style/index.js +141 -0
  141. package/es/_util/genComponentStyleHook.d.ts +4 -3
  142. package/es/_util/genComponentStyleHook.js +1 -1
  143. package/es/index.d.ts +0 -5
  144. package/es/index.js +0 -3
  145. package/es/locale/en-US.js +0 -4
  146. package/es/locale/ja-JP.d.ts +3 -0
  147. package/es/locale/ja-JP.js +38 -0
  148. package/es/locale/zh-CN.js +0 -4
  149. package/es/locale/zh-TW.js +0 -4
  150. package/lib/Action/Group.js +122 -46
  151. package/lib/Action/Item.d.ts +6 -15
  152. package/lib/Action/Item.js +66 -76
  153. package/lib/Action/index.d.ts +6 -3
  154. package/lib/Action/style/index.d.ts +2 -2
  155. package/lib/Action/style/index.js +16 -1
  156. package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
  157. package/lib/BackgroundTaskManager/index.js +3 -12
  158. package/lib/BasicLayout/Header.js +120 -62
  159. package/lib/BasicLayout/index.js +166 -143
  160. package/lib/BasicLayout/locale/ja-JP.d.ts +13 -0
  161. package/lib/BasicLayout/locale/ja-JP.js +36 -0
  162. package/lib/BasicLayout/style/index.js +32 -23
  163. package/lib/BatchOperationBar/index.d.ts +0 -1
  164. package/lib/BatchOperationBar/index.js +70 -51
  165. package/lib/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  166. package/lib/{TaskGraph/locale/en-US.js → BatchOperationBar/locale/ja-JP.js} +10 -16
  167. package/lib/BatchOperationBar/style/index.d.ts +10 -0
  168. package/lib/BatchOperationBar/style/index.js +82 -0
  169. package/lib/Boundary/Components/Code.js +25 -13
  170. package/lib/Boundary/Components/Exception.js +70 -49
  171. package/lib/Boundary/Components/Function.js +20 -8
  172. package/lib/Boundary/index.d.ts +0 -1
  173. package/lib/Boundary/index.js +0 -1
  174. package/lib/Boundary/locale/en-US.js +1 -1
  175. package/lib/Boundary/locale/ja-JP.d.ts +11 -0
  176. package/lib/Boundary/locale/ja-JP.js +34 -0
  177. package/lib/Boundary/locale/zh-CN.js +1 -1
  178. package/lib/Boundary/locale/zh-TW.js +1 -1
  179. package/lib/Boundary/style/index.d.ts +10 -0
  180. package/lib/Boundary/style/index.js +74 -0
  181. package/lib/ContentWithIcon/index.d.ts +0 -1
  182. package/lib/ContentWithIcon/index.js +44 -33
  183. package/lib/ContentWithIcon/style/index.d.ts +10 -0
  184. package/lib/ContentWithIcon/style/index.js +57 -0
  185. package/lib/ContentWithQuestion/index.js +8 -3
  186. package/lib/DateRanger/PickerPanel.js +237 -219
  187. package/lib/DateRanger/Ranger.d.ts +4 -1
  188. package/lib/DateRanger/Ranger.js +413 -239
  189. package/lib/DateRanger/constant/index.js +1 -1
  190. package/lib/DateRanger/locale/ja-JP.d.ts +56 -0
  191. package/lib/DateRanger/locale/ja-JP.js +49 -0
  192. package/lib/DateRanger/style/index.d.ts +10 -0
  193. package/lib/DateRanger/style/index.js +195 -0
  194. package/lib/Dialog/Anchor.d.ts +2 -10
  195. package/lib/Dialog/Anchor.js +59 -58
  196. package/lib/Dialog/EventProxy.js +3 -12
  197. package/lib/Dialog/index.d.ts +0 -1
  198. package/lib/Dialog/index.js +514 -466
  199. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  200. package/lib/{GraphToolbar/locale/en-US.js → Dialog/locale/ja-JP.js} +8 -12
  201. package/lib/Dialog/locale/zh-CN.js +1 -1
  202. package/lib/Dialog/locale/zh-TW.js +1 -1
  203. package/lib/Dialog/style/index.d.ts +10 -0
  204. package/lib/Dialog/style/index.js +135 -0
  205. package/lib/DocDialog/index.js +3 -2
  206. package/lib/DocDialog/locale/ja-JP.d.ts +2 -0
  207. package/lib/DocDialog/locale/ja-JP.js +25 -0
  208. package/lib/FooterToolbar/index.js +3 -2
  209. package/lib/FooterToolbar/style/index.d.ts +0 -2
  210. package/lib/FooterToolbar/style/index.js +7 -18
  211. package/lib/FullscreenBox/index.d.ts +0 -1
  212. package/lib/FullscreenBox/index.js +51 -33
  213. package/lib/FullscreenBox/locale/ja-JP.d.ts +2 -0
  214. package/lib/FullscreenBox/locale/ja-JP.js +25 -0
  215. package/lib/FullscreenBox/style/index.d.ts +10 -0
  216. package/lib/FullscreenBox/style/index.js +86 -0
  217. package/lib/Highlight/DiffView/DiffCells.js +17 -10
  218. package/lib/Highlight/DiffView/index.d.ts +0 -1
  219. package/lib/Highlight/DiffView/index.js +38 -34
  220. package/lib/Highlight/HighlightCell.js +13 -10
  221. package/lib/Highlight/JsonView.d.ts +0 -1
  222. package/lib/Highlight/JsonView.js +18 -17
  223. package/lib/Highlight/index.d.ts +0 -1
  224. package/lib/Highlight/index.js +60 -52
  225. package/lib/Highlight/locale/ja-JP.d.ts +4 -0
  226. package/lib/{GraphToolbar/locale/zh-CN.js → Highlight/locale/ja-JP.js} +7 -12
  227. package/lib/Highlight/style/index.d.ts +10 -0
  228. package/lib/Highlight/style/index.js +293 -0
  229. package/lib/IconFont/index.js +2 -12
  230. package/lib/LightFilter/index.js +3 -2
  231. package/lib/LocaleDropdown/index.js +15 -21
  232. package/lib/Login/ActivateForm.d.ts +0 -1
  233. package/lib/Login/ActivateForm.js +65 -64
  234. package/lib/Login/LoginForm.d.ts +0 -1
  235. package/lib/Login/LoginForm.js +134 -113
  236. package/lib/Login/RegisterForm.d.ts +0 -1
  237. package/lib/Login/RegisterForm.js +90 -89
  238. package/lib/Login/index.d.ts +0 -1
  239. package/lib/Login/index.js +102 -72
  240. package/lib/Login/locale/ja-JP.d.ts +28 -0
  241. package/lib/Login/locale/ja-JP.js +51 -0
  242. package/lib/Login/locale/zh-CN.js +2 -2
  243. package/lib/Login/style/index.d.ts +10 -0
  244. package/lib/Login/style/index.js +267 -0
  245. package/lib/NavMenu/index.d.ts +1 -2
  246. package/lib/NavMenu/index.js +22 -18
  247. package/lib/NavMenu/style/index.d.ts +10 -0
  248. package/lib/NavMenu/style/index.js +78 -0
  249. package/lib/PageContainer/ItemRender.js +5 -5
  250. package/lib/PageContainer/index.d.ts +2 -0
  251. package/lib/PageContainer/index.js +86 -10
  252. package/lib/PageContainer/locale/en-US.d.ts +1 -0
  253. package/lib/PageContainer/locale/en-US.js +2 -1
  254. package/lib/PageContainer/locale/ja-JP.d.ts +5 -0
  255. package/lib/{GraphToolbar/locale/zh-TW.js → PageContainer/locale/ja-JP.js} +8 -12
  256. package/lib/PageContainer/locale/zh-CN.d.ts +1 -0
  257. package/lib/PageContainer/locale/zh-CN.js +2 -1
  258. package/lib/PageContainer/locale/zh-TW.d.ts +1 -0
  259. package/lib/PageContainer/locale/zh-TW.js +2 -1
  260. package/lib/PageContainer/style/index.js +44 -13
  261. package/lib/PageLoading/index.js +6 -16
  262. package/lib/Password/Content.js +38 -42
  263. package/lib/Password/index.js +83 -68
  264. package/lib/Password/locale/ja-JP.d.ts +13 -0
  265. package/lib/Password/locale/ja-JP.js +36 -0
  266. package/lib/ProCard/index.d.ts +2 -1
  267. package/lib/ProCard/index.js +22 -8
  268. package/lib/ProCard/style/index.d.ts +2 -2
  269. package/lib/ProCard/style/index.js +18 -3
  270. package/lib/ProTable/index.d.ts +1 -1
  271. package/lib/ProTable/index.js +22 -10
  272. package/lib/ProTable/style/index.d.ts +2 -2
  273. package/lib/ProTable/style/index.js +18 -2
  274. package/lib/Ranger/QuickPicker.js +28 -17
  275. package/lib/Ranger/Ranger.d.ts +0 -1
  276. package/lib/Ranger/Ranger.js +49 -43
  277. package/lib/Ranger/locale/ja-JP.d.ts +28 -0
  278. package/lib/Ranger/locale/ja-JP.js +53 -0
  279. package/lib/Ranger/style/index.d.ts +10 -0
  280. package/lib/Ranger/style/index.js +82 -0
  281. package/lib/SideTip/Dragger.js +5 -4
  282. package/lib/SideTip/IconLoading.js +25 -25
  283. package/lib/SideTip/index.d.ts +0 -1
  284. package/lib/SideTip/index.js +55 -38
  285. package/lib/SideTip/locale/ja-JP.d.ts +2 -0
  286. package/lib/SideTip/locale/ja-JP.js +25 -0
  287. package/lib/SideTip/style/index.d.ts +10 -0
  288. package/lib/SideTip/style/index.js +211 -0
  289. package/lib/TagSelect/Group.d.ts +6 -6
  290. package/lib/TagSelect/Group.js +12 -7
  291. package/lib/TagSelect/Item.js +25 -20
  292. package/lib/TreeSearch/index.js +30 -35
  293. package/lib/Welcome/index.d.ts +0 -1
  294. package/lib/Welcome/index.js +72 -40
  295. package/lib/Welcome/locale/ja-JP.d.ts +5 -0
  296. package/lib/Welcome/locale/ja-JP.js +28 -0
  297. package/lib/Welcome/step/style/index.d.ts +10 -0
  298. package/lib/Welcome/step/style/index.js +74 -0
  299. package/lib/Welcome/step.d.ts +0 -1
  300. package/lib/Welcome/step.js +18 -7
  301. package/lib/Welcome/style/index.d.ts +10 -0
  302. package/lib/Welcome/style/index.js +188 -0
  303. package/lib/_util/genComponentStyleHook.d.ts +4 -3
  304. package/lib/_util/genComponentStyleHook.js +1 -1
  305. package/lib/index.d.ts +0 -5
  306. package/lib/index.js +0 -7
  307. package/lib/locale/LocaleWrapper.js +15 -14
  308. package/lib/locale/en-US.js +16 -20
  309. package/lib/locale/ja-JP.d.ts +3 -0
  310. package/lib/locale/ja-JP.js +67 -0
  311. package/lib/locale/zh-CN.js +17 -21
  312. package/lib/locale/zh-TW.js +15 -19
  313. package/package.json +8 -11
  314. package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
  315. package/es/BatchOperationBar/index.less +0 -46
  316. package/es/BatchOperationBar/index.less.d.ts +0 -15
  317. package/es/Boundary/index.less +0 -36
  318. package/es/ContentWithIcon/index.less +0 -21
  319. package/es/DateRanger/index.less +0 -157
  320. package/es/Dialog/index.less +0 -116
  321. package/es/FullscreenBox/index.less +0 -49
  322. package/es/GraphToolbar/index.d.ts +0 -26
  323. package/es/GraphToolbar/index.js +0 -146
  324. package/es/GraphToolbar/index.less +0 -65
  325. package/es/GraphToolbar/locale/en-US.d.ts +0 -9
  326. package/es/GraphToolbar/locale/en-US.js +0 -8
  327. package/es/GraphToolbar/locale/zh-CN.d.ts +0 -9
  328. package/es/GraphToolbar/locale/zh-CN.js +0 -8
  329. package/es/GraphToolbar/locale/zh-TW.d.ts +0 -9
  330. package/es/GraphToolbar/locale/zh-TW.js +0 -8
  331. package/es/Highlight/index.less +0 -381
  332. package/es/Login/index.less +0 -268
  333. package/es/NavMenu/index.less +0 -50
  334. package/es/Ranger/index.less +0 -57
  335. package/es/SideTip/index.less +0 -180
  336. package/es/TaskGraph/Graph.d.ts +0 -24
  337. package/es/TaskGraph/Graph.js +0 -271
  338. package/es/TaskGraph/graph.less +0 -23
  339. package/es/TaskGraph/index.d.ts +0 -16
  340. package/es/TaskGraph/index.js +0 -178
  341. package/es/TaskGraph/index.less +0 -117
  342. package/es/TaskGraph/locale/en-US.d.ts +0 -13
  343. package/es/TaskGraph/locale/en-US.js +0 -12
  344. package/es/TaskGraph/locale/zh-CN.d.ts +0 -13
  345. package/es/TaskGraph/locale/zh-CN.js +0 -12
  346. package/es/TaskGraph/locale/zh-TW.d.ts +0 -13
  347. package/es/TaskGraph/locale/zh-TW.js +0 -12
  348. package/es/TaskGraph/register.d.ts +0 -7
  349. package/es/TaskGraph/register.js +0 -200
  350. package/es/Welcome/index.less +0 -185
  351. package/es/index.less +0 -1
  352. package/es/variable.less +0 -54
  353. package/lib/BatchOperationBar/index.less +0 -46
  354. package/lib/BatchOperationBar/index.less.d.ts +0 -15
  355. package/lib/Boundary/index.less +0 -36
  356. package/lib/ContentWithIcon/index.less +0 -21
  357. package/lib/DateRanger/index.less +0 -157
  358. package/lib/Dialog/index.less +0 -116
  359. package/lib/FullscreenBox/index.less +0 -49
  360. package/lib/GraphToolbar/index.d.ts +0 -26
  361. package/lib/GraphToolbar/index.js +0 -154
  362. package/lib/GraphToolbar/index.less +0 -65
  363. package/lib/GraphToolbar/locale/en-US.d.ts +0 -9
  364. package/lib/GraphToolbar/locale/zh-CN.d.ts +0 -9
  365. package/lib/GraphToolbar/locale/zh-TW.d.ts +0 -9
  366. package/lib/Highlight/index.less +0 -381
  367. package/lib/Login/index.less +0 -268
  368. package/lib/NavMenu/index.less +0 -50
  369. package/lib/Ranger/index.less +0 -57
  370. package/lib/SideTip/index.less +0 -180
  371. package/lib/TaskGraph/Graph.d.ts +0 -24
  372. package/lib/TaskGraph/Graph.js +0 -261
  373. package/lib/TaskGraph/graph.less +0 -23
  374. package/lib/TaskGraph/index.d.ts +0 -16
  375. package/lib/TaskGraph/index.js +0 -164
  376. package/lib/TaskGraph/index.less +0 -117
  377. package/lib/TaskGraph/locale/en-US.d.ts +0 -13
  378. package/lib/TaskGraph/locale/zh-CN.d.ts +0 -13
  379. package/lib/TaskGraph/locale/zh-CN.js +0 -36
  380. package/lib/TaskGraph/locale/zh-TW.d.ts +0 -13
  381. package/lib/TaskGraph/locale/zh-TW.js +0 -36
  382. package/lib/TaskGraph/register.d.ts +0 -7
  383. package/lib/TaskGraph/register.js +0 -205
  384. package/lib/Welcome/index.less +0 -185
  385. package/lib/index.less +0 -1
  386. package/lib/variable.less +0 -54
@@ -11,18 +11,22 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
11
11
  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; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { DownOutlined, UpOutlined } from '@oceanbase/icons';
14
- import { Space } from '@oceanbase/design';
14
+ import { ConfigProvider, Space } from '@oceanbase/design';
15
15
  import classnames from 'classnames';
16
16
  import { cloneDeep, isEmpty, isEqual, pullAllWith } from 'lodash';
17
- import React, { useEffect, useMemo, useState } from 'react';
17
+ import React, { useContext, useEffect, useMemo, useState } from 'react';
18
18
  import LocaleWrapper from "../locale/LocaleWrapper";
19
- import "./index.less";
19
+ import useStyle from "./style";
20
20
  import zhCN from "./locale/zh-CN";
21
21
  import { jsx as _jsx } from "react/jsx-runtime";
22
22
  import { jsxs as _jsxs } from "react/jsx-runtime";
23
- var prefix = 'ob-batch-operation-bar';
24
23
  var BatchOperationBar = function BatchOperationBar(props) {
25
24
  var _locale$alertText, _locale$alertText$rep;
25
+ var _useContext = useContext(ConfigProvider.ConfigContext),
26
+ getPrefixCls = _useContext.getPrefixCls;
27
+ var prefixCls = getPrefixCls('batch-operation-bar');
28
+ var _useStyle = useStyle(prefixCls),
29
+ wrapSSR = _useStyle.wrapSSR;
26
30
  var locale = props === null || props === void 0 ? void 0 : props.locale;
27
31
  var title = props.title,
28
32
  _props$open = props.open,
@@ -86,12 +90,12 @@ var BatchOperationBar = function BatchOperationBar(props) {
86
90
  var disPlayBtnRender = function disPlayBtnRender() {
87
91
  if (!showOpenBtn) return null;
88
92
  return /*#__PURE__*/_jsxs("div", {
89
- className: classnames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefix, "-open-btn"), isOpen), "".concat(prefix, "-close-btn"), !isOpen), "".concat(prefix, "-display-btn"), true)),
93
+ className: classnames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-open-btn"), isOpen), "".concat(prefixCls, "-close-btn"), !isOpen), "".concat(prefixCls, "-display-btn"), true)),
90
94
  onClick: function onClick() {
91
95
  return setIsOpen(!isOpen);
92
96
  },
93
97
  children: [/*#__PURE__*/_jsx("span", {
94
- className: classnames(_defineProperty({}, "".concat(prefix, "-display-text"), true)),
98
+ className: classnames(_defineProperty({}, "".concat(prefixCls, "-display-text"), true)),
95
99
  children: isOpen ? hiddenText : openText
96
100
  }), isOpen ? hiddenIcon : openIcon]
97
101
  });
@@ -99,21 +103,21 @@ var BatchOperationBar = function BatchOperationBar(props) {
99
103
  useEffect(function () {
100
104
  if (isEmpty(selectedRows) || !selectedRows) setSelectedData([]);else setSelectedData(selectedRows);
101
105
  }, [selectedRows]);
102
- return /*#__PURE__*/_jsxs("div", {
103
- className: classnames(_defineProperty(_defineProperty({}, className, !!className), prefix, true)),
106
+ return wrapSSR( /*#__PURE__*/_jsxs("div", {
107
+ className: classnames(_defineProperty(_defineProperty({}, className, !!className), prefixCls, true)),
104
108
  style: style,
105
109
  children: [/*#__PURE__*/_jsxs("div", {
106
- className: "".concat(prefix, "-header"),
110
+ className: "".concat(prefixCls, "-header"),
107
111
  children: [/*#__PURE__*/_jsxs(Space, {
108
112
  children: [!!alertRender ? alertRender === null || alertRender === void 0 ? void 0 : alertRender(selectedData) : /*#__PURE__*/_jsxs(Space, {
109
113
  children: [title && /*#__PURE__*/_jsx("span", {
110
- className: "".concat(prefix, "-title"),
114
+ className: "".concat(prefixCls, "-title"),
111
115
  children: title
112
116
  }), /*#__PURE__*/_jsx("span", {
113
117
  children: locale === null || locale === void 0 || (_locale$alertText = locale.alertText) === null || _locale$alertText === void 0 || (_locale$alertText$rep = _locale$alertText.replace) === null || _locale$alertText$rep === void 0 ? void 0 : _locale$alertText$rep.call(_locale$alertText, /\$\{\}/, (selectedData === null || selectedData === void 0 ? void 0 : selectedData.length) || 0)
114
118
  })]
115
119
  }), !!showCancelBtn && /*#__PURE__*/_jsx("span", {
116
- className: classnames(_defineProperty({}, "".concat(prefix, "-cancel"), true)),
120
+ className: classnames(_defineProperty({}, "".concat(prefixCls, "-cancel"), true)),
117
121
  onClick: function onClick() {
118
122
  return cleanSelectedRows();
119
123
  },
@@ -127,14 +131,14 @@ var BatchOperationBar = function BatchOperationBar(props) {
127
131
  })
128
132
  })]
129
133
  }), /*#__PURE__*/_jsx("div", {
130
- className: classnames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefix, "-content"), true), "".concat(prefix, "-content-active"), !!isOpen), "".concat(prefix, "-content-hidden"), !isOpen)),
134
+ className: classnames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-content"), true), "".concat(prefixCls, "-content-active"), !!isOpen), "".concat(prefixCls, "-content-hidden"), !isOpen)),
131
135
  children: typeof content === 'function' ? content === null || content === void 0 ? void 0 : content({
132
136
  selectedRows: selectedData,
133
137
  setSelectedRows: setSelectedRows,
134
138
  cleanSelectedRows: cleanSelectedRows
135
139
  }) : content
136
140
  })]
137
- });
141
+ }));
138
142
  };
139
143
  export default LocaleWrapper({
140
144
  componentName: 'BatchOperationBar',
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ cancelText: string;
3
+ openText: string;
4
+ hiddenText: string;
5
+ alertText: string;
6
+ };
7
+ export default _default;
@@ -0,0 +1,6 @@
1
+ export default {
2
+ cancelText: '選択解除',
3
+ openText: '選択済みを展開',
4
+ hiddenText: '選択済みを折りたたむ',
5
+ alertText: '${} 件を選択しました'
6
+ };
@@ -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 BatchOperationBarToken = OBToken;
5
+ export declare const genBatchOperationBarStyle: GenerateStyle<BatchOperationBarToken>;
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,51 @@
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 genBatchOperationBarStyle = function genBatchOperationBarStyle(token) {
7
+ var componentCls = token.componentCls,
8
+ colorBgBase = token.colorBgBase,
9
+ boxShadowSecondary = token.boxShadowSecondary,
10
+ fontWeightStrong = token.fontWeightStrong;
11
+ return _defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
12
+ position: 'fixed',
13
+ zIndex: 99999,
14
+ display: 'flex',
15
+ flexDirection: 'column',
16
+ width: '100%',
17
+ color: 'rgba(0, 0, 0, 1)',
18
+ backgroundColor: colorBgBase,
19
+ boxShadow: boxShadowSecondary
20
+ }, "".concat(componentCls, "-header"), _defineProperty(_defineProperty(_defineProperty({
21
+ display: 'flex',
22
+ alignItems: 'center',
23
+ justifyContent: 'space-between',
24
+ height: 64,
25
+ margin: '0 24px'
26
+ }, "".concat(componentCls, "-title"), {
27
+ fontWeight: fontWeightStrong
28
+ }), "".concat(componentCls, "-cancel, ").concat(componentCls, "-display-btn"), {
29
+ color: token.colorPrimary,
30
+ cursor: 'pointer'
31
+ }), "".concat(componentCls, "-display-text"), {
32
+ marginRight: 4
33
+ })), "".concat(componentCls, "-content"), {
34
+ maxHeight: 328,
35
+ padding: '0 24px 24px',
36
+ overflow: 'auto'
37
+ }), "".concat(componentCls, "-content-active"), {
38
+ maxHeight: 328,
39
+ transition: 'max-height 0.25s'
40
+ }), "".concat(componentCls, "-content-hidden"), {
41
+ maxHeight: 0,
42
+ padding: 0,
43
+ transition: 'max-height 0.25s'
44
+ }));
45
+ };
46
+ export default (function (prefixCls) {
47
+ var useStyle = genComponentStyleHook('BatchOperationBar', function (token) {
48
+ return [genBatchOperationBarStyle(token)];
49
+ });
50
+ return useStyle(prefixCls);
51
+ });
@@ -7,12 +7,13 @@ 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 { Button } from '@oceanbase/design';
11
- import React, { useMemo } from 'react';
10
+ import { Button, ConfigProvider } from '@oceanbase/design';
11
+ import React, { useContext, useMemo } from 'react';
12
12
  import LocaleWrapper from "../../locale/LocaleWrapper";
13
13
  import { CODE_PRESET } from "../constant";
14
14
  import zhCN from "../locale/zh-CN";
15
15
  import classNames from 'classnames';
16
+ import useStyle from "../style";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
19
  var BoundaryCode = function BoundaryCode(props) {
@@ -25,12 +26,17 @@ var BoundaryCode = function BoundaryCode(props) {
25
26
  locale = props.locale,
26
27
  className = props.className,
27
28
  restProps = _objectWithoutProperties(props, _excluded);
29
+ var _useContext = useContext(ConfigProvider.ConfigContext),
30
+ getPrefixCls = _useContext.getPrefixCls;
31
+ var prefixCls = getPrefixCls('boundary');
32
+ var _useStyle = useStyle(prefixCls),
33
+ wrapSSR = _useStyle.wrapSSR;
28
34
  var info = useMemo(function () {
29
35
  var data = CODE_PRESET(locale);
30
36
  return data[code];
31
37
  }, [code, locale]);
32
- return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
33
- className: classNames('boundary-container', 'boundary-code', "ob-boundary-".concat(code), className)
38
+ return wrapSSR( /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
39
+ className: classNames('boundary-container', 'boundary-code', "".concat(prefixCls, "-").concat(code), className)
34
40
  }, restProps), {}, {
35
41
  children: /*#__PURE__*/_jsxs("div", {
36
42
  className: "empty",
@@ -44,7 +50,7 @@ var BoundaryCode = function BoundaryCode(props) {
44
50
  children: buttonText || info.buttonText
45
51
  })]
46
52
  })
47
- }));
53
+ })));
48
54
  };
49
55
  export var Code = LocaleWrapper({
50
56
  componentName: 'Boundary',
@@ -17,12 +17,13 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
17
17
  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; }
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
19
19
  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); }
20
- import { Alert, Button } from '@oceanbase/design';
21
- import React from 'react';
20
+ import { Alert, Button, ConfigProvider } from '@oceanbase/design';
21
+ import React, { useContext } from 'react';
22
22
  import LocaleWrapper from "../../locale/LocaleWrapper";
23
23
  import { EXCEPTION_PRESET } from "../constant";
24
24
  import zhCN from "../locale/zh-CN";
25
25
  import classNames from 'classnames';
26
+ import useStyle from "../style";
26
27
  import { jsx as _jsx } from "react/jsx-runtime";
27
28
  import { jsxs as _jsxs } from "react/jsx-runtime";
28
29
  var BoundaryException = /*#__PURE__*/function (_React$PureComponent) {
@@ -65,78 +66,9 @@ var BoundaryException = /*#__PURE__*/function (_React$PureComponent) {
65
66
  }, {
66
67
  key: "render",
67
68
  value: function render() {
68
- var _this$state2,
69
- _this2 = this;
70
- var _this$props = this.props,
71
- imageUrl = _this$props.imageUrl,
72
- title = _this$props.title,
73
- buttonText = _this$props.buttonText,
74
- subscription = _this$props.subscription,
75
- isNotCompatible = _this$props.isNotCompatible,
76
- _this$props$showError = _this$props.showError,
77
- showError = _this$props$showError === void 0 ? false : _this$props$showError,
78
- _this$props$hasButton = _this$props.hasButton,
79
- hasButton = _this$props$hasButton === void 0 ? true : _this$props$hasButton,
80
- locale = _this$props.locale,
81
- className = _this$props.className,
82
- restProps = _objectWithoutProperties(_this$props, _excluded);
83
- var errorInfo = EXCEPTION_PRESET(locale).ERROR_BOUNDARY;
84
- var notCompatibleInfo = EXCEPTION_PRESET(locale).INCOMPATIBLE_VERSION;
85
- var _this$state = this.state,
86
- error = _this$state.error,
87
- info = _this$state.info;
88
- var errorDescription = info === null || info === void 0 ? void 0 : info.componentStack;
89
- var errorMessage = (error || '').toString();
90
- if ((_this$state2 = this.state) !== null && _this$state2 !== void 0 && _this$state2.hasError) {
91
- return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
92
- className: classNames('boundary-container', 'ob-boundary-error', className)
93
- }, restProps), {}, {
94
- children: /*#__PURE__*/_jsxs("div", {
95
- className: "empty",
96
- children: [/*#__PURE__*/_jsx("img", {
97
- src: imageUrl || errorInfo.imageUrl
98
- }), /*#__PURE__*/_jsx("h4", {
99
- children: title || errorInfo.title
100
- }), showError ? /*#__PURE__*/_jsx(Alert, {
101
- type: "error",
102
- showIcon: true,
103
- message: errorMessage,
104
- description: errorDescription,
105
- style: {
106
- marginTop: 24,
107
- overflow: 'auto',
108
- maxHeight: '50vh',
109
- // 为了避免被 Empty 的水平居中样式影响,需要设置 textAlign
110
- textAlign: 'left'
111
- }
112
- }) : subscription && /*#__PURE__*/_jsx("span", {
113
- children: subscription
114
- }), hasButton ? /*#__PURE__*/_jsx(Button, {
115
- type: "primary",
116
- onClick: function onClick() {
117
- return _this2.onClick();
118
- },
119
- children: buttonText || errorInfo.buttonText
120
- }) : '']
121
- })
122
- }));
123
- } else if (isNotCompatible) {
124
- return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
125
- className: classNames('boundary-container', 'ob-boundary-browser-not-compatible', className)
126
- }, restProps), {}, {
127
- children: /*#__PURE__*/_jsxs("div", {
128
- className: "empty",
129
- children: [/*#__PURE__*/_jsx("img", {
130
- src: imageUrl || notCompatibleInfo.imageUrl
131
- }), /*#__PURE__*/_jsx("h4", {
132
- children: title || notCompatibleInfo.title
133
- }), /*#__PURE__*/_jsx("span", {
134
- children: subscription ? subscription : notCompatibleInfo.subscription
135
- })]
136
- })
137
- }));
138
- }
139
- return this.props.children;
69
+ return /*#__PURE__*/_jsx(ExceptionWrapper, {
70
+ component: this
71
+ });
140
72
  }
141
73
  }], [{
142
74
  key: "getDerivedStateFromError",
@@ -148,6 +80,85 @@ var BoundaryException = /*#__PURE__*/function (_React$PureComponent) {
148
80
  }]);
149
81
  return BoundaryException;
150
82
  }(React.PureComponent);
83
+ var ExceptionWrapper = function ExceptionWrapper(_ref) {
84
+ var _component$state2;
85
+ var component = _ref.component;
86
+ var _useContext = useContext(ConfigProvider.ConfigContext),
87
+ getPrefixCls = _useContext.getPrefixCls;
88
+ var prefixCls = getPrefixCls('boundary');
89
+ var _useStyle = useStyle(prefixCls),
90
+ wrapSSR = _useStyle.wrapSSR;
91
+ var _component$props = component.props,
92
+ imageUrl = _component$props.imageUrl,
93
+ title = _component$props.title,
94
+ buttonText = _component$props.buttonText,
95
+ subscription = _component$props.subscription,
96
+ isNotCompatible = _component$props.isNotCompatible,
97
+ _component$props$show = _component$props.showError,
98
+ showError = _component$props$show === void 0 ? false : _component$props$show,
99
+ _component$props$hasB = _component$props.hasButton,
100
+ hasButton = _component$props$hasB === void 0 ? true : _component$props$hasB,
101
+ locale = _component$props.locale,
102
+ className = _component$props.className,
103
+ restProps = _objectWithoutProperties(_component$props, _excluded);
104
+ var errorInfo = EXCEPTION_PRESET(locale).ERROR_BOUNDARY;
105
+ var notCompatibleInfo = EXCEPTION_PRESET(locale).INCOMPATIBLE_VERSION;
106
+ var _component$state = component.state,
107
+ error = _component$state.error,
108
+ info = _component$state.info;
109
+ var errorDescription = info === null || info === void 0 ? void 0 : info.componentStack;
110
+ var errorMessage = (error || '').toString();
111
+ if ((_component$state2 = component.state) !== null && _component$state2 !== void 0 && _component$state2.hasError) {
112
+ return wrapSSR( /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
113
+ className: classNames('boundary-container', "".concat(prefixCls, "-error"), className)
114
+ }, restProps), {}, {
115
+ children: /*#__PURE__*/_jsxs("div", {
116
+ className: "empty",
117
+ children: [/*#__PURE__*/_jsx("img", {
118
+ src: imageUrl || errorInfo.imageUrl
119
+ }), /*#__PURE__*/_jsx("h4", {
120
+ children: title || errorInfo.title
121
+ }), showError ? /*#__PURE__*/_jsx(Alert, {
122
+ type: "error",
123
+ showIcon: true,
124
+ message: errorMessage,
125
+ description: errorDescription,
126
+ style: {
127
+ marginTop: 24,
128
+ overflow: 'auto',
129
+ maxHeight: '50vh',
130
+ // 为了避免被 Empty 的水平居中样式影响,需要设置 textAlign
131
+ textAlign: 'left'
132
+ }
133
+ }) : subscription && /*#__PURE__*/_jsx("span", {
134
+ children: subscription
135
+ }), hasButton ? /*#__PURE__*/_jsx(Button, {
136
+ type: "primary",
137
+ onClick: function onClick() {
138
+ return component.onClick();
139
+ },
140
+ children: buttonText || errorInfo.buttonText
141
+ }) : '']
142
+ })
143
+ })));
144
+ } else if (isNotCompatible) {
145
+ return wrapSSR( /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
146
+ className: classNames('boundary-container', "".concat(prefixCls, "-browser-not-compatible"), className)
147
+ }, restProps), {}, {
148
+ children: /*#__PURE__*/_jsxs("div", {
149
+ className: "empty",
150
+ children: [/*#__PURE__*/_jsx("img", {
151
+ src: imageUrl || notCompatibleInfo.imageUrl
152
+ }), /*#__PURE__*/_jsx("h4", {
153
+ children: title || notCompatibleInfo.title
154
+ }), /*#__PURE__*/_jsx("span", {
155
+ children: subscription ? subscription : notCompatibleInfo.subscription
156
+ })]
157
+ })
158
+ })));
159
+ }
160
+ return component.props.children;
161
+ };
151
162
  export var Exception = LocaleWrapper({
152
163
  componentName: 'Boundary',
153
164
  defaultLocale: zhCN
@@ -7,9 +7,10 @@ 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 { Button } from '@oceanbase/design';
11
- import React, { useMemo } from 'react';
10
+ import { Button, ConfigProvider } from '@oceanbase/design';
11
+ import React, { useContext, useMemo } from 'react';
12
12
  import classNames from 'classnames';
13
+ import useStyle from "../style";
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
14
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
16
  export var BoundaryFunction = function BoundaryFunction(props) {
@@ -19,11 +20,16 @@ export var BoundaryFunction = function BoundaryFunction(props) {
19
20
  onClick = props.onClick,
20
21
  className = props.className,
21
22
  restProps = _objectWithoutProperties(props, _excluded);
23
+ var _useContext = useContext(ConfigProvider.ConfigContext),
24
+ getPrefixCls = _useContext.getPrefixCls;
25
+ var prefixCls = getPrefixCls('boundary');
26
+ var _useStyle = useStyle(prefixCls),
27
+ wrapSSR = _useStyle.wrapSSR;
22
28
  var info = useMemo(function () {
23
29
  return state ? config[state] : config[Object.keys(config)[0]];
24
30
  }, [config, state]);
25
- return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
26
- className: classNames('boundary-container', 'ob-boundary-function', className)
31
+ return wrapSSR( /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
32
+ className: classNames('boundary-container', "".concat(prefixCls, "-function"), className)
27
33
  }, restProps), {}, {
28
34
  children: /*#__PURE__*/_jsxs("div", {
29
35
  className: "empty",
@@ -37,5 +43,5 @@ export var BoundaryFunction = function BoundaryFunction(props) {
37
43
  children: info.buttonText
38
44
  })]
39
45
  })
40
- }));
46
+ })));
41
47
  };
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import './index.less';
3
2
  declare const _default: {
4
3
  Code: any;
5
4
  Function: import("react").FC<import("./Components/Function").IBoundaryFunction>;
@@ -1,5 +1,4 @@
1
1
  import { BoundaryFunction, Code, Exception } from "./Components";
2
- import "./index.less";
3
2
  export default {
4
3
  Code: Code,
5
4
  Function: BoundaryFunction,
@@ -4,7 +4,7 @@ export default {
4
4
  noPage: 'This page was not found',
5
5
  normal: 'normal operation',
6
6
  test: 'Click to test crash effect',
7
- collapse: 'The page crashed ~',
7
+ collapse: 'The page crashed',
8
8
  incompatible: 'Incompatible browser version',
9
9
  proposal: 'The browser version is too low. In order to avoid possible security risks, it is recommended to use Chrome browser version 80 or above'
10
10
  };
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ goHome: string;
3
+ noPermission: string;
4
+ noPage: string;
5
+ normal: string;
6
+ test: string;
7
+ collapse: string;
8
+ incompatible: string;
9
+ proposal: string;
10
+ };
11
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export default {
2
+ goHome: 'ホームに戻る',
3
+ noPermission: 'このページへのアクセス権限がありません',
4
+ noPage: 'このページが見つかりません',
5
+ normal: '正常動作',
6
+ test: 'クリックしてクラッシュをテスト',
7
+ collapse: 'ページがクラッシュしました',
8
+ incompatible: 'ブラウザがサポートされていません',
9
+ proposal: 'ブラウザのバージョンが古すぎます。セキュリティリスクを避けるため、Chrome 80以上のご利用をおすすめします'
10
+ };
@@ -4,7 +4,7 @@ export default {
4
4
  noPage: '此页面未找到',
5
5
  normal: '正常运行',
6
6
  test: '点击测试崩溃效果',
7
- collapse: '页面崩溃了~',
7
+ collapse: '页面崩溃了',
8
8
  incompatible: '浏览器版本不兼容',
9
9
  proposal: '浏览器版本过低,为避免可能存在的安全隐患,建议使用Chrome浏览器的80及以上版本'
10
10
  };
@@ -4,7 +4,7 @@ export default {
4
4
  noPage: '此頁面未找到',
5
5
  normal: '正常運行',
6
6
  test: '點擊測試崩潰效果',
7
- collapse: '頁面崩潰了~',
7
+ collapse: '頁面崩潰了',
8
8
  incompatible: '流覽器版本不相容',
9
9
  proposal: '流覽器版本過低,為避免可能存在的安全隱患,建議使用Chrome瀏覽器的80及以上版本'
10
10
  };
@@ -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;