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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Group.d.ts +1 -2
  3. package/es/Action/Group.js +253 -90
  4. package/es/BackgroundTaskManager/index.d.ts +2 -0
  5. package/es/BackgroundTaskManager/index.js +25 -4
  6. package/es/BasicLayout/index.d.ts +3 -1
  7. package/es/BasicLayout/index.js +62 -24
  8. package/es/BasicLayout/locale/en-US.d.ts +3 -0
  9. package/es/BasicLayout/locale/en-US.js +4 -1
  10. package/es/BasicLayout/locale/ja-JP.d.ts +3 -0
  11. package/es/BasicLayout/locale/ja-JP.js +4 -1
  12. package/es/BasicLayout/locale/zh-CN.d.ts +3 -0
  13. package/es/BasicLayout/locale/zh-CN.js +4 -1
  14. package/es/BasicLayout/locale/zh-TW.d.ts +3 -0
  15. package/es/BasicLayout/locale/zh-TW.js +4 -1
  16. package/es/BasicLayout/style/index.js +10 -2
  17. package/es/BatchOperationBar/index.js +15 -4
  18. package/es/BatchOperationBar/locale/en-US.d.ts +1 -0
  19. package/es/BatchOperationBar/locale/en-US.js +2 -1
  20. package/es/BatchOperationBar/locale/ja-JP.d.ts +1 -0
  21. package/es/BatchOperationBar/locale/ja-JP.js +2 -1
  22. package/es/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  23. package/es/BatchOperationBar/locale/zh-CN.js +2 -1
  24. package/es/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  25. package/es/BatchOperationBar/locale/zh-TW.js +2 -1
  26. package/es/BatchOperationBar/style/index.js +6 -1
  27. package/es/DateRanger/Ranger.js +17 -5
  28. package/es/DateRanger/locale/en-US.d.ts +2 -0
  29. package/es/DateRanger/locale/en-US.js +3 -1
  30. package/es/DateRanger/locale/ja-JP.d.ts +2 -0
  31. package/es/DateRanger/locale/ja-JP.js +3 -1
  32. package/es/DateRanger/locale/zh-CN.d.ts +2 -0
  33. package/es/DateRanger/locale/zh-CN.js +3 -1
  34. package/es/DateRanger/locale/zh-TW.d.ts +2 -0
  35. package/es/DateRanger/locale/zh-TW.js +3 -1
  36. package/es/Dialog/index.d.ts +5 -0
  37. package/es/Dialog/index.js +77 -14
  38. package/es/Dialog/locale/en-US.d.ts +5 -0
  39. package/es/Dialog/locale/en-US.js +6 -1
  40. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  41. package/es/Dialog/locale/ja-JP.js +6 -1
  42. package/es/Dialog/locale/zh-CN.d.ts +5 -0
  43. package/es/Dialog/locale/zh-CN.js +6 -1
  44. package/es/Dialog/locale/zh-TW.d.ts +5 -0
  45. package/es/Dialog/locale/zh-TW.js +6 -1
  46. package/es/Dialog/style/index.js +24 -5
  47. package/es/DocDialog/index.js +4 -2
  48. package/es/DocDialog/locale/en-US.d.ts +3 -1
  49. package/es/DocDialog/locale/en-US.js +3 -1
  50. package/es/DocDialog/locale/ja-JP.d.ts +3 -1
  51. package/es/DocDialog/locale/ja-JP.js +3 -1
  52. package/es/DocDialog/locale/zh-CN.d.ts +3 -1
  53. package/es/DocDialog/locale/zh-CN.js +3 -1
  54. package/es/DocDialog/locale/zh-TW.d.ts +3 -1
  55. package/es/DocDialog/locale/zh-TW.js +3 -1
  56. package/es/FooterToolbar/index.d.ts +7 -4
  57. package/es/FooterToolbar/index.js +27 -11
  58. package/es/FooterToolbar/locale/en-US.d.ts +4 -0
  59. package/es/FooterToolbar/locale/en-US.js +3 -0
  60. package/es/FooterToolbar/locale/ja-JP.d.ts +4 -0
  61. package/es/FooterToolbar/locale/ja-JP.js +3 -0
  62. package/es/FooterToolbar/locale/zh-CN.d.ts +4 -0
  63. package/es/FooterToolbar/locale/zh-CN.js +3 -0
  64. package/es/FooterToolbar/locale/zh-TW.d.ts +4 -0
  65. package/es/FooterToolbar/locale/zh-TW.js +3 -0
  66. package/es/FullscreenBox/index.js +18 -10
  67. package/es/FullscreenBox/locale/en-US.d.ts +4 -1
  68. package/es/FullscreenBox/locale/en-US.js +4 -1
  69. package/es/FullscreenBox/locale/ja-JP.d.ts +4 -1
  70. package/es/FullscreenBox/locale/ja-JP.js +4 -1
  71. package/es/FullscreenBox/locale/zh-CN.d.ts +4 -1
  72. package/es/FullscreenBox/locale/zh-CN.js +4 -1
  73. package/es/FullscreenBox/locale/zh-TW.d.ts +4 -1
  74. package/es/FullscreenBox/locale/zh-TW.js +4 -1
  75. package/es/FullscreenBox/style/index.js +32 -11
  76. package/es/Highlight/index.js +9 -2
  77. package/es/Highlight/locale/en-US.d.ts +2 -0
  78. package/es/Highlight/locale/en-US.js +3 -1
  79. package/es/Highlight/locale/ja-JP.d.ts +2 -0
  80. package/es/Highlight/locale/ja-JP.js +3 -1
  81. package/es/Highlight/locale/zh-CN.d.ts +2 -0
  82. package/es/Highlight/locale/zh-CN.js +3 -1
  83. package/es/Highlight/locale/zh-TW.d.ts +2 -0
  84. package/es/Highlight/locale/zh-TW.js +3 -1
  85. package/es/LightFilter/index.d.ts +6 -2
  86. package/es/LightFilter/index.js +24 -8
  87. package/es/LightFilter/locale/en-US.d.ts +4 -0
  88. package/es/LightFilter/locale/en-US.js +3 -0
  89. package/es/LightFilter/locale/ja-JP.d.ts +4 -0
  90. package/es/LightFilter/locale/ja-JP.js +3 -0
  91. package/es/LightFilter/locale/zh-CN.d.ts +4 -0
  92. package/es/LightFilter/locale/zh-CN.js +3 -0
  93. package/es/LightFilter/locale/zh-TW.d.ts +4 -0
  94. package/es/LightFilter/locale/zh-TW.js +3 -0
  95. package/es/NavMenu/index.d.ts +5 -2
  96. package/es/NavMenu/index.js +13 -3
  97. package/es/NavMenu/locale/en-US.d.ts +4 -0
  98. package/es/NavMenu/locale/en-US.js +3 -0
  99. package/es/NavMenu/locale/ja-JP.d.ts +4 -0
  100. package/es/NavMenu/locale/ja-JP.js +3 -0
  101. package/es/NavMenu/locale/zh-CN.d.ts +4 -0
  102. package/es/NavMenu/locale/zh-CN.js +3 -0
  103. package/es/NavMenu/locale/zh-TW.d.ts +4 -0
  104. package/es/NavMenu/locale/zh-TW.js +3 -0
  105. package/es/Password/Content.d.ts +2 -0
  106. package/es/Password/Content.js +11 -3
  107. package/es/Password/index.d.ts +1 -0
  108. package/es/Password/index.js +14 -9
  109. package/es/Password/locale/en-US.d.ts +1 -0
  110. package/es/Password/locale/en-US.js +2 -1
  111. package/es/Password/locale/ja-JP.d.ts +1 -0
  112. package/es/Password/locale/ja-JP.js +1 -0
  113. package/es/Password/locale/zh-CN.d.ts +1 -0
  114. package/es/Password/locale/zh-CN.js +1 -0
  115. package/es/Password/locale/zh-TW.d.ts +1 -0
  116. package/es/Password/locale/zh-TW.js +2 -1
  117. package/es/SideTip/Dragger.js +2 -1
  118. package/es/SideTip/index.js +28 -7
  119. package/es/SideTip/locale/en-US.d.ts +4 -1
  120. package/es/SideTip/locale/en-US.js +4 -1
  121. package/es/SideTip/locale/ja-JP.d.ts +4 -1
  122. package/es/SideTip/locale/ja-JP.js +4 -1
  123. package/es/SideTip/locale/zh-CN.d.ts +4 -1
  124. package/es/SideTip/locale/zh-CN.js +4 -1
  125. package/es/SideTip/locale/zh-TW.d.ts +4 -1
  126. package/es/SideTip/locale/zh-TW.js +4 -1
  127. package/es/SideTip/style/index.js +10 -1
  128. package/es/TagSelect/Group.js +6 -2
  129. package/es/TagSelect/Item.js +2 -1
  130. package/es/assets/logo/oceanbase_logo.svg +45 -29
  131. package/es/assets/logo/oceanbase_logo_dark.svg +45 -29
  132. package/es/assets/logo/oceanbase_watermark.svg +45 -31
  133. package/es/locale/en-US.js +6 -0
  134. package/es/locale/ja-JP.js +6 -0
  135. package/es/locale/zh-CN.js +6 -0
  136. package/es/locale/zh-TW.js +6 -0
  137. package/lib/Action/Group.d.ts +1 -2
  138. package/lib/Action/Group.js +217 -92
  139. package/lib/BackgroundTaskManager/index.d.ts +2 -0
  140. package/lib/BackgroundTaskManager/index.js +23 -4
  141. package/lib/BasicLayout/index.d.ts +3 -1
  142. package/lib/BasicLayout/index.js +51 -17
  143. package/lib/BasicLayout/locale/en-US.d.ts +3 -0
  144. package/lib/BasicLayout/locale/en-US.js +4 -1
  145. package/lib/BasicLayout/locale/ja-JP.d.ts +3 -0
  146. package/lib/BasicLayout/locale/ja-JP.js +4 -1
  147. package/lib/BasicLayout/locale/zh-CN.d.ts +3 -0
  148. package/lib/BasicLayout/locale/zh-CN.js +4 -1
  149. package/lib/BasicLayout/locale/zh-TW.d.ts +3 -0
  150. package/lib/BasicLayout/locale/zh-TW.js +4 -1
  151. package/lib/BasicLayout/style/index.js +9 -0
  152. package/lib/BatchOperationBar/index.js +15 -4
  153. package/lib/BatchOperationBar/locale/en-US.d.ts +1 -0
  154. package/lib/BatchOperationBar/locale/en-US.js +2 -1
  155. package/lib/BatchOperationBar/locale/ja-JP.d.ts +1 -0
  156. package/lib/BatchOperationBar/locale/ja-JP.js +2 -1
  157. package/lib/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  158. package/lib/BatchOperationBar/locale/zh-CN.js +2 -1
  159. package/lib/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  160. package/lib/BatchOperationBar/locale/zh-TW.js +2 -1
  161. package/lib/BatchOperationBar/style/index.js +6 -1
  162. package/lib/DateRanger/Ranger.js +17 -5
  163. package/lib/DateRanger/locale/en-US.d.ts +2 -0
  164. package/lib/DateRanger/locale/en-US.js +2 -0
  165. package/lib/DateRanger/locale/ja-JP.d.ts +2 -0
  166. package/lib/DateRanger/locale/ja-JP.js +2 -0
  167. package/lib/DateRanger/locale/zh-CN.d.ts +2 -0
  168. package/lib/DateRanger/locale/zh-CN.js +2 -0
  169. package/lib/DateRanger/locale/zh-TW.d.ts +2 -0
  170. package/lib/DateRanger/locale/zh-TW.js +2 -0
  171. package/lib/Dialog/index.d.ts +5 -0
  172. package/lib/Dialog/index.js +71 -13
  173. package/lib/Dialog/locale/en-US.d.ts +5 -0
  174. package/lib/Dialog/locale/en-US.js +6 -1
  175. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  176. package/lib/Dialog/locale/ja-JP.js +6 -1
  177. package/lib/Dialog/locale/zh-CN.d.ts +5 -0
  178. package/lib/Dialog/locale/zh-CN.js +6 -1
  179. package/lib/Dialog/locale/zh-TW.d.ts +5 -0
  180. package/lib/Dialog/locale/zh-TW.js +6 -1
  181. package/lib/Dialog/style/index.js +23 -3
  182. package/lib/DocDialog/index.js +4 -2
  183. package/lib/DocDialog/locale/en-US.d.ts +3 -1
  184. package/lib/DocDialog/locale/en-US.js +3 -1
  185. package/lib/DocDialog/locale/ja-JP.d.ts +3 -1
  186. package/lib/DocDialog/locale/ja-JP.js +3 -1
  187. package/lib/DocDialog/locale/zh-CN.d.ts +3 -1
  188. package/lib/DocDialog/locale/zh-CN.js +3 -1
  189. package/lib/DocDialog/locale/zh-TW.d.ts +3 -1
  190. package/lib/DocDialog/locale/zh-TW.js +3 -1
  191. package/lib/FooterToolbar/index.d.ts +7 -4
  192. package/lib/FooterToolbar/index.js +27 -11
  193. package/lib/FooterToolbar/locale/en-US.d.ts +4 -0
  194. package/lib/FooterToolbar/locale/en-US.js +9 -0
  195. package/lib/FooterToolbar/locale/ja-JP.d.ts +4 -0
  196. package/lib/FooterToolbar/locale/ja-JP.js +9 -0
  197. package/lib/FooterToolbar/locale/zh-CN.d.ts +4 -0
  198. package/lib/FooterToolbar/locale/zh-CN.js +9 -0
  199. package/lib/FooterToolbar/locale/zh-TW.d.ts +4 -0
  200. package/lib/FooterToolbar/locale/zh-TW.js +9 -0
  201. package/lib/FullscreenBox/index.js +19 -11
  202. package/lib/FullscreenBox/locale/en-US.d.ts +4 -1
  203. package/lib/FullscreenBox/locale/en-US.js +4 -1
  204. package/lib/FullscreenBox/locale/ja-JP.d.ts +4 -1
  205. package/lib/FullscreenBox/locale/ja-JP.js +4 -1
  206. package/lib/FullscreenBox/locale/zh-CN.d.ts +4 -1
  207. package/lib/FullscreenBox/locale/zh-CN.js +4 -1
  208. package/lib/FullscreenBox/locale/zh-TW.d.ts +4 -1
  209. package/lib/FullscreenBox/locale/zh-TW.js +4 -1
  210. package/lib/FullscreenBox/style/index.js +33 -11
  211. package/lib/Highlight/index.js +9 -2
  212. package/lib/Highlight/locale/en-US.d.ts +2 -0
  213. package/lib/Highlight/locale/en-US.js +3 -1
  214. package/lib/Highlight/locale/ja-JP.d.ts +2 -0
  215. package/lib/Highlight/locale/ja-JP.js +3 -1
  216. package/lib/Highlight/locale/zh-CN.d.ts +2 -0
  217. package/lib/Highlight/locale/zh-CN.js +3 -1
  218. package/lib/Highlight/locale/zh-TW.d.ts +2 -0
  219. package/lib/Highlight/locale/zh-TW.js +3 -1
  220. package/lib/LightFilter/index.d.ts +6 -2
  221. package/lib/LightFilter/index.js +25 -8
  222. package/lib/LightFilter/locale/en-US.d.ts +4 -0
  223. package/lib/LightFilter/locale/en-US.js +9 -0
  224. package/lib/LightFilter/locale/ja-JP.d.ts +4 -0
  225. package/lib/LightFilter/locale/ja-JP.js +9 -0
  226. package/lib/LightFilter/locale/zh-CN.d.ts +4 -0
  227. package/lib/LightFilter/locale/zh-CN.js +9 -0
  228. package/lib/LightFilter/locale/zh-TW.d.ts +4 -0
  229. package/lib/LightFilter/locale/zh-TW.js +9 -0
  230. package/lib/NavMenu/index.d.ts +5 -2
  231. package/lib/NavMenu/index.js +12 -3
  232. package/lib/NavMenu/locale/en-US.d.ts +4 -0
  233. package/lib/NavMenu/locale/en-US.js +9 -0
  234. package/lib/NavMenu/locale/ja-JP.d.ts +4 -0
  235. package/lib/NavMenu/locale/ja-JP.js +9 -0
  236. package/lib/NavMenu/locale/zh-CN.d.ts +4 -0
  237. package/lib/NavMenu/locale/zh-CN.js +9 -0
  238. package/lib/NavMenu/locale/zh-TW.d.ts +4 -0
  239. package/lib/NavMenu/locale/zh-TW.js +9 -0
  240. package/lib/Password/Content.d.ts +2 -0
  241. package/lib/Password/Content.js +11 -3
  242. package/lib/Password/index.d.ts +1 -0
  243. package/lib/Password/index.js +13 -5
  244. package/lib/Password/locale/en-US.d.ts +1 -0
  245. package/lib/Password/locale/en-US.js +2 -1
  246. package/lib/Password/locale/ja-JP.d.ts +1 -0
  247. package/lib/Password/locale/ja-JP.js +1 -0
  248. package/lib/Password/locale/zh-CN.d.ts +1 -0
  249. package/lib/Password/locale/zh-CN.js +1 -0
  250. package/lib/Password/locale/zh-TW.d.ts +1 -0
  251. package/lib/Password/locale/zh-TW.js +2 -1
  252. package/lib/SideTip/Dragger.js +1 -1
  253. package/lib/SideTip/index.js +28 -7
  254. package/lib/SideTip/locale/en-US.d.ts +4 -1
  255. package/lib/SideTip/locale/en-US.js +4 -1
  256. package/lib/SideTip/locale/ja-JP.d.ts +4 -1
  257. package/lib/SideTip/locale/ja-JP.js +4 -1
  258. package/lib/SideTip/locale/zh-CN.d.ts +4 -1
  259. package/lib/SideTip/locale/zh-CN.js +4 -1
  260. package/lib/SideTip/locale/zh-TW.d.ts +4 -1
  261. package/lib/SideTip/locale/zh-TW.js +4 -1
  262. package/lib/SideTip/style/index.js +9 -0
  263. package/lib/TagSelect/Group.js +5 -1
  264. package/lib/TagSelect/Item.js +1 -1
  265. package/lib/assets/logo/oceanbase_logo.svg +45 -29
  266. package/lib/assets/logo/oceanbase_logo_dark.svg +45 -29
  267. package/lib/assets/logo/oceanbase_watermark.svg +45 -31
  268. package/lib/locale/en-US.js +24 -18
  269. package/lib/locale/ja-JP.js +24 -18
  270. package/lib/locale/zh-CN.js +25 -19
  271. package/lib/locale/zh-TW.js +21 -15
  272. package/package.json +4 -4
