@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
@@ -40,6 +40,7 @@ var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
40
40
  var import_util = require("../_util");
41
41
  var import_zh_CN = __toESM(require("./locale/zh-CN"));
42
42
  var import_index = require("./index.less");
43
+ var import_jsx_runtime = require("react/jsx-runtime");
43
44
  var prefix = (0, import_util.getPrefix)("fullscreen-box");
44
45
  var FullscreenBox = import_react.default.forwardRef(
45
46
  ({ style, header, className, defaultMode, children, onChange }, ref) => {
@@ -90,7 +91,7 @@ var FullscreenBox = import_react.default.forwardRef(
90
91
  changeFullscreen(fullscreen);
91
92
  }
92
93
  }));
93
- const icon = innerFullscreen ? /* @__PURE__ */ import_react.default.createElement(import_icons.FullscreenExitOutlined, { className: `${prefix}-header-icon`, onClick: toggleFullscreen }) : /* @__PURE__ */ import_react.default.createElement(import_icons.FullscreenOutlined, { className: `${prefix}-header-icon`, onClick: toggleFullscreen });
94
+ const icon = innerFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.FullscreenExitOutlined, { className: `${prefix}-header-icon`, onClick: toggleFullscreen }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.FullscreenOutlined, { className: `${prefix}-header-icon`, onClick: toggleFullscreen });
94
95
  if (innerFullscreen) {
95
96
  document.body.classList.add(`${prefix}-body-overflow-hidden`);
96
97
  } else {
@@ -106,19 +107,27 @@ var FullscreenBox = import_react.default.forwardRef(
106
107
  } else {
107
108
  const title = isStringHeader ? header : isComplexHeader && header.title;
108
109
  const extra = isComplexHeader && header.extra;
109
- headerContent = /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-header`, "data-testid": "header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-header-left` }, icon, title && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}-header-title ` }, title)), isComplexHeader && extra && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-header-extra` }, extra));
110
+ headerContent = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefix}-header`, "data-testid": "header", children: [
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefix}-header-left`, children: [
112
+ icon,
113
+ title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-header-title `, children: title })
114
+ ] }),
115
+ isComplexHeader && extra && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-header-extra`, children: extra })
116
+ ] });
110
117
  }
111
- return /* @__PURE__ */ import_react.default.createElement(
118
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
112
119
  "div",
113
120
  {
114
121
  ref: containerRef,
115
122
  style,
116
123
  className: (0, import_classnames.default)(prefix, className, {
117
124
  [`${prefix}-fullscreen`]: innerFullscreen
118
- })
119
- },
120
- headerContent,
121
- children
125
+ }),
126
+ children: [
127
+ headerContent,
128
+ children
129
+ ]
130
+ }
122
131
  );
123
132
  }
124
133
  );
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,25 @@
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/FullscreenBox/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 = {};
@@ -37,13 +37,14 @@ var import_icons = require("@oceanbase/icons");
37
37
  var import_util = require("@oceanbase/util");
38
38
  var import_design = require("@oceanbase/design");
39
39
  var import_lodash = require("lodash");
40
- var import_react = __toESM(require("react"));
40
+ var import_react = require("react");
41
41
  var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
42
42
  var import_util2 = require("../_util");
43
43
  var import_zh_CN = __toESM(require("./locale/zh-CN"));
44
44
  var import_graph_fit_view_icon = __toESM(require("../assets/graph_fit_view_icon.svg"));
45
45
  var import_graph_reset_icon = __toESM(require("../assets/graph_reset_icon.svg"));
46
46
  var import_index = require("./index.less");
47
+ var import_jsx_runtime = require("react/jsx-runtime");
47
48
  function getCenterPointByGraph(graph) {
48
49
  const group = graph == null ? void 0 : graph.get("group");
49
50
  if (group) {
@@ -79,70 +80,81 @@ var GraphToolbar = ({
79
80
  }, 16)
80
81
  );
81
82
  }, [graph]);
