Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dmn-js-literal-expression

Package Overview
Dependencies
Maintainers
9
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dmn-js-literal-expression - npm Package Compare versions

Comparing version 14.3.0 to 14.4.0

22

lib/features/textarea/components/TextareaEditorComponent.js
import { createVNode, createComponentVNode } from "inferno";
import { Component } from 'inferno';
import EditableComponent from 'dmn-js-shared/lib/components/EditableComponent';
import LiteralExpression from 'dmn-js-shared/lib/components/LiteralExpression';
export default class TextareaEditorComponent extends Component {

@@ -9,2 +10,3 @@ constructor(props, context) {

this._viewer = context.injector.get('viewer');
this._expressionLanguages = context.injector.get('expressionLanguages');
this.editLiteralExpressionText = this.editLiteralExpressionText.bind(this);

@@ -27,2 +29,12 @@ this.onElementsChanged = this.onElementsChanged.bind(this);

}
getEditor() {
return this.isFeel() ? FeelEditor : Editor;
}
isFeel() {
return this.getExpressionLanguage() === 'feel';
}
getExpressionLanguage() {
const businessObject = this.getLiteralExpression();
return businessObject.expressionLanguage || this._expressionLanguages.getDefault().value;
}
render() {

@@ -32,2 +44,3 @@ // there is only one single element

text = _this$getLiteralExpre2.text;
const Editor = this.getEditor();
return createComponentVNode(2, Editor, {

@@ -40,2 +53,11 @@ "className": "textarea editor",

}
class FeelEditor extends Component {
render() {
return createComponentVNode(2, LiteralExpression, {
"className": this.props.className,
"value": this.props.value,
"onChange": this.props.onChange
});
}
}
class Editor extends EditableComponent {

@@ -42,0 +64,0 @@ render() {

4

package.json
{
"name": "dmn-js-literal-expression",
"description": "A literal expression view for dmn-js",
"version": "14.3.0",
"version": "14.4.0",
"files": [

@@ -41,3 +41,3 @@ "assets",

},
"gitHead": "36563419eca902506c624b015581c04e20979e59"
"gitHead": "a01301a11044eb31589158b9c86f0221667df71d"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc