@elyra/canvas 13.43.2 → 13.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/.nvmrc +1 -0
  2. package/dist/ChevronRight-3d8ca494.js +2 -0
  3. package/dist/ChevronRight-3d8ca494.js.map +1 -0
  4. package/dist/ChevronRight-42b5629a.js +2 -0
  5. package/dist/ChevronRight-42b5629a.js.map +1 -0
  6. package/dist/Close-1b1822b0.js +2 -0
  7. package/dist/Close-1b1822b0.js.map +1 -0
  8. package/dist/Close-c707c8f7.js +2 -0
  9. package/dist/Close-c707c8f7.js.map +1 -0
  10. package/dist/Time-3da3c23b.js +2 -0
  11. package/dist/Time-3da3c23b.js.map +1 -0
  12. package/dist/Time-4b4e32e7.js +2 -0
  13. package/dist/Time-4b4e32e7.js.map +1 -0
  14. package/dist/canvas-controller-0c473fba.js +2 -0
  15. package/dist/canvas-controller-0c473fba.js.map +1 -0
  16. package/dist/canvas-controller-bbf16890.js +2 -0
  17. package/dist/canvas-controller-bbf16890.js.map +1 -0
  18. package/dist/common-canvas-048c583e.js +2 -0
  19. package/dist/common-canvas-048c583e.js.map +1 -0
  20. package/dist/common-canvas-4b305040.js +2 -0
  21. package/dist/common-canvas-4b305040.js.map +1 -0
  22. package/dist/common-canvas.cjs +2 -0
  23. package/dist/common-canvas.cjs.map +1 -0
  24. package/dist/common-canvas.js +1 -1
  25. package/dist/common-canvas.js.map +1 -1
  26. package/dist/common-properties-3860224b.js +2 -0
  27. package/dist/common-properties-3860224b.js.map +1 -0
  28. package/dist/common-properties-bb42fec5.js +2 -0
  29. package/dist/common-properties-bb42fec5.js.map +1 -0
  30. package/dist/{context-menu-wrapper-39831e91.js → context-menu-wrapper-0fdb9b4c.js} +2 -2
  31. package/dist/{context-menu-wrapper-39831e91.js.map → context-menu-wrapper-0fdb9b4c.js.map} +1 -1
  32. package/dist/{context-menu-wrapper-9f1b71a8.js → context-menu-wrapper-8933071e.js} +2 -2
  33. package/dist/{context-menu-wrapper-9f1b71a8.js.map → context-menu-wrapper-8933071e.js.map} +1 -1
  34. package/dist/flexible-table-8ce77a9c.js +2 -0
  35. package/dist/flexible-table-8ce77a9c.js.map +1 -0
  36. package/dist/flexible-table-e16bd245.js +2 -0
  37. package/dist/flexible-table-e16bd245.js.map +1 -0
  38. package/dist/index-0ad294bf.js +2 -0
  39. package/dist/index-0ad294bf.js.map +1 -0
  40. package/dist/index-37817c66.js +2 -0
  41. package/dist/index-37817c66.js.map +1 -0
  42. package/dist/keyboard-utils-81dcfd3f.js +2 -0
  43. package/dist/keyboard-utils-81dcfd3f.js.map +1 -0
  44. package/dist/keyboard-utils-d9b6ba48.js +2 -0
  45. package/dist/keyboard-utils-d9b6ba48.js.map +1 -0
  46. package/dist/lib/canvas-controller.cjs +2 -0
  47. package/dist/lib/canvas-controller.cjs.map +1 -0
  48. package/dist/lib/canvas-controller.js +1 -1
  49. package/dist/lib/canvas.cjs +2 -0
  50. package/dist/lib/canvas.cjs.map +1 -0
  51. package/dist/lib/canvas.js +1 -1
  52. package/dist/lib/command-stack.cjs +2 -0
  53. package/dist/lib/command-stack.cjs.map +1 -0
  54. package/dist/lib/command-stack.js +1 -1
  55. package/dist/lib/command-stack.js.map +1 -1
  56. package/dist/lib/context-menu.cjs +2 -0
  57. package/dist/lib/context-menu.cjs.map +1 -0
  58. package/dist/lib/context-menu.js +1 -1
  59. package/dist/lib/properties/clem.cjs +2 -0
  60. package/dist/lib/properties/clem.cjs.map +1 -0
  61. package/dist/lib/properties/clem.js +1 -1
  62. package/dist/lib/properties/clem.js.map +1 -1
  63. package/dist/lib/properties/field-picker.cjs +2 -0
  64. package/dist/lib/properties/field-picker.cjs.map +1 -0
  65. package/dist/lib/properties/field-picker.js +1 -1
  66. package/dist/lib/properties/flexible-table.cjs +2 -0
  67. package/dist/lib/properties/flexible-table.cjs.map +1 -0
  68. package/dist/lib/properties/flexible-table.js +1 -1
  69. package/dist/lib/properties/getPythonHints.cjs +2 -0
  70. package/dist/lib/properties/getPythonHints.cjs.map +1 -0
  71. package/dist/lib/properties/getPythonHints.js +1 -1
  72. package/dist/lib/properties/getPythonHints.js.map +1 -1
  73. package/dist/lib/properties.cjs +2 -0
  74. package/dist/lib/properties.cjs.map +1 -0
  75. package/dist/lib/properties.js +1 -1
  76. package/dist/lib/tooltip.cjs +2 -0
  77. package/dist/lib/tooltip.cjs.map +1 -0
  78. package/dist/lib/tooltip.js +1 -1
  79. package/dist/lib/tooltip.js.map +1 -1
  80. package/dist/styles/common-canvas.min.css +1 -1
  81. package/dist/styles/common-canvas.min.css.map +1 -1
  82. package/eslint.config.mjs +4 -2
  83. package/locales/common-canvas/locales/de.json +0 -1
  84. package/locales/common-canvas/locales/en.json +2 -0
  85. package/locales/common-canvas/locales/eo.json +2 -0
  86. package/locales/common-canvas/locales/es.json +0 -1
  87. package/locales/common-canvas/locales/fr.json +0 -1
  88. package/locales/common-canvas/locales/it.json +0 -1
  89. package/locales/common-canvas/locales/ja.json +0 -1
  90. package/locales/common-canvas/locales/ko.json +0 -1
  91. package/locales/common-canvas/locales/pt-BR.json +0 -1
  92. package/locales/common-canvas/locales/sv.json +0 -1
  93. package/locales/common-canvas/locales/zh-CN.json +0 -1
  94. package/locales/common-canvas/locales/zh-TW.json +0 -1
  95. package/locales/common-properties/locales/de.json +1 -0
  96. package/locales/common-properties/locales/es.json +1 -0
  97. package/locales/common-properties/locales/fr.json +1 -0
  98. package/locales/common-properties/locales/it.json +1 -0
  99. package/locales/common-properties/locales/ja.json +1 -0
  100. package/locales/common-properties/locales/ko.json +1 -0
  101. package/locales/common-properties/locales/pt-BR.json +1 -0
  102. package/locales/common-properties/locales/sv.json +1 -0
  103. package/locales/common-properties/locales/zh-CN.json +1 -0
  104. package/locales/common-properties/locales/zh-TW.json +1 -0
  105. package/locales/palette/locales/de.json +4 -1
  106. package/locales/palette/locales/es.json +4 -1
  107. package/locales/palette/locales/fr.json +4 -1
  108. package/locales/palette/locales/it.json +4 -1
  109. package/locales/palette/locales/ja.json +4 -1
  110. package/locales/palette/locales/ko.json +4 -1
  111. package/locales/palette/locales/pt-BR.json +4 -1
  112. package/locales/palette/locales/sv.json +4 -1
  113. package/locales/palette/locales/zh-CN.json +4 -1
  114. package/locales/palette/locales/zh-TW.json +4 -1
  115. package/locales/toolbar/locales/de.json +1 -5
  116. package/locales/toolbar/locales/es.json +1 -5
  117. package/locales/toolbar/locales/fr.json +1 -5
  118. package/locales/toolbar/locales/it.json +1 -5
  119. package/locales/toolbar/locales/ja.json +1 -5
  120. package/locales/toolbar/locales/ko.json +1 -5
  121. package/locales/toolbar/locales/pt-BR.json +1 -5
  122. package/locales/toolbar/locales/sv.json +1 -5
  123. package/locales/toolbar/locales/zh-CN.json +1 -5
  124. package/locales/toolbar/locales/zh-TW.json +1 -5
  125. package/package.json +14 -7
  126. package/rollup.config.js +17 -10
  127. package/src/common-canvas/canvas-controller.js +8 -0
  128. package/src/common-canvas/cc-toolbar.jsx +46 -1
  129. package/src/common-canvas/svg-canvas-renderer.js +41 -20
  130. package/src/common-canvas/svg-canvas-utils-drag-objects.js +0 -6
  131. package/src/common-canvas/svg-canvas-utils-textarea.js +4 -2
  132. package/src/common-properties/components/table-toolbar/table-toolbar.jsx +12 -7
  133. package/src/common-properties/controls/abstract-table.jsx +5 -3
  134. package/src/common-properties/controls/expression/expression.scss +38 -10
  135. package/src/common-properties/controls/textarea/textarea.jsx +8 -2
  136. package/src/common-properties/controls/textfield/textfield.jsx +7 -1
  137. package/src/common-properties/properties-controller.js +12 -0
  138. package/src/common-properties/properties-main/properties-main.jsx +1 -0
  139. package/src/object-model/api-pipeline.js +4 -0
  140. package/src/object-model/pipeline-in-handler.js +3 -0
  141. package/src/object-model/pipeline-out-handler.js +5 -0
  142. package/src/object-model/redux/reducers/canvasinfo.js +1 -0
  143. package/src/object-model/redux/reducers/links.js +10 -0
  144. package/src/toolbar/toolbar-sub-menu.jsx +1 -1
  145. package/src/toolbar/toolbar.jsx +4 -1
  146. package/stats.html +1 -1
  147. package/types/canvas-controller.d.ts +27 -0
  148. package/types/common-properties.d.ts +7 -0
  149. package/types/index.d.cts +21 -0
  150. package/dist/ChevronRight-362f2dfd.js +0 -2
  151. package/dist/ChevronRight-362f2dfd.js.map +0 -1
  152. package/dist/ChevronRight-f4724ce3.js +0 -2
  153. package/dist/ChevronRight-f4724ce3.js.map +0 -1
  154. package/dist/Close-46e688b8.js +0 -2
  155. package/dist/Close-46e688b8.js.map +0 -1
  156. package/dist/Close-ced84b07.js +0 -2
  157. package/dist/Close-ced84b07.js.map +0 -1
  158. package/dist/Time-b0f9a9cb.js +0 -2
  159. package/dist/Time-b0f9a9cb.js.map +0 -1
  160. package/dist/Time-e622883c.js +0 -2
  161. package/dist/Time-e622883c.js.map +0 -1
  162. package/dist/canvas-controller-129092b6.js +0 -2
  163. package/dist/canvas-controller-129092b6.js.map +0 -1
  164. package/dist/canvas-controller-a0473a44.js +0 -2
  165. package/dist/canvas-controller-a0473a44.js.map +0 -1
  166. package/dist/common-canvas-08eacbb2.js +0 -2
  167. package/dist/common-canvas-08eacbb2.js.map +0 -1
  168. package/dist/common-canvas-dcc39cb1.js +0 -2
  169. package/dist/common-canvas-dcc39cb1.js.map +0 -1
  170. package/dist/common-canvas.es.js +0 -2
  171. package/dist/common-canvas.es.js.map +0 -1
  172. package/dist/common-properties-36906b79.js +0 -2
  173. package/dist/common-properties-36906b79.js.map +0 -1
  174. package/dist/common-properties-5695fc39.js +0 -2
  175. package/dist/common-properties-5695fc39.js.map +0 -1
  176. package/dist/flexible-table-d1d15df2.js +0 -2
  177. package/dist/flexible-table-d1d15df2.js.map +0 -1
  178. package/dist/flexible-table-d624ee4e.js +0 -2
  179. package/dist/flexible-table-d624ee4e.js.map +0 -1
  180. package/dist/index-50b29b6d.js +0 -2
  181. package/dist/index-50b29b6d.js.map +0 -1
  182. package/dist/index-5383b802.js +0 -2
  183. package/dist/index-5383b802.js.map +0 -1
  184. package/dist/keyboard-utils-a23c5d52.js +0 -11
  185. package/dist/keyboard-utils-a23c5d52.js.map +0 -1
  186. package/dist/keyboard-utils-b5a20c84.js +0 -11
  187. package/dist/keyboard-utils-b5a20c84.js.map +0 -1
  188. package/dist/lib/canvas-controller.es.js +0 -2
  189. package/dist/lib/canvas-controller.es.js.map +0 -1
  190. package/dist/lib/canvas.es.js +0 -2
  191. package/dist/lib/canvas.es.js.map +0 -1
  192. package/dist/lib/command-stack.es.js +0 -2
  193. package/dist/lib/command-stack.es.js.map +0 -1
  194. package/dist/lib/context-menu.es.js +0 -2
  195. package/dist/lib/context-menu.es.js.map +0 -1
  196. package/dist/lib/properties/clem.es.js +0 -2
  197. package/dist/lib/properties/clem.es.js.map +0 -1
  198. package/dist/lib/properties/field-picker.es.js +0 -2
  199. package/dist/lib/properties/field-picker.es.js.map +0 -1
  200. package/dist/lib/properties/flexible-table.es.js +0 -2
  201. package/dist/lib/properties/flexible-table.es.js.map +0 -1
  202. package/dist/lib/properties/getPythonHints.es.js +0 -2
  203. package/dist/lib/properties/getPythonHints.es.js.map +0 -1
  204. package/dist/lib/properties.es.js +0 -2
  205. package/dist/lib/properties.es.js.map +0 -1
  206. package/dist/lib/tooltip.es.js +0 -2
  207. package/dist/lib/tooltip.es.js.map +0 -1
