@elyra/canvas 12.32.2 → 12.34.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 (108) hide show
  1. package/dist/{_baseIteratee-eabd2a94.js → _baseIteratee-2a601011.js} +2 -2
  2. package/dist/{_baseIteratee-eabd2a94.js.map → _baseIteratee-2a601011.js.map} +1 -1
  3. package/dist/{_baseIteratee-e1311552.js → _baseIteratee-7fb1949c.js} +2 -2
  4. package/dist/{_baseIteratee-e1311552.js.map → _baseIteratee-7fb1949c.js.map} +1 -1
  5. package/dist/{canvas-constants-72222288.js → canvas-constants-29b7f65c.js} +2 -2
  6. package/dist/{canvas-constants-72222288.js.map → canvas-constants-29b7f65c.js.map} +1 -1
  7. package/dist/{canvas-constants-903046ab.js → canvas-constants-85883d4c.js} +2 -2
  8. package/dist/{canvas-constants-903046ab.js.map → canvas-constants-85883d4c.js.map} +1 -1
  9. package/dist/{canvas-controller-c0b65951.js → canvas-controller-273d4b5b.js} +2 -2
  10. package/dist/{canvas-controller-c0b65951.js.map → canvas-controller-273d4b5b.js.map} +1 -1
  11. package/dist/{canvas-controller-2df80dc3.js → canvas-controller-96abce12.js} +2 -2
  12. package/dist/{canvas-controller-2df80dc3.js.map → canvas-controller-96abce12.js.map} +1 -1
  13. package/dist/{canvas-logger-6f90b136.js → canvas-logger-34ca361a.js} +2 -2
  14. package/dist/{canvas-logger-6f90b136.js.map → canvas-logger-34ca361a.js.map} +1 -1
  15. package/dist/{canvas-logger-3bfbcf85.js → canvas-logger-fec87cd1.js} +2 -2
  16. package/dist/{canvas-logger-3bfbcf85.js.map → canvas-logger-fec87cd1.js.map} +1 -1
  17. package/dist/common-canvas-5ccce28e.js +2 -0
  18. package/dist/common-canvas-5ccce28e.js.map +1 -0
  19. package/dist/common-canvas-f471a9f3.js +2 -0
  20. package/dist/common-canvas-f471a9f3.js.map +1 -0
  21. package/dist/common-canvas.es.js +1 -1
  22. package/dist/common-canvas.js +1 -1
  23. package/dist/common-properties-51bd2ecc.js +2 -0
  24. package/dist/common-properties-51bd2ecc.js.map +1 -0
  25. package/dist/common-properties-e82771ef.js +2 -0
  26. package/dist/common-properties-e82771ef.js.map +1 -0
  27. package/dist/{context-menu-wrapper-5846a20e.js → context-menu-wrapper-19a1cf72.js} +2 -2
  28. package/dist/{context-menu-wrapper-5846a20e.js.map → context-menu-wrapper-19a1cf72.js.map} +1 -1
  29. package/dist/{context-menu-wrapper-ac5e8c7a.js → context-menu-wrapper-c3a98c63.js} +2 -2
  30. package/dist/{context-menu-wrapper-ac5e8c7a.js.map → context-menu-wrapper-c3a98c63.js.map} +1 -1
  31. package/dist/{createClass-826941b3.js → createClass-09bc08f7.js} +1 -1
  32. package/dist/createClass-09bc08f7.js.map +1 -0
  33. package/dist/{createClass-be661622.js → createClass-ffbbe837.js} +1 -1
  34. package/dist/createClass-ffbbe837.js.map +1 -0
  35. package/dist/{datarecord-metadata-v3-schema-64329ae4.js → datarecord-metadata-v3-schema-531c7b07.js} +2 -2
  36. package/dist/{datarecord-metadata-v3-schema-64329ae4.js.map → datarecord-metadata-v3-schema-531c7b07.js.map} +1 -1
  37. package/dist/{datarecord-metadata-v3-schema-dd7370da.js → datarecord-metadata-v3-schema-db5150c5.js} +2 -2
  38. package/dist/{datarecord-metadata-v3-schema-dd7370da.js.map → datarecord-metadata-v3-schema-db5150c5.js.map} +1 -1
  39. package/dist/{flexible-table-23d61157.js → flexible-table-8c6db0fc.js} +2 -2
  40. package/dist/flexible-table-8c6db0fc.js.map +1 -0
  41. package/dist/{flexible-table-4259d869.js → flexible-table-b9c08069.js} +2 -2
  42. package/dist/flexible-table-b9c08069.js.map +1 -0
  43. package/dist/{getPrototypeOf-3751add9.js → getPrototypeOf-012c454b.js} +2 -2
  44. package/dist/{getPrototypeOf-3751add9.js.map → getPrototypeOf-012c454b.js.map} +1 -1
  45. package/dist/{getPrototypeOf-1e698126.js → getPrototypeOf-5f227292.js} +2 -2
  46. package/dist/{getPrototypeOf-1e698126.js.map → getPrototypeOf-5f227292.js.map} +1 -1
  47. package/dist/{icon-04f858ce.js → icon-a9c3f51e.js} +2 -2
  48. package/dist/{icon-04f858ce.js.map → icon-a9c3f51e.js.map} +1 -1
  49. package/dist/{icon-8cc7816d.js → icon-de9c6b33.js} +2 -2
  50. package/dist/{icon-8cc7816d.js.map → icon-de9c6b33.js.map} +1 -1
  51. package/dist/{index-101f9560.js → index-9960d3bf.js} +2 -2
  52. package/dist/{index-101f9560.js.map → index-9960d3bf.js.map} +1 -1
  53. package/dist/{index-2788d55d.js → index-d4a58ddb.js} +2 -2
  54. package/dist/{index-2788d55d.js.map → index-d4a58ddb.js.map} +1 -1
  55. package/dist/lib/canvas-controller.es.js +1 -1
  56. package/dist/lib/canvas-controller.js +1 -1
  57. package/dist/lib/canvas.es.js +1 -1
  58. package/dist/lib/canvas.js +1 -1
  59. package/dist/lib/command-stack.es.js +1 -1
  60. package/dist/lib/command-stack.js +1 -1
  61. package/dist/lib/context-menu.es.js +1 -1
  62. package/dist/lib/context-menu.js +1 -1
  63. package/dist/lib/properties/field-picker.es.js +1 -1
  64. package/dist/lib/properties/field-picker.js +1 -1
  65. package/dist/lib/properties/flexible-table.es.js +1 -1
  66. package/dist/lib/properties/flexible-table.js +1 -1
  67. package/dist/lib/properties.es.js +1 -1
  68. package/dist/lib/properties.js +1 -1
  69. package/dist/lib/tooltip.es.js +1 -1
  70. package/dist/lib/tooltip.js +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-233c09a8.js +2 -0
  74. package/dist/toolbar-233c09a8.js.map +1 -0
  75. package/dist/toolbar-cdb38f4a.js +2 -0
  76. package/dist/toolbar-cdb38f4a.js.map +1 -0
  77. package/package.json +3 -3
  78. package/src/common-canvas/cc-central-items.jsx +81 -17
  79. package/src/common-canvas/cc-contents.jsx +3 -19
  80. package/src/common-canvas/cc-right-flyout.jsx +1 -1
  81. package/src/common-canvas/common-canvas.jsx +1 -50
  82. package/src/common-canvas/common-canvas.scss +23 -45
  83. package/src/common-canvas/svg-canvas-d3.js +2 -1
  84. package/src/common-canvas/svg-canvas-renderer.js +255 -90
  85. package/src/common-canvas/svg-canvas-utils-nodes.js +0 -4
  86. package/src/common-properties/components/flexible-table/flexible-table.jsx +5 -5
  87. package/src/common-properties/constants/constants.js +1 -1
  88. package/src/common-properties/controls/dropdown/dropdown.jsx +8 -1
  89. package/src/common-properties/controls/numberfield/numberfield.jsx +21 -2
  90. package/src/notification-panel/notification-panel.scss +1 -0
  91. package/src/toolbar/toolbar-action-item.jsx +1 -1
  92. package/stats.html +1 -1
  93. package/dist/common-canvas-55d8916f.js +0 -2
  94. package/dist/common-canvas-55d8916f.js.map +0 -1
  95. package/dist/common-canvas-8eb241dc.js +0 -2
  96. package/dist/common-canvas-8eb241dc.js.map +0 -1
  97. package/dist/common-properties-96c9c88a.js +0 -2
  98. package/dist/common-properties-96c9c88a.js.map +0 -1
  99. package/dist/common-properties-c5292c66.js +0 -2
  100. package/dist/common-properties-c5292c66.js.map +0 -1
  101. package/dist/createClass-826941b3.js.map +0 -1
  102. package/dist/createClass-be661622.js.map +0 -1
  103. package/dist/flexible-table-23d61157.js.map +0 -1
  104. package/dist/flexible-table-4259d869.js.map +0 -1
  105. package/dist/toolbar-12f6def6.js +0 -2
  106. package/dist/toolbar-12f6def6.js.map +0 -1
  107. package/dist/toolbar-55e2020e.js +0 -2
  108. package/dist/toolbar-55e2020e.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolbar-cdb38f4a.js","sources":["../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/toFinite.js","../node_modules/lodash/toInteger.js","../src/toolbar/toolbar-utils.js","../src/toolbar/toolbar-action-sub-area.jsx","../src/toolbar/toolbar-action-item.jsx","../assets/images/zoom_to_fit.svg","../assets/images/arrange_horizontally.svg","../assets/images/arrange_vertically.svg","../assets/images/palette/palette_open.svg","../assets/images/palette/palette_close.svg","../assets/images/notification_counter_icon.svg","../src/toolbar/toolbar-overflow-menu.jsx","../src/toolbar/toolbar-overflow-item.jsx","../src/toolbar/toolbar-divider-item.jsx","../src/toolbar/toolbar.jsx"],"sourcesContent":["/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const genElementByClass = (className, containingDiv) => {\n\tconst elements = containingDiv.getElementsByClassName(className);\n\n\tif (elements && elements.length > 0) {\n\t\treturn elements[0];\n\t}\n\treturn null;\n};\n\nexport const genRectByClass = (className, containingDiv) => {\n\tconst element = genElementByClass(className, containingDiv);\n\n\tif (element) {\n\t\treturn element.getBoundingClientRect();\n\t}\n\treturn null;\n};\n","/*\n * Copyright 2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n*/\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { genElementByClass, genRectByClass } from \"./toolbar-utils.js\";\n\nclass ToolbarActionSubArea extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.onClick = this.onClick.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.containingDivId) {\n\t\t\tthis.adjustSubAreaPosition();\n\t\t}\n\t}\n\n\t// If we are given a closeSubArea function then call it. We will only have\n\t// such a function if the user has specified the closeSubAreaOnClick prop for\n\t// the parent action AND provided the user has not stopped event propogation.\n\tonClick() {\n\t\tif (this.props.closeSubArea) {\n\t\t\tthis.props.closeSubArea();\n\t\t}\n\t}\n\n\t// Adjust the position of the sub-area to make sure it doesn't extend\n\t// outside the containing divs boundary. We need to do this after the subarea\n\t// has been mounted so we can query its size and position.\n\tadjustSubAreaPosition() {\n\t\tconst containingDiv = document.getElementById(this.props.containingDivId);\n\t\tconst containingDivRect = containingDiv.getBoundingClientRect();\n\n\t\tconst classToGet = this.props.actionObj.subPanel ? \"subpanel\" : \"submenu\";\n\n\t\tconst thisArea = genElementByClass(classToGet, containingDiv);\n\t\tconst thisAreaRect = genRectByClass(classToGet, containingDiv);\n\n\t\tconst outsideBottom = thisAreaRect.bottom - containingDivRect.bottom;\n\t\tconst outsideRight = thisAreaRect.right - containingDivRect.right;\n\n\t\tif (this.props.expandDirection === \"vertical\") {\n\t\t\tif (outsideBottom > 0) {\n\t\t\t\tconst newTop = this.props.actionItemRect.top - thisAreaRect.height;\n\t\t\t\tthisArea.style.top = newTop + \"px\";\n\t\t\t}\n\n\t\t\tif (outsideRight > 0) {\n\t\t\t\tconst newLeft = this.props.actionItemRect.left - outsideRight - 2;\n\t\t\t\tthisArea.style.left = newLeft + \"px\";\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (outsideBottom > 0) {\n\t\t\t\tconst newTop = thisAreaRect.top - outsideBottom - 2;\n\t\t\t\tthisArea.style.top = newTop + \"px\";\n\t\t\t}\n\n\t\t\tif (outsideRight > 0) {\n\t\t\t\tconst newLeft = this.props.actionItemRect.left - thisAreaRect.width;\n\t\t\t\tthisArea.style.left = newLeft + \"px\";\n\t\t\t}\n\t\t}\n\t}\n\n\tgenerateSubAreaStyle() {\n\t\tif (this.props.expandDirection === \"vertical\") {\n\t\t\treturn {\n\t\t\t\ttop: this.props.actionItemRect.bottom + 1,\n\t\t\t\tleft: this.props.actionItemRect.left\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\ttop: this.props.actionItemRect.top - 1,\n\t\t\tleft: this.props.actionItemRect.left + this.props.actionItemRect.width\n\t\t};\n\t}\n\n\trender() {\n\t\tconst style = this.generateSubAreaStyle();\n\n\t\tif (this.props.actionObj.subPanel) {\n\t\t\treturn (\n\t\t\t\t<div style={style} className={\"toolbar-popover-list subpanel\"} onClick={this.onClick}>\n\t\t\t\t\t{this.props.actionObj.subPanel}\n\t\t\t\t</div>\n\t\t\t);\n\t\t} else if (this.props.actionObj.subMenu) {\n\t\t\tconst subMenuItems = this.props.generateToolbarItems(this.props.actionObj.subMenu, true, false);\n\n\t\t\treturn (\n\t\t\t\t<div style={style} className={\"toolbar-popover-list submenu\"} onClick={this.onClick}>\n\t\t\t\t\t{subMenuItems}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n}\n\nToolbarActionSubArea.propTypes = {\n\tactionObj: PropTypes.object.isRequired,\n\tgenerateToolbarItems: PropTypes.func.isRequired,\n\tcloseSubArea: PropTypes.func,\n\tactionItemRect: PropTypes.object.isRequired,\n\texpandDirection: PropTypes.string.isRequired,\n\tcontainingDivId: PropTypes.string\n};\n\nexport default ToolbarActionSubArea;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport Tooltip from \"../tooltip/tooltip.jsx\";\nimport ArrangeHorizontally from \"./../../assets/images/arrange_horizontally.svg\";\nimport ArrangeVertically from \"./../../assets/images/arrange_vertically.svg\";\nimport ToggleNotificationPanel from \"./../../assets/images/notification_counter_icon.svg\";\nimport PaletteClose from \"./../../assets/images/palette/palette_close.svg\";\nimport PaletteOpen from \"./../../assets/images/palette/palette_open.svg\";\nimport ZoomToFit from \"./../../assets/images/zoom_to_fit.svg\";\n\nimport { Button } from \"carbon-components-react\";\nimport SVG from \"react-inlinesvg\";\nimport classNames from \"classnames\";\nimport ToolbarActionSubArea from \"./toolbar-action-sub-area.jsx\";\nimport { StopFilledAlt16, Play16, Undo16, Redo16, Chat16, ChatOff16, Result16,\n\tCut16, Copy16, Paste16, Edit16,\tColorPalette16, Maximize16, Minimize16,\n\tLaunch16, AddComment16, TrashCan16, ZoomIn16, ZoomOut16,\n\tChevronRight16, ChevronDown16, ChevronUp16 } from \"@carbon/icons-react\";\nimport { TOOLBAR_STOP, TOOLBAR_RUN, TOOLBAR_UNDO, TOOLBAR_REDO,\n\tTOOLBAR_CUT, TOOLBAR_COPY, TOOLBAR_PASTE, TOOLBAR_CLIPBOARD,\n\tTOOLBAR_CREATE_COMMENT, TOOLBAR_CREATE_AUTO_COMMENT, TOOLBAR_COLOR_BACKGROUND,\n\tTOOLBAR_DELETE_SELECTED_OBJECTS, TOOLBAR_DELETE_LINK,\n\tTOOLBAR_ZOOM_IN, TOOLBAR_ZOOM_OUT, TOOLBAR_ZOOM_FIT,\n\tTOOLBAR_ARRANGE_HORIZONALLY, TOOLBAR_ARRANGE_VERTICALLY,\n\tTOOLBAR_OPEN_PALETTE, TOOLBAR_CLOSE_PALETTE, TOOLBAR_TOGGLE_NOTIFICATION_PANEL,\n\tTOOLBAR_SHOW_COMMENTS, TOOLBAR_HIDE_COMMENTS,\n\tTOOLBAR_EXPAND_SUPERNODE_IN_PLACE, TOOLBAR_COLLAPSE_SUPERNODE_IN_PLACE,\n\tTOOLBAR_EXPAND_SUPERNODE_FULL_PAGE, TOOLBAR_SET_NODE_LABEL_EDIT, TOOLBAR_SET_COMMENT_EDIT_MODE }\n\tfrom \"../common-canvas/constants/canvas-constants.js\";\n\nclass ToolbarActionItem extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tsubAreaDisplayed: false\n\t\t};\n\n\t\tthis.actionClickHandler = this.actionClickHandler.bind(this);\n\t\tthis.onMouseEnter = this.onMouseEnter.bind(this);\n\t\tthis.onMouseLeave = this.onMouseLeave.bind(this);\n\t\tthis.openSubArea = this.openSubArea.bind(this);\n\t\tthis.closeSubArea = this.closeSubArea.bind(this);\n\t\tthis.clickOutside = this.clickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.actionObj.getSubPanelCloseFn) {\n\t\t\tthis.props.actionObj.getSubPanelCloseFn(this.closeSubArea);\n\t\t}\n\t}\n\n\t// We must remove the eventListener in case this class is unmounted due\n\t// to the toolbar getting redrawn.\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"click\", this.clickOutside, false);\n\t}\n\n\tonMouseEnter(evt) {\n\t\tif ((this.props.actionObj.subMenu || this.props.actionObj.subPanel) && this.props.overflow) {\n\t\t\tthis.openSubArea();\n\t\t}\n\t}\n\n\tonMouseLeave(evt) {\n\t\tif ((this.props.actionObj.subMenu || this.props.actionObj.subPanel) && this.props.overflow) {\n\t\t\tthis.closeSubArea();\n\t\t}\n\t}\n\n\t// Returns a default icon, if there is one, for the action passed in.\n\t// It also may be set to disabled state.\n\tgetDefaultIcon(actionObj) {\n\t\tconst disabled = !actionObj.enable;\n\n\t\tswitch (actionObj.action) {\n\t\tcase (TOOLBAR_STOP):\n\t\t\treturn <StopFilledAlt16 disabled={disabled} />;\n\t\tcase (TOOLBAR_RUN):\n\t\t\treturn <Play16 disabled={disabled} />;\n\t\tcase (TOOLBAR_EXPAND_SUPERNODE_IN_PLACE):\n\t\t\treturn <Maximize16 disabled={disabled} />;\n\t\tcase (TOOLBAR_COLLAPSE_SUPERNODE_IN_PLACE):\n\t\t\treturn <Minimize16 disabled={disabled} />;\n\t\tcase (TOOLBAR_EXPAND_SUPERNODE_FULL_PAGE):\n\t\t\treturn <Launch16 disabled={disabled} />;\n\t\tcase (TOOLBAR_UNDO):\n\t\t\treturn <Undo16 disabled={disabled} />;\n\t\tcase (TOOLBAR_REDO):\n\t\t\treturn <Redo16 disabled={disabled} />;\n\t\tcase (TOOLBAR_CLIPBOARD):\n\t\t\treturn <Result16 disabled={disabled} />;\n\t\tcase (TOOLBAR_CUT):\n\t\t\treturn <Cut16 disabled={disabled} />;\n\t\tcase (TOOLBAR_COPY):\n\t\t\treturn <Copy16 disabled={disabled} />;\n\t\tcase (TOOLBAR_PASTE):\n\t\t\treturn <Paste16 disabled={disabled} />;\n\t\tcase (TOOLBAR_CREATE_COMMENT):\n\t\tcase (TOOLBAR_CREATE_AUTO_COMMENT):\n\t\t\treturn <AddComment16 disabled={disabled} />;\n\t\tcase (TOOLBAR_SHOW_COMMENTS):\n\t\t\treturn <Chat16 disabled={disabled} />;\n\t\tcase (TOOLBAR_HIDE_COMMENTS):\n\t\t\treturn <ChatOff16 disabled={disabled} />;\n\t\tcase (TOOLBAR_COLOR_BACKGROUND):\n\t\t\treturn <ColorPalette16 disabled={disabled} />;\n\t\tcase (TOOLBAR_DELETE_LINK):\n\t\tcase (TOOLBAR_DELETE_SELECTED_OBJECTS):\n\t\t\treturn <TrashCan16 disabled={disabled} />;\n\t\tcase (TOOLBAR_SET_COMMENT_EDIT_MODE):\n\t\tcase (TOOLBAR_SET_NODE_LABEL_EDIT):\n\t\t\treturn <Edit16 disabled={disabled} />;\n\t\tcase (TOOLBAR_ZOOM_IN):\n\t\t\treturn <ZoomIn16 disabled={disabled} />;\n\t\tcase (TOOLBAR_ZOOM_OUT):\n\t\t\treturn <ZoomOut16 disabled={disabled} />;\n\n\t\tcase (TOOLBAR_ZOOM_FIT):\n\t\t\treturn <SVG src={ZoomToFit} disabled={disabled} />;\n\t\tcase (TOOLBAR_ARRANGE_HORIZONALLY):\n\t\t\treturn <SVG src={ArrangeHorizontally} disabled={disabled} />;\n\t\tcase (TOOLBAR_ARRANGE_VERTICALLY):\n\t\t\treturn <SVG src={ArrangeVertically} disabled={disabled} />;\n\t\tcase (TOOLBAR_OPEN_PALETTE):\n\t\t\treturn <SVG src={PaletteOpen} disabled={disabled} />;\n\t\tcase (TOOLBAR_CLOSE_PALETTE):\n\t\t\treturn <SVG src={PaletteClose} disabled={disabled} />;\n\t\tcase (TOOLBAR_TOGGLE_NOTIFICATION_PANEL):\n\t\t\treturn <SVG src={ToggleNotificationPanel} disabled={disabled} />;\n\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tgenerateLabel(label, disable, overflow, incLabelWithIcon) {\n\t\tlet className = \"toolbar-icon-label\";\n\t\tclassName += this.generateLabelType(overflow, incLabelWithIcon);\n\t\tclassName += disable ? \" disabled\" : \"\";\n\t\treturn (<div className={className}>{label}</div>);\n\t}\n\n\tgenerateLabelType(overflow, inLabelWithIcon) {\n\t\tif (overflow) {\n\t\t\treturn \" overflow\";\n\t\t} else if (inLabelWithIcon === \"before\") {\n\t\t\treturn \" before\";\n\t\t} else if (inLabelWithIcon === \"after\") {\n\t\t\treturn \" after\";\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tgenerateIcon(actionObj) {\n\t\tlet icon = this.getDefaultIcon(actionObj);\n\n\t\t// Host application provided icon. This will override any default icon.\n\t\tif (actionObj.iconEnabled) {\n\t\t\tconst iconEnabled = actionObj.iconEnabled;\n\t\t\tconst iconDisabled = actionObj.iconDisabled || actionObj.iconEnabled;\n\t\t\tconst customIcon = actionObj.enable ? iconEnabled : iconDisabled;\n\t\t\tconst id = \"toolbar-icon-\" + this.props.instanceId + \" -\" + actionObj.action;\n\n\t\t\tif (typeof customIcon === \"string\") {\n\t\t\t\ticon = (<SVG id={id} src={customIcon} disabled={!actionObj.enable} />);\n\t\t\t} else {\n\t\t\t\ticon = customIcon;\n\t\t\t}\n\t\t}\n\n\t\tif (icon) {\n\t\t\treturn (\n\t\t\t\t<div className={\"toolbar-icon\"}>\n\t\t\t\t\t{icon}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\tclickOutside(evt) {\n\t\tif (this.state.subAreaDisplayed) {\n\t\t\tconst items = document.getElementsByClassName(this.generateActionName());\n\t\t\tconst isOver = items && items.length > 0 ? items[0].contains(evt.target) : false;\n\n\t\t\tif (!isOver) {\n\t\t\t\tthis.closeSubArea();\n\t\t\t}\n\t\t}\n\t}\n\n\topenSubArea() {\n\t\tthis.setState({ subAreaDisplayed: true });\n\t}\n\n\tcloseSubArea() {\n\t\tthis.setState({ subAreaDisplayed: false });\n\t}\n\n\tactionClickHandler(evt) {\n\t\tif (this.props.actionObj.subMenu || this.props.actionObj.subPanel) {\n\t\t\tif (this.state.showExtendedMenu) {\n\t\t\t\tdocument.removeEventListener(\"click\", this.clickOutside, false);\n\t\t\t} else {\n\t\t\t\tdocument.addEventListener(\"click\", this.clickOutside, false);\n\t\t\t}\n\n\t\t\tif (this.props.setResizeHandler) {\n\t\t\t\tif (this.state.subAreaDisplayed) {\n\t\t\t\t\tthis.props.setResizeHandler(null);\n\t\t\t\t} else {\n\t\t\t\t\tthis.props.setResizeHandler(this.closeSubArea);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!this.props.overflow) {\n\t\t\t\tthis.setState({ subAreaDisplayed: !this.state.subAreaDisplayed });\n\t\t\t}\n\t\t} else {\n\t\t\tthis.props.toolbarActionHandler(this.props.actionObj.action, evt);\n\t\t}\n\t}\n\n\tgenerateButton(actionObj) {\n\t\tlet labelBefore = null;\n\t\tlet labelAfter = null;\n\n\t\tif (this.props.overflow) {\n\t\t\tlabelAfter = this.generateLabel(actionObj.label, !actionObj.enable, true);\n\n\t\t} else if (actionObj.incLabelWithIcon === \"before\") {\n\t\t\tlabelBefore = this.generateLabel(actionObj.label, !actionObj.enable, false, actionObj.incLabelWithIcon);\n\n\t\t} else if (actionObj.incLabelWithIcon === \"after\") {\n\t\t\tlabelAfter = this.generateLabel(actionObj.label, !actionObj.enable, false, actionObj.incLabelWithIcon);\n\t\t}\n\n\t\tconst icon = this.generateIcon(actionObj);\n\t\tconst textContent = actionObj.textContent ? (<div className=\"toolbar-text-content\"> {actionObj.textContent} </div>) : null;\n\n\t\tconst itemContentClassName = classNames(\n\t\t\t\"toolbar-item-content\",\n\t\t\tactionObj.className ? actionObj.className : null,\n\t\t\t{ \"overflow\": this.props.overflow, \"disabled\": !actionObj.enable, \"default\": !actionObj.kind });\n\n\t\t// If no 'kind' is set, use ghost and then override colors using the \"default\" class in innerDivClassName.\n\t\tconst kind = actionObj.kind || \"ghost\";\n\n\t\tconst chevronIcon = this.generateChevronIcon(actionObj);\n\n\t\tlet buttonContent = (\n\t\t\t<div className={itemContentClassName}>\n\t\t\t\t{labelBefore}\n\t\t\t\t{icon}\n\t\t\t\t{labelAfter}\n\t\t\t\t{textContent}\n\t\t\t\t{chevronIcon}\n\t\t\t</div>\n\t\t);\n\n\t\tbuttonContent = this.wrapInTooltip(buttonContent);\n\n\t\t// Only specify an aria label for the button if a label is not displayed\n\t\t// with the button icon.\n\t\tconst ariaLabel = actionObj.incLabelWithIcon ? null : actionObj.label;\n\n\t\tbuttonContent = (\n\t\t\t<Button kind={kind}\n\t\t\t\tonClick={this.actionClickHandler}\n\t\t\t\tdisabled={!actionObj.enable}\n\t\t\t\tonFocus={this.props.onFocus}\n\t\t\t\taria-label={ariaLabel}\n\t\t\t\tsize={this.props.size}\n\t\t\t>\n\t\t\t\t{buttonContent}\n\t\t\t</Button>\n\t\t);\n\n\t\treturn buttonContent;\n\t}\n\n\t// Returns a chevron icon if the action icon is displaying a sub-menu or\n\t// sub-panel. The chevron will:\n\t// * point right if this action item is in a drop down menu\n\t// * point down if this action item is displayed with text in the toolbar\n\t// and the menu isn't displayed\n\t// * point up if this action item is displayed with text in the toolbar\n\t// and the menu is displayed\n\t// * be a mini-chevron (small triangle in the bottom right of icon) if this\n\t// action item isn't displayed with text.\n\tgenerateChevronIcon(actionObj) {\n\t\tif (actionObj.subMenu || actionObj.subPanel) {\n\t\t\tif (this.props.overflow) {\n\t\t\t\treturn (<ChevronRight16 />);\n\t\t\t}\n\t\t\tif (actionObj.incLabelWithIcon === \"before\" ||\n\t\t\t\t\tactionObj.incLabelWithIcon === \"after\") {\n\t\t\t\tconst chev = this.state.subAreaDisplayed ? (<ChevronUp16 />) : (<ChevronDown16 />);\n\t\t\t\treturn (<div className={\"toolbar-up-down-chevron\"}>{chev}</div>);\n\t\t\t}\n\t\t\treturn this.generateChevronMini();\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Returns an svg to display the little triangle that appears in the bottom\n\t// right corner of icons that, when clicked, show a drop down menu.\n\tgenerateChevronMini() {\n\t\tconst path = this.props.size === \"sm\" ? \"M 29 29 L 29 23 23 29 Z\" : \"M 37 37 L 37 30 30 37 Z\";\n\t\treturn (\n\t\t\t<svg className=\"toolbar-tick-svg\">\n\t\t\t\t<path d={path} className=\"toolbar-tick-mark\" />\n\t\t\t</svg>\n\t\t);\n\t}\n\n\tgenerateActionName(actionObj) {\n\t\treturn this.props.actionObj.action + \"-action\";\n\t}\n\n\twrapInTooltip(content) {\n\t\tif (!this.props.overflow && (this.showLabelAsTip(this.props.actionObj) || this.props.actionObj.tooltip)) {\n\t\t\tconst actionName = this.generateActionName();\n\t\t\tconst tip = this.props.actionObj.tooltip ? this.props.actionObj.tooltip : this.props.actionObj.label;\n\t\t\tconst tooltipId = actionName + \"-\" + this.props.instanceId + \"-tooltip\";\n\t\t\tconst enableTooltip = this.props.actionObj.enable || this.props.actionObj.jsx; // JSX 'tools' don't have enable attr so always display a tooltip for them.\n\t\t\tconst direction = this.props.tooltipDirection ? this.props.tooltipDirection : \"bottom\";\n\n\t\t\treturn (\n\t\t\t\t<Tooltip id={tooltipId} tip={tip} disable={!enableTooltip} className=\"icon-tooltip\" direction={direction}>\n\t\t\t\t\t{content}\n\t\t\t\t</Tooltip>\n\t\t\t);\n\t\t}\n\t\treturn content;\n\t}\n\n\t// Returns true if the label should be shown as a tooltip or false if not.\n\t// We do not show the label as a tooltip if it is already shown in the\n\t// toolbar next to the icon (i.e. incLabelWithIcon is set to something).\n\tshowLabelAsTip(actionObj) {\n\t\tif (actionObj.label) {\n\t\t\tif (actionObj.incLabelWithIcon === \"before\" ||\n\t\t\t\t\tactionObj.incLabelWithIcon === \"after\") {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Returns a sub-area for a cascading menu item. The sub-area can be either a\n\t// sub-panel which is a div contaiing whatever the caller passes in within the\n\t// supPanel field OR a sub-menu which is a list of options which is created\n\t// from the array of items the caller passes in the subMenu field.\n\tgenerateSubArea() {\n\t\tconst elements = document.getElementsByClassName(this.generateActionName());\n\t\tconst actionItemRect = elements && elements.length > 0 ? elements[0].getBoundingClientRect() : { top: 0, left: 0, width: 120 };\n\n\t\treturn (\n\t\t\t<ToolbarActionSubArea\n\t\t\t\tactionObj={this.props.actionObj}\n\t\t\t\tgenerateToolbarItems={this.props.generateToolbarItems}\n\t\t\t\tcloseSubArea={this.props.actionObj.closeSubAreaOnClick ? this.closeSubArea : null}\n\t\t\t\tactionItemRect={actionItemRect}\n\t\t\t\tcontainingDivId={this.props.containingDivId}\n\t\t\t\texpandDirection={this.props.overflow ? \"horizontal\" : \"vertical\" }\n\t\t\t/>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst actionObj = this.props.actionObj;\n\t\tconst actionName = this.generateActionName();\n\t\tlet divContent = null;\n\n\t\tif (actionObj.jsx) {\n\t\t\tdivContent = this.wrapInTooltip(actionObj.jsx);\n\t\t} else {\n\t\t\tdivContent = this.generateButton(actionObj);\n\t\t}\n\n\t\tconst isToolbarItem = this.props.overflow ? null : true; // null wil make data-toolbar-item be removed\n\t\tconst kindAsClass = actionObj.kind ? actionObj.kind : \"default\";\n\n\t\tconst itemClassName = classNames(\n\t\t\t{ \"toolbar-overflow-menu-item\": this.props.overflow,\n\t\t\t\t\"toolbar-item\": !this.props.overflow && !actionObj.jsx,\n\t\t\t\t\"toolbar-jsx-item\": !this.props.overflow && actionObj.jsx,\n\t\t\t\t\"toolbar-overflow-jsx-item\": this.props.overflow && actionObj.jsx,\n\t\t\t\t\"toolbar-item-selected\": actionObj.isSelected },\n\t\t\tkindAsClass,\n\t\t\tactionName);\n\n\t\tconst subArea = this.state.subAreaDisplayed ? this.generateSubArea() : null;\n\n\t\treturn (\n\t\t\t<div className={itemClassName} data-toolbar-item={isToolbarItem} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>\n\t\t\t\t{divContent}\n\t\t\t\t{subArea}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nToolbarActionItem.propTypes = {\n\tactionObj: PropTypes.shape({\n\t\taction: PropTypes.string.isRequired,\n\t\tlabel: PropTypes.oneOfType([\n\t\t\tPropTypes.string,\n\t\t\tPropTypes.object\n\t\t]),\n\t\tincLabelWithIcon: PropTypes.oneOf([\"no\", \"before\", \"after\"]),\n\t\tenable: PropTypes.bool,\n\t\ticonEnabled: PropTypes.oneOfType([\n\t\t\tPropTypes.string,\n\t\t\tPropTypes.object\n\t\t]),\n\t\ticonDisabled: PropTypes.oneOfType([\n\t\t\tPropTypes.string,\n\t\t\tPropTypes.object\n\t\t]),\n\t\tclassName: PropTypes.string,\n\t\ttextContent: PropTypes.string,\n\t\tisSelected: PropTypes.bool,\n\t\tkind: PropTypes.string,\n\t\tcloseSubAreaOnClick: PropTypes.bool,\n\t\tgetSubPanelCloseFn: PropTypes.func,\n\t\tsubMenu: PropTypes.array,\n\t\tsubPanel: PropTypes.object,\n\t\tjsx: PropTypes.object,\n\t\ttooltip: PropTypes.oneOfType([\n\t\t\tPropTypes.string,\n\t\t\tPropTypes.object,\n\t\t\tPropTypes.func\n\t\t])\n\t}),\n\ttooltipDirection: PropTypes.oneOf([\"top\", \"bottom\"]),\n\ttoolbarActionHandler: PropTypes.func.isRequired,\n\tgenerateToolbarItems: PropTypes.func.isRequired,\n\tsetResizeHandler: PropTypes.func,\n\tinstanceId: PropTypes.number.isRequired,\n\tcontainingDivId: PropTypes.string,\n\toverflow: PropTypes.bool,\n\tonFocus: PropTypes.func,\n\tsize: PropTypes.oneOf([\"md\", \"sm\"])\n};\n\nexport default ToolbarActionItem;\n","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22currentColor%22%3E%20%3Cpath%20d%3D%22M6%2C7.5h4v1H6Z%22%2F%3E%20%3Cpath%20d%3D%22M4%2C12h8a.94.94%2C0%2C0%2C0%2C1-1V5a.94.94%2C0%2C0%2C0-1-1H4A.94.94%2C0%2C0%2C0%2C3%2C5v6A.94.94%2C0%2C0%2C0%2C4%2C12ZM4%2C5h8v6H4Z%22%2F%3E%20%3Cpolygon%20points%3D%222%203.5%201%203.5%201%201%203.5%201%203.5%202%202%202%202%203.5%22%2F%3E%20%3Cpolygon%20points%3D%2215%203.5%2014%203.5%2014%202%2012.5%202%2012.5%201%2015%201%2015%203.5%22%2F%3E%20%3Cpolygon%20points%3D%2215%2015%2012.5%2015%2012.5%2014%2014%2014%2014%2012.5%2015%2012.5%2015%2015%22%2F%3E%20%3Cpolygon%20points%3D%223.5%2015%201%2015%201%2012.5%202%2012.5%202%2014%203.5%2014%203.5%2015%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%3E%3Crect%20x%3D%221.5%22%20y%3D%222%22%20width%3D%2213%22%20height%3D%221%22%2F%3E%3Crect%20x%3D%221.5%22%20y%3D%2213%22%20width%3D%2213%22%20height%3D%221%22%2F%3E%3Cpath%20d%3D%22M7%2C10.5H2a.47.47%2C0%2C0%2C1-.5-.5V6A.47.47%2C0%2C0%2C1%2C2%2C5.5H7a.47.47%2C0%2C0%2C1%2C.5.5v4A.47.47%2C0%2C0%2C1%2C7%2C10.5Zm-4.5-1h4v-3h-4Z%22%2F%3E%3Cpath%20d%3D%22M14%2C10.5H9a.47.47%2C0%2C0%2C1-.5-.5V6A.47.47%2C0%2C0%2C1%2C9%2C5.5h5a.47.47%2C0%2C0%2C1%2C.5.5v4A.47.47%2C0%2C0%2C1%2C14%2C10.5Zm-4.5-1h4v-3h-4Z%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%3E%3Crect%20x%3D%222%22%20y%3D%221.5%22%20width%3D%221%22%20height%3D%2213%22%2F%3E%3Crect%20x%3D%2213%22%20y%3D%221.5%22%20width%3D%221%22%20height%3D%2213%22%2F%3E%3Cpath%20d%3D%22M10.5%2C7.5h-5A.47.47%2C0%2C0%2C1%2C5%2C7V3a.47.47%2C0%2C0%2C1%2C.5-.5h5A.47.47%2C0%2C0%2C1%2C11%2C3V7A.47.47%2C0%2C0%2C1%2C10.5%2C7.5ZM6%2C6.5h4v-3H6Z%22%2F%3E%3Cpath%20d%3D%22M10.5%2C13.5h-5A.47.47%2C0%2C0%2C1%2C5%2C13V9a.47.47%2C0%2C0%2C1%2C.5-.5h5A.47.47%2C0%2C0%2C1%2C11%2C9v4A.47.47%2C0%2C0%2C1%2C10.5%2C13.5ZM6%2C12.5h4v-3H6Z%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22currentColor%22%3E%20%3Crect%20width%3D%2232%22%20height%3D%2232%22%20fill%3D%22none%22%2F%3E%20%3Cpath%20d%3D%22M28%2C4H4A2%2C2%2C0%2C0%2C0%2C2%2C6V26a2%2C2%2C0%2C0%2C0%2C2%2C2H28a2%2C2%2C0%2C0%2C0%2C2-2V6A2%2C2%2C0%2C0%2C0%2C28%2C4Zm0%2C22H12V17.1h8.9l-2.5%2C2.5%2C1.5%2C1.5L25%2C16l-5.1-5.1-1.5%2C1.5%2C2.5%2C2.5H12V6H28Z%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22currentColor%22%3E%20%3Crect%20width%3D%2232%22%20height%3D%2232%22%20fill%3D%22none%22%2F%3E%20%3Cpath%20d%3D%22M28%2C4H4A2%2C2%2C0%2C0%2C0%2C2%2C6V26a2%2C2%2C0%2C0%2C0%2C2%2C2H28a2%2C2%2C0%2C0%2C0%2C2-2V6A2%2C2%2C0%2C0%2C0%2C28%2C4Zm0%2C11H19.1l2.5-2.5L20.1%2C11%2C15%2C16l5.1%2C5.1%2C1.5-1.5-2.5-2.5H28V26H12V6H28Z%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22currentColor%22%3E%20%3Cpath%20d%3D%22M27%2C12V27H5V5H20V3H5A2%2C2%2C0%2C0%2C0%2C3%2C5V27a2%2C2%2C0%2C0%2C0%2C2%2C2H27a2%2C2%2C0%2C0%2C0%2C2-2V12Z%22%2F%3E%20%3Ccircle%20class%3D%22dot%22%20cx%3D%2226.5%22%20cy%3D%225.5%22%20r%3D%223.5%22%2F%3E%3C%2Fsvg%3E\"","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { genElementByClass, genRectByClass } from \"./toolbar-utils.js\";\n\nclass ToolbarOverflowMenu extends React.Component {\n\n\tcomponentDidMount() {\n\t\tif (this.props.containingDivId) {\n\t\t\tthis.setSubAreaStyle();\n\t\t}\n\t}\n\n\tsetSubAreaStyle() {\n\t\tconst containingDiv = document.getElementById(this.props.containingDivId);\n\t\tconst containingDivRect = containingDiv.getBoundingClientRect();\n\n\t\tconst mainMenu = genElementByClass(\"toolbar-popover-list\", containingDiv);\n\t\tconst mainMenuRect = genRectByClass(\"toolbar-popover-list\", containingDiv);\n\n\t\tif (mainMenuRect) {\n\t\t\tconst overflowButtonRect = genRectByClass(this.props.buttonClass, containingDiv);\n\n\t\t\tif (overflowButtonRect) {\n\t\t\t\tconst contextToolbaRect = genRectByClass(\"context-toolbar\", containingDiv);\n\n\t\t\t\tif (contextToolbaRect) {\n\t\t\t\t\tconst outsideRight = mainMenuRect.right - containingDivRect.right;\n\t\t\t\t\tif (outsideRight > 0) {\n\t\t\t\t\t\tconst overflowIconOffsetX = overflowButtonRect.left - contextToolbaRect.left;\n\t\t\t\t\t\tmainMenu.style.left = (overflowIconOffsetX - outsideRight - 2) + \"px\";\n\t\t\t\t\t}\n\n\t\t\t\t\tconst outsideBottom = mainMenuRect.bottom - containingDivRect.bottom;\n\t\t\t\t\tif (outsideBottom > 0) {\n\t\t\t\t\t\tmainMenu.style.top = -mainMenuRect.height + \"px\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tlet overflowMenu = null;\n\t\tif (this.props.menuItems.length > 0) {\n\t\t\toverflowMenu = (\n\t\t\t\t<div className={\"toolbar-popover-list\"}>\n\t\t\t\t\t{this.props.menuItems}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn overflowMenu;\n\t}\n}\n\nToolbarOverflowMenu.propTypes = {\n\tmenuItems: PropTypes.array.isRequired,\n\tcontainingDivId: PropTypes.string,\n\tbuttonClass: PropTypes.string\n};\n\nexport default ToolbarOverflowMenu;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { v4 as uuid4 } from \"uuid\";\nimport { Button } from \"carbon-components-react\";\nimport { OverflowMenuVertical16 } from \"@carbon/icons-react\";\nimport ToolbarOverflowMenu from \"./toolbar-overflow-menu.jsx\";\n\nclass ToolbarOverflowItem extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tshowExtendedMenu: false\n\t\t};\n\t\tthis.uuid = uuid4();\n\t\tthis.toggleExtendedMenu = this.toggleExtendedMenu.bind(this);\n\t\tthis.clickOutside = this.clickOutside.bind(this);\n\t}\n\n\t// We must remove the eventListener in case this class is unmounted due\n\t// to the toolbar getting redrawn.\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"click\", this.clickOutside, false);\n\t}\n\n\tgenOverflowButtonClass() {\n\t\treturn \"toolbar-spacer toolbar-index-\" + this.props.index + \" toolbar-uuid-\" + this.uuid;\n\t}\n\n\ttoggleExtendedMenu() {\n\t\tif (this.state.showExtendedMenu) {\n\t\t\tdocument.removeEventListener(\"click\", this.clickOutside, false);\n\t\t} else {\n\t\t\tdocument.addEventListener(\"click\", this.clickOutside, false);\n\t\t}\n\n\t\tif (this.props.setResizeHandler) {\n\t\t\tif (this.state.showExtendedMenu) {\n\t\t\t\tthis.props.setResizeHandler(null);\n\t\t\t} else {\n\t\t\t\tthis.props.setResizeHandler(() => {\n\t\t\t\t\tthis.setState({ showExtendedMenu: false });\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tthis.setState({ showExtendedMenu: !this.state.showExtendedMenu });\n\t}\n\n\tclickOutside(evt) {\n\t\tif (this.state.showExtendedMenu) {\n\t\t\tconst items = document.getElementsByClassName(\"toolbar-uuid-\" + this.uuid);\n\t\t\tconst isOver = items && items.length > 0 ? items[0].contains(evt.target) : false;\n\n\t\t\tif (!isOver) {\n\t\t\t\tthis.setState({ showExtendedMenu: false });\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.props.setResizeHandler && !this.state.showExtendedMenu) {\n\t\t\tthis.props.setResizeHandler(null);\n\t\t}\n\n\t\tlet overflowMenu = null;\n\t\tif (this.state.showExtendedMenu) {\n\t\t\tconst menuItems = this.props.generateExtensionMenuItems(this.props.index);\n\t\t\toverflowMenu = (\n\t\t\t\t<ToolbarOverflowMenu\n\t\t\t\t\tmenuItems={menuItems}\n\t\t\t\t\tcontainingDivId={this.props.containingDivId}\n\t\t\t\t\tbuttonClass={\"toolbar-uuid-\" + this.uuid}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div className={this.genOverflowButtonClass()} >\n\t\t\t\t<div className={\"toolbar-overflow-item\"}>\n\t\t\t\t\t<Button kind=\"ghost\"\n\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\tonClick={this.toggleExtendedMenu}\n\t\t\t\t\t\tonFocus={this.props.onFocus}\n\t\t\t\t\t\taria-label={this.props.label}\n\t\t\t\t\t\tsize={this.props.size}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"toolbar-item-content default\">\n\t\t\t\t\t\t\t<div className=\"toolbar-icon\">\n\t\t\t\t\t\t\t\t<OverflowMenuVertical16 />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t\t{overflowMenu}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nToolbarOverflowItem.propTypes = {\n\tindex: PropTypes.number.isRequired,\n\tgenerateExtensionMenuItems: PropTypes.func,\n\tsetResizeHandler: PropTypes.func,\n\tcontainingDivId: PropTypes.string,\n\tonFocus: PropTypes.func,\n\tlabel: PropTypes.string,\n\tsize: PropTypes.oneOf([\"md\", \"sm\"])\n};\n\nexport default ToolbarOverflowItem;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\nclass ToolbarDividerItem extends React.Component {\n\n\trender() {\n\t\tconst dividerClassName = this.props.overflow ? \"toolbar-divider-overflow\" : \"toolbar-divider\";\n\n\t\t// Add a space as content. When using display: inline-block the div needs\n\t\t// some content so it is displayed inline with the other elements of the\n\t\t// toolbar. With no content it is displayed above (!) the other elements.\n\t\treturn (\n\t\t\t<div className={dividerClassName} data-toolbar-item tabIndex={-1} aria-hidden >&nbsp;</div>\n\t\t);\n\t}\n}\n\nToolbarDividerItem.propTypes = {\n\toverflow: PropTypes.bool\n};\n\nexport default ToolbarDividerItem;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ReactResizeDetector from \"react-resize-detector\";\n\nimport ToolbarActionItem from \"./toolbar-action-item.jsx\";\nimport ToolbarOverflowItem from \"./toolbar-overflow-item.jsx\";\nimport ToolbarDividerItem from \"./toolbar-divider-item.jsx\";\n\nclass Toolbar extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.leftBar = [];\n\t\tthis.rightBar = [];\n\n\t\tthis.resizeHandler = null;\n\t\tthis.onFocus = this.onFocus.bind(this);\n\t\tthis.onToolbarResize = this.onToolbarResize.bind(this);\n\t\tthis.generateExtensionMenuItems = this.generateExtensionMenuItems.bind(this);\n\t\tthis.generateToolbarItems = this.generateToolbarItems.bind(this);\n\t\tthis.setResizeHandler = this.setResizeHandler.bind(this);\n\t}\n\n\t// When the toolbar is initially opened the tabindex for each element may not\n\t// be set correctly because of the time it takes to initially render the DOM.\n\t// Typically, this means the tabindex is not set correctly on whichever\n\t// overflow menu icon is displayed. Therefore, as the user moves the focus\n\t// to the first element in the toolbar (whose tabindex IS typically OK) we\n\t// set the tabindex for all elements again, this then sets the overflow\n\t// icon's tabindex correctly.\n\tonFocus() {\n\t\tthis.setLeftBarItemsTabIndex();\n\t\tthis.setRightBarItemsTabIndex();\n\t}\n\n\t// Prevents the inline-block elements of the left bar being scrolled to\n\t// reveal the wrapped elements, when the user tabs through the elements.\n\tonScroll(evt) {\n\t\tevt.currentTarget.scroll(0, 0);\n\t\tevt.preventDefault();\n\t}\n\n\t// Close the overflow menu, if it is open, when the toolbar is resized in\n\t// case a new menu needs to be displayed with the new toolbar width.\n\tonToolbarResize() {\n\t\tif (this.resizeHandler) {\n\t\t\tthis.resizeHandler();\n\t\t}\n\n\t\tthis.setLeftBarItemsTabIndex();\n\t\tthis.setRightBarItemsTabIndex();\n\t}\n\n\t// Allows the overflow item or action item to set a function that will be\n\t// called when the toolbar is resized. This function causes the menu that\n\t// is currently open to be closed.\n\tsetResizeHandler(resizeHandler) {\n\t\tthis.resizeHandler = resizeHandler;\n\t}\n\n\t// Sets the tabindex on all left bar items so tabbing works correctly. This\n\t// falls into two parts: 1. Set the tabindex for all overflow items to -1\n\t// except the overflow item that is displayed (if there is one). 2. Set the\n\t// tabindex of all hidden regular toolbar items to -1 and to 0 for all\n\t// displayed regular toolbar items.\n\t// Note: We detect the y coordinate of the 'top row' by using the top of\n\t// the first overflow icon. This is because the toolbar might be compressed\n\t// to the extent that the first overflow icon is the only item on the left\n\t// of the toolbar.\n\tsetLeftBarItemsTabIndex() {\n\t\tconst bar = this.getBar(\"left\");\n\t\tif (!bar) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst items = bar.querySelectorAll(\"[data-toolbar-item=true]\") || [];\n\t\tconst topRow = this.getTopOfFirstOverflowItem(bar);\n\t\tlet lastTopRowElement = -1;\n\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\tconst itemRect = items[i].getBoundingClientRect();\n\n\t\t\tthis.setOverflowItemButtonTabIndex(i, -1, bar);\n\n\t\t\tif (itemRect.top === topRow) {\n\t\t\t\tlastTopRowElement = i;\n\t\t\t\tthis.setToolbarItemButtonTabIndex(items[i], 0);\n\t\t\t} else {\n\t\t\t\tthis.setToolbarItemButtonTabIndex(items[i], -1);\n\t\t\t}\n\t\t}\n\n\t\tif (lastTopRowElement < items.length) {\n\t\t\tthis.setOverflowItemButtonTabIndex(lastTopRowElement + 1, 0, bar);\n\t\t}\n\t}\n\n\t// Sets the tabindex on all right bar items so tabbing works correctly. This\n\t// involves setting the tabindex of all hidden regular toolbar items to -1\n\t// and to 0 for all displayed regular toolbar items.\n\tsetRightBarItemsTabIndex() {\n\t\tconst items = this.getRightBarItems();\n\t\tlet topRow = 0;\n\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\tconst itemRect = items[i].getBoundingClientRect();\n\n\t\t\tif (i === 0) {\n\t\t\t\ttopRow = itemRect.top;\n\t\t\t}\n\n\t\t\tif (itemRect.top === topRow) {\n\t\t\t\tthis.setToolbarItemButtonTabIndex(items[i], 0);\n\t\t\t} else {\n\t\t\t\tthis.setToolbarItemButtonTabIndex(items[i], -1);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetBar(side) {\n\t\tconst id = this.props.instanceId;\n\t\tconst part = document.querySelector(`.toolbar-div[instanceid='${id}'] > .toolbar-${side}-bar`) || [];\n\t\treturn part;\n\t}\n\n\tgetRightBarItems() {\n\t\tconst bar = this.getBar(\"right\");\n\t\tif (!bar) {\n\t\t\treturn [];\n\t\t}\n\t\treturn bar.querySelectorAll(\"[data-toolbar-item=true]\") || [];\n\t}\n\n\tgetTopOfFirstOverflowItem(bar) {\n\t\tconst firstOverflowItem = this.getOverflowItem(0, bar);\n\t\tif (firstOverflowItem) {\n\t\t\tconst rect = firstOverflowItem.getBoundingClientRect();\n\t\t\treturn rect.top;\n\t\t}\n\t\treturn 0;\n\t}\n\n\tgetOverflowItem(index, bar) {\n\t\tconst overflowClassName = \"toolbar-index-\" + index;\n\t\treturn bar.getElementsByClassName(overflowClassName)[0];\n\t}\n\n\tsetToolbarItemButtonTabIndex(item, tabIndex) {\n\t\tconst button = item.querySelector(\"button\");\n\t\tif (button) {\n\t\t\tbutton.setAttribute(\"tabindex\", tabIndex);\n\t\t}\n\t}\n\n\tsetOverflowItemButtonTabIndex(index, tabIndex, bar) {\n\t\tconst overflowItem = this.getOverflowItem(index, bar);\n\t\tif (overflowItem) {\n\t\t\tconst overflowButton = overflowItem.querySelector(\"button\");\n\t\t\tif (overflowButton) {\n\t\t\t\toverflowButton.setAttribute(\"tabindex\", tabIndex);\n\t\t\t}\n\t\t}\n\t}\n\n\tgenerateToolbarItems(actionDefinitions, overflow, withSpacer) {\n\t\tconst newItems = [];\n\n\t\tfor (let i = 0; i < actionDefinitions.length; i++) {\n\t\t\tconst actionObj = actionDefinitions[i];\n\t\t\tif (actionObj) {\n\t\t\t\tif (withSpacer && !actionObj.divider) {\n\t\t\t\t\tnewItems.push(this.generateOverflowIcon(i));\n\t\t\t\t}\n\t\t\t\tnewItems.push(this.generateToolbarItem(actionObj, i, overflow));\n\t\t\t}\n\t\t}\n\t\treturn newItems;\n\t}\n\n\tgenerateToolbarItem(actionObj, i, overflow) {\n\t\tlet jsx = null;\n\t\tif (actionObj) {\n\t\t\tif (actionObj.divider) {\n\t\t\t\tjsx = (\n\t\t\t\t\t<ToolbarDividerItem\n\t\t\t\t\t\tkey={\"toolbar-item-key-\" + i}\n\t\t\t\t\t\toverflow={overflow}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tjsx = (\n\t\t\t\t\t<ToolbarActionItem\n\t\t\t\t\t\tkey={\"toolbar-item-key-\" + i}\n\t\t\t\t\t\tactionObj={actionObj}\n\t\t\t\t\t\ttooltipDirection={this.props.tooltipDirection}\n\t\t\t\t\t\ttoolbarActionHandler={this.props.toolbarActionHandler}\n\t\t\t\t\t\tgenerateToolbarItems={this.generateToolbarItems}\n\t\t\t\t\t\tsetResizeHandler={this.setResizeHandler}\n\t\t\t\t\t\toverflow={overflow}\n\t\t\t\t\t\tinstanceId={this.props.instanceId}\n\t\t\t\t\t\tcontainingDivId={this.props.containingDivId}\n\t\t\t\t\t\tonFocus={this.onFocus}\n\t\t\t\t\t\tsize={this.props.size}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn jsx;\n\t}\n\n\tgenerateOverflowIcon(index) {\n\t\tconst label = this.props.additionalText ? this.props.additionalText.overflowMenuLabel : \"\";\n\t\tconst jsx = (\n\t\t\t<ToolbarOverflowItem\n\t\t\t\tkey={\"toolbar-overflow-item-key-\" + index}\n\t\t\t\tindex={index}\n\t\t\t\tgenerateExtensionMenuItems={this.generateExtensionMenuItems}\n\t\t\t\tsetResizeHandler={this.setResizeHandler}\n\t\t\t\tcontainingDivId={this.props.containingDivId}\n\t\t\t\tonFocus={this.onFocus}\n\t\t\t\tlabel={label}\n\t\t\t\tsize={this.props.size}\n\t\t\t/>\n\t\t);\n\n\t\treturn jsx;\n\t}\n\n\t// Generates an array of action definition elements that correspond to the\n\t// hidden DOM items on the left and right of the toolbar. For any left bar\n\t// items we can use the leftIndex passed in to split the leftBar defintion\n\t// array, however for the right side we need to loop through the DOM items\n\t// and discover which is hidden and which is displayed.\n\tgenerateExtensionMenuItems(leftIndex) {\n\t\tconst rightItems = this.generateRightOverflowItems();\n\t\trightItems.reverse();\n\n\t\tconst overflowMenuBarItems = this.leftBar.slice(leftIndex).concat(rightItems);\n\t\tconst extensionItems = this.generateToolbarItems(overflowMenuBarItems, true, false);\n\t\treturn extensionItems;\n\t}\n\n\t// Generates an array of right side defintion items that correspond to\n\t// right side DOM items that are hidden.\n\tgenerateRightOverflowItems() {\n\t\tconst newDefItems = [];\n\t\tconst items = this.getRightBarItems();\n\t\tlet topRow = 0;\n\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\tconst rect = items[i].getBoundingClientRect();\n\n\t\t\tif (i === 0) {\n\t\t\t\ttopRow = rect.top;\n\t\t\t}\n\n\t\t\tif (rect.top !== topRow) {\n\t\t\t\tnewDefItems.push(this.rightBar[i]);\n\t\t\t}\n\t\t}\n\t\treturn newDefItems;\n\t}\n\n\trender() {\n\t\tthis.leftBar = this.props.config.leftBar || [];\n\t\tthis.rightBar = this.props.config.rightBar || [];\n\t\tthis.rightBar = [...this.rightBar].reverse() || [];\n\n\t\tconst leftItems = this.generateToolbarItems(this.leftBar, false, true);\n\t\tconst rightItems = this.generateToolbarItems(this.rightBar, false, false);\n\n\t\tconst toolbarSizeClass = this.props.size === \"sm\" ? \"toolbar-div toolbar-size-small\" : \"toolbar-div\";\n\t\tconst canvasToolbar = (\n\t\t\t<ReactResizeDetector handleWidth onResize={this.onToolbarResize}>\n\t\t\t\t<div className={toolbarSizeClass} instanceid={this.props.instanceId}>\n\t\t\t\t\t<div className=\"toolbar-left-bar\" onScroll={this.onScroll}>\n\t\t\t\t\t\t{leftItems}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"toolbar-right-bar\">\n\t\t\t\t\t\t{rightItems}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ReactResizeDetector>\n\t\t);\n\t\treturn canvasToolbar;\n\t}\n}\n\nToolbar.propTypes = {\n\tconfig: PropTypes.object.isRequired,\n\tinstanceId: PropTypes.number.isRequired,\n\tcontainingDivId: PropTypes.string,\n\ttoolbarActionHandler: PropTypes.func,\n\ttooltipDirection: PropTypes.string,\n\tadditionalText: PropTypes.object,\n\tsize: PropTypes.oneOf([\"md\", \"sm\"])\n};\n\nexport default Toolbar;\n"],"names":["reWhitespace","trimmedEndIndex","string","index","length","test","charAt","reTrimStart","baseTrim","slice","replace","isObject","require$$1","isSymbol","require$$2","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","toNumber_1","value","other","valueOf","isBinary","toNumber","require$$0","INFINITY","toFinite","toInteger_1","result","remainder","genElementByClass","className","containingDiv","elements","getElementsByClassName","genRectByClass","element","getBoundingClientRect","_React$Component","_inherits","ToolbarActionSubArea","_super","_createSuper","props","_this","_classCallCheck","call","onClick","bind","_assertThisInitialized","_createClass","key","this","containingDivId","adjustSubAreaPosition","closeSubArea","document","getElementById","containingDivRect","classToGet","actionObj","subPanel","thisArea","thisAreaRect","outsideBottom","bottom","outsideRight","right","expandDirection","newTop","actionItemRect","top","height","style","newLeft","left","width","generateSubAreaStyle","React","createElement","subMenu","subMenuItems","generateToolbarItems","Component","ToolbarActionItem","state","subAreaDisplayed","actionClickHandler","onMouseEnter","onMouseLeave","openSubArea","clickOutside","getSubPanelCloseFn","removeEventListener","evt","overflow","disabled","enable","action","TOOLBAR_STOP","StopFilledAlt16","TOOLBAR_RUN","Play16","TOOLBAR_EXPAND_SUPERNODE_IN_PLACE","Maximize16","TOOLBAR_COLLAPSE_SUPERNODE_IN_PLACE","Minimize16","TOOLBAR_EXPAND_SUPERNODE_FULL_PAGE","Launch16","TOOLBAR_UNDO","Undo16","TOOLBAR_REDO","Redo16","TOOLBAR_CLIPBOARD","Result16","TOOLBAR_CUT","Cut16","TOOLBAR_COPY","Copy16","TOOLBAR_PASTE","Paste16","TOOLBAR_CREATE_COMMENT","TOOLBAR_CREATE_AUTO_COMMENT","AddComment16","TOOLBAR_SHOW_COMMENTS","Chat16","TOOLBAR_HIDE_COMMENTS","ChatOff16","TOOLBAR_COLOR_BACKGROUND","ColorPalette16","TOOLBAR_DELETE_LINK","TOOLBAR_DELETE_SELECTED_OBJECTS","TrashCan16","TOOLBAR_SET_COMMENT_EDIT_MODE","TOOLBAR_SET_NODE_LABEL_EDIT","Edit16","TOOLBAR_ZOOM_IN","ZoomIn16","TOOLBAR_ZOOM_OUT","ZoomOut16","TOOLBAR_ZOOM_FIT","SVG","src","TOOLBAR_ARRANGE_HORIZONALLY","TOOLBAR_ARRANGE_VERTICALLY","TOOLBAR_OPEN_PALETTE","TOOLBAR_CLOSE_PALETTE","TOOLBAR_TOGGLE_NOTIFICATION_PANEL","label","disable","incLabelWithIcon","generateLabelType","inLabelWithIcon","icon","getDefaultIcon","iconEnabled","iconDisabled","customIcon","id","instanceId","items","generateActionName","contains","target","setState","showExtendedMenu","addEventListener","setResizeHandler","toolbarActionHandler","labelBefore","labelAfter","generateLabel","generateIcon","textContent","itemContentClassName","classNames","default","kind","chevronIcon","generateChevronIcon","buttonContent","wrapInTooltip","ariaLabel","Button","onFocus","size","ChevronRight16","chev","ChevronUp16","ChevronDown16","generateChevronMini","path","d","content","showLabelAsTip","tooltip","actionName","tip","tooltipId","enableTooltip","jsx","direction","tooltipDirection","Tooltip","closeSubAreaOnClick","divContent","generateButton","isToolbarItem","kindAsClass","itemClassName","isSelected","subArea","generateSubArea","ToolbarOverflowMenu","apply","arguments","setSubAreaStyle","mainMenu","mainMenuRect","overflowButtonRect","buttonClass","contextToolbaRect","overflowIconOffsetX","overflowMenu","menuItems","ToolbarOverflowItem","uuid","uuid4","toggleExtendedMenu","_this2","generateExtensionMenuItems","genOverflowButtonClass","tabIndex","OverflowMenuVertical16","ToolbarDividerItem","dividerClassName","Toolbar","leftBar","rightBar","resizeHandler","onToolbarResize","setLeftBarItemsTabIndex","setRightBarItemsTabIndex","currentTarget","scroll","preventDefault","bar","getBar","querySelectorAll","topRow","getTopOfFirstOverflowItem","lastTopRowElement","i","itemRect","setOverflowItemButtonTabIndex","setToolbarItemButtonTabIndex","getRightBarItems","side","querySelector","concat","firstOverflowItem","getOverflowItem","overflowClassName","item","button","setAttribute","overflowItem","overflowButton","actionDefinitions","withSpacer","newItems","divider","push","generateOverflowIcon","generateToolbarItem","additionalText","overflowMenuLabel","leftIndex","rightItems","generateRightOverflowItems","reverse","overflowMenuBarItems","newDefItems","rect","config","_toConsumableArray","leftItems","toolbarSizeClass","ReactResizeDetector","handleWidth","onResize","instanceid","onScroll"],"mappings":"ukBACIA,EAAe,SCDfC,EDWJ,SAAyBC,GAGvB,IAFA,IAAIC,EAAQD,EAAOE,OAEZD,KAAWH,EAAaK,KAAKH,EAAOI,OAAOH,MAClD,OAAOA,CACT,ECbII,EAAc,WCHdC,EDYJ,SAAkBN,GAChB,OAAOA,EACHA,EAAOO,MAAM,EAAGR,EAAgBC,GAAU,GAAGQ,QAAQH,EAAa,IAClEL,CACN,ECfIS,EAAWC,aACXC,EAAWC,aAMXC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAeC,aA8CnBC,EArBA,SAAkBC,GAChB,GAAoB,iBAATA,EACT,OAAOA,EAET,GAAIR,EAASQ,GACX,OA1CM,IA4CR,GAAIV,EAASU,GAAQ,CACnB,IAAIC,EAAgC,mBAAjBD,EAAME,QAAwBF,EAAME,UAAYF,EACnEA,EAAQV,EAASW,GAAUA,EAAQ,GAAMA,EAE3C,GAAoB,iBAATD,EACT,OAAiB,IAAVA,EAAcA,GAASA,EAEhCA,EAAQb,EAASa,GACjB,IAAIG,EAAWR,EAAWX,KAAKgB,GAC/B,OAAQG,GAAYP,EAAUZ,KAA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0",
