@patternfly/react-code-editor 6.0.0-alpha.33 → 6.0.0-alpha.34
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [6.0.0-alpha.34](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.0.0-alpha.33...@patternfly/react-code-editor@6.0.0-alpha.34) (2024-02-19)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **Chip:** use Label internally, deprecate Chip ([#10049](https://github.com/patternfly/patternfly-react/issues/10049)) ([5cdb725](https://github.com/patternfly/patternfly-react/commit/5cdb72536f8dd291e42be09bc6454ac591adc606))
|
|
11
|
+
|
|
6
12
|
# [6.0.0-alpha.33](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.0.0-alpha.32...@patternfly/react-code-editor@6.0.0-alpha.33) (2024-02-16)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-code-editor",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.34",
|
|
4
4
|
"description": "This package provides a PatternFly wrapper for the Monaco code editor\n",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@monaco-editor/react": "^4.6.0",
|
|
34
|
-
"@patternfly/react-core": "^6.0.0-alpha.
|
|
34
|
+
"@patternfly/react-core": "^6.0.0-alpha.34",
|
|
35
35
|
"@patternfly/react-icons": "^6.0.0-alpha.12",
|
|
36
36
|
"@patternfly/react-styles": "^6.0.0-alpha.12",
|
|
37
37
|
"react-dropzone": "14.2.3",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"rimraf": "^2.6.2",
|
|
46
46
|
"typescript": "^4.7.4"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "63b08e20d51c68fd202a07d2dadf798b994226ad"
|
|
49
49
|
}
|
|
@@ -15,11 +15,13 @@ import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
|
|
|
15
15
|
### Basic
|
|
16
16
|
|
|
17
17
|
```ts file="./CodeEditorBasic.tsx"
|
|
18
|
+
|
|
18
19
|
```
|
|
19
20
|
|
|
20
21
|
### With sizeToFit height, height will grow/shrink with content
|
|
21
22
|
|
|
22
23
|
```ts file="./CodeEditorSizeToFit.tsx"
|
|
24
|
+
|
|
23
25
|
```
|
|
24
26
|
|
|
25
27
|
### With shortcut menu and main header content
|
|
@@ -27,14 +29,17 @@ import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
|
|
|
27
29
|
These examples below are the shortcuts that we recommend describing in the popover since they are monaco features.
|
|
28
30
|
|
|
29
31
|
```ts file="./CodeEditorShortcutMainHeader.tsx"
|
|
32
|
+
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
### With actions
|
|
33
36
|
|
|
34
37
|
```ts file="./CodeEditorWithActions.tsx"
|
|
38
|
+
|
|
35
39
|
```
|
|
36
40
|
|
|
37
41
|
### With custom control
|
|
38
42
|
|
|
39
43
|
```ts file="CodeEditorCustomControl.tsx"
|
|
44
|
+
|
|
40
45
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CodeEditor, Language } from '@patternfly/react-code-editor';
|
|
3
|
-
import { Grid, GridItem,
|
|
3
|
+
import { Grid, GridItem, Label } from '@patternfly/react-core';
|
|
4
4
|
|
|
5
5
|
export const CodeEditorShortcutMainHeader: React.FunctionComponent = () => {
|
|
6
6
|
const onEditorDidMount = (editor, monaco) => {
|
|
@@ -40,9 +40,9 @@ export const CodeEditorShortcutMainHeader: React.FunctionComponent = () => {
|
|
|
40
40
|
<GridItem style={{ textAlign: 'right', marginRight: '1em' }}>
|
|
41
41
|
{shortcut.keys
|
|
42
42
|
.map((key) => (
|
|
43
|
-
<
|
|
43
|
+
<Label variant="outline" key={key}>
|
|
44
44
|
{key}
|
|
45
|
-
</
|
|
45
|
+
</Label>
|
|
46
46
|
))
|
|
47
47
|
.reduce((prev, curr) => (
|
|
48
48
|
<>{[prev, ' + ', curr]}</>
|