@elyra/canvas 12.10.1 → 12.11.1

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 (207) hide show
  1. package/dist/canvas-constants-7f93e705.js +2 -0
  2. package/dist/canvas-constants-7f93e705.js.map +1 -0
  3. package/dist/canvas-constants-ac5daafb.js +2 -0
  4. package/dist/canvas-constants-ac5daafb.js.map +1 -0
  5. package/dist/canvas-controller-09d0c333.js +2 -0
  6. package/dist/canvas-controller-09d0c333.js.map +1 -0
  7. package/dist/canvas-controller-c2793ca2.js +2 -0
  8. package/dist/canvas-controller-c2793ca2.js.map +1 -0
  9. package/dist/canvas-logger-815781bb.js +2 -0
  10. package/dist/canvas-logger-815781bb.js.map +1 -0
  11. package/dist/canvas-logger-a0f1beaa.js +2 -0
  12. package/dist/canvas-logger-a0f1beaa.js.map +1 -0
  13. package/dist/common-canvas-5b046a86.js +2 -0
  14. package/dist/common-canvas-5b046a86.js.map +1 -0
  15. package/dist/common-canvas-985cc0a2.js +2 -0
  16. package/dist/common-canvas-985cc0a2.js.map +1 -0
  17. package/dist/common-canvas.es.js +1 -1
  18. package/dist/common-canvas.es.js.map +1 -1
  19. package/dist/common-canvas.js +1 -1
  20. package/dist/common-canvas.js.map +1 -1
  21. package/dist/common-properties-4f471b2b.js +2 -0
  22. package/dist/common-properties-4f471b2b.js.map +1 -0
  23. package/dist/common-properties-9161cd27.js +2 -0
  24. package/dist/common-properties-9161cd27.js.map +1 -0
  25. package/dist/datarecord-metadata-v3-schema-bda88f2e.js +2 -0
  26. package/dist/datarecord-metadata-v3-schema-bda88f2e.js.map +1 -0
  27. package/dist/datarecord-metadata-v3-schema-d7ad05cd.js +2 -0
  28. package/dist/datarecord-metadata-v3-schema-d7ad05cd.js.map +1 -0
  29. package/dist/en-2ed89528.js +2 -0
  30. package/dist/en-2ed89528.js.map +1 -0
  31. package/dist/en-e93855cc.js +2 -0
  32. package/dist/en-e93855cc.js.map +1 -0
  33. package/dist/extends-39f57612.js +7 -0
  34. package/dist/extends-39f57612.js.map +1 -0
  35. package/dist/extends-51d9ddcc.js +7 -0
  36. package/dist/extends-51d9ddcc.js.map +1 -0
  37. package/dist/flexible-table-154a3359.js +2 -0
  38. package/dist/flexible-table-154a3359.js.map +1 -0
  39. package/dist/flexible-table-5e4a1e6d.js +2 -0
  40. package/dist/flexible-table-5e4a1e6d.js.map +1 -0
  41. package/dist/icon-811ffddd.js +2 -0
  42. package/dist/icon-811ffddd.js.map +1 -0
  43. package/dist/icon-d6909a68.js +2 -0
  44. package/dist/icon-d6909a68.js.map +1 -0
  45. package/dist/index-4fd90a14.js +2 -0
  46. package/dist/index-4fd90a14.js.map +1 -0
  47. package/dist/index-6d138021.js +2 -0
  48. package/dist/index-6d138021.js.map +1 -0
  49. package/dist/isArrayLikeObject-31e5e646.js +2 -0
  50. package/dist/isArrayLikeObject-31e5e646.js.map +1 -0
  51. package/dist/isArrayLikeObject-7c33c7fd.js +2 -0
  52. package/dist/isArrayLikeObject-7c33c7fd.js.map +1 -0
  53. package/dist/lib/canvas-controller.es.js +1 -1
  54. package/dist/lib/canvas-controller.js +1 -1
  55. package/dist/lib/canvas.es.js +1 -1
  56. package/dist/lib/canvas.js +1 -1
  57. package/dist/lib/context-menu.es.js +1 -1
  58. package/dist/lib/context-menu.es.js.map +1 -1
  59. package/dist/lib/context-menu.js +1 -1
  60. package/dist/lib/context-menu.js.map +1 -1
  61. package/dist/lib/properties/field-picker.es.js +1 -1
  62. package/dist/lib/properties/field-picker.js +1 -1
  63. package/dist/lib/properties/flexible-table.es.js +1 -1
  64. package/dist/lib/properties/flexible-table.js +1 -1
  65. package/dist/lib/properties.es.js +1 -1
  66. package/dist/lib/properties.js +1 -1
  67. package/dist/lib/tooltip.es.js +1 -1
  68. package/dist/lib/tooltip.es.js.map +1 -1
  69. package/dist/lib/tooltip.js +1 -1
  70. package/dist/lib/tooltip.js.map +1 -1
  71. package/dist/styles/common-canvas.min.css +1 -1
  72. package/dist/styles/common-canvas.min.css.map +1 -1
  73. package/dist/toolbar-335252dd.js +2 -0
  74. package/dist/toolbar-335252dd.js.map +1 -0
  75. package/dist/toolbar-85e6c77b.js +2 -0
  76. package/dist/toolbar-85e6c77b.js.map +1 -0
  77. package/locales/command-actions/locales/en.json +7 -1
  78. package/locales/command-actions/locales/eo.json +7 -1
  79. package/locales/command-actions/locales/index.js +3 -1
  80. package/locales/command-actions/locales/ko.json +9 -0
  81. package/locales/common-canvas/locales/en.json +1 -0
  82. package/locales/common-canvas/locales/eo.json +1 -0
  83. package/locales/common-canvas/locales/index.js +3 -1
  84. package/locales/common-canvas/locales/ko.json +32 -0
  85. package/locales/common-properties/locales/index.js +3 -1
  86. package/locales/common-properties/locales/ko.json +93 -0
  87. package/locales/palette/locales/index.js +3 -1
  88. package/locales/palette/locales/ko.json +10 -0
  89. package/locales/toolbar/locales/index.js +3 -1
  90. package/locales/toolbar/locales/ko.json +8 -0
  91. package/package.json +2 -1
  92. package/src/color-picker/color-picker-panel.jsx +61 -0
  93. package/src/color-picker/color-picker.jsx +37 -0
  94. package/src/color-picker/color-picker.scss +46 -0
  95. package/src/command-actions/colorSelectedObjectsAction.js +72 -0
  96. package/src/command-actions/deleteObjectsAction.js +16 -11
  97. package/src/command-actions/pasteAction.js +50 -21
  98. package/src/common-canvas/canvas-controller.js +32 -5
  99. package/src/common-canvas/cc-bottom-panel.jsx +34 -37
  100. package/src/common-canvas/cc-contents.jsx +110 -8
  101. package/src/common-canvas/cc-toolbar.jsx +3 -2
  102. package/src/common-canvas/common-canvas-utils.js +73 -90
  103. package/src/common-canvas/common-canvas.scss +28 -14
  104. package/src/common-canvas/constants/canvas-constants.js +17 -16
  105. package/src/common-canvas/label-util.js +1 -1
  106. package/src/common-canvas/svg-canvas-d3.js +20 -107
  107. package/src/common-canvas/svg-canvas-d3.scss +67 -6
  108. package/src/common-canvas/svg-canvas-pipeline.js +201 -0
  109. package/src/common-canvas/svg-canvas-renderer.js +325 -339
  110. package/src/common-canvas/svg-canvas-utils-links.js +3 -3
  111. package/src/common-canvas/svg-canvas-utils-nodes.js +22 -44
  112. package/src/common-properties/actions.js +4 -0
  113. package/src/common-properties/components/field-picker/field-picker.jsx +33 -36
  114. package/src/common-properties/components/field-picker/field-picker.scss +20 -23
  115. package/src/common-properties/components/flexible-table/flexible-table.jsx +46 -31
  116. package/src/common-properties/components/flexible-table/flexible-table.scss +14 -17
  117. package/src/common-properties/components/properties-buttons/properties-buttons.jsx +28 -21
  118. package/src/common-properties/components/table-buttons/table-buttons.jsx +3 -1
  119. package/src/common-properties/components/table-buttons/table-buttons.scss +8 -8
  120. package/src/common-properties/components/title-editor/title-editor.jsx +31 -4
  121. package/src/common-properties/components/title-editor/title-editor.scss +30 -5
  122. package/src/common-properties/components/virtualized-table/virtualized-table.jsx +119 -27
  123. package/src/common-properties/components/virtualized-table/virtualized-table.scss +72 -8
  124. package/src/common-properties/constants/constants.js +5 -1
  125. package/src/common-properties/constants/form-constants.js +1 -0
  126. package/src/common-properties/controls/abstract-table.jsx +12 -11
  127. package/src/common-properties/controls/abstract-table.scss +6 -2
  128. package/src/common-properties/controls/dropdown/dropdown.scss +4 -0
  129. package/src/common-properties/controls/expression/expression-builder/expression-select-field-function.jsx +2 -2
  130. package/src/common-properties/controls/expression/expression.scss +1 -1
  131. package/src/common-properties/controls/passwordfield/passwordfield.jsx +2 -2
  132. package/src/common-properties/controls/readonlytable/readonlytable.jsx +4 -2
  133. package/src/common-properties/controls/selectcolumns/selectcolumns.scss +0 -19
  134. package/src/common-properties/controls/someofselect/someofselect.scss +2 -2
  135. package/src/common-properties/form/ControlInfo.js +8 -0
  136. package/src/common-properties/form/EditorForm.js +4 -0
  137. package/src/common-properties/form/ParameterInfo.js +4 -0
  138. package/src/common-properties/panels/sub-panel/cell.jsx +18 -23
  139. package/src/common-properties/panels/sub-panel/sub-panel.scss +5 -22
  140. package/src/common-properties/properties-controller.js +18 -0
  141. package/src/common-properties/properties-main/properties-main.jsx +15 -9
  142. package/src/common-properties/properties-main/properties-main.scss +9 -2
  143. package/src/common-properties/properties-store.js +27 -1
  144. package/src/common-properties/reducers/properties-settings.js +17 -1
  145. package/src/context-menu/common-context-menu.jsx +74 -29
  146. package/src/context-menu/context-menu-wrapper.jsx +2 -2
  147. package/src/icons/icon.jsx +5 -46
  148. package/src/index.scss +1 -0
  149. package/src/object-model/api-pipeline.js +26 -43
  150. package/src/object-model/object-model.js +27 -3
  151. package/src/object-model/redux/canvas-store.js +68 -0
  152. package/src/object-model/redux/reducers/canvasinfo.js +36 -0
  153. package/src/object-model/redux/reducers/comments.js +58 -10
  154. package/src/object-model/redux/reducers/externalpipelineflows.js +1 -0
  155. package/src/object-model/redux/reducers/links.js +9 -7
  156. package/src/object-model/redux/reducers/selectioninfo.js +2 -1
  157. package/src/palette/palette-content-list-item.jsx +8 -1
  158. package/src/palette/palette-dialog-content-grid-node.jsx +8 -1
  159. package/src/palette/palette-flyout-utils.js +3 -3
  160. package/src/toolbar/toolbar-action-item.jsx +75 -11
  161. package/src/toolbar/toolbar-overflow-item.jsx +2 -3
  162. package/src/tooltip/tooltip.jsx +4 -1
  163. package/stats.html +1 -1
  164. package/dist/canvas-constants-af93267a.js +0 -2
  165. package/dist/canvas-constants-af93267a.js.map +0 -1
  166. package/dist/canvas-constants-ffce3b78.js +0 -2
  167. package/dist/canvas-constants-ffce3b78.js.map +0 -1
  168. package/dist/canvas-controller-27101eb5.js +0 -2
  169. package/dist/canvas-controller-27101eb5.js.map +0 -1
  170. package/dist/canvas-controller-a57e3b7a.js +0 -2
  171. package/dist/canvas-controller-a57e3b7a.js.map +0 -1
  172. package/dist/common-canvas-f409dcd4.js +0 -2
  173. package/dist/common-canvas-f409dcd4.js.map +0 -1
  174. package/dist/common-canvas-f6fc2fff.js +0 -2
  175. package/dist/common-canvas-f6fc2fff.js.map +0 -1
  176. package/dist/common-properties-653e50e3.js +0 -2
  177. package/dist/common-properties-653e50e3.js.map +0 -1
  178. package/dist/common-properties-e2c6def7.js +0 -2
  179. package/dist/common-properties-e2c6def7.js.map +0 -1
  180. package/dist/datarecord-metadata-v3-schema-10ddafaf.js +0 -2
  181. package/dist/datarecord-metadata-v3-schema-10ddafaf.js.map +0 -1
  182. package/dist/datarecord-metadata-v3-schema-1504c843.js +0 -2
  183. package/dist/datarecord-metadata-v3-schema-1504c843.js.map +0 -1
  184. package/dist/en-517f38fc.js +0 -2
  185. package/dist/en-517f38fc.js.map +0 -1
  186. package/dist/en-dc6f2e9f.js +0 -2
  187. package/dist/en-dc6f2e9f.js.map +0 -1
  188. package/dist/extends-5a45f92e.js +0 -7
  189. package/dist/extends-5a45f92e.js.map +0 -1
  190. package/dist/extends-a52336ca.js +0 -8
  191. package/dist/extends-a52336ca.js.map +0 -1
  192. package/dist/flexible-table-e6ccbe58.js +0 -2
  193. package/dist/flexible-table-e6ccbe58.js.map +0 -1
  194. package/dist/flexible-table-f60c1680.js +0 -2
  195. package/dist/flexible-table-f60c1680.js.map +0 -1
  196. package/dist/index-567978da.js +0 -2
  197. package/dist/index-567978da.js.map +0 -1
  198. package/dist/index-59486e9a.js +0 -2
  199. package/dist/index-59486e9a.js.map +0 -1
  200. package/dist/isEmpty-def8f509.js +0 -2
  201. package/dist/isEmpty-def8f509.js.map +0 -1
  202. package/dist/isEmpty-e171b734.js +0 -2
  203. package/dist/isEmpty-e171b734.js.map +0 -1
  204. package/dist/toolbar-404bf690.js +0 -2
  205. package/dist/toolbar-404bf690.js.map +0 -1
  206. package/dist/toolbar-611d8ab9.js +0 -2
  207. package/dist/toolbar-611d8ab9.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" && !this.nodeUtils.isExpanded(srcNode)) {
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" && !this.nodeUtils.isExpanded(srcNode)) {
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" && !this.nodeUtils.isExpanded(trgNode)) {
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
- SUPER_NODE, TEXT_AREA_BORDER_ADJUSTMENT } from "./constants/canvas-constants";
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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" && !this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
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 (this.isExpandedSupernode(node)) {
338
+ if (CanvasUtils.isExpandedSupernode(node)) {
339
339
  return this.canvasLayout.supernodeErrorHeight;
340
340
  }
341
341
  return node.layout.errorHeight;
@@ -363,28 +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
- // Returns true if either the cardinality of the default input port or
379
- // the default output port of the node passed in is maxed out based on
380
- // the array of links passed in.
381
- isNodeDefaultPortsCardinalityAtMax(node, links) {
382
- const defInputPort = CanvasUtils.getDefaultInputPortId(node);
383
- const defOutputPort = CanvasUtils.getDefaultOutputPortId(node);
384
- return CanvasUtils.isSrcCardinalityAtMax(defOutputPort, node, links) ||
385
- CanvasUtils.isTrgCardinalityAtMax(defInputPort, node, links);
386
- }
387
-
388
366
  // Returns the X offset for the port which references the nodeId passed in
389
367
  // based on the precalculated X coordinate of the port.
390
368
  getSupernodePortXOffset(nodeId, ports) {
@@ -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 fieldContent = (
144
- <div className="properties-fp-field">
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
- field.origName, this.props.dmIcon);
154
- const dmIcon = dmIconType ? <Icon type={dmIconType} /> : null;
155
- let disabled = true;
156
- if (field.origName) {
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
- {dmIcon}
152
+ {icon}
175
153
  </div>
176
- {fieldNameWithTooltip}
177
- </div>
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
- rows={-1}
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 (<div>
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
- </div>);
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: 10px;
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: 12px;
34
+ padding-left: $spacing-05;
39
35
  }
40
36
 
41
37
  .properties-fp-field-type-icon, .properties-fp-data-type-icon {
42
- width: 16px;
43
- height: 16px;
44
- margin-right: 5px;
38
+ display: flex;
39
+ align-items: center;
40
+ margin-right: $spacing-03;
45
41
  > svg {
46
- width: 16px;
47
- height: 16px;
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: 10px;
53
+ margin-left: $spacing-05;
58
54
  }
59
55
 
60
56
  .properties-fp-filter-list-li {
61
57
  float: left;
62
- padding: 2px;
58
+ padding: $spacing-01;
63
59
 
64
60
  button {
65
- min-height: 15px;
61
+ min-height: $spacing-05;
66
62
  padding: 0;
67
63
  border: 0;
68
64
  }
69
65
 
70
66
  svg {
71
- height: 16px;
72
- width: 16px;
73
- margin: 2px;
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: 6px;
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: 5px;
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: 32px;
114
- width: 32px;
110
+ height: $spacing-07;
111
+ width: $spacing-07;
115
112
  padding: 0;
116
- margin-right: 8px;
113
+ margin-right: $spacing-03;
117
114
 
118
115
  > svg {
119
- left: 5px;
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.DESC;
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.25; // in em
246
- const headerHeight = 2.5; // in em
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 (rows > 0) {
249
- newHeight = (rowHeight * rows + headerHeight);
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
- // A -1 row count indicates a desire to use the entire available vertical space
254
- const rootElement = document.getElementById("root");
255
- let container = rootElement ? rootElement.getElementsByClassName("properties-wf-children") : [];
256
- if (rootElement && container.length === 0) {
257
- container = rootElement.getElementsByClassName("bx--modal-content");
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 = (rowHeight * 4 + headerHeight);
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
- const heightStyle = (this.props.noAutoSize || tableHeight === 0) ? {} : { height: tableHeight + "em" };
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: 32px;
17
- $row-left-padding: 4px;
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;