4
4
  "description": "Elyra common-canvas",
5
5
  "main": "dist/common-canvas.js",
6
6
  "module": "dist/common-canvas.es.js",
@@ -105,8 +105,8 @@
105
105
  "carbon-components": "^10.50.0",
106
106
  "carbon-components-react": "^7.50.0",
107
107
  "carbon-icons": "^7.0.7",
108
- "react": "^16.0.0 || ^18.0.0",
109
- "react-dom": "^16.0.0 || ^18.0.0",
108
+ "react": "^16.0.0 || ^17.0.0 || ^18.0.0",
109
+ "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0",
110
110
  "react-intl": "^5.0.0",
111
111
  "react-redux": "^7.0.0"
112
112
  },
@@ -17,6 +17,8 @@
17
17
  import React from "react";
18
18
  import { connect } from "react-redux";
19
19
  import PropTypes from "prop-types";
20
+ import Palette from "../palette/palette.jsx";
21
+ import CommonCanvasTooltip from "./cc-tooltip.jsx";
20
22
  import CanvasContents from "./cc-contents.jsx";
21
23
  import CommonCanvasToolbar from "./cc-toolbar.jsx";
22
24
  import CommonCanvasRightFlyout from "./cc-right-flyout.jsx";
@@ -31,42 +33,84 @@ class CommonCanvasCentralItems extends React.Component {
31
33
  this.logger = new Logger("CC-CentralItems");
32
34
  }
