@oceanbase/ui 0.2.34 → 0.2.35

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.
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
29
29
  export declare const THEME_LIGHT = "light";
30
30
  declare const ThemeTypes: ["dark", "light"];
31
31
  export type ThemeType = (typeof ThemeTypes)[number];
32
- declare const supportedLanguages: ("ruby" | "css" | "json" | "sql" | "tsx" | "javascript" | "typescript" | "groovy" | "java" | "python" | "bash" | "cpp" | "http" | "markdown" | "nginx" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "jsx")[];
32
+ declare const supportedLanguages: ("ruby" | "css" | "java" | "json" | "bash" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "tsx" | "jsx")[];
33
33
  export type LanguageType = (typeof supportedLanguages)[number] | 'html';
34
34
  export interface HighlightProps extends LocaleWrapperProps {
35
35
  /**
@@ -111,7 +111,8 @@ var Highlight = function Highlight(props) {
111
111
  theme = _props$theme === void 0 ? THEME_LIGHT : _props$theme,
112
112
  _props$onCopyChange = props.onCopyChange,
113
113
  onCopyChange = _props$onCopyChange === void 0 ? function () {} : _props$onCopyChange,
114
- language = props.language;
114
+ language = props.language,
115
+ locale = props.locale;
115
116
  var prefixCls = getPrefix('highlight');
116
117
  var themeClass = theme === THEME_DARK ? "".concat(prefixCls, "-dark") : "".concat(prefixCls, "-light");
117
118
  var codeRef = /*#__PURE__*/React.createRef();
@@ -203,7 +204,7 @@ var Highlight = function Highlight(props) {
203
204
  onCopy: function onCopy(value) {
204
205
  onCopyChange(value);
205
206
  setCopied(true);
206
- message.success('Copied');
207
+ message.success(locale.copied);
207
208
  var tempCopyId = window.setTimeout(function () {
208
209
  setCopied(false);
209
210
  }, 2000);
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ copied: string;
3
+ };
2
4
  export default _default;
@@ -1 +1,3 @@
1
- export default {};
1
+ export default {
2
+ copied: 'Copied'
3
+ };
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ copied: string;
3
+ };
2
4
  export default _default;
@@ -1 +1,3 @@
1
- export default {};
1
+ export default {
2
+ copied: '复制成功'
3
+ };
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ copied: string;
3
+ };
2
4
  export default _default;
@@ -1 +1,3 @@
1
- export default {};
1
+ export default {
2
+ copied: '複製成功'
3
+ };
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
29
29
  export declare const THEME_LIGHT = "light";
30
30
  declare const ThemeTypes: ["dark", "light"];
31
31
  export type ThemeType = (typeof ThemeTypes)[number];
32
- declare const supportedLanguages: ("ruby" | "css" | "json" | "sql" | "tsx" | "javascript" | "typescript" | "groovy" | "java" | "python" | "bash" | "cpp" | "http" | "markdown" | "nginx" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "jsx")[];
32
+ declare const supportedLanguages: ("ruby" | "css" | "java" | "json" | "bash" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "tsx" | "jsx")[];
33
33
  export type LanguageType = (typeof supportedLanguages)[number] | 'html';
34
34
  export interface HighlightProps extends LocaleWrapperProps {
35
35
  /**
@@ -114,7 +114,8 @@ var Highlight = (props) => {
114
114
  theme = THEME_LIGHT,
115
115
  onCopyChange = () => {
116
116
  },
117
- language
117
+ language,
118
+ locale
118
119
  } = props;
119
120
  const prefixCls = (0, import_util.getPrefix)("highlight");
120
121
  const themeClass = theme === THEME_DARK ? `${prefixCls}-dark` : `${prefixCls}-light`;
@@ -184,7 +185,7 @@ var Highlight = (props) => {
184
185
  onCopy: (value) => {
185
186
  onCopyChange(value);
186
187
  setCopied(true);
187
- import_design2.message.success("Copied");
188
+ import_design2.message.success(locale.copied);
188
189
  const tempCopyId = window.setTimeout(() => {
189
190
  setCopied(false);
190
191
  }, 2e3);
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ copied: string;
3
+ };
2
4
  export default _default;
@@ -22,4 +22,6 @@ __export(en_US_exports, {
22
22
  default: () => en_US_default
23
23
  });
24
24
  module.exports = __toCommonJS(en_US_exports);
25
- var en_US_default = {};
25
+ var en_US_default = {
26
+ copied: "Copied"
27
+ };
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ copied: string;
3
+ };
2
4
  export default _default;
@@ -22,4 +22,6 @@ __export(zh_CN_exports, {
22
22
  default: () => zh_CN_default
23
23
  });
24
24
  module.exports = __toCommonJS(zh_CN_exports);
25
- var zh_CN_default = {};
25
+ var zh_CN_default = {
26
+ copied: "复制成功"
27
+ };
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ copied: string;
3
+ };
2
4
  export default _default;
@@ -22,4 +22,6 @@ __export(zh_TW_exports, {
22
22
  default: () => zh_TW_default
23
23
  });
24
24
  module.exports = __toCommonJS(zh_TW_exports);
25
- var zh_TW_default = {};
25
+ var zh_TW_default = {
26
+ copied: "複製成功"
27
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanbase/ui",
3
- "version": "0.2.34",
3
+ "version": "0.2.35",
4
4
  "description": "The UI library based on OceanBase Design",
5
5
  "keywords": [
6
6
  "oceanbase",
@@ -37,18 +37,18 @@
37
37
  "@ant-design/cssinjs": "^1.17.2",
38
38
  "@ant-design/pro-components": "^2.6.43",
39
39
  "@ant-design/pro-layout": "^7.17.16",
40
- "@oceanbase/design": "^0.2.33",
41
- "@oceanbase/icons": "^0.2.9",
42
- "@oceanbase/util": "^0.2.12",
40
+ "@oceanbase/design": "^0.2.34",
41
+ "@oceanbase/icons": "^0.2.10",
42
+ "@oceanbase/util": "^0.2.13",
43
43
  "ahooks": "^2.10.14",
44
- "classnames": "^2.3.2",
44
+ "classnames": "^2.5.1",
45
45
  "dayjs": "^1.11.10",
46
46
  "diff": "^5.1.0",
47
47
  "highlight.js": "^11.9.0",
48
48
  "highlightjs-solidity": "^2.0.6",
49
49
  "hoist-non-react-statics": "^3.3.2",
50
50
  "lodash": "^4.17.21",
51
- "moment": "^2.29.4",
51
+ "moment": "^2.30.1",
52
52
  "path-to-regexp": "^6.2.1",
53
53
  "randexp": "^0.5.3",
54
54
  "rc-util": "^5.38.1",
@@ -65,5 +65,5 @@
65
65
  "react": ">=16.9.0",
66
66
  "react-dom": ">=16.9.0"
67
67
  },
68
- "gitHead": "c03648d49a5b31ea30f114fb47c44d6184931bde"
68
+ "gitHead": "d99fa5230d5efc3645791b731734fc78eb126c2c"
69
69
  }