react-ace
Advanced tools
Comparing version 9.0.0 to 9.1.0
@@ -1,1 +0,1 @@ | ||
{"processes":{"a3393e5a-c87a-4d4d-8a84-b6932640d208":{"parent":null,"children":["a7d22186-f650-4fa9-8e62-9918e28582a4"]},"a7d22186-f650-4fa9-8e62-9918e28582a4":{"parent":"a3393e5a-c87a-4d4d-8a84-b6932640d208","children":[]}},"files":{},"externalIds":{}} | ||
{"processes":{"56fd9de5-aa0f-433a-9258-0e88da1333ca":{"parent":null,"children":["98a1ea7e-ab7d-4a16-9deb-862859398b1c"]},"98a1ea7e-ab7d-4a16-9deb-862859398b1c":{"parent":"56fd9de5-aa0f-433a-9258-0e88da1333ca","children":[]}},"files":{},"externalIds":{}} |
# Changelog | ||
## 9.1.0 | ||
- fix typescript binding for ICommand.exec() (#860) | ||
- Remove default value for editor value. (#857) | ||
- fix no ace_editor.css in shadow dom (#864) | ||
- update build dependencies, build scripts, and prettier | ||
## 9.0.0 | ||
- Use Ace.Editor types - Possible breaking change (#828) | ||
- Upgrade dev dependencies | ||
- Enables simple Server Side Rendering support (#841) | ||
## 8.1.0 | ||
- Fixes iAceEditorProps.mode prop to include support custom mode | ||
- Fix theme not set properly for split editor (#785) | ||
- Fixes types for print margin option | ||
- Upgrade dev dependencies | ||
## 8.0.0 | ||
@@ -4,0 +24,0 @@ |
@@ -67,2 +67,3 @@ import { Ace } from "ace-builds"; | ||
constructor(props: IAceEditorProps); | ||
isInShadow(node: HTMLElement): boolean; | ||
componentDidMount(): void; | ||
@@ -69,0 +70,0 @@ componentDidUpdate(prevProps: IAceEditorProps): void; |
@@ -43,2 +43,12 @@ "use strict"; | ||
} | ||
ReactAce.prototype.isInShadow = function (node) { | ||
var parent = node && node.parentNode; | ||
while (parent) { | ||
if (parent.toString() === "[object ShadowRoot]") { | ||
return true; | ||
} | ||
parent = parent.parentNode; | ||
} | ||
return false; | ||
}; | ||
ReactAce.prototype.componentDidMount = function () { | ||
@@ -59,6 +69,11 @@ var _this = this; | ||
this.editor.renderer.setScrollMargin(scrollMargin[0], scrollMargin[1], scrollMargin[2], scrollMargin[3]); | ||
if (this.isInShadow(this.refEditor)) { | ||
this.editor.renderer.attachToShadowRoot(); | ||
} | ||
this.editor.getSession().setMode("ace/mode/" + mode); | ||
this.editor.setTheme("ace/theme/" + theme); | ||
this.editor.setFontSize(typeof fontSize === "number" ? fontSize + "px" : fontSize); | ||
this.editor.getSession().setValue(!defaultValue ? value : defaultValue); | ||
this.editor | ||
.getSession() | ||
.setValue(!defaultValue ? value || "" : defaultValue); | ||
if (this.props.navigateToFileEnd) { | ||
@@ -154,3 +169,5 @@ this.editor.navigateFileEnd(); | ||
// First process editor value, as it may create a new session (see issue #300) | ||
if (this.editor && this.editor.getValue() !== nextProps.value) { | ||
if (this.editor && | ||
nextProps.value && | ||
this.editor.getValue() !== nextProps.value) { | ||
// editor.setValue is a synchronous function call, change event is emitted before setValue return. | ||
@@ -400,3 +417,2 @@ this.silent = true; | ||
width: "500px", | ||
value: "", | ||
fontSize: 12, | ||
@@ -403,0 +419,0 @@ enableSnippets: false, |
@@ -70,2 +70,3 @@ import { Ace } from "ace-builds"; | ||
constructor(props: ISplitEditorProps); | ||
isInShadow(node: HTMLElement): boolean; | ||
componentDidMount(): void; | ||
@@ -72,0 +73,0 @@ componentDidUpdate(prevProps: ISplitEditorProps): void; |
@@ -45,2 +45,12 @@ "use strict"; | ||
} | ||
SplitComponent.prototype.isInShadow = function (node) { | ||
var parent = node && node.parentNode; | ||
while (parent) { | ||
if (parent.toString() === "[object ShadowRoot]") { | ||
return true; | ||
} | ||
parent = parent.parentNode; | ||
} | ||
return false; | ||
}; | ||
SplitComponent.prototype.componentDidMount = function () { | ||
@@ -50,2 +60,5 @@ var _this = this; | ||
this.editor = ace.edit(this.refEditor); | ||
if (this.isInShadow(this.refEditor)) { | ||
this.editor.renderer.attachToShadowRoot(); | ||
} | ||
this.editor.setTheme("ace/theme/" + theme); | ||
@@ -52,0 +65,0 @@ if (onBeforeLoad) { |
@@ -56,3 +56,3 @@ import { Ace } from "ace-builds"; | ||
bindKey: ICommandBindKey; | ||
exec(): any; | ||
exec(editor: Ace.Editor, args?: any): any; | ||
} | ||
@@ -59,0 +59,0 @@ export interface IAceOptions { |
{ | ||
"name": "react-ace", | ||
"version": "9.0.0", | ||
"version": "9.1.0", | ||
"description": "A react component for Ace Editor", | ||
@@ -23,3 +23,4 @@ "main": "lib/index.js", | ||
"test": "mocha --require ts-node/register --require @babel/register --require tests/setup.js tests/src/*.spec.js --exit", | ||
"coverage": "nyc npm run test" | ||
"coverage": "nyc npm run test", | ||
"prepare": "npm run build:lib" | ||
}, | ||
@@ -57,4 +58,4 @@ "author": "James Hrisho", | ||
"minimist": ">=1.2.2", | ||
"mocha": "7.1.2", | ||
"nyc": "15.0.1", | ||
"mocha": "7.2.0", | ||
"nyc": "15.1.0", | ||
"prettier": "^2.0.5", | ||
@@ -121,4 +122,5 @@ "pretty-quick": "^2.0.0", | ||
"singleQuote": false, | ||
"trailingComma": "none" | ||
"trailingComma": "none", | ||
"arrowParens": "avoid" | ||
} | ||
} |
@@ -73,2 +73,4 @@ # React-Ace | ||
[Migrate to version 8](https://github.com/securingsincity/react-ace/blob/master/docs/Migrate-v7-to-v8.md) | ||
## Backers | ||
@@ -75,0 +77,0 @@ |
@@ -60,3 +60,3 @@ import { Ace } from "ace-builds"; | ||
bindKey: ICommandBindKey; | ||
exec(): any; | ||
exec(editor: Ace.Editor, args?: any): any; | ||
} | ||
@@ -63,0 +63,0 @@ export interface IAceOptions { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1788883
57
8463
124