@jupyterlab/codeeditor
Advanced tools
Comparing version 0.15.4 to 0.15.5
@@ -400,2 +400,6 @@ import { JSONObject } from '@phosphor/coreutils'; | ||
getPositionForCoordinate(coordinate: ICoordinate): IPosition | null; | ||
/** | ||
* Inserts a new line at the cursor position and indents it. | ||
*/ | ||
newIndentedLine(): void; | ||
} | ||
@@ -402,0 +406,0 @@ /** |
@@ -17,3 +17,4 @@ "use strict"; | ||
var widgets_1 = require("@phosphor/widgets"); | ||
var virtualdom_1 = require("@phosphor/virtualdom"); | ||
var React = require("react"); | ||
var ReactDOM = require("react-dom"); | ||
var editor_1 = require("./editor"); | ||
@@ -69,3 +70,3 @@ /** | ||
function JSONEditor(options) { | ||
var _this = _super.call(this, { node: Private.createEditorNode(options) }) || this; | ||
var _this = _super.call(this) || this; | ||
_this._dataDirty = false; | ||
@@ -76,2 +77,4 @@ _this._inputDirty = false; | ||
_this._changeGuard = false; | ||
_this.addClass(JSONEDITOR_CLASS); | ||
ReactDOM.render(Private.createEditorContent(options), _this.node); | ||
var host = _this.editorHostNode; | ||
@@ -399,14 +402,19 @@ var model = new editor_1.CodeEditor.Model(); | ||
/** | ||
* Create the node for the JSON Editor. | ||
* Create the JSON Editor node's content. | ||
*/ | ||
function createEditorNode(options) { | ||
function createEditorContent(options) { | ||
var revertTitle = 'Revert changes to data'; | ||
var confirmTitle = 'Commit changes to data'; | ||
var collapseClass = COLLAPSER_CLASS; | ||
if (options.collapsible) { | ||
collapseClass += " " + COLLAPSE_ENABLED_CLASS; | ||
} | ||
return virtualdom_1.VirtualDOM.realize(virtualdom_1.h.div({ className: JSONEDITOR_CLASS }, virtualdom_1.h.div({ className: HEADER_CLASS }, virtualdom_1.h.span({ className: TITLE_CLASS }, options.title || ''), virtualdom_1.h.span({ className: collapseClass }), virtualdom_1.h.span({ className: REVERT_CLASS, title: revertTitle }), virtualdom_1.h.span({ className: COMMIT_CLASS, title: confirmTitle })), virtualdom_1.h.div({ className: HOST_CLASS }))); | ||
var title = options.title || ''; | ||
var collapseClass = options.collapsible ? | ||
COLLAPSER_CLASS + " " + COLLAPSE_ENABLED_CLASS : COLLAPSER_CLASS; | ||
return (React.createElement(React.Fragment, null, | ||
React.createElement("div", { className: HEADER_CLASS }, | ||
React.createElement("span", { className: TITLE_CLASS }, title), | ||
React.createElement("span", { className: collapseClass }), | ||
React.createElement("span", { className: REVERT_CLASS, title: revertTitle }), | ||
React.createElement("span", { className: COMMIT_CLASS, title: confirmTitle })), | ||
React.createElement("div", { className: HOST_CLASS }))); | ||
} | ||
Private.createEditorNode = createEditorNode; | ||
Private.createEditorContent = createEditorContent; | ||
})(Private || (Private = {})); |
{ | ||
"name": "@jupyterlab/codeeditor", | ||
"version": "0.15.4", | ||
"version": "0.15.5", | ||
"description": "JupyterLab - Abstract Code Editor", | ||
@@ -33,4 +33,4 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"dependencies": { | ||
"@jupyterlab/coreutils": "^1.0.6", | ||
"@jupyterlab/observables": "^1.0.6", | ||
"@jupyterlab/coreutils": "^1.1.0", | ||
"@jupyterlab/observables": "^1.0.7", | ||
"@phosphor/coreutils": "^1.3.0", | ||
@@ -40,4 +40,5 @@ "@phosphor/disposable": "^1.1.2", | ||
"@phosphor/signaling": "^1.2.2", | ||
"@phosphor/virtualdom": "^1.1.2", | ||
"@phosphor/widgets": "^1.5.0" | ||
"@phosphor/widgets": "^1.5.0", | ||
"react": "~16.2.0", | ||
"react-dom": "~16.2.0" | ||
}, | ||
@@ -44,0 +45,0 @@ "devDependencies": { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
97490
1550
9
1
+ Addedreact@~16.2.0
+ Addedreact-dom@~16.2.0
+ Addedasap@2.0.6(transitive)
+ Addedcore-js@1.2.7(transitive)
+ Addedencoding@0.1.13(transitive)
+ Addedfbjs@0.8.18(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisomorphic-fetch@2.2.1(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addednode-fetch@1.7.3(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedpromise@7.3.1(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact@16.2.0(transitive)
+ Addedreact-dom@16.2.1(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedua-parser-js@0.7.39(transitive)
+ Addedwhatwg-fetch@3.6.20(transitive)
- Removed@phosphor/virtualdom@^1.1.2
Updated@jupyterlab/coreutils@^1.1.0