@oceanbase/ui 0.4.20 → 0.4.22

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 (135) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Group.js +121 -15
  3. package/es/Action/style/index.js +8 -4
  4. package/es/BasicLayout/locale/ja-JP.d.ts +13 -0
  5. package/es/BasicLayout/locale/ja-JP.js +12 -0
  6. package/es/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  7. package/es/BatchOperationBar/locale/ja-JP.js +6 -0
  8. package/es/Boundary/locale/en-US.js +1 -1
  9. package/es/Boundary/locale/ja-JP.d.ts +11 -0
  10. package/es/Boundary/locale/ja-JP.js +10 -0
  11. package/es/Boundary/locale/zh-CN.js +1 -1
  12. package/es/Boundary/locale/zh-TW.js +1 -1
  13. package/es/DateRanger/locale/ja-JP.d.ts +56 -0
  14. package/es/DateRanger/locale/ja-JP.js +20 -0
  15. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  16. package/es/Dialog/locale/ja-JP.js +4 -0
  17. package/es/DocDialog/locale/ja-JP.d.ts +2 -0
  18. package/es/DocDialog/locale/ja-JP.js +1 -0
  19. package/es/FullscreenBox/locale/ja-JP.d.ts +2 -0
  20. package/es/FullscreenBox/locale/ja-JP.js +1 -0
  21. package/es/GraphToolbar/locale/ja-JP.d.ts +9 -0
  22. package/es/GraphToolbar/locale/ja-JP.js +8 -0
  23. package/es/Highlight/locale/ja-JP.d.ts +4 -0
  24. package/es/Highlight/locale/ja-JP.js +3 -0
  25. package/es/Login/locale/ja-JP.d.ts +28 -0
  26. package/es/Login/locale/ja-JP.js +27 -0
  27. package/es/Login/locale/zh-CN.js +2 -2
  28. package/es/PageContainer/locale/ja-JP.d.ts +4 -0
  29. package/es/PageContainer/locale/ja-JP.js +3 -0
  30. package/es/Password/locale/ja-JP.d.ts +13 -0
  31. package/es/Password/locale/ja-JP.js +12 -0
  32. package/es/Ranger/locale/ja-JP.d.ts +28 -0
  33. package/es/Ranger/locale/ja-JP.js +29 -0
  34. package/es/SideTip/locale/ja-JP.d.ts +2 -0
  35. package/es/SideTip/locale/ja-JP.js +1 -0
  36. package/es/TaskGraph/locale/ja-JP.d.ts +13 -0
  37. package/es/TaskGraph/locale/ja-JP.js +12 -0
  38. package/es/Welcome/locale/ja-JP.d.ts +5 -0
  39. package/es/Welcome/locale/ja-JP.js +4 -0
  40. package/es/locale/ja-JP.d.ts +3 -0
  41. package/es/locale/ja-JP.js +42 -0
  42. package/lib/Action/Group.js +122 -46
  43. package/lib/Action/Item.js +14 -9
  44. package/lib/Action/style/index.js +16 -1
  45. package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
  46. package/lib/BackgroundTaskManager/index.js +3 -12
  47. package/lib/BasicLayout/Header.js +120 -62
  48. package/lib/BasicLayout/index.js +166 -143
  49. package/lib/BasicLayout/locale/ja-JP.d.ts +13 -0
  50. package/lib/BasicLayout/locale/ja-JP.js +36 -0
  51. package/lib/BatchOperationBar/index.js +59 -44
  52. package/lib/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  53. package/lib/BatchOperationBar/locale/ja-JP.js +30 -0
  54. package/lib/Boundary/Components/Code.js +11 -5
  55. package/lib/Boundary/Components/Exception.js +33 -23
  56. package/lib/Boundary/Components/Function.js +11 -5
  57. package/lib/Boundary/locale/en-US.js +1 -1
  58. package/lib/Boundary/locale/ja-JP.d.ts +11 -0
  59. package/lib/Boundary/locale/ja-JP.js +34 -0
  60. package/lib/Boundary/locale/zh-CN.js +1 -1
  61. package/lib/Boundary/locale/zh-TW.js +1 -1
  62. package/lib/ContentWithIcon/index.js +30 -22
  63. package/lib/ContentWithQuestion/index.js +8 -3
  64. package/lib/DateRanger/PickerPanel.js +235 -217
  65. package/lib/DateRanger/Ranger.js +349 -313
  66. package/lib/DateRanger/locale/ja-JP.d.ts +56 -0
  67. package/lib/DateRanger/locale/ja-JP.js +49 -0
  68. package/lib/Dialog/Anchor.js +8 -5
  69. package/lib/Dialog/EventProxy.js +3 -12
  70. package/lib/Dialog/index.js +132 -108
  71. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  72. package/lib/Dialog/locale/ja-JP.js +28 -0
  73. package/lib/DocDialog/index.js +3 -2
  74. package/lib/DocDialog/locale/ja-JP.d.ts +2 -0
  75. package/lib/DocDialog/locale/ja-JP.js +25 -0
  76. package/lib/FooterToolbar/index.js +3 -2
  77. package/lib/FullscreenBox/index.js +16 -7
  78. package/lib/FullscreenBox/locale/ja-JP.d.ts +2 -0
  79. package/lib/FullscreenBox/locale/ja-JP.js +25 -0
  80. package/lib/GraphToolbar/index.js +70 -58
  81. package/lib/GraphToolbar/locale/ja-JP.d.ts +9 -0
  82. package/lib/GraphToolbar/locale/ja-JP.js +32 -0
  83. package/lib/Highlight/DiffView/DiffCells.js +17 -10
  84. package/lib/Highlight/DiffView/index.js +35 -31
  85. package/lib/Highlight/HighlightCell.js +13 -10
  86. package/lib/Highlight/JsonView.js +15 -14
  87. package/lib/Highlight/index.js +50 -45
  88. package/lib/Highlight/locale/ja-JP.d.ts +4 -0
  89. package/lib/Highlight/locale/ja-JP.js +27 -0
  90. package/lib/IconFont/index.js +2 -12
  91. package/lib/LightFilter/index.js +3 -2
  92. package/lib/LocaleDropdown/index.js +13 -20
  93. package/lib/Login/ActivateForm.js +53 -60
  94. package/lib/Login/LoginForm.js +118 -109
  95. package/lib/Login/RegisterForm.js +79 -86
  96. package/lib/Login/index.js +92 -64
  97. package/lib/Login/locale/ja-JP.d.ts +28 -0
  98. package/lib/Login/locale/ja-JP.js +51 -0
  99. package/lib/Login/locale/zh-CN.js +2 -2
  100. package/lib/NavMenu/index.js +9 -8
  101. package/lib/PageContainer/ItemRender.js +5 -5
  102. package/lib/PageContainer/index.js +8 -4
  103. package/lib/PageContainer/locale/ja-JP.d.ts +4 -0
  104. package/lib/PageContainer/locale/ja-JP.js +27 -0
  105. package/lib/PageLoading/index.js +6 -16
  106. package/lib/Password/Content.js +38 -42
  107. package/lib/Password/index.js +83 -68
  108. package/lib/Password/locale/ja-JP.d.ts +13 -0
  109. package/lib/Password/locale/ja-JP.js +36 -0
  110. package/lib/ProCard/index.js +4 -3
  111. package/lib/ProTable/index.js +5 -4
  112. package/lib/Ranger/QuickPicker.js +24 -15
  113. package/lib/Ranger/Ranger.js +37 -34
  114. package/lib/Ranger/locale/ja-JP.d.ts +28 -0
  115. package/lib/Ranger/locale/ja-JP.js +53 -0
  116. package/lib/SideTip/Dragger.js +5 -4
  117. package/lib/SideTip/IconLoading.js +25 -25
  118. package/lib/SideTip/index.js +19 -10
  119. package/lib/SideTip/locale/ja-JP.d.ts +2 -0
  120. package/lib/SideTip/locale/ja-JP.js +25 -0
  121. package/lib/TagSelect/Group.js +9 -5
  122. package/lib/TagSelect/Item.js +22 -18
  123. package/lib/TaskGraph/Graph.js +29 -24
  124. package/lib/TaskGraph/index.js +56 -50
  125. package/lib/TaskGraph/locale/ja-JP.d.ts +13 -0
  126. package/lib/TaskGraph/locale/ja-JP.js +36 -0
  127. package/lib/TreeSearch/index.js +30 -35
  128. package/lib/Welcome/index.js +64 -37
  129. package/lib/Welcome/locale/ja-JP.d.ts +5 -0
  130. package/lib/Welcome/locale/ja-JP.js +28 -0
  131. package/lib/Welcome/step.js +11 -4
  132. package/lib/locale/LocaleWrapper.js +15 -14
  133. package/lib/locale/ja-JP.d.ts +3 -0
  134. package/lib/locale/ja-JP.js +71 -0
  135. package/package.json +5 -5
