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

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 (159) hide show
  1. package/dist/ui.min.css +1 -1
  2. package/dist/ui.min.js +1 -1
  3. package/es/Action/Group.js +121 -15
  4. package/es/Action/style/index.d.ts +2 -2
  5. package/es/Action/style/index.js +8 -4
  6. package/es/BasicLayout/locale/ja-JP.d.ts +13 -0
  7. package/es/BasicLayout/locale/ja-JP.js +12 -0
  8. package/es/BasicLayout/style/index.js +5 -5
  9. package/es/BatchOperationBar/index.less +1 -1
  10. package/es/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  11. package/es/BatchOperationBar/locale/ja-JP.js +6 -0
  12. package/es/Boundary/locale/ja-JP.d.ts +11 -0
  13. package/es/Boundary/locale/ja-JP.js +10 -0
  14. package/es/DateRanger/locale/ja-JP.d.ts +56 -0
  15. package/es/DateRanger/locale/ja-JP.js +20 -0
  16. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  17. package/es/Dialog/locale/ja-JP.js +4 -0
  18. package/es/DocDialog/locale/ja-JP.d.ts +2 -0
  19. package/es/DocDialog/locale/ja-JP.js +1 -0
  20. package/es/FooterToolbar/style/index.d.ts +0 -2
  21. package/es/FooterToolbar/style/index.js +7 -13
  22. package/es/FullscreenBox/index.less +3 -1
  23. package/es/FullscreenBox/locale/ja-JP.d.ts +2 -0
  24. package/es/FullscreenBox/locale/ja-JP.js +1 -0
  25. package/es/GraphToolbar/locale/ja-JP.d.ts +9 -0
  26. package/es/GraphToolbar/locale/ja-JP.js +8 -0
  27. package/es/Highlight/index.d.ts +1 -1
  28. package/es/Highlight/index.less +2 -2
  29. package/es/Highlight/locale/ja-JP.d.ts +4 -0
  30. package/es/Highlight/locale/ja-JP.js +3 -0
  31. package/es/LocaleDropdown/index.js +4 -2
  32. package/es/Login/index.less +2 -2
  33. package/es/Login/locale/ja-JP.d.ts +28 -0
  34. package/es/Login/locale/ja-JP.js +27 -0
  35. package/es/PageContainer/locale/ja-JP.d.ts +4 -0
  36. package/es/PageContainer/locale/ja-JP.js +3 -0
  37. package/es/PageContainer/style/index.js +5 -5
  38. package/es/Password/locale/ja-JP.d.ts +13 -0
  39. package/es/Password/locale/ja-JP.js +12 -0
  40. package/es/ProCard/style/index.d.ts +2 -2
  41. package/es/ProCard/style/index.js +3 -2
  42. package/es/ProTable/style/index.d.ts +2 -2
  43. package/es/ProTable/style/index.js +6 -5
  44. package/es/Ranger/locale/ja-JP.d.ts +28 -0
  45. package/es/Ranger/locale/ja-JP.js +29 -0
  46. package/es/SideTip/locale/ja-JP.d.ts +2 -0
  47. package/es/SideTip/locale/ja-JP.js +1 -0
  48. package/es/TaskGraph/index.less +1 -1
  49. package/es/TaskGraph/locale/ja-JP.d.ts +13 -0
  50. package/es/TaskGraph/locale/ja-JP.js +12 -0
  51. package/es/Welcome/locale/ja-JP.d.ts +5 -0
  52. package/es/Welcome/locale/ja-JP.js +4 -0
  53. package/es/locale/ja-JP.d.ts +3 -0
  54. package/es/locale/ja-JP.js +42 -0
  55. package/lib/Action/Group.js +122 -46
  56. package/lib/Action/Item.js +14 -9
  57. package/lib/Action/style/index.d.ts +2 -2
  58. package/lib/Action/style/index.js +16 -1
  59. package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
  60. package/lib/BackgroundTaskManager/index.js +3 -12
  61. package/lib/BasicLayout/Header.js +120 -62
  62. package/lib/BasicLayout/index.js +166 -143
  63. package/lib/BasicLayout/locale/ja-JP.d.ts +13 -0
  64. package/lib/BasicLayout/locale/ja-JP.js +36 -0
  65. package/lib/BasicLayout/style/index.js +5 -5
  66. package/lib/BatchOperationBar/index.js +59 -44
  67. package/lib/BatchOperationBar/index.less +1 -1
  68. package/lib/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  69. package/lib/BatchOperationBar/locale/ja-JP.js +30 -0
  70. package/lib/Boundary/Components/Code.js +11 -5
  71. package/lib/Boundary/Components/Exception.js +33 -23
  72. package/lib/Boundary/Components/Function.js +11 -5
  73. package/lib/Boundary/locale/ja-JP.d.ts +11 -0
  74. package/lib/Boundary/locale/ja-JP.js +34 -0
  75. package/lib/ContentWithIcon/index.js +30 -22
  76. package/lib/ContentWithQuestion/index.js +8 -3
  77. package/lib/DateRanger/PickerPanel.js +235 -217
  78. package/lib/DateRanger/Ranger.js +349 -313
  79. package/lib/DateRanger/locale/ja-JP.d.ts +56 -0
  80. package/lib/DateRanger/locale/ja-JP.js +49 -0
  81. package/lib/Dialog/Anchor.js +8 -5
  82. package/lib/Dialog/EventProxy.js +3 -12
  83. package/lib/Dialog/index.js +132 -108
  84. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  85. package/lib/Dialog/locale/ja-JP.js +28 -0
  86. package/lib/DocDialog/index.js +3 -2
  87. package/lib/DocDialog/locale/ja-JP.d.ts +2 -0
  88. package/lib/DocDialog/locale/ja-JP.js +25 -0
  89. package/lib/FooterToolbar/index.js +3 -2
  90. package/lib/FooterToolbar/style/index.d.ts +0 -2
  91. package/lib/FooterToolbar/style/index.js +7 -18
  92. package/lib/FullscreenBox/index.js +16 -7
  93. package/lib/FullscreenBox/index.less +3 -1
  94. package/lib/FullscreenBox/locale/ja-JP.d.ts +2 -0
  95. package/lib/FullscreenBox/locale/ja-JP.js +25 -0
  96. package/lib/GraphToolbar/index.js +70 -58
  97. package/lib/GraphToolbar/locale/ja-JP.d.ts +9 -0
  98. package/lib/GraphToolbar/locale/ja-JP.js +32 -0
  99. package/lib/Highlight/DiffView/DiffCells.js +17 -10
  100. package/lib/Highlight/DiffView/index.js +35 -31
  101. package/lib/Highlight/HighlightCell.js +13 -10
  102. package/lib/Highlight/JsonView.js +15 -14
  103. package/lib/Highlight/index.d.ts +1 -1
  104. package/lib/Highlight/index.js +50 -45
  105. package/lib/Highlight/index.less +2 -2
  106. package/lib/Highlight/locale/ja-JP.d.ts +4 -0
  107. package/lib/Highlight/locale/ja-JP.js +27 -0
  108. package/lib/IconFont/index.js +2 -12
  109. package/lib/LightFilter/index.js +3 -2
  110. package/lib/LocaleDropdown/index.js +15 -21
  111. package/lib/Login/ActivateForm.js +53 -60
  112. package/lib/Login/LoginForm.js +118 -109
  113. package/lib/Login/RegisterForm.js +79 -86
  114. package/lib/Login/index.js +92 -64
  115. package/lib/Login/index.less +2 -2
  116. package/lib/Login/locale/ja-JP.d.ts +28 -0
  117. package/lib/Login/locale/ja-JP.js +51 -0
  118. package/lib/NavMenu/index.js +9 -8
  119. package/lib/PageContainer/ItemRender.js +5 -5
  120. package/lib/PageContainer/index.js +9 -5
  121. package/lib/PageContainer/locale/ja-JP.d.ts +4 -0
  122. package/lib/PageContainer/locale/ja-JP.js +27 -0
  123. package/lib/PageContainer/style/index.js +5 -5
  124. package/lib/PageLoading/index.js +6 -16
  125. package/lib/Password/Content.js +38 -42
  126. package/lib/Password/index.js +83 -68
  127. package/lib/Password/locale/ja-JP.d.ts +13 -0
  128. package/lib/Password/locale/ja-JP.js +36 -0
  129. package/lib/ProCard/index.js +5 -4
  130. package/lib/ProCard/style/index.d.ts +2 -2
  131. package/lib/ProCard/style/index.js +3 -2
  132. package/lib/ProTable/index.js +5 -4
  133. package/lib/ProTable/style/index.d.ts +2 -2
  134. package/lib/ProTable/style/index.js +6 -7
  135. package/lib/Ranger/QuickPicker.js +24 -15
  136. package/lib/Ranger/Ranger.js +37 -34
  137. package/lib/Ranger/locale/ja-JP.d.ts +28 -0
  138. package/lib/Ranger/locale/ja-JP.js +53 -0
  139. package/lib/SideTip/Dragger.js +5 -4
  140. package/lib/SideTip/IconLoading.js +25 -25
  141. package/lib/SideTip/index.js +19 -10
  142. package/lib/SideTip/locale/ja-JP.d.ts +2 -0
  143. package/lib/SideTip/locale/ja-JP.js +25 -0
  144. package/lib/TagSelect/Group.js +9 -5
  145. package/lib/TagSelect/Item.js +22 -18
  146. package/lib/TaskGraph/Graph.js +29 -24
  147. package/lib/TaskGraph/index.js +56 -50
  148. package/lib/TaskGraph/index.less +1 -1
  149. package/lib/TaskGraph/locale/ja-JP.d.ts +13 -0
  150. package/lib/TaskGraph/locale/ja-JP.js +36 -0
  151. package/lib/TreeSearch/index.js +30 -35
  152. package/lib/Welcome/index.js +64 -37
  153. package/lib/Welcome/locale/ja-JP.d.ts +5 -0
  154. package/lib/Welcome/locale/ja-JP.js +28 -0
  155. package/lib/Welcome/step.js +11 -4
  156. package/lib/locale/LocaleWrapper.js +15 -14
  157. package/lib/locale/ja-JP.d.ts +3 -0
  158. package/lib/locale/ja-JP.js +71 -0
  159. package/package.json +5 -5
