@elyra/canvas 12.27.1 → 12.28.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 (181) hide show
  1. package/dist/{canvas-constants-07dbe4b7.js → canvas-constants-046e4126.js} +2 -2
  2. package/dist/{canvas-constants-07dbe4b7.js.map → canvas-constants-046e4126.js.map} +1 -1
  3. package/dist/canvas-constants-f4e65d4d.js +2 -0
  4. package/dist/canvas-constants-f4e65d4d.js.map +1 -0
  5. package/dist/{canvas-controller-01c28c3a.js → canvas-controller-1bbd9c0e.js} +2 -2
  6. package/dist/canvas-controller-1bbd9c0e.js.map +1 -0
  7. package/dist/canvas-controller-d6aa7d4d.js +2 -0
  8. package/dist/canvas-controller-d6aa7d4d.js.map +1 -0
  9. package/dist/common-canvas-9c735f47.js +2 -0
  10. package/dist/common-canvas-9c735f47.js.map +1 -0
  11. package/dist/common-canvas-a02e75c1.js +2 -0
  12. package/dist/common-canvas-a02e75c1.js.map +1 -0
  13. package/dist/common-canvas.es.js +1 -1
  14. package/dist/common-canvas.js +1 -1
  15. package/dist/common-properties-3b9f3106.js +2 -0
  16. package/dist/common-properties-3b9f3106.js.map +1 -0
  17. package/dist/common-properties-86b9b936.js +2 -0
  18. package/dist/common-properties-86b9b936.js.map +1 -0
  19. package/dist/datarecord-metadata-v3-schema-6a3754ce.js +1 -1
  20. package/dist/datarecord-metadata-v3-schema-6a3754ce.js.map +1 -1
  21. package/dist/datarecord-metadata-v3-schema-ba1f2849.js +1 -1
  22. package/dist/datarecord-metadata-v3-schema-ba1f2849.js.map +1 -1
  23. package/dist/en-7201b548.js +1 -1
  24. package/dist/en-7201b548.js.map +1 -1
  25. package/dist/en-a08356c8.js +1 -1
  26. package/dist/en-a08356c8.js.map +1 -1
  27. package/dist/{extends-de3127ea.js → extends-7d4f15b6.js} +2 -2
  28. package/dist/extends-7d4f15b6.js.map +1 -0
  29. package/dist/extends-d144eab9.js +7 -0
  30. package/dist/extends-d144eab9.js.map +1 -0
  31. package/dist/flexible-table-8219d7a0.js +2 -0
  32. package/dist/flexible-table-8219d7a0.js.map +1 -0
  33. package/dist/flexible-table-f5d55fe4.js +2 -0
  34. package/dist/flexible-table-f5d55fe4.js.map +1 -0
  35. package/dist/{icon-63afae46.js → icon-221bb2e5.js} +2 -2
  36. package/dist/{icon-63afae46.js.map → icon-221bb2e5.js.map} +1 -1
  37. package/dist/icon-ea917a08.js +2 -0
  38. package/dist/{icon-94bf4b86.js.map → icon-ea917a08.js.map} +1 -1
  39. package/dist/index-17b33a9b.js +2 -0
  40. package/dist/index-17b33a9b.js.map +1 -0
  41. package/dist/index-ac265f1e.js +2 -0
  42. package/dist/index-ac265f1e.js.map +1 -0
  43. package/dist/isArrayLikeObject-a9c7973b.js +1 -1
  44. package/dist/isArrayLikeObject-a9c7973b.js.map +1 -1
  45. package/dist/isArrayLikeObject-f3b27f64.js +1 -1
  46. package/dist/isArrayLikeObject-f3b27f64.js.map +1 -1
  47. package/dist/lib/canvas-controller.es.js +1 -1
  48. package/dist/lib/canvas-controller.js +1 -1
  49. package/dist/lib/canvas.es.js +1 -1
  50. package/dist/lib/canvas.js +1 -1
  51. package/dist/lib/context-menu.es.js +1 -1
  52. package/dist/lib/context-menu.js +1 -1
  53. package/dist/lib/properties/field-picker.es.js +1 -1
  54. package/dist/lib/properties/field-picker.js +1 -1
  55. package/dist/lib/properties/flexible-table.es.js +1 -1
  56. package/dist/lib/properties/flexible-table.js +1 -1
  57. package/dist/lib/properties.es.js +1 -1
  58. package/dist/lib/properties.js +1 -1
  59. package/dist/lib/tooltip.es.js +1 -1
  60. package/dist/lib/tooltip.es.js.map +1 -1
  61. package/dist/lib/tooltip.js +1 -1
  62. package/dist/lib/tooltip.js.map +1 -1
  63. package/dist/styles/common-canvas.min.css +1 -1
  64. package/dist/styles/common-canvas.min.css.map +1 -1
  65. package/dist/toolbar-2bbc9542.js +2 -0
  66. package/dist/toolbar-2bbc9542.js.map +1 -0
  67. package/dist/toolbar-c173e22a.js +2 -0
  68. package/dist/toolbar-c173e22a.js.map +1 -0
  69. package/locales/common-properties/locales/de.json +2 -1
  70. package/locales/common-properties/locales/en.json +2 -0
  71. package/locales/common-properties/locales/eo.json +2 -0
  72. package/locales/common-properties/locales/es.json +3 -2
  73. package/locales/common-properties/locales/fr.json +2 -1
  74. package/locales/common-properties/locales/it.json +2 -1
  75. package/locales/common-properties/locales/ja.json +2 -1
  76. package/locales/common-properties/locales/ko.json +2 -1
  77. package/locales/common-properties/locales/pt-br.json +2 -1
  78. package/locales/common-properties/locales/sv.json +2 -1
  79. package/locales/common-properties/locales/zh-CN.json +5 -4
  80. package/locales/common-properties/locales/zh-TW.json +2 -1
  81. package/locales/notification-panel/locales/de.json +3 -0
  82. package/locales/notification-panel/locales/es.json +3 -0
  83. package/locales/notification-panel/locales/fr.json +3 -0
  84. package/locales/notification-panel/locales/it.json +3 -0
  85. package/locales/notification-panel/locales/ja.json +3 -0
  86. package/locales/notification-panel/locales/ko.json +3 -0
  87. package/locales/notification-panel/locales/pt-BR.json +3 -0
  88. package/locales/notification-panel/locales/sv.json +3 -0
  89. package/locales/notification-panel/locales/zh-CN.json +3 -0
  90. package/locales/notification-panel/locales/zh-TW.json +3 -0
  91. package/package.json +1 -1
  92. package/src/common-canvas/canvas-controller.js +31 -0
  93. package/src/common-canvas/cc-toolbar.jsx +5 -5
  94. package/src/common-canvas/constants/canvas-constants.js +2 -0
  95. package/src/common-canvas/svg-canvas-renderer.js +29 -14
  96. package/src/common-properties/actions/button/button.jsx +1 -3
  97. package/src/common-properties/actions/image/image.jsx +1 -3
  98. package/src/common-properties/common-properties.jsx +8 -5
  99. package/src/common-properties/components/control-item/control-item.jsx +1 -3
  100. package/src/common-properties/components/control-item/control-item.scss +2 -0
  101. package/src/common-properties/components/field-picker/field-picker.jsx +1 -3
  102. package/src/common-properties/components/truncated-content-tooltip/truncated-content-tooltip.jsx +11 -3
  103. package/src/common-properties/components/truncated-content-tooltip/truncated-content-tooltip.scss +1 -1
  104. package/src/common-properties/components/validation-message/validation-message.jsx +1 -2
  105. package/src/common-properties/components/virtualized-table/virtualized-table.jsx +18 -31
  106. package/src/common-properties/constants/constants.js +12 -1
  107. package/src/common-properties/constants/form-constants.js +2 -0
  108. package/src/common-properties/controls/abstract-table.jsx +7 -4
  109. package/src/common-properties/controls/checkbox/checkbox.jsx +1 -2
  110. package/src/common-properties/controls/checkboxset/checkboxset.jsx +1 -1
  111. package/src/common-properties/controls/control-factory.js +10 -0
  112. package/src/common-properties/controls/controls.scss +3 -1
  113. package/src/common-properties/controls/datepicker/datepicker.jsx +118 -0
  114. package/src/common-properties/controls/datepicker/datepicker.scss +23 -0
  115. package/src/common-properties/controls/datepicker/index.js +18 -0
  116. package/src/common-properties/controls/datepicker-range/datepicker-range.jsx +194 -0
  117. package/src/common-properties/controls/datepicker-range/datepicker-range.scss +21 -0
  118. package/src/common-properties/controls/datepicker-range/index.js +18 -0
  119. package/src/common-properties/controls/dropdown/dropdown.jsx +2 -1
  120. package/src/common-properties/controls/expression/expression-builder/expression-select-field-function.jsx +3 -2
  121. package/src/common-properties/controls/expression/expression-builder/expression-select-operator.jsx +1 -3
  122. package/src/common-properties/controls/radioset/radioset.jsx +1 -1
  123. package/src/common-properties/controls/readonly/readonly.jsx +7 -0
  124. package/src/common-properties/controls/textarea/textarea.jsx +3 -2
  125. package/src/common-properties/controls/textfield/textfield.jsx +15 -17
  126. package/src/common-properties/controls/textfield/textfield.scss +1 -0
  127. package/src/common-properties/form/EditorForm.js +5 -1
  128. package/src/common-properties/form/Form.js +2 -8
  129. package/src/common-properties/panels/sub-panel/cell.jsx +1 -2
  130. package/src/common-properties/panels/summary/summary.jsx +12 -12
  131. package/src/common-properties/panels/summary/summary.scss +4 -10
  132. package/src/common-properties/properties-controller.js +15 -6
  133. package/src/common-properties/properties-main/properties-main.jsx +11 -3
  134. package/src/common-properties/ui-conditions/condition-ops/contains.js +1 -1
  135. package/src/common-properties/ui-conditions/condition-ops/greaterThan.js +22 -1
  136. package/src/common-properties/ui-conditions/condition-ops/isDateTime.js +9 -6
  137. package/src/common-properties/ui-conditions/condition-ops/isEmpty.js +7 -1
  138. package/src/common-properties/ui-conditions/condition-ops/isNotEmpty.js +5 -1
  139. package/src/common-properties/ui-conditions/condition-ops/lessThan.js +22 -1
  140. package/src/common-properties/ui-conditions/condition-ops/notContains.js +1 -1
  141. package/src/common-properties/ui-conditions/conditions-utils.js +5 -5
  142. package/src/common-properties/util/control-utils.js +18 -3
  143. package/src/common-properties/util/date-utils.js +152 -0
  144. package/src/common-properties/util/property-utils.js +29 -12
  145. package/src/object-model/api-pipeline.js +1 -0
  146. package/src/object-model/object-model.js +12 -0
  147. package/src/object-model/redux/reducers/canvasinfo.js +8 -0
  148. package/src/themes/light.scss +16 -0
  149. package/src/toolbar/toolbar-action-item.jsx +9 -7
  150. package/src/tooltip/tooltip.jsx +28 -15
  151. package/src/tooltip/tooltip.scss +7 -7
  152. package/stats.html +1 -1
  153. package/dist/canvas-constants-ba465147.js +0 -2
  154. package/dist/canvas-constants-ba465147.js.map +0 -1
  155. package/dist/canvas-controller-01c28c3a.js.map +0 -1
  156. package/dist/canvas-controller-fc5bee30.js +0 -2
  157. package/dist/canvas-controller-fc5bee30.js.map +0 -1
  158. package/dist/common-canvas-4f99983f.js +0 -2
  159. package/dist/common-canvas-4f99983f.js.map +0 -1
  160. package/dist/common-canvas-e1879d85.js +0 -2
  161. package/dist/common-canvas-e1879d85.js.map +0 -1
  162. package/dist/common-properties-9a5037f4.js +0 -2
  163. package/dist/common-properties-9a5037f4.js.map +0 -1
  164. package/dist/common-properties-cae41b08.js +0 -2
  165. package/dist/common-properties-cae41b08.js.map +0 -1
  166. package/dist/extends-86f8d713.js +0 -7
  167. package/dist/extends-86f8d713.js.map +0 -1
  168. package/dist/extends-de3127ea.js.map +0 -1
  169. package/dist/flexible-table-d68c24c6.js +0 -2
  170. package/dist/flexible-table-d68c24c6.js.map +0 -1
  171. package/dist/flexible-table-f14863ac.js +0 -2
  172. package/dist/flexible-table-f14863ac.js.map +0 -1
  173. package/dist/icon-94bf4b86.js +0 -2
  174. package/dist/index-5c0ad9bb.js +0 -2
  175. package/dist/index-5c0ad9bb.js.map +0 -1
  176. package/dist/index-fc1b32b4.js +0 -2
  177. package/dist/index-fc1b32b4.js.map +0 -1
  178. package/dist/toolbar-393d299e.js +0 -2
  179. package/dist/toolbar-393d299e.js.map +0 -1
  180. package/dist/toolbar-91001066.js +0 -2
  181. package/dist/toolbar-91001066.js.map +0 -1