@@ -5,11 +5,7 @@
5
5
  "toolbar.zoomToFit": "缩放至适当大小",
6
6
  "toolbar.overflowMenu": "溢出菜单",
7
7
  "toolbar.flowEditorToolbarLabel": "流程编辑器",
8
- "toolbar.flowEditorToolbarContainer": "流程编辑器选项",
9
8
  "toolbar.textToolbarLabel": "文本",
10
- "toolbar.textToolbarContainer": "文本选项",
11
9
  "toolbar.contextToolbarLabel": "上下文",
12
- "toolbar.contextToolbarContainer": "上下文选项",
13
- "toolbar.paletteDialogToolbarLabel": "调色板对话框",
14
- "toolbar.paletteDialogToolbarContainer": "调色板对话框选项"
10
+ "toolbar.paletteDialogToolbarLabel": "调色板对话框"
15
11
  }
@@ -5,11 +5,7 @@
5
5
  "toolbar.zoomToFit": "適當縮放",
6
6
  "toolbar.overflowMenu": "溢位功能表",
7
7
  "toolbar.flowEditorToolbarLabel": "流程編輯器",
8
- "toolbar.flowEditorToolbarContainer": "流程編輯器選項",
9
8
  "toolbar.textToolbarLabel": "文字",
10
- "toolbar.textToolbarContainer": "文字選項",
11
9
  "toolbar.contextToolbarLabel": "環境定義",