@@ -28,7 +28,8 @@ const {
28
28
  } = _design.Layout;
29
29
  const {
30
30
  SubMenu,
31
- Item
31
+ Item,
32
+ ItemGroup
32
33
  } = _design.Menu;
33
34
  const BasicLayout = ({
34
35
  children,
@@ -49,6 +50,7 @@ const BasicLayout = ({
49
50
  subSideMenus,
50
51
  className,
51
52
  prefixCls: customizePrefixCls,
53
+ locale,
52
54
  ...restProps
53
55
  }) => {
54
56
  const {
@@ -103,11 +105,15 @@ const BasicLayout = ({
103
105
  let keys = [];
104
106
  (menuList || []).forEach(item => {
105
107
  const itemChildren = item.children || [];
106
- const childrenKeys = itemChildren.map(child => child.link);
107
- if (childrenKeys.includes(selectedKey)) {
108
- keys = [...keys, item.link];
108
+ if (item.type === 'group') {
109
+ keys = [...keys, ...getParentKeys(itemChildren, selectedKey)];
109
110
  } else {
110
- keys = [...keys, getParentKeys(itemChildren, selectedKey)];
111
+ const childrenKeys = itemChildren.map(child => child.link).filter(Boolean);
112
+ if (childrenKeys.includes(selectedKey)) {
113
+ keys = [...keys, item.link];
114
+ } else {
115
+ keys = [...keys, ...getParentKeys(itemChildren, selectedKey)];
116
+ }
111
117
  }
112
118
  });
113
119
  return keys;
@@ -115,13 +121,18 @@ const BasicLayout = ({
115
121
  const getFlatMenuKeys = menuList => {
116
122
  let keys = [];
117
123
  (menuList || []).forEach(item => {
118
- if (item.children) {
119
- keys = keys.concat(getFlatMenuKeys(item.children));
124
+ if (item.type === 'group') {
125
+ keys = keys.concat(getFlatMenuKeys(item.children || []));
126
+ } else {
127
+ if (item.children) {
128
+ keys = keys.concat(getFlatMenuKeys(item.children));
129
+ }
130
+ keys.push(item.link || '');
120
131
  }
121
- keys.push(item.link || '');
122
132
  });
123
133
  return keys;
124
134
  };
135
+ const isCurrentMenuPage = link => !!link && selectedKeys[0] === link;
125
136
 
126
137
  // 渲染菜单中的图标
127
138
  const renderIcon = (item, isSubSider = false) => {
@@ -132,11 +143,16 @@ const BasicLayout = ({
132
143
 
133
144
  // 渲染菜单
134
145
  const renderMenu = data => {
135
- return data.reduce((pre, item) => {
146
+ return data.reduce((pre, item, index) => {
136
147
  const {
137
148
  accessible = true
138
149
  } = item;
139
- if (item.children && ((0, _util.isNullValue)(item.accessible) ?
150
+ if (item.type === 'group' && item.children?.length && accessible) {
151
+ pre.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(ItemGroup, {
152
+ title: item.title,
153
+ children: renderMenu(item.children)
154
+ }, item.title ?? `group-${index}`));
155
+ } else if (item.children && ((0, _util.isNullValue)(item.accessible) ?
140
156
  // 如果子菜单本身没有设置 accessible,但只要其 children 之一可访问,则子菜单仍然展示
141
157
  item.children?.some(({
142
158
  accessible: childAccessible = true
@@ -159,9 +175,10 @@ const BasicLayout = ({
159
175
  }),
160
176
  children: renderMenu(item.children)
161
177
  }, item.link));
162
- } else if (!item.children && accessible) {
178
+ } else if (!item.children && accessible && item.link) {
163
179
  pre.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(Item, {
164
180
  "data-testid": "menu.item",
181
+ "aria-current": isCurrentMenuPage(item.link) ? 'page' : undefined,
165
182
  onClick: () => {
166
183
  if (pathname !== item.link) {
167
184
  navigate?.(item.link);
@@ -197,11 +214,16 @@ const BasicLayout = ({
197
214
 
198
215
  // 渲染收起菜单
199
216
  const renderCollapsedMenu = (data, isSubSider = false) => {
200
- return data.reduce((pre, item) => {
217
+ return data.reduce((pre, item, index) => {
201
218
  const {
202
219
  accessible = true
203
220
  } = item;
204
- if (item.children && ((0, _util.isNullValue)(item.accessible) ?
221
+ if (item.type === 'group' && item.children?.length && accessible) {
222
+ pre.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(ItemGroup, {
223
+ title: item.title,
224
+ children: renderMenu(item.children)
225
+ }, item.title ?? `group-${index}`));
226
+ } else if (item.children && ((0, _util.isNullValue)(item.accessible) ?
205
227
  // 如果子菜单本身没有设置 accessible,但只要其 children 之一可访问,则子菜单仍然展示
206
228
  item.children?.some(({
207
229
  accessible: childAccessible = true
@@ -210,9 +232,10 @@ const BasicLayout = ({
210
232
  title: renderIcon(item, isSubSider),
211
233
  children: renderMenu(item.children)
212
234
  }, item.link));
213
- } else if (!item.children && accessible) {
235
+ } else if (!item.children && accessible && item.link) {
214
236
  pre.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(Item, {
215
237
  "data-testid": "menu.item",
238
+ "aria-current": isCurrentMenuPage(item.link) ? 'page' : undefined,
216
239
  onClick: () => {
217
240
  if (pathname !== item.link) {
218
241
  navigate?.(item.link);
@@ -276,6 +299,8 @@ const BasicLayout = ({
276
299
  [`${prefixCls}-sider-collapsed`]: collapsed,
277
300
  [`${prefixCls}-sider-has-sub-sider`]: subSideMenus
278
301
  }),
302
+ role: "navigation",
303
+ "aria-label": locale?.sideNavigation,
279
304
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
280
305
  className: `${prefixCls}-sider-wrapper`,
281
306
  children: [subSideMenus && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -325,14 +350,20 @@ const BasicLayout = ({
325
350
  })]
326
351
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
327
352
  className: `${prefixCls}-sider-border`,
328
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
353
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
354
+ type: "button",
329
355
  className: `${prefixCls}-sider-collapse`,
356
+ "aria-expanded": !collapsed,
357
+ "aria-label": collapsed ? locale?.expandSider : locale?.collapseSider,
330
358
  onClick: () => {
331
359
  setCollapsed(!collapsed);
332
360
  // 导航展开/收起时,重置 openKeys
333
361
  setOpenKeys([]);
334
362
  },
335
- children: collapsed ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.RightOutlined, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LeftOutlined, {})
363
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
364
+ "aria-hidden": true,
365
+ children: collapsed ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.RightOutlined, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LeftOutlined, {})
366
+ })
336
367
  })
337
368
  })]
338
369
  })]
@@ -342,7 +373,10 @@ const BasicLayout = ({
342
373
  style: {
343
374
  marginLeft: siderWidth
344
375
  },
345
- children: children
376
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("main", {
377
+ className: `${prefixCls}-content-main`,
378
+ children: children
379
+ })
346
380
  })]
347
381
  })
348
382
  })]
@@ -9,5 +9,8 @@ declare const _default: {
9
9
  releaseTime: string;
10
10
  company: string;
11
11
  right: string;
12
+ expandSider: string;
13
+ collapseSider: string;
14
+ sideNavigation: string;
12
15
  };
13
16
  export default _default;
@@ -14,5 +14,8 @@ var _default = exports.default = {
14
14
  version: 'Version',
15
15
  releaseTime: 'Release date',
16
16
  company: 'Beijing OceanBase Technology Co., Ltd.',
17
- right: 'All Rights Reserved'
17
+ right: 'All Rights Reserved',
18
+ expandSider: 'Expand main navigation',
19
+ collapseSider: 'Collapse main navigation',
20
+ sideNavigation: 'Main navigation'
18
21
  };
@@ -9,5 +9,8 @@ declare const _default: {
9
9
  releaseTime: string;
10
10
  company: string;
11
11
  right: string;
12
+ expandSider: string;
13
+ collapseSider: string;
14
+ sideNavigation: string;
12
15
  };
13
16
  export default _default;
@@ -14,5 +14,8 @@ var _default = exports.default = {
14
14
  version: 'バージョン',
15
15
  releaseTime: 'リリース日',
16
16
  company: 'Beijing OceanBase Technology Co., Ltd.',
17
- right: 'All Rights Reserved'
17
+ right: 'All Rights Reserved',
18
+ expandSider: 'メインナビを展開',
19
+ collapseSider: 'メインナビを折りたたむ',
20
+ sideNavigation: 'メインナビゲーション'
18
21
  };
@@ -9,5 +9,8 @@ declare const _default: {
9
9
  releaseTime: string;
10
10
  company: string;
11
11
  right: string;
12
+ expandSider: string;
13
+ collapseSider: string;
14
+ sideNavigation: string;
12
15
  };
13
16
  export default _default;
@@ -14,5 +14,8 @@ var _default = exports.default = {
14
14
  version: '版本号',
15
15
  releaseTime: '发布日期',
16
16
  company: '北京奥星贝斯科技有限公司',
17
- right: '版权所有'
17
+ right: '版权所有',
18
+ expandSider: '展开主导航',
19
+ collapseSider: '收起主导航',
20
+ sideNavigation: '主导航'
18
21
  };
@@ -9,5 +9,8 @@ declare const _default: {
9
9
  releaseTime: string;
10
10
  company: string;
11
11
  right: string;
12
+ expandSider: string;
13
+ collapseSider: string;
14
+ sideNavigation: string;
12
15
  };
13
16
  export default _default;
@@ -14,5 +14,8 @@ var _default = exports.default = {
14
14
  version: '版本號',
15
15
  releaseTime: '發佈日期',
16
16
  company: '北京奧星貝斯科技有限公司',
17
- right: '版權所有'
17
+ right: '版權所有',
18
+ expandSider: '展開主導航',
19
+ collapseSider: '收起主導航',
20
+ sideNavigation: '主導航'
18
21
  };
@@ -125,6 +125,11 @@ const genBasicLayoutStyle = token => {
125
125
  borderRadius: '10px',
126
126
  cursor: 'pointer',
127
127
  opacity: 0,
128
+ font: 'inherit',
129
+ padding: 0,
130
+ margin: 0,
131
+ appearance: 'none',
132
+ WebkitAppearance: 'none',
128
133
  // 设置展开/收起按钮中的图标大小
129
134
  [iconCls]: {
130
135
  fontSize: 'px',
@@ -351,6 +356,10 @@ const genBasicLayoutStyle = token => {
351
356
  [`${componentCls}-content`]: {
352
357
  backgroundColor: colorBgLayout,
353
358
  transition: 'all 0.3s'
359
+ },
360
+ [`${componentCls}-content-main`]: {
361
+ display: 'block',
362
+ minHeight: '100%'
354
363
  }
355
364
  }
356
365
  },
@@ -73,19 +73,25 @@ const BatchOperationBar = props => {
73
73
  };
74
74
  const disPlayBtnRender = () => {
75
75
  if (!showOpenBtn) return null;
76
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
76
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
77
+ type: "button",
77
78
  className: (0, _classnames.default)({
78
79
  [`${prefixCls}-open-btn`]: isOpen,
79
80
  [`${prefixCls}-close-btn`]: !isOpen,
80
81
  [`${prefixCls}-display-btn`]: true
81
82
  }),
83
+ "aria-expanded": isOpen,
84
+ "aria-label": isOpen ? String(hiddenText) : String(openText),
82
85
  onClick: () => setIsOpen(!isOpen),
83
86
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
84
87
  className: (0, _classnames.default)({
85
88
  [`${prefixCls}-display-text`]: true
86
89
  }),
87
90
  children: isOpen ? hiddenText : openText
88
- }), isOpen ? hiddenIcon : openIcon]
91
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
92
+ "aria-hidden": true,
93
+ children: isOpen ? hiddenIcon : openIcon
94
+ })]
89
95
  });
90
96
  };
91
97
  (0, _react.useEffect)(() => {
@@ -97,6 +103,8 @@ const BatchOperationBar = props => {
97
103
  [prefixCls]: true
98
104
  }),
99
105
  style: style,
106
+ role: "toolbar",
107
+ "aria-label": typeof locale?.toolbarLabel === 'string' ? locale.toolbarLabel : undefined,
100
108
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
101
109
  className: `${prefixCls}-header`,
102
110
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_design.Space, {
@@ -105,9 +113,12 @@ const BatchOperationBar = props => {
105
113
  className: `${prefixCls}-title`,
106
114
  children: title
107
115
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
108
- children: locale?.alertText?.replace?.(/\$\{\}/, selectedData?.length || 0)
116
+ "aria-live": "polite",
117
+ "aria-atomic": "true",
118
+ children: locale?.alertText?.replace?.(/\$\{\}/, String(selectedData?.length || 0))
109
119
  })]
110
- }), !!showCancelBtn && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
120
+ }), !!showCancelBtn && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
121
+ type: "button",
111
122
  className: (0, _classnames.default)({
112
123
  [`${prefixCls}-cancel`]: true
113
124
  }),
@@ -3,5 +3,6 @@ declare const _default: {
3
3
  openText: string;
4
4
  hiddenText: string;
5
5
  alertText: string;
6
+ toolbarLabel: string;
6
7
  };
7
8
  export default _default;
@@ -8,5 +8,6 @@ var _default = exports.default = {
8
8
  cancelText: 'Deselect',
9
9
  openText: 'Expand Selected',
10
10
  hiddenText: 'Collapse Selected',
11
- alertText: '${} items selected'
11
+ alertText: '${} items selected',
12
+ toolbarLabel: 'Batch actions'
12
13
  };
@@ -3,5 +3,6 @@ declare const _default: {
3
3
  openText: string;
4
4
  hiddenText: string;
5
5
  alertText: string;
6
+ toolbarLabel: string;
6
7
  };
7
8
  export default _default;
@@ -8,5 +8,6 @@ var _default = exports.default = {
8
8
  cancelText: '選択解除',
9
9
  openText: '選択済みを展開',
10
10
  hiddenText: '選択済みを折りたたむ',
11
- alertText: '${} 件を選択しました'
11
+ alertText: '${} 件を選択しました',
12
+ toolbarLabel: '一括操作'
12
13
  };
@@ -3,5 +3,6 @@ declare const _default: {
3
3
  openText: string;
4
4
  hiddenText: string;
5
5
  alertText: string;
6
+ toolbarLabel: string;
6
7
  };
7
8
  export default _default;
@@ -8,5 +8,6 @@ var _default = exports.default = {
8
8
  cancelText: '取消选择',
9
9
  openText: '展开已选',
10
10
  hiddenText: '收起已选',
11
- alertText: '已选择 ${} 项'
11
+ alertText: '已选择 ${} 项',
12
+ toolbarLabel: '批量操作'
12
13
  };
@@ -3,5 +3,6 @@ declare const _default: {
3
3
  openText: string;
4
4
  hiddenText: string;
5
5
  alertText: string;
6
+ toolbarLabel: string;
6
7
  };
7
8
  export default _default;
@@ -8,5 +8,6 @@ var _default = exports.default = {
8
8
  cancelText: '取消選擇',
9
9
  openText: '展開選擇',
10
10
  hiddenText: '收起已選',
11
- alertText: '已選擇 ${} 項'
11
+ alertText: '已選擇 ${} 項',
12
+ toolbarLabel: '批次操作'
12
13
  };
@@ -33,7 +33,12 @@ const genBatchOperationBarStyle = token => {
33
33
  },
34
34
  [`${componentCls}-cancel, ${componentCls}-display-btn`]: {
35
35
  color: token.colorPrimary,
36
- cursor: 'pointer'
36
+ cursor: 'pointer',
37
+ border: 'none',
38
+ background: 'transparent',
39
+ padding: 0,
40
+ font: 'inherit',
41
+ textAlign: 'inherit'
37
42
  },
38
43
  [`${componentCls}-display-text`]: {
39
44
  marginRight: 4
@@ -493,7 +493,7 @@ const Ranger = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
493
493
  ...(0, _lodash.omit)(rest, 'value', 'onChange', 'style', 'className', 'onClick', 'disabled', 'format')
494
494
  })
495
495
  })]
496
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_design.Radio.Group, {
496
+ }), (hasRewind || hasForward) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_design.Radio.Group, {
497
497
  value: isPlay ? 'play' : '',
498
498
  className: `${prefix}-playback-control`,
499
499
  buttonStyle: "solid",
@@ -502,6 +502,7 @@ const Ranger = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
502
502
  getPopupContainer: trigger => trigger.parentNode,
503
503
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_design.Radio.Button, {
504
504
  value: "stepBack",
505
+ "aria-label": locale.jumpBack,
505
506
  style: {
506
507
  paddingInline: 8,
507
508
  borderInlineStart: 0,
@@ -520,13 +521,16 @@ const Ranger = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
520
521
  rangeChange([newStartTime, newEndTime]);
521
522
  }
522
523
  },
523
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LeftOutlined, {})
524
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LeftOutlined, {
525
+ "aria-hidden": true
526
+ })
524
527
  })
525
528
  }), hasForward && /*#__PURE__*/(0, _jsxRuntime.jsx)(_design.Tooltip, {
526
529
  title: locale.jumpForward,
527
530
  getPopupContainer: trigger => trigger.parentNode,
528
531
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_design.Radio.Button, {
529
532
  value: "stepForward",
533
+ "aria-label": locale.jumpForward,
530
534
  style: {
531
535
  paddingInline: 8,
532
536
  borderTopLeftRadius: 0,
@@ -546,11 +550,14 @@ const Ranger = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
546
550
  }
547
551
  }
548
552
  },
549
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.RightOutlined, {})
553
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.RightOutlined, {
554
+ "aria-hidden": true
555
+ })
550
556
  })