33
35
 
36
+ // Prevent the default behavior (which is to show a plus-sign pointer) as
37
+ // an object is being dragged over the common canvas components.
38
+ // Note: this is overriden by the canvas area itself to allow external objects
39
+ // to be dragged over it.
40
+ onDragOver(evt) {
41
+ evt.preventDefault();
42
+ }
43
+
44
+ // Prevent an object being dropped on the common canvas causing a file
45
+ // download event (which is the default!). Note: this is overriden by the
46
+ // canvas area itself to allow external objects to be dropped on it.
47
+ onDrop(evt) {
48
+ evt.preventDefault();
49
+ }
50
+
51
+ generateClass() {
52
+ let className = "common-canvas";
53
+
54
+ className += (
55
+ !this.props.enableEditingActions
56
+ ? " config-editing-actions-false"
57
+ : "");
58
+
59
+ className += (
60
+ this.props.enableParentClass
61
+ ? " " + this.props.enableParentClass
62
+ : "");
63
+
64
+ return className;
65
+ }
66
+
34
67
  render() {
35
68
  this.logger.log("render");
36
69
 
70
+ const tip = (<CommonCanvasTooltip canvasController={this.props.canvasController} />);
71
+ const palette = (<Palette canvasController={this.props.canvasController} containingDivId={this.props.containingDivId} />);
37
72
  const rightFlyout = (<CommonCanvasRightFlyout />);
38
73
  const canvasToolbar = (<CommonCanvasToolbar canvasController={this.props.canvasController} />);
39
- const notificationPanel = (<NotificationPanel canvasController={this.props.canvasController} />);
40
74
  const canvasContents = (<CanvasContents canvasController={this.props.canvasController} />);
41
75
  const bottomPanel = (<CanvasBottomPanel canvasController={this.props.canvasController} containingDivId={this.props.containingDivId} />);
42
76
  const topPanel = (<CanvasTopPanel canvasController={this.props.canvasController} containingDivId={this.props.containingDivId} />);
77
+ const notificationPanel = (<NotificationPanel canvasController={this.props.canvasController} />);
43
78
 
44
- let centralItems = null;
79
+ let rightSideItems = null;
45
80
  if (this.props.enableRightFlyoutUnderToolbar) {
46
- centralItems = (
47
- <div className="common-canvas-right-side-items-under-toolbar">
81
+ const templateRows = this.props.toolbarIsOpen ? "auto 1fr" : "1fr";
82
+ const templateCols = this.props.rightFlyoutIsOpen ? "1fr auto" : "1fr";
83
+ let templateRows2 = this.props.topPanelIsOpen ? "auto 1fr" : "1fr";
84
+ templateRows2 += this.props.bottomPanelIsOpen ? " auto" : "";
85
+
86
+ rightSideItems = (
87
+ <div className="common-canvas-right-side-items-under-toolbar" style={{ gridTemplateRows: templateRows }}>
48
88
  {canvasToolbar}
49
- <div id={this.props.containingDivId} className="common-canvas-items-container-under-toolbar">
50
- <div className="common-canvas-with-bottom-panel">
51
- {canvasContents}
89
+ <div id={this.props.containingDivId} className="common-canvas-items-container-under-toolbar" style={{ gridTemplateColumns: templateCols }}>
90
+ <div className="common-canvas-with-top-and-bottom-panel" style={{ gridTemplateRows: templateRows2 }}>
52
91
  {topPanel}
92
+ {canvasContents}
53
93
  {bottomPanel}
54
94
  </div>
55
- <div>
56
- {rightFlyout}
57
- </div>
58
- {notificationPanel}
95
+ {rightFlyout}
59
96
  </div>
97
+ {notificationPanel}
60
98
  </div>
61
99
  );
62
100
 
63
101
  } else {
64
- centralItems = (
102
+ let templateRows = "";
103
+ templateRows += this.props.toolbarIsOpen ? "auto" : "";
104
+ templateRows += this.props.topPanelIsOpen ? " auto" : "";
105
+ templateRows += " 1fr"; // For canvas contents
106
+ templateRows += this.props.bottomPanelIsOpen ? " auto" : "";
107
+
108
+ rightSideItems = (
65
109
  <div className="common-canvas-right-side-items">
66
- <div id={this.props.containingDivId} className="common-canvas-items-container">
110
+ <div id={this.props.containingDivId} className="common-canvas-items-container" style={{ gridTemplateRows: templateRows }}>
67
111
  {canvasToolbar}
68
- {canvasContents}
69
112
  {topPanel}
113
+ {canvasContents}
70
114
  {bottomPanel}
71
115
  {notificationPanel}
72
116
  </div>
@@ -75,7 +119,15 @@ class CommonCanvasCentralItems extends React.Component {
75
119
  );
76
120
  }
77
121
 
78
- return centralItems;
122
+ const divClassName = this.generateClass();
123
+
124
+ return (
125
+ <div className={divClassName} onDragOver={this.onDragOver} onDrop={this.onDrop}>
126
+ {palette}
127
+ {rightSideItems}
128
+ {tip}
129
+ </div>
130
+ );
79
131
  }
80
132
  }
81
133
 
@@ -85,11 +137,23 @@ CommonCanvasCentralItems.propTypes = {
85
137
  containingDivId: PropTypes.string.isRequired,
86
138
 
87
139
  // Provided by Redux
88
- enableRightFlyoutUnderToolbar: PropTypes.bool
140
+ enableParentClass: PropTypes.string,
141
+ enableEditingActions: PropTypes.bool,
142
+ enableRightFlyoutUnderToolbar: PropTypes.bool,
143
+ toolbarIsOpen: PropTypes.bool,
144
+ topPanelIsOpen: PropTypes.bool,
145
+ bottomPanelIsOpen: PropTypes.bool,
146
+ rightFlyoutIsOpen: PropTypes.bool
89
147
  };
90
148
 
91
149
  const mapStateToProps = (state, ownProps) => ({
92
- enableRightFlyoutUnderToolbar: state.canvasconfig.enableRightFlyoutUnderToolbar
150
+ enableParentClass: state.canvasconfig.enableParentClass,
151
+ enableEditingActions: state.canvasconfig.enableEditingActions,
152
+ enableRightFlyoutUnderToolbar: state.canvasconfig.enableRightFlyoutUnderToolbar,
153
+ toolbarIsOpen: (state.canvasconfig.enableToolbarLayout !== "None"),
154
+ topPanelIsOpen: state.toppanel.isOpen,
155
+ bottomPanelIsOpen: state.bottompanel.isOpen,
156
+ rightFlyoutIsOpen: state.rightflyout.isOpen
93
157
  });
94
158
 
95
159
  export default connect(mapStateToProps)(CommonCanvasCentralItems);
@@ -536,39 +536,23 @@ class CanvasContents extends React.Component {
536
536
  const dropZoneCanvas = this.getDropZone();
537
537
  const svgCanvasDiv = this.getSVGCanvasDiv();
538
538
 
539
- const mainClassName = this.props.canvasConfig.enableRightFlyoutUnderToolbar
540
- ? "common-canvas-main"
541
- : null;
542
-
543
- let dropDivClassName = this.props.canvasConfig.enableRightFlyoutUnderToolbar
544
- ? "common-canvas-drop-div-under-toolbar"
545
- : "common-canvas-drop-div";
546
-
547
- dropDivClassName = this.props.canvasConfig.enableToolbarLayout === "None"
548
- ? dropDivClassName + " common-canvas-toolbar-none"
549
- : dropDivClassName;
550
-
551
- dropDivClassName = this.props.bottomPanelIsOpen
552
- ? dropDivClassName + " common-canvas-bottom-panel-is-open"
553
- : dropDivClassName;
554
-
555
539
  return (
556
- <main aria-label={this.getLabel("canvas.label")} role="main" className={mainClassName}>
540
+ <main aria-label={this.getLabel("canvas.label")} role="main">
557
541
  <ReactResizeDetector handleWidth handleHeight onResize={this.refreshOnSizeChange}>
558
542
  <div
559
543
  id={this.mainCanvasDivId}
560
- className={dropDivClassName}
544
+ className="common-canvas-drop-div"
561
545
  onDrop={this.drop}
562
546
  onDragOver={this.dragOver}
563
547
  onDragEnter={this.dragEnter}
564
548
  onDragLeave={this.dragLeave}
565
549
  >
550
+ {stateTag}
566
551
  {emptyCanvas}
567
552
  {svgCanvasDiv}
568
553
  {contextMenu}
569
554
  {textToolbar}
570
555
  {dropZoneCanvas}
571
- {stateTag}
572
556
  </div>
573
557
  </ReactResizeDetector>
574
558
  </main>
@@ -28,7 +28,7 @@ class CommonCanvasRightFlyout extends React.Component {
28
28
  render() {
29
29
  this.logger.log("render");
30
30
 
31
- let rightFlyout = (<div className="right-flyout-panel" />);
31
+ let rightFlyout = null;
32
32
 
33
33
  if (this.props.content && this.props.isOpen) {
34
34
  const rfClass = this.props.enableRightFlyoutUnderToolbar
@@ -18,8 +18,6 @@ import React from "react";
18
18
  import { Provider } from "react-redux";
19
19
  import { injectIntl } from "react-intl";
20
20
  import PropTypes from "prop-types";
21
- import Palette from "../palette/palette.jsx";
22
- import CommonCanvasTooltip from "./cc-tooltip.jsx";
23
21
  import CommonCanvasCentralItems from "./cc-central-items.jsx";
24
22
  import Logger from "../logging/canvas-logger.js";
25
23
 
@@ -43,21 +41,6 @@ class CommonCanvas extends React.Component {
43
41
  this.initializeController(this.props);
44
42
  }
45
43
 
46
- // Prevent the default behavior (which is to show a plus-sign pointer) as
47
- // an object is being dragged over the common canvas components.
48
- // Note: this is overriden by the canvas area itself to allow external objects
49
- // to be dragged over it.
50
- onDragOver(evt) {
51
- evt.preventDefault();
52
- }
53
-
54
- // Prevent an object being dropped on the common canvas causing a file
55
- // download event (which is the default!). Note: this is overriden by the
56
- // canvas area itself to allow external objects to be dropped on it.
57
- onDrop(evt) {
58
- evt.preventDefault();
59
- }
60
-
61
44
  initializeController(props) {
62
45
  this.logger.logStartTimer("initializeController");
63
46
  props.canvasController.setCanvasConfig(props.config);
@@ -87,44 +70,12 @@ class CommonCanvas extends React.Component {
87
70
  this.logger.logEndTimer("initializeController");
88
71
  }
89
72
 
90
- generateClass() {
91
- let className = "common-canvas";
92
-
93
- className += (
94
- !this.isEditingAllowed()
95
- ? " config-editing-actions-false"
96
- : "");
97
-
98
- className += (
99
- this.props.config && this.props.config.enableParentClass
100
- ? " " + this.props.config.enableParentClass
101
- : "");
102
-
103
- return className;
104
- }
105
-
106
- isEditingAllowed() {
107
- return this.props.config &&
108
- (typeof this.props.config.enableEditingActions === "undefined" ||
109
- this.props.config.enableEditingActions === true);
110
- }
111
-
112
73
  render() {
113
74
  this.logger.log("render");
114
75
 
115
- const tip = (<CommonCanvasTooltip canvasController={this.props.canvasController} />);
116
- const palette = (<Palette canvasController={this.props.canvasController} containingDivId={this.containingDivId} />);
117
- const centralItems = (<CommonCanvasCentralItems canvasController={this.props.canvasController} containingDivId={this.containingDivId} />);
118
-
119
- const className = this.generateClass();
120
-
121
76
  return (
122
77
  <Provider store={this.props.canvasController.getStore()}>
123
- <div className={className} onDragOver={this.onDragOver} onDrop={this.onDrop}>
124
- {palette}
125
- {centralItems}
126
- {tip}
127
- </div>
78
+ <CommonCanvasCentralItems canvasController={this.props.canvasController} containingDivId={this.containingDivId} />
128
79
  </Provider>
129
80
  );
130
81
  }
@@ -40,6 +40,9 @@ $panel-border-color: $ui-03;
40
40
  height: 100%;
41
41
  position: relative;
42
42
  width: 100%;
43
+ display: grid;
44
+ grid-template-columns: 1fr;
45
+ /* grid-template-rows is set dynamically in cc-central-items */
43
46
  }
44
47
 
45
48
  .common-canvas-right-side-items {
@@ -47,37 +50,14 @@ $panel-border-color: $ui-03;
47
50
  display: flex;
48
51
  }
49
52
 
50
- .common-canvas-main {
51
- width: 100%;
52
- height: 100%;
53
- }
54
-
55
- .common-canvas-with-bottom-panel {
56
- width: 100%;
57
- position: relative;
58
-
59
- .top-panel {
60
- top: 0;
61
- }
62
- }
63
-
64
53
  .common-canvas-drop-div {
65
- height: calc(100% - #{$toolbar-button-height});
54
+ height: 100%;
66
55
  width: 100%;
67
56
  min-width: inherit;
68
- position: absolute;
69
57
  cursor: default;
70
- top: $toolbar-button-height;
71
58
  overflow: hidden;
59
+ position: relative; // This allows the State Tag to have positio: absolute
72
60
 
73
- &.common-canvas-toolbar-none {
74
- height: 100%;
75
- top: 0;
76
- }
77
-
78
- &.common-canvas-toolbar-none.common-canvas-bottom-panel-is-open {
79
- top: 0;
80
- }
81
61
  }
82
62
 
83
63
  .right-flyout-panel {
@@ -90,11 +70,11 @@ $panel-border-color: $ui-03;
90
70
  .bottom-panel {
91
71
  display: flex;
92
72
  flex-direction: column;
93
- position: absolute;
94
- left: 0;
95
- right: 0;
96
- bottom: 0;
97
73
  border-top: $panel-border-width solid $panel-border-color;
74
+ // Make sure the bottom panel appear above the empty canvas content
75
+ // (when displayed) in the flow editor div.
76
+ z-index: 1;
77
+
98
78
  }
99
79
 
100
80
  .bottom-panel-drag {
@@ -119,15 +99,7 @@ $panel-border-color: $ui-03;
119
99
  .top-panel {
120
100
  display: flex;
121
101
  flex-direction: column;
122
- position: absolute;
123
- left: 0;
124
- right: 0;
125
- top: $toolbar-button-height;
126
102
  border-bottom: $panel-border-width solid $panel-border-color;
127
-
128
- &.common-canvas-toolbar-none {
129
- top: 0;
130
- }
131
103
  }
132
104
 
133
105
  .common-canvas-toolbar {
@@ -208,23 +180,28 @@ $panel-border-color: $ui-03;
208
180
  * enableRightFlyoutUnderToolbar is true. */
209
181
 
210
182
  .common-canvas-right-side-items-under-toolbar {
183
+ display: grid;
184
+ /* grid-template-rows is set dynamically in cc-central-items */
185
+ grid-template-columns: 1fr;
211
186
  width: 100%;
212
187
  }
213
188
 
214
189
  .common-canvas-items-container-under-toolbar {
215
- height: calc(100% - #{$toolbar-button-height});
190
+ height: 100%;
216
191
  width: 100%;
217
- display: flex;
192
+ display: grid;
193
+ grid-template-rows: 1fr auto;
194
+ /* grid-template-columns is set dynamically in cc-central-items */
218
195
  }
219
196
 
220
- .common-canvas-drop-div-under-toolbar {
221
- height: 100%;
197
+ .common-canvas-with-top-and-bottom-panel {
222
198
  width: 100%;
223
- position: relative; // Needed to allow textarea (for commnt editing) to be positiond OK.
224
- cursor: default;
225
- overflow: hidden;
199
+ display: grid;
200
+ /* grid-template-rows is set dynamically in cc-central-items */
201
+ grid-template-columns: 1fr;
226
202
  }
227
203
 
204
+
228
205
  /* Styles for empty canvas objects */
229
206
 
230
207
  .empty-canvas {
@@ -310,8 +287,9 @@ $panel-border-color: $ui-03;
310
287
  @include carbon--type-style("productive-heading-01");
311
288
  color: $inverse-01;
312
289
  background-color: $background-inverse;
290
+ width: fit-content;
313
291
  height: 40px;
314
- position: absolute;
292
+ position: absolute; /* Positioned relative to the common-canvas-drop-div */
315
293
  left: 50%;
316
294
  top: 16px;
317
295
  transform: translate(-50%, 0%);
@@ -72,7 +72,8 @@ export default class SVGCanvasD3 {
72
72
  this.logger.logStartTimer("set canvas info");
73
73
 
74
74
  this.canvasInfo = this.cloneCanvasInfo(canvasInfo);
75
- this.renderer.setCanvasInfoRenderer(this.canvasInfo, selectionInfo, breadcrumbs, nodeLayout, canvasLayout);
75
+ this.config = this.cloneConfig(config);
76
+ this.renderer.setCanvasInfoRenderer(this.canvasInfo, selectionInfo, breadcrumbs, nodeLayout, canvasLayout, this.config);
76
77
 
77
78
  this.logger.logEndTimer("set canvas info", true);
78
79
  }