@@ -0,0 +1,36 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/BasicLayout/locale/ja-JP.ts
20
+ var ja_JP_exports = {};
21
+ __export(ja_JP_exports, {
22
+ default: () => ja_JP_default
23
+ });
24
+ module.exports = __toCommonJS(ja_JP_exports);
25
+ var ja_JP_default = {
26
+ help: "ヘルプ",
27
+ welcome: "ウェルカムページ",
28
+ versionNotice: "更新情報",
29
+ viewDocs: "マニュアルを見る",
30
+ downloadDocs: "マニュアルをダウンロード",
31
+ about: "製品について",
32
+ version: "バージョン",
33
+ releaseTime: "リリース日",
34
+ company: "Beijing OceanBase Technology Co., Ltd.",
35
+ right: "All Rights Reserved"
36
+ };
@@ -36,10 +36,11 @@ var import_icons = require("@oceanbase/icons");
36
36
  var import_design = require("@oceanbase/design");
37
37
  var import_classnames = __toESM(require("classnames"));
38
38
  var import_lodash = require("lodash");
39
- var import_react = __toESM(require("react"));
39
+ var import_react = require("react");
40
40
  var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
41
41
  var import_index = require("./index.less");
42
42
  var import_zh_CN = __toESM(require("./locale/zh-CN"));