551
557
  })]
552
558
  })]
553
559
  }), hasSync && rangeName !== _constant.CUSTOMIZE && /*#__PURE__*/(0, _jsxRuntime.jsx)(_design.Button, {
560
+ "aria-label": locale.syncToCurrent,
554
561
  style: {
555
562
  paddingInline: 8,
556
563
  color: token.colorTextSecondary
@@ -558,8 +565,11 @@ const Ranger = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
558
565
  onClick: () => {
559
566
  setNow();
560
567
  },
561
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SyncOutlined, {})
568
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SyncOutlined, {
569
+ "aria-hidden": true
570
+ })
562
571
  }), hasZoomOut && /*#__PURE__*/(0, _jsxRuntime.jsx)(_design.Button, {
572
+ "aria-label": locale.zoomOutRange,
563
573
  disabled: !nextRangeItem,
564
574
  style: {
565
575
  color: token.colorTextSecondary
@@ -572,7 +582,9 @@ const Ranger = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
572
582
  return;
573
583
  }
574
584
  },
575
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ZoomOutOutlined, {})
585
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ZoomOutOutlined, {
586
+ "aria-hidden": true
587
+ })
576
588
  })]
577
589
  }));
578
590
  });
@@ -52,5 +52,7 @@ declare const _default: {
52
52
  current: string;
53
53
  jumpBack: string;
54
54
  jumpForward: string;
55
+ syncToCurrent: string;
56
+ zoomOutRange: string;
55
57
  };