@@ -0,0 +1,27 @@
1
+ export default {
2
+ usernamePlaceholder: 'アカウントを入力してください',
3
+ usernameMessage: 'アカウントを入力してください',
4
+ passwordPlaceholder: 'パスワードを入力してください',
5
+ passwordMessage: 'パスワードを入力してください',
6
+ loginText: 'ログイン',
7
+ otherLoginText: 'サードパーティログイン',
8
+ isLoadingWarn: '実行中',
9
+ usernameLabel: 'ユーザー名',
10
+ switchLoginLabel: '既存アカウントでログイン',
11
+ switchRegisterLabel: 'アカウント登録',
12
+ userExistMessage: 'ユーザー名は既に存在します',
13
+ usernameFormatMessage: 'ユーザー名の形式が要件を満たしていません',
14
+ samePasswordMessage: '確認パスワードが一致しません',
15
+ usernameHelp: '英字、数字、アンダースコア、特殊文字 (._+@#$%) をサポート、長さ 4~48 文字',
16
+ usernameLengthMessage: 'ユーザー名の長さは 4~48 文字',
17
+ passwordLabel: 'パスワード',
18
+ passwordHelp: '少なくとも 2 桁の数字、2 文字の大文字、2 文字の小文字、2 文字の特殊文字 (._+@#$%) を含み、長さ 8~32 文字',
19
+ confirmPwdLabel: 'パスワード確認',
20
+ confirmPwdMessage: 'パスワードを再度入力してください',
21
+ registerBtn: '今すぐ登録',
22
+ registerTitle: 'アカウント登録',
23
+ activeTitle: 'パスワードを設定してアカウントを有効化',
24
+ activeTitleDescrition: 'アカウントのセキュリティのため、パスワードを設定してアカウントを有効化する必要があります',
25
+ activeSubmitBtn: '有効化',
26
+ activeBackBtn: '前のステップに戻る'
27
+ };
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ reload: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export default {
2
+ reload: '更新'
3
+ };
@@ -22,9 +22,9 @@ export var genPageContainerStyle = function genPageContainerStyle(token) {
22
22
  minHeight: 'auto'
23
23
  }), "".concat(componentCls, "-warp-page-header,").concat(componentCls, "-wrap-page-header"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
24
24
  // 减小内容区左右两侧间距
25
- paddingInlineStart: "".concat(paddingLG, "px !important"),
26
- paddingInlineEnd: "".concat(paddingLG, "px !important"),
27
- paddingBlockStart: "".concat(padding, "px !important"),
25
+ paddingInlineStart: "".concat(token.paddingXL, "px !important"),
26
+ paddingInlineEnd: "".concat(token.paddingXL, "px !important"),
27
+ paddingBlockStart: "".concat(paddingLG, "px !important"),
28
28
  paddingBlockEnd: "".concat(padding, "px !important")
29
29
  }, "".concat(antCls, "-page-header-breadcrumb"), {
30
30
  // overwritten pro-components style
@@ -45,9 +45,9 @@ export var genPageContainerStyle = function genPageContainerStyle(token) {
45
45
  }), "".concat(antCls, "-page-header-footer"), {
46
46
  marginBlockStart: 0
47
47
  })), "".concat(componentCls, "-children-container"), _defineProperty({
48
- paddingInline: paddingLG,
48
+ paddingInline: token.paddingXL,
49
49
  paddingBlockStart: 0,
50
- paddingBlockEnd: paddingLG
50
+ paddingBlockEnd: padding
51
51
  }, "& > ".concat(antCls, "-tabs-top:not(").concat(antCls, "-tabs-card):first-child"), {
52
52
  // equal to page header paddingBlockEnd
53
53
  marginTop: -padding
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ lengthRuleMessage: string;
3
+ charRuleMessage: string;
4
+ strengthRuleMessage: string;
5
+ placeholder: string;
6
+ generatePlaceholder: string;
7
+ randomlyGenerate: string;
8
+ pleaseRememberYourPassword: string;
9
+ copySuccessfully: string;
10
+ copyPassword: string;
11
+ andKeepItProperly: string;
12
+ };
13
+ export default _default;
@@ -0,0 +1,12 @@
1
+ export default {
2
+ lengthRuleMessage: '長さは 8~32 文字',
3
+ charRuleMessage: '英字、数字、特殊文字(~!@#%^&*_-+=|(){}[]:;,.?/`$"<>\\)のみを含むことができます',
4
+ strengthRuleMessage: '大文字、小文字、数字、特殊文字をそれぞれ少なくとも 2 文字含む必要があります',
5
+ placeholder: 'パスワードを入力してください',
6
+ generatePlaceholder: '入力するかランダム生成',
7
+ randomlyGenerate: 'ランダム生成',
8
+ pleaseRememberYourPassword: 'パスワードを覚えて適切に保存してください',
9
+ copySuccessfully: 'コピー成功',
10
+ copyPassword: 'パスワードをコピー',
11
+ andKeepItProperly: '適切に保存'
12
+ };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import type { GenerateStyle } from '@oceanbase/design/es/theme';
2
+ import type { CSSObject } from '@ant-design/cssinjs';
3
3
  import type { OBToken } from '../../_util/genComponentStyleHook';
4
- export declare const genProCardStyle: GenerateStyle<OBToken>;
4
+ export declare const genProCardStyle: (token: OBToken, outerComponentCls?: string) => CSSObject;
5
5
  declare const _default: (prefixCls: string) => {
6
6
  wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
7
  hashId: string;
@@ -6,10 +6,11 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  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); }
7
7
  import { Card, Tabs } from '@oceanbase/design';
8
8
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
9
- export var genProCardStyle = function genProCardStyle(token) {
10
- var componentCls = token.componentCls,
9
+ export var genProCardStyle = function genProCardStyle(token, outerComponentCls) {
10
+ var innerComponentCls = token.componentCls,
11
11
  antCls = token.antCls,
12
12
  prefixCls = token.prefixCls;
13
+ var componentCls = outerComponentCls || innerComponentCls;
13
14
  var tableComponentCls = "".concat(antCls, "-table");
14
15
  var tabsComponentCls = "".concat(antCls, "-tabs");
15
16
  var tabsPrefixCls = "".concat(prefixCls, "-tabs");
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import type { GenerateStyle } from '@oceanbase/design/es/theme';
2
+ import type { CSSObject } from '@ant-design/cssinjs';
3
3
  import type { OBToken } from '../../_util/genComponentStyleHook';
4
- export declare const genProTableStyle: GenerateStyle<OBToken>;
4
+ export declare const genProTableStyle: (token: OBToken) => CSSObject;
5
5
  declare const _default: (prefixCls: string) => {
6
6
  wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
7
  hashId: string;
@@ -6,22 +6,23 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  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); }
7
7
  import { Card } from '@oceanbase/design';
8
8
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
9
+ import { genProCardStyle } from "../../ProCard/style";
9
10
  export var genProTableStyle = function genProTableStyle(token) {
10
11
  var antCls = token.antCls,
11
12
  componentCls = token.componentCls,
12
13
  proComponentsCls = token.proComponentsCls;
13
14
  var proCardComponentCls = "".concat(proComponentsCls, "-card");
14
- return _defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty({}, "".concat(proComponentsCls, "-query-filter-actions"), _defineProperty({}, "".concat(antCls, "-space").concat(antCls, "-space-horizontal").concat(antCls, "-space-align-center"), {
15
+ return _objectSpread(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty({}, "".concat(proComponentsCls, "-query-filter-actions"), _defineProperty({}, "".concat(antCls, "-space").concat(antCls, "-space-horizontal").concat(antCls, "-space-align-center"), {
15
16
  flexDirection: 'row-reverse'
16
- })), "".concat(proCardComponentCls, ":not(").concat(proCardComponentCls, "-no-divider)"), _defineProperty({}, "".concat(proCardComponentCls, "-body"), _defineProperty({}, "".concat(componentCls, "-list-toolbar-container"), {
17
- borderBottom: "".concat(token.lineWidth, "px solid ").concat(token.colorBorderSecondary)
18
- }))), "".concat(proCardComponentCls).concat(proCardComponentCls, "-no-padding"), _objectSpread(_defineProperty({}, "".concat(proCardComponentCls, "-body"), _defineProperty({
17
+ })), "& > ".concat(proCardComponentCls, ", ").concat(proCardComponentCls).concat(componentCls, "-search-light-filter"), {
18
+ boxShadow: 'none !important'
19
+ }), "".concat(proCardComponentCls).concat(proCardComponentCls, "-no-padding"), _objectSpread(_defineProperty({}, "".concat(proCardComponentCls, "-body"), _defineProperty({
19
20
  paddingInline: 0
20
21
  }, "".concat(componentCls, "-list-toolbar-container"), {
21
22
  paddingInline: token.paddingLG
22
23
  })), Card.genTableStyle(token.paddingLG, _objectSpread(_objectSpread({}, token), {}, {
23
24
  componentCls: proCardComponentCls
24
- })))));
25
+ }))))), genProCardStyle(token, proCardComponentCls));
25
26
  };
