dmn-js-literal-expression
Advanced tools
Comparing version 16.7.1 to 16.8.0
@@ -12,2 +12,3 @@ import { createVNode, createComponentVNode } from "inferno"; | ||
this._dataTypes = context.injector.get('dataTypes'); | ||
this._eventBus = context.injector.get('eventBus'); | ||
const decision = this._viewer.getDecision(); | ||
@@ -27,2 +28,16 @@ this.state = { | ||
} | ||
componentWillMount() { | ||
this._eventBus.on('elements.changed', this.onChange); | ||
} | ||
componentWillUnmount() { | ||
this._eventBus.off('elements.changed', this.onChange); | ||
} | ||
onChange = () => { | ||
const decision = this._viewer.getDecision(); | ||
if (decision.variable) { | ||
this.setState({ | ||
name: decision.variable.name | ||
}); | ||
} | ||
}; | ||
setVariableType(typeRef) { | ||
@@ -29,0 +44,0 @@ if (typeRef === '') { |
import CommandStack from 'diagram-js/lib/command/CommandStack'; | ||
import IdChangeBehavior from 'dmn-js-shared/lib/features/modeling/behavior/IdChangeBehavior'; | ||
import NameChangeBehavior from 'dmn-js-shared/lib/features/modeling/behavior/NameChangeBehavior'; | ||
import Modeling from './Modeling'; | ||
export default { | ||
__init__: ['idChangeBehavior', 'modeling'], | ||
__init__: ['idChangeBehavior', 'nameChangeBehavior', 'modeling'], | ||
commandStack: ['type', CommandStack], | ||
idChangeBehavior: ['type', IdChangeBehavior], | ||
nameChangeBehavior: ['type', NameChangeBehavior], | ||
modeling: ['type', Modeling] | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -88,2 +88,9 @@ import { forEach } from 'min-dash'; | ||
} | ||
updateProperties(el, props) { | ||
const context = { | ||
element: el, | ||
properties: props | ||
}; | ||
this._commandStack.execute('element.updateProperties', context); | ||
} | ||
} | ||
@@ -90,0 +97,0 @@ Modeling.$inject = ['commandStack', 'viewer', 'eventBus']; |
{ | ||
"name": "dmn-js-literal-expression", | ||
"description": "A literal expression view for dmn-js", | ||
"version": "16.7.1", | ||
"version": "16.8.0", | ||
"files": [ | ||
@@ -35,3 +35,3 @@ "assets", | ||
"diagram-js": "^14.7.1", | ||
"dmn-js-shared": "^16.7.1", | ||
"dmn-js-shared": "^16.8.0", | ||
"escape-html": "^1.0.3", | ||
@@ -43,3 +43,3 @@ "inferno": "~5.6.3", | ||
}, | ||
"gitHead": "2d827d59cb964191245cf914e3dc7fc95f8f13ad" | ||
"gitHead": "e13ee01b89dc6ec8cc99fbc0bd9d886c0cdb82ab" | ||
} |
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
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
122456
1211
74
1
Updateddmn-js-shared@^16.8.0