@elyra/canvas 12.10.0 → 12.11.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/dist/canvas-constants-7f93e705.js +2 -0
- package/dist/canvas-constants-7f93e705.js.map +1 -0
- package/dist/canvas-constants-ac5daafb.js +2 -0
- package/dist/canvas-constants-ac5daafb.js.map +1 -0
- package/dist/canvas-controller-183ff6a7.js +2 -0
- package/dist/canvas-controller-183ff6a7.js.map +1 -0
- package/dist/canvas-controller-d70a731e.js +2 -0
- package/dist/canvas-controller-d70a731e.js.map +1 -0
- package/dist/canvas-logger-815781bb.js +2 -0
- package/dist/canvas-logger-815781bb.js.map +1 -0
- package/dist/canvas-logger-a0f1beaa.js +2 -0
- package/dist/canvas-logger-a0f1beaa.js.map +1 -0
- package/dist/common-canvas-3e832a84.js +2 -0
- package/dist/common-canvas-3e832a84.js.map +1 -0
- package/dist/common-canvas-c50cb3f3.js +2 -0
- package/dist/common-canvas-c50cb3f3.js.map +1 -0
- package/dist/common-canvas.es.js +1 -1
- package/dist/common-canvas.es.js.map +1 -1
- package/dist/common-canvas.js +1 -1
- package/dist/common-canvas.js.map +1 -1
- package/dist/common-properties-4f471b2b.js +2 -0
- package/dist/common-properties-4f471b2b.js.map +1 -0
- package/dist/common-properties-9161cd27.js +2 -0
- package/dist/common-properties-9161cd27.js.map +1 -0
- package/dist/datarecord-metadata-v3-schema-bda88f2e.js +2 -0
- package/dist/datarecord-metadata-v3-schema-bda88f2e.js.map +1 -0
- package/dist/datarecord-metadata-v3-schema-d7ad05cd.js +2 -0
- package/dist/datarecord-metadata-v3-schema-d7ad05cd.js.map +1 -0
- package/dist/en-2ed89528.js +2 -0
- package/dist/en-2ed89528.js.map +1 -0
- package/dist/en-e93855cc.js +2 -0
- package/dist/en-e93855cc.js.map +1 -0
- package/dist/extends-39f57612.js +7 -0
- package/dist/extends-39f57612.js.map +1 -0
- package/dist/extends-51d9ddcc.js +7 -0
- package/dist/extends-51d9ddcc.js.map +1 -0
- package/dist/flexible-table-154a3359.js +2 -0
- package/dist/flexible-table-154a3359.js.map +1 -0
- package/dist/flexible-table-5e4a1e6d.js +2 -0
- package/dist/flexible-table-5e4a1e6d.js.map +1 -0
- package/dist/icon-811ffddd.js +2 -0
- package/dist/icon-811ffddd.js.map +1 -0
- package/dist/icon-d6909a68.js +2 -0
- package/dist/icon-d6909a68.js.map +1 -0
- package/dist/index-4fd90a14.js +2 -0
- package/dist/index-4fd90a14.js.map +1 -0
- package/dist/index-6d138021.js +2 -0
- package/dist/index-6d138021.js.map +1 -0
- package/dist/isArrayLikeObject-31e5e646.js +2 -0
- package/dist/isArrayLikeObject-31e5e646.js.map +1 -0
- package/dist/isArrayLikeObject-7c33c7fd.js +2 -0
- package/dist/isArrayLikeObject-7c33c7fd.js.map +1 -0
- package/dist/lib/canvas-controller.es.js +2 -0
- package/dist/lib/canvas-controller.es.js.map +1 -0
- package/dist/lib/canvas-controller.js +2 -0
- package/dist/lib/canvas-controller.js.map +1 -0
- 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.es.js.map +1 -1
- package/dist/lib/context-menu.js +1 -1
- package/dist/lib/context-menu.js.map +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-335252dd.js +2 -0
- package/dist/toolbar-335252dd.js.map +1 -0
- package/dist/toolbar-85e6c77b.js +2 -0
- package/dist/toolbar-85e6c77b.js.map +1 -0
- package/locales/command-actions/locales/en.json +7 -1
- package/locales/command-actions/locales/eo.json +7 -1
- package/locales/command-actions/locales/index.js +3 -1
- package/locales/command-actions/locales/ko.json +9 -0
- package/locales/common-canvas/locales/en.json +1 -0
- package/locales/common-canvas/locales/eo.json +1 -0
- package/locales/common-canvas/locales/index.js +3 -1
- package/locales/common-canvas/locales/ko.json +32 -0
- package/locales/common-properties/locales/index.js +3 -1
- package/locales/common-properties/locales/ko.json +93 -0
- package/locales/palette/locales/index.js +3 -1
- package/locales/palette/locales/ko.json +10 -0
- package/locales/toolbar/locales/index.js +3 -1
- package/locales/toolbar/locales/ko.json +8 -0
- package/package.json +7 -3
- package/rollup.config.js +10 -7
- package/src/color-picker/color-picker-panel.jsx +61 -0
- package/src/color-picker/color-picker.jsx +37 -0
- package/src/color-picker/color-picker.scss +46 -0
- package/src/command-actions/colorSelectedObjectsAction.js +72 -0
- package/src/command-actions/deleteObjectsAction.js +16 -11
- package/src/command-actions/pasteAction.js +50 -21
- package/src/common-canvas/canvas-controller.js +32 -5
- package/src/common-canvas/cc-bottom-panel.jsx +34 -37
- package/src/common-canvas/cc-contents.jsx +114 -12
- package/src/common-canvas/cc-toolbar.jsx +3 -2
- package/src/common-canvas/common-canvas-utils.js +39 -78
- package/src/common-canvas/common-canvas.scss +28 -14
- package/src/common-canvas/constants/canvas-constants.js +17 -16
- package/src/common-canvas/label-util.js +1 -1
- package/src/common-canvas/svg-canvas-d3.js +20 -107
- package/src/common-canvas/svg-canvas-d3.scss +67 -6
- package/src/common-canvas/svg-canvas-pipeline.js +201 -0
- package/src/common-canvas/svg-canvas-renderer.js +155 -164
- package/src/common-canvas/svg-canvas-utils-links.js +3 -3
- package/src/common-canvas/svg-canvas-utils-nodes.js +22 -34
- package/src/common-properties/actions.js +4 -0
- package/src/common-properties/components/field-picker/field-picker.jsx +33 -36
- package/src/common-properties/components/field-picker/field-picker.scss +20 -23
- package/src/common-properties/components/flexible-table/flexible-table.jsx +46 -31
- package/src/common-properties/components/flexible-table/flexible-table.scss +14 -17
- package/src/common-properties/components/properties-buttons/properties-buttons.jsx +28 -21
- package/src/common-properties/components/table-buttons/table-buttons.jsx +3 -1
- package/src/common-properties/components/table-buttons/table-buttons.scss +8 -8
- package/src/common-properties/components/title-editor/title-editor.jsx +31 -4
- package/src/common-properties/components/title-editor/title-editor.scss +30 -5
- package/src/common-properties/components/virtualized-table/virtualized-table.jsx +120 -29
- package/src/common-properties/components/virtualized-table/virtualized-table.scss +72 -8
- package/src/common-properties/constants/constants.js +5 -1
- package/src/common-properties/constants/form-constants.js +1 -0
- package/src/common-properties/controls/abstract-table.jsx +12 -11
- package/src/common-properties/controls/abstract-table.scss +6 -2
- package/src/common-properties/controls/dropdown/dropdown.scss +4 -0
- package/src/common-properties/controls/expression/expression-builder/expression-select-field-function.jsx +2 -2
- package/src/common-properties/controls/passwordfield/passwordfield.jsx +2 -2
- package/src/common-properties/controls/readonlytable/readonlytable.jsx +4 -2
- package/src/common-properties/controls/selectcolumns/selectcolumns.scss +0 -19
- package/src/common-properties/controls/someofselect/someofselect.scss +2 -2
- package/src/common-properties/form/ControlInfo.js +8 -0
- package/src/common-properties/form/EditorForm.js +4 -0
- package/src/common-properties/form/ParameterInfo.js +4 -0
- package/src/common-properties/panels/sub-panel/cell.jsx +18 -23
- package/src/common-properties/panels/sub-panel/sub-panel.scss +5 -22
- package/src/common-properties/properties-controller.js +18 -0
- package/src/common-properties/properties-main/properties-main.jsx +15 -9
- package/src/common-properties/properties-main/properties-main.scss +9 -2
- package/src/common-properties/properties-store.js +27 -1
- package/src/common-properties/reducers/properties-settings.js +17 -1
- package/src/context-menu/common-context-menu.jsx +74 -29
- package/src/context-menu/context-menu-wrapper.jsx +2 -2
- package/src/icons/icon.jsx +5 -46
- package/src/index.scss +1 -0
- package/src/object-model/api-pipeline.js +25 -42
- package/src/object-model/object-model.js +27 -3
- package/src/object-model/redux/canvas-store.js +68 -0
- package/src/object-model/redux/reducers/canvasinfo.js +36 -0
- package/src/object-model/redux/reducers/comments.js +58 -10
- package/src/object-model/redux/reducers/externalpipelineflows.js +1 -0
- package/src/object-model/redux/reducers/links.js +9 -7
- package/src/object-model/redux/reducers/selectioninfo.js +2 -1
- package/src/palette/palette-content-list-item.jsx +8 -1
- package/src/palette/palette-dialog-content-grid-node.jsx +8 -1
- package/src/palette/palette-flyout-utils.js +3 -3
- package/src/toolbar/toolbar-action-item.jsx +77 -14
- package/src/toolbar/toolbar-overflow-item.jsx +2 -3
- package/src/tooltip/tooltip.jsx +4 -1
- package/stats.html +1 -1
- package/dist/canvas-controller-5c90a709.js +0 -2
- package/dist/canvas-controller-5c90a709.js.map +0 -1
- package/dist/canvas-controller-a851a663.js +0 -2
- package/dist/canvas-controller-a851a663.js.map +0 -1
- package/dist/common-properties-3758e3b2.js +0 -2
- package/dist/common-properties-3758e3b2.js.map +0 -1
- package/dist/common-properties-6334cca1.js +0 -2
- package/dist/common-properties-6334cca1.js.map +0 -1
- package/dist/datarecord-metadata-v3-schema-3a2957c3.js +0 -2
- package/dist/datarecord-metadata-v3-schema-3a2957c3.js.map +0 -1
- package/dist/datarecord-metadata-v3-schema-82f2b977.js +0 -2
- package/dist/datarecord-metadata-v3-schema-82f2b977.js.map +0 -1
- package/dist/en-9e368daa.js +0 -2
- package/dist/en-9e368daa.js.map +0 -1
- package/dist/en-a3710fcf.js +0 -2
- package/dist/en-a3710fcf.js.map +0 -1
- package/dist/extends-41535aa9.js +0 -7
- package/dist/extends-41535aa9.js.map +0 -1
- package/dist/extends-76e6b8d2.js +0 -8
- package/dist/extends-76e6b8d2.js.map +0 -1
- package/dist/flexible-table-2bbb9e48.js +0 -2
- package/dist/flexible-table-2bbb9e48.js.map +0 -1
- package/dist/flexible-table-756ff86a.js +0 -2
- package/dist/flexible-table-756ff86a.js.map +0 -1
- package/dist/index-1eff5860.js +0 -2
- package/dist/index-1eff5860.js.map +0 -1
- package/dist/index-7fba99b9.js +0 -2
- package/dist/index-7fba99b9.js.map +0 -1
- package/dist/isEmpty-3550e76f.js +0 -2
- package/dist/isEmpty-3550e76f.js.map +0 -1
- package/dist/isEmpty-c6f783dd.js +0 -2
- package/dist/isEmpty-c6f783dd.js.map +0 -1
|
@@ -58,7 +58,7 @@ export default class SvgCanvasLinks {
|
|
|
58
58
|
let srcCenterX;
|
|
59
59
|
let srcCenterY;
|
|
60
60
|
|
|
61
|
-
if (srcNode.layout.drawNodeLinkLineFromTo === "image_center" && !
|
|
61
|
+
if (srcNode.layout.drawNodeLinkLineFromTo === "image_center" && !CanvasUtils.isExpanded(srcNode)) {
|
|
62
62
|
srcCenterX = this.nodeUtils.getNodeImageCenterPosX(srcNode);
|
|
63
63
|
srcCenterY = this.nodeUtils.getNodeImageCenterPosY(srcNode);
|
|
64
64
|
} else {
|
|
@@ -160,7 +160,7 @@ export default class SvgCanvasLinks {
|
|
|
160
160
|
let trgCenterX;
|
|
161
161
|
let trgCenterY;
|
|
162
162
|
|
|
163
|
-
if (srcNode.layout.drawNodeLinkLineFromTo === "image_center" && !
|
|
163
|
+
if (srcNode.layout.drawNodeLinkLineFromTo === "image_center" && !CanvasUtils.isExpanded(srcNode)) {
|
|
164
164
|
srcCenterX = this.nodeUtils.getNodeImageCenterPosX(srcNode);
|
|
165
165
|
srcCenterY = this.nodeUtils.getNodeImageCenterPosY(srcNode);
|
|
166
166
|
} else {
|
|
@@ -168,7 +168,7 @@ export default class SvgCanvasLinks {
|
|
|
168
168
|
srcCenterY = this.nodeUtils.getNodeCenterPosY(srcNode);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
if (trgNode.layout.drawNodeLinkLineFromTo === "image_center" && !
|
|
171
|
+
if (trgNode.layout.drawNodeLinkLineFromTo === "image_center" && !CanvasUtils.isExpanded(trgNode)) {
|
|
172
172
|
trgCenterX = this.nodeUtils.getNodeImageCenterPosX(trgNode);
|
|
173
173
|
trgCenterY = this.nodeUtils.getNodeImageCenterPosY(trgNode);
|
|
174
174
|
} else {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import CanvasUtils from "./common-canvas-utils.js";
|
|
18
18
|
import { ERROR, WARNING, NODE_ERROR_ICON, NODE_WARNING_ICON,
|
|
19
|
-
|
|
19
|
+
TEXT_AREA_BORDER_ADJUSTMENT } from "./constants/canvas-constants";
|
|
20
20
|
|
|
21
21
|
export default class SvgCanvasNodes {
|
|
22
22
|
constructor(canvasLayout) {
|
|
@@ -33,7 +33,7 @@ export default class SvgCanvasNodes {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
getNodeLabelClass(node) {
|
|
36
|
-
if (
|
|
36
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
37
37
|
return "d3-node-label d3-label-single-line " + this.getMessageLabelClass(node.messages);
|
|
38
38
|
}
|
|
39
39
|
const lineTypeClass = node.layout.labelSingleLine ? " d3-label-single-line" : " d3-label-multi-line";
|
|
@@ -42,7 +42,7 @@ export default class SvgCanvasNodes {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
getNodeLabelTextAreaClass(node) {
|
|
45
|
-
if (
|
|
45
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
46
46
|
return "d3-node-label-entry d3-label-single-line";
|
|
47
47
|
}
|
|
48
48
|
const lineTypeClass = node.layout.labelSingleLine ? " d3-label-single-line" : " d3-label-multi-line";
|
|
@@ -126,7 +126,7 @@ export default class SvgCanvasNodes {
|
|
|
126
126
|
|
|
127
127
|
// Returns the absolute x coordinate of the center of the node image
|
|
128
128
|
getNodeImageCenterPosX(node) {
|
|
129
|
-
if (
|
|
129
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
130
130
|
return node.x_pos + this.canvasLayout.supernodeImagePosX + (this.canvasLayout.supernodeImageWidth / 2);
|
|
131
131
|
}
|
|
132
132
|
return node.x_pos +
|
|
@@ -136,7 +136,7 @@ export default class SvgCanvasNodes {
|
|
|
136
136
|
|
|
137
137
|
// Returns the absolute y coordinate of the center of the node image
|
|
138
138
|
getNodeImageCenterPosY(node) {
|
|
139
|
-
if (
|
|
139
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
140
140
|
return node.y_pos + this.canvasLayout.supernodeImagePosY + (this.canvasLayout.supernodeImageHeight / 2);
|
|
141
141
|
}
|
|
142
142
|
return node.y_pos +
|
|
@@ -145,35 +145,35 @@ export default class SvgCanvasNodes {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
getNodeImagePosX(node) {
|
|
148
|
-
if (
|
|
148
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
149
149
|
return this.canvasLayout.supernodeImagePosX;
|
|
150
150
|
}
|
|
151
151
|
return this.getElementPosX(node.width, node.layout.imagePosX, node.layout.imagePosition);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
getNodeImagePosY(node) {
|
|
155
|
-
if (
|
|
155
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
156
156
|
return this.canvasLayout.supernodeImagePosY;
|
|
157
157
|
}
|
|
158
158
|
return this.getElementPosY(node.height, node.layout.imagePosY, node.layout.imagePosition);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
getNodeImageWidth(node) {
|
|
162
|
-
if (
|
|
162
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
163
163
|
return this.canvasLayout.supernodeImageWidth;
|
|
164
164
|
}
|
|
165
165
|
return node.layout.imageWidth;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
getNodeImageHeight(node) {
|
|
169
|
-
if (
|
|
169
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
170
170
|
return this.canvasLayout.supernodeImageHeight;
|
|
171
171
|
}
|
|
172
172
|
return node.layout.imageHeight;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
getNodeLabelPosX(node) {
|
|
176
|
-
if (
|
|
176
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
177
177
|
return this.canvasLayout.supernodeLabelPosX;
|
|
178
178
|
}
|
|
179
179
|
const x = this.getElementPosX(node.width, node.layout.labelPosX, node.layout.labelPosition);
|
|
@@ -181,21 +181,21 @@ export default class SvgCanvasNodes {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
getNodeLabelPosY(node) {
|
|
184
|
-
if (
|
|
184
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
185
185
|
return this.canvasLayout.supernodeLabelPosY;
|
|
186
186
|
}
|
|
187
187
|
return this.getElementPosY(node.height, node.layout.labelPosY, node.layout.labelPosition);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
getNodeLabelWidth(node) {
|
|
191
|
-
if (
|
|
191
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
192
192
|
return node.width - this.canvasLayout.supernodeLabelPosX + this.canvasLayout.supernodeErrorPosX;
|
|
193
193
|
}
|
|
194
194
|
return node.layout.labelWidth;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
getNodeLabelHeight(node) {
|
|
198
|
-
if (
|
|
198
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
199
199
|
return this.canvasLayout.supernodeLabelHeight;
|
|
200
200
|
}
|
|
201
201
|
return node.layout.labelHeight;
|
|
@@ -210,7 +210,7 @@ export default class SvgCanvasNodes {
|
|
|
210
210
|
const posX = fullLabelOnHover ? this.getNodeLabelHoverPosX(node) : this.getNodeLabelPosX(node);
|
|
211
211
|
const spanWidth = spanObj.getBoundingClientRect().width;
|
|
212
212
|
|
|
213
|
-
if (node.layout.labelAlign === "center" && !
|
|
213
|
+
if (node.layout.labelAlign === "center" && !CanvasUtils.isExpandedSupernode(node)) {
|
|
214
214
|
const halfLabelWidth = labelWidth / 2;
|
|
215
215
|
const xCenterPosition = posX + halfLabelWidth;
|
|
216
216
|
const xOffsetFromCenter = Math.min(halfLabelWidth, ((spanWidth / zoomScale) / 2));
|
|
@@ -271,14 +271,14 @@ export default class SvgCanvasNodes {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
getNodeEllipsisWidth(node) {
|
|
274
|
-
if (
|
|
274
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
275
275
|
return this.canvasLayout.supernodeEllipsisWidth;
|
|
276
276
|
}
|
|
277
277
|
return node.layout.ellipsisWidth;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
getNodeEllipsisHeight(node) {
|
|
281
|
-
if (
|
|
281
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
282
282
|
return this.canvasLayout.supernodeEllipsisHeight;
|
|
283
283
|
}
|
|
284
284
|
return node.layout.ellipsisHeight;
|
|
@@ -293,7 +293,7 @@ export default class SvgCanvasNodes {
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
getNodeEllipsisPosX(node) {
|
|
296
|
-
if (
|
|
296
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
297
297
|
return node.width + this.canvasLayout.supernodeEllipsisPosX;
|
|
298
298
|
}
|
|
299
299
|
|
|
@@ -301,7 +301,7 @@ export default class SvgCanvasNodes {
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
getNodeEllipsisPosY(node) {
|
|
304
|
-
if (
|
|
304
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
305
305
|
return this.canvasLayout.supernodeEllipsisPosY;
|
|
306
306
|
}
|
|
307
307
|
|
|
@@ -314,28 +314,28 @@ export default class SvgCanvasNodes {
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
getNodeErrorPosX(node) {
|
|
317
|
-
if (
|
|
317
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
318
318
|
return node.width + this.canvasLayout.supernodeErrorPosX;
|
|
319
319
|
}
|
|
320
320
|
return this.getElementPosX(node.width, node.layout.errorXPos, node.layout.errorPosition);
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
getNodeErrorPosY(node) {
|
|
324
|
-
if (
|
|
324
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
325
325
|
return this.canvasLayout.supernodeErrorPosY;
|
|
326
326
|
}
|
|
327
327
|
return this.getElementPosY(node.height, node.layout.errorYPos, node.layout.errorPosition);
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
getNodeErrorWidth(node) {
|
|
331
|
-
if (
|
|
331
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
332
332
|
return this.canvasLayout.supernodeErrorWidth;
|
|
333
333
|
}
|
|
334
334
|
return node.layout.errorWidth;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
getNodeErrorHeight(node) {
|
|
338
|
-
if (
|
|
338
|
+
if (CanvasUtils.isExpandedSupernode(node)) {
|
|
339
339
|
return this.canvasLayout.supernodeErrorHeight;
|
|
340
340
|
}
|
|
341
341
|
return node.layout.errorHeight;
|
|
@@ -363,18 +363,6 @@ export default class SvgCanvasNodes {
|
|
|
363
363
|
return y + Number(yOffset);
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
isExpandedSupernode(node) {
|
|
367
|
-
return this.isSupernode(node) && this.isExpanded(node);
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
isExpanded(node) {
|
|
371
|
-
return node.is_expanded === true;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
isSupernode(node) {
|
|
375
|
-
return node.type === SUPER_NODE;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
366
|
// Returns true if either the cardinality of the default input port or
|
|
379
367
|
// the default output port of the node passed in is maxed out based on
|
|
380
368
|
// the array of links passed in.
|
|
@@ -41,11 +41,15 @@ export const SET_ADD_REMOVE_ROWS = "SET_ADD_REMOVE_ROWS";
|
|
|
41
41
|
export const UPDATE_STATIC_ROWS = "UPDATE_STATIC_ROWS";
|
|
42
42
|
export const CLEAR_STATIC_ROWS = "CLEAR_STATIC_ROWS";
|
|
43
43
|
export const SET_TABLE_BUTTON_ENABLED = "SET_TABLE_BUTTON_ENABLED";
|
|
44
|
+
export const SET_HIDE_EDIT_BUTTON = "SET_HIDE_EDIT_BUTTON";
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
/*
|
|
47
48
|
* action creators
|
|
48
49
|
*/
|
|
50
|
+
export function setHideEditButton(disableState) {
|
|
51
|
+
return { type: SET_HIDE_EDIT_BUTTON, info: disableState };
|
|
52
|
+
}
|
|
49
53
|
|
|
50
54
|
export function setPropertyValues(properties) {
|
|
51
55
|
return { type: SET_PROPERTY_VALUES, properties };
|
|
@@ -140,43 +140,40 @@ export default class FieldPicker extends React.Component {
|
|
|
140
140
|
for (let i = 0; i < fields.length; i++) {
|
|
141
141
|
const field = fields[i];
|
|
142
142
|
const columns = [];
|
|
143
|
-
let
|
|
144
|
-
|
|
145
|
-
<div className="properties-fp-field-name">
|
|
146
|
-
{field.origName}
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
);
|
|
150
|
-
if (this.props.dmIcon) {
|
|
143
|
+
let dmIcon = null;
|
|
144
|
+
if (this.props.dmIcon && this.props.dmIcon !== "type") {
|
|
151
145
|
const metadata = this.props.controller.getDatasetMetadataFields();
|
|
152
|
-
const dmIconType = PropertyUtils.getDMFieldIcon(metadata,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
disabled = false;
|
|
158
|
-
}
|
|
159
|
-
const fpFieldName = (
|
|
160
|
-
<span className="properties-fp-field-name">
|
|
161
|
-
{field.origName}
|
|
162
|
-
</span>
|
|
163
|
-
);
|
|
164
|
-
const fieldNameWithTooltip = (
|
|
165
|
-
<TruncatedContentTooltip
|
|
166
|
-
content={fpFieldName}
|
|
167
|
-
tooltipText={field.origName}
|
|
168
|
-
disabled={disabled}
|
|
169
|
-
/>
|
|
170
|
-
);
|
|
171
|
-
fieldContent = (
|
|
172
|
-
<div className="properties-fp-field">
|
|
146
|
+
const dmIconType = PropertyUtils.getDMFieldIcon(metadata, field.origName, this.props.dmIcon);
|
|
147
|
+
const icon = dmIconType ? <Icon type={dmIconType} /> : null;
|
|
148
|
+
// don't show icon for type since it's already being displayed
|
|
149
|
+
if (icon) {
|
|
150
|
+
dmIcon = (
|
|
173
151
|
<div className="properties-fp-field-type-icon">
|
|
174
|
-
{
|
|
152
|
+
{icon}
|
|
175
153
|
</div>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
);
|
|
154
|
+
);
|
|
155
|
+
}
|
|
179
156
|
}
|
|
157
|
+
const fpFieldName = (
|
|
158
|
+
<span className="properties-fp-field-name">
|
|
159
|
+
{field.origName}
|
|
160
|
+
</span>
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
const fieldNameWithTooltip = (
|
|
164
|
+
<TruncatedContentTooltip
|
|
165
|
+
content={fpFieldName}
|
|
166
|
+
tooltipText={field.origName}
|
|
167
|
+
disabled={false}
|
|
168
|
+
/>
|
|
169
|
+
);
|
|
170
|
+
const fieldContent = (
|
|
171
|
+
<div className="properties-fp-field">
|
|
172
|
+
{dmIcon}
|
|
173
|
+
{fieldNameWithTooltip}
|
|
174
|
+
</div>
|
|
175
|
+
);
|
|
176
|
+
|
|
180
177
|
columns.push({
|
|
181
178
|
column: "fieldName",
|
|
182
179
|
content: fieldContent,
|
|
@@ -448,7 +445,7 @@ export default class FieldPicker extends React.Component {
|
|
|
448
445
|
onSort={this.onSort}
|
|
449
446
|
filterKeyword={this.state.filterText}
|
|
450
447
|
scrollKey="field-picker"
|
|
451
|
-
|
|
448
|
+
noAutoSize
|
|
452
449
|
tableLabel={this.props.title ? this.props.title : ""}
|
|
453
450
|
selectedRows={this.selectedRowsIndex}
|
|
454
451
|
updateRowSelections={this.updateFieldSelections}
|
|
@@ -465,14 +462,14 @@ export default class FieldPicker extends React.Component {
|
|
|
465
462
|
const table = this._genTable();
|
|
466
463
|
|
|
467
464
|
if (this.props.rightFlyout) {
|
|
468
|
-
return (<
|
|
465
|
+
return (<React.Fragment>
|
|
469
466
|
<div className="properties-fp-top-row">
|
|
470
467
|
{filterTypes}
|
|
471
468
|
{resetButton}
|
|
472
469
|
</div>
|
|
473
470
|
{table}
|
|
474
471
|
{backButton}
|
|
475
|
-
</
|
|
472
|
+
</React.Fragment>);
|
|
476
473
|
}
|
|
477
474
|
|
|
478
475
|
return (<div>
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
height: 100%;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.properties-wf-content .properties-fp-table .properties-ft-container-absolute {
|
|
22
|
-
height: 450px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
21
|
.properties-fp-data {
|
|
26
22
|
height: 100%;
|
|
27
23
|
display: flex;
|
|
@@ -29,22 +25,22 @@
|
|
|
29
25
|
}
|
|
30
26
|
|
|
31
27
|
.properties-fp-field, .properties-fp-data {
|
|
32
|
-
padding-left:
|
|
28
|
+
padding-left: $spacing-05;
|
|
33
29
|
display: flex;
|
|
34
30
|
align-items: center;
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
.properties-fp-schema {
|
|
38
|
-
padding-left:
|
|
34
|
+
padding-left: $spacing-05;
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
.properties-fp-field-type-icon, .properties-fp-data-type-icon {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
margin-right:
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
margin-right: $spacing-03;
|
|
45
41
|
> svg {
|
|
46
|
-
width:
|
|
47
|
-
height:
|
|
42
|
+
width: $spacing-05;
|
|
43
|
+
height: $spacing-05;
|
|
48
44
|
}
|
|
49
45
|
}
|
|
50
46
|
|
|
@@ -54,23 +50,23 @@
|
|
|
54
50
|
|
|
55
51
|
.properties-fp-filter-list-title.properties-fp-filter-list-li {
|
|
56
52
|
width: auto;
|
|
57
|
-
margin-left:
|
|
53
|
+
margin-left: $spacing-05;
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
.properties-fp-filter-list-li {
|
|
61
57
|
float: left;
|
|
62
|
-
padding:
|
|
58
|
+
padding: $spacing-01;
|
|
63
59
|
|
|
64
60
|
button {
|
|
65
|
-
min-height:
|
|
61
|
+
min-height: $spacing-05;
|
|
66
62
|
padding: 0;
|
|
67
63
|
border: 0;
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
svg {
|
|
71
|
-
height:
|
|
72
|
-
width:
|
|
73
|
-
margin:
|
|
67
|
+
height: $spacing-05;
|
|
68
|
+
width: $spacing-05;
|
|
69
|
+
margin: $spacing-01;
|
|
74
70
|
|
|
75
71
|
&[disabled] {
|
|
76
72
|
fill: $disabled-02;
|
|
@@ -81,6 +77,7 @@
|
|
|
81
77
|
|
|
82
78
|
.properties-fp-table {
|
|
83
79
|
width: 100%;
|
|
80
|
+
height: 100%;
|
|
84
81
|
|
|
85
82
|
.properties-fp-top-row {
|
|
86
83
|
width: 50%;
|
|
@@ -99,24 +96,24 @@
|
|
|
99
96
|
.properties-modal {
|
|
100
97
|
.properties-fp-top-row {
|
|
101
98
|
width: 100%;
|
|
102
|
-
margin-bottom:
|
|
99
|
+
margin-bottom: $spacing-03;
|
|
103
100
|
display: flex;
|
|
104
101
|
justify-content: space-between;
|
|
105
102
|
|
|
106
103
|
.properties-fp-button-label {
|
|
107
104
|
position: relative;
|
|
108
|
-
top:
|
|
105
|
+
top: $spacing-03;
|
|
109
106
|
}
|
|
110
107
|
|
|
111
108
|
// This back button is used in common-properties modal format
|
|
112
109
|
.properties-fp-back-button {
|
|
113
|
-
height:
|
|
114
|
-
width:
|
|
110
|
+
height: $spacing-07;
|
|
111
|
+
width: $spacing-07;
|
|
115
112
|
padding: 0;
|
|
116
|
-
margin-right:
|
|
113
|
+
margin-right: $spacing-03;
|
|
117
114
|
|
|
118
115
|
> svg {
|
|
119
|
-
left:
|
|
116
|
+
left: $spacing-03;
|
|
120
117
|
}
|
|
121
118
|
}
|
|
122
119
|
}
|
|
@@ -37,7 +37,7 @@ class FlexibleTable extends React.Component {
|
|
|
37
37
|
if (typeof this.props.sortable !== "undefined") {
|
|
38
38
|
for (var i = 0; i < this.props.sortable.length; i++) {
|
|
39
39
|
const sortCol = this.props.sortable[i];
|
|
40
|
-
sortDirs[sortCol] = SORT_DIRECTION.
|
|
40
|
+
sortDirs[sortCol] = SORT_DIRECTION.NOT_SORTED;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
this.state = {
|
|
@@ -242,34 +242,24 @@ class FlexibleTable extends React.Component {
|
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
244
|
let newHeight = this.state.tableHeight;
|
|
245
|
-
const rowHeight = 2
|
|
246
|
-
const headerHeight = 2
|
|
245
|
+
const rowHeight = 2; // in rem
|
|
246
|
+
const headerHeight = 2; // in rem
|
|
247
247
|
const rows = typeof this.props.rows !== "undefined" ? this.props.rows : 4;
|
|
248
|
-
if (
|
|
249
|
-
newHeight = (rowHeight *
|
|
248
|
+
if (Array.isArray(this.props.data) && this.props.data.length < rows) {
|
|
249
|
+
newHeight = (rowHeight * this.props.data.length + headerHeight) + "rem";
|
|
250
|
+
} else if (rows > 0) {
|
|
251
|
+
newHeight = (rowHeight * rows + headerHeight) + "rem";
|
|
250
252
|
} else if (rows === 0) { // only display header
|
|
251
|
-
newHeight = headerHeight;
|
|
252
|
-
} else {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
if (container.length > 0) {
|
|
260
|
-
const parentElement = container[container.length - 1]; // Adjust height to the latest wide flyout opened
|
|
261
|
-
const tableElements = parentElement.getElementsByClassName("properties-ft-container-wrapper");
|
|
262
|
-
const tableElement = tableElements.length > 0 ? tableElements[tableElements.length - 1] : null;
|
|
263
|
-
if (tableElement) {
|
|
264
|
-
const style = window.getComputedStyle(tableElement, null).getPropertyValue("font-size");
|
|
265
|
-
const fontSize = parseFloat(style);
|
|
266
|
-
// this is to adjust for multiple-select edit.
|
|
267
|
-
// There is one additional row and header to account for.
|
|
268
|
-
const minHeight = (rowHeight + headerHeight);
|
|
269
|
-
newHeight = (parentElement.offsetHeight - tableElement.offsetTop) / fontSize + headerHeight;
|
|
270
|
-
newHeight = Math.max(newHeight, minHeight);
|
|
253
|
+
newHeight = headerHeight + "rem";
|
|
254
|
+
} else if (rows === -1) {
|
|
255
|
+
if (this.flexibleTable) {
|
|
256
|
+
const labelAndDescriptionHeight = 50; // possible dynamically set this in the future
|
|
257
|
+
const ftHeaderHeight = ReactDOM.findDOMNode(this.flexibleTableHeader).getBoundingClientRect().height;
|
|
258
|
+
const flyoutHeight = this.findPropertyNodeHeight(this.flexibleTable, "properties-wf-children");
|
|
259
|
+
if (flyoutHeight === 0) {
|
|
260
|
+
newHeight = "100vh"; // set full window height if flyout height not found
|
|
271
261
|
} else {
|
|
272
|
-
newHeight = (
|
|
262
|
+
newHeight = `calc(${flyoutHeight - ftHeaderHeight - labelAndDescriptionHeight}px - 3.5rem)`; // 3.5rem to adjust padding
|
|
273
263
|
}
|
|
274
264
|
}
|
|
275
265
|
}
|
|
@@ -278,9 +268,29 @@ class FlexibleTable extends React.Component {
|
|
|
278
268
|
}
|
|
279
269
|
}
|
|
280
270
|
|
|
271
|
+
findPropertyNodeHeight(node, className) {
|
|
272
|
+
if (node && node.parentNode && node.parentNode.className && node.parentNode.className.includes(className)) {
|
|
273
|
+
const foundNode = ReactDOM.findDOMNode(node.parentNode).getBoundingClientRect();
|
|
274
|
+
if (foundNode) {
|
|
275
|
+
return foundNode.height;
|
|
276
|
+
}
|
|
277
|
+
return 0;
|
|
278
|
+
} else if (node && node.parentNode) {
|
|
279
|
+
return this.findPropertyNodeHeight(node.parentNode, className);
|
|
280
|
+
}
|
|
281
|
+
return 0;
|
|
282
|
+
}
|
|
283
|
+
|
|
281
284
|
sortHeaderClick({ dataKey }) {
|
|
282
285
|
const colSortDir = this.state.columnSortDir;
|
|
283
286
|
if (typeof colSortDir[dataKey] !== "undefined") {
|
|
287
|
+
// At a time only 1 column will be shown as sorted. Revert other columns to not sorted.
|
|
288
|
+
Object.keys(colSortDir).forEach((key) => {
|
|
289
|
+
if (key !== dataKey) {
|
|
290
|
+
colSortDir[key] = SORT_DIRECTION.NOT_SORTED;
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
// Only dataKey column will be sorted
|
|
284
294
|
colSortDir[dataKey] = (colSortDir[dataKey] === SORT_DIRECTION.ASC) ? SORT_DIRECTION.DESC : SORT_DIRECTION.ASC;
|
|
285
295
|
this.setState({
|
|
286
296
|
columnSortDir: colSortDir,
|
|
@@ -344,7 +354,8 @@ class FlexibleTable extends React.Component {
|
|
|
344
354
|
* "key": string,
|
|
345
355
|
* "label": string,
|
|
346
356
|
* "width": integer or string if containts 'px',
|
|
347
|
-
* "description": optional string
|
|
357
|
+
* "description": optional string,
|
|
358
|
+
* "resizable": optional string
|
|
348
359
|
* }
|
|
349
360
|
* ]
|
|
350
361
|
* @param columnWidths
|
|
@@ -370,6 +381,7 @@ class FlexibleTable extends React.Component {
|
|
|
370
381
|
width: width,
|
|
371
382
|
description: columnDef.description,
|
|
372
383
|
headerLabel: headerLabel,
|
|
384
|
+
resizable: columnDef.resizable,
|
|
373
385
|
operation: columnDef.operation
|
|
374
386
|
});
|
|
375
387
|
}
|
|
@@ -409,7 +421,6 @@ class FlexibleTable extends React.Component {
|
|
|
409
421
|
|
|
410
422
|
render() {
|
|
411
423
|
const tableWidth = this.state.tableWidth;
|
|
412
|
-
const tableHeight = this.state.tableHeight; // subtract 2 px for the borders
|
|
413
424
|
const columnWidths = this.calculateColumnWidths(this.props.columns, tableWidth);
|
|
414
425
|
const headerInfo = this.generateTableHeaderRow(columnWidths);
|
|
415
426
|
|
|
@@ -449,13 +460,17 @@ class FlexibleTable extends React.Component {
|
|
|
449
460
|
scrollIndex = this.props.scrollToRow;
|
|
450
461
|
}
|
|
451
462
|
|
|
452
|
-
|
|
463
|
+
let heightStyle = {};
|
|
464
|
+
if (!this.props.noAutoSize) {
|
|
465
|
+
heightStyle = { height: this.state.tableHeight };
|
|
466
|
+
}
|
|
467
|
+
|
|
453
468
|
const containerClass = this.props.showHeader ? "properties-ft-container-absolute " : "properties-ft-container-absolute-noheader ";
|
|
454
469
|
const messageClass = (!this.props.messageInfo) ? containerClass + STATES.INFO : containerClass + this.props.messageInfo.type;
|
|
455
470
|
|
|
456
471
|
return (
|
|
457
|
-
<div data-id={"properties-ft-" + this.props.scrollKey} className="properties-ft-control-container">
|
|
458
|
-
<div className="properties-ft-table-header">
|
|
472
|
+
<div data-id={"properties-ft-" + this.props.scrollKey} className="properties-ft-control-container" ref={ (ref) => (this.flexibleTable = ref) }>
|
|
473
|
+
<div className="properties-ft-table-header" ref={ (ref) => (this.flexibleTableHeader = ref) }>
|
|
459
474
|
{searchBar}
|
|
460
475
|
{this.props.topRightPanel}
|
|
461
476
|
</div>
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
$flexible-table-header-row-height:
|
|
17
|
-
$row-left-padding:
|
|
16
|
+
$flexible-table-header-row-height: $spacing-07;
|
|
17
|
+
$row-left-padding: $spacing-02;
|
|
18
18
|
|
|
19
19
|
.properties-ft-table-header {
|
|
20
20
|
display: flex;
|
|
@@ -39,6 +39,14 @@ $row-left-padding: 4px;
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
.properties-ft-container-panel {
|
|
43
|
+
height: calc(100% - $spacing-07); // adjust height for table header
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.properties-ft-control-container {
|
|
47
|
+
height: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
.properties-ft-container-wrapper {
|
|
43
51
|
height: 400px;
|
|
44
52
|
width: 100%;
|
|
@@ -62,9 +70,6 @@ $row-left-padding: 4px;
|
|
|
62
70
|
&.warning {
|
|
63
71
|
border: 1px solid $support-03;
|
|
64
72
|
}
|
|
65
|
-
.row-checkbox {
|
|
66
|
-
padding-left: 12px;
|
|
67
|
-
}
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
.properties-ft-container-absolute {
|
|
@@ -83,19 +88,11 @@ $row-left-padding: 4px;
|
|
|
83
88
|
|
|
84
89
|
div[data-role="properties-header-row"] {
|
|
85
90
|
width: inherit;
|
|
86
|
-
background-color: $ui-03;
|
|
87
91
|
display: inline-flex;
|
|
88
|
-
height: 2.5em;
|
|
89
92
|
.properties-autosized-vt-header {
|
|
90
93
|
&:focus {
|
|
91
94
|
outline: none;
|
|
92
95
|
}
|
|
93
|
-
// sort icon in header
|
|
94
|
-
svg {
|
|
95
|
-
margin-left: 3px;
|
|
96
|
-
width: 11px;
|
|
97
|
-
height: 11px;
|
|
98
|
-
}
|
|
99
96
|
// sort icon viewable when hover or sorted column
|
|
100
97
|
.properties-ft-column-sort-icon
|
|
101
98
|
svg:not(:root) {
|
|
@@ -105,19 +102,19 @@ $row-left-padding: 4px;
|
|
|
105
102
|
.properties-ft-column-sort-icon
|
|
106
103
|
svg:not(:root) {
|
|
107
104
|
display: inline;
|
|
108
|
-
stroke: $icon-01;
|
|
109
105
|
}
|
|
110
|
-
.sort-column-active
|
|
111
|
-
.properties-ft-column-sort-icon
|
|
106
|
+
.sort-column-active > .properties-ft-column-sort-icon
|
|
112
107
|
svg:not(:root) {
|
|
113
108
|
display: inline;
|
|
114
|
-
stroke: $icon-01;
|
|
115
109
|
}
|
|
116
110
|
}
|
|
117
111
|
|
|
118
112
|
.properties-tooltips-container {
|
|
119
113
|
display: inline-flex;
|
|
114
|
+
justify-content: space-between; // Adding space between column label and sort icon
|
|
120
115
|
width: 100%;
|
|
116
|
+
align-self: center;
|
|
117
|
+
padding: 0 $spacing-05;
|
|
121
118
|
}
|
|
122
119
|
.tooltip-container {
|
|
123
120
|
overflow: hidden;
|