@elyra/canvas 12.28.2 → 12.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-controller-6fe261d9.js +2 -0
- package/dist/canvas-controller-6fe261d9.js.map +1 -0
- package/dist/canvas-controller-ea7d4a8f.js +2 -0
- package/dist/canvas-controller-ea7d4a8f.js.map +1 -0
- package/dist/common-canvas-2953ff65.js +2 -0
- package/dist/common-canvas-2953ff65.js.map +1 -0
- package/dist/common-canvas-fbd62592.js +2 -0
- package/dist/common-canvas-fbd62592.js.map +1 -0
- package/dist/common-canvas.es.js +1 -1
- package/dist/common-canvas.js +1 -1
- package/dist/common-properties-0df4ed36.js +2 -0
- package/dist/common-properties-0df4ed36.js.map +1 -0
- package/dist/common-properties-8409565f.js +2 -0
- package/dist/common-properties-8409565f.js.map +1 -0
- package/dist/flexible-table-3a78cdf3.js +2 -0
- package/dist/{flexible-table-a3180c2b.js.map → flexible-table-3a78cdf3.js.map} +1 -1
- package/dist/flexible-table-6e801de4.js +2 -0
- package/dist/{flexible-table-25f1f3a4.js.map → flexible-table-6e801de4.js.map} +1 -1
- package/dist/index-92422c18.js +2 -0
- package/dist/index-92422c18.js.map +1 -0
- package/dist/index-aee893ad.js +2 -0
- package/dist/index-aee893ad.js.map +1 -0
- 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/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/lib/tooltip.es.js +1 -1
- package/dist/lib/tooltip.es.js.map +1 -1
- package/dist/lib/tooltip.js +1 -1
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/styles/common-canvas.min.css +1 -1
- package/dist/styles/common-canvas.min.css.map +1 -1
- package/dist/{toolbar-2bbc9542.js → toolbar-3fdd090b.js} +1 -1
- package/dist/{toolbar-2bbc9542.js.map → toolbar-3fdd090b.js.map} +1 -1
- package/dist/{toolbar-c173e22a.js → toolbar-5437484a.js} +1 -1
- package/dist/{toolbar-c173e22a.js.map → toolbar-5437484a.js.map} +1 -1
- package/locales/common-properties/locales/en.json +1 -1
- package/locales/common-properties/locales/eo.json +1 -1
- package/package.json +2 -2
- package/src/common-canvas/canvas-controller.js +19 -15
- package/src/common-canvas/svg-canvas-d3.scss +5 -0
- package/src/common-canvas/svg-canvas-pipeline.js +12 -6
- package/src/common-canvas/svg-canvas-renderer.js +156 -103
- package/src/common-canvas/svg-canvas-utils-external.js +34 -0
- package/src/common-properties/actions/button/button.jsx +2 -1
- package/src/common-properties/actions/image/image.jsx +2 -1
- package/src/common-properties/components/title-editor/title-editor.jsx +3 -0
- package/src/common-properties/components/virtualized-table/virtualized-table.scss +2 -4
- package/src/common-properties/controls/datepicker/datepicker.scss +9 -0
- package/src/common-properties/controls/passwordfield/passwordfield.jsx +16 -18
- package/src/common-properties/form/ActionInfo.js +3 -1
- package/src/common-properties/form/EditorForm.js +1 -1
- package/src/common-properties/form/PropertyDef.js +1 -1
- package/src/common-properties/panels/subtabs/subtabs.jsx +4 -2
- package/src/common-properties/panels/tearsheet/tearsheet.jsx +21 -16
- package/src/common-properties/panels/tearsheet/tearsheet.scss +1 -1
- package/src/common-properties/ui-conditions/ui-conditions.js +6 -1
- package/src/object-model/layout-dimensions.js +20 -2
- package/src/object-model/object-model.js +1 -1
- package/src/object-model/pipeline-out-handler.js +1 -1
- package/src/palette/palette-content-list-item.jsx +3 -2
- package/src/palette/palette-dialog-content-grid-node.jsx +3 -2
- package/src/tooltip/tooltip.jsx +1 -1
- package/stats.html +1 -1
- package/dist/canvas-controller-1bbd9c0e.js +0 -2
- package/dist/canvas-controller-1bbd9c0e.js.map +0 -1
- package/dist/canvas-controller-d6aa7d4d.js +0 -2
- package/dist/canvas-controller-d6aa7d4d.js.map +0 -1
- package/dist/common-canvas-9c735f47.js +0 -2
- package/dist/common-canvas-9c735f47.js.map +0 -1
- package/dist/common-canvas-a02e75c1.js +0 -2
- package/dist/common-canvas-a02e75c1.js.map +0 -1
- package/dist/common-properties-21c4c338.js +0 -2
- package/dist/common-properties-21c4c338.js.map +0 -1
- package/dist/common-properties-80e20c2a.js +0 -2
- package/dist/common-properties-80e20c2a.js.map +0 -1
- package/dist/flexible-table-25f1f3a4.js +0 -2
- package/dist/flexible-table-a3180c2b.js +0 -2
- package/dist/index-501de495.js +0 -2
- package/dist/index-501de495.js.map +0 -1
- package/dist/index-8c2f3663.js +0 -2
- package/dist/index-8c2f3663.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar-c173e22a.js","sources":["../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/toNumber.js","../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-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","/*\n * Copyright 2017-2022 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 { StopFilledAlt16, Play16, Undo16, Redo16, Chat16, ChatOff16, Cut16, Copy16, Paste16,\n\tAddComment16, TrashCan16, ZoomIn16, ZoomOut16 } from \"@carbon/icons-react\";\nimport { TOOLBAR_STOP, TOOLBAR_RUN, TOOLBAR_UNDO, TOOLBAR_REDO, TOOLBAR_CUT,\n\tTOOLBAR_COPY, TOOLBAR_PASTE, TOOLBAR_CREATE_AUTO_COMMENT,\n\tTOOLBAR_DELETE_SELECTED_OBJECTS, TOOLBAR_ZOOM_IN, TOOLBAR_ZOOM_OUT, TOOLBAR_ZOOM_FIT,\n\tTOOLBAR_ARRANGE_HORIZONALLY, TOOLBAR_ARRANGE_VERTICALLY, TOOLBAR_OPEN_PALETTE,\n\tTOOLBAR_CLOSE_PALETTE, TOOLBAR_TOGGLE_NOTIFICATION_PANEL,\n\tTOOLBAR_SHOW_COMMENTS, TOOLBAR_HIDE_COMMENTS }\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.actionClickHandler = this.actionClickHandler.bind(this);\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_UNDO):\n\t\t\treturn <Undo16 disabled={disabled} />;\n\t\tcase (TOOLBAR_REDO):\n\t\t\treturn <Redo16 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_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_DELETE_SELECTED_OBJECTS):\n\t\t\treturn <TrashCan16 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\tactionClickHandler(evt) {\n\t\tthis.props.toolbarActionHandler(this.props.actionObj.action, evt);\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\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</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\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\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\treturn (\n\t\t\t<div className={itemClassName} data-toolbar-item={isToolbarItem}>\n\t\t\t\t{divContent}\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\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\tinstanceId: PropTypes.number.isRequired,\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-2022 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 { Button } from \"carbon-components-react\";\nimport { OverflowMenuVertical16 } from \"@carbon/icons-react\";\n\nclass ToolbarOverflowItem extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.toggleExtendedMenu = this.toggleExtendedMenu.bind(this);\n\t}\n\n\ttoggleExtendedMenu() {\n\t\tthis.props.toggleExtendedMenu(this.props.index);\n\t}\n\n\trender() {\n\t\tconst menuItems = this.props.showExtendedMenu ? this.props.generateExtensionMenuItems(this.props.index) : [];\n\t\tconst subMenuClassName = this.props.showExtendedMenu ? \"\" : \"toolbar-popover-list-hide\";\n\n\t\tlet overflowMenu = null;\n\t\tif (menuItems.length > 0) {\n\t\t\toverflowMenu = (\n\t\t\t\t<div className={\"toolbar-popover-list \" + subMenuClassName}>\n\t\t\t\t\t{menuItems}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tconst className = \"toolbar-spacer toolbar-index-\" + this.props.index;\n\n\t\treturn (\n\t\t\t<div className={className} >\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\tshowExtendedMenu: PropTypes.bool.isRequired,\n\ttoggleExtendedMenu: PropTypes.func.isRequired,\n\tindex: PropTypes.number.isRequired,\n\tgenerateExtensionMenuItems: PropTypes.func,\n\tonFocus: PropTypes.func,\n\tlabel: PropTypes.string,\n\tsize: PropTypes.oneOf([\"md\", \"sm\"])\n};\n\nexport default ToolbarOverflowItem;\n","/*\n * Copyright 2017-2022 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-2022 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.state = {\n\t\t\tshowExtendedMenuIndex: -1\n\t\t};\n\n\t\tthis.leftBar = [];\n\t\tthis.rightBar = [];\n\n\t\tthis.onFocus = this.onFocus.bind(this);\n\t\tthis.onToolbarResize = this.onToolbarResize.bind(this);\n\t\tthis.toggleExtendedMenu = this.toggleExtendedMenu.bind(this);\n\t\tthis.generateExtensionMenuItems = this.generateExtensionMenuItems.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.state.showExtendedMenuIndex > -1) {\n\t\t\tthis.setState({ showExtendedMenuIndex: -1 });\n\t\t}\n\n\t\tthis.setLeftBarItemsTabIndex();\n\t\tthis.setRightBarItemsTabIndex();\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\toverflow={overflow}\n\t\t\t\t\t\tinstanceId={this.props.instanceId}\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\tshowExtendedMenu={this.state.showExtendedMenuIndex === index}\n\t\t\t\ttoggleExtendedMenu={this.toggleExtendedMenu}\n\t\t\t\tgenerateExtensionMenuItems={this.generateExtensionMenuItems}\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\ttoggleExtendedMenu(index) {\n\t\tconst newIndex = index === this.state.showExtendedMenuIndex ? -1 : index;\n\t\tthis.setState({ showExtendedMenuIndex: newIndex });\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,\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","_React$Component","_inherits","ToolbarActionItem","_super","_createSuper","props","_this","_classCallCheck","call","actionClickHandler","bind","_assertThisInitialized","_createClass","key","actionObj","disabled","enable","action","TOOLBAR_STOP","React","createElement","StopFilledAlt16","TOOLBAR_RUN","Play16","TOOLBAR_UNDO","Undo16","TOOLBAR_REDO","Redo16","TOOLBAR_CUT","Cut16","TOOLBAR_COPY","Copy16","TOOLBAR_PASTE","Paste16","TOOLBAR_CREATE_AUTO_COMMENT","AddComment16","TOOLBAR_SHOW_COMMENTS","Chat16","TOOLBAR_HIDE_COMMENTS","ChatOff16","TOOLBAR_DELETE_SELECTED_OBJECTS","TrashCan16","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","overflow","incLabelWithIcon","className","this","generateLabelType","inLabelWithIcon","icon","getDefaultIcon","iconEnabled","iconDisabled","customIcon","id","instanceId","evt","toolbarActionHandler","labelBefore","labelAfter","generateLabel","generateIcon","textContent","itemContentClassName","classNames","default","kind","buttonContent","wrapInTooltip","ariaLabel","Button","onClick","onFocus","size","content","showLabelAsTip","tooltip","actionName","generateActionName","tip","tooltipId","enableTooltip","jsx","direction","tooltipDirection","Tooltip","divContent","generateButton","isToolbarItem","kindAsClass","itemClassName","isSelected","Component","ToolbarOverflowItem","toggleExtendedMenu","menuItems","showExtendedMenu","generateExtensionMenuItems","subMenuClassName","overflowMenu","tabIndex","OverflowMenuVertical16","ToolbarDividerItem","apply","arguments","dividerClassName","Toolbar","state","showExtendedMenuIndex","leftBar","rightBar","onToolbarResize","setLeftBarItemsTabIndex","setRightBarItemsTabIndex","currentTarget","scroll","preventDefault","setState","bar","getBar","items","querySelectorAll","topRow","getTopOfFirstOverflowItem","lastTopRowElement","i","itemRect","getBoundingClientRect","setOverflowItemButtonTabIndex","top","setToolbarItemButtonTabIndex","getRightBarItems","side","document","querySelector","concat","firstOverflowItem","getOverflowItem","overflowClassName","getElementsByClassName","item","button","setAttribute","overflowItem","overflowButton","actionDefinitions","withSpacer","newItems","divider","push","generateOverflowIcon","generateToolbarItem","additionalText","overflowMenuLabel","leftIndex","rightItems","generateRightOverflowItems","reverse","overflowMenuBarItems","generateToolbarItems","newDefItems","rect","newIndex","config","_toConsumableArray","leftItems","toolbarSizeClass","ReactResizeDetector","handleWidth","onResize","instanceid","onScroll"],"mappings":"62BACA,IAAIA,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,EACXC,EAAWC,EAMXC,GAAa,qBAGbC,GAAa,aAGbC,GAAY,cAGZC,GAAeC,aA8CnBC,GArBA,SAAkBC,GAChB,GAAoB,iBAATA,EACT,OAAOA,EAET,GAAIR,EAASQ,GACX,OA1CM,IA4CR,GAAIV,EAASU,GAAQ,CACnB,IAAIC,EAAgC,mBAAjBD,EAAME,QAAwBF,EAAME,UAAYF,EACnEA,EAAQV,EAASW,GAAUA,EAAQ,GAAMA,EAE3C,GAAoB,iBAATD,EACT,OAAiB,IAAVA,EAAcA,GAASA,EAEhCA,EAAQb,EAASa,GACjB,IAAIG,EAAWR,GAAWX,KAAKgB,GAC/B,OAAQG,GAAYP,GAAUZ,KAAKgB,GAC/BH,GAAaG,EAAMZ,MAAM,GAAIe,EAAW,EAAI,GAC3CT,GAAWV,KAAKgB,GAvDb,KAuD6BA,CACv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J,OAAQ+J,IAAK,CACtC,IAAMoC,EAAOzC,EAAMK,GAAGE,wBAEZ,IAANF,IACHH,EAASuC,EAAKhC,KAGXgC,EAAKhC,MAAQP,GAChBsC,EAAYX,KAAKvG,KAAKgE,SAASe,IAGjC,OAAOmC,KACPhK,yBAAAjB,MAED,SAAmBlB,GAClB,IAAMqM,EAAWrM,IAAUiF,KAAK6D,MAAMC,uBAAyB,EAAI/I,EACnEiF,KAAKuE,SAAS,CAAET,sBAAuBsD,OACvClK,aAAAjB,MAED,WACC+D,KAAK+D,QAAU/D,KAAKtD,MAAM2K,OAAOtD,SAAW,GAC5C/D,KAAKgE,SAAWhE,KAAKtD,MAAM2K,OAAOrD,UAAY,GAC9ChE,KAAKgE,SAAWsD,EAAItH,KAAKgE,UAAU+C,WAAa,GAEhD,IAAMQ,EAAYvH,KAAKiH,qBAAqBjH,KAAK+D,SAAS,GAAO,GAC3D8C,EAAa7G,KAAKiH,qBAAqBjH,KAAKgE,UAAU,GAAO,GAE7DwD,EAAuC,OAApBxH,KAAKtD,MAAMiF,KAAgB,iCAAmC,cAavF,OAXCnE,EAAAC,cAACgK,GAAoBC,eAAYC,SAAU3H,KAAKiE,iBAC/CzG,EAAAC,qBAAKsC,UAAWyH,EAAkBI,WAAY5H,KAAKtD,MAAM+D,YACxDjD,EAAAC,qBAAKsC,UAAU,mBAAmB8H,SAAU7H,KAAK6H,UAC/CN,GAEF/J,EAAAC,qBAAKsC,UAAU,qBACb8G,SAMLjD,CAAA,EAlRoBpG,EAAMsF"}
|
|
1
|
+
{"version":3,"file":"toolbar-5437484a.js","sources":["../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/toNumber.js","../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-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","/*\n * Copyright 2017-2022 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 { StopFilledAlt16, Play16, Undo16, Redo16, Chat16, ChatOff16, Cut16, Copy16, Paste16,\n\tAddComment16, TrashCan16, ZoomIn16, ZoomOut16 } from \"@carbon/icons-react\";\nimport { TOOLBAR_STOP, TOOLBAR_RUN, TOOLBAR_UNDO, TOOLBAR_REDO, TOOLBAR_CUT,\n\tTOOLBAR_COPY, TOOLBAR_PASTE, TOOLBAR_CREATE_AUTO_COMMENT,\n\tTOOLBAR_DELETE_SELECTED_OBJECTS, TOOLBAR_ZOOM_IN, TOOLBAR_ZOOM_OUT, TOOLBAR_ZOOM_FIT,\n\tTOOLBAR_ARRANGE_HORIZONALLY, TOOLBAR_ARRANGE_VERTICALLY, TOOLBAR_OPEN_PALETTE,\n\tTOOLBAR_CLOSE_PALETTE, TOOLBAR_TOGGLE_NOTIFICATION_PANEL,\n\tTOOLBAR_SHOW_COMMENTS, TOOLBAR_HIDE_COMMENTS }\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.actionClickHandler = this.actionClickHandler.bind(this);\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_UNDO):\n\t\t\treturn <Undo16 disabled={disabled} />;\n\t\tcase (TOOLBAR_REDO):\n\t\t\treturn <Redo16 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_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_DELETE_SELECTED_OBJECTS):\n\t\t\treturn <TrashCan16 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\tactionClickHandler(evt) {\n\t\tthis.props.toolbarActionHandler(this.props.actionObj.action, evt);\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\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</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\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\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\treturn (\n\t\t\t<div className={itemClassName} data-toolbar-item={isToolbarItem}>\n\t\t\t\t{divContent}\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\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\tinstanceId: PropTypes.number.isRequired,\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-2022 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 { Button } from \"carbon-components-react\";\nimport { OverflowMenuVertical16 } from \"@carbon/icons-react\";\n\nclass ToolbarOverflowItem extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.toggleExtendedMenu = this.toggleExtendedMenu.bind(this);\n\t}\n\n\ttoggleExtendedMenu() {\n\t\tthis.props.toggleExtendedMenu(this.props.index);\n\t}\n\n\trender() {\n\t\tconst menuItems = this.props.showExtendedMenu ? this.props.generateExtensionMenuItems(this.props.index) : [];\n\t\tconst subMenuClassName = this.props.showExtendedMenu ? \"\" : \"toolbar-popover-list-hide\";\n\n\t\tlet overflowMenu = null;\n\t\tif (menuItems.length > 0) {\n\t\t\toverflowMenu = (\n\t\t\t\t<div className={\"toolbar-popover-list \" + subMenuClassName}>\n\t\t\t\t\t{menuItems}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tconst className = \"toolbar-spacer toolbar-index-\" + this.props.index;\n\n\t\treturn (\n\t\t\t<div className={className} >\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\tshowExtendedMenu: PropTypes.bool.isRequired,\n\ttoggleExtendedMenu: PropTypes.func.isRequired,\n\tindex: PropTypes.number.isRequired,\n\tgenerateExtensionMenuItems: PropTypes.func,\n\tonFocus: PropTypes.func,\n\tlabel: PropTypes.string,\n\tsize: PropTypes.oneOf([\"md\", \"sm\"])\n};\n\nexport default ToolbarOverflowItem;\n","/*\n * Copyright 2017-2022 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-2022 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.state = {\n\t\t\tshowExtendedMenuIndex: -1\n\t\t};\n\n\t\tthis.leftBar = [];\n\t\tthis.rightBar = [];\n\n\t\tthis.onFocus = this.onFocus.bind(this);\n\t\tthis.onToolbarResize = this.onToolbarResize.bind(this);\n\t\tthis.toggleExtendedMenu = this.toggleExtendedMenu.bind(this);\n\t\tthis.generateExtensionMenuItems = this.generateExtensionMenuItems.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.state.showExtendedMenuIndex > -1) {\n\t\t\tthis.setState({ showExtendedMenuIndex: -1 });\n\t\t}\n\n\t\tthis.setLeftBarItemsTabIndex();\n\t\tthis.setRightBarItemsTabIndex();\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\toverflow={overflow}\n\t\t\t\t\t\tinstanceId={this.props.instanceId}\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\tshowExtendedMenu={this.state.showExtendedMenuIndex === index}\n\t\t\t\ttoggleExtendedMenu={this.toggleExtendedMenu}\n\t\t\t\tgenerateExtensionMenuItems={this.generateExtensionMenuItems}\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\ttoggleExtendedMenu(index) {\n\t\tconst newIndex = index === this.state.showExtendedMenuIndex ? -1 : index;\n\t\tthis.setState({ showExtendedMenuIndex: newIndex });\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,\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","_React$Component","_inherits","ToolbarActionItem","_super","_createSuper","props","_this","_classCallCheck","call","actionClickHandler","bind","_assertThisInitialized","_createClass","key","actionObj","disabled","enable","action","TOOLBAR_STOP","React","createElement","StopFilledAlt16","TOOLBAR_RUN","Play16","TOOLBAR_UNDO","Undo16","TOOLBAR_REDO","Redo16","TOOLBAR_CUT","Cut16","TOOLBAR_COPY","Copy16","TOOLBAR_PASTE","Paste16","TOOLBAR_CREATE_AUTO_COMMENT","AddComment16","TOOLBAR_SHOW_COMMENTS","Chat16","TOOLBAR_HIDE_COMMENTS","ChatOff16","TOOLBAR_DELETE_SELECTED_OBJECTS","TrashCan16","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","overflow","incLabelWithIcon","className","this","generateLabelType","inLabelWithIcon","icon","getDefaultIcon","iconEnabled","iconDisabled","customIcon","id","instanceId","evt","toolbarActionHandler","labelBefore","labelAfter","generateLabel","generateIcon","textContent","itemContentClassName","classNames","default","kind","buttonContent","wrapInTooltip","ariaLabel","Button","onClick","onFocus","size","content","showLabelAsTip","tooltip","actionName","generateActionName","tip","tooltipId","enableTooltip","jsx","direction","tooltipDirection","Tooltip","divContent","generateButton","isToolbarItem","kindAsClass","itemClassName","isSelected","Component","ToolbarOverflowItem","toggleExtendedMenu","menuItems","showExtendedMenu","generateExtensionMenuItems","subMenuClassName","overflowMenu","tabIndex","OverflowMenuVertical16","ToolbarDividerItem","apply","arguments","dividerClassName","Toolbar","state","showExtendedMenuIndex","leftBar","rightBar","onToolbarResize","setLeftBarItemsTabIndex","setRightBarItemsTabIndex","currentTarget","scroll","preventDefault","setState","bar","getBar","items","querySelectorAll","topRow","getTopOfFirstOverflowItem","lastTopRowElement","i","itemRect","getBoundingClientRect","setOverflowItemButtonTabIndex","top","setToolbarItemButtonTabIndex","getRightBarItems","side","document","querySelector","concat","firstOverflowItem","getOverflowItem","overflowClassName","getElementsByClassName","item","button","setAttribute","overflowItem","overflowButton","actionDefinitions","withSpacer","newItems","divider","push","generateOverflowIcon","generateToolbarItem","additionalText","overflowMenuLabel","leftIndex","rightItems","generateRightOverflowItems","reverse","overflowMenuBarItems","generateToolbarItems","newDefItems","rect","newIndex","config","_toConsumableArray","leftItems","toolbarSizeClass","ReactResizeDetector","handleWidth","onResize","instanceid","onScroll"],"mappings":"62BACA,IAAIA,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,EACXC,EAAWC,EAMXC,GAAa,qBAGbC,GAAa,aAGbC,GAAY,cAGZC,GAAeC,aA8CnBC,GAr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5H,KAAKtD,MAAM+D,YACxDjD,EAAAC,qBAAKsC,UAAU,mBAAmB8H,SAAU7H,KAAK6H,UAC/CN,GAEF/J,EAAAC,qBAAKsC,UAAU,qBACb8G,SAMLjD,CAAA,EAlRoBpG,EAAMsF"}
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"control.summary.error": "There are {errorMsgCount} parameters with errors. ",
|
|
42
42
|
"control.summary.warning": "There are {warningMsgCount} parameters with warnings. ",
|
|
43
43
|
"control.summary.error.warning": "There are {errorMsgCount} parameters with errors and {warningMsgCount} parameters with warnings.",
|
|
44
|
-
"required.error": "You must
|
|
44
|
+
"required.error": "You must enter a value for {label}.",
|
|
45
45
|
"datetime.format.error": "Invalid {role}. Format should be {format}.",
|
|
46
46
|
"invalid.field.error": "Invalid {label}, field not found in data set.",
|
|
47
47
|
"invalid.number.error": "Number is not valid.",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"control.summary.error": "[Esperanto~There are {errorMsgCount} parameters with errors. ~~~~~~~~~~~~~~~~eo]",
|
|
42
42
|
"control.summary.warning": "[Esperanto~There are {warningMsgCount} parameters with warnings. ~~~~~~~eo]",
|
|
43
43
|
"control.summary.error.warning": "[Esperanto~There are {errorMsgCount} parameters with errors and {warningMsgCount} parameters with warnings.~~~~~~~~~~~~~~eo]",
|
|
44
|
-
"required.error": "[Esperanto~You must
|
|
44
|
+
"required.error": "[Esperanto~You must enter a value for {label}.~~~~~~~eo]",
|
|
45
45
|
"datetime.format.error": "[Esperanto~Invalid {role}. Format should be {format}.~~~~~~~~~~~eo]",
|
|
46
46
|
"invalid.field.error": "[Esperanto~Invalid {label}, field not found in data set.~~~~~~~~~~~~~eo]",
|
|
47
47
|
"invalid.number.error": "[Esperanto~Number is not valid.~~~~~~eo]",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elyra/canvas",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.30.0",
|
|
4
4
|
"description": "Elyra common-canvas",
|
|
5
5
|
"main": "dist/common-canvas.js",
|
|
6
6
|
"module": "dist/common-canvas.es.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/runtime": "^7.16.3",
|
|
26
|
-
"@elyra/pipeline-schemas": "^3.0.
|
|
26
|
+
"@elyra/pipeline-schemas": "^3.0.68",
|
|
27
27
|
"codemirror": "^5.58.2",
|
|
28
28
|
"d3": "^7.1.1",
|
|
29
29
|
"dagre": "^0.8.5",
|
|
@@ -722,7 +722,8 @@ export default class CanvasController {
|
|
|
722
722
|
// "top-level" pipeline.
|
|
723
723
|
createNodeCommand(data, pipelineId) {
|
|
724
724
|
const pId = pipelineId || this.getCurrentPipelineId();
|
|
725
|
-
this.
|
|
725
|
+
const nodeTemplate = this.convertNodeTemplate(data.nodeTemplate);
|
|
726
|
+
this.createNodeFromTemplateAt(nodeTemplate, { x: data.offsetX, y: data.offsetY }, pId);
|
|
726
727
|
}
|
|
727
728
|
|
|
728
729
|
// Deletes the node specified.
|
|
@@ -1670,7 +1671,9 @@ export default class CanvasController {
|
|
|
1670
1671
|
|
|
1671
1672
|
getGhostNode(nodeTemplate) {
|
|
1672
1673
|
if (this.canvasContents) {
|
|
1673
|
-
|
|
1674
|
+
let node = this.convertNodeTemplate(nodeTemplate);
|
|
1675
|
+
node = this.objectModel.setNodeAttributes(node);
|
|
1676
|
+
return this.getSVGCanvasD3().getGhostNode(node);
|
|
1674
1677
|
}
|
|
1675
1678
|
return null;
|
|
1676
1679
|
}
|
|
@@ -1888,27 +1891,28 @@ export default class CanvasController {
|
|
|
1888
1891
|
}
|
|
1889
1892
|
}
|
|
1890
1893
|
|
|
1894
|
+
// Called when a node is double clicked in the palette and added to the canvas.
|
|
1895
|
+
// The nodeTemplate is in the internal format.
|
|
1891
1896
|
createAutoNode(nodeTemplate) {
|
|
1892
1897
|
const selApiPipeline = this.objectModel.getSelectionAPIPipeline();
|
|
1893
1898
|
const apiPipeline = selApiPipeline ? selApiPipeline : this.objectModel.getAPIPipeline();
|
|
1894
|
-
const newNodeTemplate = this.convertNodeTemplate(nodeTemplate);
|
|
1895
1899
|
var data = {
|
|
1896
1900
|
editType: "createAutoNode",
|
|
1897
1901
|
editSource: "canvas",
|
|
1898
|
-
nodeTemplate:
|
|
1902
|
+
nodeTemplate: nodeTemplate,
|
|
1899
1903
|
pipelineId: apiPipeline.pipelineId
|
|
1900
1904
|
};
|
|
1901
1905
|
|
|
1902
1906
|
this.editActionHandler(data);
|
|
1903
1907
|
}
|
|
1904
1908
|
|
|
1905
|
-
// Called when a node is dragged from the palette onto the canvas
|
|
1909
|
+
// Called when a node is dragged from the palette onto the canvas. The
|
|
1910
|
+
// nodeTemplate is in the internal format.
|
|
1906
1911
|
createNodeFromTemplateAt(nodeTemplate, pos, pipelineId) {
|
|
1907
|
-
const newNodeTemplate = this.convertNodeTemplate(nodeTemplate);
|
|
1908
1912
|
var data = {
|
|
1909
1913
|
editType: "createNode",
|
|
1910
1914
|
editSource: "canvas",
|
|
1911
|
-
nodeTemplate:
|
|
1915
|
+
nodeTemplate: nodeTemplate,
|
|
1912
1916
|
offsetX: pos.x,
|
|
1913
1917
|
offsetY: pos.y,
|
|
1914
1918
|
pipelineId: pipelineId
|
|
@@ -1918,14 +1922,14 @@ export default class CanvasController {
|
|
|
1918
1922
|
}
|
|
1919
1923
|
|
|
1920
1924
|
// Called when a node is dragged from the palette onto the canvas and dropped
|
|
1921
|
-
// onto an existing link between two data nodes.
|
|
1925
|
+
// onto an existing link between two data nodes. The nodeTemplate
|
|
1926
|
+
// is in the internal format.
|
|
1922
1927
|
createNodeFromTemplateOnLinkAt(nodeTemplate, link, pos, pipelineId) {
|
|
1923
|
-
|
|
1924
|
-
if (this.canNewNodeBeDroppedOnLink(newNodeTemplate)) {
|
|
1928
|
+
if (this.canNewNodeBeDroppedOnLink(nodeTemplate)) {
|
|
1925
1929
|
var data = {
|
|
1926
1930
|
editType: "createNodeOnLink",
|
|
1927
1931
|
editSource: "canvas",
|
|
1928
|
-
nodeTemplate:
|
|
1932
|
+
nodeTemplate: nodeTemplate,
|
|
1929
1933
|
offsetX: pos.x,
|
|
1930
1934
|
offsetY: pos.y,
|
|
1931
1935
|
link: link,
|
|
@@ -1937,15 +1941,15 @@ export default class CanvasController {
|
|
|
1937
1941
|
}
|
|
1938
1942
|
|
|
1939
1943
|
// Called when a node is dragged from the palette onto the canvas and dropped
|
|
1940
|
-
// onto one or more semi-detached or fully-detached links.
|
|
1944
|
+
// onto one or more semi-detached or fully-detached links. The nodeTemplate
|
|
1945
|
+
// is in the internal format.
|
|
1941
1946
|
createNodeFromTemplateAttachLinks(nodeTemplate, detachedLinks, pos, pipelineId) {
|
|
1942
|
-
const newNodeTemplate = this.convertNodeTemplate(nodeTemplate);
|
|
1943
1947
|
if (detachedLinks &&
|
|
1944
|
-
this.canNewNodeBeAttachedToLinks(
|
|
1948
|
+
this.canNewNodeBeAttachedToLinks(nodeTemplate)) {
|
|
1945
1949
|
var data = {
|
|
1946
1950
|
editType: "createNodeAttachLinks",
|
|
1947
1951
|
editSource: "canvas",
|
|
1948
|
-
nodeTemplate:
|
|
1952
|
+
nodeTemplate: nodeTemplate,
|
|
1949
1953
|
offsetX: pos.x,
|
|
1950
1954
|
offsetY: pos.y,
|
|
1951
1955
|
detachedLinks: detachedLinks,
|
|
@@ -438,6 +438,11 @@ $link-highlight-color: $support-04;
|
|
|
438
438
|
color: $icon-01;
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
// Remove the foreign object outline when the foreign object has focus.
|
|
442
|
+
.d3-foreign-object-dec-ext:focus {
|
|
443
|
+
outline: none;
|
|
444
|
+
}
|
|
445
|
+
|
|
441
446
|
/* Node ellipsis styles */
|
|
442
447
|
|
|
443
448
|
.d3-node-ellipsis-group {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { isEmpty } from "lodash";
|
|
19
19
|
import Logger from "../logging/canvas-logger.js";
|
|
20
20
|
import CanvasUtils from "./common-canvas-utils.js";
|
|
21
|
-
import { COMMENT_LINK } from "./constants/canvas-constants";
|
|
21
|
+
import { COMMENT_LINK, NODE_LINK } from "./constants/canvas-constants";
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
export default class SVGCanvasPipeline {
|
|
@@ -171,14 +171,20 @@ export default class SVGCanvasPipeline {
|
|
|
171
171
|
link.trgNode = this.getNode(link.trgNodeId);
|
|
172
172
|
|
|
173
173
|
} else {
|
|
174
|
+
// For node (port) and association links, we need to set the srcObj
|
|
175
|
+
// and trgNode field for the link.
|
|
174
176
|
link.srcObj = this.getNode(link.srcNodeId);
|
|
175
177
|
link.trgNode = this.getNode(link.trgNodeId);
|
|
176
178
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
// For node (port) links, we need to set the isPosrtConnected field
|
|
180
|
+
// for each port.
|
|
181
|
+
if (link.type === NODE_LINK) {
|
|
182
|
+
if (link.srcObj) {
|
|
183
|
+
this.setOutputPortConnected(link.srcObj, link.srcNodePortId);
|
|
184
|
+
}
|
|
185
|
+
if (link.trgNode) {
|
|
186
|
+
this.setInputPortConnected(link.trgNode, link.trgNodePortId);
|
|
187
|
+
}
|
|
182
188
|
}
|
|
183
189
|
}
|
|
184
190
|
});
|