@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.
- package/dist/ui.min.js +1 -1
- package/es/Highlight/index.d.ts +1 -1
- package/es/Highlight/index.js +3 -2
- package/es/Highlight/locale/en-US.d.ts +3 -1
- package/es/Highlight/locale/en-US.js +3 -1
- package/es/Highlight/locale/zh-CN.d.ts +3 -1
- package/es/Highlight/locale/zh-CN.js +3 -1
- package/es/Highlight/locale/zh-TW.d.ts +3 -1
- package/es/Highlight/locale/zh-TW.js +3 -1
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/Highlight/index.js +3 -2
- package/lib/Highlight/locale/en-US.d.ts +3 -1
- package/lib/Highlight/locale/en-US.js +3 -1
- package/lib/Highlight/locale/zh-CN.d.ts +3 -1
- package/lib/Highlight/locale/zh-CN.js +3 -1
- package/lib/Highlight/locale/zh-TW.d.ts +3 -1
- package/lib/Highlight/locale/zh-TW.js +3 -1
- package/package.json +7 -7
package/es/Highlight/index.d.ts
CHANGED
|
@@ -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" | "
|
|
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
|
/**
|
package/es/Highlight/index.js
CHANGED
|
@@ -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(
|
|
207
|
+
message.success(locale.copied);
|
|
207
208
|
var tempCopyId = window.setTimeout(function () {
|
|
208
209
|
setCopied(false);
|
|
209
210
|
}, 2000);
|
package/lib/Highlight/index.d.ts
CHANGED
|
@@ -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" | "
|
|
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
|
/**
|
package/lib/Highlight/index.js
CHANGED
|
@@ -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(
|
|
188
|
+
import_design2.message.success(locale.copied);
|
|
188
189
|
const tempCopyId = window.setTimeout(() => {
|
|
189
190
|
setCopied(false);
|
|
190
191
|
}, 2e3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.2.
|
|
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.
|
|
41
|
-
"@oceanbase/icons": "^0.2.
|
|
42
|
-
"@oceanbase/util": "^0.2.
|
|
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.
|
|
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.
|
|
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": "
|
|
68
|
+
"gitHead": "d99fa5230d5efc3645791b731734fc78eb126c2c"
|
|
69
69
|
}
|