12
- "toolbar.contextToolbarContainer": "上下文選項",
13
- "toolbar.paletteDialogToolbarLabel": "調色板對話框",
14
- "toolbar.paletteDialogToolbarContainer": "調色板對話方塊選項"
10
+ "toolbar.paletteDialogToolbarLabel": "調色板對話框"
15
11
  }
package/package.json CHANGED
@@ -1,16 +1,22 @@
1
1
  {
2
2
  "name": "@elyra/canvas",
3
- "version": "13.43.2",
3
+ "version": "13.45.0",
4
4
  "description": "Elyra common-canvas",
5
- "main": "dist/common-canvas.js",
6
- "module": "dist/common-canvas.es.js",
5
+ "main": "dist/common-canvas.cjs",
6
+ "module": "dist/common-canvas.js",
7
7
  "exports": {
8
8
  ".": {
9
- "import": "./dist/common-canvas.es.js",
10
- "require": "./dist/common-canvas.js",
11
- "types": "./types/index.d.ts"
9
+ "import": {
10
+ "types": "./types/index.d.ts",
11
+ "default": "./dist/common-canvas.js"
12
+ },
13
+ "require": {
14
+ "types": "./types/index.d.cts",
15
+ "default": "./dist/common-canvas.cjs"
16
+ }
12
17
  },
13
18
  "./src/*": "./src/*",
19
+ "./dist/styles/common-canvas.min.css": "./dist/styles/common-canvas.min.css",
14
20
  "./locales/*/locales": "./locales/*/locales/index.js",
15
21
  "./package.json": "./package.json"
16
22
  },
@@ -24,6 +30,7 @@
24
30
  },