82
- return /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: 16, className: `${prefix} ${`${prefix}-${mode}`} ${className}` }, showFullscreen && /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.fullscreen }, /* @__PURE__ */ import_react.default.createElement(
83
- import_icons.FullscreenOutlined,
84
- {
85
- className: "pointable",
86
- onClick: () => {
87
- if (onFullscreen) {
88
- onFullscreen();
83
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: 16, className: `${prefix} ${`${prefix}-${mode}`} ${className}`, children: [
84
+ showFullscreen && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: locale.fullscreen, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
+ import_icons.FullscreenOutlined,
86
+ {
87
+ className: "pointable",
88
+ onClick: () => {
89
+ if (onFullscreen) {
90
+ onFullscreen();
91
+ }
89
92
  }
90
93
  }
91
- }
92
- )), /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}-zoom-wrapper` }, /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.shrink }, /* @__PURE__ */ import_react.default.createElement(
93
- import_icons.MinusOutlined,
94
- {
95
- className: zoom >= 0.3 ? `${prefix}-pointable` : `${prefix}-disabled`,
96
- onClick: () => {
97
- if (zoom >= 0.3) {
98
- const newZoom = zoom - 0.1;
99
- setZoom(newZoom);
100
- graph == null ? void 0 : graph.zoomTo(newZoom, getCenterPointByGraph(graph));
94
+ ) }),
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefix}-zoom-wrapper`, children: [
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: locale.shrink, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
97
+ import_icons.MinusOutlined,
98
+ {
99
+ className: zoom >= 0.3 ? `${prefix}-pointable` : `${prefix}-disabled`,
100
+ onClick: () => {
101
+ if (zoom >= 0.3) {
102
+ const newZoom = zoom - 0.1;
103
+ setZoom(newZoom);
104
+ graph == null ? void 0 : graph.zoomTo(newZoom, getCenterPointByGraph(graph));
105
+ }
106
+ }
101
107
  }
102
- }
103
- }
104
- )), (0, import_util.toPercent)(zoom), /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.enlarge }, /* @__PURE__ */ import_react.default.createElement(
105
- import_icons.PlusOutlined,
106
- {
107
- className: zoom <= 0.9 ? `${prefix}-pointable` : `${prefix}-disabled`,
108
- onClick: () => {
109
- if (zoom <= 0.9) {
110
- const newZoom = zoom + 0.1;
111
- setZoom(newZoom);
112
- graph == null ? void 0 : graph.zoomTo(newZoom, getCenterPointByGraph(graph));
108
+ ) }),
109
+ (0, import_util.toPercent)(zoom),
110
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: locale.enlarge, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
111
+ import_icons.PlusOutlined,
112
+ {
113
+ className: zoom <= 0.9 ? `${prefix}-pointable` : `${prefix}-disabled`,
114
+ onClick: () => {
115
+ if (zoom <= 0.9) {
116
+ const newZoom = zoom + 0.1;
117
+ setZoom(newZoom);
118
+ graph == null ? void 0 : graph.zoomTo(newZoom, getCenterPointByGraph(graph));
119
+ }
120
+ }
121
+ }
122
+ ) })
123
+ ] }),
124
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: locale.reset, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
+ "img",
126
+ {
127
+ src: import_graph_reset_icon.default,
128
+ alt: "",
129
+ className: `${prefix}-pointable`,
130
+ onClick: () => {
131
+ setZoom(1);
132
+ graph == null ? void 0 : graph.zoomTo(1, getCenterPointByGraph(graph));
113
133
  }
114
134
  }
115
- }
116
- ))), /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.reset }, /* @__PURE__ */ import_react.default.createElement(
117
- "img",
118
- {
119
- src: import_graph_reset_icon.default,
120
- alt: "",
121
- className: `${prefix}-pointable`,
122
- onClick: () => {
123
- setZoom(1);
124
- graph == null ? void 0 : graph.zoomTo(1, getCenterPointByGraph(graph));
125
- }
126
- }
127
- )), /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.fitView }, /* @__PURE__ */ import_react.default.createElement(
128
- "img",
129
- {
130
- src: import_graph_fit_view_icon.default,
131
- alt: "",
132
- className: `${prefix}-pointable`,
133
- onClick: () => {
134
- graph == null ? void 0 : graph.fitView();
135
+ ) }),
136
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: locale.fitView, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
137
+ "img",
138
+ {
139
+ src: import_graph_fit_view_icon.default,
140
+ alt: "",
141
+ className: `${prefix}-pointable`,
142
+ onClick: () => {
143
+ graph == null ? void 0 : graph.fitView();
144
+ }
135
145
  }