56
58
  export default _default;
@@ -18,5 +18,7 @@ var _default = exports.default = {
18
18
  current: 'Current',
19
19
  jumpBack: 'Previous Interval',
20
20
  jumpForward: 'Next Interval',
21
+ syncToCurrent: 'Sync to current time',
22
+ zoomOutRange: 'Expand time range',
21
23
  ..._en_US.default
22
24
  };
@@ -52,5 +52,7 @@ declare const _default: {
52
52
  current: string;
53
53
  jumpBack: string;
54
54
  jumpForward: string;
55
+ syncToCurrent: string;
56
+ zoomOutRange: string;
55
57
  };
56
58
  export default _default;
@@ -18,5 +18,7 @@ var _default = exports.default = {
18
18
  current: '現在',
19
19
  jumpBack: '前の期間へ',
20
20
  jumpForward: '次の期間へ',
21
+ syncToCurrent: '現在時刻に同期',
22
+ zoomOutRange: '時間範囲を拡大',
21
23
  ..._ja_JP.default
22
24
  };
@@ -52,5 +52,7 @@ declare const _default: {
52
52
  current: string;
53
53
  jumpBack: string;
54
54
  jumpForward: string;
55
+ syncToCurrent: string;
56
+ zoomOutRange: string;
55
57
  };