26
27
  export default (function (prefixCls) {
27
28
  var useStyle = genComponentStyleHook('ProTable', function (token) {
@@ -0,0 +1,28 @@
1
+ declare const _default: {
2
+ customize: string;
3
+ '\u8FD1 1 \u5206\u949F': string;
4
+ '\u8FD1 5 \u5206\u949F': string;
5
+ '\u8FD1 10 \u5206\u949F': string;
6
+ '\u8FD1 20 \u5206\u949F': string;
7
+ '\u8FD1 30 \u5206\u949F': string;
8
+ '\u8FD1 1 \u5C0F\u65F6': string;
9
+ '\u8FD1 2 \u5C0F\u65F6': string;
10
+ '\u8FD1 3 \u5C0F\u65F6': string;
11
+ '\u8FD1 6 \u5C0F\u65F6': string;
12
+ 今天: string;
13
+ 昨天: string;
14
+ 明天: string;
15
+ 本周: string;
16
+ 上周: string;
17
+ 下周: string;
18
+ 本月: string;
19
+ 上月: string;
20
+ 下月: string;
21
+ 本季度: string;
22
+ 上季度: string;
23
+ 下季度: string;
24
+ 今年: string;
25
+ 去年: string;
26
+ 明年: string;
27
+ };
28
+ export default _default;
@@ -0,0 +1,29 @@
1
+ export default {
2
+ customize: 'カスタム時間',
3
+ // 为保证和之前的逻辑兼容,仍然使用中文作为 key
4
+ // TODO: 后续需要替换为英文 key
5
+ '近 1 分钟': '過去 1 分',
6
+ '近 5 分钟': '過去 5 分',
7
+ '近 10 分钟': '過去 10 分',
8
+ '近 20 分钟': '過去 20 分',
9
+ '近 30 分钟': '過去 30 分',
10
+ '近 1 小时': '過去 1 時間',
11
+ '近 2 小时': '過去 2 時間',
12
+ '近 3 小时': '過去 3 時間',
13
+ '近 6 小时': '過去 6 時間',
14
+ 今天: '今日',
15
+ 昨天: '昨日',
16
+ 明天: '明日',
17
+ 本周: '今週',
18
+ 上周: '先週',
19
+ 下周: '来週',
20
+ 本月: '今月',
21
+ 上月: '先月',
22
+ 下月: '来月',
23
+ 本季度: '今四半期',
24
+ 上季度: '前四半期',
25
+ 下季度: '次四半期',
26
+ 今年: '今年',
27
+ 去年: '去年',
28
+ 明年: '来年'
29
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export default {};
@@ -79,7 +79,7 @@
79
79
 
80
80
  .@{prefixCls}-tabs-tab-active {
81
81
  color: @colorText;
82
- font-weight: normal;
82
+ font-weight: @fontWeight;
83
83
  background-color: #f7f8fc;
84
84
  border-bottom: none;
85
85
  border-left: none;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ successful: string;
3
+ running: string;
4
+ failed: string;
5
+ pending: string;
6
+ taskId: string;
7
+ log: string;
8
+ parameter: string;
9
+ stop: string;
10
+ retry: string;
11
+ skip: string;
12
+ };
13
+ export default _default;
@@ -0,0 +1,12 @@
1
+ export default {
2
+ successful: '完了',
3
+ running: 'タスク実行中',
4
+ failed: 'タスク失敗',
5
+ pending: '未開始',
6
+ taskId: 'タスク ID',
7
+ log: 'ログを表示',
8
+ parameter: 'パラメータを表示',
9
+ stop: '実行を停止',
10
+ retry: '再実行',
11
+ skip: '成功に設定'
12
+ };
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ helpTitle: string;
3
+ defaultOperation: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export default {
2
+ helpTitle: 'クイックスタート',
3
+ defaultOperation: 'デフォルト操作'
4
+ };
@@ -0,0 +1,3 @@
1
+ import type { Locale } from './index';
2
+ declare const _default: Locale;
3
+ export default _default;
@@ -0,0 +1,42 @@
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _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; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
7
+ import jaJP from '@oceanbase/design/es/locale/ja-JP';
8
+ import BasicLayout from "../BasicLayout/locale/ja-JP";
9
+ import BatchOperationBar from "../BatchOperationBar/locale/ja-JP";
10
+ import Boundary from "../Boundary/locale/ja-JP";
11
+ import Dialog from "../Dialog/locale/ja-JP";
12
+ import DocDialog from "../DocDialog/locale/ja-JP";
13
+ import FullscreenBox from "../FullscreenBox/locale/ja-JP";
14
+ import GraphToolbar from "../GraphToolbar/locale/ja-JP";
15
+ import Highlight from "../Highlight/locale/ja-JP";
16
+ import Login from "../Login/locale/ja-JP";
17
+ import PageContainer from "../PageContainer/locale/ja-JP";
18
+ import Password from "../Password/locale/ja-JP";
19
+ import Ranger from "../Ranger/locale/ja-JP";
20
+ import DateRanger from "../DateRanger/locale/ja-JP";
21
+ import SideTip from "../SideTip/locale/ja-JP";
22
+ import TaskGraph from "../TaskGraph/locale/ja-JP";
23
+ import Welcome from "../Welcome/locale/ja-JP";
24
+ export default _objectSpread(_objectSpread({}, jaJP), {}, {
25
+ // 业务组件
26
+ BasicLayout: BasicLayout,
27
+ PageContainer: PageContainer,
28
+ Login: Login,
29
+ Welcome: Welcome,
30
+ GraphToolbar: GraphToolbar,
31
+ TaskGraph: TaskGraph,
32
+ Ranger: Ranger,
33
+ Password: Password,
34
+ Boundary: Boundary,
35
+ Dialog: Dialog,
36
+ SideTip: SideTip,
37
+ DocDialog: DocDialog,
38
+ Highlight: Highlight,
39
+ FullscreenBox: FullscreenBox,
40
+ BatchOperationBar: BatchOperationBar,
41
+ DateRanger: DateRanger
42
+ });
@@ -37,6 +37,7 @@ var import_design = require("@oceanbase/design");
37
37
  var import_icons = require("@oceanbase/icons");
38
38
  var import_lodash = require("lodash");
39
39
  var import_style = __toESM(require("./style"));
40
+ var import_jsx_runtime = require("react/jsx-runtime");
40
41
  var getOrder = ({ type, fixed }) => {
41
42
  const ORDER_SET = { primary: 3, fixed: 2, default: 0 };
42
43
  let order = ORDER_SET.default;
@@ -48,6 +49,64 @@ var getOrder = ({ type, fixed }) => {
48
49
  }
49
50
  return order;
50
51
  };
52
+ var findActionComponent = (element, depth = 0) => {
53
+ var _a, _b, _c;
54
+ if (!import_react.default.isValidElement(element)) {
55
+ return null;
56
+ }
57
+ if (((_a = element.type) == null ? void 0 : _a.__DISPLAY_NAME) === "button" || ((_b = element.type) == null ? void 0 : _b.__DISPLAY_NAME) === "link") {
58
+ return { action: element, wrapper: null };
59
+ }
60
+ if (depth > 10) {
61
+ return null;
62
+ }
63
+ const elementChildren = (_c = element.props) == null ? void 0 : _c.children;
64
+ if (elementChildren) {
65
+ const child = import_react.default.Children.only(elementChildren);
66
+ if (import_react.default.isValidElement(child)) {
67
+ const result = findActionComponent(child, depth + 1);
68
+ if (result) {
69
+ return { action: result.action, wrapper: element };
70
+ }
71
+ }
72
+ }
73
+ return null;
74
+ };
75
+ var renderMenuItemContent = (action, actionProps, enableLoading) => {
76
+ const { loading, children, tooltip } = actionProps;
77
+ const result = findActionComponent(action);
78
+ if (!result) {
79
+ const content2 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
80
+ loading && enableLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}),
81
+ " ",
82
+ children || action
83
+ ] });
84
+ return tooltip ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: tooltip, children: content2 }) : content2;
85
+ }
86
+ const { action: actualAction, wrapper } = result;
87
+ const newAction = import_react.default.cloneElement(actualAction, {
88
+ ...actualAction.props,
89
+ ...actionProps,
90
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
91
+ loading && enableLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}),
92
+ " ",
93
+ children || actualAction.props.children
94
+ ] })
95
+ });
96
+ if (wrapper) {
97
+ const wrapperProps = wrapper.props;
98
+ return import_react.default.cloneElement(wrapper, {
99
+ ...wrapperProps,
100
+ children: newAction
101
+ });
102
+ }
103
+ const content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
104
+ loading && enableLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}),
105
+ " ",
106
+ children || actualAction.props.children
107
+ ] });
108
+ return tooltip ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: tooltip, children: content }) : content;
109
+ };
51
110
  var Group_default = ({
52
111
  prefixCls: customizePrefixCls,
53
112
  size = 3,
@@ -95,58 +154,75 @@ var Group_default = ({
95
154
  const getDefaultDisabled = (key) => (shouldDisabled == null ? void 0 : shouldDisabled(key)) ?? false;
96
155
  let moreDom;
97
156
  if (ellipsisType === "button") {
98
- moreDom = /* @__PURE__ */ import_react.default.createElement(
157
+ moreDom = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
99
158
  import_design.Button,
100
159
  {
101
160
  size: buttonSize,
102
- icon: moreText ? void 0 : /* @__PURE__ */ import_react.default.createElement(import_icons.EllipsisOutlined, { style: { cursor: "pointer" } })
103
- },
104
- moreText
161
+ icon: moreText ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.EllipsisOutlined, { style: { cursor: "pointer" } }),
162
+ children: moreText
163
+ }
105
164
  );
106
165
  } else {
107
- moreDom = /* @__PURE__ */ import_react.default.createElement(import_design.Typography.Link, null, moreText ?? /* @__PURE__ */ import_react.default.createElement(import_icons.EllipsisOutlined, { style: { cursor: "pointer" } }));
166
+ moreDom = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Typography.Link, { children: moreText ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.EllipsisOutlined, { style: { cursor: "pointer" } }) });
108
167
  }
