@elyra/canvas 13.41.0 → 13.41.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 (44) hide show
  1. package/dist/{common-canvas-faa1c8f9.js → common-canvas-614f599a.js} +2 -2
  2. package/dist/{common-canvas-faa1c8f9.js.map → common-canvas-614f599a.js.map} +1 -1
  3. package/dist/{common-canvas-91cd796c.js → common-canvas-63cf169d.js} +2 -2
  4. package/dist/{common-canvas-91cd796c.js.map → common-canvas-63cf169d.js.map} +1 -1
  5. package/dist/common-canvas.es.js +1 -1
  6. package/dist/common-canvas.js +1 -1
  7. package/dist/common-properties-9cf649aa.js +2 -0
  8. package/dist/common-properties-9cf649aa.js.map +1 -0
  9. package/dist/common-properties-dcfb5ebe.js +2 -0
  10. package/dist/common-properties-dcfb5ebe.js.map +1 -0
  11. package/dist/flexible-table-4463a683.js +2 -0
  12. package/dist/flexible-table-4463a683.js.map +1 -0
  13. package/dist/{flexible-table-2cf782bc.js → flexible-table-e75a6d5b.js} +2 -2
  14. package/dist/flexible-table-e75a6d5b.js.map +1 -0
  15. package/dist/{index-0b2515f9.js → index-355fd3e1.js} +2 -2
  16. package/dist/{index-0b2515f9.js.map → index-355fd3e1.js.map} +1 -1
  17. package/dist/{index-27371669.js → index-4f11af02.js} +2 -2
  18. package/dist/{index-27371669.js.map → index-4f11af02.js.map} +1 -1
  19. package/dist/lib/canvas.es.js +1 -1
  20. package/dist/lib/canvas.js +1 -1
  21. package/dist/lib/properties/field-picker.es.js +1 -1
  22. package/dist/lib/properties/field-picker.js +1 -1
  23. package/dist/lib/properties/flexible-table.es.js +1 -1
  24. package/dist/lib/properties/flexible-table.js +1 -1
  25. package/dist/lib/properties.es.js +1 -1
  26. package/dist/lib/properties.js +1 -1
  27. package/dist/styles/common-canvas.min.css +1 -1
  28. package/dist/{toolbar-cd90b048.js → toolbar-23100028.js} +2 -2
  29. package/dist/{toolbar-cd90b048.js.map → toolbar-23100028.js.map} +1 -1
  30. package/dist/{toolbar-43e63291.js → toolbar-9f98432a.js} +2 -2
  31. package/dist/{toolbar-43e63291.js.map → toolbar-9f98432a.js.map} +1 -1
  32. package/package.json +2 -2
  33. package/src/command-actions/commonPropertiesAction.js +10 -4
  34. package/src/common-properties/components/virtualized-grid/virtualized-grid.jsx +16 -8
  35. package/src/toolbar/toolbar-sub-menu-item.jsx +11 -13
  36. package/src/toolbar/toolbar.scss +1 -1
  37. package/stats.html +1 -1
  38. package/dist/common-properties-02756e6a.js +0 -2
  39. package/dist/common-properties-02756e6a.js.map +0 -1
  40. package/dist/common-properties-d054dfb5.js +0 -2
  41. package/dist/common-properties-d054dfb5.js.map +0 -1
  42. package/dist/flexible-table-1cf1378f.js +0 -2
  43. package/dist/flexible-table-1cf1378f.js.map +0 -1
  44. package/dist/flexible-table-2cf782bc.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyra/canvas",
3
- "version": "13.41.0",
3
+ "version": "13.41.1",
4
4
  "description": "Elyra common-canvas",
5
5
  "main": "dist/common-canvas.js",
6
6
  "module": "dist/common-canvas.es.js",
@@ -128,7 +128,7 @@
128
128
  "url": "0.11.3"
129
129
  },
