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

dmn-js-shared

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dmn-js-shared - npm Package Compare versions

Comparing version 7.3.0 to 7.4.1

27

lib/features/modeling/behavior/IdChangeBehavior.js

@@ -21,3 +21,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
import { is } from '../../../util/ModelUtil';
import { is, getBusinessObject } from '../../../util/ModelUtil';
var ID = 'id';

@@ -37,3 +37,3 @@

_this.executed('updateProperties', _this.updateIds.bind(_assertThisInitialized(_this)));
_this.executed(['element.updateProperties', 'updateProperties'], _this.updateIds.bind(_assertThisInitialized(_this)));

@@ -50,8 +50,9 @@ return _this;

properties = context.properties;
var bo = getBusinessObject(element);
if (!is(element, 'dmn:DRGElement') || !isIdChange(oldProperties, properties)) {
if (!is(bo, 'dmn:DRGElement') || !isIdChange(oldProperties, properties)) {
return;
}
var drgElements = getDrgElements(element);
var drgElements = getDrgElements(bo);
drgElements.forEach(function (drgElement) {

@@ -75,7 +76,23 @@ updateElementReferences(drgElement, oldProperties.id, properties.id);

function getDrgElements(element) {
var definitions = element.$parent;
var definitions = getDefinitions(element);
var drgElements = definitions.drgElements;
return drgElements;
}
/**
* Walk up the tree until at the root to get to dmn:Definitions.
*
* @param {ModdleElement} element
*/
function getDefinitions(element) {
var definitions = element;
while (!is(definitions, 'dmn:Definitions')) {
definitions = definitions.$parent;
}
return definitions;
}
function updateElementReferences(element, oldId, id) {

@@ -82,0 +99,0 @@ var handlers = {

4

package.json
{
"name": "dmn-js-shared",
"description": "Shared components used by dmn-js",
"version": "7.3.0",
"version": "7.4.1",
"scripts": {

@@ -33,3 +33,3 @@ "test": "karma start",

},
"gitHead": "2c58f061d66235562671b907d217c501c8ca5038"
"gitHead": "0a1d9b5ad366b1e829cd4eace296180fefb314f5"
}

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