136
- }
137
- )), onReload && /* @__PURE__ */ import_react.default.createElement("span", null, /* @__PURE__ */ import_react.default.createElement(import_design.Divider, { type: "vertical", className: `${prefix}-divider` })), onReload && /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.refresh }, /* @__PURE__ */ import_react.default.createElement("span", null, /* @__PURE__ */ import_react.default.createElement(
138
- import_icons.SyncOutlined,
139
- {
140
- className: `${prefix}-pointable`,
141
- onClick: () => {
142
- onReload();
146
+ ) }),
147
+ onReload && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Divider, { type: "vertical", className: `${prefix}-divider` }) }),
148
+ onReload && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: locale.refresh, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
149
+ import_icons.SyncOutlined,
150
+ {
151
+ className: `${prefix}-pointable`,
152
+ onClick: () => {
153
+ onReload();
154
+ }
143
155
  }
144
- }
145
- ))));
156
+ ) }) })
157
+ ] });
146
158
  };
147
159
  var GraphToolbar_default = (0, import_LocaleWrapper.default)({
148
160
  componentName: "GraphToolbar",
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ fullscreen: string;
3
+ shrink: string;
4
+ enlarge: string;
5
+ reset: string;
6
+ fitView: string;
7
+ refresh: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,32 @@
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/GraphToolbar/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
+ fullscreen: "フルスクリーン",
27
+ shrink: "縮小",
28
+ enlarge: "拡大",
29
+ reset: "元の比率を表示",
30
+ fitView: "キャンバスに合わせる",
31
+ refresh: "更新"
32
+ };
@@ -33,7 +33,7 @@ __export(DiffCells_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(DiffCells_exports);
35
35
  var import_classnames = __toESM(require("classnames"));
36
- var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
37
  function DiffCells({
38
38
  diffPrefixCls,
39
39
  data,
@@ -58,13 +58,20 @@ function DiffCells({
58
58
  if (rowIndex !== void 0) {
59
59
  rowIndex += rowOffset;
60
60
  }
61
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("td", { className: (0, import_classnames.default)(`${diffPrefixCls}-index`, mergedClassName, hashId) }, rowIndex), /* @__PURE__ */ React.createElement("td", { className: (0, import_classnames.default)(`${diffPrefixCls}-mark`, mergedClassName, hashId) }, add && "+", remove && "-"), /* @__PURE__ */ React.createElement(
62
- "td",
63
- {
64
- onMouseDown,
65
- style: { width, userSelect: lock ? "none" : void 0 },
66
- className: (0, import_classnames.default)(`${diffPrefixCls}-code`, mergedClassName, hashId),
67
- dangerouslySetInnerHTML: { __html: (data == null ? void 0 : data.value) ?? (emptyText || "") }
68
- }
69
- ));
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: (0, import_classnames.default)(`${diffPrefixCls}-index`, mergedClassName, hashId), children: rowIndex }),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("td", { className: (0, import_classnames.default)(`${diffPrefixCls}-mark`, mergedClassName, hashId), children: [
64
+ add && "+",
65
+ remove && "-"
66
+ ] }),
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
68
+ "td",
69
+ {
70
+ onMouseDown,
71
+ style: { width, userSelect: lock ? "none" : void 0 },
72
+ className: (0, import_classnames.default)(`${diffPrefixCls}-code`, mergedClassName, hashId),
73
+ dangerouslySetInnerHTML: { __html: (data == null ? void 0 : data.value) ?? (emptyText || "") }
74
+ }
75
+ )
76
+ ] });
70
77
  }
@@ -42,6 +42,7 @@ var import_util = require("../../_util");
42
42
  var import_useKeyDownCopyEvent = require("../useKeyDownCopyEvent");
43
43
  var import_DiffCells = __toESM(require("./DiffCells"));
44
44
  var import__2 = require("../index.less");
45
+ var import_jsx_runtime = require("react/jsx-runtime");
45
46
  var MAX_MERGE_TIMES = 1e4;
46
47
  var EMPTY_TEXT = `<span class="hljs-comment">// 没有数据</span>`;
47
48
  function getHighlightRows(language, code) {
@@ -221,7 +222,7 @@ var DiffView = ({
221
222
  }, [diffData]);
222
223
  let viewRows;
223
224
  if (!report) {
224
- viewRows = /* @__PURE__ */ import_react.default.createElement("tr", null, /* @__PURE__ */ import_react.default.createElement(
225
+ viewRows = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
225
226
  import_DiffCells.default,
226
227
  {
227
228
  width: "100%",
@@ -232,34 +233,37 @@ var DiffView = ({
232
233
  type: "keep"
233
234
  }
234
235
  }
235
- ));
236
+ ) });
236
237
  } else if (split) {
237
- viewRows = mergedData.rows.map(({ source: src, target: tgt }, index) => /* @__PURE__ */ import_react.default.createElement("tr", { key: index }, /* @__PURE__ */ import_react.default.createElement(
238
- import_DiffCells.default,
239
- {
240
- width: "50%",
241
- diffPrefixCls,
242
- data: src,
243
- emptyText: index === 0 && mergedData.sourceEmpty && EMPTY_TEXT,
244
- onMouseDown: onSourceMouseDown,
245
- lock: selectable !== "source",
246
- rowOffset: rowOffsetSrc
247
- }
248
- ), /* @__PURE__ */ import_react.default.createElement(
249
- import_DiffCells.default,
250
- {
251
- width: "50%",
252
- diffPrefixCls,
253
- data: tgt,
254
- emptyText: index === 0 && mergedData.targetEmpty && EMPTY_TEXT,
255
- onMouseDown: onTargetMouseDown,
256
- lock: selectable !== "target",
257
- rowOffset: rowOffsetTgt
258
- }
259
- )));
238
+ viewRows = mergedData.rows.map(({ source: src, target: tgt }, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
239
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
240
+ import_DiffCells.default,
241
+ {
242
+ width: "50%",
243
+ diffPrefixCls,
244
+ data: src,
245
+ emptyText: index === 0 && mergedData.sourceEmpty && EMPTY_TEXT,
246
+ onMouseDown: onSourceMouseDown,
247
+ lock: selectable !== "source",
248
+ rowOffset: rowOffsetSrc
249
+ }
250
+ ),
251
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
252
+ import_DiffCells.default,
253
+ {
254
+ width: "50%",
255
+ diffPrefixCls,
256
+ data: tgt,
257
+ emptyText: index === 0 && mergedData.targetEmpty && EMPTY_TEXT,
258
+ onMouseDown: onTargetMouseDown,
259
+ lock: selectable !== "target",
260
+ rowOffset: rowOffsetTgt
261
+ }
262
+ )
263
+ ] }, index));
260
264
  } else {
261
265
  viewRows = diffData.sourceRows.map((src, index) => {
262
- return /* @__PURE__ */ import_react.default.createElement("tr", { key: index }, /* @__PURE__ */ import_react.default.createElement(
266
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
263
267
  import_DiffCells.default,
264
268
  {
265
269
  width: "100%",
@@ -267,12 +271,12 @@ var DiffView = ({
267
271
  data: src ?? diffData.targetRows[index],
268
272
  rowOffset: rowOffsetTgt
269
273
  }
270
- ));
274
+ ) }, index);
271
275
  });
272
276
  }
273
277
  const codeRef = import_react.default.useRef();
274
278
  (0, import_useKeyDownCopyEvent.useKeyDownCopyEvent)(codeRef);
