@elyra/canvas 12.38.0 → 12.39.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 (98) hide show
  1. package/dist/{_baseIteratee-7fb1949c.js → _baseIteratee-64ab55d0.js} +1 -1
  2. package/dist/{_baseIteratee-7fb1949c.js.map → _baseIteratee-64ab55d0.js.map} +1 -1
  3. package/dist/{_baseIteratee-84bbd39d.js → _baseIteratee-82d2e94c.js} +1 -1
  4. package/dist/{_baseIteratee-84bbd39d.js.map → _baseIteratee-82d2e94c.js.map} +1 -1
  5. package/dist/{canvas-constants-f4219d26.js → canvas-constants-45f5f039.js} +2 -2
  6. package/dist/{canvas-constants-f4219d26.js.map → canvas-constants-45f5f039.js.map} +1 -1
  7. package/dist/{canvas-constants-766c12a9.js → canvas-constants-be5521b9.js} +2 -2
  8. package/dist/{canvas-constants-766c12a9.js.map → canvas-constants-be5521b9.js.map} +1 -1
  9. package/dist/{canvas-controller-76f68572.js → canvas-controller-ad1c218a.js} +2 -2
  10. package/dist/{canvas-controller-62b66fc8.js.map → canvas-controller-ad1c218a.js.map} +1 -1
  11. package/dist/{canvas-controller-62b66fc8.js → canvas-controller-c8b0d574.js} +2 -2
  12. package/dist/{canvas-controller-76f68572.js.map → canvas-controller-c8b0d574.js.map} +1 -1
  13. package/dist/{canvas-logger-34ca361a.js → canvas-logger-295dafe4.js} +2 -2
  14. package/dist/{canvas-logger-34ca361a.js.map → canvas-logger-295dafe4.js.map} +1 -1
  15. package/dist/{canvas-logger-fec87cd1.js → canvas-logger-e07a0b4a.js} +2 -2
  16. package/dist/{canvas-logger-fec87cd1.js.map → canvas-logger-e07a0b4a.js.map} +1 -1
  17. package/dist/common-canvas-891b7b38.js +2 -0
  18. package/dist/common-canvas-891b7b38.js.map +1 -0
  19. package/dist/common-canvas-c16aeb7c.js +2 -0
  20. package/dist/common-canvas-c16aeb7c.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-9cfe3daa.js +2 -0
  24. package/dist/common-properties-9cfe3daa.js.map +1 -0
  25. package/dist/common-properties-bbe82be2.js +2 -0
  26. package/dist/common-properties-bbe82be2.js.map +1 -0
  27. package/dist/{context-menu-wrapper-ab018d6e.js → context-menu-wrapper-4dc8d351.js} +2 -2
  28. package/dist/{context-menu-wrapper-ab018d6e.js.map → context-menu-wrapper-4dc8d351.js.map} +1 -1
  29. package/dist/{context-menu-wrapper-624a1e7c.js → context-menu-wrapper-5b795ee5.js} +2 -2
  30. package/dist/{context-menu-wrapper-624a1e7c.js.map → context-menu-wrapper-5b795ee5.js.map} +1 -1
  31. package/dist/createClass-440000a3.js +2 -0
  32. package/dist/createClass-440000a3.js.map +1 -0
  33. package/dist/createClass-5ca26865.js +2 -0
  34. package/dist/createClass-5ca26865.js.map +1 -0
  35. package/dist/{datarecord-metadata-v3-schema-c2ad8862.js → datarecord-metadata-v3-schema-618b308b.js} +2 -2
  36. package/dist/{datarecord-metadata-v3-schema-c2ad8862.js.map → datarecord-metadata-v3-schema-618b308b.js.map} +1 -1
  37. package/dist/{datarecord-metadata-v3-schema-1f21696a.js → datarecord-metadata-v3-schema-ee0f5c4c.js} +2 -2
  38. package/dist/{datarecord-metadata-v3-schema-1f21696a.js.map → datarecord-metadata-v3-schema-ee0f5c4c.js.map} +1 -1
  39. package/dist/{flexible-table-4cf19e2e.js → flexible-table-41beff38.js} +2 -2
  40. package/dist/{flexible-table-4cf19e2e.js.map → flexible-table-41beff38.js.map} +1 -1
  41. package/dist/{flexible-table-8d10f5c9.js → flexible-table-52f85f0b.js} +2 -2
  42. package/dist/{flexible-table-8d10f5c9.js.map → flexible-table-52f85f0b.js.map} +1 -1
  43. package/dist/{getPrototypeOf-012c454b.js → getPrototypeOf-11f2726a.js} +2 -2
  44. package/dist/{getPrototypeOf-012c454b.js.map → getPrototypeOf-11f2726a.js.map} +1 -1
  45. package/dist/{getPrototypeOf-5f227292.js → getPrototypeOf-d346567e.js} +2 -2
  46. package/dist/{getPrototypeOf-5f227292.js.map → getPrototypeOf-d346567e.js.map} +1 -1
  47. package/dist/{icon-8433d369.js → icon-630b5bba.js} +2 -2
  48. package/dist/{icon-8433d369.js.map → icon-630b5bba.js.map} +1 -1
  49. package/dist/{icon-5e06bfe1.js → icon-86ee98d5.js} +2 -2
  50. package/dist/{icon-5e06bfe1.js.map → icon-86ee98d5.js.map} +1 -1
  51. package/dist/{index-2a61be58.js → index-11b62489.js} +2 -2
  52. package/dist/{index-2a61be58.js.map → index-11b62489.js.map} +1 -1
  53. package/dist/{index-9a355ed6.js → index-7bf8508e.js} +2 -2
  54. package/dist/{index-9a355ed6.js.map → index-7bf8508e.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-76733735.js → toolbar-b1b9f37d.js} +2 -2
  74. package/dist/{toolbar-76733735.js.map → toolbar-b1b9f37d.js.map} +1 -1
  75. package/dist/{toolbar-85e1e463.js → toolbar-d69430a2.js} +2 -2
  76. package/dist/{toolbar-85e1e463.js.map → toolbar-d69430a2.js.map} +1 -1
  77. package/package.json +1 -1
  78. package/src/common-canvas/canvas-controller.js +14 -0
  79. package/src/common-canvas/svg-canvas-d3.js +4 -0
  80. package/src/common-canvas/svg-canvas-renderer.js +4 -0
  81. package/src/common-canvas/svg-canvas-utils-drag-new-link.js +1 -1
  82. package/src/common-properties/components/editor-form/editor-form.jsx +3 -1
  83. package/src/common-properties/components/flexible-table/flexible-table.scss +0 -3
  84. package/src/common-properties/properties-controller.js +12 -3
  85. package/src/common-properties/properties-main/properties-main.jsx +3 -0
  86. package/stats.html +1 -1
  87. package/dist/common-canvas-9be06eb4.js +0 -2
  88. package/dist/common-canvas-9be06eb4.js.map +0 -1
  89. package/dist/common-canvas-e201c174.js +0 -2
  90. package/dist/common-canvas-e201c174.js.map +0 -1
  91. package/dist/common-properties-7ad71160.js +0 -2
  92. package/dist/common-properties-7ad71160.js.map +0 -1
  93. package/dist/common-properties-f1c69af7.js +0 -2
  94. package/dist/common-properties-f1c69af7.js.map +0 -1
  95. package/dist/createClass-09bc08f7.js +0 -2
  96. package/dist/createClass-09bc08f7.js.map +0 -1
  97. package/dist/createClass-ffbbe837.js +0 -2
  98. package/dist/createClass-ffbbe837.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar-85e1e463.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":"knCACA,IAAIA,GAAe,SCDfC,GDWJ,SAAyBC,GAGvB,IAFA,IAAIC,EAAQD,EAAOE,OAEZD,KAAWH,GAAaK,KAAKH,EAAOI,OAAOH,MAClD,OAAOA,CACT,ECbII,GAAc,WCHdC,GDYJ,SAAkBN,GAChB,OAAOA,EACHA,EAAOO,MAAM,EAAGR,GAAgBC,GAAU,GAAGQ,QAAQH,GAAa,IAClEL,CACN,ECfIS,GAAWC,EACXC,GAAWC,EAMXC,GAAa,qBAGbC,GAAa,aAGbC,GAAY,cAGZC,GAAeC,aA8CnBC,GArBA,SAAkBC,GAChB,GAAoB,iBAATA,EACT,OAAOA,EAET,GAAIR,GAASQ,GACX,OA1CM,IA4CR,GAAIV,GAASU,GAAQ,CACnB,IAAIC,EAAgC,mBAAjBD,EAAME,QAAwBF,EAAME,UAAYF,EACnEA,EAAQV,GAASW,GAAUA,EAAQ,GAAMA,EAE3C,GAAoB,iBAATD,EACT,OAAiB,IAAVA,EAAcA,GAASA,EAEhCA,EAAQb,GAASa,GACjB,IAAIG,EAAWR,GAAWX,KAAKgB,GAC/B,OAAQG,GAAYP,GAAUZ,KAAKgB,GAC/BH,GAAaG,EAAMZ,MAAM,GAAIe,EAAW,EAAI,GAC3CT,GAAWV,KAAKgB,GAvDb,KAuD6BA,CACvC,EC7DII,GAAWC,GAGXC,GAAW,QCHXC,GD6BJ,SAAkBP,GAChB,OAAKA,GAGLA,EAAQI,GAASJ,MACHM,IAAYN,KAAU,IA9BpB,uBA+BFA,EAAQ,GAAK,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EAEJG,EAAI,EAAGA,EAAI5F,EAAM9J,OAAQ0P,IAAK,CACtC,IAAM+B,EAAO3H,EAAM4F,GAAGvN,wBAEZ,IAANuN,IACHH,EAASkC,EAAKpN,KAGXoN,EAAKpN,MAAQkL,GAChBiC,EAAYV,KAAK5N,KAAK0L,SAASc,IAGjC,OAAO8B,KACPvO,aAAAhC,MAED,WACCiC,KAAKyL,QAAUzL,KAAKT,MAAMiP,OAAO/C,SAAW,GAC5CzL,KAAK0L,SAAW1L,KAAKT,MAAMiP,OAAO9C,UAAY,GAC9C1L,KAAK0L,SAAW+C,EAAIzO,KAAK0L,UAAU0C,WAAa,GAEhD,IAAMM,EAAY1O,KAAK8B,qBAAqB9B,KAAKyL,SAAS,GAAO,GAC3DyC,EAAalO,KAAK8B,qBAAqB9B,KAAK0L,UAAU,GAAO,GAE7DiD,EAAuC,OAApB3O,KAAKT,MAAM8I,KAAgB,iCAAmC,cAavF,OAXC3G,EAAAC,cAACiN,GAAoBC,eAAYC,SAAU9O,KAAK4L,iBAC/ClK,EAAAC,qBAAKhD,UAAWgQ,EAAkBI,WAAY/O,KAAKT,MAAMoH,YACxDjF,EAAAC,qBAAKhD,UAAU,mBAAmBqQ,SAAUhP,KAAKgP,UAC/CN,GAEFhN,EAAAC,qBAAKhD,UAAU,qBACbuP,SAML1C,CAAA,EArRoB9J,EAAMK"}
