cypher-codemirror
Advanced tools
Comparing version 1.0.9 to 1.0.11
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "1.0.9", | ||
"version": "1.0.11", | ||
"author": "Neo Technology Inc.", | ||
@@ -50,3 +50,3 @@ "license": "GPL-3.0", | ||
"dependencies": { | ||
"cypher-editor-support": "1.0.9" | ||
"cypher-editor-support": "1.0.11" | ||
}, | ||
@@ -53,0 +53,0 @@ "peerDependencies": { |
@@ -22,3 +22,3 @@ /* | ||
import codemirror from 'codemirror'; | ||
import { CypherEditorSupport, TreeUtils } from 'cypher-editor-support/src/index'; | ||
import { CypherEditorSupport, TreeUtils, parse as importedParse } from 'cypher-editor-support/src/index'; | ||
import './codemirror-cypher-mode'; | ||
@@ -117,1 +117,3 @@ | ||
} | ||
export const parse = importedParse; |
@@ -21,4 +21,5 @@ /* | ||
/* eslint-disable no-console */ | ||
import * as React from 'react'; | ||
import { createCypherEditor } from '../codemirror-cypher'; | ||
import { createCypherEditor, parse } from '../codemirror-cypher'; | ||
@@ -88,3 +89,2 @@ function triggerAutocompletion(cm, changed) { | ||
} | ||
componentWillUpdate(nextProps) { | ||
@@ -102,3 +102,8 @@ if (nextProps.schema) { | ||
} | ||
parseContent = () => { | ||
const { referencesListener, referencesProviders } = parse(this.editor.getValue()); | ||
const { queriesAndCommands } = referencesListener; | ||
console.log('queriesAndCommands: ', queriesAndCommands); | ||
console.log('referencesProviders: ', referencesProviders); | ||
}; | ||
render() { | ||
@@ -108,4 +113,9 @@ const setInput = (input) => { | ||
}; | ||
return <div className="Codemirror-Container" ref={setInput} />; | ||
return ( | ||
<div> | ||
<button onClick={this.parseContent}>Manually parse content</button> | ||
<div className="Codemirror-Container" ref={setInput} /> | ||
</div> | ||
); | ||
} | ||
} |
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 too big to display
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
5725553
36895
+ Addedcypher-editor-support@1.0.11(transitive)
- Removedcypher-editor-support@1.0.9(transitive)
Updatedcypher-editor-support@1.0.11