109
168
  return wrapSSR(
110
- /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: ellipsisType === "button" ? 8 : 16 }, mainActions.map((action) => {
111
- return import_react.default.cloneElement(action, {
112
- // size should be covered by action props
113
- size: buttonSize,
114
- ...action.props,
115
- key: action.key,
116
- enableLoading,
117
- disabled: (0, import_lodash.isBoolean)(action.props.disabled) ? action.props.disabled : getDefaultDisabled(action.key)
118
- });
119
- }), ellipsisActions.length > 0 && /* @__PURE__ */ import_react.default.createElement(
120
- import_design.Dropdown,
121
- {
122
- placement: dropDownPlacement,
123
- overlay: /* @__PURE__ */ import_react.default.createElement(import_design.Menu, { className: `${prefixCls}-more-menu` }, ellipsisActions.map((action, index) => {
124
- const actionKey = action.key;
125
- let disabled = false;
126
- if ((0, import_lodash.isBoolean)(action.props.disabled))
127
- disabled = action.props.disabled;
128
- else if (shouldDisabled)
129
- disabled = shouldDisabled(action.key);
130
- const actionDisabled = action.props.loading || ((0, import_lodash.isBoolean)(action.props.disabled) ? action.props.disabled : getDefaultDisabled(action.key));
131
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
132
- import_design.Menu.Item,
133
- {
134
- key: actionKey ?? index.toString(),
135
- onClick: ({ domEvent }) => {
136
- var _a, _b;
137
- (_b = (_a = action.props).onClick) == null ? void 0 : _b.call(
138
- _a,
139
- domEvent
140
- );
141
- },
142
- ...(0, import_lodash.omit)(action.props, ["disabled"]),
143
- disabled: actionDisabled
144
- },
145
- /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: action.props.tooltip }, action.props.loading && /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, null), " ", action.props.children || action)
146
- ), action.props.divider && /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Divider, null));
147
- }))
148
- },
149
- moreDom
150
- ))
169
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: ellipsisType === "button" ? 8 : 16, children: [
170
+ mainActions.map((action) => {
171
+ return import_react.default.cloneElement(action, {
172
+ // size should be covered by action props
173
+ size: buttonSize,
174
+ ...action.props,
175
+ key: action.key,
176
+ enableLoading,
177
+ disabled: (0, import_lodash.isBoolean)(action.props.disabled) ? action.props.disabled : getDefaultDisabled(action.key)
178
+ });
179
+ }),
180
+ ellipsisActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
181
+ import_design.Dropdown,
182
+ {
183
+ placement: dropDownPlacement,
184
+ overlay: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu, { className: `${prefixCls}-more-menu`, children: ellipsisActions.map((action, index) => {
185
+ const actionKey = action.key;
186
+ const actionResult = findActionComponent(action);
187
+ const actualAction = (actionResult == null ? void 0 : actionResult.action) || action;
188
+ const actionProps = actualAction.props;
189
+ const actionDisabled = actionProps.loading || ((0, import_lodash.isBoolean)(actionProps.disabled) ? actionProps.disabled : getDefaultDisabled(action.key));
190
+ const menuItemProps = (0, import_lodash.omit)(actionProps, [
191
+ "disabled",
192
+ "loading",
193
+ "tooltip",
194
+ "visible",
195
+ "fixed",
196
+ "enableLoading",
197
+ "onClick",
198
+ "children",
199
+ "danger"
200
+ ]);
201
+ const handleMenuItemClick = (info) => {
202
+ var _a;
203
+ if (actionResult == null ? void 0 : actionResult.wrapper) {
204
+ return;
205
+ }
206
+ (_a = actionProps.onClick) == null ? void 0 : _a.call(actionProps, info.domEvent);
207
+ };
208
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
209
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
210
+ import_design.Menu.Item,
211
+ {
212
+ onClick: handleMenuItemClick,
213
+ disabled: actionDisabled,
214
+ danger: !!actionProps.danger,
215
+ ...menuItemProps,
216
+ children: renderMenuItemContent(action, actionProps, enableLoading)
217
+ },
218
+ actionKey ?? index.toString()
219
+ ),
220
+ actionProps.divider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Divider, {})
221
+ ] });
222
+ }) }),
223
+ children: moreDom
224
+ }
225
+ )
226
+ ] })
151
227
  );