43
+ var import_jsx_runtime = require("react/jsx-runtime");
43
44
  var prefix = "ob-batch-operation-bar";
44
45
  var BatchOperationBar = (props) => {
45
46
  var _a, _b;
@@ -55,9 +56,9 @@ var BatchOperationBar = (props) => {
55
56
  className = "",
56
57
  cancelText = locale == null ? void 0 : locale.cancelText,
57
58
  openText = locale == null ? void 0 : locale.openText,
58
- openIcon = /* @__PURE__ */ import_react.default.createElement(import_icons.DownOutlined, null),
59
+ openIcon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.DownOutlined, {}),
59
60
  hiddenText = locale == null ? void 0 : locale.hiddenText,
60
- hiddenIcon = /* @__PURE__ */ import_react.default.createElement(import_icons.UpOutlined, null),
61
+ hiddenIcon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.UpOutlined, {}),
61
62
  showCancelBtn = true,
62
63
  showOpenBtn = true,
63
64
  position = ["bottom", "right"],
@@ -95,7 +96,7 @@ var BatchOperationBar = (props) => {
95
96
  const disPlayBtnRender = () => {
96
97
  if (!showOpenBtn)
97
98
  return null;
98
- return /* @__PURE__ */ import_react.default.createElement(
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
99
100
  "div",
100
101
  {
101
102
  className: (0, import_classnames.default)({
@@ -103,18 +104,20 @@ var BatchOperationBar = (props) => {
103
104
  [`${prefix}-close-btn`]: !isOpen,
104
105
  [`${prefix}-display-btn`]: true
105
106
  }),
106
- onClick: () => setIsOpen(!isOpen)
107
- },
108
- /* @__PURE__ */ import_react.default.createElement(
109
- "span",
110
- {
111
- className: (0, import_classnames.default)({
112
- [`${prefix}-display-text`]: true
113
- })
114
- },
115
- isOpen ? hiddenText : openText
116
- ),
117
- isOpen ? hiddenIcon : openIcon
107
+ onClick: () => setIsOpen(!isOpen),
108
+ children: [
109
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ "span",
111
+ {
112
+ className: (0, import_classnames.default)({
113
+ [`${prefix}-display-text`]: true
114
+ }),
115
+ children: isOpen ? hiddenText : openText
116
+ }
117
+ ),
118
+ isOpen ? hiddenIcon : openIcon
119
+ ]
120
+ }
118
121
  );
119
122
  };
