@scm-manager/scm-code-editor-plugin 1.0.1 → 1.0.2-20230013-085323

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scm-manager/scm-code-editor-plugin",
3
3
  "private": false,
4
- "version": "1.0.1",
4
+ "version": "1.0.2-20230013-085323",
5
5
  "license": "MIT",
6
6
  "main": "./src/main/js/index.tsx",
7
7
  "scripts": {
@@ -19,12 +19,12 @@
19
19
  "query-string": "^5.0.1",
20
20
  "react": "^17.0.1",
21
21
  "react-ace": "^9.1.4",
22
+ "react-hook-form": "^7.5.1",
22
23
  "react-i18next": "^10.13.1",
23
24
  "react-redux": "^5.0.7",
24
25
  "react-router-dom": "^5.1.2",
25
26
  "redux": "^4.0.0",
26
- "styled-components": "^5.1.0",
27
- "react-hook-form": "^7.5.1"
27
+ "styled-components": "^5.1.0"
28
28
  },
29
29
  "babel": {
30
30
  "presets": [
@@ -42,6 +42,7 @@
42
42
  "@scm-manager/babel-preset": "^2.12.0",
43
43
  "@scm-manager/eslint-config": "^2.12.0",
44
44
  "@scm-manager/jest-preset": "^2.12.7",
45
+ "@scm-manager/plugin-scripts": "1.0.1",
45
46
  "@scm-manager/prettier-config": "^2.10.1",
46
47
  "@scm-manager/tsconfig": "^2.12.0",
47
48
  "@scm-manager/ui-scripts": "^2.26.0",
@@ -57,8 +58,7 @@
57
58
  "@types/react-redux": "5.0.7",
58
59
  "@types/react-router-dom": "^5.1.0",
59
60
  "@types/styled-components": "^5.1.0",
60
- "jest": "^24.9.0",
61
- "@scm-manager/plugin-scripts": "1.0.1"
61
+ "jest": "^24.9.0"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public"
@@ -66,4 +66,4 @@
66
66
  "files": [
67
67
  "src/main/js"
68
68
  ]
69
- }
69
+ }
@@ -36,6 +36,7 @@ type Props = WithTranslation & {
36
36
  language: string;
37
37
  disabled?: boolean;
38
38
  className?: string;
39
+ initialFocus?: boolean;
39
40
  onChange: (value: string) => void;
40
41
  };
41
42
 
@@ -94,7 +95,7 @@ class CodeEditor extends Component<Props, State> {
94
95
  };
95
96
 
96
97
  render() {
97
- const { content, disabled, className, onChange, t } = this.props;
98
+ const { content, disabled, className, onChange, initialFocus = false, t } = this.props;
98
99
  const { language, loading, error } = this.state;
99
100
 
100
101
  if (loading) {
@@ -116,6 +117,7 @@ class CodeEditor extends Component<Props, State> {
116
117
  fontSize="14px"
117
118
  setOptions={{ useWorker: false }}
118
119
  placeholder={t("scm-editor-plugin.edit.placeholder")}
120
+ focus={initialFocus}
119
121
  />
120
122
  );
121
123
  }