1
+ {"version":3,"file":"toolbar-d69430a2.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":"knCACA,IAAIA,GAAe,SCDfC,GDWJ,SAAyBC,GAGvB,IAFA,IAAIC,EAAQD,EAAOE,OAEZD,KAAWH,GAAaK,KAAKH,EAAOI,OAAOH,MAClD,OAAOA,CACT,ECbII,GAAc,WCHdC,GDYJ,SAAkBN,GAChB,OAAOA,EACHA,EAAOO,MAAM,EAAGR,GAAgBC,GAAU,GAAGQ,QAAQH,GAAa,IAClEL,CACN,ECfIS,GAAWC,EACXC,GAAWC,EAMXC,GAAa,qBAGbC,GAAa,aAGbC,GAAY,cAGZC,GAAeC,aA8CnBC,GArBA,SAAkBC,GAChB,GAAoB,iBAATA,EACT,OAAOA,EAET,GAAIR,GAASQ,GACX,OA1CM,IA4CR,GAAIV,GAASU,GAAQ,CACnB,IAAIC,EAAgC,mBAAjBD,EAAME,QAAwBF,EAAME,UAAYF,EACnEA,EAAQV,GAASW,GAAUA,EAAQ,GAAMA,EAE3C,GAAoB,iBAATD,EACT,OAAiB,IAAVA,EAAcA,GAASA,EAEhCA,EAAQb,GAASa,GACjB,IAAIG,EAAWR,GAAWX,KAAKgB,GAC/B,OAAQG,GAAYP,GAAUZ,KAAKgB,GAC/BH,GAAaG,EAAMZ,MAAM,GAAIe,EAAW,EAAI,GAC3CT,GAAWV,KAAKgB,GAvDb,KAuD6BA,CACvC,EC7DII,GAAW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O,KAAK8B,qBAAqBuM,GAAsB,GAAM,MAK9EtO,iCAAAhC,MACA,WAKC,IAJA,IAAMuQ,EAAc,GACd1H,EAAQ5G,KAAK4M,mBACfP,EAAS,EAEJG,EAAI,EAAGA,EAAI5F,EAAM9J,OAAQ0P,IAAK,CACtC,IAAM+B,EAAO3H,EAAM4F,GAAGvN,wBAEZ,IAANuN,IACHH,EAASkC,EAAKpN,KAGXoN,EAAKpN,MAAQkL,GAChBiC,EAAYV,KAAK5N,KAAK0L,SAASc,IAGjC,OAAO8B,KACPvO,aAAAhC,MAED,WACCiC,KAAKyL,QAAUzL,KAAKT,MAAMiP,OAAO/C,SAAW,GAC5CzL,KAAK0L,SAAW1L,KAAKT,MAAMiP,OAAO9C,UAAY,GAC9C1L,KAAK0L,SAAW+C,EAAIzO,KAAK0L,UAAU0C,WAAa,GAEhD,IAAMM,EAAY1O,KAAK8B,qBAAqB9B,KAAKyL,SAAS,GAAO,GAC3DyC,EAAalO,KAAK8B,qBAAqB9B,KAAK0L,UAAU,GAAO,GAE7DiD,EAAuC,OAApB3O,KAAKT,MAAM8I,KAAgB,iCAAmC,cAavF,OAXC3G,EAAAC,cAACiN,GAAoBC,eAAYC,SAAU9O,KAAK4L,iBAC/ClK,EAAAC,qBAAKhD,UAAWgQ,EAAkBI,WAAY/O,KAAKT,MAAMoH,YACxDjF,EAAAC,qBAAKhD,UAAU,mBAAmBqQ,SAAUhP,KAAKgP,UAC/CN,GAEFhN,EAAAC,qBAAKhD,UAAU,qBACbuP,SAML1C,CAAA,EArRoB9J,EAAMK"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyra/canvas",
3
- "version": "12.38.0",
3
+ "version": "12.39.1",
4
4
  "description": "Elyra common-canvas",
5
5
  "main": "dist/common-canvas.js",
6
6
  "module": "dist/common-canvas.es.js",
@@ -1735,6 +1735,20 @@ export default class CanvasController {
1735
1735
  this.objectModel.clearSavedZoomValues();
1736
1736
  }
1737
1737
 
1738
+ getViewPortDimensions() {
1739
+ if (this.canvasContents) {
1740
+ return this.getSVGCanvasD3().getTransformedViewportDimensions();
1741
+ }
1742
+ return null;
1743
+ }
1744
+
1745
+ getCanvasDimensionsWithPadding() {
1746
+ if (this.canvasContents) {
1747
+ return this.getSVGCanvasD3().getCanvasDimensionsWithPadding();
1748
+ }
1749
+ return null;
1750
+ }
1751
+
1738
1752
  // ---------------------------------------------------------------------------
1739
1753
  // Utility/helper methods
1740
1754
  // ---------------------------------------------------------------------------
@@ -196,6 +196,10 @@ export default class SVGCanvasD3 {
196
196
  return this.renderer.getTransformedViewportDimensions();
197
197
  }
198
198
 
199
+ getCanvasDimensionsWithPadding() {
200
+ return this.renderer.getCanvasDimensionsWithPadding();
201
+ }
202
+
199
203
  getGhostNode(nodeTemplate) {
200
204
  return this.renderer.getGhostNode(nodeTemplate);
201
205
  }
@@ -227,6 +227,10 @@ export default class SVGCanvasRenderer {
227
227
  return this.zoomUtils.getTransformedViewportDimensions();
228
228
  }
229
229
 
230
+ getCanvasDimensionsWithPadding() {
231
+ return this.zoomUtils.getCanvasDimensionsWithPadding();
232
+ }
233
+
230
234
  // Returns the data object for the parent supernode that references the
231
235
  // active pipeline (managed by this renderer). We get the supernode by
232
236
  // looking through the overall canvas info object.
@@ -457,7 +457,7 @@ export default class SVGCanvasUtilsDragNewLink {
457
457
 
458
458
  // Switch 'new link over node' highlighting off
459
459
  if (this.ren.config.enableHighlightNodeOnNewLinkDrag) {
460
- this.ren.setLinkOverNodeß();
460
+ this.ren.setLinkOverNodeCancel();
461
461
  }
462
462
 
463
463
  const endPoint = this.ren.getTransformedMousePos(d3Event);
@@ -136,6 +136,7 @@ class EditorForm extends React.Component {
136
136
  const tabContent = [];
137
137
  let hasAlertsTab = false;
138
138
  let modalSelected = 0;
139
+ let hiddenTabs = 0;
139
140
  const nonTearsheetTabs = tabs.filter((t) => t.content.itemType !== ItemType.TEARSHEET);
140
141
  const tearsheetTabs = tabs.filter((t) => t.content.itemType === ItemType.TEARSHEET);
141
142
  const totalTabs = tearsheetTabs.concat(nonTearsheetTabs);
@@ -144,6 +145,7 @@ class EditorForm extends React.Component {
144
145
  const tab = totalTabs[i];
145
146
  const tabState = this.props.controller.getPanelState({ name: tab.group });
146
147
  if (tabState === STATES.HIDDEN) {
148
+ hiddenTabs++;
147
149
  continue;
148
150
  }
149
151
  if (i === 0 && tab.group === ALERT_TAB_GROUP) {
@@ -198,7 +200,7 @@ class EditorForm extends React.Component {
198
200
  }
199
201
  } else {
200
202
  if (this.props.activeTab === tab.group) {
201
- modalSelected = i;
203
+ modalSelected = i - hiddenTabs; // Adjust the Carbon Tabs index to accomodate hidden tabs
202
204
  }
203
205
  tabContent.push(
204
206
  <Tab
@@ -29,9 +29,6 @@ $row-left-padding: $spacing-02;
29
29
  svg {
30
30
  fill: $icon-01;
31
31
  }
32
- input {
33
- background-color: $field-02;
34
- }
35
32
  }
36
33
  &.disabled {
37
34
  opacity: 0.5;
@@ -179,7 +179,7 @@ export default class PropertiesController {
179
179
  }
180
180
  // Set the opening dataset(s), during which multiples are flattened and compound names generated if necessary
181
181
  this.setDatasetMetadata(datasetMetadata);
182
- this.setPropertyValues(propertyValues, true); // needs to be after setDatasetMetadata to run conditions
182
+ this.setPropertyValues(propertyValues, { isInitProps: true }); // needs to be after setDatasetMetadata to run conditions
183
183
  this.differentProperties = [];
184
184
  if (sameParameterDefRendered) {
185
185
  // When a parameterDef is dynamically updated, set difference between old and new controls
@@ -1207,7 +1207,12 @@ export default class PropertiesController {
1207
1207
  return returnValues;
1208
1208
  }
1209
1209
 
1210
- setPropertyValues(values, isInitProps) {
1210
+ /*
1211
+ * options - optional object of config options where
1212
+ * setDefaultValues: true - set default values from parameter definition
1213
+ * isInitProps: true - Function is called during initial load. This is only used internally in setForm().
1214
+ */
1215
+ setPropertyValues(values, options) {
1211
1216
  let inValues = cloneDeep(values);
1212
1217
 
1213
1218
  // convert currentParameters of type:object to array values
@@ -1229,7 +1234,7 @@ export default class PropertiesController {
1229
1234
 
1230
1235
  this.propertiesStore.setPropertyValues(inValues);
1231
1236
 
1232
- if (isInitProps) {
1237
+ if (options && options.isInitProps) {
1233
1238
  // Evaluate conditional defaults based on current_parameters upon loading of view
1234
1239
  // For a given parameter_ref, if multiple conditions evaluate to true only the first one is used.
1235
1240
  const conditionalDefaultValues = {};
@@ -1264,6 +1269,10 @@ export default class PropertiesController {
1264
1269
  }
1265
1270
  );
1266
1271
  }
1272
+
1273
+ if (options && options.setDefaultValues) {
1274
+ this._addToControlValues(true);
1275
+ }
1267
1276
  }
1268
1277
 
1269
1278
  /**
@@ -102,6 +102,9 @@ class PropertiesMain extends React.Component {
102
102
  }
103
103
 
104
104
  UNSAFE_componentWillReceiveProps(newProps) { // eslint-disable-line camelcase, react/sort-comp
105
+ if (this.props.light !== newProps.light) { // set the new light prop in controller
106
+ this.propertiesController.setLight(newProps.light);
107
+ }
105
108
  if (newProps.propertiesInfo) {
106
109
  if (!isEqual(Object.keys(newProps.propertiesInfo), Object.keys(this.props.propertiesInfo)) ||
107
110
  (newProps.propertiesInfo.formData && !isEqual(newProps.propertiesInfo.formData, this.props.propertiesInfo.formData)) ||