56
58
  export default _default;
@@ -18,5 +18,7 @@ var _default = exports.default = {
18
18
  current: '当前',
19
19
  jumpBack: '向前跳转一个时间区间',
20
20
  jumpForward: '向后跳转一个时间区间',
21
+ syncToCurrent: '同步到当前时间',
22
+ zoomOutRange: '放大时间范围',
21
23
  ..._zh_CN.default
22
24
  };
@@ -52,5 +52,7 @@ declare const _default: {
52
52
  current: string;
53
53
  jumpBack: string;
54
54
  jumpForward: string;
55
+ syncToCurrent: string;
56
+ zoomOutRange: string;
55
57
  };
56
58
  export default _default;
@@ -18,5 +18,7 @@ var _default = exports.default = {
18
18
  current: '當前',
19
19
  jumpBack: '向前跳轉一個時間區間',
20
20
  jumpForward: '向後跳轉一個時間區間',
21
+ syncToCurrent: '同步到當前時間',
22
+ zoomOutRange: '放大時間範圍',
21
23
  ..._zh_TW.default
22
24
  };
@@ -3,6 +3,11 @@ import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
3
  export interface DialogLocale {
4
4
  helpDocument: string;
5
5
  openHelpCenter: string;
6
+ closeDialog: string;
7
+ minimize: string;
8
+ restoreWindow: string;
9
+ maximize: string;
10
+ exitFullscreen: string;
6
11
  }
7
12
  export interface DialogExtLink {
8
13
  text?: string;