@@ -13,10 +13,10 @@
13
13
  "fieldPicker.dataTypeColumn.label": "数据类型",
14
14
  "fieldPicker.integer.label": "integer",
15
15
  "fieldPicker.double.label": "双精度",
16
- "fieldPicker.string.label": "string",
16
+ "fieldPicker.string.label": "字符串",
17
17
  "fieldPicker.date.label": "日期",
18
- "fieldPicker.time.label": "time",
19
- "fieldPicker.timestamp.label": "timestamp",
18
+ "fieldPicker.time.label": "时间戳记",
19
+ "fieldPicker.timestamp.label": "时间戳记",
20
20
  "flyout.applyButton.label": "确定",
21
21
  "flyout.rejectButton.label": "取消",
22
22
  "propertiesEdit.closeButton.label": "关闭",
@@ -93,7 +93,8 @@
93
93
  "dropdown.tooltip.clear.all": "全部清除",
94
94
  "dropdown.tooltip.clear.selection": "清除选择",
95
95
  "truncate.long.string.error": "这些值超过了 {truncate_limit} 个字符的显示限制,无法编辑。",
96
- "properties.label": "属性",
96
+ "properties.label": "{label} 属性",
97
+ "properties.error.label": "属性中存在错误",
97
98
  "readonlytable.edit.button.label": "编辑",
