@elyra/canvas 12.40.0 → 12.40.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.
- package/dist/{_baseIteratee-fb637d17.js → _baseIteratee-05ccf6a8.js} +3 -3
- package/dist/{_baseIteratee-fb637d17.js.map → _baseIteratee-05ccf6a8.js.map} +1 -1
- package/dist/{_baseIteratee-f4715b87.js → _baseIteratee-2b75d27c.js} +2 -2
- package/dist/{_baseIteratee-f4715b87.js.map → _baseIteratee-2b75d27c.js.map} +1 -1
- package/dist/canvas-constants-079172c0.js +2 -0
- package/dist/canvas-constants-079172c0.js.map +1 -0
- package/dist/canvas-constants-ff5cf88e.js +2 -0
- package/dist/canvas-constants-ff5cf88e.js.map +1 -0
- package/dist/canvas-controller-1e71b405.js +2 -0
- package/dist/{canvas-controller-bde80f8a.js.map → canvas-controller-1e71b405.js.map} +1 -1
- package/dist/canvas-controller-4bed5320.js +2 -0
- package/dist/{canvas-controller-95ecdee5.js.map → canvas-controller-4bed5320.js.map} +1 -1
- package/dist/common-canvas-318df796.js +2 -0
- package/dist/{common-canvas-32d7e405.js.map → common-canvas-318df796.js.map} +1 -1
- package/dist/common-canvas-d41ba910.js +2 -0
- package/dist/{common-canvas-b32c379e.js.map → common-canvas-d41ba910.js.map} +1 -1
- package/dist/common-canvas.es.js +1 -1
- package/dist/common-canvas.es.js.map +1 -1
- package/dist/common-canvas.js +1 -1
- package/dist/common-canvas.js.map +1 -1
- package/dist/common-properties-6e904e3b.js +2 -0
- package/dist/common-properties-6e904e3b.js.map +1 -0
- package/dist/common-properties-c91bfb31.js +2 -0
- package/dist/common-properties-c91bfb31.js.map +1 -0
- package/dist/context-menu-wrapper-3a7fdec8.js +2 -0
- package/dist/context-menu-wrapper-3a7fdec8.js.map +1 -0
- package/dist/context-menu-wrapper-fc85d853.js +2 -0
- package/dist/context-menu-wrapper-fc85d853.js.map +1 -0
- package/dist/datarecord-metadata-v3-schema-59505bc5.js +2 -0
- package/dist/{datarecord-metadata-v3-schema-76e8fa3e.js.map → datarecord-metadata-v3-schema-59505bc5.js.map} +1 -1
- package/dist/datarecord-metadata-v3-schema-dba0b214.js +2 -0
- package/dist/{datarecord-metadata-v3-schema-9b4a5306.js.map → datarecord-metadata-v3-schema-dba0b214.js.map} +1 -1
- package/dist/defineProperty-3dc7d8d0.js +2 -0
- package/dist/defineProperty-3dc7d8d0.js.map +1 -0
- package/dist/defineProperty-6d406743.js +2 -0
- package/dist/defineProperty-6d406743.js.map +1 -0
- package/dist/{flexible-table-93144915.js → flexible-table-562ae288.js} +2 -2
- package/dist/{flexible-table-93144915.js.map → flexible-table-562ae288.js.map} +1 -1
- package/dist/{flexible-table-9de9d023.js → flexible-table-5ee2a42b.js} +2 -2
- package/dist/{flexible-table-9de9d023.js.map → flexible-table-5ee2a42b.js.map} +1 -1
- package/dist/{icon-9bf1b1d0.js → icon-0390f1fe.js} +2 -2
- package/dist/{icon-9bf1b1d0.js.map → icon-0390f1fe.js.map} +1 -1
- package/dist/{icon-1995d07f.js → icon-e622f99b.js} +2 -2
- package/dist/{icon-1995d07f.js.map → icon-e622f99b.js.map} +1 -1
- package/dist/index-8e8b8729.js +2 -0
- package/dist/{index-86e4c622.js.map → index-8e8b8729.js.map} +1 -1
- package/dist/index-fe8d4201.js +2 -0
- package/dist/{index-2974f99f.js.map → index-fe8d4201.js.map} +1 -1
- package/dist/{isArrayLikeObject-0cd02b77.js → isArrayLikeObject-04f333a5.js} +2 -2
- package/dist/{isArrayLikeObject-0cd02b77.js.map → isArrayLikeObject-04f333a5.js.map} +1 -1
- package/dist/{isArrayLikeObject-9104c690.js → isArrayLikeObject-36898fcb.js} +2 -2
- package/dist/{isArrayLikeObject-9104c690.js.map → isArrayLikeObject-36898fcb.js.map} +1 -1
- package/dist/lib/canvas-controller.es.js +1 -1
- package/dist/lib/canvas-controller.js +1 -1
- package/dist/lib/canvas.es.js +1 -1
- package/dist/lib/canvas.js +1 -1
- package/dist/lib/context-menu.es.js +1 -1
- package/dist/lib/context-menu.js +1 -1
- package/dist/lib/properties/field-picker.es.js +1 -1
- package/dist/lib/properties/field-picker.js +1 -1
- package/dist/lib/properties/flexible-table.es.js +1 -1
- package/dist/lib/properties/flexible-table.js +1 -1
- package/dist/lib/properties.es.js +1 -1
- package/dist/lib/properties.js +1 -1
- package/dist/styles/common-canvas.min.css +1 -1
- package/dist/styles/common-canvas.min.css.map +1 -1
- package/dist/{toolbar-8ed1e188.js → toolbar-b01e6749.js} +2 -2
- package/dist/{toolbar-8ed1e188.js.map → toolbar-b01e6749.js.map} +1 -1
- package/dist/{toolbar-dbe39e96.js → toolbar-fd4e4a3a.js} +2 -2
- package/dist/{toolbar-dbe39e96.js.map → toolbar-fd4e4a3a.js.map} +1 -1
- package/package.json +1 -1
- package/src/color-picker/color-picker.scss +1 -1
- package/src/common-canvas/svg-canvas-d3.scss +19 -15
- package/src/common-properties/properties-controller.js +8 -19
- package/src/context-menu/common-context-menu.jsx +15 -1
- package/stats.html +1 -1
- package/dist/canvas-constants-c5e07e1c.js +0 -2
- package/dist/canvas-constants-c5e07e1c.js.map +0 -1
- package/dist/canvas-constants-ef23ad87.js +0 -2
- package/dist/canvas-constants-ef23ad87.js.map +0 -1
- package/dist/canvas-controller-95ecdee5.js +0 -2
- package/dist/canvas-controller-bde80f8a.js +0 -2
- package/dist/common-canvas-32d7e405.js +0 -2
- package/dist/common-canvas-b32c379e.js +0 -2
- package/dist/common-properties-06008d04.js +0 -2
- package/dist/common-properties-06008d04.js.map +0 -1
- package/dist/common-properties-f0e8fedb.js +0 -2
- package/dist/common-properties-f0e8fedb.js.map +0 -1
- package/dist/context-menu-wrapper-96f437f2.js +0 -2
- package/dist/context-menu-wrapper-96f437f2.js.map +0 -1
- package/dist/context-menu-wrapper-a55b8cb4.js +0 -2
- package/dist/context-menu-wrapper-a55b8cb4.js.map +0 -1
- package/dist/datarecord-metadata-v3-schema-76e8fa3e.js +0 -2
- package/dist/datarecord-metadata-v3-schema-9b4a5306.js +0 -2
- package/dist/index-2974f99f.js +0 -2
- package/dist/index-86e4c622.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar-dbe39e96.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 > </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","ToolbarActionSubArea","props","_this","_classCallCheck","_callSuper","onClick","bind","_assertThisInitialized","_inherits","_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","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":"ikBACIA,EAAe,SCDfC,EDWJ,SAAyBC,GAGvB,IAFA,IAAIC,EAAQD,EAAOE,OAEZD,KAAWH,EAAaK,KAAKH,EAAOI,OAAOH,MAClD,OAAOA,CACT,ECbII,EAAc,WCHdC,EDYJ,SAAkBN,GAChB,OAAOA,EACHA,EAAOO,MAAM,EAAGR,EAAgBC,GAAU,GAAGQ,QAAQH,EAAa,IAClEL,CACN,ECfIS,EAAWC,aACXC,EAAWC,aAMXC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAeC,aA8CnBC,EAr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KAAK+O,UAC/CN,GAEF/M,UAAAC,qBAAK9C,UAAU,qBACboP,SAML1C,CAAA,EArRoB7J,UAAMK"}
|
|
1
|
+
{"version":3,"file":"toolbar-fd4e4a3a.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 > </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","ToolbarActionSubArea","props","_this","_classCallCheck","_callSuper","onClick","bind","_assertThisInitialized","_inherits","_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","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":"ikBACIA,EAAe,SCDfC,EDWJ,SAAyBC,GAGvB,IAFA,IAAIC,EAAQD,EAAOE,OAEZD,KAAWH,EAAaK,KAAKH,EAAOI,OAAOH,MAClD,OAAOA,CACT,ECbII,EAAc,WCHdC,EDYJ,SAAkBN,GAChB,OAAOA,EACHA,EAAOO,MAAM,EAAGR,EAAgBC,GAAU,GAAGQ,QAAQH,EAAa,IAClEL,CACN,ECfIS,EAAWC,aACXC,EAAWC,aAMXC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAeC,aA8CnBC,E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,KAAK+O,UAC/CN,GAEF/M,UAAAC,qBAAK9C,UAAU,qBACboP,SAML1C,CAAA,EArRoB7J,UAAMK"}
|
package/package.json
CHANGED
|
@@ -77,8 +77,8 @@ $node-port-input-arrow-connected-fill-color: transparent;
|
|
|
77
77
|
// Comment colors
|
|
78
78
|
$comment-outline-color: $active-light-ui;
|
|
79
79
|
$comment-outline-hover-color: $inverse-hover-ui;
|
|
80
|
-
$comment-fill-color: $
|
|
81
|
-
$comment-text-color: $
|
|
80
|
+
$comment-fill-color: $ui-01;
|
|
81
|
+
$comment-text-color: $text-01;
|
|
82
82
|
|
|
83
83
|
// Comment properties
|
|
84
84
|
$comment-text-font-size: 12px;
|
|
@@ -631,10 +631,13 @@ $link-highlight-color: $support-04;
|
|
|
631
631
|
user-select: none;
|
|
632
632
|
}
|
|
633
633
|
|
|
634
|
-
@mixin d3-comment-color-overrides($background-color) {
|
|
634
|
+
@mixin d3-comment-color-overrides($background-color, $text-color) {
|
|
635
635
|
.d3-comment-rect {
|
|
636
636
|
fill: $background-color;
|
|
637
637
|
}
|
|
638
|
+
.d3-comment-text {
|
|
639
|
+
color: $text-color;
|
|
640
|
+
}
|
|
638
641
|
.d3-comment-entry {
|
|
639
642
|
background-color: $background-color;
|
|
640
643
|
color: $gray-100;
|
|
@@ -647,40 +650,41 @@ $link-highlight-color: $support-04;
|
|
|
647
650
|
// assumption is, the user would prefer the color they set in the UI to
|
|
648
651
|
// override any color provided by the host app.
|
|
649
652
|
g.bkg-col-white-0 {
|
|
650
|
-
|
|
653
|
+
// In dark-mode, white-0 will be interpreted as black background with white text.
|
|
654
|
+
@include d3-comment-color-overrides($ui-01, $text-01);
|
|
651
655
|
}
|
|
652
656
|
g.bkg-col-yellow-20 {
|
|
653
|
-
@include d3-comment-color-overrides($yellow-20);
|
|
657
|
+
@include d3-comment-color-overrides($yellow-20, $gray-100);
|
|
654
658
|
}
|
|
655
659
|
g.bkg-col-gray-20 {
|
|
656
|
-
@include d3-comment-color-overrides($gray-20);
|
|
660
|
+
@include d3-comment-color-overrides($gray-20, $gray-100);
|
|
657
661
|
}
|
|
658
662
|
g.bkg-col-green-20 {
|
|
659
|
-
@include d3-comment-color-overrides($green-20);
|
|
663
|
+
@include d3-comment-color-overrides($green-20, $gray-100);
|
|
660
664
|
}
|
|
661
665
|
g.bkg-col-teal-20 {
|
|
662
|
-
@include d3-comment-color-overrides($teal-20);
|
|
666
|
+
@include d3-comment-color-overrides($teal-20, $gray-100);
|
|
663
667
|
}
|
|
664
668
|
g.bkg-col-cyan-20 {
|
|
665
|
-
@include d3-comment-color-overrides($cyan-20);
|
|
669
|
+
@include d3-comment-color-overrides($cyan-20, $gray-100);
|
|
666
670
|
}
|
|
667
671
|
g.bkg-col-red-50 {
|
|
668
|
-
@include d3-comment-color-overrides($red-50);
|
|
672
|
+
@include d3-comment-color-overrides($red-50, $gray-100);
|
|
669
673
|
}
|
|
670
674
|
g.bkg-col-orange-40 {
|
|
671
|
-
@include d3-comment-color-overrides($orange-40);
|
|
675
|
+
@include d3-comment-color-overrides($orange-40, $gray-100);
|
|
672
676
|
}
|
|
673
677
|
g.bkg-col-gray-50 {
|
|
674
|
-
@include d3-comment-color-overrides($gray-50);
|
|
678
|
+
@include d3-comment-color-overrides($gray-50, $gray-100);
|
|
675
679
|
}
|
|
676
680
|
g.bkg-col-green-50 {
|
|
677
|
-
@include d3-comment-color-overrides($green-50);
|
|
681
|
+
@include d3-comment-color-overrides($green-50, $gray-100);
|
|
678
682
|
}
|
|
679
683
|
g.bkg-col-teal-50 {
|
|
680
|
-
@include d3-comment-color-overrides($teal-50);
|
|
684
|
+
@include d3-comment-color-overrides($teal-50, $gray-100);
|
|
681
685
|
}
|
|
682
686
|
g.bkg-col-cyan-50 {
|
|
683
|
-
@include d3-comment-color-overrides($cyan-50);
|
|
687
|
+
@include d3-comment-color-overrides($cyan-50, $gray-100);
|
|
684
688
|
}
|
|
685
689
|
|
|
686
690
|
.d3-comment-selection-highlight {
|
|
@@ -28,7 +28,7 @@ import { STATES, ACTIONS, CONDITION_TYPE, PANEL_TREE_ROOT, CONDITION_MESSAGE_TYP
|
|
|
28
28
|
import CommandStack from "../command-stack/command-stack.js";
|
|
29
29
|
import ControlFactory from "./controls/control-factory";
|
|
30
30
|
import { Type, ParamRole, ControlType, ItemType } from "./constants/form-constants";
|
|
31
|
-
import { has, cloneDeep, assign, isEmpty, isEqual, isUndefined, get, difference } from "lodash";
|
|
31
|
+
import { has, cloneDeep, assign, isEmpty, isEqual, isUndefined, get, difference, merge } from "lodash";
|
|
32
32
|
import Form from "./form/Form";
|
|
33
33
|
import { getConditionOps } from "./ui-conditions/condition-ops/condition-ops";
|
|
34
34
|
import { DEFAULT_LOCALE } from "./constants/constants";
|
|
@@ -441,22 +441,10 @@ export default class PropertiesController {
|
|
|
441
441
|
}
|
|
442
442
|
|
|
443
443
|
if (setDefaultValues) {
|
|
444
|
-
|
|
444
|
+
return defaultControlValues;
|
|
445
445
|
}
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
setDefaultControlValues(defaultControlValues) {
|
|
449
|
-
// Update all default values
|
|
450
|
-
this.propertiesStore.setPropertyValues(defaultControlValues);
|
|
451
446
|
|
|
452
|
-
|
|
453
|
-
if (this.handlers.propertyListener) {
|
|
454
|
-
this.handlers.propertyListener(
|
|
455
|
-
{
|
|
456
|
-
action: ACTIONS.SET_PROPERTIES // Setting the default control values
|
|
457
|
-
}
|
|
458
|
-
);
|
|
459
|
-
}
|
|
447
|
+
return null;
|
|
460
448
|
}
|
|
461
449
|
|
|
462
450
|
_populateFieldData(controlValue, control) {
|
|
@@ -1254,6 +1242,11 @@ export default class PropertiesController {
|
|
|
1254
1242
|
}
|
|
1255
1243
|
}
|
|
1256
1244
|
|
|
1245
|
+
if (options && options.setDefaultValues) {
|
|
1246
|
+
const defaultValues = this._addToControlValues(false, false, true);
|
|
1247
|
+
inValues = merge(defaultValues, inValues);
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1257
1250
|
this.propertiesStore.setPropertyValues(inValues);
|
|
1258
1251
|
|
|
1259
1252
|
if (options && options.isInitProps) {
|
|
@@ -1291,10 +1284,6 @@ export default class PropertiesController {
|
|
|
1291
1284
|
}
|
|
1292
1285
|
);
|
|
1293
1286
|
}
|
|
1294
|
-
|
|
1295
|
-
if (options && options.setDefaultValues) {
|
|
1296
|
-
this._addToControlValues(false, false, true);
|
|
1297
|
-
}
|
|
1298
1287
|
}
|
|
1299
1288
|
|
|
1300
1289
|
/**
|
|
@@ -258,6 +258,19 @@ class CommonContextMenu extends React.Component {
|
|
|
258
258
|
return subMenuPosStyle;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
+
// Returns the menu definition array passed in making sure any
|
|
262
|
+
// submenu items have an action. Note: some applications forget
|
|
263
|
+
// to do provide an action because for the submenu it is only
|
|
264
|
+
// used by the context menu code.
|
|
265
|
+
ensureAllSubMenuItemsHaveAction(menuDef) {
|
|
266
|
+
return menuDef.map((item, index) => {
|
|
267
|
+
if (item.submenu && typeof item.action === "undefined") {
|
|
268
|
+
return { ...item, action: "submenu_" + index };
|
|
269
|
+
}
|
|
270
|
+
return item;
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
|
|
261
274
|
render() {
|
|
262
275
|
// Reposition contextMenu so that it does not show off the screen
|
|
263
276
|
const menuSize = this.calculateMenuSize(this.props.menuDefinition);
|
|
@@ -267,7 +280,8 @@ class CommonContextMenu extends React.Component {
|
|
|
267
280
|
top: menuPos.y + "px"
|
|
268
281
|
};
|
|
269
282
|
|
|
270
|
-
const
|
|
283
|
+
const menuDefinition = this.ensureAllSubMenuItemsHaveAction(this.props.menuDefinition);
|
|
284
|
+
const menuItems = this.buildMenu(menuDefinition, menuSize, menuPos, this.props.canvasRect);
|
|
271
285
|
|
|
272
286
|
return (
|
|
273
287
|
<div id="context-menu-popover" className="context-menu-popover" style={posStyle} onContextMenu={this.onContextMenu}>
|