@elyra/canvas 12.12.0 → 12.12.3

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 (84) hide show
  1. package/dist/canvas-controller-de76a796.js +2 -0
  2. package/dist/canvas-controller-de76a796.js.map +1 -0
  3. package/dist/canvas-controller-e91d037b.js +2 -0
  4. package/dist/canvas-controller-e91d037b.js.map +1 -0
  5. package/dist/common-canvas-522f6263.js +2 -0
  6. package/dist/common-canvas-522f6263.js.map +1 -0
  7. package/dist/common-canvas-90539c97.js +2 -0
  8. package/dist/common-canvas-90539c97.js.map +1 -0
  9. package/dist/common-canvas.es.js +1 -1
  10. package/dist/common-canvas.js +1 -1
  11. package/dist/{common-properties-87fef545.js → common-properties-245c4711.js} +2 -2
  12. package/dist/common-properties-245c4711.js.map +1 -0
  13. package/dist/{common-properties-8727d6f9.js → common-properties-49e6bb67.js} +2 -2
  14. package/dist/common-properties-49e6bb67.js.map +1 -0
  15. package/dist/datarecord-metadata-v3-schema-6b6384ff.js.map +1 -1
  16. package/dist/datarecord-metadata-v3-schema-81228a9a.js.map +1 -1
  17. package/dist/en-8647c347.js.map +1 -1
  18. package/dist/{extends-cf86ca1c.js → extends-7fdcdc52.js} +2 -2
  19. package/dist/{extends-cf86ca1c.js.map → extends-7fdcdc52.js.map} +1 -1
  20. package/dist/extends-8d17c85c.js +7 -0
  21. package/dist/extends-8d17c85c.js.map +1 -0
  22. package/dist/{flexible-table-f0c164d2.js → flexible-table-50ce600a.js} +2 -2
  23. package/dist/{flexible-table-f0c164d2.js.map → flexible-table-50ce600a.js.map} +1 -1
  24. package/dist/{flexible-table-d4a68ebb.js → flexible-table-a13cb7d0.js} +2 -2
  25. package/dist/{flexible-table-d4a68ebb.js.map → flexible-table-a13cb7d0.js.map} +1 -1
  26. package/dist/getPrototypeOf-a1c3fe64.js +2 -0
  27. package/dist/getPrototypeOf-a1c3fe64.js.map +1 -0
  28. package/dist/getPrototypeOf-bf88242f.js +2 -0
  29. package/dist/getPrototypeOf-bf88242f.js.map +1 -0
  30. package/dist/{icon-c85b53bd.js → icon-4882a57f.js} +2 -2
  31. package/dist/{icon-c85b53bd.js.map → icon-4882a57f.js.map} +1 -1
  32. package/dist/{icon-caf4caca.js → icon-bf77b2aa.js} +2 -2
  33. package/dist/{icon-caf4caca.js.map → icon-bf77b2aa.js.map} +1 -1
  34. package/dist/{index-beefcd21.js → index-0e6c8b9c.js} +2 -2
  35. package/dist/{index-beefcd21.js.map → index-0e6c8b9c.js.map} +1 -1
  36. package/dist/{index-fb90b885.js → index-f2c306ba.js} +2 -2
  37. package/dist/{index-fb90b885.js.map → index-f2c306ba.js.map} +1 -1
  38. package/dist/isArrayLikeObject-a9c7973b.js.map +1 -1
  39. package/dist/isArrayLikeObject-f3b27f64.js.map +1 -1
  40. package/dist/lib/canvas-controller.es.js +1 -1
  41. package/dist/lib/canvas-controller.js +1 -1
  42. package/dist/lib/canvas.es.js +1 -1
  43. package/dist/lib/canvas.js +1 -1
  44. package/dist/lib/context-menu.es.js +1 -1
  45. package/dist/lib/context-menu.js +1 -1
  46. package/dist/lib/properties/field-picker.es.js +1 -1
  47. package/dist/lib/properties/field-picker.js +1 -1
  48. package/dist/lib/properties/flexible-table.es.js +1 -1
  49. package/dist/lib/properties/flexible-table.js +1 -1
  50. package/dist/lib/properties.es.js +1 -1
  51. package/dist/lib/properties.js +1 -1
  52. package/dist/lib/tooltip.es.js +1 -1
  53. package/dist/lib/tooltip.js +1 -1
  54. package/dist/{toolbar-cca1d9a9.js → toolbar-1c181339.js} +2 -2
  55. package/dist/{toolbar-cca1d9a9.js.map → toolbar-1c181339.js.map} +1 -1
  56. package/dist/{toolbar-a5ec3435.js → toolbar-c6fa3cdb.js} +2 -2
  57. package/dist/{toolbar-a5ec3435.js.map → toolbar-c6fa3cdb.js.map} +1 -1
  58. package/package.json +1 -1
  59. package/src/command-actions/sizeAndPositionObjectsAction.js +4 -4
  60. package/src/common-canvas/canvas-controller.js +4 -4
  61. package/src/common-canvas/svg-canvas-renderer.js +78 -63
  62. package/src/common-properties/controls/expression/expression-builder/expression-builder.jsx +6 -5
  63. package/src/common-properties/controls/expression/expression.jsx +9 -3
  64. package/src/object-model/api-pipeline.js +7 -7
  65. package/src/object-model/object-model.js +12 -10
  66. package/src/object-model/pipeline-in-handler.js +3 -0
  67. package/src/object-model/redux/reducers/canvastoolbar.js +4 -1
  68. package/stats.html +1 -1
  69. package/dist/canvas-controller-d9da9919.js +0 -2
  70. package/dist/canvas-controller-d9da9919.js.map +0 -1
  71. package/dist/canvas-controller-e023521c.js +0 -2
  72. package/dist/canvas-controller-e023521c.js.map +0 -1
  73. package/dist/common-canvas-3c5daa65.js +0 -2
  74. package/dist/common-canvas-3c5daa65.js.map +0 -1
  75. package/dist/common-canvas-bdfb8c87.js +0 -2
  76. package/dist/common-canvas-bdfb8c87.js.map +0 -1
  77. package/dist/common-properties-8727d6f9.js.map +0 -1
  78. package/dist/common-properties-87fef545.js.map +0 -1
  79. package/dist/extends-e9462902.js +0 -7
  80. package/dist/extends-e9462902.js.map +0 -1
  81. package/dist/getPrototypeOf-0bf77a9e.js +0 -2
  82. package/dist/getPrototypeOf-0bf77a9e.js.map +0 -1
  83. package/dist/getPrototypeOf-97272efe.js +0 -2
  84. package/dist/getPrototypeOf-97272efe.js.map +0 -1