130
130
  "peerDependencies": {
131
- "@carbon/react": "^1.51.0",
131
+ "@carbon/react": "^1.92.0",
132
132
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
133
133
  "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
134
134
  "react-intl": "^5.0.0 || ^6.0.0 || ^7.0.0"
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2024 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.
@@ -27,15 +27,21 @@ export default class CommonPropertiesAction extends Action {
27
27
 
28
28
  // Standard methods
29
29
  do() {
30
- this.applyPropertyChanges(this.newValues.properties, this.appData, this.newValues.additionalInfo, this.newValues.undoInfo, this.newValues.uiProperties);
30
+ if (this.applyPropertyChanges) {
31
+ this.applyPropertyChanges(this.newValues.properties, this.appData, this.newValues.additionalInfo, this.newValues.undoInfo, this.newValues.uiProperties);
32
+ }
31
33
  }
32
34
 
33
35
  undo() {
34
- this.applyPropertyChanges(this.initialValues.properties, this.appData, this.initialValues.additionalInfo, this.initialValues.undoInfo, this.initialValues.uiProperties);
36
+ if (this.applyPropertyChanges) {
37
+ this.applyPropertyChanges(this.initialValues.properties, this.appData, this.initialValues.additionalInfo, this.initialValues.undoInfo, this.initialValues.uiProperties);
38
+ }
35
39
  }
36
40
 
37
41
  redo() {
38
- this.applyPropertyChanges(this.newValues.properties, this.appData, this.newValues.additionalInfo, this.newValues.undoInfo, this.newValues.uiProperties);
42
+ if (this.applyPropertyChanges) {
43
+ this.applyPropertyChanges(this.newValues.properties, this.appData, this.newValues.additionalInfo, this.newValues.undoInfo, this.newValues.uiProperties);
44
+ }
39
45
  }
40
46
 
41
47
  getLabel() {
@@ -197,11 +197,6 @@ const VirtualizedGrid = (props) => {
197
197
  onMouseLeave={(evt) => overSelectOption(evt)}
198
198
  onFocus={(evt) => overSelectOption(evt)}
199
199
  onBlur={(evt) => overSelectOption(evt)}
200
- onKeyDown={(evt) => {
201
- if (evt.key === "Space" || evt.key === "Enter") {
202
- onRowClick(evt, rowIndex, rowData);
203
- }
204
- }}
205
200
  >
206
201
  <Checkbox
207
202
  id={`properties-vt-row-cb-${props.scrollKey}-${rowIndex}`}
@@ -211,6 +206,7 @@ const VirtualizedGrid = (props) => {
211
206
  checked={rowSelected}
212
207
  disabled={rowDisabled || props.tableDisabled}
213
208
  readOnly={props.readOnly}
209
+ onChange={(evt, data) => onRowClick(evt.nativeEvent, rowIndex, rowData, data.checked)}
214
210
  />
215
211
  </td>);
216
212
  }
@@ -391,12 +387,24 @@ const VirtualizedGrid = (props) => {
391
387
  </tbody>);
392
388
  };
393
389
 
394
- const onRowClick = (evt, rowIndex, rowData) => {
390
+ /**
391
+ * Handles row click events for selection and interaction.
392
+ * Prevents propagation for dropdown options and manages row selection state
393
+ * including support for shift-key multi-selection.
394
+ *
395
+ * @param {Event} evt - The click event object
396
+ * @param {number} rowIndex - The visual index of the clicked row
397
+ * @param {Object} rowData - The data object for the clicked row
398
+ * @param {number} rowData.originalRowIndex - The original index from getOriginalRowIndex
399
+ * @param {boolean} rowData.disabled - Whether the row is disabled
400
+ * @param {boolean} [newValue] - Optional explicit new selection state (true/false)
401
+ */
402
+ const onRowClick = (evt, rowIndex, rowData, newValue) => {
395
403
  if (evt.target.className === "cds--select-option") {
396
404
  evt.stopPropagation(); // stop propagation when selecting dropdown select options within table rows
397
- } else {
405
+ } else if (typeof newValue !== "undefined" || props.rowSelection === ROW_SELECTION.SINGLE) {
398
406
  // Set selections
399
- const selected = !isRowSelected(rowData.originalRowIndex);
407
+ const selected = newValue ?? !isRowSelected(rowData.originalRowIndex);
400
408
  if (typeof props.setRowsSelected === "function") {
401
409
  props.setRowsSelected({
402
410
  "index": rowIndex,
@@ -193,19 +193,17 @@ class ToolbarSubMenuItem extends React.Component {
193
193
  data-toolbar-action={actionObj.action}
194
194
  onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave} onKeyDown={this.onKeyDown}
195
195
  >
196
- <div>
197
- <ToolbarButtonItem
198
- actionObj={actionObj}
199
- actionName={this.generateActionName()}
200
- instanceId={this.props.instanceId}
201
- isInMenu
202
- subAreaDisplayed={this.state.subAreaDisplayed}
203
- actionClickHandler={this.actionClickHandler}
204
- buttonFocusAction={this.props.subMenuFocusAction}
205
- isFocusInToolbar // Focus must be in toolbar for this sub-menu item to appear
206
- size={this.props.size}
207
- />
208
- </div>
196
+ <ToolbarButtonItem
197
+ actionObj={actionObj}
198
+ actionName={this.generateActionName()}
199
+ instanceId={this.props.instanceId}
200
+ isInMenu
201
+ subAreaDisplayed={this.state.subAreaDisplayed}
202
+ actionClickHandler={this.actionClickHandler}
203
+ buttonFocusAction={this.props.subMenuFocusAction}
204
+ isFocusInToolbar // Focus must be in toolbar for this sub-menu item to appear
205
+ size={this.props.size}
206
+ />
209
207
  {subArea}
210
208
  </div>
211
209
  );
@@ -299,7 +299,7 @@ $toolbar-divider-width: 1px;
299
299
 
300
300
  .toolbar-sub-menu-item {
301
301
  position: relative; // Allows any cascade sub-menu to be positioned absolutely
302
- & button {
302
+ & > button { // Restrict styles to sub-menu buttons so styles do not cascade to buttons in sub-panels.
303
303
  width: 100%;
304
304
  padding-top: 0;
305
305
  padding-bottom: 0;