@elyra/canvas 12.12.1 → 12.13.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.
- package/.stylelintrc.json +17 -16
- package/README.md +1 -1
- package/dist/{canvas-controller-851afae4.js → canvas-controller-40beba7d.js} +2 -2
- package/dist/{canvas-controller-851afae4.js.map → canvas-controller-40beba7d.js.map} +1 -1
- package/dist/{canvas-controller-b856cfa3.js → canvas-controller-f62a8ef7.js} +2 -2
- package/dist/{canvas-controller-b856cfa3.js.map → canvas-controller-f62a8ef7.js.map} +1 -1
- package/dist/common-canvas-f0f1afd7.js +2 -0
- package/dist/common-canvas-f0f1afd7.js.map +1 -0
- package/dist/common-canvas-feb8cd7a.js +2 -0
- package/dist/common-canvas-feb8cd7a.js.map +1 -0
- package/dist/common-canvas.es.js +1 -1
- package/dist/common-canvas.js +1 -1
- package/dist/common-properties-1d4c875b.js +2 -0
- package/dist/common-properties-1d4c875b.js.map +1 -0
- package/dist/common-properties-da3999f5.js +2 -0
- package/dist/common-properties-da3999f5.js.map +1 -0
- package/dist/datarecord-metadata-v3-schema-6b6384ff.js.map +1 -1
- package/dist/datarecord-metadata-v3-schema-81228a9a.js.map +1 -1
- package/dist/en-8647c347.js.map +1 -1
- package/dist/{extends-cf86ca1c.js → extends-1139e06f.js} +2 -2
- package/dist/{extends-cf86ca1c.js.map → extends-1139e06f.js.map} +1 -1
- package/dist/extends-8d17c85c.js +7 -0
- package/dist/extends-8d17c85c.js.map +1 -0
- package/dist/{flexible-table-f0c164d2.js → flexible-table-b31e92b8.js} +2 -2
- package/dist/flexible-table-b31e92b8.js.map +1 -0
- package/dist/{flexible-table-d4a68ebb.js → flexible-table-f88dfef1.js} +2 -2
- package/dist/flexible-table-f88dfef1.js.map +1 -0
- package/dist/getPrototypeOf-a1c3fe64.js +2 -0
- package/dist/getPrototypeOf-a1c3fe64.js.map +1 -0
- package/dist/getPrototypeOf-bf88242f.js +2 -0
- package/dist/getPrototypeOf-bf88242f.js.map +1 -0
- package/dist/{icon-c85b53bd.js → icon-4882a57f.js} +2 -2
- package/dist/{icon-c85b53bd.js.map → icon-4882a57f.js.map} +1 -1
- package/dist/{icon-caf4caca.js → icon-918d2dd3.js} +2 -2
- package/dist/{icon-caf4caca.js.map → icon-918d2dd3.js.map} +1 -1
- package/dist/{index-fb90b885.js → index-b6f098b8.js} +2 -2
- package/dist/{index-fb90b885.js.map → index-b6f098b8.js.map} +1 -1
- package/dist/{index-beefcd21.js → index-f44d40bc.js} +2 -2
- package/dist/{index-beefcd21.js.map → index-f44d40bc.js.map} +1 -1
- package/dist/isArrayLikeObject-a9c7973b.js.map +1 -1
- package/dist/isArrayLikeObject-f3b27f64.js.map +1 -1
- package/dist/lib/canvas-controller.es.js +1 -1
- package/dist/lib/canvas-controller.js +1 -1
- package/dist/lib/canvas.es.js +1 -1
- package/dist/lib/canvas.js +1 -1
- package/dist/lib/context-menu.es.js +1 -1
- package/dist/lib/context-menu.js +1 -1
- package/dist/lib/properties/field-picker.es.js +1 -1
- package/dist/lib/properties/field-picker.js +1 -1
- package/dist/lib/properties/flexible-table.es.js +1 -1
- package/dist/lib/properties/flexible-table.js +1 -1
- package/dist/lib/properties.es.js +1 -1
- package/dist/lib/properties.js +1 -1
- package/dist/lib/tooltip.es.js +1 -1
- package/dist/lib/tooltip.es.js.map +1 -1
- package/dist/lib/tooltip.js +1 -1
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/styles/common-canvas.min.css +1 -1
- package/dist/styles/common-canvas.min.css.map +1 -1
- package/dist/{toolbar-a5ec3435.js → toolbar-2baadd0f.js} +2 -2
- package/dist/{toolbar-a5ec3435.js.map → toolbar-2baadd0f.js.map} +1 -1
- package/dist/{toolbar-cca1d9a9.js → toolbar-d07d4d8a.js} +2 -2
- package/dist/{toolbar-cca1d9a9.js.map → toolbar-d07d4d8a.js.map} +1 -1
- package/locales/command-actions/locales/de.json +50 -8
- package/locales/command-actions/locales/en.json +1 -1
- package/locales/command-actions/locales/es.json +50 -8
- package/locales/command-actions/locales/fr.json +50 -8
- package/locales/command-actions/locales/index.js +2 -2
- package/locales/command-actions/locales/it.json +50 -8
- package/locales/command-actions/locales/ja.json +50 -8
- package/locales/command-actions/locales/ko.json +42 -0
- package/locales/command-actions/locales/pt-br.json +50 -8
- package/locales/command-actions/locales/zh-CN.json +51 -0
- package/locales/command-actions/locales/zh-TW.json +51 -0
- package/locales/common-canvas/locales/de.json +36 -26
- package/locales/common-canvas/locales/en.json +1 -1
- package/locales/common-canvas/locales/es.json +36 -26
- package/locales/common-canvas/locales/fr.json +36 -26
- package/locales/common-canvas/locales/index.js +2 -2
- package/locales/common-canvas/locales/it.json +36 -26
- package/locales/common-canvas/locales/ja.json +36 -26
- package/locales/common-canvas/locales/ko.json +7 -2
- package/locales/common-canvas/locales/pt-br.json +36 -26
- package/locales/common-canvas/locales/zh-CN.json +37 -0
- package/locales/common-canvas/locales/zh-TW.json +37 -0
- package/locales/common-properties/locales/de.json +92 -92
- package/locales/common-properties/locales/en.json +1 -1
- package/locales/common-properties/locales/es.json +92 -92
- package/locales/common-properties/locales/fr.json +92 -92
- package/locales/common-properties/locales/index.js +2 -2
- package/locales/common-properties/locales/it.json +92 -92
- package/locales/common-properties/locales/ja.json +92 -92
- package/locales/common-properties/locales/ko.json +1 -1
- package/locales/common-properties/locales/pt-br.json +92 -92
- package/locales/common-properties/locales/zh-CN.json +93 -0
- package/locales/common-properties/locales/zh-TW.json +93 -0
- package/locales/palette/locales/de.json +9 -9
- package/locales/palette/locales/en.json +6 -6
- package/locales/palette/locales/es.json +9 -9
- package/locales/palette/locales/fr.json +9 -9
- package/locales/palette/locales/index.js +2 -2
- package/locales/palette/locales/it.json +9 -9
- package/locales/palette/locales/ja.json +9 -9
- package/locales/palette/locales/pt-br.json +9 -9
- package/locales/palette/locales/zh-CN.json +10 -0
- package/locales/palette/locales/zh-TW.json +10 -0
- package/locales/toolbar/locales/de.json +7 -7
- package/locales/toolbar/locales/en.json +1 -1
- package/locales/toolbar/locales/es.json +7 -7
- package/locales/toolbar/locales/fr.json +7 -7
- package/locales/toolbar/locales/index.js +2 -2
- package/locales/toolbar/locales/it.json +7 -7
- package/locales/toolbar/locales/ja.json +7 -7
- package/locales/toolbar/locales/pt-br.json +7 -7
- package/locales/toolbar/locales/zh-CN.json +8 -0
- package/locales/toolbar/locales/zh-TW.json +8 -0
- package/package.json +2 -2
- package/src/command-actions/sizeAndPositionObjectsAction.js +4 -4
- package/src/common-canvas/canvas-controller.js +6 -6
- package/src/common-canvas/cc-contents.jsx +0 -3
- package/src/common-canvas/common-canvas.scss +4 -2
- package/src/common-canvas/svg-canvas-renderer.js +69 -62
- package/src/common-properties/components/flexible-table/flexible-table.jsx +14 -3
- package/src/common-properties/components/flexible-table/flexible-table.scss +20 -0
- package/src/common-properties/controls/abstract-table.jsx +2 -0
- package/src/common-properties/controls/expression/expression-builder/expression-builder.jsx +6 -5
- package/src/common-properties/controls/expression/expression.jsx +9 -3
- package/src/common-properties/controls/list/list.jsx +1 -0
- package/src/common-properties/controls/selectcolumns/selectcolumns.jsx +1 -0
- package/src/common-properties/controls/someofselect/someofselect.jsx +1 -0
- package/src/common-properties/form/EditorForm.js +21 -3
- package/src/common-properties/panels/action-panel/action-panel.jsx +38 -3
- package/src/common-properties/panels/action-panel/action-panel.scss +3 -0
- package/src/common-properties/panels/text-panel/text-panel.jsx +38 -7
- package/src/common-properties/panels/text-panel/text-panel.scss +4 -3
- package/src/common-properties/properties-controller.js +16 -2
- package/src/common-properties/ui-conditions/conditions-utils.js +14 -8
- package/src/palette/palette-content-list-item.jsx +12 -2
- package/src/palette/palette-content-list.jsx +11 -19
- package/src/palette/palette-dialog-content-grid.jsx +1 -6
- package/src/palette/palette-dialog-content.jsx +13 -11
- package/src/palette/palette-flyout-content-category.jsx +26 -24
- package/src/palette/palette-flyout-content.jsx +4 -24
- package/src/palette/palette.scss +71 -43
- package/src/tooltip/tooltip.jsx +1 -1
- package/stats.html +1 -1
- package/dist/common-canvas-65512584.js +0 -2
- package/dist/common-canvas-65512584.js.map +0 -1
- package/dist/common-canvas-a2d6b5af.js +0 -2
- package/dist/common-canvas-a2d6b5af.js.map +0 -1
- package/dist/common-properties-8727d6f9.js +0 -2
- package/dist/common-properties-8727d6f9.js.map +0 -1
- package/dist/common-properties-87fef545.js +0 -2
- package/dist/common-properties-87fef545.js.map +0 -1
- package/dist/extends-e9462902.js +0 -7
- package/dist/extends-e9462902.js.map +0 -1
- package/dist/flexible-table-d4a68ebb.js.map +0 -1
- package/dist/flexible-table-f0c164d2.js.map +0 -1
- package/dist/getPrototypeOf-0bf77a9e.js +0 -2
- package/dist/getPrototypeOf-0bf77a9e.js.map +0 -1
- package/dist/getPrototypeOf-97272efe.js +0 -2
- package/dist/getPrototypeOf-97272efe.js.map +0 -1
- package/locales/command-actions/locales/zh-cn.json +0 -9
- package/locales/command-actions/locales/zh-tw.json +0 -9
- package/locales/common-canvas/locales/zh-cn.json +0 -27
- package/locales/common-canvas/locales/zh-tw.json +0 -27
- package/locales/common-properties/locales/zh-cn.json +0 -93
- package/locales/common-properties/locales/zh-tw.json +0 -93
- package/locales/palette/locales/zh-cn.json +0 -10
- package/locales/palette/locales/zh-tw.json +0 -10
- package/locales/toolbar/locales/zh-cn.json +0 -8
- package/locales/toolbar/locales/zh-tw.json +0 -8
|
@@ -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.
|
|
121
|
+
this.nodeSizingDetLinksInfo = [];
|
|
122
|
+
|
|
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;
|
|
127
126
|
|
|
128
|
-
//
|
|
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;
|
|
@@ -2094,12 +2094,12 @@ export default class SVGCanvasRenderer {
|
|
|
2094
2094
|
|
|
2095
2095
|
// Note: Comment and Node resizing is started by the comment/node highlight rectangle.
|
|
2096
2096
|
if (this.commentSizing) {
|
|
2097
|
-
|
|
2098
|
-
this.initializeResizeVariables(
|
|
2097
|
+
const resizeObj = this.activePipeline.getComment(d.id);
|
|
2098
|
+
this.initializeResizeVariables(resizeObj);
|
|
2099
2099
|
|
|
2100
2100
|
} else if (this.nodeSizing) {
|
|
2101
|
-
|
|
2102
|
-
this.initializeResizeVariables(
|
|
2101
|
+
const resizeObj = this.activePipeline.getNode(d.id);
|
|
2102
|
+
this.initializeResizeVariables(resizeObj);
|
|
2103
2103
|
|
|
2104
2104
|
} else {
|
|
2105
2105
|
this.dragObjectsStart(d3Event, d);
|
|
@@ -2107,12 +2107,12 @@ export default class SVGCanvasRenderer {
|
|
|
2107
2107
|
this.logger.logEndTimer("dragStart", true);
|
|
2108
2108
|
}
|
|
2109
2109
|
|
|
2110
|
-
dragMove(d3Event) {
|
|
2110
|
+
dragMove(d3Event, d) {
|
|
2111
2111
|
this.logger.logStartTimer("dragMove");
|
|
2112
2112
|
if (this.commentSizing) {
|
|
2113
|
-
this.resizeComment(d3Event);
|
|
2113
|
+
this.resizeComment(d3Event, d);
|
|
2114
2114
|
} else if (this.nodeSizing) {
|
|
2115
|
-
this.resizeNode(d3Event);
|
|
2115
|
+
this.resizeNode(d3Event, d);
|
|
2116
2116
|
} else {
|
|
2117
2117
|
this.dragObjectsAction(d3Event);
|
|
2118
2118
|
}
|
|
@@ -2126,10 +2126,10 @@ export default class SVGCanvasRenderer {
|
|
|
2126
2126
|
this.removeTempCursorOverlay();
|
|
2127
2127
|
|
|
2128
2128
|
if (this.commentSizing) {
|
|
2129
|
-
this.endCommentSizing();
|
|
2129
|
+
this.endCommentSizing(d);
|
|
2130
2130
|
|
|
2131
2131
|
} else if (this.nodeSizing) {
|
|
2132
|
-
this.endNodeSizing();
|
|
2132
|
+
this.endNodeSizing(d);
|
|
2133
2133
|
|
|
2134
2134
|
} else if (this.dragging) {
|
|
2135
2135
|
this.dragObjectsEnd(d3Event, d);
|
|
@@ -5670,23 +5670,24 @@ export default class SVGCanvasRenderer {
|
|
|
5670
5670
|
// array based on the position of the pointer during the resize action
|
|
5671
5671
|
// then redraws the nodes and links (the link positions may move based
|
|
5672
5672
|
// on the node size change).
|
|
5673
|
-
resizeNode(d3Event) {
|
|
5674
|
-
const
|
|
5675
|
-
const
|
|
5676
|
-
const
|
|
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);
|
|
5677
5678
|
|
|
5678
|
-
const delta = this.resizeObject(d3Event,
|
|
5679
|
+
const delta = this.resizeObject(d3Event, resizeObj,
|
|
5679
5680
|
this.nodeSizingDirection, minWidth, minHeight);
|
|
5680
5681
|
|
|
5681
5682
|
if (delta && (delta.x_pos !== 0 || delta.y_pos !== 0 || delta.width !== 0 || delta.height !== 0)) {
|
|
5682
|
-
if (CanvasUtils.isSupernode(
|
|
5683
|
+
if (CanvasUtils.isSupernode(resizeObj) &&
|
|
5683
5684
|
this.config.enableMoveNodesOnSupernodeResize) {
|
|
5684
5685
|
const objectsInfo = CanvasUtils.moveSurroundingObjects(
|
|
5685
5686
|
oldSupernode,
|
|
5686
5687
|
this.activePipeline.getNodesAndComments(),
|
|
5687
5688
|
this.nodeSizingDirection,
|
|
5688
|
-
|
|
5689
|
-
|
|
5689
|
+
resizeObj.width,
|
|
5690
|
+
resizeObj.height,
|
|
5690
5691
|
true // Pass true to indicate that object positions should be updated.
|
|
5691
5692
|
);
|
|
5692
5693
|
|
|
@@ -5694,21 +5695,21 @@ export default class SVGCanvasRenderer {
|
|
|
5694
5695
|
oldSupernode,
|
|
5695
5696
|
this.activePipeline.links,
|
|
5696
5697
|
this.nodeSizingDirection,
|
|
5697
|
-
|
|
5698
|
-
|
|
5698
|
+
resizeObj.width,
|
|
5699
|
+
resizeObj.height,
|
|
5699
5700
|
true // Pass true to indicate that link positions should be updated.
|
|
5700
5701
|
);
|
|
5701
5702
|
|
|
5702
5703
|
// Overwrite the object and link info with any new info.
|
|
5703
5704
|
this.nodeSizingObjectsInfo = Object.assign(this.nodeSizingObjectsInfo, objectsInfo);
|
|
5704
|
-
this.
|
|
5705
|
+
this.nodeSizingDetLinksInfo = Object.assign(this.nodeSizingDetLinksInfo, linksInfo);
|
|
5705
5706
|
}
|
|
5706
5707
|
|
|
5707
5708
|
this.displayComments();
|
|
5708
5709
|
this.displayNodes();
|
|
5709
5710
|
this.displayLinks();
|
|
5710
5711
|
|
|
5711
|
-
if (CanvasUtils.isSupernode(
|
|
5712
|
+
if (CanvasUtils.isSupernode(resizeObj)) {
|
|
5712
5713
|
if (this.dispUtils.isDisplayingSubFlow()) {
|
|
5713
5714
|
this.displayBindingNodesToFitSVG();
|
|
5714
5715
|
}
|
|
@@ -5721,8 +5722,9 @@ export default class SVGCanvasRenderer {
|
|
|
5721
5722
|
// array based on the position of the pointer during the resize action
|
|
5722
5723
|
// then redraws the comment and links (the link positions may move based
|
|
5723
5724
|
// on the comment size change).
|
|
5724
|
-
resizeComment(d3Event) {
|
|
5725
|
-
|
|
5725
|
+
resizeComment(d3Event, d) {
|
|
5726
|
+
const resizeObj = this.activePipeline.getComment(d.id);
|
|
5727
|
+
this.resizeObject(d3Event, resizeObj, this.commentSizingDirection, 20, 20);
|
|
5726
5728
|
this.displayComments();
|
|
5727
5729
|
this.displayLinks();
|
|
5728
5730
|
}
|
|
@@ -5800,71 +5802,76 @@ export default class SVGCanvasRenderer {
|
|
|
5800
5802
|
|
|
5801
5803
|
// Finalises the sizing of a node by calling editActionHandler
|
|
5802
5804
|
// with an editNode action.
|
|
5803
|
-
endNodeSizing() {
|
|
5805
|
+
endNodeSizing(node) {
|
|
5806
|
+
let resizeObj = this.activePipeline.getNode(node.id);
|
|
5804
5807
|
if (this.config.enableSnapToGridType === SNAP_TO_GRID_AFTER) {
|
|
5805
|
-
|
|
5808
|
+
resizeObj = this.snapToGridObject(resizeObj);
|
|
5806
5809
|
}
|
|
5807
5810
|
|
|
5808
5811
|
// If the dimensions or position has changed, issue the command.
|
|
5809
5812
|
// Note: x_pos or y_pos might change on resize if the node is sized
|
|
5810
5813
|
// upwards or to the left.
|
|
5811
|
-
if (this.resizeObjInitialInfo.x_pos !==
|
|
5812
|
-
this.resizeObjInitialInfo.y_pos !==
|
|
5813
|
-
this.resizeObjInitialInfo.width !==
|
|
5814
|
-
this.resizeObjInitialInfo.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) {
|
|
5815
5818
|
// Add the dimensions of the object being resized to the array of object infos.
|
|
5816
|
-
this.nodeSizingObjectsInfo[
|
|
5817
|
-
width:
|
|
5818
|
-
height:
|
|
5819
|
-
x_pos:
|
|
5820
|
-
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
|
|
5821
5824
|
};
|
|
5822
5825
|
|
|
5823
5826
|
// If the node has been resized set the resize properties appropriately.
|
|
5824
|
-
if (this.resizeObjInitialInfo.width !==
|
|
5825
|
-
this.resizeObjInitialInfo.height !==
|
|
5826
|
-
this.nodeSizingObjectsInfo[
|
|
5827
|
-
this.nodeSizingObjectsInfo[
|
|
5828
|
-
this.nodeSizingObjectsInfo[
|
|
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;
|
|
5829
5832
|
}
|
|
5830
5833
|
|
|
5831
5834
|
this.canvasController.editActionHandler({
|
|
5832
5835
|
editType: "resizeObjects",
|
|
5833
5836
|
editSource: "canvas",
|
|
5834
5837
|
objectsInfo: this.nodeSizingObjectsInfo,
|
|
5835
|
-
|
|
5838
|
+
detachedLinksInfo: this.nodeSizingDetLinksInfo,
|
|
5836
5839
|
pipelineId: this.pipelineId
|
|
5837
5840
|
});
|
|
5838
5841
|
}
|
|
5839
|
-
this.resizeObj = null;
|
|
5840
5842
|
this.nodeSizing = false;
|
|
5841
5843
|
this.nodeSizingObjectsInfo = [];
|
|
5842
|
-
this.
|
|
5844
|
+
this.nodeSizingDetLinksInfo = [];
|
|
5843
5845
|
}
|
|
5844
5846
|
|
|
5845
5847
|
// Finalises the sizing of a comment by calling editActionHandler
|
|
5846
5848
|
// with an editComment action.
|
|
5847
|
-
endCommentSizing() {
|
|
5849
|
+
endCommentSizing(comment) {
|
|
5850
|
+
let resizeObj = this.activePipeline.getComment(comment.id);
|
|
5848
5851
|
if (this.config.enableSnapToGridType === SNAP_TO_GRID_AFTER) {
|
|
5849
|
-
|
|
5852
|
+
resizeObj = this.snapToGridObject(resizeObj);
|
|
5850
5853
|
}
|
|
5851
5854
|
|
|
5852
5855
|
// If the dimensions or position has changed, issue the command.
|
|
5853
5856
|
// Note: x_pos or y_pos might change on resize if the node is sized
|
|
5854
5857
|
// upwards or to the left.
|
|
5855
|
-
if (this.resizeObjInitialInfo.x_pos !==
|
|
5856
|
-
this.resizeObjInitialInfo.y_pos !==
|
|
5857
|
-
this.resizeObjInitialInfo.width !==
|
|
5858
|
-
this.resizeObjInitialInfo.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
|
+
|
|
5859
5870
|
const data = {
|
|
5860
|
-
editType: "
|
|
5871
|
+
editType: "resizeObjects",
|
|
5861
5872
|
editSource: "canvas",
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
width: this.resizeObj.width,
|
|
5865
|
-
height: this.resizeObj.height,
|
|
5866
|
-
x_pos: this.resizeObj.x_pos,
|
|
5867
|
-
y_pos: this.resizeObj.y_pos,
|
|
5873
|
+
objectsInfo: commentSizingObjectsInfo,
|
|
5874
|
+
detachedLinksInfo: {}, // Comments cannot have detached links
|
|
5868
5875
|
pipelineId: this.pipelineId
|
|
5869
5876
|
};
|
|
5870
5877
|
this.canvasController.editActionHandler(data);
|
|
@@ -25,7 +25,7 @@ import VirtualizedTable from "./../virtualized-table/virtualized-table.jsx";
|
|
|
25
25
|
import { SORT_DIRECTION, STATES, ROW_HEIGHT, ROW_SELECTION } from "./../../constants/constants";
|
|
26
26
|
import ReactResizeDetector from "react-resize-detector";
|
|
27
27
|
import classNames from "classnames";
|
|
28
|
-
import { has } from "lodash";
|
|
28
|
+
import { has, isEmpty } from "lodash";
|
|
29
29
|
import defaultMessages from "../../../../locales/common-properties/locales/en.json";
|
|
30
30
|
|
|
31
31
|
class FlexibleTable extends React.Component {
|
|
@@ -79,7 +79,7 @@ class FlexibleTable extends React.Component {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
// Calculate if checkedAllRows is true
|
|
82
|
-
if (this.props.selectedRows) {
|
|
82
|
+
if (this.props.selectedRows && !isEmpty(this.props.data)) {
|
|
83
83
|
this.setCheckedAll(this.props.selectedRows);
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -506,6 +506,14 @@ class FlexibleTable extends React.Component {
|
|
|
506
506
|
</div>)
|
|
507
507
|
: null;
|
|
508
508
|
|
|
509
|
+
const emptyTableContent = isEmpty(this.props.data)
|
|
510
|
+
? (
|
|
511
|
+
<div className="properties-ft-empty-table">
|
|
512
|
+
{this.props.emptyTablePlaceholder}
|
|
513
|
+
</div>
|
|
514
|
+
)
|
|
515
|
+
: null;
|
|
516
|
+
|
|
509
517
|
return (
|
|
510
518
|
<div data-id={"properties-ft-" + this.props.scrollKey} className="properties-ft-control-container" ref={ (ref) => (this.flexibleTable = ref) }>
|
|
511
519
|
{ftHeader}
|
|
@@ -543,6 +551,7 @@ class FlexibleTable extends React.Component {
|
|
|
543
551
|
</div>
|
|
544
552
|
</ReactResizeDetector>
|
|
545
553
|
</div>
|
|
554
|
+
{emptyTableContent}
|
|
546
555
|
</div>
|
|
547
556
|
);
|
|
548
557
|
}
|
|
@@ -550,13 +559,15 @@ class FlexibleTable extends React.Component {
|
|
|
550
559
|
|
|
551
560
|
FlexibleTable.defaultProps = {
|
|
552
561
|
showHeader: true,
|
|
553
|
-
light: true
|
|
562
|
+
light: true,
|
|
563
|
+
emptyTablePlaceholder: ""
|
|
554
564
|
};
|
|
555
565
|
|
|
556
566
|
FlexibleTable.propTypes = {
|
|
557
567
|
sortable: PropTypes.array,
|
|
558
568
|
columns: PropTypes.array.isRequired,
|
|
559
569
|
data: PropTypes.array.isRequired,
|
|
570
|
+
emptyTablePlaceholder: PropTypes.string,
|
|
560
571
|
filterable: PropTypes.array,
|
|
561
572
|
filterBy: PropTypes.string,
|
|
562
573
|
filterKeyword: PropTypes.string,
|
|
@@ -128,3 +128,23 @@ $row-left-padding: $spacing-02;
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
+
|
|
132
|
+
.properties-ft-empty-table {
|
|
133
|
+
height: $spacing-11 + $spacing-08;
|
|
134
|
+
display: flex;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
align-items: center;
|
|
137
|
+
@include carbon--type-style("body-long-01");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.properties-light-enabled {
|
|
141
|
+
.properties-ft-empty-table {
|
|
142
|
+
background-color: $ui-background;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.properties-light-disabled {
|
|
147
|
+
.properties-ft-empty-table {
|
|
148
|
+
background-color: $ui-01;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -458,6 +458,7 @@ export default class AbstractTable extends React.Component {
|
|
|
458
458
|
summaryTable
|
|
459
459
|
rowSelection={ROW_SELECTION.MULTIPLE}
|
|
460
460
|
light={this.props.controller.getLight()}
|
|
461
|
+
emptyTablePlaceholder={this.props.control.additionalText}
|
|
461
462
|
/>
|
|
462
463
|
</div>);
|
|
463
464
|
}
|
|
@@ -677,6 +678,7 @@ export default class AbstractTable extends React.Component {
|
|
|
677
678
|
selectedRows= {this.props.selectedRows}
|
|
678
679
|
rowSelection={this.props.control.rowSelection}
|
|
679
680
|
light={this.props.controller.getLight()}
|
|
681
|
+
emptyTablePlaceholder={this.props.control.additionalText}
|
|
680
682
|
/>);
|
|
681
683
|
return (
|
|
682
684
|
<div>
|
|
@@ -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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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 (
|
|
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
|
|
|
@@ -151,6 +151,7 @@ class ListControl extends AbstractTable {
|
|
|
151
151
|
rowSelection={this.props.control.rowSelection}
|
|
152
152
|
updateRowSelections={this.updateRowSelections}
|
|
153
153
|
light={this.props.controller.getLight()}
|
|
154
|
+
emptyTablePlaceholder={this.props.control.additionalText}
|
|
154
155
|
/>);
|
|
155
156
|
|
|
156
157
|
const tableContainer = (<div>
|
|
@@ -138,6 +138,7 @@ class SelectColumns extends AbstractTable {
|
|
|
138
138
|
rowSelection={this.props.control.rowSelection}
|
|
139
139
|
updateRowSelections={this.updateRowSelections}
|
|
140
140
|
light={this.props.controller.getLight()}
|
|
141
|
+
emptyTablePlaceholder={this.props.control.additionalText}
|
|
141
142
|
/>);
|
|
142
143
|
|
|
143
144
|
var content = (
|
|
@@ -110,6 +110,7 @@ class SomeofselectControl extends React.Component {
|
|
|
110
110
|
selectable
|
|
111
111
|
showHeader={false}
|
|
112
112
|
light={this.props.controller.getLight()}
|
|
113
|
+
emptyTablePlaceholder={this.props.control.additionalText}
|
|
113
114
|
/>
|
|
114
115
|
<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} inTable={this.props.tableControl} />
|
|
115
116
|
</div>
|
|
@@ -88,7 +88,7 @@ class ControlPanel {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
class ActionPanel {
|
|
91
|
-
constructor(id, panelType, className, nestedPanel, actions) {
|
|
91
|
+
constructor(id, panelType, className, nestedPanel, actions, label, description) {
|
|
92
92
|
this.id = id;
|
|
93
93
|
this.panelType = panelType;
|
|
94
94
|
this.nestedPanel = nestedPanel;
|
|
@@ -96,6 +96,12 @@ class ActionPanel {
|
|
|
96
96
|
if (className) {
|
|
97
97
|
this.className = className;
|
|
98
98
|
}
|
|
99
|
+
if (label) {
|
|
100
|
+
this.label = label;
|
|
101
|
+
}
|
|
102
|
+
if (description) {
|
|
103
|
+
this.description = description;
|
|
104
|
+
}
|
|
99
105
|
}
|
|
100
106
|
}
|
|
101
107
|
|
|
@@ -201,12 +207,24 @@ function _makeUIItem(parameterMetadata, actionMetadata, group, structureMetadata
|
|
|
201
207
|
return UIItem.makePanel(new ControlPanel(groupName, PanelType.SUMMARY, groupClassName, nestedPanel, panSubItems, groupLabel));
|
|
202
208
|
}
|
|
203
209
|
case GroupType.ACTION_PANEL: {
|
|
210
|
+
groupLabel = l10nProvider.l10nResource(group.label);
|
|
211
|
+
let groupDesc;
|
|
212
|
+
if (group.description) {
|
|
213
|
+
groupDesc = new Description(l10nProvider.l10nResource(group.description),
|
|
214
|
+
null,
|
|
215
|
+
group.description ? group.description.link : null);
|
|
216
|
+
}
|
|
204
217
|
return UIItem.makePanel(new ActionPanel(groupName, PanelType.ACTION_PANEL, groupClassName, nestedPanel,
|
|
205
|
-
_makeActions(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider)));
|
|
218
|
+
_makeActions(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider), groupLabel, groupDesc));
|
|
206
219
|
}
|
|
207
220
|
case GroupType.TEXT_PANEL: {
|
|
208
221
|
groupLabel = l10nProvider.l10nResource(group.label);
|
|
209
|
-
|
|
222
|
+
let groupDesc;
|
|
223
|
+
if (group.description) {
|
|
224
|
+
groupDesc = new Description(l10nProvider.l10nResource(group.description),
|
|
225
|
+
group.description ? group.description.placement : null,
|
|
226
|
+
group.description ? group.description.link : null);
|
|
227
|
+
}
|
|
210
228
|
return UIItem.makeTextPanel(groupName, groupLabel, groupDesc, groupClassName, nestedPanel);
|
|
211
229
|
}
|
|
212
230
|
case GroupType.TWISTY_PANEL: {
|
|
@@ -19,22 +19,57 @@ import PropTypes from "prop-types";
|
|
|
19
19
|
import { connect } from "react-redux";
|
|
20
20
|
import classNames from "classnames";
|
|
21
21
|
import * as ControlUtils from "./../../util/control-utils";
|
|
22
|
-
import { STATES } from "./../../constants/constants";
|
|
22
|
+
import { STATES, CARBON_ICONS } from "./../../constants/constants";
|
|
23
|
+
import { evaluateText } from "./../../util/property-utils.js";
|
|
24
|
+
import Tooltip from "./../../../tooltip/tooltip.jsx";
|
|
25
|
+
import Icon from "./../../../icons/icon.jsx";
|
|
26
|
+
import { isEmpty } from "lodash";
|
|
23
27
|
|
|
24
28
|
class ActionPanel extends Component {
|
|
25
29
|
render() {
|
|
26
30
|
const className = this.props.panel.className ? this.props.panel.className : "";
|
|
31
|
+
const hidden = this.props.panelState === STATES.HIDDEN;
|
|
32
|
+
const disabled = this.props.panelState === STATES.DISABLED;
|
|
33
|
+
let label;
|
|
34
|
+
if (this.props.panel.label) {
|
|
35
|
+
let tooltip;
|
|
36
|
+
if (this.props.panel.description && !isEmpty(this.props.panel.description.text)) {
|
|
37
|
+
const dynamicDescriptionText = evaluateText(this.props.panel.description.text, this.props.controller);
|
|
38
|
+
// If tooltip has a link, add propertyId in the link object
|
|
39
|
+
if (this.props.panel.description.link) {
|
|
40
|
+
this.props.panel.description.link.propertyId = { name: this.props.panel.id };
|
|
41
|
+
}
|
|
42
|
+
tooltip = (<Tooltip
|
|
43
|
+
id={`tooltip-label-${this.props.panel.id}`}
|
|
44
|
+
tip={dynamicDescriptionText}
|
|
45
|
+
link={this.props.panel.description.link ? this.props.panel.description.link : null}
|
|
46
|
+
tooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}
|
|
47
|
+
direction="bottom"
|
|
48
|
+
disable={hidden || disabled}
|
|
49
|
+
showToolTipOnClick
|
|
50
|
+
>
|
|
51
|
+
<Icon type={CARBON_ICONS.INFORMATION} className="properties-control-description-icon-info" />
|
|
52
|
+
</Tooltip>);
|
|
53
|
+
}
|
|
54
|
+
label = (
|
|
55
|
+
<div className={classNames("properties-label-container")}>
|
|
56
|
+
<label className="properties-control-label">{this.props.panel.label}</label>
|
|
57
|
+
{tooltip}
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
27
61
|
return (
|
|
28
62
|
<div
|
|
29
63
|
className={classNames(
|
|
30
64
|
"properties-action-panel",
|
|
31
|
-
{ "hide":
|
|
65
|
+
{ "hide": hidden },
|
|
32
66
|
{ "properties-control-nested-panel": this.props.panel.nestedPanel },
|
|
33
67
|
className
|
|
34
68
|
)}
|
|
35
69
|
data-id={ControlUtils.getDataId({ name: this.props.panel.id })}
|
|
36
|
-
disabled={
|
|
70
|
+
disabled={disabled}
|
|
37
71
|
>
|
|
72
|
+
{label}
|
|
38
73
|
{this.props.children}
|
|
39
74
|
</div>);
|
|
40
75
|
}
|
|
@@ -19,24 +19,55 @@ import PropTypes from "prop-types";
|
|
|
19
19
|
import { connect } from "react-redux";
|
|
20
20
|
import { evaluateText } from "./../../util/property-utils.js";
|
|
21
21
|
import classNames from "classnames";
|
|
22
|
-
import { STATES } from "./../../constants/constants";
|
|
22
|
+
import { STATES, CARBON_ICONS } from "./../../constants/constants";
|
|
23
|
+
import { isEmpty } from "lodash";
|
|
24
|
+
import Tooltip from "./../../../tooltip/tooltip.jsx";
|
|
25
|
+
import Icon from "./../../../icons/icon.jsx";
|
|
23
26
|
|
|
24
27
|
class TextPanel extends Component {
|
|
25
28
|
render() {
|
|
26
29
|
const className = this.props.panel.className ? this.props.panel.className : "";
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const hidden = this.props.panelState === STATES.HIDDEN;
|
|
31
|
+
const disabled = this.props.panelState === STATES.DISABLED;
|
|
32
|
+
let label = this.props.panel.label ? (<div className="panel-label">{this.props.panel.label}</div>) : null;
|
|
33
|
+
let description;
|
|
34
|
+
if (this.props.panel.description && !isEmpty(this.props.panel.description.text)) {
|
|
35
|
+
const dynamicDescriptionText = evaluateText(this.props.panel.description.text, this.props.controller);
|
|
36
|
+
if (this.props.panel.description.placement === "as_tooltip") {
|
|
37
|
+
// If tooltip has a link, add propertyId in the link object
|
|
38
|
+
if (this.props.panel.description.link) {
|
|
39
|
+
this.props.panel.description.link.propertyId = { name: this.props.panel.id };
|
|
40
|
+
}
|
|
41
|
+
const tooltip = (<Tooltip
|
|
42
|
+
id={`tooltip-label-${this.props.panel.id}`}
|
|
43
|
+
tip={dynamicDescriptionText}
|
|
44
|
+
link={this.props.panel.description.link ? this.props.panel.description.link : null}
|
|
45
|
+
tooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}
|
|
46
|
+
direction="bottom"
|
|
47
|
+
disable={hidden || disabled}
|
|
48
|
+
showToolTipOnClick
|
|
49
|
+
>
|
|
50
|
+
<Icon type={CARBON_ICONS.INFORMATION} className="properties-control-description-icon-info" />
|
|
51
|
+
</Tooltip>);
|
|
52
|
+
label = (
|
|
53
|
+
<div className={classNames("properties-label-container")}>
|
|
54
|
+
{label}
|
|
55
|
+
{tooltip}
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
} else {
|
|
59
|
+
description = <div className="panel-description">{dynamicDescriptionText}</div>;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
31
62
|
return (
|
|
32
63
|
<div
|
|
33
64
|
className={classNames(
|
|
34
65
|
"properties-text-panel",
|
|
35
|
-
{ "hide":
|
|
66
|
+
{ "hide": hidden },
|
|
36
67
|
{ "properties-control-nested-panel": this.props.panel.nestedPanel },
|
|
37
68
|
className
|
|
38
69
|
)}
|
|
39
|
-
disabled={
|
|
70
|
+
disabled={disabled}
|
|
40
71
|
>
|
|
41
72
|
{label}
|
|
42
73
|
{description}
|
|
@@ -15,9 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
.properties-text-panel {
|
|
18
|
-
:not(:empty) {
|
|
19
|
-
padding-bottom: $spacing-05;
|
|
20
|
-
}
|
|
21
18
|
.panel-label {
|
|
22
19
|
@include carbon--type-style("productive-heading-01");
|
|
23
20
|
color: $text-01;
|
|
@@ -26,6 +23,10 @@
|
|
|
26
23
|
.panel-description {
|
|
27
24
|
@include carbon--type-style("body-short-01");
|
|
28
25
|
color: $text-01;
|
|
26
|
+
padding-bottom: $spacing-05;
|
|
27
|
+
}
|
|
28
|
+
.tooltip-container {
|
|
29
|
+
margin-bottom: $spacing-03;
|
|
29
30
|
}
|
|
30
31
|
&[disabled] {
|
|
31
32
|
opacity: 0.5;
|