152
228
  };
@@ -36,6 +36,7 @@ module.exports = __toCommonJS(Item_exports);
36
36
  var import_icons = require("@oceanbase/icons");
37
37
  var import_design = require("@oceanbase/design");
38
38
  var import_react = __toESM(require("react"));
39
+ var import_jsx_runtime = require("react/jsx-runtime");
39
40
  var ActionButton = class extends import_react.default.PureComponent {
40
41
  constructor() {
41
42
  super(...arguments);
@@ -45,7 +46,7 @@ var ActionButton = class extends import_react.default.PureComponent {
45
46
  }
46
47
  render() {
47
48
  const { children, onClick, enableLoading = true, tooltip, loading, ...restProps } = this.props;
48
- return /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { placement: "top", title: tooltip }, /* @__PURE__ */ import_react.default.createElement(
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { placement: "top", title: tooltip, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
49
50
  import_design.Button,
50
51
  {
51
52
  loading: enableLoading && (loading || this.state.loading),
@@ -58,10 +59,10 @@ var ActionButton = class extends import_react.default.PureComponent {
58
59
  });
59
60
  }
60
61
  },
61
- ...restProps
62
- },
63
- children
64
- ));
62
+ ...restProps,
63
+ children
64
+ }
65
+ ) });
65
66
  }