25
31
  "license": "Apache-2.0",
26
32
  "sideEffects": false,
33
+ "type": "module",
27
34
  "types": "./types/index.d.ts",
28
35
  "scripts": {
29
36
  "build": "npx stylelint '**/*.scss' && grunt && rollup -c",
@@ -69,7 +76,7 @@
69
76
  "react-virtualized": "9.22.6",
70
77
  "redux": "^5.0.1",
71
78
  "seedrandom": "^3.0.5",
72
- "uuid": "^8.3.0"
79
+ "uuid": "^14.0.0"
73
80
  },
74
81
  "devDependencies": {
75
82
  "@babel/core": "7.25.2",
package/rollup.config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2023 Elyra Authors
2
+ * Copyright 2017-2026 Elyra Authors
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -40,31 +40,35 @@ export default {
40
40
  "lib/canvas-controller": "./src/common-canvas/canvas-controller.js",
41
41
  "common-canvas": "./src/index.js"
42
42
  },
43
+ external: [
44
+ // autoExternal() handles top-level packages from dependencies/peerDependencies
45
+ // but we need to explicitly externalize React subpath imports
46
+ "react/jsx-runtime",
47
+ "react/jsx-dev-runtime"
48
+ ],
43
49
  output: [
44
50
  {
45
- entryFileNames: "[name].js",
51
+ entryFileNames: "[name].cjs",
46
52
  dir: "./dist",
47
53
  format: "cjs",
48
54
  sourcemap: true,
49
55
  exports: "auto"
50
56
  },
51
57
  {
52
- entryFileNames: "[name].[format].js",
58
+ entryFileNames: "[name].js",
53
59
  dir: "./dist",
54
60
  format: "esm",
55
61
  sourcemap: true
56
62
  }
57
63
  ],
58
64
  plugins: [
59
- autoExternal(),
65
+ autoExternal({
66
+ dependencies: true,
67
+ peerDependencies: true
68
+ }),
60
69
  json(),
61
70
  url(),
62
71
  scss({ output: false }),
63
- resolve(
64
- {
65
- extensions: [".js", ".jsx", ".json"]
66
- }
67
- ),
68
72
  babel({
69
73
  babelHelpers: "runtime",
70
74
  exclude: "**/node_modules/**",
@@ -80,8 +84,11 @@ export default {
80
84
  ["transform-react-remove-prop-types", { removeImport: true }]
81
85
  ]
82
86
  }),
83
- terser(),
87
+ resolve({
88
+ extensions: [".js", ".jsx", ".json"]
89
+ }),
84
90
  commonjs(),
91
+ terser(),
85
92
  visualizer({ open: bundleReport })
86
93
  ]
87
94
  };
@@ -1353,6 +1353,14 @@ export default class CanvasController {
1353
1353
  this.objectModel.getAPIPipeline(pipelineId).setLinkProperties(linkId, properties);
1354
1354
  }
1355
1355
 
1356
+ // Sets the link parameters
1357
+ // linkId - The ID of the link
1358
+ // parameters - An array of parameters
1359
+ // pipelineId - The ID of the pipeline
1360
+ setLinkParameters(linkId, parameters, pipelineId) {
1361
+ this.objectModel.getAPIPipeline(pipelineId).setLinkParameters(linkId, parameters);
1362
+ }
1363
+
1356
1364
  // Sets the source properties in the data link identified by the linkId. The
1357
1365
  // srcNodeId and srcNodePortId will be set to the values provided. If
1358
1366
  // srcNodePortId is set to null the current srcNodePortId will be removed