120
123
  (0, import_react.useEffect)(() => {
@@ -123,40 +126,52 @@ var BatchOperationBar = (props) => {
123
126
  else
124
127
  setSelectedData(selectedRows);
125
128
  }, [selectedRows]);
126
- return /* @__PURE__ */ import_react.default.createElement(
129
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
127
130
  "div",
128
131
  {
129
132
  className: (0, import_classnames.default)({
130
133
  [className]: !!className,
131
134
  [prefix]: true
132
135
  }),
133
- style
134
- },
135
- /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-header` }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, null, !!alertRender ? alertRender == null ? void 0 : alertRender(selectedData) : /* @__PURE__ */ import_react.default.createElement(import_design.Space, null, title && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}-title` }, title), /* @__PURE__ */ import_react.default.createElement("span", null, (_b = (_a = locale == null ? void 0 : locale.alertText) == null ? void 0 : _a.replace) == null ? void 0 : _b.call(_a, /\$\{\}/, (selectedData == null ? void 0 : selectedData.length) || 0))), !!showCancelBtn && /* @__PURE__ */ import_react.default.createElement(
136
- "span",
137
- {
138
- className: (0, import_classnames.default)({
139
- [`${prefix}-cancel`]: true
140
- }),
141
- onClick: () => cleanSelectedRows()
142
- },
143
- cancelText
144
- ), disPlayBtnRender()), !!alertOptionRender && /* @__PURE__ */ import_react.default.createElement("div", null, alertOptionRender == null ? void 0 : alertOptionRender({
145
- selectedRows: selectedData,
146
- setSelectedRows,
147
- cleanSelectedRows
148
- }))),
149
- /* @__PURE__ */ import_react.default.createElement(
150
- "div",
151
- {
152
- className: (0, import_classnames.default)({
153
- [`${prefix}-content`]: true,
154
- [`${prefix}-content-active`]: !!isOpen,
155
- [`${prefix}-content-hidden`]: !isOpen
156
- })
157
- },
158
- typeof content === "function" ? content == null ? void 0 : content({ selectedRows: selectedData, setSelectedRows, cleanSelectedRows }) : content
159
- )
136
+ style,
137
+ children: [
138
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefix}-header`, children: [
139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { children: [
140
+ !!alertRender ? alertRender == null ? void 0 : alertRender(selectedData) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { children: [
141
+ title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-title`, children: title }),
142
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: (_b = (_a = locale == null ? void 0 : locale.alertText) == null ? void 0 : _a.replace) == null ? void 0 : _b.call(_a, /\$\{\}/, (selectedData == null ? void 0 : selectedData.length) || 0) })
143
+ ] }),
144
+ !!showCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
145
+ "span",
146
+ {
147
+ className: (0, import_classnames.default)({
148
+ [`${prefix}-cancel`]: true
149
+ }),
150
+ onClick: () => cleanSelectedRows(),
151
+ children: cancelText
152
+ }
153
+ ),
154
+ disPlayBtnRender()
155
+ ] }),
156
+ !!alertOptionRender && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: alertOptionRender == null ? void 0 : alertOptionRender({
157
+ selectedRows: selectedData,
158
+ setSelectedRows,
159
+ cleanSelectedRows
160
+ }) })
161
+ ] }),
162
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
163
+ "div",
164
+ {
165
+ className: (0, import_classnames.default)({
166
+ [`${prefix}-content`]: true,
167
+ [`${prefix}-content-active`]: !!isOpen,
168
+ [`${prefix}-content-hidden`]: !isOpen
169
+ }),
170
+ children: typeof content === "function" ? content == null ? void 0 : content({ selectedRows: selectedData, setSelectedRows, cleanSelectedRows }) : content
171
+ }
172
+ )
173
+ ]
174
+ }
160
175
  );
