camunda-bpmn-js 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/assets/bpmn-font/bpmn-codes.css +108 -0
  3. package/dist/assets/bpmn-font/bpmn-embedded.css +161 -0
  4. package/dist/assets/bpmn-font/bpmn.css +164 -0
  5. package/dist/assets/bpmn-font/bpmn.eot +0 -0
  6. package/dist/assets/bpmn-font/bpmn.svg +224 -0
  7. package/dist/assets/bpmn-font/bpmn.ttf +0 -0
  8. package/dist/assets/bpmn-font/bpmn.woff +0 -0
  9. package/dist/assets/bpmn-font/bpmn.woff2 +0 -0
  10. package/dist/assets/bpmn-font/css/bpmn-codes.css +108 -0
  11. package/dist/assets/bpmn-font/css/bpmn-embedded.css +161 -0
  12. package/dist/assets/bpmn-font/css/bpmn.css +164 -0
  13. package/dist/assets/bpmn-font/font/bpmn.eot +0 -0
  14. package/dist/assets/bpmn-font/font/bpmn.svg +224 -0
  15. package/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
  16. package/dist/assets/bpmn-font/font/bpmn.woff +0 -0
  17. package/dist/assets/bpmn-font/font/bpmn.woff2 +0 -0
  18. package/dist/assets/bpmn-js.css +116 -0
  19. package/dist/assets/diagram-js-minimap.css +87 -0
  20. package/dist/assets/diagram-js.css +819 -0
  21. package/dist/assets/element-templates.css +79 -0
  22. package/dist/assets/properties-panel.css +901 -0
  23. package/dist/base-modeler.development.js +272 -866
  24. package/dist/base-modeler.production.min.js +4 -4
  25. package/dist/base-navigated-viewer.development.js +36 -4
  26. package/dist/base-navigated-viewer.production.min.js +2 -2
  27. package/dist/base-viewer.development.js +36 -4
  28. package/dist/base-viewer.production.min.js +2 -2
  29. package/dist/camunda-cloud-modeler.development.js +394 -1215
  30. package/dist/camunda-cloud-modeler.production.min.js +4 -4
  31. package/dist/camunda-cloud-navigated-viewer.development.js +42 -95
  32. package/dist/camunda-cloud-navigated-viewer.production.min.js +2 -2
  33. package/dist/camunda-cloud-viewer.development.js +42 -95
  34. package/dist/camunda-cloud-viewer.production.min.js +2 -2
  35. package/dist/camunda-platform-modeler.development.js +367 -1161
  36. package/dist/camunda-platform-modeler.production.min.js +4 -4
  37. package/dist/camunda-platform-navigated-viewer.development.js +36 -4
  38. package/dist/camunda-platform-navigated-viewer.production.min.js +2 -2
  39. package/dist/camunda-platform-viewer.development.js +36 -4
  40. package/dist/camunda-platform-viewer.production.min.js +2 -2
  41. package/package.json +13 -6
@@ -507,6 +507,21 @@
507
507
  return bo && (typeof bo.$instanceOf === 'function') && bo.$instanceOf(type);
508
508
  }
509
509
 
510
+
511
+ /**
512
+ * Return true if element has any of the given types.
513
+ *
514
+ * @param {djs.model.Base} element
515
+ * @param {Array<string>} types
516
+ *
517
+ * @return {boolean}
518
+ */
519
+ function isAny(element, types) {
520
+ return some(types, function(t) {
521
+ return is(element, t);
522
+ });
523
+ }
524
+
510
525
  /**
511
526
  * Return the business object for a given element.
512
527
  *
@@ -8015,7 +8030,7 @@
8015
8030
  collapsedElements.push(bo);
8016
8031
  }
8017
8032
 
8018
- if (is(parent, 'bpmn:SubProcess') && parent !== plane.bpmnElement) {
8033
+ if (shouldMoveToPlane(bo, plane)) {
8019
8034
 
8020
8035
  // don't change the array while we iterate over it
8021
8036
  elementsToMove.push({ diElement: diElement, parent: parent });
@@ -8104,7 +8119,7 @@
8104
8119
  SubprocessCompatibility.$inject = [ 'eventBus', 'moddle' ];
8105
8120
 
8106
8121
 
8107
- // helpers
8122
+ // helpers //////////////////////////
8108
8123
 
8109
8124
  function findRootDiagram(element) {
8110
8125
  if (is(element, 'bpmndi:BPMNDiagram')) {
@@ -8136,6 +8151,23 @@
8136
8151
  return asBounds(planeTrbl);
8137
8152
  }
8138
8153
 
8154
+ function shouldMoveToPlane(bo, plane) {
8155
+ var parent = bo.$parent;
8156
+
8157
+ // don't move elements that are already on the plane
8158
+ if (!is(parent, 'bpmn:SubProcess') || parent === plane.bpmnElement) {
8159
+ return false;
8160
+ }
8161
+
8162
+ // dataAssociations are children of the subprocess but rendered on process level
8163
+ // cf. https://github.com/bpmn-io/bpmn-js/issues/1619
8164
+ if (isAny(bo, ['bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation'])) {
8165
+ return false;
8166
+ }
8167
+
8168
+ return true;
8169
+ }
8170
+
8139
8171
  var LOW_PRIORITY$3 = 250;
8140
8172
  var ARROW_DOWN_SVG = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>';
8141
8173
 
@@ -8211,7 +8243,7 @@
8211
8243
  }, true);
8212
8244
 
8213
8245
 
8214
- eventBus.on('import.done', function() {
8246
+ eventBus.on('import.render.complete', function() {
8215
8247
  elementRegistry.filter(function(e) {
8216
8248
  return self.canDrillDown(e);
8217
8249
  }).map(function(el) {
@@ -20261,7 +20293,7 @@
20261
20293
  }
20262
20294
 
20263
20295
  /**
20264
- * Returns all diagrams in the same hirarchy as the requested diagram.
20296
+ * Returns all diagrams in the same hierarchy as the requested diagram.
20265
20297
  * Includes all parent and sub process diagrams.
20266
20298
  *
20267
20299
  * @param {Array} definitions