@@ -110,11 +110,6 @@ export default class SVGCanvasRenderer {
110
110
  this.minScaleExtent = 0.2;
111
111
  this.maxScaleExtent = 1.8;
112
112
 
113
- // Allow us to keep track of the object (node or comment) being sized and
114
- // its initial size and position at the start of the sizing event.
115
- this.resizeObj = null;
116
- this.resizeObjInitialInfo = null;
117
-
118
113
  // Allows us to track the sizing behavior of comments
119
114
  this.commentSizing = false;
120
115
  this.commentSizingDirection = "";
@@ -123,9 +118,14 @@ export default class SVGCanvasRenderer {
123
118
  this.nodeSizing = false;
124
119
  this.nodeSizingDirection = "";
125
120
  this.nodeSizingObjectsInfo = [];
126
- this.nodeSizingLinksInfo = [];
121
+ this.nodeSizingDetLinksInfo = [];
127
122
 
128
- // General purpose variables to allow us to handle resize and snap to grid
123
+ // Keeps track of the size and position, at the start of the sizing event,
124
+ // of the object (node or comment) being sized.
125
+ this.resizeObjInitialInfo = null;
126
+
127
+ // Keeps track of the size and position, during a sizing event, of the
128
+ // object (node or comment) being sized, before it is snapped to grid.
129
129
  this.notSnappedXPos = 0;
130
130
  this.notSnappedYPos = 0;
131
131
  this.notSnappedWidth = 0;
@@ -1884,7 +1884,7 @@ export default class SVGCanvasRenderer {
1884
1884
  this.canvasController.setSelections(selections, this.activePipeline.id);
1885
1885
  this.regionSelect = false;
1886
1886
 
1887
- } else if (this.dispUtils.isDisplayingFullPage()) {
1887
+ } else if (this.dispUtils.isDisplayingFullPage() && this.zoomChanged()) {
1888
1888
  // Set the internal zoom value for canvasSVG used by D3. This will be
1889
1889
  // used by d3Event next time a zoom action is initiated.
1890
1890
  this.canvasSVG.property("__zoom", this.zoomTransform);
@@ -1904,6 +1904,14 @@ export default class SVGCanvasRenderer {
1904
1904
  this.removeTempCursorOverlay();
1905
1905
  }
1906
1906
 
1907
+ // Returns true if the current zoom transform is different from the
1908
+ // zoom values at the beginning of the zoom action.
1909
+ zoomChanged() {
1910
+ return (this.zoomTransform.k !== this.zoomStartPoint.k ||
1911
+ this.zoomTransform.x !== this.zoomStartPoint.x ||
1912
+ this.zoomTransform.y !== this.zoomStartPoint.y);
1913
+ }
1914
+
1907
1915
  zoomCanvasBackground(d3Event) {
1908
1916
  this.regionSelect = false;
1909
1917
 
@@ -2086,12 +2094,12 @@ export default class SVGCanvasRenderer {
2086
2094
 
2087
2095
  // Note: Comment and Node resizing is started by the comment/node highlight rectangle.
2088
2096
  if (this.commentSizing) {
2089
- this.resizeObj = this.activePipeline.getComment(d.id);
2090
- this.initializeResizeVariables(this.resizeObj);
2097
+ const resizeObj = this.activePipeline.getComment(d.id);
2098
+ this.initializeResizeVariables(resizeObj);
2091
2099
 
2092
2100
  } else if (this.nodeSizing) {
2093
- this.resizeObj = this.activePipeline.getNode(d.id);
2094
- this.initializeResizeVariables(this.resizeObj);
2101
+ const resizeObj = this.activePipeline.getNode(d.id);
2102
+ this.initializeResizeVariables(resizeObj);
2095
2103
 
2096
2104
  } else {
2097
2105
  this.dragObjectsStart(d3Event, d);
@@ -2099,12 +2107,12 @@ export default class SVGCanvasRenderer {
2099
2107
  this.logger.logEndTimer("dragStart", true);
2100
2108
  }
2101
2109
 
2102
- dragMove(d3Event) {
2110
+ dragMove(d3Event, d) {
2103
2111
  this.logger.logStartTimer("dragMove");
2104
2112
  if (this.commentSizing) {
2105
- this.resizeComment(d3Event);
2113
+ this.resizeComment(d3Event, d);
2106
2114
  } else if (this.nodeSizing) {
2107
- this.resizeNode(d3Event);
2115
+ this.resizeNode(d3Event, d);
2108
2116
  } else {
2109
2117
  this.dragObjectsAction(d3Event);
2110
2118
  }
@@ -2118,10 +2126,10 @@ export default class SVGCanvasRenderer {
2118
2126
  this.removeTempCursorOverlay();
2119
2127
 
2120
2128
  if (this.commentSizing) {
2121
- this.endCommentSizing();
2129
+ this.endCommentSizing(d);
2122
2130
 
2123
2131
  } else if (this.nodeSizing) {
2124
- this.endNodeSizing();
2132
+ this.endNodeSizing(d);
2125
2133
 
2126
2134
  } else if (this.dragging) {
2127
2135
  this.dragObjectsEnd(d3Event, d);
@@ -5662,23 +5670,24 @@ export default class SVGCanvasRenderer {
5662
5670
  // array based on the position of the pointer during the resize action
5663
5671
  // then redraws the nodes and links (the link positions may move based
5664
5672
  // on the node size change).
5665
- resizeNode(d3Event) {
5666
- const oldSupernode = Object.assign({}, this.resizeObj);
5667
- const minHeight = this.getMinHeight(this.resizeObj);
5668
- const minWidth = this.getMinWidth(this.resizeObj);
5673
+ resizeNode(d3Event, d) {
5674
+ const resizeObj = this.activePipeline.getNode(d.id);
5675
+ const oldSupernode = Object.assign({}, resizeObj);
5676
+ const minHeight = this.getMinHeight(resizeObj);
5677
+ const minWidth = this.getMinWidth(resizeObj);
5669
5678
 
5670
- const delta = this.resizeObject(d3Event, this.resizeObj,
5679
+ const delta = this.resizeObject(d3Event, resizeObj,
5671
5680
  this.nodeSizingDirection, minWidth, minHeight);
5672
5681
 
5673
5682
  if (delta && (delta.x_pos !== 0 || delta.y_pos !== 0 || delta.width !== 0 || delta.height !== 0)) {
5674
- if (CanvasUtils.isSupernode(this.resizeObj) &&
5683
+ if (CanvasUtils.isSupernode(resizeObj) &&
5675
5684
  this.config.enableMoveNodesOnSupernodeResize) {
5676
5685
  const objectsInfo = CanvasUtils.moveSurroundingObjects(
5677
5686
  oldSupernode,
5678
5687
  this.activePipeline.getNodesAndComments(),
5679
5688
  this.nodeSizingDirection,
5680
- this.resizeObj.width,
5681
- this.resizeObj.height,
5689
+ resizeObj.width,
5690
+ resizeObj.height,
5682
5691
  true // Pass true to indicate that object positions should be updated.
5683
5692
  );
5684
5693
 
@@ -5686,21 +5695,21 @@ export default class SVGCanvasRenderer {
5686
5695
  oldSupernode,
5687
5696
  this.activePipeline.links,
5688
5697
  this.nodeSizingDirection,
5689
- this.resizeObj.width,
5690
- this.resizeObj.height,
5698
+ resizeObj.width,
5699
+ resizeObj.height,
5691
5700
  true // Pass true to indicate that link positions should be updated.
5692
5701
  );
5693
5702
 
5694
5703
  // Overwrite the object and link info with any new info.
5695
5704
  this.nodeSizingObjectsInfo = Object.assign(this.nodeSizingObjectsInfo, objectsInfo);
5696
- this.nodeSizingLinksInfo = Object.assign(this.nodeSizingLinksInfo, linksInfo);
5705
+ this.nodeSizingDetLinksInfo = Object.assign(this.nodeSizingDetLinksInfo, linksInfo);
5697
5706
  }
5698
5707
 
5699
5708
  this.displayComments();
5700
5709
  this.displayNodes();
5701
5710
  this.displayLinks();
5702
5711
 
5703
- if (CanvasUtils.isSupernode(this.resizeObj)) {
5712
+ if (CanvasUtils.isSupernode(resizeObj)) {
5704
5713
  if (this.dispUtils.isDisplayingSubFlow()) {
5705
5714
  this.displayBindingNodesToFitSVG();
5706
5715
  }
@@ -5713,8 +5722,9 @@ export default class SVGCanvasRenderer {
5713
5722
  // array based on the position of the pointer during the resize action
5714
5723
  // then redraws the comment and links (the link positions may move based
5715
5724
  // on the comment size change).
5716
- resizeComment(d3Event) {
5717
- this.resizeObject(d3Event, this.resizeObj, this.commentSizingDirection, 20, 20);
5725
+ resizeComment(d3Event, d) {
5726
+ const resizeObj = this.activePipeline.getComment(d.id);
5727
+ this.resizeObject(d3Event, resizeObj, this.commentSizingDirection, 20, 20);
5718
5728
  this.displayComments();
5719
5729
  this.displayLinks();
5720
5730
  }
@@ -5792,71 +5802,76 @@ export default class SVGCanvasRenderer {
5792
5802
 
5793
5803
  // Finalises the sizing of a node by calling editActionHandler
5794
5804
  // with an editNode action.
5795
- endNodeSizing() {
5805
+ endNodeSizing(node) {
5806
+ let resizeObj = this.activePipeline.getNode(node.id);
5796
5807
  if (this.config.enableSnapToGridType === SNAP_TO_GRID_AFTER) {
5797
- this.resizeObj = this.snapToGridObject(this.resizeObj);
5808
+ resizeObj = this.snapToGridObject(resizeObj);
5798
5809
  }
5799
5810
 
5800
5811
  // If the dimensions or position has changed, issue the command.
5801
5812
  // Note: x_pos or y_pos might change on resize if the node is sized
5802
5813
  // upwards or to the left.
5803
- if (this.resizeObjInitialInfo.x_pos !== this.resizeObj.x_pos ||
5804
- this.resizeObjInitialInfo.y_pos !== this.resizeObj.y_pos ||
5805
- this.resizeObjInitialInfo.width !== this.resizeObj.width ||
5806
- this.resizeObjInitialInfo.height !== this.resizeObj.height) {
5814
+ if (this.resizeObjInitialInfo.x_pos !== resizeObj.x_pos ||
5815
+ this.resizeObjInitialInfo.y_pos !== resizeObj.y_pos ||
5816
+ this.resizeObjInitialInfo.width !== resizeObj.width ||
5817
+ this.resizeObjInitialInfo.height !== resizeObj.height) {
5807
5818
  // Add the dimensions of the object being resized to the array of object infos.
5808
- this.nodeSizingObjectsInfo[this.resizeObj.id] = {
5809
- width: this.resizeObj.width,
5810
- height: this.resizeObj.height,
5811
- x_pos: this.resizeObj.x_pos,
5812
- y_pos: this.resizeObj.y_pos
5819
+ this.nodeSizingObjectsInfo[resizeObj.id] = {
5820
+ width: resizeObj.width,
5821
+ height: resizeObj.height,
5822
+ x_pos: resizeObj.x_pos,
5823
+ y_pos: resizeObj.y_pos
5813
5824
  };
5814
5825
 
5815
5826
  // If the node has been resized set the resize properties appropriately.
5816
- if (this.resizeObjInitialInfo.width !== this.resizeObj.width ||
5817
- this.resizeObjInitialInfo.height !== this.resizeObj.height) {
5818
- this.nodeSizingObjectsInfo[this.resizeObj.id].isResized = true;
5819
- this.nodeSizingObjectsInfo[this.resizeObj.id].resizeWidth = this.resizeObj.width;
5820
- this.nodeSizingObjectsInfo[this.resizeObj.id].resizeHeight = this.resizeObj.height;
5827
+ if (this.resizeObjInitialInfo.width !== resizeObj.width ||
5828
+ this.resizeObjInitialInfo.height !== resizeObj.height) {
5829
+ this.nodeSizingObjectsInfo[resizeObj.id].isResized = true;
5830
+ this.nodeSizingObjectsInfo[resizeObj.id].resizeWidth = resizeObj.width;
5831
+ this.nodeSizingObjectsInfo[resizeObj.id].resizeHeight = resizeObj.height;
5821
5832
  }
5822
5833
 
5823
5834
  this.canvasController.editActionHandler({
5824
5835
  editType: "resizeObjects",
5825
5836
  editSource: "canvas",
5826
5837
  objectsInfo: this.nodeSizingObjectsInfo,
5827
- linksInfo: this.nodeSizingLinksInfo,
5838
+ detachedLinksInfo: this.nodeSizingDetLinksInfo,
5828
5839
  pipelineId: this.pipelineId
5829
5840
  });
5830
5841
  }
5831
- this.resizeObj = null;
5832
5842
  this.nodeSizing = false;
5833
5843
  this.nodeSizingObjectsInfo = [];
5834
- this.nodeSizingLinksInfo = [];
5844
+ this.nodeSizingDetLinksInfo = [];
5835
5845
  }
5836
5846
 
5837
5847
  // Finalises the sizing of a comment by calling editActionHandler
5838
5848
  // with an editComment action.
5839
- endCommentSizing() {
5849
+ endCommentSizing(comment) {
5850
+ let resizeObj = this.activePipeline.getComment(comment.id);
5840
5851
  if (this.config.enableSnapToGridType === SNAP_TO_GRID_AFTER) {
5841
- this.resizeObj = this.snapToGridObject(this.resizeObj);
5852
+ resizeObj = this.snapToGridObject(resizeObj);
5842
5853
  }
5843
5854
 
5844
5855
  // If the dimensions or position has changed, issue the command.
5845
5856
  // Note: x_pos or y_pos might change on resize if the node is sized
5846
5857
  // upwards or to the left.
5847
- if (this.resizeObjInitialInfo.x_pos !== this.resizeObj.x_pos ||
5848
- this.resizeObjInitialInfo.y_pos !== this.resizeObj.y_pos ||
5849
- this.resizeObjInitialInfo.width !== this.resizeObj.width ||
5850
- this.resizeObjInitialInfo.height !== this.resizeObj.height) {
5858
+ if (this.resizeObjInitialInfo.x_pos !== resizeObj.x_pos ||
5859
+ this.resizeObjInitialInfo.y_pos !== resizeObj.y_pos ||
5860
+ this.resizeObjInitialInfo.width !== resizeObj.width ||
5861
+ this.resizeObjInitialInfo.height !== resizeObj.height) {
5862
+ const commentSizingObjectsInfo = [];
5863
+ commentSizingObjectsInfo[resizeObj.id] = {
5864
+ width: resizeObj.width,
5865
+ height: resizeObj.height,
5866
+ x_pos: resizeObj.x_pos,
5867
+ y_pos: resizeObj.y_pos
5868
+ };
5869
+
5851
5870
  const data = {
5852
- editType: "editComment",
5871
+ editType: "resizeObjects",
5853
5872
  editSource: "canvas",
5854
- id: this.resizeObj.id,
5855
- content: this.resizeObj.content,
5856
- width: this.resizeObj.width,
5857
- height: this.resizeObj.height,
5858
- x_pos: this.resizeObj.x_pos,
5859
- y_pos: this.resizeObj.y_pos,
5873
+ objectsInfo: commentSizingObjectsInfo,
5874
+ detachedLinksInfo: {}, // Comments cannot have detached links
5860
5875
  pipelineId: this.pipelineId
5861
5876
  };
5862
5877
  this.canvasController.editActionHandler(data);
@@ -20,6 +20,7 @@ import ExpressionControl from "./../expression";
20
20
  import ExpressionSelectionPanel from "./expression-selection-panel";
21
21
  import { MESSAGE_KEYS } from "./../../../constants/constants";
22
22
  import { formatMessage } from "./../../../util/property-utils";
23
+ import { isEqual } from "lodash";
23
24
 
24
25
  export default class ExpressionBuilder extends React.Component {
25
26
  constructor(props) {
@@ -68,13 +69,13 @@ export default class ExpressionBuilder extends React.Component {
68
69
 
69
70
  onBlur(editor, evt) {
70
71
  this.lastCursorPos = editor.getCursor();
72
+ const currentValue = this.props.controller.getPropertyValue(this.props.propertyId);
71
73
  const newValue = this.editor.getValue();
72
- let skipValidate = false;
73
- if (this.expressionSelectionPanel && this.expressionSelectionPanel.contains(evt.relatedTarget)) {
74
- // don't validate on old content when adding new content
75
- skipValidate = true;
74
+ const skipValidate = this.expressionSelectionPanel && evt && this.expressionSelectionPanel.contains(evt.relatedTarget);
75
+ // update property value when value is updated OR value is to be validated
76
+ if (!isEqual(currentValue, newValue) || !skipValidate) {
77
+ this.props.controller.updatePropertyValue(this.props.propertyId, newValue, skipValidate);
76
78
  }
77
- this.props.controller.updatePropertyValue(this.props.propertyId, newValue, skipValidate);
78
79
  }
79
80
 
80
81
  editorDidMount(editor, next) {
@@ -23,7 +23,7 @@ import { UnControlled as CodeMirror } from "react-codemirror2";
23
23
  import Icon from "./../../../icons/icon.jsx";
24
24
  import { Button } from "carbon-components-react";
25
25
  import classNames from "classnames";
26
-
26
+ import { isEqual } from "lodash";
27
27
  import ValidationMessage from "./../../components/validation-message";
28
28
  import WideFlyout from "./../../components/wide-flyout";
29
29
  import { formatMessage } from "./../../util/property-utils";
@@ -102,8 +102,13 @@ class ExpressionControl extends React.Component {
102
102
  }
103
103
 
104
104
  // this is needed to ensure expression builder selection works.
105
- componentDidUpdate() {
106
- if (this.props.selectionRange && this.props.selectionRange.length > 0 && this.editor) {
105
+ componentDidUpdate(prevProps) {
106
+ if (
107
+ this.props.selectionRange &&
108
+ this.props.selectionRange.length > 0 &&
109
+ !isEqual(prevProps.selectionRange, this.props.selectionRange) &&
110
+ this.editor
111
+ ) {
107
112
  this.props.selectionRange.forEach((selected) => {
108
113
  this.editor.setSelection(selected.anchor, selected.head);
109
114
  });
@@ -225,6 +230,7 @@ class ExpressionControl extends React.Component {
225
230
  validateIcon: response.type,
226
231
  validationInProgress: false
227
232
  });
233
+ this.editor.display.input.blur();
228
234
  });
229
235
  }
230
236
 
@@ -25,7 +25,7 @@ import PipelineOutHandler from "./pipeline-out-handler.js";
25
25
  import CanvasUtils from "../common-canvas/common-canvas-utils";
26
26
 
27
27
  import dagre from "dagre/dist/dagre.min.js";
28
- import { cloneDeep, get, has } from "lodash";
28
+ import { cloneDeep, get, has, set } from "lodash";
29
29
 
30
30
  import { ASSOCIATION_LINK, NODE_LINK, COMMENT_LINK, VERTICAL,
31
31
  DAGRE_HORIZONTAL, DAGRE_VERTICAL,
@@ -419,10 +419,8 @@ export default class APIPipeline {
419
419
  node.y_pos = 0;
420
420
  node = PipelineOutHandler.createSchemaNode(node, []);
421
421
  if (node.type === SUPER_NODE) {
422
- if (!node.app_data) {
423
- node.app_data = {};
424
- }
425
- node.app_data.pipeline_data = this.objectModel.getSchemaPipelinesForSupernode(node);
422
+ const pData = this.objectModel.getSchemaPipelinesForSupernode(node);
423
+ set(node, "app_data.ui_data.sub_pipelines", pData);
426
424
  }
427
425
  newNodes.push(node);
428
426
  }
@@ -501,7 +499,7 @@ export default class APIPipeline {
501
499
  addNode(newNode) {
502
500
  if (newNode) {
503
501
  if (newNode.type === SUPER_NODE) {
504
- this.addSupernode(newNode, get(newNode, "app_data.pipeline_data"));
502
+ this.addSupernode(newNode, get(newNode, "sub_pipelines"));
505
503
  } else {
506
504
  this.store.dispatch({ type: "ADD_NODE", data: { newNode: newNode }, pipelineId: this.pipelineId });
507
505
  }
@@ -541,7 +539,9 @@ export default class APIPipeline {
541
539
  const sn = Object.assign({}, supernode);
542
540
  if (sn.app_data) {
543
541
  sn.app_data = Object.assign({}, sn.app_data);
544
- delete sn.app_data.pipeline_data;
542
+ if (sn.app_data.ui_data) {
543
+ delete sn.app_data.ui_data.sub_pipelines;
544
+ }
545
545
  }
546
546
  return sn;
547
547
  }
@@ -228,8 +228,8 @@ export default class ObjectModel {
228
228
  if (nodeTemplate) {
229
229
  node = PipelineInHandler.convertNode(nodeTemplate, this.getCanvasLayout());
230
230
 
231
- // PipelineInHandler will not handle the app_data.pipeline_data field of
232
- // supernodes so...
231
+ // PipelineInHandler will not handle the conversion of sub_pipelines
232
+ // in supernodes to internal format so...
233
233
  if (node.type === SUPER_NODE) {
234
234
  node = this.convertPipelineData(node);
235
235
  }
@@ -239,7 +239,7 @@ export default class ObjectModel {
239
239
  }
240
240
 
241
241
  convertPipelineData(supernode) {
242
- const pd = get(supernode, "app_data.pipeline_data");
242
+ const pd = get(supernode, "sub_pipelines");
243
243
  let newPd;
244
244
  if (pd) {
245
245
  newPd = supernode.subflow_ref.url
@@ -254,24 +254,26 @@ export default class ObjectModel {
254
254
  newPd = [newPipeline];
255
255
  set(supernode, "subflow_ref.pipeline_id_ref", newPipeline.id);
256
256
  }
257
- set(supernode, "app_data.pipeline_data", newPd);
257
+ supernode.sub_pipelines = newPd;
258
258
  return supernode;
259
259
  }
260
260
 
261
261
  // Returns an object containing nodes and pipelines. The nodes are the
262
262
  // same as the array of nodes passed in except that, any supernodes within
263
- // the array will have their app_data.pipeline_data fields removed. The
263
+ // the array will have their app_data.ui_data.sub_pipelines fields removed. The
264
264
  // pipelines returned will be any pipelines that were contained within the
265
- // app_data.pipeline_data fields.
265
+ // app_data.ui_data.sub_pipelines fields.
266
266
  extractAddDataPipelines(inNodes) {
267
267
  const pipelines = [];
268
268
  const nodes = [];
269
269
  inNodes.forEach((n) => {
270
270
  if (CanvasUtils.isSupernode(n)) {
271
- const pDataArray = get(n, "app_data.pipeline_data");
271
+ const pDataArray = get(n, "sub_pipelines");
272
272
  if (pDataArray) {
273
273
  pipelines.push(...pDataArray);
274
- delete n.app_data.pipeline_data;
274
+ if (n.sub_pipelines) {
275
+ delete n.sub_pipelines;
276
+ }
275
277
  }
276
278
  }
277
279
  nodes.push(n);
@@ -1451,7 +1453,7 @@ export default class ObjectModel {
1451
1453
  if (nodes) {
1452
1454
  nodes.forEach((node) => {
1453
1455
  let clonedNode = this.cloneNode(node);
1454
- // Pipelines in app_data.pipeline_data in supernodes will be in schema
1456
+ // Pipelines in app_data.ui_data.sub_pipelines in supernodes will be in schema
1455
1457
  // format (conforming to the pipeline flow schema) so they must be converted.
1456
1458
  if (clonedNode.type === SUPER_NODE) {
1457
1459
  clonedNode = this.convertPipelineData(clonedNode);
@@ -2295,7 +2297,7 @@ export default class ObjectModel {
2295
2297
  const supernodes = CanvasUtils.filterSupernodes(nodes);
2296
2298
  supernodes.forEach((supernode) => {
2297
2299
  pipelines = pipelines.concat(this.getSchemaPipelinesForSupernode(supernode));
2298
- set(supernode, "app_data.pipeline_data", pipelines);
2300
+ supernode.sub_pipelines = pipelines;
2299
2301
  });
2300
2302
  }
2301
2303
 
@@ -136,6 +136,9 @@ export default class PipelineInHandler {
136
136
  if (has(node, "app_data.ui_data.style")) {
137
137
  obj.style = node.app_data.ui_data.style;
138
138
  }
139
+ if (has(node, "app_data.ui_data.sub_pipelines")) {
140
+ obj.sub_pipelines = node.app_data.ui_data.sub_pipelines;
141
+ }
139
142
  if (has(node, "isSupernodeInputBinding")) {
140
143
  obj.isSupernodeInputBinding = true;
141
144
  }
@@ -18,7 +18,10 @@ export default (state = {}, action) => {
18
18
  switch (action.type) {
19
19
  // Setting a zoom amount needs to cause toolbar to be re-rendered to
20
20
  // enable/disable zoom buttons.
21
- case "SET_ZOOM":
21
+ case "SET_ZOOM": {
22
+ return Object.assign({}, state);
23
+ }
24
+
22
25
  case "SET_TOOLBAR_CONFIG": {
23
26
  return Object.assign({}, state, { config: action.data.toolbarConfig });
24
27
  }