66
67
  };
67
68
  ActionButton.__DISPLAY_NAME = "button";
@@ -85,7 +86,7 @@ var ActionLink = class extends import_react.default.PureComponent {
85
86
  style,
86
87
  ...restProps
87
88
  } = this.props;
88
- return /* @__PURE__ */ import_react.default.createElement(
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
90
  import_design.Typography.Link,
90
91
  {
91
92
  style: { padding: 0, ...style },
@@ -99,9 +100,13 @@ var ActionLink = class extends import_react.default.PureComponent {
99
100
  });
100
101
  }
101
102
  },
102
- ...restProps
103
- },
104
- /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { placement: "top", title: tooltip }, loading || this.state.disabled ? /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, null) : "", " ", children)
103
+ ...restProps,
104
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Tooltip, { placement: "top", title: tooltip, children: [
105
+ loading || this.state.disabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}) : "",
106
+ " ",
107
+ children
108
+ ] })
109
+ }
105
110
  );
106
111
  }
107
112
  };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import type { GenerateStyle } from '@oceanbase/design/es/theme';
2
+ import type { CSSObject } from '@ant-design/cssinjs';
3
3
  import type { OBToken } from '../../_util/genComponentStyleHook';
4
- export declare const genActionStyle: GenerateStyle<OBToken>;
4
+ export declare const genActionStyle: (token: OBToken) => CSSObject;
5
5
  declare const _default: (prefixCls: string) => {
6
6
  wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
7
  hashId: string;
@@ -32,7 +32,6 @@ var genActionStyle = (token) => {
32
32
  const margin = `-${paddingVertical}px -${paddingHorizontal}px`;
33
33
  return {
34
34
  [`${componentCls}-more-menu`]: {
35
- background: "red",
36
35
  [`${antCls}-dropdown-menu-item`]: {
37
36
  [`${antCls}-typography`]: {
38
37
  display: "block",
@@ -61,6 +60,22 @@ var genActionStyle = (token) => {
61
60
  [`${antCls}-wave`]: {
62
61
  display: "none"
63
62
  }
63
+ },
64
+ // 确保 danger 状态的样式能够正确显示,不覆盖 Menu.Item 的默认 danger 颜色
65
+ [`&${antCls}-dropdown-menu-item-danger`]: {
66
+ [`${antCls}-typography`]: {
67
+ [`&:not(${antCls}-typography-disabled)`]: {
68
+ color: "unset"
69
+ }
70
+ },
71
+ [`${antCls}-btn`]: {
72
+ [`&:not(:disabled):not(${antCls}-btn-disabled)`]: {
73
+ color: "unset",
74
+ [`&:hover`]: {
75
+ color: "unset"
76
+ }
77
+ }
78
+ }
64
79
  }
65
80
  }
66
81
  }