161
176
  };
162
177
  var BatchOperationBar_default = (0, import_LocaleWrapper.default)({
@@ -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,30 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/BatchOperationBar/locale/ja-JP.ts
20
+ var ja_JP_exports = {};
21
+ __export(ja_JP_exports, {
22
+ default: () => ja_JP_default
23
+ });
24
+ module.exports = __toCommonJS(ja_JP_exports);
25
+ var ja_JP_default = {
26
+ cancelText: "選択解除",
27
+ openText: "選択済みを展開",
28
+ hiddenText: "選択済みを折りたたむ",
29
+ alertText: "${} 件を選択しました"
30
+ };
@@ -33,18 +33,19 @@ __export(Code_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(Code_exports);
35
35
  var import_design = require("@oceanbase/design");
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_LocaleWrapper = __toESM(require("../../locale/LocaleWrapper"));
38
38
  var import_constant = require("../constant");
39
39
  var import_zh_CN = __toESM(require("../locale/zh-CN"));
40
40
  var import_classnames = __toESM(require("classnames"));
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var BoundaryCode = (props) => {
42
43
  const { children, onClick, code, imageUrl, title, buttonText, locale, className, ...restProps } = props;
43
44
  const info = (0, import_react.useMemo)(() => {
44
45
  const data = (0, import_constant.CODE_PRESET)(locale);
45
46
  return data[code];
46
47
  }, [code, locale]);
47
- return /* @__PURE__ */ import_react.default.createElement(
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
49
  "div",
49
50
  {
50
51
  className: (0, import_classnames.default)(
@@ -53,9 +54,14 @@ var BoundaryCode = (props) => {
53
54
  `ob-boundary-${code}`,
54
55
  className
55
56
  ),
56
- ...restProps
57
- },
58
- /* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: imageUrl || info.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, title || info.title), children, /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "primary", onClick: onClick || info.onClick }, buttonText || info.buttonText))
57
+ ...restProps,
58
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imageUrl || info.imageUrl }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: title || info.title }),
61
+ children,
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "primary", onClick: onClick || info.onClick, children: buttonText || info.buttonText })
63
+ ] })
64
+ }
59
65
  );
60
66
  };
61
67
  var Code = (0, import_LocaleWrapper.default)({
@@ -38,6 +38,7 @@ var import_LocaleWrapper = __toESM(require("../../locale/LocaleWrapper"));
38
38
  var import_constant = require("../constant");
39
39
  var import_zh_CN = __toESM(require("../locale/zh-CN"));
40
40
  var import_classnames = __toESM(require("classnames"));
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var BoundaryException = class extends import_react.default.PureComponent {
42
43
  constructor() {
43
44
  super(...arguments);
@@ -85,31 +86,36 @@ var BoundaryException = class extends import_react.default.PureComponent {
85
86
  const errorDescription = info == null ? void 0 : info.componentStack;
86
87
  const errorMessage = (error || "").toString();
87
88
  if ((_a = this.state) == null ? void 0 : _a.hasError) {
88
- return /* @__PURE__ */ import_react.default.createElement(
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
90
  "div",
90
91
  {
91
92
  className: (0, import_classnames.default)("boundary-container", "ob-boundary-error", className),
92
- ...restProps
93
- },
94
- /* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: imageUrl || errorInfo.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, title || errorInfo.title), showError ? /* @__PURE__ */ import_react.default.createElement(
95
- import_design.Alert,
96
- {
97
- type: "error",
98
- showIcon: true,
99
- message: errorMessage,
100
- description: errorDescription,
101
- style: {
102
- marginTop: 24,
103
- overflow: "auto",
104
- maxHeight: "50vh",
105
- // 为了避免被 Empty 的水平居中样式影响,需要设置 textAlign
106
- textAlign: "left"
107
- }
108
- }
109
- ) : subscription && /* @__PURE__ */ import_react.default.createElement("span", null, subscription), hasButton ? /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "primary", onClick: () => this.onClick() }, buttonText || errorInfo.buttonText) : "")
93
+ ...restProps,
94
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imageUrl || errorInfo.imageUrl }),
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: title || errorInfo.title }),
97
+ showError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
+ import_design.Alert,
99
+ {
100
+ type: "error",
101
+ showIcon: true,
102
+ message: errorMessage,
103
+ description: errorDescription,
104
+ style: {
105
+ marginTop: 24,
106
+ overflow: "auto",
107
+ maxHeight: "50vh",
108
+ // 为了避免被 Empty 的水平居中样式影响,需要设置 textAlign
109
+ textAlign: "left"
110
+ }
111
+ }
112
+ ) : subscription && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: subscription }),
113
+ hasButton ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "primary", onClick: () => this.onClick(), children: buttonText || errorInfo.buttonText }) : ""
114
+ ] })
115
+ }
110
116
  );