98
99
  "toggletext.icon.description": "{toggletext_label} 图标",
99
100
  "multiselect.dropdown.empty.label": "未选择任何项",
@@ -93,7 +93,8 @@
93
93
  "dropdown.tooltip.clear.all": "全部清除",
94
94
  "dropdown.tooltip.clear.selection": "清除選項",
95
95
  "truncate.long.string.error": "這些值超出 {truncate_limit} 個字元的顯示限制,無法編輯。",
96
- "properties.label": "屬性",
96
+ "properties.label": "{label} 內容",
97
+ "properties.error.label": "內容中發生錯誤",
97
98
  "readonlytable.edit.button.label": "編輯",
98
99
  "toggletext.icon.description": "{toggletext_label} 圖示",
99
100
  "multiselect.dropdown.empty.label": "沒有選取任何項目",
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "Schließen"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "Cerrar"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "Fermer"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "Chiudi"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "閉じる"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "닫기"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "Fechar"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "Stäng"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "关闭"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notification.panel.close.button.description": "關閉"
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyra/canvas",
3
- "version": "12.27.1",
3
+ "version": "12.28.1",
4
4
  "description": "Elyra common-canvas",
5
5
  "main": "dist/common-canvas.js",
6
6
  "module": "dist/common-canvas.es.js",
@@ -1068,6 +1068,21 @@ export default class CanvasController {
1068
1068
  return this.objectModel.getAPIPipeline(pipelineId).getCommentStyle(commentId, temporary);
1069
1069
  }
1070
1070
 