275
- return /* @__PURE__ */ import_react.default.createElement(
279
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
276
280
  "div",
277
281
  {
278
282
  style: {
@@ -289,9 +293,9 @@ var DiffView = ({
289
293
  [`${diffPrefixCls}-split`]: split
290
294
  },
291
295
  className
292
- )
293
- },
294
- /* @__PURE__ */ import_react.default.createElement("table", null, /* @__PURE__ */ import_react.default.createElement("tbody", null, viewRows))
296
+ ),
297
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("table", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: viewRows }) })
298
+ }
295
299
  );
296
300
  };
297
301
  var DiffView_default = DiffView;
@@ -33,7 +33,7 @@ __export(HighlightCell_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(HighlightCell_exports);
35
35
  var import_classnames = __toESM(require("classnames"));
36
- var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
37
  function HighlightCell({
38
38
  prefixCls,
39
39
  theme,
@@ -46,13 +46,16 @@ function HighlightCell({
46
46
  hashId
47
47
  }) {
48
48
  const rowIndex = data == null ? void 0 : data.index;
49
- return /* @__PURE__ */ React.createElement(React.Fragment, null, lineNumber ? /* @__PURE__ */ React.createElement("td", { className: (0, import_classnames.default)(`${prefixCls}-${theme}-index`, `${prefixCls}-index`, hashId) }, rowIndex) : null, /* @__PURE__ */ React.createElement(
50
- "td",
51
- {
52
- onMouseDown,
53
- style: { width, userSelect: lock ? "none" : void 0 },
54
- className: (0, import_classnames.default)(`${prefixCls}-content`, hashId),
55
- dangerouslySetInnerHTML: { __html: (data == null ? void 0 : data.value) ?? (emptyText || "") }
56
- }
57
- ));
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
50
+ lineNumber ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: (0, import_classnames.default)(`${prefixCls}-${theme}-index`, `${prefixCls}-index`, hashId), children: rowIndex }) : null,
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
+ "td",
53
+ {
54
+ onMouseDown,
55
+ style: { width, userSelect: lock ? "none" : void 0 },
56
+ className: (0, import_classnames.default)(`${prefixCls}-content`, hashId),
57
+ dangerouslySetInnerHTML: { __html: (data == null ? void 0 : data.value) ?? (emptyText || "") }
58
+ }
59
+ )
60
+ ] });
58
61
  }
@@ -33,12 +33,13 @@ __export(JsonView_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(JsonView_exports);
35
35
  var import_classnames = __toESM(require("classnames"));
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_react_json_view = __toESM(require("react-json-view"));
38
38
  var import_util = require("../_util");
39
39
  var import__ = require(".");
40
40
  var import_useKeyDownCopyEvent = require("./useKeyDownCopyEvent");
41
41
  var import_index = require("./index.less");
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var JsonView_default = ({
43
44
  json,
44
45
  theme,
@@ -53,7 +54,7 @@ var JsonView_default = ({
53
54
  const isDarkTheme = theme === import__.THEME_DARK;
54
55
  const codeRef = (0, import_react.useRef)();
55
56
  (0, import_useKeyDownCopyEvent.useKeyDownCopyEvent)(codeRef);
56
- return /* @__PURE__ */ import_react.default.createElement(
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
58
  "div",
58
59
  {
59
60
  style,
@@ -66,18 +67,18 @@ var JsonView_default = ({
66
67
  [`${prefixCls}-light`]: !isDarkTheme
67
68
  },
68
69
  className
70
+ ),
71
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
+ import_react_json_view.default,
73
+ {
74
+ enableClipboard: copyable && onCopyChange,
75
+ src: json,
76
+ theme: isDarkTheme ? "ocean" : void 0,
77
+ displayDataTypes: false,
78
+ style: { height },
79
+ name: false
80
+ }
69
81
  )
70
- },
71
- /* @__PURE__ */ import_react.default.createElement(
72
- import_react_json_view.default,
73
- {
74
- enableClipboard: copyable && onCopyChange,
75
- src: json,
76
- theme: isDarkTheme ? "ocean" : void 0,
77
- displayDataTypes: false,
78
- style: { height },
79
- name: false
80
- }
81
- )
82
+ }
82
83
  );
83
84
  };