@@ -165,7 +165,7 @@ class CommonCanvasToolbar extends React.Component {
165
165
 
166
166
  let paletteLabel = this.getLabel("toolbar.palette");
167
167
 
168
- // If the leftBar contains and old palette action and if followed by a
168
+ // If the leftBar contains an old palette action and if followed by a
169
169
  // divider remove them.
170
170
  let newLeftBar = leftBar;
171
171
  if (leftBar && leftBar.length > 0 && leftBar[0].action === "palette") {
@@ -317,6 +317,50 @@ class CommonCanvasToolbar extends React.Component {
317
317
  return toolbarConfig;
318
318
  }
319
319
 
320
+ // Adds appropriate labels to any tools with standard actions if they
321
+ // don't already have a label.
322
+ addDefaultCommandLabels(toolbarConfig) {
323
+ toolbarConfig.leftBar.forEach((tool) => {
324
+ this.addLabelIfNeeded(tool);
325
+ });
326
+ toolbarConfig.rightBar.forEach((tool) => {
327
+ this.addLabelIfNeeded(tool);
328
+ });
329
+ return toolbarConfig;
330
+ }
331
+
332
+ // Add a label to the tool, if it doesn't already have one, where
333
+ // the label is appropriate if the tool's action is a standard action.
334
+ addLabelIfNeeded(tool) {
335
+ if (typeof tool.label === "undefined") {
336
+ const lk = this.genLabelKey(tool.action);
337
+ if (lk) {
338
+ tool.label = this.getLabel(lk);
339
+ }
340
+ }
341
+ }
342
+
343
+ // Returns an appropriate label-key for any of the standard actions
344
+ // or null if this is not a standard action.
345
+ genLabelKey(action) {
346
+ switch (action) {
347
+ case "undo": return "canvas.undo";
348
+ case "redo": return "canvas.redo";
349
+ case "cut": return "edit.cutSelection";
350
+ case "copy": return "edit.copySelection";
351
+ case "paste": return "edit.pasteSelection";
352
+ case "createAutoComment": return "canvas.addComment";
353
+ case "deleteSelectedObjects": return "canvas.deleteObject";
354
+ case "arrangeHorizontally": return "canvas.arrangeHorizontally";
355
+ case "arrangeVertically": return "canvas.arrangeVertically";
356
+ case "zoomIn": return "toolbar.zoomIn";
357
+ case "zoomOut": return "toolbar.zoomOut";
358
+ case "zoomToFit": return "toolbar.zoomToFit";
359
+
360
+ default: return null;
361
+ }
362
+ }
363
+
320
364
  addUndoRedoCommandLabels(toolbarConfig) {
321
365
  const undoLabel = this.props.undoLabel;
322
366
  const redoLabel = this.props.redoLabel;
@@ -361,6 +405,7 @@ class CommonCanvasToolbar extends React.Component {
361
405
 
362
406
  let toolbarConfig = this.generateToolbarConfig();
363
407
  toolbarConfig = this.configureToolbarButtonsState(toolbarConfig);
408
+ toolbarConfig = this.addDefaultCommandLabels(toolbarConfig);
364
409
  toolbarConfig = this.addUndoRedoCommandLabels(toolbarConfig);
365
410
  let canvasToolbar = null;
366
411
 
@@ -1913,7 +1913,7 @@ export default class SVGCanvasRenderer {
1913
1913
  // Node Body
1914
1914
  nonBindingNodeGrps
1915
1915
  .selectChildren(".d3-node-body-outline")
1916
- .data((d) => (d.layout.nodeShapeDisplay ? [d] : []), (d) => d.id)
1916
+ .data((d) => (d.layout.nodeShapeDisplay || CanvasUtils.isExpandedSupernode(d) ? [d] : []), (d) => d.id)
1917
1917
  .join(
1918
1918
  (enter) =>
1919
1919
  enter
@@ -4724,20 +4724,26 @@ export default class SVGCanvasRenderer {
4724
4724
  }
4725
4725
 
4726
4726
  displayLinksSubset(selection, linksArray) {
4727
- selection
4728
- .data(linksArray, (link) => link.id)
4729
- .join(
4730
- (enter) => this.createLinks(enter)
4731
- )
4732
- .attr("class", (d) => this.getLinkGroupClass(d))
4733
- .attr("tabindex", -1)
4734
- .attr("style", (d) => this.getLinkGrpStyle(d))
4735
- .attr("data-selected", (d) => (this.activePipeline.isSelected(d.id) ? true : null))
4736
- .attr("aria-label", (d) => CanvasUtils.getLinkAriaLabel(d, this.canvasController.labelUtil))
4737
- .attr("aria-roledescription", this.canvasController.labelUtil.getLabel("link.ariaRoleDescription"))
4738
- .call((joinedLinkGrps) => {
4739
- this.updateLinks(joinedLinkGrps, linksArray);
4740
- });
4727
+ // The D3 join operation can sometimes cause focus to be lost from any
4728
+ // currently focused object involved in the join (even if no new objects
4729
+ // have been created or if no objects are removed) so we preserve and
4730
+ // reinstate the focus after this operation is complete.
4731
+ this.preserveFocus(() => {
4732
+ selection
4733
+ .data(linksArray, (link) => link.id)
4734
+ .join(
4735
+ (enter) => this.createLinks(enter)
4736
+ )
4737
+ .attr("class", (d) => this.getLinkGroupClass(d))
4738
+ .attr("tabindex", -1)
4739
+ .attr("style", (d) => this.getLinkGrpStyle(d))
4740
+ .attr("data-selected", (d) => (this.activePipeline.isSelected(d.id) ? true : null))
4741
+ .attr("aria-label", (d) => CanvasUtils.getLinkAriaLabel(d, this.canvasController.labelUtil))
4742
+ .attr("aria-roledescription", this.canvasController.labelUtil.getLabel("link.ariaRoleDescription"))
4743
+ .call((joinedLinkGrps) => {
4744
+ this.updateLinks(joinedLinkGrps, linksArray);
4745
+ });
4746
+ });
4741
4747
  }
4742
4748
 
4743
4749
  // Creates all newly created links specified in the enter selection.
@@ -6578,11 +6584,8 @@ export default class SVGCanvasRenderer {
6578
6584
  // appears in the viewport. If the event was a MouseEvent we don't zoom to reveal
6579
6585
  // because it interferes with double-click events (also it's not necessary because
6580
6586
  // the object will be at least partially visible in the view port for it to be clicked).
6581
- // Also, we don't zoom to reveal if the object is a link in a full-page subflow
6582
- // because a) they are almost always on display and b) if the link is to, or from, a
6583
- // binding node zoomToReveal will cause the nodes to be incorrectly moved.
6584
- if (CanvasUtils.isKeyboardEvent(evt) &&
6585
- !(type === "link" && this.dispUtils.isDisplayingSubFlowFullPage())) {
6587
+ // Also, some objects should not cause a zoom, so check for them.
6588
+ if (CanvasUtils.isKeyboardEvent(evt) && this.shouldObjectCauseZoom(obj, type)) {
6586
6589
  const zoom = this.canvasController.getZoomToReveal([obj.id]);
6587
6590
 
6588
6591
  if (zoom) {
@@ -6602,6 +6605,24 @@ export default class SVGCanvasRenderer {
6602
6605
  }
6603
6606
  }
6604
6607
 
6608
+ // Returns true if the object should cause a 'zoom to reveal' to occur when focus
6609
+ // is moved to it. That is, if we are displaying a sub-flow full-page when:
6610
+ // 1. The object is a link - because
6611
+ // a) they are almost always on display and
6612
+ // b) if the link is to, or from, a binding node zoomToReveal will cause the
6613
+ // nodes to be incorrectly moved.
6614
+ // 2. The object is a binding node -- because they are always in a fixed position.
6615
+ shouldObjectCauseZoom(obj, type) {
6616
+ if (this.dispUtils.isDisplayingSubFlowFullPage()) {
6617
+ if (type === "link") {
6618
+ return false;
6619
+ } else if (type === "node" && CanvasUtils.isSuperBindingNode(obj)) {
6620
+ return false;
6621
+ }
6622
+ }
6623
+ return true;
6624
+ }
6625
+
6605
6626
  // Moves the focus highlighting to the next appropriate sub-object within
6606
6627
  // the parent object.
6607
6628
  setFocusNextSubObject(parentObj, evt) {
@@ -409,12 +409,6 @@ export default class SVGCanvasUtilsDragObjects {
409
409
  this.ren.displayMovedLinks();
410
410
  this.ren.displayCanvasAccoutrements();
411
411
 
412
- if (CanvasUtils.isExpandedSupernode(resizeObj)) {
413
- if (this.ren.dispUtils.isDisplayingSubFlow()) {
414
- this.ren.displayBindingNodesToFitSVG();
415
- }
416
- this.ren.superRenderers.forEach((renderer) => renderer.displaySVGToFitSupernode());
417
- }
418
412
  this.logger.logEndTimer("displayObjects");
419
413
  }
420
414
  }
@@ -88,7 +88,7 @@ export default class SvgCanvasTextArea {
88
88
  displayCommentTextArea(d, parentDomObj) {
89
89
  this.editingTextData = {
90
90
  id: d.id,
91
- comment: d,
91
+ focusReturn: d,
92
92
  text: d.content,
93
93
  singleLine: false,
94
94
  maxCharacters: null,
@@ -465,6 +465,7 @@ export default class SvgCanvasTextArea {
465
465
 
466
466
  this.editingTextData = {
467
467
  id: node.id,
468
+ focusReturn: node,
468
469
  text: node.label,
469
470
  singleLine: node.layout.labelSingleLine,
470
471
  maxCharacters: node.layout.labelMaxCharacters,
@@ -538,6 +539,7 @@ export default class SvgCanvasTextArea {
538
539
 
539
540
  this.editingTextData = {
540
541
  id: dec.id,
542
+ focusReturn: obj,
541
543
  text: dec.label,
542
544
  singleLine: dec.label_single_line || false,
543
545
  maxCharacters: dec.label_max_characters || null,
@@ -707,10 +709,10 @@ export default class SvgCanvasTextArea {
707
709
  // Tidy up
708
710
  this.foreignObjectComment.remove();
709
711
  this.foreignObjectComment = null;
710
- this.canvasController.setFocusObject(data.comment, null, true);
711
712
  }
712
713
  this.editingText = false;
713
714
  this.editingTextId = "";
715
+ this.canvasController.setFocusObject(data.focusReturn, null, true);
714
716
  }
715
717
 
716
718
  // Returns true if one of the keys that are allowed in the text area, when
@@ -84,18 +84,23 @@ class TableToolbar extends React.Component {
84
84
  const cancelLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_BUTTON_CANCEL);
85
85
 
86
86
  const editBtn = { action: "multiSelectEdit", label: editLabel, iconEnabled: (<Edit />), enable: true, kind: "primary" };
87
- const deleteBtn = (this.props.addRemoveRows && !this.props.isReadonlyTable && !this.props.isSingleSelectTable)
88
- ? { action: "delete", label: deleteLabel, iconEnabled: (<TrashCan />), enable: true, kind: "primary" } : null;
87
+ const deleteBtn = { action: "delete", label: deleteLabel, iconEnabled: (<TrashCan />), enable: true, kind: "primary" };
89
88
  const cancelBtn = { action: "cancel", label: cancelLabel, enable: true, incLabelWithIcon: "label-only", kind: "primary" };
90
89
 
91
90
  // For delete, edit, show its divider only if those icons are present
92
91
  const toolbarConfig = [
93
- ...(this.props.moveableRows ? this.getTableRowMoveButtons() : []),
94
- deleteBtn,
95
- this.props.multiSelectEdit ? editBtn : null,
96
- { divider: true },
97
- cancelBtn
92
+ ...(this.props.moveableRows ? this.getTableRowMoveButtons() : [])
98
93
  ];
94
+ if (this.props.addRemoveRows &&
95
+ !this.props.isReadonlyTable &&
96
+ !this.props.isSingleSelectTable) {
97
+ toolbarConfig.push(deleteBtn);
98
+ }
99
+ if (this.props.multiSelectEdit) {
100
+ toolbarConfig.push(editBtn);
101
+ }
102
+ toolbarConfig.push({ divider: true });
103
+ toolbarConfig.push(cancelBtn);
99
104
  return toolbarConfig;
100
105
  }
101
106
 
@@ -437,7 +437,7 @@ export default class AbstractTable extends React.Component {
437
437
  return this.props.controller.getLight() && this.props.control.light;
438
438
  }
439
439
 
440
- makeTableToolbar(selectedRows, tableLabel) {
440
+ makeTableToolbar(selectedRows, tableLabel, tableDivId) {
441
441
  // For single select tables, table toolbar doesn't show delete icon because it is added at row level
442
442
  const singleSelectTable = this.props.control.rowSelection === ROW_SELECTION.SINGLE;
443
443
  if (
@@ -471,6 +471,7 @@ export default class AbstractTable extends React.Component {
471
471
  isSingleSelectTable={singleSelectTable}
472
472
  smallFlyout={false}
473
473
  tableLabel={tableLabel}
474
+ containingDivId={tableDivId}
474
475
  />
475
476
  </>
476
477
  );
@@ -625,12 +626,13 @@ export default class AbstractTable extends React.Component {
625
626
 
626
627
  const headers = this.makeHeader(sortFields, filterFields);
627
628
  const showHeader = this.props.control.header !== false;
629
+ const tableDivId = "flexible-table-" + uuid4();
628
630
 
629
631
  const controlValue = this.props.value;
630
632
  this.makeCells(rows, controlValue, tableState);
631
633
 
632
634
  const tableLabel = this.props.control?.label?.text || "";
633
- const tableToolbar = this.makeTableToolbar(this.props.selectedRows, tableLabel);
635
+ const tableToolbar = this.makeTableToolbar(this.props.selectedRows, tableLabel, tableDivId);
634
636
  let topRightPanel = null;
635
637
  if (this.props.selectedRows.length > 0 && tableToolbar) {
636
638
  topRightPanel = tableToolbar;
@@ -681,7 +683,7 @@ export default class AbstractTable extends React.Component {
681
683
  emptyTablePlaceholder={this.props.control.additionalText}
682
684
  />);
683
685
  return (
684
- <div>
686
+ <div id={tableDivId}>
685
687
  {table}
686
688
  </div>
687
689
  );
@@ -69,7 +69,7 @@
69
69
 
70
70
  &.cm-focused {
71
71
  outline: 2px solid carbon.$focus;
72
- outline-offset: -2px;
72
+ outline-offset: 0px;
73
73
  }
74
74
 
75
75
  .cm-gutters {
@@ -77,6 +77,10 @@
77
77
  background-color: inherit;
78
78
  }
79
79
 
80
+ .cm-cursor {
81
+ border-left: 1px solid carbon.$text-primary;
82
+ }
83
+
80
84
  .cm-content {
81
85
  .cm-line {
82
86
  padding-left: carbon.$spacing-03;
@@ -85,25 +89,49 @@
85
89
  .cm-placeholder {
86
90
  @include carbon.type-style("code-02");
87
91
  }
88
- .cm-cursor {
89
- border-left: 1px solid carbon.$text-primary;
90
- }
91
92
  .cm-lineNumbers .cm-gutterElement {
92
93
  @include carbon.type-style("body-short-01");
93
94
  }
94
95
  }
95
96
 
97
+ // Don't display active line as it's too visually confusing
96
98
  .cm-activeLine {
97
- background-color: carbon.$background-selected; // works for both dark n light
99
+ background-color: transparent;
100
+ }
101
+
102
+ .cm-lineNumbers .cm-gutterElement:not(.cm-activeLineGutter) {
103
+ color: carbon.$text-primary;
98
104
  }
99
- .cm-activeLineGutter {
100
- background-color: carbon.$text-placeholder;
105
+
106
+ .cm-lineNumbers .cm-activeLineGutter {
107
+ background-clip: padding-box;
108
+ background-color: carbon.$layer-accent-hover-02;
101
109
  color: carbon.$text-primary;
102
110
  }
103
- &.cm-focused .cm-selectionBackground, ::selection {
104
- /* stylelint-disable-next-line declaration-no-important */
105
- background: carbon.$support-info-inverse !important; // add !important to override the selected text style
111
+
112
+ .cm-gutter.cm-foldGutter > div.cm-gutterElement.cm-activeLineGutter {
113
+ background-color: carbon.$layer-accent-hover-02;
114
+ color: carbon.$text-primary;
106
115
  }
116
+
117
+ &.cm-focused {
118
+ .cm-selectionBackground,
119
+ .cm-selectionMatch {
120
+ /* stylelint-disable-next-line declaration-no-important */
121
+ background-color: carbon.$highlight !important; // !important overrides the selection background style
122
+ }
123
+ }
124
+
125
+ &:not(.cm-focused) {
126
+ .cm-selectionBackground {
127
+ background: carbon.$layer-selected-02;
128
+ }
129
+
130
+ .cm-selectionMatch {
131
+ background-color: transparent;
132
+ }
133
+ }
134
+
107
135
  .cm-tooltip-autocomplete {
108
136
  z-index: 1110;
109
137
  background: carbon.$field-02; // Background color of the autocompletion menu to support dark mode
@@ -56,6 +56,12 @@ class TextareaControl extends React.Component {
56
56
  value = joined.value;
57
57
  const truncated = joined.truncated;
58
58
 
59
+ // Determine if counter should be shown
60
+ // Show counter only if NOT in a table AND (showCharacterCounter is true OR limit is reached)
61
+ const showCharacterCounter = this.props.controller.getShowCharacterCounter();
62
+ const isAtLimit = this.charLimit !== -1 && value.length >= this.charLimit;
63
+ const shouldShowCounter = !this.props.tableControl && this.charLimit !== -1 && (showCharacterCounter || isAtLimit);
64
+
59
65
  let textArea = null;
60
66
  let validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);
61
67
  let showValidationMessage = false;
@@ -83,7 +89,7 @@ class TextareaControl extends React.Component {
83
89
  helperText={this.props.control.helperText}
84
90
  readOnly={this.props.readOnly}
85
91
  aria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}
86
- enableCounter={this.charLimit !== -1}
92
+ enableCounter={shouldShowCounter}
87
93
  maxCount={this.charLimit}
88
94
  />
89
95
  <ValidationMessage inTable={this.props.tableControl} tableOnly={!showValidationMessage} state={""} messageInfo={errorMessage} />
@@ -102,7 +108,7 @@ class TextareaControl extends React.Component {
102
108
  helperText={this.props.control.helperText}
103
109
  readOnly={this.props.readOnly}
104
110
  aria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}
105
- enableCounter={this.charLimit !== -1}
111
+ enableCounter={shouldShowCounter}
106
112
  maxCount={this.charLimit}
107
113
  />
108
114
  );
@@ -97,6 +97,12 @@ class TextfieldControl extends React.Component {
97
97
  </div>);
98
98
  } else {
99
99
  const validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);
100
+ // Determine if counter should be shown
101
+ // Show counter only if NOT in a table AND (showCharacterCounter is true OR limit is reached)
102
+ const showCharacterCounter = this.props.controller.getShowCharacterCounter();
103
+ const isAtLimit = this.charLimit !== -1 && value.length >= this.charLimit;
104
+ const shouldShowCounter = !this.props.tableControl && this.charLimit !== -1 && (showCharacterCounter || isAtLimit);
105
+
100
106
  textInput = (
101
107
  <TextInput
102
108
  {...validationProps}
@@ -113,7 +119,7 @@ class TextfieldControl extends React.Component {
113
119
  aria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}
114
120
  ref={this.textInputRef}
115
121
  readOnly={this.props.readOnly}
116
- enableCounter={this.charLimit !== -1}
122
+ enableCounter={shouldShowCounter}
117
123
  maxCount={this.charLimit}
118
124
  />
119
125
  );
@@ -1931,6 +1931,18 @@ export default class PropertiesController {
1931
1931
  return maxLengthForSingleLineControls;
1932
1932
  }
1933
1933
 
1934
+ /**
1935
+ * Returns whether to show the character counter for textfield and textarea controls
1936
+ * Default value is true
1937
+ * When false, counter is hidden until character limit is reached
1938
+ */
1939
+ getShowCharacterCounter() {
1940
+ const showCharacterCounter = (typeof this.getPropertiesConfig().showCharacterCounter !== "undefined")
1941
+ ? this.getPropertiesConfig().showCharacterCounter
1942
+ : true;
1943
+ return showCharacterCounter;
1944
+ }
1945
+
1934
1946
  /**
1935
1947
  * Set the initial values of addRemoveRows for all structure controls
1936
1948
  */
@@ -696,6 +696,7 @@ PropertiesMain.propTypes = {
696
696
  conditionDisabledPropertyHandling: PropTypes.oneOf(["null", "undefined", "value"]),
697
697
  maxLengthForMultiLineControls: PropTypes.number,
698
698
  maxLengthForSingleLineControls: PropTypes.number,
699
+ showCharacterCounter: PropTypes.bool,
699
700
  convertValueDataTypes: PropTypes.bool,
700
701
  showRequiredIndicator: PropTypes.bool,
701
702
  showAlertsTab: PropTypes.bool,
@@ -1382,6 +1382,10 @@ export default class APIPipeline {
1382
1382
  this.store.dispatch({ type: "SET_LINK_PROPERTIES", data: { linkId: linkId, linkProperties: linkProperties }, pipelineId: this.pipelineId });
1383
1383
  }
1384
1384
 
1385
+ setLinkParameters(linkId, parameters) {
1386
+ this.store.dispatch({ type: "SET_LINK_PARAMETERS", data: { linkId: linkId, parameters: parameters }, pipelineId: this.pipelineId });
1387
+ }
1388
+
1385
1389
  setNodeDataLinkSrcInfo(linkId, srcNodeId, srcNodePortId) {
1386
1390
  this.store.dispatch({ type: "SET_LINK_SRC_INFO", data: { linkId: linkId, srcNodeId: srcNodeId, srcNodePortId: srcNodePortId }, pipelineId: this.pipelineId });
1387
1391
  }
@@ -397,6 +397,9 @@ export default class PipelineInHandler {
397
397
  if (link.description) { // description is also optional
398
398
  newLink.description = link.description;
399
399
  }
400
+ if (link.parameters) { // parameters is also optional
401
+ newLink.parameters = link.parameters;
402
+ }
400
403
 
401
404
  return newLink;
402
405
  }
@@ -483,6 +483,11 @@ export default class PipelineOutHandler {
483
483
  if (link.description) {
484
484
  newLink.description = link.description;
485
485
  }
486
+
487
+ if (link.parameters) {
488
+ newLink.parameters = link.parameters;
489
+ }
490
+
486
491
  return newLink;
487
492
  }
488
493
  }
@@ -167,6 +167,7 @@ export default (state = {}, action) => {
167
167
  case "SET_NODE_MESSAGES":
168
168
  case "SET_NODE_DECORATIONS":
169
169
  case "SET_LINK_DECORATIONS":
170
+ case "SET_LINK_PARAMETERS":
170
171
  case "ADD_NODE_ATTR":
171
172
  case "REMOVE_NODE_ATTR":
172
173
  case "SET_NODE_LABEL":
@@ -135,6 +135,16 @@ export default (state = [], action) => {
135
135
  return link;
136
136
  });
137
137
 
138
+ case "SET_LINK_PARAMETERS":
139
+ return state.map((link, index) => {
140
+ if (action.data.linkId === link.id) {
141
+ const newLink = Object.assign({}, link);
142
+ newLink.parameters = action.data.parameters;
143
+ return newLink;
144
+ }
145
+ return link;
146
+ });
147
+
138
148
  case "SET_LINK_SRC_INFO":
139
149
  return state.map((link) => {
140
150
  if (link.id === action.data.linkId) {