111
117
  } else if (isNotCompatible) {
112
- return /* @__PURE__ */ import_react.default.createElement(
118
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
113
119
  "div",
114
120
  {
115
121
  className: (0, import_classnames.default)(
@@ -117,9 +123,13 @@ var BoundaryException = class extends import_react.default.PureComponent {
117
123
  "ob-boundary-browser-not-compatible",
118
124
  className
119
125
  ),
120
- ...restProps
121
- },
122
- /* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: imageUrl || notCompatibleInfo.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, title || notCompatibleInfo.title), /* @__PURE__ */ import_react.default.createElement("span", null, subscription ? subscription : notCompatibleInfo.subscription))
126
+ ...restProps,
127
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
128
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imageUrl || notCompatibleInfo.imageUrl }),
129
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: title || notCompatibleInfo.title }),
130
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: subscription ? subscription : notCompatibleInfo.subscription })
131
+ ] })
132
+ }
123
133
  );
124
134
  }
125
135
  return this.props.children;
@@ -33,20 +33,26 @@ __export(Function_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(Function_exports);
35
35
  var import_design = require("@oceanbase/design");
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_classnames = __toESM(require("classnames"));
38
+ var import_jsx_runtime = require("react/jsx-runtime");
38
39
  var BoundaryFunction = (props) => {
39
40
  const { children, state, config, onClick, className, ...restProps } = props;
40
41
  const info = (0, import_react.useMemo)(() => {
41
42
  return state ? config[state] : config[Object.keys(config)[0]];
42
43
  }, [config, state]);
43
- return /* @__PURE__ */ import_react.default.createElement(
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
45
  "div",
45
46
  {
46
47
  className: (0, import_classnames.default)("boundary-container", "ob-boundary-function", className),
47
- ...restProps
48
- },
49
- /* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: info.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, info.title), children, info.buttonText && /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "primary", onClick: onClick || info.onClick }, info.buttonText))
48
+ ...restProps,
49
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: info.imageUrl }),
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: info.title }),
52
+ children,
53
+ info.buttonText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "primary", onClick: onClick || info.onClick, children: info.buttonText })
54
+ ] })
55
+ }
50
56
  );
51
57
  };
52
58
  // Annotate the CommonJS export names for ESM import in node:
@@ -28,7 +28,7 @@ var en_US_default = {
28
28
  noPage: "This page was not found",
29
29
  normal: "normal operation",
30
30
  test: "Click to test crash effect",
31
- collapse: "The page crashed ~",
31
+ collapse: "The page crashed",
32
32
  incompatible: "Incompatible browser version",
33
33
  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"
34
34
  };
@@ -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,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/Boundary/locale/ja-JP.ts
20
+ var ja_JP_exports = {};
21
+ __export(ja_JP_exports, {
22
+ default: () => ja_JP_default
23
+ });
24
+ module.exports = __toCommonJS(ja_JP_exports);
25
+ var ja_JP_default = {
26
+ goHome: "ホームに戻る",
27
+ noPermission: "このページへのアクセス権限がありません",
28
+ noPage: "このページが見つかりません",
29
+ normal: "正常動作",
30
+ test: "クリックしてクラッシュをテスト",
31
+ collapse: "ページがクラッシュしました",
32
+ incompatible: "ブラウザがサポートされていません",
33
+ proposal: "ブラウザのバージョンが古すぎます。セキュリティリスクを避けるため、Chrome 80以上のご利用をおすすめします"
34
+ };
@@ -28,7 +28,7 @@ var zh_CN_default = {
28
28
  noPage: "此页面未找到",
29
29
  normal: "正常运行",
30
30
  test: "点击测试崩溃效果",
31
- collapse: "页面崩溃了~",
31
+ collapse: "页面崩溃了",
32
32
  incompatible: "浏览器版本不兼容",
33
33
  proposal: "浏览器版本过低,为避免可能存在的安全隐患,建议使用Chrome浏览器的80及以上版本"
34
34
  };
@@ -28,7 +28,7 @@ var zh_TW_default = {
28
28
  noPage: "此頁面未找到",
29
29
  normal: "正常運行",
30
30
  test: "點擊測試崩潰效果",
31
- collapse: "頁面崩潰了~",
31
+ collapse: "頁面崩潰了",
32
32
  incompatible: "流覽器版本不相容",
33
33
  proposal: "流覽器版本過低,為避免可能存在的安全隱患,建議使用Chrome瀏覽器的80及以上版本"
34
34
  };
@@ -32,12 +32,13 @@ __export(ContentWithIcon_exports, {
32
32
  default: () => ContentWithIcon_default
33
33
  });
34
34
  module.exports = __toCommonJS(ContentWithIcon_exports);
35
- var import_react = __toESM(require("react"));
35
+ var import_react = require("react");
36
36
  var import_antd = require("antd");
37
37
  var import_icons = require("@oceanbase/icons");
38
38
  var import_classnames = __toESM(require("classnames"));
39
39
  var import_util = require("../_util");
40
40
  var import_index = require("./index.less");
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var prefix = (0, import_util.getPrefix)("content-with-question");
42
43
  var ContentWithIcon = ({
43
44
  content,
@@ -58,7 +59,7 @@ var ContentWithIcon = ({
58
59
  }) => {
59
60
  const defaultIconType = () => {
60
61
  if (iconType === "question") {
61
- return /* @__PURE__ */ import_react.default.createElement(
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
63
  import_icons.QuestionCircleOutlined,
63
64
  {
64
65
  style: { color: color === "default" ? "#132039" : color, fontSize: size },
@@ -68,7 +69,7 @@ var ContentWithIcon = ({
68
69
  }
69
70
  if (iconType === "info") {
70
71
  if (infoColor) {
71
- return /* @__PURE__ */ import_react.default.createElement(
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
73
  import_icons.InfoCircleFilled,
73
74
  {
74
75
  style: { color: infoColor, fontSize: size },
@@ -76,7 +77,7 @@ var ContentWithIcon = ({
76
77
  }
77
78
  );
78
79
  } else {
79
- return /* @__PURE__ */ import_react.default.createElement(
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
81
  import_icons.InfoCircleOutlined,
81
82
  {
82
83
  style: { color: "3333333", fontSize: size },
@@ -86,7 +87,7 @@ var ContentWithIcon = ({
86
87
  }
87
88
  }
88
89
  if (iconType === "exclamation") {
89
- return /* @__PURE__ */ import_react.default.createElement(
90
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
91
  import_icons.ExclamationCircleFilled,
91
92
  {
92
93
  style: { color: exclamationColor, fontSize: size },
@@ -99,32 +100,39 @@ var ContentWithIcon = ({
99
100
  const getIcon = (iconConfig) => {
100
101
  return iconConfig ? !textHidden && iconType === "info" ? (
101
102
  // 文本描述直接展示且只在 info 类型下生效
102
- /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 4 }, iconConfig, /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#5C6B8A" } }, "文本示意不超过二十字文本示意不超过二十字"))
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
104
+ iconConfig,
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#5C6B8A" }, children: "文本示意不超过二十字文本示意不超过二十字" })
106
+ ] })
103
107
  ) : (
104
108
  // 提示文案描述带有链接
105
- tooltipWithLink ? /* @__PURE__ */ import_react.default.createElement(import_antd.Popover, { ...popOver }, (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType()) : /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { ...tooltip }, (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType())
109
+ tooltipWithLink ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Popover, { ...popOver, children: (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType() }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tooltip, { ...tooltip, children: (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType() })
106
110
  ) : null;
107
111
  };
108
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
112
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
109
113
  "span",
110
114
  {
111
115
  className: (0, import_classnames.default)({
112
116
  [`${prefix}-item`]: true,
113
117
  [className]: !!className
114
118
  }),
115
- ...restProps
116
- },
117
- /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 4 }, getIcon(
118
- // 图标在文字前
119
- prefixIcon === true ? defaultIconType() : prefixIcon
120
- ), /* @__PURE__ */ import_react.default.createElement(
121
- "span",
122
- {
123
- "data-testid": "content",
124
- style: { color: color === "default" ? "#5C6B8A" : color, fontSize: size }
125
- },
126
- content ?? children
127
- ), getIcon(suffixIcon))
128
- ));
119
+ ...restProps,
120
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
121
+ getIcon(
122
+ // 图标在文字前
123
+ prefixIcon === true ? defaultIconType() : prefixIcon
124
+ ),
125
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
+ "span",
127
+ {
128
+ "data-testid": "content",
129
+ style: { color: color === "default" ? "#5C6B8A" : color, fontSize: size },
130
+ children: content ?? children
131
+ }
132
+ ),
133
+ getIcon(suffixIcon)
134
+ ] })
135
+ }
136
+ ) });
129
137
  };
130
138
  var ContentWithIcon_default = ContentWithIcon;
@@ -35,8 +35,9 @@ module.exports = __toCommonJS(ContentWithQuestion_exports);
35
35
  var import_icons = require("@oceanbase/icons");
36
36
  var import_design = require("@oceanbase/design");
37
37
  var import_classnames = __toESM(require("classnames"));
38
- var import_react = __toESM(require("react"));
38
+ var import_react = require("react");
39
39
  var import_style = __toESM(require("./style"));
40
+ var import_jsx_runtime = require("react/jsx-runtime");
40
41
  var ContentWithQuestion = ({
41
42
  content,
42
43
  tooltip,
@@ -51,10 +52,14 @@ var ContentWithQuestion = ({
51
52
  const prefixCls = getPrefixCls("content-with-question", customizePrefixCls);
52
53
  const { wrapSSR } = (0, import_style.default)(prefixCls);
53
54
  const getIcon = (iconConfig) => {
54
- return iconConfig ? /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { ...tooltip }, (0, import_react.isValidElement)(iconConfig) ? iconConfig : /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, { className: `${prefixCls}-help` })) : null;
55
+ return iconConfig ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { ...tooltip, children: (0, import_react.isValidElement)(iconConfig) ? iconConfig : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.QuestionCircleOutlined, { className: `${prefixCls}-help` }) }) : null;
55
56
  };
56
57
  return wrapSSR(
57
- /* @__PURE__ */ import_react.default.createElement("span", { className: (0, import_classnames.default)(`${prefixCls}-item`, className), ...restProps }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, null, getIcon(prefixIcon), /* @__PURE__ */ import_react.default.createElement("span", { "data-testid": "content" }, content ?? children), getIcon(suffixIcon)))
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_classnames.default)(`${prefixCls}-item`, className), ...restProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { children: [
59
+ getIcon(prefixIcon),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "data-testid": "content", children: content ?? children }),
61
+ getIcon(suffixIcon)
62
+ ] }) })
58
63
  );
59
64
  };
60
65
  var ContentWithQuestion_default = ContentWithQuestion;