1071
+ // Hides all comments on the canvas.
1072
+ hideComments() {
1073
+ this.objectModel.hideComments();
1074
+ }
1075
+
1076
+ // Shows all comments on the canvas - if they were previously hiding.
1077
+ showComments() {
1078
+ this.objectModel.showComments();
1079
+ }
1080
+
1081
+ // Returns true if comments are currently hiding.
1082
+ isHidingComments() {
1083
+ return this.objectModel.isHidingComments();
1084
+ }
1085
+
1071
1086
  // ---------------------------------------------------------------------------
1072
1087
  // Links methods
1073
1088
  // ---------------------------------------------------------------------------
@@ -2370,6 +2385,14 @@ export default class CanvasController {
2370
2385
  this.zoomToFit();
2371
2386
  break;
2372
2387
  }
2388
+ case "commentsHide": {
2389
+ this.hideComments();
2390
+ break;
2391
+ }
2392
+ case "commentsShow": {
2393
+ this.showComments();
2394
+ break;
2395
+ }
2373
2396
  case "setNodeLabelEditingMode": {
2374
2397
  this.setNodeLabelEditingMode(data.id, data.pipelineId);
2375
2398
  break;
@@ -2382,6 +2405,14 @@ export default class CanvasController {
2382
2405
  this.togglePalette();
2383
2406
  break;
2384
2407
  }
2408
+ case "paletteOpen": {
2409
+ this.openPalette();
2410
+ break;
2411
+ }
2412
+ case "paletteClose": {
2413
+ this.closePalette();
2414
+ break;
2415
+ }
2385
2416
  case "toggleNotificationPanel": {
2386
2417
  this.toggleNotificationPanel();
2387
2418
  break;
@@ -162,12 +162,12 @@ class CommonCanvasToolbar extends React.Component {
162
162
 
163
163
  // Add the new togglePalette icon if the palette is enabled.
164
164
  if (this.props.isPaletteEnabled) {
165
+ const paletteOpenClose = this.props.isPaletteOpen
166
+ ? { action: "paletteClose", label: paletteLabel, enable: true }
167
+ : { action: "paletteOpen", label: paletteLabel, enable: true };
168
+
165
169
  const paletteTools = [
166
- { action: "togglePalette",
167
- label: paletteLabel,
168
- enable: true,
169
- iconTypeOverride: this.props.isPaletteOpen ? "paletteClose" : "paletteOpen"
170
- },
170
+ paletteOpenClose,
171
171
  { divider: true }
172
172
  ];
173
173
  return paletteTools.concat(newLeftBar);
@@ -179,6 +179,8 @@ export const TOOLBAR_CUT = "cut";
179
179
  export const TOOLBAR_COPY = "copy";
180
180
  export const TOOLBAR_PASTE = "paste";
181
181
  export const TOOLBAR_CREATE_AUTO_COMMENT = "createAutoComment";
182
+ export const TOOLBAR_SHOW_COMMENTS = "commentsShow";
183
+ export const TOOLBAR_HIDE_COMMENTS = "commentsHide";
182
184
  export const TOOLBAR_DELETE_SELECTED_OBJECTS = "deleteSelectedObjects";
183
185
  export const TOOLBAR_ZOOM_IN = "zoomIn";
184
186
  export const TOOLBAR_ZOOM_OUT = "zoomOut";
@@ -1953,7 +1953,7 @@ export default class SVGCanvasRenderer {
1953
1953
  } else if (transPos.x === this.zoomStartPoint.startX &&
1954
1954
  transPos.y === this.zoomStartPoint.startY &&
1955
1955
  !this.zoomChanged()) {
1956
- this.zoomClick();
1956
+ this.zoomClick(d3Event);
1957
1957
 
1958
1958
  } else if (this.regionSelect) {
1959
1959
  this.zoomEndRegionSelect(d3Event);
@@ -2032,12 +2032,22 @@ export default class SVGCanvasRenderer {
2032
2032
  }
2033
2033
 
2034
2034
  // Handles a zoom operation that is just a click on the canvas background.
2035
- zoomClick() {
2036
- // Only clear selections if clicked on the canvas of the current active pipeline.
2037
- // Clicking the canvas of an expanded supernode will select that node.
2038
- // Also, don't clear selections if we have closed a context menu or
2039
- // closed text editing.
2040
- if (this.dispUtils.isDisplayingCurrentPipeline() && !this.contextMenuClosedOnZoom && !this.textEditingClosedOnZoom) {
2035
+ zoomClick(d3Event) {
2036
+ // Only clear selections under these conditions:
2037
+ // * if the click was on the canvas of the current active pipeline. (This
2038
+ // is because clicking on the canvas background of an expanded supernode
2039
+ // should select that node.)
2040
+ // * if we have not just closed a context menu
2041
+ // * if we have not just closed text editing
2042
+ // * if editing actions are enabled OR the target is the canvas background.
2043
+ // (This condition is necessary because when editing actions are disabled,
2044
+ // for a read-only canvas, the mouse-up over a node can cause this method
2045
+ // to be called.)
2046
+ if (this.dispUtils.isDisplayingCurrentPipeline() &&
2047
+ !this.contextMenuClosedOnZoom &&
2048
+ !this.textEditingClosedOnZoom &&
2049
+ (this.config.enableEditingActions ||
2050
+ d3Event.sourceEvent.target.classList.contains("d3-svg-background"))) {
2041
2051
  this.canvasController.clearSelections();
2042
2052
  }
2043
2053
  }
@@ -3423,7 +3433,7 @@ export default class SVGCanvasRenderer {
3423
3433
  (enter) => this.createDecorations(enter, objType, decGrpClassName)
3424
3434
  )
3425
3435
  .attr("transform", (dec) => this.decUtils.getDecTransform(dec, d, objType))
3426
- .on("mousedown", (d3Event, dec) => (dec.hotspot ? that.callDecoratorCallback(d3Event, d, dec) : null))
3436
+ .on("mousedown", (d3Event, dec) => (dec.hotspot && d3Event.button === 0 ? that.callDecoratorCallback(d3Event, d, dec) : null))
3427
3437
  .each((dec, i, elements) => this.updateDecoration(dec, d3.select(elements[i]), objType, d));
3428
3438
  }
3429
3439
 
@@ -3797,9 +3807,7 @@ export default class SVGCanvasRenderer {
3797
3807
  .on("mousedown", (d3Event) => {
3798
3808
  CanvasUtils.stopPropagationAndPreventDefault(d3Event);
3799
3809
  this.ellipsisClicked = true;
3800
- if (!this.config.enableDragWithoutSelect) {
3801
- this.selectObjectD3Event(d3Event, d);
3802
- }
3810
+ this.selectObjectD3Event(d3Event, d);
3803
3811
  if (this.canvasController.isContextMenuDisplayed()) {
3804
3812
  this.canvasController.closeContextMenu();
3805
3813
  } else {
@@ -5187,8 +5195,9 @@ export default class SVGCanvasRenderer {
5187
5195
  }
5188
5196
 
5189
5197
  displayCommentsSubset(selection, data) {
5198
+ const newData = this.canvasInfo.hideComments ? [] : data;
5190
5199
  selection
5191
- .data(data, (c) => c.id)
5200
+ .data(newData, (c) => c.id)
5192
5201
  .join(
5193
5202
  (enter) => this.createComments(enter)
5194
5203
  )
@@ -6483,9 +6492,15 @@ export default class SVGCanvasRenderer {
6483
6492
  }
6484
6493
 
6485
6494
  // Returns true if a link should be displayed and false if not. The link
6486
- // should not be displayed if the displayLinkOnOverlap flag is false and the
6487
- // nodes are overlapping.
6495
+ // should not be displayed if:
6496
+ // * it is a comment link and comment links are switched off (comments are hiding)
6497
+ // * the displayLinkOnOverlap flag is false and the objects at each end of
6498
+ // the link are overlapping.
6488
6499
  shouldDisplayLink(srcNode, trgNode, linkType) {
6500
+ if (linkType === COMMENT_LINK && this.canvasInfo.hideComments) {
6501
+ return false;
6502
+ }
6503
+
6489
6504
  if (this.canvasLayout.displayLinkOnOverlap === false) {
6490
6505
  return !this.areLinkedObjectsOverlapping(srcNode, trgNode, linkType);
6491
6506
  }
@@ -21,7 +21,6 @@ import { Button } from "carbon-components-react";
21
21
  import { STATES, CARBON_BUTTON_KIND, CARBON_BUTTON_SIZE } from "./../../constants/constants.js";
22
22
  import Tooltip from "./../../../tooltip/tooltip.jsx";
23
23
  import classNames from "classnames";
24
- import { v4 as uuid4 } from "uuid";
25
24
  import { has } from "lodash";
26
25
 
27
26
  class ButtonAction extends React.Component {
@@ -30,7 +29,6 @@ class ButtonAction extends React.Component {
30
29
  this.state = {
31
30
  };
32
31
  this.applyAction = this.applyAction.bind(this);
33
- this.uuid = uuid4();
34
32
  }
35
33
 
36
34
  getActionButtonKind() {
@@ -90,7 +88,7 @@ class ButtonAction extends React.Component {
90
88
 
91
89
  let display = button;
92
90
  if (this.props.action.description) {
93
- const tooltipId = this.uuid + "-tooltip-action-" + this.props.action.name;
91
+ const tooltipId = "tooltip-action-" + this.props.action.name;
94
92
  const tooltip = (
95
93
  <div className="properties-tooltips">
96
94
  {this.props.action.description.text}
@@ -20,7 +20,6 @@ import { connect } from "react-redux";
20
20
  import { STATES } from "./../../constants/constants.js";
21
21
  import Tooltip from "./../../../tooltip/tooltip.jsx";
22
22
  import classNames from "classnames";
23
- import { v4 as uuid4 } from "uuid";
24
23
 
25
24
  class ImageAction extends React.Component {
26
25
  constructor(props) {
@@ -28,7 +27,6 @@ class ImageAction extends React.Component {
28
27
  this.state = {
29
28
  };
30
29
  this.applyAction = this.applyAction.bind(this);
31
- this.uuid = uuid4();
32
30
  }
33
31
 
34
32
  applyAction() {
@@ -68,7 +66,7 @@ class ImageAction extends React.Component {
68
66
 
69
67
  let display = image;
70
68
  if (this.props.action.description) {
71
- const tooltipId = this.uuid + "-tooltip-action-" + this.props.action.name;
69
+ const tooltipId = "tooltip-action-" + this.props.action.name;
72
70
  const tooltip = (
73
71
  <div className="properties-tooltips">
74
72
  {this.props.action.description.text}
@@ -21,7 +21,7 @@ import PropertiesMain from "./properties-main";
21
21
  import PropertiesModal from "./components/properties-modal";
22
22
  import ValidationMessage from "./components/validation-message";
23
23
  import { formatMessage } from "./util/property-utils";
24
- import { MESSAGE_KEYS } from "./constants/constants";
24
+ import { MESSAGE_KEYS, DEFAULT_LOCALE } from "./constants/constants";
25
25
 
26
26
  import { injectIntl } from "react-intl";
27
27
 
@@ -237,18 +237,20 @@ CommonProperties.propTypes = {
237
237
  containerType: PropTypes.string,
238
238
  enableResize: PropTypes.bool,
239
239
  conditionReturnValueHandling: PropTypes.oneOf(["null", "value"]),
240
+ returnValueFiltering: PropTypes.array,
240
241
  buttonLabels: PropTypes.shape({
241
242
  primary: PropTypes.string,
242
243
  secondary: PropTypes.string
243
244
  }),
244
245
  schemaValidation: PropTypes.bool,
245
246
  applyPropertiesWithoutEdit: PropTypes.bool,
246
- conditionHiddenPropertyHandling: PropTypes.oneOf(["null", "value"]),
247
- conditionDisabledPropertyHandling: PropTypes.oneOf(["null", "value"]),
247
+ conditionHiddenPropertyHandling: PropTypes.oneOf(["null", "undefined", "value"]),
248
+ conditionDisabledPropertyHandling: PropTypes.oneOf(["null", "undefined", "value"]),
248
249
  maxLengthForMultiLineControls: PropTypes.number,
249
250
  maxLengthForSingleLineControls: PropTypes.number,
250
251
  convertValueDataTypes: PropTypes.bool,
251
- showRequiredIndicator: PropTypes.bool
252
+ showRequiredIndicator: PropTypes.bool,
253
+ locale: PropTypes.string
252
254
  }),
253
255
  callbacks: PropTypes.shape({
254
256
  controllerHandler: PropTypes.func,
@@ -285,7 +287,8 @@ CommonProperties.defaultProps = {
285
287
  maxLengthForMultiLineControls: 1024,
286
288
  maxLengthForSingleLineControls: 128,
287
289
  convertValueDataTypes: false,
288
- showRequiredIndicator: true
290
+ showRequiredIndicator: true,
291
+ locale: DEFAULT_LOCALE
289
292
  },
290
293
  callbacks: {
291
294
  },
@@ -22,7 +22,6 @@ import { STATES, CARBON_ICONS, MESSAGE_KEYS } from "./../../constants/constants.
22
22
  import { ControlType } from "./../../constants/form-constants";
23
23
  import Tooltip from "./../../../tooltip/tooltip.jsx";
24
24
  import { isEmpty, get } from "lodash";
25
- import { v4 as uuid4 } from "uuid";
26
25
  import Icon from "./../../../icons/icon.jsx";
27
26
  import ActionFactory from "./../../actions/action-factory.js";
28
27
  import { formatMessage } from "./../../util/property-utils";
@@ -32,7 +31,6 @@ class ControlItem extends React.Component {
32
31
  super(props);
33
32
  this.actionFactory = new ActionFactory(this.props.controller);
34
33
  this.showRequiredIndicator = props.controller ? get(props.controller.getPropertiesConfig(), "showRequiredIndicator", true) : true;
35
- this.uuid = uuid4();
36
34
  }
37
35
 
38
36
  render() {
@@ -56,7 +54,7 @@ class ControlItem extends React.Component {
56
54
  this.props.control.description.link.propertyId = this.props.propertyId;
57
55
  }
58
56
  tooltip = (<Tooltip
59
- id={`${this.uuid}-tooltip-label-${this.props.control.name}`}
57
+ id={`tooltip-label-${this.props.control.name}`}
60
58
  tip={this.props.control.description.text}
61
59
  link={this.props.control.description.link ? this.props.control.description.link : null}
62
60
  tooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}
@@ -43,6 +43,8 @@
43
43
  label, .properties-indicator {
44
44
  @include carbon--type-style("label-01");
45
45
  color: $text-02;
46
+ }
47
+ .properties-indicator {
46
48
  padding-left: $spacing-02;
47
49
  }
48
50
  &.table-control {
@@ -33,8 +33,6 @@ import { has, isEmpty, sortBy, isEqual } from "lodash";
33
33
 
34
34
  import Tooltip from "./../../../tooltip/tooltip.jsx";
35
35
 
36
- import { v4 as uuid4 } from "uuid";
37
-
38
36
  export default class FieldPicker extends React.Component {
39
37
  static getDerivedStateFromProps(nextProps, prevState) {
40
38
  if (!isEqual(nextProps.fields, prevState.origFields)) {
@@ -343,7 +341,7 @@ export default class FieldPicker extends React.Component {
343
341
  break;
344
342
  }
345
343
  }
346
- const filterTooltipId = uuid4() + "-tooltip-filters-" + ind;
344
+ const filterTooltipId = "tooltip-filters-" + ind;
347
345
  const dataTypeLabel = PropertyUtils.formatMessage(that.props.controller.getReactIntl(), MESSAGE_KEYS[`FIELDPICKER_${filter.type.toUpperCase()}_LABEL`]);
348
346
  const tooltip = (
349
347
  <div className="properties-tooltips">
@@ -16,18 +16,22 @@
16
16
 
17
17
  import React from "react";
18
18
  import PropTypes from "prop-types";
19
- import { v4 as uuid4 } from "uuid";
20
19
  import Tooltip from "./../../../tooltip/tooltip.jsx";
21
20
  import { has } from "lodash";
21
+ import { Checkbox } from "carbon-components-react";
22
22
 
23
23
  // Reusable component to show tooltip if the content is truncated
24
24
  export default class TruncatedContentTooltip extends React.Component {
25
25
 
26
26
  render() {
27
27
  let tooltipText = this.props.tooltipText;
28
+ let truncatedRef = this.props.truncatedRef;
28
29
  if (typeof this.props.tooltipText !== "object") {
29
30
  tooltipText = String(this.props.tooltipText);
30
31
  }
32
+ if (this.props.content.type === Checkbox && this.tooltipRef && this.tooltipRef.firstChild) {
33
+ truncatedRef = this.tooltipRef.firstChild.lastChild; // checkbox label is in div -> label -> span
34
+ }
31
35
  const tooltip = (
32
36
  <div className="properties-tooltips">
33
37
  {tooltipText}
@@ -36,14 +40,17 @@ export default class TruncatedContentTooltip extends React.Component {
36
40
  return (
37
41
  <div className="properties-truncated-tooltip">
38
42
  <Tooltip
39
- id={`${uuid4()}-properties`}
43
+ id="properties"
40
44
  tip={tooltip}
41
45
  direction="bottom"
42
46
  className="properties-tooltips"
43
47
  disable={has(this.props, "disabled") ? this.props.disabled : true}
44
48
  showToolTipIfTruncated
49
+ truncatedRef={truncatedRef}
45
50
  >
46
- {this.props.content}
51
+ <div ref={(ref) => (this.tooltipRef = ref)}>
52
+ {this.props.content}
53
+ </div>
47
54
  </Tooltip>
48
55
  </div>
49
56
  );
@@ -52,6 +59,7 @@ export default class TruncatedContentTooltip extends React.Component {
52
59
 
53
60
  TruncatedContentTooltip.propTypes = {
54
61
  content: PropTypes.element.isRequired,
62
+ truncatedRef: PropTypes.object,
55
63
  tooltipText: PropTypes.oneOfType([
56
64
  PropTypes.string.isRequired,
57
65
  PropTypes.object.isRequired,
@@ -16,7 +16,7 @@
16
16
 
17
17
  .properties-truncated-tooltip {
18
18
  overflow: hidden;
19
- .tooltip-trigger {
19
+ .tooltip-trigger div {
20
20
  width: inherit;
21
21
  overflow: hidden;
22
22
  text-overflow: ellipsis;
@@ -20,7 +20,6 @@ import Icon from "./../../../icons/icon.jsx";
20
20
  import Tooltip from "./../../../tooltip/tooltip.jsx";
21
21
  import { STATES } from "./../../constants/constants.js";
22
22
  import classNames from "classnames";
23
- import { v4 as uuid4 } from "uuid";
24
23
 
25
24
  export default class ValidationMessage extends React.Component {
26
25
 
@@ -36,7 +35,7 @@ export default class ValidationMessage extends React.Component {
36
35
  const msgIcon = this.props.inTable
37
36
  ? (<div className="properties-tooltips-container table-cell-msg-icon">
38
37
  <Tooltip
39
- id={uuid4() + "-table-cell-msg-icon"}
38
+ id="table-cell-msg-icon"
40
39
  tip={this.props.messageInfo.text}
41
40
  direction="bottom"
42
41
  className="properties-tooltips"
@@ -19,16 +19,17 @@ import Draggable from "react-draggable";
19
19
  import { Checkbox, Loading } from "carbon-components-react";
20
20
  import { ArrowUp16, ArrowDown16, ArrowsVertical16, Information16 } from "@carbon/icons-react";
21
21
  import Tooltip from "./../../../tooltip/tooltip.jsx";
22
+ import TruncatedContentTooltip from "./../truncated-content-tooltip";
22
23
  import { SORT_DIRECTION, STATES, ROW_SELECTION, MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH_WITHOUT_LABEL } from "./../../constants/constants";
23
24
  import { injectIntl } from "react-intl";
24
25
  import defaultMessages from "../../../../locales/common-properties/locales/en.json";
25
26
 
26
27
  import { isEmpty, differenceBy, mapValues } from "lodash";
27
- import { v4 as uuid4 } from "uuid";
28
28
  import classNames from "classnames";
29
29
 
30
30
  import PropTypes from "prop-types";
31
31
  import React from "react";
32
+ import { v4 as uuid4 } from "uuid";
32
33
 
33
34
  class VirtualizedTable extends React.Component {
34
35
 
@@ -66,6 +67,7 @@ class VirtualizedTable extends React.Component {
66
67
  this.onRowClick = this.onRowClick.bind(this);
67
68
  this.overSelectOption = this.overSelectOption.bind(this);
68
69
  this.resizeColumn = this.resizeColumn.bind(this);
70
+ this.uuid = uuid4();
69
71
  }
70
72
 
71
73
  componentDidUpdate() {
@@ -201,7 +203,7 @@ class VirtualizedTable extends React.Component {
201
203
  const checkbox = this.props.selectable && this.props.rowSelection !== ROW_SELECTION.SINGLE
202
204
  ? (<div role="checkbox" aria-checked={this.props.checkedAll} className="properties-vt-header-checkbox">
203
205
  <Checkbox
204
- id={`properties-vt-hd-cb-${scrollKey}`}
206
+ id={`properties-vt-hd-cb-${this.uuid}-${scrollKey}`}
205
207
  onChange={this.selectAll}
206
208
  checked={this.props.checkedAll}
207
209
  labelText={translatedHeaderCheckboxLabel}
@@ -235,17 +237,11 @@ class VirtualizedTable extends React.Component {
235
237
  </span>);
236
238
  }
237
239
 
238
- const tooltip = columnData.headerLabel
239
- ? (<div className="properties-tooltips">
240
- <span style= {{ fontWeight: "bold" }}>{columnData.headerLabel}</span>
241
- </div>)
242
- : null;
243
-
244
240
  const infoIcon = isEmpty(columnData.description)
245
241
  ? null
246
242
  : (<div className="properties-vt-info-icon-tip">
247
243
  <Tooltip
248
- id={`properties-tooltip-${columnData.headerLabel}-info`}
244
+ id="properties-tooltip-info"
249
245
  tip={columnData.description}
250
246
  direction="bottom"
251
247
  className="properties-tooltips"
@@ -255,8 +251,6 @@ class VirtualizedTable extends React.Component {
255
251
  </Tooltip>
256
252
  </div>);
257
253
 
258
- const tooltipId = uuid4() + "-tooltip-column-" + dataKey;
259
-
260
254
  const resizeElem = columnData.resizable && !this.isLastColumn(dataKey)
261
255
  ? (<Draggable
262
256
  axis="x"
@@ -276,26 +270,19 @@ class VirtualizedTable extends React.Component {
276
270
  />
277
271
  </Draggable>)
278
272
  : "";
279
-
280
- const header = isEmpty(tooltip)
281
- ? (<div className="properties-vt-label-icon">
282
- {label}
283
- {infoIcon}
284
- </div>)
285
- : (<div className="properties-vt-label-tip-icon">
286
- <Tooltip
287
- id={tooltipId}
288
- tip={tooltip}
289
- direction="bottom"
290
- className="properties-tooltips"
291
- >
292
- {label}
293
- </Tooltip>
294
- {infoIcon}
295
- </div>);
296
-
273
+ const headerDisplayLabel = typeof label === "string" ? (<span>{label}</span>) : label;
274
+ const header = (<div className="properties-vt-label-tip-icon">
275
+ <TruncatedContentTooltip
276
+ tooltipText={columnData.headerLabel}
277
+ content={headerDisplayLabel}
278
+ disabled={columnData.disabled}
279
+ />
280
+ {infoIcon}
281
+ </div>);
297
282
  return (
298
- <div className={classNames({ "properties-vt-column-with-resize": resizeElem !== "", "properties-vt-column-without-resize": resizeElem === "" })}>
283
+ <div data-id={`properties-vt-header-${dataKey}`}
284
+ className={classNames({ "properties-vt-column-with-resize": resizeElem !== "", "properties-vt-column-without-resize": resizeElem === "" })}
285
+ >
299
286
  <div className={classNames("properties-vt-column properties-tooltips-container", { "sort-column-active": dataKey === this.props.sortBy })}>
300
287
  {header}
301
288
  {disableSort === false && sortIcon}
@@ -408,7 +395,7 @@ class VirtualizedTable extends React.Component {
408
395
  }}
409
396
  >
410
397
  <Checkbox
411
- id={`properties-vt-row-cb-${scrollKey}-${index}`}
398
+ id={`properties-vt-row-cb-${this.uuid}-${scrollKey}-${index}`}
412
399
  key={`properties-vt-row-cb-${scrollKey}-${index}`}
413
400
  labelText={translatedRowCheckboxLabel}
414
401
  hideLabel
@@ -115,7 +115,9 @@ export const MESSAGE_KEYS = {
115
115
  SHOW_PASSWORD_TOOLTIP: "passwordShow.tooltip",
116
116
  HIDE_PASSWORD_TOOLTIP: "passwordHide.tooltip",
117
117
  LABEL_INDICATOR_REQUIRED: "label.indicator.required",
118
- LABEL_INDICATOR_OPTIONAL: "label.indicator.optional"
118
+ LABEL_INDICATOR_OPTIONAL: "label.indicator.optional",
119
+ DATEPICKER_RANGE_START_LABEL: "datepickerRangeStart.default.label",
120
+ DATEPICKER_RANGE_END_LABEL: "datepickerRangeEnd.default.label"
119
121
  };
120
122
 
121
123
  export const TRUNCATE_LIMIT = 10000;
@@ -153,6 +155,13 @@ export const DATA_TYPE = {
153
155
  TIMESTAMP: "timestamp"
154
156
  };
155
157
 
158
+ export const DATEPICKER_TYPE = {
159
+ SINGLE: "single",
160
+ RANGE: "range"
161
+ };
162
+
163
+ export const DEFAULT_DATEPICKER_FORMAT = "Y-m-d"; // ISO format
164
+
156
165
  export const DEFAULT_DATE_FORMAT = "yyyy-mm-dd";
157
166
 
158
167
  export const DEFAULT_TIME_FORMAT = "H:m:s";
@@ -277,3 +286,5 @@ export const CONTAINER_TYPE = {
277
286
  TEARSHEET: "Tearsheet",
278
287
  MODAL: "Modal"
279
288
  };
289
+
290
+ export const DEFAULT_LOCALE = "en";
@@ -79,6 +79,8 @@ const ControlType = {
79
79
  EXPRESSION: "expression",
80
80
  NUMBERFIELD: "numberfield",
81
81
  DATEFIELD: "datefield",
82
+ DATEPICKER: "datepicker",
83
+ DATEPICKERRANGE: "datepickerRange",
82
84
  TIMEFIELD: "timefield",
83
85
  TIMESTAMP: "timestampfield",
84
86
  CHECKBOX: "checkbox",