@elyra/canvas 12.43.0 → 12.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/{canvas-constants-acb99f64.js → canvas-constants-3bbfc8b1.js} +2 -2
  2. package/dist/{canvas-constants-acb99f64.js.map → canvas-constants-3bbfc8b1.js.map} +1 -1
  3. package/dist/{canvas-constants-ff5cf88e.js → canvas-constants-8d240dc6.js} +2 -2
  4. package/dist/{canvas-constants-ff5cf88e.js.map → canvas-constants-8d240dc6.js.map} +1 -1
  5. package/dist/canvas-controller-a926ab2b.js +2 -0
  6. package/dist/canvas-controller-a926ab2b.js.map +1 -0
  7. package/dist/canvas-controller-e2503333.js +2 -0
  8. package/dist/canvas-controller-e2503333.js.map +1 -0
  9. package/dist/{canvas-logger-295dafe4.js → canvas-logger-6f4b2551.js} +2 -2
  10. package/dist/{canvas-logger-295dafe4.js.map → canvas-logger-6f4b2551.js.map} +1 -1
  11. package/dist/{canvas-logger-e07a0b4a.js → canvas-logger-ab9d9048.js} +2 -2
  12. package/dist/{canvas-logger-e07a0b4a.js.map → canvas-logger-ab9d9048.js.map} +1 -1
  13. package/dist/common-canvas-41b0454f.js +2 -0
  14. package/dist/common-canvas-41b0454f.js.map +1 -0
  15. package/dist/common-canvas-460a4434.js +2 -0
  16. package/dist/common-canvas-460a4434.js.map +1 -0
  17. package/dist/common-canvas.es.js +1 -1
  18. package/dist/common-canvas.js +1 -1
  19. package/dist/common-properties-b25b4855.js +2 -0
  20. package/dist/{common-properties-08707efe.js.map → common-properties-b25b4855.js.map} +1 -1
  21. package/dist/common-properties-e262caa2.js +2 -0
  22. package/dist/{common-properties-acd55e94.js.map → common-properties-e262caa2.js.map} +1 -1
  23. package/dist/context-menu-wrapper-949393c7.js +2 -0
  24. package/dist/{context-menu-wrapper-e4a7ab4d.js.map → context-menu-wrapper-949393c7.js.map} +1 -1
  25. package/dist/context-menu-wrapper-f62dfcdb.js +2 -0
  26. package/dist/{context-menu-wrapper-271eb2df.js.map → context-menu-wrapper-f62dfcdb.js.map} +1 -1
  27. package/dist/{createClass-440000a3.js → createClass-02596015.js} +2 -2
  28. package/dist/createClass-02596015.js.map +1 -0
  29. package/dist/createClass-155bf7da.js +2 -0
  30. package/dist/createClass-155bf7da.js.map +1 -0
  31. package/dist/datarecord-metadata-v3-schema-2311ecab.js +2 -0
  32. package/dist/{datarecord-metadata-v3-schema-03427296.js.map → datarecord-metadata-v3-schema-2311ecab.js.map} +1 -1
  33. package/dist/datarecord-metadata-v3-schema-d279dbb0.js +2 -0
  34. package/dist/{datarecord-metadata-v3-schema-dba0b214.js.map → datarecord-metadata-v3-schema-d279dbb0.js.map} +1 -1
  35. package/dist/defineProperty-ad55dbff.js +2 -0
  36. package/dist/{defineProperty-3dc7d8d0.js.map → defineProperty-ad55dbff.js.map} +1 -1
  37. package/dist/{defineProperty-6d406743.js → defineProperty-bcc9968d.js} +2 -2
  38. package/dist/{defineProperty-6d406743.js.map → defineProperty-bcc9968d.js.map} +1 -1
  39. package/dist/flexible-table-c6a8b402.js +2 -0
  40. package/dist/{flexible-table-107ca2fd.js.map → flexible-table-c6a8b402.js.map} +1 -1
  41. package/dist/flexible-table-f7b294a0.js +2 -0
  42. package/dist/{flexible-table-5cc1ad6b.js.map → flexible-table-f7b294a0.js.map} +1 -1
  43. package/dist/{icon-2caf035c.js → icon-65758bb8.js} +2 -2
  44. package/dist/{icon-2caf035c.js.map → icon-65758bb8.js.map} +1 -1
  45. package/dist/{icon-e622f99b.js → icon-b3738f1f.js} +2 -2
  46. package/dist/{icon-e622f99b.js.map → icon-b3738f1f.js.map} +1 -1
  47. package/dist/index-9eeda306.js +2 -0
  48. package/dist/{index-5dac3da8.js.map → index-9eeda306.js.map} +1 -1
  49. package/dist/index-d3371fd0.js +2 -0
  50. package/dist/{index-fee06179.js.map → index-d3371fd0.js.map} +1 -1
  51. package/dist/inherits-42ae8426.js +2 -0
  52. package/dist/inherits-42ae8426.js.map +1 -0
  53. package/dist/inherits-75817f22.js +2 -0
  54. package/dist/inherits-75817f22.js.map +1 -0
  55. package/dist/isArrayLikeObject-04f333a5.js +1 -1
  56. package/dist/isArrayLikeObject-04f333a5.js.map +1 -1
  57. package/dist/isArrayLikeObject-7a30aa4b.js +1 -1
  58. package/dist/isArrayLikeObject-7a30aa4b.js.map +1 -1
  59. package/dist/lib/canvas-controller.es.js +1 -1
  60. package/dist/lib/canvas-controller.js +1 -1
  61. package/dist/lib/canvas.es.js +1 -1
  62. package/dist/lib/canvas.js +1 -1
  63. package/dist/lib/command-stack.es.js +1 -1
  64. package/dist/lib/command-stack.es.js.map +1 -1
  65. package/dist/lib/command-stack.js +1 -1
  66. package/dist/lib/command-stack.js.map +1 -1
  67. package/dist/lib/context-menu.es.js +1 -1
  68. package/dist/lib/context-menu.js +1 -1
  69. package/dist/lib/properties/field-picker.es.js +1 -1
  70. package/dist/lib/properties/field-picker.js +1 -1
  71. package/dist/lib/properties/flexible-table.es.js +1 -1
  72. package/dist/lib/properties/flexible-table.js +1 -1
  73. package/dist/lib/properties.es.js +1 -1
  74. package/dist/lib/properties.js +1 -1
  75. package/dist/lib/tooltip.es.js +1 -1
  76. package/dist/lib/tooltip.es.js.map +1 -1
  77. package/dist/lib/tooltip.js +1 -1
  78. package/dist/lib/tooltip.js.map +1 -1
  79. package/dist/styles/common-canvas.min.css +1 -1
  80. package/dist/styles/common-canvas.min.css.map +1 -1
  81. package/dist/toolbar-6af353fa.js +2 -0
  82. package/dist/toolbar-6af353fa.js.map +1 -0
  83. package/dist/toolbar-c4e22755.js +2 -0
  84. package/dist/toolbar-c4e22755.js.map +1 -0
  85. package/locales/command-actions/locales/en.json +1 -0
  86. package/locales/command-actions/locales/eo.json +1 -0
  87. package/package.json +2 -2
  88. package/src/command-actions/sizeAndPositionObjectsAction.js +4 -0
  89. package/src/command-stack/command-stack.js +4 -0
  90. package/src/common-canvas/canvas-controller.js +47 -10
  91. package/src/common-canvas/cc-context-toolbar.jsx +46 -2
  92. package/src/common-canvas/cc-toolbar.jsx +12 -4
  93. package/src/common-canvas/common-canvas-utils.js +73 -2
  94. package/src/common-canvas/common-canvas.scss +5 -5
  95. package/src/common-canvas/constants/canvas-constants.js +1 -0
  96. package/src/common-canvas/svg-canvas-d3.js +2 -2
  97. package/src/common-canvas/svg-canvas-pipeline.js +1 -1
  98. package/src/common-canvas/svg-canvas-renderer.js +142 -75
  99. package/src/common-canvas/svg-canvas-utils-drag-objects.js +3 -0
  100. package/src/common-canvas/svg-canvas-utils-external.js +1 -1
  101. package/src/common-canvas/svg-canvas-utils-links.js +28 -32
  102. package/src/common-canvas/svg-canvas-utils-nodes.js +5 -13
  103. package/src/common-canvas/svg-canvas-utils-zoom.js +5 -4
  104. package/src/icons/icon.scss +1 -1
  105. package/src/object-model/config-utils.js +2 -2
  106. package/src/object-model/layout-dimensions.js +82 -87
  107. package/src/object-model/object-model-utils.js +271 -0
  108. package/src/object-model/object-model.js +28 -240
  109. package/src/toolbar/toolbar-action-item.jsx +2 -1
  110. package/src/toolbar/toolbar-button-item.jsx +3 -2
  111. package/src/toolbar/toolbar-overflow-item.jsx +10 -4
  112. package/src/toolbar/toolbar.jsx +5 -2
  113. package/src/toolbar/toolbar.scss +28 -31
  114. package/stats.html +1 -1
  115. package/dist/canvas-controller-6726b9ac.js +0 -2
  116. package/dist/canvas-controller-6726b9ac.js.map +0 -1
  117. package/dist/canvas-controller-6c6bc68f.js +0 -2
  118. package/dist/canvas-controller-6c6bc68f.js.map +0 -1
  119. package/dist/common-canvas-9374ef35.js +0 -2
  120. package/dist/common-canvas-9374ef35.js.map +0 -1
  121. package/dist/common-canvas-a6435bdb.js +0 -2
  122. package/dist/common-canvas-a6435bdb.js.map +0 -1
  123. package/dist/common-properties-08707efe.js +0 -2
  124. package/dist/common-properties-acd55e94.js +0 -2
  125. package/dist/context-menu-wrapper-271eb2df.js +0 -2
  126. package/dist/context-menu-wrapper-e4a7ab4d.js +0 -2
  127. package/dist/createClass-440000a3.js.map +0 -1
  128. package/dist/createClass-5ca26865.js +0 -2
  129. package/dist/createClass-5ca26865.js.map +0 -1
  130. package/dist/datarecord-metadata-v3-schema-03427296.js +0 -2
  131. package/dist/datarecord-metadata-v3-schema-dba0b214.js +0 -2
  132. package/dist/defineProperty-3dc7d8d0.js +0 -2
  133. package/dist/flexible-table-107ca2fd.js +0 -2
  134. package/dist/flexible-table-5cc1ad6b.js +0 -2
  135. package/dist/index-5dac3da8.js +0 -2
  136. package/dist/index-fee06179.js +0 -2
  137. package/dist/inherits-226dfdb2.js +0 -2
  138. package/dist/inherits-226dfdb2.js.map +0 -1
  139. package/dist/inherits-41673c87.js +0 -2
  140. package/dist/inherits-41673c87.js.map +0 -1
  141. package/dist/toolbar-ccc1d600.js +0 -2
  142. package/dist/toolbar-ccc1d600.js.map +0 -1
  143. package/dist/toolbar-e4445bf8.js +0 -2
  144. package/dist/toolbar-e4445bf8.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./createClass-155bf7da.js"),t=require("./inherits-75817f22.js"),n=require("react"),o=require("./defineProperty-bcc9968d.js"),r=require("@carbon/icons-react"),i=require("./canvas-logger-6f4b2551.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(n);function a(e,n,o){return n=t._getPrototypeOf(n),t._possibleConstructorReturn(e,s()?Reflect.construct(n,o||[],t._getPrototypeOf(e).constructor):n.apply(e,o))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}var u=function(n){function o(t){var n;e._classCallCheck(this,o),(n=a(this,o,[t])).logger=new i.Logger("CC-Color-Picker"),n.colorIndex=0,n.refss=[];for(var r=0;r<12;r++)n.refss.push(c.default.createRef());return n.onClick=n.onClick.bind(n),n.onKeyDown=n.onKeyDown.bind(n),n}return t._inherits(o,n),e._createClass(o,[{key:"componentDidMount",value:function(){this.setFocus(this.colorIndex)}},{key:"onClick",value:function(e){e.stopPropagation(),this.selectColor(e)}},{key:"onKeyDown",value:function(e){if(39===e.keyCode)e.stopPropagation(),this.colorIndex++,this.colorIndex>11&&(this.colorIndex=0);else if(37===e.keyCode)e.stopPropagation(),this.colorIndex--,this.colorIndex<0&&(this.colorIndex=11);else if(38===e.keyCode)e.stopPropagation(),this.colorIndex-=6,this.colorIndex<0&&(this.colorIndex+=6);else if(40===e.keyCode)e.stopPropagation(),this.colorIndex+=6,this.colorIndex>11&&(this.colorIndex-=6);else if(32===e.keyCode||13===e.keyCode)e.stopPropagation(),e.preventDefault(),this.selectColor(e);else if(9===e.keyCode)return e.stopPropagation(),void e.preventDefault();this.setFocus(this.colorIndex)}},{key:"setFocus",value:function(e){this.refss[e].current.focus()}},{key:"selectColor",value:function(e){var t=e.target.dataset.color;this.props.subPanelData.clickActionHandler(t),this.props.closeSubPanel()}},{key:"render",value:function(){return this.logger.log("render"),c.default.createElement("div",{className:"color-picker",tabIndex:"-1",onClick:this.onClick,onKeyDown:this.onKeyDown},c.default.createElement("div",{ref:this.refss[0],tabIndex:"-1","data-color":"bkg-col-white-0",className:"color-picker-item white-0"}),c.default.createElement("div",{ref:this.refss[1],tabIndex:"-1","data-color":"bkg-col-yellow-20",className:"color-picker-item yellow-20"}),c.default.createElement("div",{ref:this.refss[2],tabIndex:"-1","data-color":"bkg-col-gray-20",className:"color-picker-item gray-20"}),c.default.createElement("div",{ref:this.refss[3],tabIndex:"-1","data-color":"bkg-col-green-20",className:"color-picker-item green-20"}),c.default.createElement("div",{ref:this.refss[4],tabIndex:"-1","data-color":"bkg-col-teal-20",className:"color-picker-item teal-20"}),c.default.createElement("div",{ref:this.refss[5],tabIndex:"-1","data-color":"bkg-col-cyan-20",className:"color-picker-item cyan-20"}),c.default.createElement("div",{ref:this.refss[6],tabIndex:"-1","data-color":"bkg-col-red-50",className:"color-picker-item red-50"}),c.default.createElement("div",{ref:this.refss[7],tabIndex:"-1","data-color":"bkg-col-orange-40",className:"color-picker-item orange-40"}),c.default.createElement("div",{ref:this.refss[8],tabIndex:"-1","data-color":"bkg-col-gray-50",className:"color-picker-item gray-50"}),c.default.createElement("div",{ref:this.refss[9],tabIndex:"-1","data-color":"bkg-col-green-50",className:"color-picker-item green-50"}),c.default.createElement("div",{ref:this.refss[10],tabIndex:"-1","data-color":"bkg-col-teal-50",className:"color-picker-item teal-50"}),c.default.createElement("div",{ref:this.refss[11],tabIndex:"-1","data-color":"bkg-col-cyan-50",className:"color-picker-item cyan-50"}))}}])}(c.default.Component);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o._defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,n,o){return n=t._getPrototypeOf(n),t._possibleConstructorReturn(e,p()?Reflect.construct(n,o||[],t._getPrototypeOf(e).constructor):n.apply(e,o))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var v=function(n){function o(t){var n;return e._classCallCheck(this,o),(n=h(this,o,[t])).state={displaySubMenuAction:""},n.itemSelected=n.itemSelected.bind(n),n.colorClicked=n.colorClicked.bind(n),n}return t._inherits(o,n),e._createClass(o,[{key:"onContextMenu",value:function(e){e.preventDefault()}},{key:"itemSelected",value:function(e,t){this.props.contextHandler(e),t&&t.stopPropagation()}},{key:"colorClicked",value:function(e){this.props.contextHandler("colorSelectedObjects",{color:e})}},{key:"calculateMenuSize",value:function(e){for(var t=0,n=0;n<e.length;++n){e[n].divider&&t++}return{height:30*(e.length-t)+1*t,width:160}}},{key:"calculateMenuPos",value:function(e,t,n){var o={x:e.x,y:e.y};return e.y+t.height>n.height&&(o.y=n.height-t.height-5,o.y<0&&(o.y=0)),e.x+t.width>n.width&&(o.x-=t.width),o.x+=1,o.y+=1,o}},{key:"areAllSubmenuItemsDisabled",value:function(e){var t=0,n=0;return e.forEach((function(e){e.divider||t++,!1===e.enable&&n++})),n===t}},{key:"buildMenu",value:function(e,t,n,o){for(var r=[],i=0,l=!1,a=0;a<e.length;++a){var s=e[a].divider,u=e[a].submenu;if(s)l||(r.push(c.default.createElement("div",{key:a+1,className:"context-menu-divider"})),i+=1,l=!0);else if("colorBackground"===e[a].action){l=!1;var d={width:160,height:50},f=this.buildColorPickerPanel(),h=this.buildSubMenu(e,a,f,i,n,t,d,o,!1);r.push(h),i+=30}else if(u){l=!1;var p=this.areAllSubmenuItemsDisabled(e[a].menu),v=this.calculateMenuSize(e[a].menu),m=this.buildMenu(e[a].menu,t,n,o),b=this.buildSubMenu(e,a,m,i,n,t,v,o,p);r.push(b),i+=30}else{l=!1;var y="context-menu-item"+(!1===e[a].enable?" disabled":""),k=!1===e[a].enable?null:this.itemSelected.bind(null,e[a].action);r.push(c.default.createElement("div",{key:a+1,className:y,onClick:k,role:"menuitem"},e[a].label)),i+=30}}return r}},{key:"buildColorPickerPanel",value:function(){var e=this,t={clickActionHandler:function(t){return e.colorClicked(t)}};return c.default.createElement(u,{subPanelData:t,closeSubPanel:function(){return null}})}},{key:"subMenuMouseEnter",value:function(e){this.setState({displaySubMenuAction:e})}},{key:"subMenuMouseLeave",value:function(e){this.setState({displaySubMenuAction:""})}},{key:"buildSubMenu",value:function(e,t,n,o,i,l,a,s,u){var d=this.buildRtlState(i,l,a,s),f=this.buildSubMenuPosStyle(o,i,a,s,d),h=e[t],p=c.default.createElement(r.ChevronRight16,null),v=c.default.createElement("div",null,h.label,p," "),m="context-menu-item "+(u?" disabled":""),b="context-menu-popover context-menu-submenu"+(this.state.displaySubMenuAction===h.action?" context-menu--visible":""),y=u?null:this.subMenuMouseEnter.bind(this,h.action),k=u?null:this.subMenuMouseLeave.bind(this);return c.default.createElement("div",{key:t+1,className:m,"aria-haspopup":!0,role:"menuitem",onMouseEnter:y,onMouseLeave:k},v,c.default.createElement("div",{style:f,className:b},n))}},{key:"buildRtlState",value:function(e,t,n,o){return e.x+t.width+n.width>o.right}},{key:"buildSubMenuPosStyle",value:function(e,t,n,o,r){var i=o.bottom-(t.y+e+n.height),l={top:(i>0?0:i-5)+"px"};return r&&(l.left="-160px"),l}},{key:"ensureAllSubMenuItemsHaveAction",value:function(e){return e.map((function(e,t){return e.submenu&&void 0===e.action?f(f({},e),{},{action:"submenu_"+t}):e}))}},{key:"render",value:function(){var e=this.calculateMenuSize(this.props.menuDefinition),t=this.calculateMenuPos(this.props.mousePos,e,this.props.canvasRect),n={left:t.x+"px",top:t.y+"px"},o=this.ensureAllSubMenuItemsHaveAction(this.props.menuDefinition),r=this.buildMenu(o,e,t,this.props.canvasRect);return c.default.createElement("div",{id:"context-menu-popover",className:"context-menu-popover",style:n,onContextMenu:this.onContextMenu},r)}}])}(c.default.Component);function m(e,n,o){return n=t._getPrototypeOf(n),t._possibleConstructorReturn(e,b()?Reflect.construct(n,o||[],t._getPrototypeOf(e).constructor):n.apply(e,o))}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y=function(n){function o(t){var n;return e._classCallCheck(this,o),(n=m(this,o,[t])).state={},n.contextMenuClicked=n.contextMenuClicked.bind(n),n.handleClickOutside=n.handleClickOutside.bind(n),n}return t._inherits(o,n),e._createClass(o,[{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleClickOutside,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleClickOutside,!0)}},{key:"getCanvasRect",value:function(){var e=document.getElementById(this.props.containingDivId);if(e){var t=e.getBoundingClientRect();return{top:0,bottom:t.bottom-t.top,left:0,right:t.right-t.left,height:t.height,width:t.width}}return{top:0,bottom:200,left:0,right:50,height:200,width:50}}},{key:"handleClickOutside",value:function(e){e.ctrlKey?e.stopPropagation():this.isOverContextMenu(e)||this.isOverEllipsisButton(e)||(this.props.stopPropagation&&e.stopPropagation(),this.props.closeContextMenu())}},{key:"isOverContextMenu",value:function(e){var t=document.getElementById("context-menu-popover");return!t||t.contains(e.target)}},{key:"isOverEllipsisButton",value:function(e){for(var t=document.getElementsByClassName("d3-node-ellipsis-group"),n=!1,o=0;o<t.length;o++)!1===n&&t[o].contains(e.target)&&(n=!0);return n}},{key:"contextMenuClicked",value:function(e,t){this.props.contextMenuActionHandler(e,t)}},{key:"render",value:function(){return c.default.createElement(v,{contextHandler:this.contextMenuClicked,menuDefinition:this.props.contextMenuDef,canvasRect:this.getCanvasRect(),mousePos:this.props.contextMenuPos})}}])}(c.default.Component);exports.ColorPicker=u,exports.ContextMenuWrapper=y;
2
+ //# sourceMappingURL=context-menu-wrapper-949393c7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu-wrapper-e4a7ab4d.js","sources":["../src/color-picker/color-picker.jsx","../src/context-menu/common-context-menu.jsx","../src/context-menu/context-menu-wrapper.jsx"],"sourcesContent":["/*\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 Logger from \"../logging/canvas-logger.js\";\n\nconst TAB_KEY = 9;\nconst RETURN_KEY = 13;\nconst SPACE_KEY = 32;\nconst LEFT_ARROW_KEY = 37;\nconst UP_ARROW_KEY = 38;\nconst RIGHT_ARROW_KEY = 39;\nconst DOWN_ARROW_KEY = 40;\n\n// These values must reflect the layout of the color picker panel\n// decribed by the SCSS/CSS.\nconst COLORS_IN_ROW = 6;\nconst TOTAL_COLORS = 12;\n\nclass ColorPicker extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.logger = new Logger(\"CC-Color-Picker\");\n\n\t\tthis.colorIndex = 0;\n\n\t\tthis.refss = [];\n\t\tfor (let i = 0; i < TOTAL_COLORS; i++) {\n\t\t\tthis.refss.push(React.createRef());\n\t\t}\n\t\tthis.onClick = this.onClick.bind(this);\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tonClick(evt) {\n\t\tevt.stopPropagation();\n\t\tthis.selectColor(evt);\n\t}\n\n\tonKeyDown(evt) {\n\t\tif (evt.keyCode === RIGHT_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex++;\n\t\t\tif (this.colorIndex > TOTAL_COLORS - 1) {\n\t\t\t\tthis.colorIndex = 0;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === LEFT_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex--;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex = TOTAL_COLORS - 1;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === UP_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex -= COLORS_IN_ROW;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex += COLORS_IN_ROW;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === DOWN_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex += COLORS_IN_ROW;\n\t\t\tif (this.colorIndex > 11) {\n\t\t\t\tthis.colorIndex -= COLORS_IN_ROW;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === SPACE_KEY ||\n\t\t\t\t\tevt.keyCode === RETURN_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\tthis.selectColor(evt);\n\n\t\t} else if (evt.keyCode === TAB_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tsetFocus(index) {\n\t\tthis.refss[index].current.focus();\n\t}\n\n\tselectColor(evt) {\n\t\tconst color = evt.target.dataset.color;\n\t\tthis.props.subPanelData.clickActionHandler(color);\n\t\tthis.props.closeSubPanel();\n\t}\n\n\trender() {\n\t\tthis.logger.log(\"render\");\n\t\treturn (\n\t\t\t<div className=\"color-picker\" tabIndex={\"-1\"} onClick={this.onClick} onKeyDown={this.onKeyDown}>\n\t\t\t\t<div ref={this.refss[0]} tabIndex={\"-1\"} data-color={\"bkg-col-white-0\"} className=\"color-picker-item white-0\" />\n\t\t\t\t<div ref={this.refss[1]} tabIndex={\"-1\"} data-color={\"bkg-col-yellow-20\"} className=\"color-picker-item yellow-20\" />\n\t\t\t\t<div ref={this.refss[2]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-20\"} className=\"color-picker-item gray-20\" />\n\t\t\t\t<div ref={this.refss[3]} tabIndex={\"-1\"} data-color={\"bkg-col-green-20\"} className=\"color-picker-item green-20\" />\n\t\t\t\t<div ref={this.refss[4]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-20\"} className=\"color-picker-item teal-20\" />\n\t\t\t\t<div ref={this.refss[5]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-20\"} className=\"color-picker-item cyan-20\" />\n\n\t\t\t\t<div ref={this.refss[6]} tabIndex={\"-1\"} data-color={\"bkg-col-red-50\"} className=\"color-picker-item red-50\" />\n\t\t\t\t<div ref={this.refss[7]} tabIndex={\"-1\"} data-color={\"bkg-col-orange-40\"} className=\"color-picker-item orange-40\" />\n\t\t\t\t<div ref={this.refss[8]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-50\"} className=\"color-picker-item gray-50\" />\n\t\t\t\t<div ref={this.refss[9]} tabIndex={\"-1\"} data-color={\"bkg-col-green-50\"} className=\"color-picker-item green-50\" />\n\t\t\t\t<div ref={this.refss[10]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-50\"} className=\"color-picker-item teal-50\" />\n\t\t\t\t<div ref={this.refss[11]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-50\"} className=\"color-picker-item cyan-50\" />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nColorPicker.propTypes = {\n\tcloseSubPanel: PropTypes.func,\n\tsubPanelData: PropTypes.object\n};\n\nexport default ColorPicker;\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/* eslint no-empty-function: [\"error\", { \"allow\": [\"arrowFunctions\"] }] */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ChevronRight16 } from \"@carbon/icons-react\";\nimport ColorPicker from \"../color-picker\";\n\n// context-menu sizing\nconst CONTEXT_MENU_WIDTH = 160; // See context-menu.scss\nconst CONTEXT_MENU_LINK_HEIGHT = 30; // See context-menu.scss\nconst CONTEXT_MENU_DIVIDER_HEIGHT = 1; // See context-menu.scss\nconst EXTRA_OFFSET = 5; // Extra offset for vertical menu positioning\n\n\nclass CommonContextMenu extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdisplaySubMenuAction: \"\"\n\t\t};\n\t\tthis.itemSelected = this.itemSelected.bind(this);\n\t\tthis.colorClicked = this.colorClicked.bind(this);\n\t}\n\n\tonContextMenu(e) {\n\t\te.preventDefault();\n\t}\n\n\titemSelected(data, selectedEvent) {\n\t\tthis.props.contextHandler(data);\n\t\t// This stops the canvasClicked function from being fired which would\n\t\t// clear any current selections.\n\t\tif (selectedEvent) {\n\t\t\tselectedEvent.stopPropagation();\n\t\t}\n\t}\n\n\tcolorClicked(color) {\n\t\tthis.props.contextHandler(\"colorSelectedObjects\", { color });\n\t}\n\n\t// Returns the size of the menu passed in.\n\tcalculateMenuSize(menu) {\n\t\tvar numDividers = 0;\n\t\tfor (let i = 0; i < menu.length; ++i) {\n\t\t\tconst divider = menu[i].divider;\n\t\t\tif (divider) {\n\t\t\t\tnumDividers++;\n\t\t\t}\n\t\t}\n\n\t\tvar menuSize = {\n\t\t\theight: ((menu.length - numDividers) * CONTEXT_MENU_LINK_HEIGHT) + (numDividers * CONTEXT_MENU_DIVIDER_HEIGHT),\n\t\t\twidth: CONTEXT_MENU_WIDTH\n\t\t};\n\n\t\treturn menuSize;\n\t}\n\n\t// Returns a new position and the canvas rectangle for the context menu based on the current\n\t// mouse position and whether the menu would appear outside the edges of the page.\n\tcalculateMenuPos(mousePos, menuSize, canvasRect) {\n\t\tconst menuPos = { x: mousePos.x, y: mousePos.y };\n\n\t\t// Reposition contextMenu if it will show off the bottom of the page\n\t\tif (mousePos.y + menuSize.height > canvasRect.height) {\n\t\t\tmenuPos.y = canvasRect.height - menuSize.height - EXTRA_OFFSET; // Move up by extra offset so it looks nice\n\n\t\t\t// If repositioning the menu would push it off the top of the page\n\t\t\t// (in very short browser windows) position it at the top.\n\t\t\tif (menuPos.y < 0) {\n\t\t\t\tmenuPos.y = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Reposition contextMenu if it will show off the right of the page\n\t\tif (mousePos.x + menuSize.width > canvasRect.width) {\n\t\t\tmenuPos.x -= menuSize.width;\n\t\t}\n\n\t\t// Add a pixel to x and y because on Chrome without this the context menu\n\t\t// appears with the top corner of the first menu item under the mouse\n\t\t// cursor. This highlights the first menu item (which looks weird) and, if\n\t\t// the first item is a cascade menu, automatically opens the sub-menu.\n\t\tmenuPos.x += 1;\n\t\tmenuPos.y += 1;\n\n\t\treturn menuPos;\n\t}\n\n\t// Returns true of all the items in a sub-menu are disabled.\n\tareAllSubmenuItemsDisabled(submenuItems) {\n\t\tlet itemCount = 0;\n\t\tlet disabledCount = 0;\n\t\tsubmenuItems.forEach(function(submenuItem) {\n\t\t\tif (!submenuItem.divider) {\n\t\t\t\titemCount++;\n\t\t\t}\n\t\t\tif (submenuItem.enable === false) {\n\t\t\t\tdisabledCount++;\n\t\t\t}\n\t\t});\n\t\treturn disabledCount === itemCount;\n\t}\n\n\t// Builds a new menu based on the menu defintion passed in.\n\tbuildMenu(menuDefinition, menuSize, menuPos, canvasRect) {\n\t\tconst menuItems = [];\n\n\t\tlet runningYPos = 0;\n\t\t// Records if we have just displayed a divider. This is useful because we\n\t\t// only want to display one divider if there is a divider element\n\t\t// immediately after another divider element in the menuDefintion array.\n\t\tlet previousDivider = false;\n\n\t\tfor (let i = 0; i < menuDefinition.length; ++i) {\n\t\t\tconst divider = menuDefinition[i].divider;\n\t\t\tconst submenu = menuDefinition[i].submenu;\n\n\t\t\tif (divider) {\n\t\t\t\tif (!previousDivider) {\n\t\t\t\t\tmenuItems.push(<div key={i + 1} className={\"context-menu-divider\"} />);\n\t\t\t\t\trunningYPos += CONTEXT_MENU_DIVIDER_HEIGHT;\n\t\t\t\t\tpreviousDivider = true;\n\t\t\t\t}\n\t\t\t} else if (menuDefinition[i].action === \"colorBackground\") {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst disabled = false;\n\t\t\t\tconst subMenuSize = { width: CONTEXT_MENU_WIDTH, height: 50 };\n\t\t\t\tconst subMenuContent = this.buildColorPickerPanel();\n\n\t\t\t\tconst subMenu = this.buildSubMenu(\n\t\t\t\t\tmenuDefinition, i, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\t\t\t\tmenuItems.push(subMenu);\n\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\n\t\t\t} else if (submenu) {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst disabled = this.areAllSubmenuItemsDisabled(menuDefinition[i].menu);\n\t\t\t\tconst subMenuSize = this.calculateMenuSize(menuDefinition[i].menu);\n\t\t\t\tconst subMenuContent = this.buildMenu(menuDefinition[i].menu, menuSize, menuPos, canvasRect);\n\n\t\t\t\tconst subMenu = this.buildSubMenu(\n\t\t\t\t\tmenuDefinition, i, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\t\t\t\tmenuItems.push(subMenu);\n\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\n\t\t\t} else {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst className = \"context-menu-item\" +\n\t\t\t\t\t(menuDefinition[i].enable === false ? \" disabled\" : \"\");\n\n\t\t\t\tconst onClickFunction = menuDefinition[i].enable === false\n\t\t\t\t\t? null\n\t\t\t\t\t: this.itemSelected.bind(null, menuDefinition[i].action);\n\n\t\t\t\tmenuItems.push((\n\t\t\t\t\t<div key={i + 1} className={className} onClick={onClickFunction} role=\"menuitem\">\n\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t</div>\n\t\t\t\t));\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\t\t\t}\n\t\t}\n\t\treturn menuItems;\n\t}\n\n\tbuildColorPickerPanel() {\n\t\tconst subPanelData = {\n\t\t\tclickActionHandler: (c) => this.colorClicked(c)\n\t\t};\n\t\treturn (\n\t\t\t<ColorPicker subPanelData={subPanelData} closeSubPanel={() => null} />\n\t\t);\n\t}\n\n\tsubMenuMouseEnter(action) {\n\t\tthis.setState({ displaySubMenuAction: action });\n\t}\n\n\tsubMenuMouseLeave(action) {\n\t\tthis.setState({ displaySubMenuAction: \"\" });\n\t}\n\n\t// Builds a sub-menu for the menuitem identified by the index into the menudefintion.\n\tbuildSubMenu(menuDefinition, index, subMenuContent, runningYPos, menuPos,\n\t\tmenuSize, subMenuSize, canvasRect, disabled) {\n\t\tconst rtl = this.buildRtlState(menuPos, menuSize, subMenuSize, canvasRect);\n\t\tconst subMenuPosStyle = this.buildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl);\n\t\tconst menuItem = menuDefinition[index];\n\n\t\tconst icon = (<ChevronRight16 />);\n\t\tconst menuItemContent = <div>{menuItem.label}{icon} </div>;\n\t\tconst menuItemClass = \"context-menu-item \" + (disabled ? \" disabled\" : \"\");\n\t\tconst subMenuClass = \"context-menu-popover context-menu-submenu\" +\n\t\t\t(this.state.displaySubMenuAction === menuItem.action ? \" context-menu--visible\" : \"\");\n\t\tconst onMouseEnter = (disabled ? null : this.subMenuMouseEnter.bind(this, menuItem.action));\n\t\tconst onMouseLeave = (disabled ? null : this.subMenuMouseLeave.bind(this));\n\n\t\treturn (\n\t\t\t<div key={index + 1} className={menuItemClass} aria-haspopup role=\"menuitem\"\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t>\n\t\t\t\t{menuItemContent}\n\t\t\t\t<div style={subMenuPosStyle} className={subMenuClass}>\n\t\t\t\t\t{subMenuContent}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Returns a boolean to indicate whether the submenu should appear on the\n\t// right of the context menu (rtl === false) or on the left of the context\n\t// menu (rtl === true).\n\tbuildRtlState(menuPos, menuSize, subMenuSize, canvasRect) {\n\t\t// Ensure that the combined menu position, plus the menu width,\n\t\t// plus the submenu width, does not exceed the viewport bounds.\n\t\treturn (menuPos.x + menuSize.width + subMenuSize.width > canvasRect.right);\n\t}\n\n\t// Returns a style object that can be applied to the sub-menu to adjust its:\n\t// * vertical (y) position: If the submenu is tall enough that it would be\n\t// displayed off the bottom of the canvas area.\n\t// * horizontal (x) position: If the sub-menu needs to appear on the left\n\t// side of the main menu (rtl === true).\n\tbuildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl) {\n\t\t// Does the submenu go below the bottom of the viewport?\n\t\tconst y = canvasRect.bottom - (menuPos.y + runningYPos + subMenuSize.height);\n\n\t\t// If submenu is not below the viewport bottom set offset to 0 so the\n\t\t// submenu will not be moved. Otherwise, y will be used to move the\n\t\t// submenu up fully into the view port.\n\t\tconst offset = (y > 0) ? 0 : y - EXTRA_OFFSET;\n\n\t\tconst subMenuPosStyle = {\n\t\t\ttop: offset + \"px\" // Use negative to push the menu up\n\t\t};\n\n\t\tif (rtl) {\n\t\t\tsubMenuPosStyle.left = -CONTEXT_MENU_WIDTH + \"px\";\n\t\t}\n\n\t\treturn subMenuPosStyle;\n\t}\n\n\t// Returns the menu definition array passed in making sure any\n\t// submenu items have an action. Note: some applications forget\n\t// to do provide an action because for the submenu it is only\n\t// used by the context menu code.\n\tensureAllSubMenuItemsHaveAction(menuDef) {\n\t\treturn menuDef.map((item, index) => {\n\t\t\tif (item.submenu && typeof item.action === \"undefined\") {\n\t\t\t\treturn { ...item, action: \"submenu_\" + index };\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t}\n\n\trender() {\n\t\t// Reposition contextMenu so that it does not show off the screen\n\t\tconst menuSize = this.calculateMenuSize(this.props.menuDefinition);\n\t\tconst menuPos = this.calculateMenuPos(this.props.mousePos, menuSize, this.props.canvasRect);\n\t\tconst posStyle = {\n\t\t\tleft: menuPos.x + \"px\",\n\t\t\ttop: menuPos.y + \"px\"\n\t\t};\n\n\t\tconst menuDefinition = this.ensureAllSubMenuItemsHaveAction(this.props.menuDefinition);\n\t\tconst menuItems = this.buildMenu(menuDefinition, menuSize, menuPos, this.props.canvasRect);\n\n\t\treturn (\n\t\t\t<div id=\"context-menu-popover\" className=\"context-menu-popover\" style={posStyle} onContextMenu={this.onContextMenu}>\n\t\t\t\t{menuItems}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nCommonContextMenu.propTypes = {\n\tcontextHandler: PropTypes.func.isRequired,\n\tmenuDefinition: PropTypes.array.isRequired,\n\tcanvasRect: PropTypes.object.isRequired,\n\tmousePos: PropTypes.object.isRequired\n};\n\nexport default CommonContextMenu;\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 CommonContextMenu from \"./common-context-menu.jsx\";\n\nexport default class ContextMenuWrapper extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {};\n\n\t\tthis.contextMenuClicked = this.contextMenuClicked.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\t// Returns an object that describes the dimensions of a rectangle for the\n\t// canvas div with coordinates based on the top left corner of the div. This\n\t// will match the coordinates for the mouse position where the user clicked,\n\t// which is specified in this.props.contextMenuPos object.\n\tgetCanvasRect() {\n\t\tconst containingDiv = document.getElementById(this.props.containingDivId);\n\t\tif (containingDiv) {\n\t\t\tconst clientRect = containingDiv.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: clientRect.bottom - clientRect.top,\n\t\t\t\tleft: 0,\n\t\t\t\tright: clientRect.right - clientRect.left,\n\t\t\t\theight: clientRect.height,\n\t\t\t\twidth: clientRect.width\n\t\t\t};\n\t\t}\n\t\t// Assist Jests tests to run when containingDiv is not available.\n\t\treturn { top: 0, bottom: 200, left: 0, right: 50, height: 200, width: 50 };\n\t}\n\n\thandleClickOutside(e) {\n\t\t// On Safari, when a user is displaying the context menu with a ctrl-click\n\t\t// (which is a supported context menu gesture on the Mac) a secondary click\n\t\t// event is emmitted which is received here with the ctrlKey field enabled.\n\t\t// So we ignore that event otherwse, if we continue, the context menu will\n\t\t// be closed.\n\t\tif (e.ctrlKey) {\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\t// If the click was anywhere outside the context menu and\n\t\t// the ellipsis button we just close the menu.\n\t\tif (!this.isOverContextMenu(e) && !this.isOverEllipsisButton(e)) {\n\t\t\t// This stop propagation is needed in common canvas so that selected nodes will\n\t\t\t// remain selected even after clicking outside the context menu to close the menu.\n\t\t\tif (this.props.stopPropagation) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t\tthis.props.closeContextMenu();\n\t\t}\n\t}\n\n\t// Retruns true if the event occurred over the context menu.\n\tisOverContextMenu(e) {\n\t\tconst domNode = document.getElementById(\"context-menu-popover\");\n\t\treturn !domNode || domNode.contains(e.target);\n\t}\n\n\t// Returns true if the event occurred over the ellipsis button. Typically\n\t// there will be only one ellipsis button on the canvas, since they are only\n\t// displayed on hover, but in some test cicumstances there might be more\n\t// than one.\n\tisOverEllipsisButton(e) {\n\t\tconst ellipsisNodes = document.getElementsByClassName(\"d3-node-ellipsis-group\");\n\t\tlet state = false;\n\t\tfor (let i = 0; i < ellipsisNodes.length; i++) {\n\t\t\tif (state === false && ellipsisNodes[i].contains(e.target)) {\n\t\t\t\tstate = true;\n\t\t\t}\n\t\t}\n\t\treturn state;\n\t}\n\n\tcontextMenuClicked(action, param) {\n\t\tthis.props.contextMenuActionHandler(action, param);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<CommonContextMenu\n\t\t\t\tcontextHandler={this.contextMenuClicked}\n\t\t\t\tmenuDefinition={this.props.contextMenuDef}\n\t\t\t\tcanvasRect={this.getCanvasRect()}\n\t\t\t\tmousePos={this.props.contextMenuPos}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nContextMenuWrapper.propTypes = {\n\tcontextMenuDef: PropTypes.array.isRequired,\n\tcontainingDivId: PropTypes.string.isRequired,\n\tcontextMenuPos: PropTypes.object.isRequired,\n\tcontextMenuActionHandler: PropTypes.func.isRequired,\n\tcloseContextMenu: PropTypes.func.isRequired,\n\tstopPropagation: PropTypes.bool\n};\n"],"names":["_React$Component","ColorPicker","props","_this","_classCallCheck","_callSuper","logger","Logger","colorIndex","refss","i","push","React","createRef","onClick","bind","_assertThisInitialized","onKeyDown","_inherits","_createClass","key","value","this","setFocus","evt","stopPropagation","selectColor","keyCode","TOTAL_COLORS","preventDefault","index","current","focus","color","target","dataset","subPanelData","clickActionHandler","closeSubPanel","log","createElement","className","tabIndex","ref","Component","CommonContextMenu","state","displaySubMenuAction","itemSelected","colorClicked","e","data","selectedEvent","contextHandler","menu","numDividers","length","divider","height","width","mousePos","menuSize","canvasRect","menuPos","x","y","submenuItems","itemCount","disabledCount","forEach","submenuItem","enable","menuDefinition","menuItems","runningYPos","previousDivider","submenu","action","subMenuSize","subMenuContent","buildColorPickerPanel","subMenu","buildSubMenu","disabled","areAllSubmenuItemsDisabled","calculateMenuSize","buildMenu","onClickFunction","role","label","_this2","c","setState","rtl","buildRtlState","subMenuPosStyle","buildSubMenuPosStyle","menuItem","icon","ChevronRight16","menuItemContent","menuItemClass","subMenuClass","onMouseEnter","subMenuMouseEnter","onMouseLeave","subMenuMouseLeave","style","right","bottom","top","left","menuDef","map","item","_objectSpread","calculateMenuPos","posStyle","ensureAllSubMenuItemsHaveAction","id","onContextMenu","ContextMenuWrapper","contextMenuClicked","handleClickOutside","document","addEventListener","removeEventListener","containingDiv","getElementById","containingDivId","clientRect","getBoundingClientRect","ctrlKey","isOverContextMenu","isOverEllipsisButton","closeContextMenu","domNode","contains","ellipsisNodes","getElementsByClassName","param","contextMenuActionHandler","contextMenuDef","getCanvasRect","contextMenu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gI,EAAclF,OAAQ9C,KAC3B,IAAVoC,GAAmB4F,EAAchI,GAAG+H,SAASvF,EAAEhB,UAClDY,GAAQ,GAGV,OAAOA,KACP1B,yBAAAC,MAED,SAAmBwD,EAAQ+D,GAC1BtH,KAAKpB,MAAM2I,yBAAyBhE,EAAQ+D,MAC5CxH,aAAAC,MAED,WACC,OACCT,EAAA4B,cAACK,GACAQ,eAAgB/B,KAAKoG,mBACrBlD,eAAgBlD,KAAKpB,MAAM4I,eAC3BhF,WAAYxC,KAAKyH,gBACjBnF,SAAUtC,KAAKpB,MAAM8I,qBAGvBvB,CAAA,EA/F8C7G,EAAMgC"}
1
+ {"version":3,"file":"context-menu-wrapper-949393c7.js","sources":["../src/color-picker/color-picker.jsx","../src/context-menu/common-context-menu.jsx","../src/context-menu/context-menu-wrapper.jsx"],"sourcesContent":["/*\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 Logger from \"../logging/canvas-logger.js\";\n\nconst TAB_KEY = 9;\nconst RETURN_KEY = 13;\nconst SPACE_KEY = 32;\nconst LEFT_ARROW_KEY = 37;\nconst UP_ARROW_KEY = 38;\nconst RIGHT_ARROW_KEY = 39;\nconst DOWN_ARROW_KEY = 40;\n\n// These values must reflect the layout of the color picker panel\n// decribed by the SCSS/CSS.\nconst COLORS_IN_ROW = 6;\nconst TOTAL_COLORS = 12;\n\nclass ColorPicker extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.logger = new Logger(\"CC-Color-Picker\");\n\n\t\tthis.colorIndex = 0;\n\n\t\tthis.refss = [];\n\t\tfor (let i = 0; i < TOTAL_COLORS; i++) {\n\t\t\tthis.refss.push(React.createRef());\n\t\t}\n\t\tthis.onClick = this.onClick.bind(this);\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tonClick(evt) {\n\t\tevt.stopPropagation();\n\t\tthis.selectColor(evt);\n\t}\n\n\tonKeyDown(evt) {\n\t\tif (evt.keyCode === RIGHT_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex++;\n\t\t\tif (this.colorIndex > TOTAL_COLORS - 1) {\n\t\t\t\tthis.colorIndex = 0;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === LEFT_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex--;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex = TOTAL_COLORS - 1;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === UP_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex -= COLORS_IN_ROW;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex += COLORS_IN_ROW;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === DOWN_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex += COLORS_IN_ROW;\n\t\t\tif (this.colorIndex > 11) {\n\t\t\t\tthis.colorIndex -= COLORS_IN_ROW;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === SPACE_KEY ||\n\t\t\t\t\tevt.keyCode === RETURN_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\tthis.selectColor(evt);\n\n\t\t} else if (evt.keyCode === TAB_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tsetFocus(index) {\n\t\tthis.refss[index].current.focus();\n\t}\n\n\tselectColor(evt) {\n\t\tconst color = evt.target.dataset.color;\n\t\tthis.props.subPanelData.clickActionHandler(color);\n\t\tthis.props.closeSubPanel();\n\t}\n\n\trender() {\n\t\tthis.logger.log(\"render\");\n\t\treturn (\n\t\t\t<div className=\"color-picker\" tabIndex={\"-1\"} onClick={this.onClick} onKeyDown={this.onKeyDown}>\n\t\t\t\t<div ref={this.refss[0]} tabIndex={\"-1\"} data-color={\"bkg-col-white-0\"} className=\"color-picker-item white-0\" />\n\t\t\t\t<div ref={this.refss[1]} tabIndex={\"-1\"} data-color={\"bkg-col-yellow-20\"} className=\"color-picker-item yellow-20\" />\n\t\t\t\t<div ref={this.refss[2]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-20\"} className=\"color-picker-item gray-20\" />\n\t\t\t\t<div ref={this.refss[3]} tabIndex={\"-1\"} data-color={\"bkg-col-green-20\"} className=\"color-picker-item green-20\" />\n\t\t\t\t<div ref={this.refss[4]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-20\"} className=\"color-picker-item teal-20\" />\n\t\t\t\t<div ref={this.refss[5]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-20\"} className=\"color-picker-item cyan-20\" />\n\n\t\t\t\t<div ref={this.refss[6]} tabIndex={\"-1\"} data-color={\"bkg-col-red-50\"} className=\"color-picker-item red-50\" />\n\t\t\t\t<div ref={this.refss[7]} tabIndex={\"-1\"} data-color={\"bkg-col-orange-40\"} className=\"color-picker-item orange-40\" />\n\t\t\t\t<div ref={this.refss[8]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-50\"} className=\"color-picker-item gray-50\" />\n\t\t\t\t<div ref={this.refss[9]} tabIndex={\"-1\"} data-color={\"bkg-col-green-50\"} className=\"color-picker-item green-50\" />\n\t\t\t\t<div ref={this.refss[10]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-50\"} className=\"color-picker-item teal-50\" />\n\t\t\t\t<div ref={this.refss[11]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-50\"} className=\"color-picker-item cyan-50\" />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nColorPicker.propTypes = {\n\tcloseSubPanel: PropTypes.func,\n\tsubPanelData: PropTypes.object\n};\n\nexport default ColorPicker;\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/* eslint no-empty-function: [\"error\", { \"allow\": [\"arrowFunctions\"] }] */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ChevronRight16 } from \"@carbon/icons-react\";\nimport ColorPicker from \"../color-picker\";\n\n// context-menu sizing\nconst CONTEXT_MENU_WIDTH = 160; // See context-menu.scss\nconst CONTEXT_MENU_LINK_HEIGHT = 30; // See context-menu.scss\nconst CONTEXT_MENU_DIVIDER_HEIGHT = 1; // See context-menu.scss\nconst EXTRA_OFFSET = 5; // Extra offset for vertical menu positioning\n\n\nclass CommonContextMenu extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdisplaySubMenuAction: \"\"\n\t\t};\n\t\tthis.itemSelected = this.itemSelected.bind(this);\n\t\tthis.colorClicked = this.colorClicked.bind(this);\n\t}\n\n\tonContextMenu(e) {\n\t\te.preventDefault();\n\t}\n\n\titemSelected(data, selectedEvent) {\n\t\tthis.props.contextHandler(data);\n\t\t// This stops the canvasClicked function from being fired which would\n\t\t// clear any current selections.\n\t\tif (selectedEvent) {\n\t\t\tselectedEvent.stopPropagation();\n\t\t}\n\t}\n\n\tcolorClicked(color) {\n\t\tthis.props.contextHandler(\"colorSelectedObjects\", { color });\n\t}\n\n\t// Returns the size of the menu passed in.\n\tcalculateMenuSize(menu) {\n\t\tvar numDividers = 0;\n\t\tfor (let i = 0; i < menu.length; ++i) {\n\t\t\tconst divider = menu[i].divider;\n\t\t\tif (divider) {\n\t\t\t\tnumDividers++;\n\t\t\t}\n\t\t}\n\n\t\tvar menuSize = {\n\t\t\theight: ((menu.length - numDividers) * CONTEXT_MENU_LINK_HEIGHT) + (numDividers * CONTEXT_MENU_DIVIDER_HEIGHT),\n\t\t\twidth: CONTEXT_MENU_WIDTH\n\t\t};\n\n\t\treturn menuSize;\n\t}\n\n\t// Returns a new position and the canvas rectangle for the context menu based on the current\n\t// mouse position and whether the menu would appear outside the edges of the page.\n\tcalculateMenuPos(mousePos, menuSize, canvasRect) {\n\t\tconst menuPos = { x: mousePos.x, y: mousePos.y };\n\n\t\t// Reposition contextMenu if it will show off the bottom of the page\n\t\tif (mousePos.y + menuSize.height > canvasRect.height) {\n\t\t\tmenuPos.y = canvasRect.height - menuSize.height - EXTRA_OFFSET; // Move up by extra offset so it looks nice\n\n\t\t\t// If repositioning the menu would push it off the top of the page\n\t\t\t// (in very short browser windows) position it at the top.\n\t\t\tif (menuPos.y < 0) {\n\t\t\t\tmenuPos.y = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Reposition contextMenu if it will show off the right of the page\n\t\tif (mousePos.x + menuSize.width > canvasRect.width) {\n\t\t\tmenuPos.x -= menuSize.width;\n\t\t}\n\n\t\t// Add a pixel to x and y because on Chrome without this the context menu\n\t\t// appears with the top corner of the first menu item under the mouse\n\t\t// cursor. This highlights the first menu item (which looks weird) and, if\n\t\t// the first item is a cascade menu, automatically opens the sub-menu.\n\t\tmenuPos.x += 1;\n\t\tmenuPos.y += 1;\n\n\t\treturn menuPos;\n\t}\n\n\t// Returns true of all the items in a sub-menu are disabled.\n\tareAllSubmenuItemsDisabled(submenuItems) {\n\t\tlet itemCount = 0;\n\t\tlet disabledCount = 0;\n\t\tsubmenuItems.forEach(function(submenuItem) {\n\t\t\tif (!submenuItem.divider) {\n\t\t\t\titemCount++;\n\t\t\t}\n\t\t\tif (submenuItem.enable === false) {\n\t\t\t\tdisabledCount++;\n\t\t\t}\n\t\t});\n\t\treturn disabledCount === itemCount;\n\t}\n\n\t// Builds a new menu based on the menu defintion passed in.\n\tbuildMenu(menuDefinition, menuSize, menuPos, canvasRect) {\n\t\tconst menuItems = [];\n\n\t\tlet runningYPos = 0;\n\t\t// Records if we have just displayed a divider. This is useful because we\n\t\t// only want to display one divider if there is a divider element\n\t\t// immediately after another divider element in the menuDefintion array.\n\t\tlet previousDivider = false;\n\n\t\tfor (let i = 0; i < menuDefinition.length; ++i) {\n\t\t\tconst divider = menuDefinition[i].divider;\n\t\t\tconst submenu = menuDefinition[i].submenu;\n\n\t\t\tif (divider) {\n\t\t\t\tif (!previousDivider) {\n\t\t\t\t\tmenuItems.push(<div key={i + 1} className={\"context-menu-divider\"} />);\n\t\t\t\t\trunningYPos += CONTEXT_MENU_DIVIDER_HEIGHT;\n\t\t\t\t\tpreviousDivider = true;\n\t\t\t\t}\n\t\t\t} else if (menuDefinition[i].action === \"colorBackground\") {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst disabled = false;\n\t\t\t\tconst subMenuSize = { width: CONTEXT_MENU_WIDTH, height: 50 };\n\t\t\t\tconst subMenuContent = this.buildColorPickerPanel();\n\n\t\t\t\tconst subMenu = this.buildSubMenu(\n\t\t\t\t\tmenuDefinition, i, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\t\t\t\tmenuItems.push(subMenu);\n\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\n\t\t\t} else if (submenu) {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst disabled = this.areAllSubmenuItemsDisabled(menuDefinition[i].menu);\n\t\t\t\tconst subMenuSize = this.calculateMenuSize(menuDefinition[i].menu);\n\t\t\t\tconst subMenuContent = this.buildMenu(menuDefinition[i].menu, menuSize, menuPos, canvasRect);\n\n\t\t\t\tconst subMenu = this.buildSubMenu(\n\t\t\t\t\tmenuDefinition, i, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\t\t\t\tmenuItems.push(subMenu);\n\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\n\t\t\t} else {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst className = \"context-menu-item\" +\n\t\t\t\t\t(menuDefinition[i].enable === false ? \" disabled\" : \"\");\n\n\t\t\t\tconst onClickFunction = menuDefinition[i].enable === false\n\t\t\t\t\t? null\n\t\t\t\t\t: this.itemSelected.bind(null, menuDefinition[i].action);\n\n\t\t\t\tmenuItems.push((\n\t\t\t\t\t<div key={i + 1} className={className} onClick={onClickFunction} role=\"menuitem\">\n\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t</div>\n\t\t\t\t));\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\t\t\t}\n\t\t}\n\t\treturn menuItems;\n\t}\n\n\tbuildColorPickerPanel() {\n\t\tconst subPanelData = {\n\t\t\tclickActionHandler: (c) => this.colorClicked(c)\n\t\t};\n\t\treturn (\n\t\t\t<ColorPicker subPanelData={subPanelData} closeSubPanel={() => null} />\n\t\t);\n\t}\n\n\tsubMenuMouseEnter(action) {\n\t\tthis.setState({ displaySubMenuAction: action });\n\t}\n\n\tsubMenuMouseLeave(action) {\n\t\tthis.setState({ displaySubMenuAction: \"\" });\n\t}\n\n\t// Builds a sub-menu for the menuitem identified by the index into the menudefintion.\n\tbuildSubMenu(menuDefinition, index, subMenuContent, runningYPos, menuPos,\n\t\tmenuSize, subMenuSize, canvasRect, disabled) {\n\t\tconst rtl = this.buildRtlState(menuPos, menuSize, subMenuSize, canvasRect);\n\t\tconst subMenuPosStyle = this.buildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl);\n\t\tconst menuItem = menuDefinition[index];\n\n\t\tconst icon = (<ChevronRight16 />);\n\t\tconst menuItemContent = <div>{menuItem.label}{icon} </div>;\n\t\tconst menuItemClass = \"context-menu-item \" + (disabled ? \" disabled\" : \"\");\n\t\tconst subMenuClass = \"context-menu-popover context-menu-submenu\" +\n\t\t\t(this.state.displaySubMenuAction === menuItem.action ? \" context-menu--visible\" : \"\");\n\t\tconst onMouseEnter = (disabled ? null : this.subMenuMouseEnter.bind(this, menuItem.action));\n\t\tconst onMouseLeave = (disabled ? null : this.subMenuMouseLeave.bind(this));\n\n\t\treturn (\n\t\t\t<div key={index + 1} className={menuItemClass} aria-haspopup role=\"menuitem\"\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t>\n\t\t\t\t{menuItemContent}\n\t\t\t\t<div style={subMenuPosStyle} className={subMenuClass}>\n\t\t\t\t\t{subMenuContent}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Returns a boolean to indicate whether the submenu should appear on the\n\t// right of the context menu (rtl === false) or on the left of the context\n\t// menu (rtl === true).\n\tbuildRtlState(menuPos, menuSize, subMenuSize, canvasRect) {\n\t\t// Ensure that the combined menu position, plus the menu width,\n\t\t// plus the submenu width, does not exceed the viewport bounds.\n\t\treturn (menuPos.x + menuSize.width + subMenuSize.width > canvasRect.right);\n\t}\n\n\t// Returns a style object that can be applied to the sub-menu to adjust its:\n\t// * vertical (y) position: If the submenu is tall enough that it would be\n\t// displayed off the bottom of the canvas area.\n\t// * horizontal (x) position: If the sub-menu needs to appear on the left\n\t// side of the main menu (rtl === true).\n\tbuildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl) {\n\t\t// Does the submenu go below the bottom of the viewport?\n\t\tconst y = canvasRect.bottom - (menuPos.y + runningYPos + subMenuSize.height);\n\n\t\t// If submenu is not below the viewport bottom set offset to 0 so the\n\t\t// submenu will not be moved. Otherwise, y will be used to move the\n\t\t// submenu up fully into the view port.\n\t\tconst offset = (y > 0) ? 0 : y - EXTRA_OFFSET;\n\n\t\tconst subMenuPosStyle = {\n\t\t\ttop: offset + \"px\" // Use negative to push the menu up\n\t\t};\n\n\t\tif (rtl) {\n\t\t\tsubMenuPosStyle.left = -CONTEXT_MENU_WIDTH + \"px\";\n\t\t}\n\n\t\treturn subMenuPosStyle;\n\t}\n\n\t// Returns the menu definition array passed in making sure any\n\t// submenu items have an action. Note: some applications forget\n\t// to do provide an action because for the submenu it is only\n\t// used by the context menu code.\n\tensureAllSubMenuItemsHaveAction(menuDef) {\n\t\treturn menuDef.map((item, index) => {\n\t\t\tif (item.submenu && typeof item.action === \"undefined\") {\n\t\t\t\treturn { ...item, action: \"submenu_\" + index };\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t}\n\n\trender() {\n\t\t// Reposition contextMenu so that it does not show off the screen\n\t\tconst menuSize = this.calculateMenuSize(this.props.menuDefinition);\n\t\tconst menuPos = this.calculateMenuPos(this.props.mousePos, menuSize, this.props.canvasRect);\n\t\tconst posStyle = {\n\t\t\tleft: menuPos.x + \"px\",\n\t\t\ttop: menuPos.y + \"px\"\n\t\t};\n\n\t\tconst menuDefinition = this.ensureAllSubMenuItemsHaveAction(this.props.menuDefinition);\n\t\tconst menuItems = this.buildMenu(menuDefinition, menuSize, menuPos, this.props.canvasRect);\n\n\t\treturn (\n\t\t\t<div id=\"context-menu-popover\" className=\"context-menu-popover\" style={posStyle} onContextMenu={this.onContextMenu}>\n\t\t\t\t{menuItems}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nCommonContextMenu.propTypes = {\n\tcontextHandler: PropTypes.func.isRequired,\n\tmenuDefinition: PropTypes.array.isRequired,\n\tcanvasRect: PropTypes.object.isRequired,\n\tmousePos: PropTypes.object.isRequired\n};\n\nexport default CommonContextMenu;\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 CommonContextMenu from \"./common-context-menu.jsx\";\n\nexport default class ContextMenuWrapper extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {};\n\n\t\tthis.contextMenuClicked = this.contextMenuClicked.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\t// Returns an object that describes the dimensions of a rectangle for the\n\t// canvas div with coordinates based on the top left corner of the div. This\n\t// will match the coordinates for the mouse position where the user clicked,\n\t// which is specified in this.props.contextMenuPos object.\n\tgetCanvasRect() {\n\t\tconst containingDiv = document.getElementById(this.props.containingDivId);\n\t\tif (containingDiv) {\n\t\t\tconst clientRect = containingDiv.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: clientRect.bottom - clientRect.top,\n\t\t\t\tleft: 0,\n\t\t\t\tright: clientRect.right - clientRect.left,\n\t\t\t\theight: clientRect.height,\n\t\t\t\twidth: clientRect.width\n\t\t\t};\n\t\t}\n\t\t// Assist Jests tests to run when containingDiv is not available.\n\t\treturn { top: 0, bottom: 200, left: 0, right: 50, height: 200, width: 50 };\n\t}\n\n\thandleClickOutside(e) {\n\t\t// On Safari, when a user is displaying the context menu with a ctrl-click\n\t\t// (which is a supported context menu gesture on the Mac) a secondary click\n\t\t// event is emmitted which is received here with the ctrlKey field enabled.\n\t\t// So we ignore that event otherwse, if we continue, the context menu will\n\t\t// be closed.\n\t\tif (e.ctrlKey) {\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\t// If the click was anywhere outside the context menu and\n\t\t// the ellipsis button we just close the menu.\n\t\tif (!this.isOverContextMenu(e) && !this.isOverEllipsisButton(e)) {\n\t\t\t// This stop propagation is needed in common canvas so that selected nodes will\n\t\t\t// remain selected even after clicking outside the context menu to close the menu.\n\t\t\tif (this.props.stopPropagation) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t\tthis.props.closeContextMenu();\n\t\t}\n\t}\n\n\t// Retruns true if the event occurred over the context menu.\n\tisOverContextMenu(e) {\n\t\tconst domNode = document.getElementById(\"context-menu-popover\");\n\t\treturn !domNode || domNode.contains(e.target);\n\t}\n\n\t// Returns true if the event occurred over the ellipsis button. Typically\n\t// there will be only one ellipsis button on the canvas, since they are only\n\t// displayed on hover, but in some test cicumstances there might be more\n\t// than one.\n\tisOverEllipsisButton(e) {\n\t\tconst ellipsisNodes = document.getElementsByClassName(\"d3-node-ellipsis-group\");\n\t\tlet state = false;\n\t\tfor (let i = 0; i < ellipsisNodes.length; i++) {\n\t\t\tif (state === false && ellipsisNodes[i].contains(e.target)) {\n\t\t\t\tstate = true;\n\t\t\t}\n\t\t}\n\t\treturn state;\n\t}\n\n\tcontextMenuClicked(action, param) {\n\t\tthis.props.contextMenuActionHandler(action, param);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<CommonContextMenu\n\t\t\t\tcontextHandler={this.contextMenuClicked}\n\t\t\t\tmenuDefinition={this.props.contextMenuDef}\n\t\t\t\tcanvasRect={this.getCanvasRect()}\n\t\t\t\tmousePos={this.props.contextMenuPos}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nContextMenuWrapper.propTypes = {\n\tcontextMenuDef: PropTypes.array.isRequired,\n\tcontainingDivId: PropTypes.string.isRequired,\n\tcontextMenuPos: PropTypes.object.isRequired,\n\tcontextMenuActionHandler: PropTypes.func.isRequired,\n\tcloseContextMenu: PropTypes.func.isRequired,\n\tstopPropagation: PropTypes.bool\n};\n"],"names":["_React$Component","ColorPicker","props","_this","_classCallCheck","_callSuper","logger","Logger","colorIndex","refss","i","push","React","createRef","onClick","bind","onKeyDown","_inherits","_createClass","key","value","this","setFocus","evt","stopPropagation","selectColor","keyCode","TOTAL_COLORS","preventDefault","index","current","focus","color","target","dataset","subPanelData","clickActionHandler","closeSubPanel","log","createElement","className","tabIndex","ref","Component","CommonContextMenu","state","displaySubMenuAction","itemSelected","colorClicked","e","data","selectedEvent","contextHandler","menu","numDividers","length","divider","height","width","mousePos","menuSize","canvasRect","menuPos","x","y","submenuItems","itemCount","disabledCount","forEach","submenuItem","enable","menuDefinition","menuItems","runningYPos","previousDivider","submenu","action","subMenuSize","subMenuContent","buildColorPickerPanel","subMenu","buildSubMenu","disabled","areAllSubmenuItemsDisabled","calculateMenuSize","buildMenu","onClickFunction","role","label","_this2","c","setState","rtl","buildRtlState","subMenuPosStyle","buildSubMenuPosStyle","menuItem","icon","ChevronRight16","menuItemContent","menuItemClass","subMenuClass","onMouseEnter","subMenuMouseEnter","onMouseLeave","subMenuMouseLeave","style","right","bottom","top","left","menuDef","map","item","_objectSpread","calculateMenuPos","posStyle","ensureAllSubMenuItemsHaveAction","id","onContextMenu","ContextMenuWrapper","contextMenuClicked","handleClickOutside","document","addEventListener","removeEventListener","containingDiv","getElementById","containingDivId","clientRect","getBoundingClientRect","ctrlKey","isOverContextMenu","isOverEllipsisButton","closeContextMenu","domNode","contains","ellipsisNodes","getElementsByClassName","param","contextMenuActionHandler","contextMenuDef","getCanvasRect","contextMenuPos"],"mappings":"omBAoBA,eAaiBA,GAChB,SAAAC,EAAYC,GAAO,IAAAC,EAAAC,uBAAAH,IAClBE,EAAAE,OAAAJ,GAAMC,KACDI,OAAS,IAAIC,SAAO,mBAEzBJ,EAAKK,WAAa,EAElBL,EAAKM,MAAQ,GACb,IAAK,IAAIC,EAAI,EAAGA,EAVG,GAUeA,IACjCP,EAAKM,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KnB,MAAM2I,eAC3BhF,WAAYxC,KAAKyH,gBACjBnF,SAAUtC,KAAKnB,MAAM6I,oBAGvB,EA/F8CnI,UAAM+B"}
@@ -0,0 +1,2 @@
1
+ import{_ as e,a as t}from"./createClass-02596015.js";import{_ as n,a as o,b as r}from"./inherits-42ae8426.js";import i from"react";import{_ as c}from"./defineProperty-ad55dbff.js";import{ChevronRight16 as l}from"@carbon/icons-react";import{L as a}from"./canvas-logger-ab9d9048.js";function s(e,t,n){return t=o(t),r(e,u()?Reflect.construct(t,n||[],o(e).constructor):t.apply(e,n))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var d=function(o){function r(e){var n;t(this,r),(n=s(this,r,[e])).logger=new a("CC-Color-Picker"),n.colorIndex=0,n.refss=[];for(var o=0;o<12;o++)n.refss.push(i.createRef());return n.onClick=n.onClick.bind(n),n.onKeyDown=n.onKeyDown.bind(n),n}return n(r,o),e(r,[{key:"componentDidMount",value:function(){this.setFocus(this.colorIndex)}},{key:"onClick",value:function(e){e.stopPropagation(),this.selectColor(e)}},{key:"onKeyDown",value:function(e){if(39===e.keyCode)e.stopPropagation(),this.colorIndex++,this.colorIndex>11&&(this.colorIndex=0);else if(37===e.keyCode)e.stopPropagation(),this.colorIndex--,this.colorIndex<0&&(this.colorIndex=11);else if(38===e.keyCode)e.stopPropagation(),this.colorIndex-=6,this.colorIndex<0&&(this.colorIndex+=6);else if(40===e.keyCode)e.stopPropagation(),this.colorIndex+=6,this.colorIndex>11&&(this.colorIndex-=6);else if(32===e.keyCode||13===e.keyCode)e.stopPropagation(),e.preventDefault(),this.selectColor(e);else if(9===e.keyCode)return e.stopPropagation(),void e.preventDefault();this.setFocus(this.colorIndex)}},{key:"setFocus",value:function(e){this.refss[e].current.focus()}},{key:"selectColor",value:function(e){var t=e.target.dataset.color;this.props.subPanelData.clickActionHandler(t),this.props.closeSubPanel()}},{key:"render",value:function(){return this.logger.log("render"),i.createElement("div",{className:"color-picker",tabIndex:"-1",onClick:this.onClick,onKeyDown:this.onKeyDown},i.createElement("div",{ref:this.refss[0],tabIndex:"-1","data-color":"bkg-col-white-0",className:"color-picker-item white-0"}),i.createElement("div",{ref:this.refss[1],tabIndex:"-1","data-color":"bkg-col-yellow-20",className:"color-picker-item yellow-20"}),i.createElement("div",{ref:this.refss[2],tabIndex:"-1","data-color":"bkg-col-gray-20",className:"color-picker-item gray-20"}),i.createElement("div",{ref:this.refss[3],tabIndex:"-1","data-color":"bkg-col-green-20",className:"color-picker-item green-20"}),i.createElement("div",{ref:this.refss[4],tabIndex:"-1","data-color":"bkg-col-teal-20",className:"color-picker-item teal-20"}),i.createElement("div",{ref:this.refss[5],tabIndex:"-1","data-color":"bkg-col-cyan-20",className:"color-picker-item cyan-20"}),i.createElement("div",{ref:this.refss[6],tabIndex:"-1","data-color":"bkg-col-red-50",className:"color-picker-item red-50"}),i.createElement("div",{ref:this.refss[7],tabIndex:"-1","data-color":"bkg-col-orange-40",className:"color-picker-item orange-40"}),i.createElement("div",{ref:this.refss[8],tabIndex:"-1","data-color":"bkg-col-gray-50",className:"color-picker-item gray-50"}),i.createElement("div",{ref:this.refss[9],tabIndex:"-1","data-color":"bkg-col-green-50",className:"color-picker-item green-50"}),i.createElement("div",{ref:this.refss[10],tabIndex:"-1","data-color":"bkg-col-teal-50",className:"color-picker-item teal-50"}),i.createElement("div",{ref:this.refss[11],tabIndex:"-1","data-color":"bkg-col-cyan-50",className:"color-picker-item cyan-50"}))}}])}(i.Component);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t=o(t),r(e,m()?Reflect.construct(t,n||[],o(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var v=function(o){function r(e){var n;return t(this,r),(n=f(this,r,[e])).state={displaySubMenuAction:""},n.itemSelected=n.itemSelected.bind(n),n.colorClicked=n.colorClicked.bind(n),n}return n(r,o),e(r,[{key:"onContextMenu",value:function(e){e.preventDefault()}},{key:"itemSelected",value:function(e,t){this.props.contextHandler(e),t&&t.stopPropagation()}},{key:"colorClicked",value:function(e){this.props.contextHandler("colorSelectedObjects",{color:e})}},{key:"calculateMenuSize",value:function(e){for(var t=0,n=0;n<e.length;++n){e[n].divider&&t++}return{height:30*(e.length-t)+1*t,width:160}}},{key:"calculateMenuPos",value:function(e,t,n){var o={x:e.x,y:e.y};return e.y+t.height>n.height&&(o.y=n.height-t.height-5,o.y<0&&(o.y=0)),e.x+t.width>n.width&&(o.x-=t.width),o.x+=1,o.y+=1,o}},{key:"areAllSubmenuItemsDisabled",value:function(e){var t=0,n=0;return e.forEach((function(e){e.divider||t++,!1===e.enable&&n++})),n===t}},{key:"buildMenu",value:function(e,t,n,o){for(var r=[],c=0,l=!1,a=0;a<e.length;++a){var s=e[a].divider,u=e[a].submenu;if(s)l||(r.push(i.createElement("div",{key:a+1,className:"context-menu-divider"})),c+=1,l=!0);else if("colorBackground"===e[a].action){l=!1;var d={width:160,height:50},h=this.buildColorPickerPanel(),p=this.buildSubMenu(e,a,h,c,n,t,d,o,!1);r.push(p),c+=30}else if(u){l=!1;var f=this.areAllSubmenuItemsDisabled(e[a].menu),m=this.calculateMenuSize(e[a].menu),v=this.buildMenu(e[a].menu,t,n,o),b=this.buildSubMenu(e,a,v,c,n,t,m,o,f);r.push(b),c+=30}else{l=!1;var y="context-menu-item"+(!1===e[a].enable?" disabled":""),k=!1===e[a].enable?null:this.itemSelected.bind(null,e[a].action);r.push(i.createElement("div",{key:a+1,className:y,onClick:k,role:"menuitem"},e[a].label)),c+=30}}return r}},{key:"buildColorPickerPanel",value:function(){var e=this,t={clickActionHandler:function(t){return e.colorClicked(t)}};return i.createElement(d,{subPanelData:t,closeSubPanel:function(){return null}})}},{key:"subMenuMouseEnter",value:function(e){this.setState({displaySubMenuAction:e})}},{key:"subMenuMouseLeave",value:function(e){this.setState({displaySubMenuAction:""})}},{key:"buildSubMenu",value:function(e,t,n,o,r,c,a,s,u){var d=this.buildRtlState(r,c,a,s),h=this.buildSubMenuPosStyle(o,r,a,s,d),p=e[t],f=i.createElement(l,null),m=i.createElement("div",null,p.label,f," "),v="context-menu-item "+(u?" disabled":""),b="context-menu-popover context-menu-submenu"+(this.state.displaySubMenuAction===p.action?" context-menu--visible":""),y=u?null:this.subMenuMouseEnter.bind(this,p.action),k=u?null:this.subMenuMouseLeave.bind(this);return i.createElement("div",{key:t+1,className:v,"aria-haspopup":!0,role:"menuitem",onMouseEnter:y,onMouseLeave:k},m,i.createElement("div",{style:h,className:b},n))}},{key:"buildRtlState",value:function(e,t,n,o){return e.x+t.width+n.width>o.right}},{key:"buildSubMenuPosStyle",value:function(e,t,n,o,r){var i=o.bottom-(t.y+e+n.height),c={top:(i>0?0:i-5)+"px"};return r&&(c.left="-160px"),c}},{key:"ensureAllSubMenuItemsHaveAction",value:function(e){return e.map((function(e,t){return e.submenu&&void 0===e.action?p(p({},e),{},{action:"submenu_"+t}):e}))}},{key:"render",value:function(){var e=this.calculateMenuSize(this.props.menuDefinition),t=this.calculateMenuPos(this.props.mousePos,e,this.props.canvasRect),n={left:t.x+"px",top:t.y+"px"},o=this.ensureAllSubMenuItemsHaveAction(this.props.menuDefinition),r=this.buildMenu(o,e,t,this.props.canvasRect);return i.createElement("div",{id:"context-menu-popover",className:"context-menu-popover",style:n,onContextMenu:this.onContextMenu},r)}}])}(i.Component);function b(e,t,n){return t=o(t),r(e,y()?Reflect.construct(t,n||[],o(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var k=function(o){function r(e){var n;return t(this,r),(n=b(this,r,[e])).state={},n.contextMenuClicked=n.contextMenuClicked.bind(n),n.handleClickOutside=n.handleClickOutside.bind(n),n}return n(r,o),e(r,[{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleClickOutside,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleClickOutside,!0)}},{key:"getCanvasRect",value:function(){var e=document.getElementById(this.props.containingDivId);if(e){var t=e.getBoundingClientRect();return{top:0,bottom:t.bottom-t.top,left:0,right:t.right-t.left,height:t.height,width:t.width}}return{top:0,bottom:200,left:0,right:50,height:200,width:50}}},{key:"handleClickOutside",value:function(e){e.ctrlKey?e.stopPropagation():this.isOverContextMenu(e)||this.isOverEllipsisButton(e)||(this.props.stopPropagation&&e.stopPropagation(),this.props.closeContextMenu())}},{key:"isOverContextMenu",value:function(e){var t=document.getElementById("context-menu-popover");return!t||t.contains(e.target)}},{key:"isOverEllipsisButton",value:function(e){for(var t=document.getElementsByClassName("d3-node-ellipsis-group"),n=!1,o=0;o<t.length;o++)!1===n&&t[o].contains(e.target)&&(n=!0);return n}},{key:"contextMenuClicked",value:function(e,t){this.props.contextMenuActionHandler(e,t)}},{key:"render",value:function(){return i.createElement(v,{contextHandler:this.contextMenuClicked,menuDefinition:this.props.contextMenuDef,canvasRect:this.getCanvasRect(),mousePos:this.props.contextMenuPos})}}])}(i.Component);export{k as C,d as a};
2
+ //# sourceMappingURL=context-menu-wrapper-f62dfcdb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu-wrapper-271eb2df.js","sources":["../src/color-picker/color-picker.jsx","../src/context-menu/common-context-menu.jsx","../src/context-menu/context-menu-wrapper.jsx"],"sourcesContent":["/*\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 Logger from \"../logging/canvas-logger.js\";\n\nconst TAB_KEY = 9;\nconst RETURN_KEY = 13;\nconst SPACE_KEY = 32;\nconst LEFT_ARROW_KEY = 37;\nconst UP_ARROW_KEY = 38;\nconst RIGHT_ARROW_KEY = 39;\nconst DOWN_ARROW_KEY = 40;\n\n// These values must reflect the layout of the color picker panel\n// decribed by the SCSS/CSS.\nconst COLORS_IN_ROW = 6;\nconst TOTAL_COLORS = 12;\n\nclass ColorPicker extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.logger = new Logger(\"CC-Color-Picker\");\n\n\t\tthis.colorIndex = 0;\n\n\t\tthis.refss = [];\n\t\tfor (let i = 0; i < TOTAL_COLORS; i++) {\n\t\t\tthis.refss.push(React.createRef());\n\t\t}\n\t\tthis.onClick = this.onClick.bind(this);\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tonClick(evt) {\n\t\tevt.stopPropagation();\n\t\tthis.selectColor(evt);\n\t}\n\n\tonKeyDown(evt) {\n\t\tif (evt.keyCode === RIGHT_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex++;\n\t\t\tif (this.colorIndex > TOTAL_COLORS - 1) {\n\t\t\t\tthis.colorIndex = 0;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === LEFT_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex--;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex = TOTAL_COLORS - 1;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === UP_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex -= COLORS_IN_ROW;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex += COLORS_IN_ROW;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === DOWN_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex += COLORS_IN_ROW;\n\t\t\tif (this.colorIndex > 11) {\n\t\t\t\tthis.colorIndex -= COLORS_IN_ROW;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === SPACE_KEY ||\n\t\t\t\t\tevt.keyCode === RETURN_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\tthis.selectColor(evt);\n\n\t\t} else if (evt.keyCode === TAB_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tsetFocus(index) {\n\t\tthis.refss[index].current.focus();\n\t}\n\n\tselectColor(evt) {\n\t\tconst color = evt.target.dataset.color;\n\t\tthis.props.subPanelData.clickActionHandler(color);\n\t\tthis.props.closeSubPanel();\n\t}\n\n\trender() {\n\t\tthis.logger.log(\"render\");\n\t\treturn (\n\t\t\t<div className=\"color-picker\" tabIndex={\"-1\"} onClick={this.onClick} onKeyDown={this.onKeyDown}>\n\t\t\t\t<div ref={this.refss[0]} tabIndex={\"-1\"} data-color={\"bkg-col-white-0\"} className=\"color-picker-item white-0\" />\n\t\t\t\t<div ref={this.refss[1]} tabIndex={\"-1\"} data-color={\"bkg-col-yellow-20\"} className=\"color-picker-item yellow-20\" />\n\t\t\t\t<div ref={this.refss[2]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-20\"} className=\"color-picker-item gray-20\" />\n\t\t\t\t<div ref={this.refss[3]} tabIndex={\"-1\"} data-color={\"bkg-col-green-20\"} className=\"color-picker-item green-20\" />\n\t\t\t\t<div ref={this.refss[4]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-20\"} className=\"color-picker-item teal-20\" />\n\t\t\t\t<div ref={this.refss[5]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-20\"} className=\"color-picker-item cyan-20\" />\n\n\t\t\t\t<div ref={this.refss[6]} tabIndex={\"-1\"} data-color={\"bkg-col-red-50\"} className=\"color-picker-item red-50\" />\n\t\t\t\t<div ref={this.refss[7]} tabIndex={\"-1\"} data-color={\"bkg-col-orange-40\"} className=\"color-picker-item orange-40\" />\n\t\t\t\t<div ref={this.refss[8]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-50\"} className=\"color-picker-item gray-50\" />\n\t\t\t\t<div ref={this.refss[9]} tabIndex={\"-1\"} data-color={\"bkg-col-green-50\"} className=\"color-picker-item green-50\" />\n\t\t\t\t<div ref={this.refss[10]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-50\"} className=\"color-picker-item teal-50\" />\n\t\t\t\t<div ref={this.refss[11]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-50\"} className=\"color-picker-item cyan-50\" />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nColorPicker.propTypes = {\n\tcloseSubPanel: PropTypes.func,\n\tsubPanelData: PropTypes.object\n};\n\nexport default ColorPicker;\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/* eslint no-empty-function: [\"error\", { \"allow\": [\"arrowFunctions\"] }] */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ChevronRight16 } from \"@carbon/icons-react\";\nimport ColorPicker from \"../color-picker\";\n\n// context-menu sizing\nconst CONTEXT_MENU_WIDTH = 160; // See context-menu.scss\nconst CONTEXT_MENU_LINK_HEIGHT = 30; // See context-menu.scss\nconst CONTEXT_MENU_DIVIDER_HEIGHT = 1; // See context-menu.scss\nconst EXTRA_OFFSET = 5; // Extra offset for vertical menu positioning\n\n\nclass CommonContextMenu extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdisplaySubMenuAction: \"\"\n\t\t};\n\t\tthis.itemSelected = this.itemSelected.bind(this);\n\t\tthis.colorClicked = this.colorClicked.bind(this);\n\t}\n\n\tonContextMenu(e) {\n\t\te.preventDefault();\n\t}\n\n\titemSelected(data, selectedEvent) {\n\t\tthis.props.contextHandler(data);\n\t\t// This stops the canvasClicked function from being fired which would\n\t\t// clear any current selections.\n\t\tif (selectedEvent) {\n\t\t\tselectedEvent.stopPropagation();\n\t\t}\n\t}\n\n\tcolorClicked(color) {\n\t\tthis.props.contextHandler(\"colorSelectedObjects\", { color });\n\t}\n\n\t// Returns the size of the menu passed in.\n\tcalculateMenuSize(menu) {\n\t\tvar numDividers = 0;\n\t\tfor (let i = 0; i < menu.length; ++i) {\n\t\t\tconst divider = menu[i].divider;\n\t\t\tif (divider) {\n\t\t\t\tnumDividers++;\n\t\t\t}\n\t\t}\n\n\t\tvar menuSize = {\n\t\t\theight: ((menu.length - numDividers) * CONTEXT_MENU_LINK_HEIGHT) + (numDividers * CONTEXT_MENU_DIVIDER_HEIGHT),\n\t\t\twidth: CONTEXT_MENU_WIDTH\n\t\t};\n\n\t\treturn menuSize;\n\t}\n\n\t// Returns a new position and the canvas rectangle for the context menu based on the current\n\t// mouse position and whether the menu would appear outside the edges of the page.\n\tcalculateMenuPos(mousePos, menuSize, canvasRect) {\n\t\tconst menuPos = { x: mousePos.x, y: mousePos.y };\n\n\t\t// Reposition contextMenu if it will show off the bottom of the page\n\t\tif (mousePos.y + menuSize.height > canvasRect.height) {\n\t\t\tmenuPos.y = canvasRect.height - menuSize.height - EXTRA_OFFSET; // Move up by extra offset so it looks nice\n\n\t\t\t// If repositioning the menu would push it off the top of the page\n\t\t\t// (in very short browser windows) position it at the top.\n\t\t\tif (menuPos.y < 0) {\n\t\t\t\tmenuPos.y = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Reposition contextMenu if it will show off the right of the page\n\t\tif (mousePos.x + menuSize.width > canvasRect.width) {\n\t\t\tmenuPos.x -= menuSize.width;\n\t\t}\n\n\t\t// Add a pixel to x and y because on Chrome without this the context menu\n\t\t// appears with the top corner of the first menu item under the mouse\n\t\t// cursor. This highlights the first menu item (which looks weird) and, if\n\t\t// the first item is a cascade menu, automatically opens the sub-menu.\n\t\tmenuPos.x += 1;\n\t\tmenuPos.y += 1;\n\n\t\treturn menuPos;\n\t}\n\n\t// Returns true of all the items in a sub-menu are disabled.\n\tareAllSubmenuItemsDisabled(submenuItems) {\n\t\tlet itemCount = 0;\n\t\tlet disabledCount = 0;\n\t\tsubmenuItems.forEach(function(submenuItem) {\n\t\t\tif (!submenuItem.divider) {\n\t\t\t\titemCount++;\n\t\t\t}\n\t\t\tif (submenuItem.enable === false) {\n\t\t\t\tdisabledCount++;\n\t\t\t}\n\t\t});\n\t\treturn disabledCount === itemCount;\n\t}\n\n\t// Builds a new menu based on the menu defintion passed in.\n\tbuildMenu(menuDefinition, menuSize, menuPos, canvasRect) {\n\t\tconst menuItems = [];\n\n\t\tlet runningYPos = 0;\n\t\t// Records if we have just displayed a divider. This is useful because we\n\t\t// only want to display one divider if there is a divider element\n\t\t// immediately after another divider element in the menuDefintion array.\n\t\tlet previousDivider = false;\n\n\t\tfor (let i = 0; i < menuDefinition.length; ++i) {\n\t\t\tconst divider = menuDefinition[i].divider;\n\t\t\tconst submenu = menuDefinition[i].submenu;\n\n\t\t\tif (divider) {\n\t\t\t\tif (!previousDivider) {\n\t\t\t\t\tmenuItems.push(<div key={i + 1} className={\"context-menu-divider\"} />);\n\t\t\t\t\trunningYPos += CONTEXT_MENU_DIVIDER_HEIGHT;\n\t\t\t\t\tpreviousDivider = true;\n\t\t\t\t}\n\t\t\t} else if (menuDefinition[i].action === \"colorBackground\") {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst disabled = false;\n\t\t\t\tconst subMenuSize = { width: CONTEXT_MENU_WIDTH, height: 50 };\n\t\t\t\tconst subMenuContent = this.buildColorPickerPanel();\n\n\t\t\t\tconst subMenu = this.buildSubMenu(\n\t\t\t\t\tmenuDefinition, i, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\t\t\t\tmenuItems.push(subMenu);\n\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\n\t\t\t} else if (submenu) {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst disabled = this.areAllSubmenuItemsDisabled(menuDefinition[i].menu);\n\t\t\t\tconst subMenuSize = this.calculateMenuSize(menuDefinition[i].menu);\n\t\t\t\tconst subMenuContent = this.buildMenu(menuDefinition[i].menu, menuSize, menuPos, canvasRect);\n\n\t\t\t\tconst subMenu = this.buildSubMenu(\n\t\t\t\t\tmenuDefinition, i, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\t\t\t\tmenuItems.push(subMenu);\n\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\n\t\t\t} else {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst className = \"context-menu-item\" +\n\t\t\t\t\t(menuDefinition[i].enable === false ? \" disabled\" : \"\");\n\n\t\t\t\tconst onClickFunction = menuDefinition[i].enable === false\n\t\t\t\t\t? null\n\t\t\t\t\t: this.itemSelected.bind(null, menuDefinition[i].action);\n\n\t\t\t\tmenuItems.push((\n\t\t\t\t\t<div key={i + 1} className={className} onClick={onClickFunction} role=\"menuitem\">\n\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t</div>\n\t\t\t\t));\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\t\t\t}\n\t\t}\n\t\treturn menuItems;\n\t}\n\n\tbuildColorPickerPanel() {\n\t\tconst subPanelData = {\n\t\t\tclickActionHandler: (c) => this.colorClicked(c)\n\t\t};\n\t\treturn (\n\t\t\t<ColorPicker subPanelData={subPanelData} closeSubPanel={() => null} />\n\t\t);\n\t}\n\n\tsubMenuMouseEnter(action) {\n\t\tthis.setState({ displaySubMenuAction: action });\n\t}\n\n\tsubMenuMouseLeave(action) {\n\t\tthis.setState({ displaySubMenuAction: \"\" });\n\t}\n\n\t// Builds a sub-menu for the menuitem identified by the index into the menudefintion.\n\tbuildSubMenu(menuDefinition, index, subMenuContent, runningYPos, menuPos,\n\t\tmenuSize, subMenuSize, canvasRect, disabled) {\n\t\tconst rtl = this.buildRtlState(menuPos, menuSize, subMenuSize, canvasRect);\n\t\tconst subMenuPosStyle = this.buildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl);\n\t\tconst menuItem = menuDefinition[index];\n\n\t\tconst icon = (<ChevronRight16 />);\n\t\tconst menuItemContent = <div>{menuItem.label}{icon} </div>;\n\t\tconst menuItemClass = \"context-menu-item \" + (disabled ? \" disabled\" : \"\");\n\t\tconst subMenuClass = \"context-menu-popover context-menu-submenu\" +\n\t\t\t(this.state.displaySubMenuAction === menuItem.action ? \" context-menu--visible\" : \"\");\n\t\tconst onMouseEnter = (disabled ? null : this.subMenuMouseEnter.bind(this, menuItem.action));\n\t\tconst onMouseLeave = (disabled ? null : this.subMenuMouseLeave.bind(this));\n\n\t\treturn (\n\t\t\t<div key={index + 1} className={menuItemClass} aria-haspopup role=\"menuitem\"\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t>\n\t\t\t\t{menuItemContent}\n\t\t\t\t<div style={subMenuPosStyle} className={subMenuClass}>\n\t\t\t\t\t{subMenuContent}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Returns a boolean to indicate whether the submenu should appear on the\n\t// right of the context menu (rtl === false) or on the left of the context\n\t// menu (rtl === true).\n\tbuildRtlState(menuPos, menuSize, subMenuSize, canvasRect) {\n\t\t// Ensure that the combined menu position, plus the menu width,\n\t\t// plus the submenu width, does not exceed the viewport bounds.\n\t\treturn (menuPos.x + menuSize.width + subMenuSize.width > canvasRect.right);\n\t}\n\n\t// Returns a style object that can be applied to the sub-menu to adjust its:\n\t// * vertical (y) position: If the submenu is tall enough that it would be\n\t// displayed off the bottom of the canvas area.\n\t// * horizontal (x) position: If the sub-menu needs to appear on the left\n\t// side of the main menu (rtl === true).\n\tbuildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl) {\n\t\t// Does the submenu go below the bottom of the viewport?\n\t\tconst y = canvasRect.bottom - (menuPos.y + runningYPos + subMenuSize.height);\n\n\t\t// If submenu is not below the viewport bottom set offset to 0 so the\n\t\t// submenu will not be moved. Otherwise, y will be used to move the\n\t\t// submenu up fully into the view port.\n\t\tconst offset = (y > 0) ? 0 : y - EXTRA_OFFSET;\n\n\t\tconst subMenuPosStyle = {\n\t\t\ttop: offset + \"px\" // Use negative to push the menu up\n\t\t};\n\n\t\tif (rtl) {\n\t\t\tsubMenuPosStyle.left = -CONTEXT_MENU_WIDTH + \"px\";\n\t\t}\n\n\t\treturn subMenuPosStyle;\n\t}\n\n\t// Returns the menu definition array passed in making sure any\n\t// submenu items have an action. Note: some applications forget\n\t// to do provide an action because for the submenu it is only\n\t// used by the context menu code.\n\tensureAllSubMenuItemsHaveAction(menuDef) {\n\t\treturn menuDef.map((item, index) => {\n\t\t\tif (item.submenu && typeof item.action === \"undefined\") {\n\t\t\t\treturn { ...item, action: \"submenu_\" + index };\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t}\n\n\trender() {\n\t\t// Reposition contextMenu so that it does not show off the screen\n\t\tconst menuSize = this.calculateMenuSize(this.props.menuDefinition);\n\t\tconst menuPos = this.calculateMenuPos(this.props.mousePos, menuSize, this.props.canvasRect);\n\t\tconst posStyle = {\n\t\t\tleft: menuPos.x + \"px\",\n\t\t\ttop: menuPos.y + \"px\"\n\t\t};\n\n\t\tconst menuDefinition = this.ensureAllSubMenuItemsHaveAction(this.props.menuDefinition);\n\t\tconst menuItems = this.buildMenu(menuDefinition, menuSize, menuPos, this.props.canvasRect);\n\n\t\treturn (\n\t\t\t<div id=\"context-menu-popover\" className=\"context-menu-popover\" style={posStyle} onContextMenu={this.onContextMenu}>\n\t\t\t\t{menuItems}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nCommonContextMenu.propTypes = {\n\tcontextHandler: PropTypes.func.isRequired,\n\tmenuDefinition: PropTypes.array.isRequired,\n\tcanvasRect: PropTypes.object.isRequired,\n\tmousePos: PropTypes.object.isRequired\n};\n\nexport default CommonContextMenu;\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 CommonContextMenu from \"./common-context-menu.jsx\";\n\nexport default class ContextMenuWrapper extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {};\n\n\t\tthis.contextMenuClicked = this.contextMenuClicked.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\t// Returns an object that describes the dimensions of a rectangle for the\n\t// canvas div with coordinates based on the top left corner of the div. This\n\t// will match the coordinates for the mouse position where the user clicked,\n\t// which is specified in this.props.contextMenuPos object.\n\tgetCanvasRect() {\n\t\tconst containingDiv = document.getElementById(this.props.containingDivId);\n\t\tif (containingDiv) {\n\t\t\tconst clientRect = containingDiv.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: clientRect.bottom - clientRect.top,\n\t\t\t\tleft: 0,\n\t\t\t\tright: clientRect.right - clientRect.left,\n\t\t\t\theight: clientRect.height,\n\t\t\t\twidth: clientRect.width\n\t\t\t};\n\t\t}\n\t\t// Assist Jests tests to run when containingDiv is not available.\n\t\treturn { top: 0, bottom: 200, left: 0, right: 50, height: 200, width: 50 };\n\t}\n\n\thandleClickOutside(e) {\n\t\t// On Safari, when a user is displaying the context menu with a ctrl-click\n\t\t// (which is a supported context menu gesture on the Mac) a secondary click\n\t\t// event is emmitted which is received here with the ctrlKey field enabled.\n\t\t// So we ignore that event otherwse, if we continue, the context menu will\n\t\t// be closed.\n\t\tif (e.ctrlKey) {\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\t// If the click was anywhere outside the context menu and\n\t\t// the ellipsis button we just close the menu.\n\t\tif (!this.isOverContextMenu(e) && !this.isOverEllipsisButton(e)) {\n\t\t\t// This stop propagation is needed in common canvas so that selected nodes will\n\t\t\t// remain selected even after clicking outside the context menu to close the menu.\n\t\t\tif (this.props.stopPropagation) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t\tthis.props.closeContextMenu();\n\t\t}\n\t}\n\n\t// Retruns true if the event occurred over the context menu.\n\tisOverContextMenu(e) {\n\t\tconst domNode = document.getElementById(\"context-menu-popover\");\n\t\treturn !domNode || domNode.contains(e.target);\n\t}\n\n\t// Returns true if the event occurred over the ellipsis button. Typically\n\t// there will be only one ellipsis button on the canvas, since they are only\n\t// displayed on hover, but in some test cicumstances there might be more\n\t// than one.\n\tisOverEllipsisButton(e) {\n\t\tconst ellipsisNodes = document.getElementsByClassName(\"d3-node-ellipsis-group\");\n\t\tlet state = false;\n\t\tfor (let i = 0; i < ellipsisNodes.length; i++) {\n\t\t\tif (state === false && ellipsisNodes[i].contains(e.target)) {\n\t\t\t\tstate = true;\n\t\t\t}\n\t\t}\n\t\treturn state;\n\t}\n\n\tcontextMenuClicked(action, param) {\n\t\tthis.props.contextMenuActionHandler(action, param);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<CommonContextMenu\n\t\t\t\tcontextHandler={this.contextMenuClicked}\n\t\t\t\tmenuDefinition={this.props.contextMenuDef}\n\t\t\t\tcanvasRect={this.getCanvasRect()}\n\t\t\t\tmousePos={this.props.contextMenuPos}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nContextMenuWrapper.propTypes = {\n\tcontextMenuDef: PropTypes.array.isRequired,\n\tcontainingDivId: PropTypes.string.isRequired,\n\tcontextMenuPos: PropTypes.object.isRequired,\n\tcontextMenuActionHandler: PropTypes.func.isRequired,\n\tcloseContextMenu: PropTypes.func.isRequired,\n\tstopPropagation: PropTypes.bool\n};\n"],"names":["_React$Component","ColorPicker","props","_this","_classCallCheck","_callSuper","logger","Logger","colorIndex","refss","i","push","React","createRef","onClick","bind","_assertThisInitialized","onKeyDown","_inherits","_createClass","key","value","this","setFocus","evt","stopPropagation","selectColor","keyCode","TOTAL_COLORS","preventDefault","index","current","focus","color","target","dataset","subPanelData","clickActionHandler","closeSubPanel","log","createElement","className","tabIndex","ref","Component","CommonContextMenu","state","displaySubMenuAction","itemSelected","colorClicked","e","data","selectedEvent","contextHandler","menu","numDividers","length","divider","height","width","mousePos","menuSize","canvasRect","menuPos","x","y","submenuItems","itemCount","disabledCount","forEach","submenuItem","enable","menuDefinition","menuItems","runningYPos","previousDivider","submenu","action","subMenuSize","subMenuContent","buildColorPickerPanel","subMenu","buildSubMenu","disabled","areAllSubmenuItemsDisabled","calculateMenuSize","buildMenu","onClickFunction","role","label","_this2","c","setState","rtl","buildRtlState","subMenuPosStyle","buildSubMenuPosStyle","menuItem","icon","ChevronRight16","menuItemContent","menuItemClass","subMenuClass","onMouseEnter","subMenuMouseEnter","onMouseLeave","subMenuMouseLeave","style","right","bottom","top","left","menuDef","map","item","_objectSpread","calculateMenuPos","posStyle","ensureAllSubMenuItemsHaveAction","id","onContextMenu","ContextMenuWrapper","contextMenuClicked","handleClickOutside","document","addEventListener","removeEventListener","containingDiv","getElementById","containingDivId","clientRect","getBoundingClientRect","ctrlKey","isOverContextMenu","isOverEllipsisButton","closeContextMenu","domNode","contains","ellipsisNodes","getElementsByClassName","param","contextMenuActionHandler","contextMenuDef","getCanvasRect","contextMenuPos"],"mappings":"omBAoBA,eAaiBA,GAChB,SAAAC,EAAYC,GAAO,IAAAC,EAAAC,uBAAAH,IAClBE,EAAAE,OAAAJ,GAAMC,KACDI,OAAS,IAAIC,SAAO,mBAEzBJ,EAAKK,WAAa,EAElBL,EAAKM,MAAQ,GACb,IAAK,IAAIC,EAAI,EAAGA,EAVG,GAUeA,IACjCP,EAAKM,MAAME,KAAKC,UAAMC,aAGoB,OAD3CV,EAAKW,QAAUX,EAAKW,QAAQC,KAAIC,yBAAAb,IAChCA,EAAKc,UAAYd,EAAKc,UAAUF,KAAIC,yBAAAb,IAAOA,EAqF3C,OAjGee,YAAAjB,EAAAD,GAafmB,eAAAlB,IAAAmB,wBAAAC,MAED,WACCC,KAAKC,SAASD,KAAKd,eACnBY,cAAAC,MAED,SAAQG,GACPA,EAAIC,kBACJH,KAAKI,YAAYF,MACjBJ,gBAAAC,MAED,SAAUG,GACT,GAjCsB,KAiClBA,EAAIG,QACPH,EAAIC,kBACJH,KAAKd,aACDc,KAAKd,WAAaoB,KACrBN,KAAKd,WAAa,QAGb,GA1Cc,KA0CVgB,EAAIG,QACdH,EAAIC,kBACJH,KAAKd,aACDc,KAAKd,WAAa,IACrBc,KAAKd,WAAaoB,SAGb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,IAAKE,KAAM,EAAGH,MAAO,GAAIlD,OAAQ,IAAKC,MAAO,OACtEvC,yBAAAC,MAED,SAAmB6B,GAMdA,EAAEkF,QACLlF,EAAEzB,kBAMEH,KAAK+G,kBAAkBnF,IAAO5B,KAAKgH,qBAAqBpF,KAGxD5B,KAAKpB,MAAMuB,iBACdyB,EAAEzB,kBAEHH,KAAKpB,MAAMqI,uBAIbnH,wBAAAC,MACA,SAAkB6B,GACjB,IAAMsF,EAAUZ,SAASI,eAAe,wBACxC,OAAQQ,GAAWA,EAAQC,SAASvF,EAAEhB,WAMvCd,2BAAAC,MACA,SAAqB6B,GAGpB,IAFA,IAAMwF,EAAgBd,SAASe,uBAAuB,0BAClD7F,GAAQ,EACHpC,EAAI,EAAGA,EAAIgI,EAAclF,OAAQ9C,KAC3B,IAAVoC,GAAmB4F,EAAchI,GAAG+H,SAASvF,EAAEhB,UAClDY,GAAQ,GAGV,OAAOA,KACP1B,yBAAAC,MAED,SAAmBwD,EAAQ+D,GAC1BtH,KAAKpB,MAAM2I,yBAAyBhE,EAAQ+D,MAC5CxH,aAAAC,MAED,WACC,OACCT,UAAA4B,cAACK,GACAQ,eAAgB/B,KAAKoG,mBACrBlD,eAAgBlD,KAAKpB,MAAM4I,eAC3BhF,WAAYxC,KAAKyH,gBACjBnF,SAAUtC,KAAKpB,MAAM8I,qBAGvBvB,CAAA,EA/F8C7G,UAAMgC"}
1
+ {"version":3,"file":"context-menu-wrapper-f62dfcdb.js","sources":["../src/color-picker/color-picker.jsx","../src/context-menu/common-context-menu.jsx","../src/context-menu/context-menu-wrapper.jsx"],"sourcesContent":["/*\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 Logger from \"../logging/canvas-logger.js\";\n\nconst TAB_KEY = 9;\nconst RETURN_KEY = 13;\nconst SPACE_KEY = 32;\nconst LEFT_ARROW_KEY = 37;\nconst UP_ARROW_KEY = 38;\nconst RIGHT_ARROW_KEY = 39;\nconst DOWN_ARROW_KEY = 40;\n\n// These values must reflect the layout of the color picker panel\n// decribed by the SCSS/CSS.\nconst COLORS_IN_ROW = 6;\nconst TOTAL_COLORS = 12;\n\nclass ColorPicker extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.logger = new Logger(\"CC-Color-Picker\");\n\n\t\tthis.colorIndex = 0;\n\n\t\tthis.refss = [];\n\t\tfor (let i = 0; i < TOTAL_COLORS; i++) {\n\t\t\tthis.refss.push(React.createRef());\n\t\t}\n\t\tthis.onClick = this.onClick.bind(this);\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tonClick(evt) {\n\t\tevt.stopPropagation();\n\t\tthis.selectColor(evt);\n\t}\n\n\tonKeyDown(evt) {\n\t\tif (evt.keyCode === RIGHT_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex++;\n\t\t\tif (this.colorIndex > TOTAL_COLORS - 1) {\n\t\t\t\tthis.colorIndex = 0;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === LEFT_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex--;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex = TOTAL_COLORS - 1;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === UP_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex -= COLORS_IN_ROW;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex += COLORS_IN_ROW;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === DOWN_ARROW_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex += COLORS_IN_ROW;\n\t\t\tif (this.colorIndex > 11) {\n\t\t\t\tthis.colorIndex -= COLORS_IN_ROW;\n\t\t\t}\n\n\t\t} else if (evt.keyCode === SPACE_KEY ||\n\t\t\t\t\tevt.keyCode === RETURN_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\tthis.selectColor(evt);\n\n\t\t} else if (evt.keyCode === TAB_KEY) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tsetFocus(index) {\n\t\tthis.refss[index].current.focus();\n\t}\n\n\tselectColor(evt) {\n\t\tconst color = evt.target.dataset.color;\n\t\tthis.props.subPanelData.clickActionHandler(color);\n\t\tthis.props.closeSubPanel();\n\t}\n\n\trender() {\n\t\tthis.logger.log(\"render\");\n\t\treturn (\n\t\t\t<div className=\"color-picker\" tabIndex={\"-1\"} onClick={this.onClick} onKeyDown={this.onKeyDown}>\n\t\t\t\t<div ref={this.refss[0]} tabIndex={\"-1\"} data-color={\"bkg-col-white-0\"} className=\"color-picker-item white-0\" />\n\t\t\t\t<div ref={this.refss[1]} tabIndex={\"-1\"} data-color={\"bkg-col-yellow-20\"} className=\"color-picker-item yellow-20\" />\n\t\t\t\t<div ref={this.refss[2]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-20\"} className=\"color-picker-item gray-20\" />\n\t\t\t\t<div ref={this.refss[3]} tabIndex={\"-1\"} data-color={\"bkg-col-green-20\"} className=\"color-picker-item green-20\" />\n\t\t\t\t<div ref={this.refss[4]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-20\"} className=\"color-picker-item teal-20\" />\n\t\t\t\t<div ref={this.refss[5]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-20\"} className=\"color-picker-item cyan-20\" />\n\n\t\t\t\t<div ref={this.refss[6]} tabIndex={\"-1\"} data-color={\"bkg-col-red-50\"} className=\"color-picker-item red-50\" />\n\t\t\t\t<div ref={this.refss[7]} tabIndex={\"-1\"} data-color={\"bkg-col-orange-40\"} className=\"color-picker-item orange-40\" />\n\t\t\t\t<div ref={this.refss[8]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-50\"} className=\"color-picker-item gray-50\" />\n\t\t\t\t<div ref={this.refss[9]} tabIndex={\"-1\"} data-color={\"bkg-col-green-50\"} className=\"color-picker-item green-50\" />\n\t\t\t\t<div ref={this.refss[10]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-50\"} className=\"color-picker-item teal-50\" />\n\t\t\t\t<div ref={this.refss[11]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-50\"} className=\"color-picker-item cyan-50\" />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nColorPicker.propTypes = {\n\tcloseSubPanel: PropTypes.func,\n\tsubPanelData: PropTypes.object\n};\n\nexport default ColorPicker;\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/* eslint no-empty-function: [\"error\", { \"allow\": [\"arrowFunctions\"] }] */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ChevronRight16 } from \"@carbon/icons-react\";\nimport ColorPicker from \"../color-picker\";\n\n// context-menu sizing\nconst CONTEXT_MENU_WIDTH = 160; // See context-menu.scss\nconst CONTEXT_MENU_LINK_HEIGHT = 30; // See context-menu.scss\nconst CONTEXT_MENU_DIVIDER_HEIGHT = 1; // See context-menu.scss\nconst EXTRA_OFFSET = 5; // Extra offset for vertical menu positioning\n\n\nclass CommonContextMenu extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdisplaySubMenuAction: \"\"\n\t\t};\n\t\tthis.itemSelected = this.itemSelected.bind(this);\n\t\tthis.colorClicked = this.colorClicked.bind(this);\n\t}\n\n\tonContextMenu(e) {\n\t\te.preventDefault();\n\t}\n\n\titemSelected(data, selectedEvent) {\n\t\tthis.props.contextHandler(data);\n\t\t// This stops the canvasClicked function from being fired which would\n\t\t// clear any current selections.\n\t\tif (selectedEvent) {\n\t\t\tselectedEvent.stopPropagation();\n\t\t}\n\t}\n\n\tcolorClicked(color) {\n\t\tthis.props.contextHandler(\"colorSelectedObjects\", { color });\n\t}\n\n\t// Returns the size of the menu passed in.\n\tcalculateMenuSize(menu) {\n\t\tvar numDividers = 0;\n\t\tfor (let i = 0; i < menu.length; ++i) {\n\t\t\tconst divider = menu[i].divider;\n\t\t\tif (divider) {\n\t\t\t\tnumDividers++;\n\t\t\t}\n\t\t}\n\n\t\tvar menuSize = {\n\t\t\theight: ((menu.length - numDividers) * CONTEXT_MENU_LINK_HEIGHT) + (numDividers * CONTEXT_MENU_DIVIDER_HEIGHT),\n\t\t\twidth: CONTEXT_MENU_WIDTH\n\t\t};\n\n\t\treturn menuSize;\n\t}\n\n\t// Returns a new position and the canvas rectangle for the context menu based on the current\n\t// mouse position and whether the menu would appear outside the edges of the page.\n\tcalculateMenuPos(mousePos, menuSize, canvasRect) {\n\t\tconst menuPos = { x: mousePos.x, y: mousePos.y };\n\n\t\t// Reposition contextMenu if it will show off the bottom of the page\n\t\tif (mousePos.y + menuSize.height > canvasRect.height) {\n\t\t\tmenuPos.y = canvasRect.height - menuSize.height - EXTRA_OFFSET; // Move up by extra offset so it looks nice\n\n\t\t\t// If repositioning the menu would push it off the top of the page\n\t\t\t// (in very short browser windows) position it at the top.\n\t\t\tif (menuPos.y < 0) {\n\t\t\t\tmenuPos.y = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Reposition contextMenu if it will show off the right of the page\n\t\tif (mousePos.x + menuSize.width > canvasRect.width) {\n\t\t\tmenuPos.x -= menuSize.width;\n\t\t}\n\n\t\t// Add a pixel to x and y because on Chrome without this the context menu\n\t\t// appears with the top corner of the first menu item under the mouse\n\t\t// cursor. This highlights the first menu item (which looks weird) and, if\n\t\t// the first item is a cascade menu, automatically opens the sub-menu.\n\t\tmenuPos.x += 1;\n\t\tmenuPos.y += 1;\n\n\t\treturn menuPos;\n\t}\n\n\t// Returns true of all the items in a sub-menu are disabled.\n\tareAllSubmenuItemsDisabled(submenuItems) {\n\t\tlet itemCount = 0;\n\t\tlet disabledCount = 0;\n\t\tsubmenuItems.forEach(function(submenuItem) {\n\t\t\tif (!submenuItem.divider) {\n\t\t\t\titemCount++;\n\t\t\t}\n\t\t\tif (submenuItem.enable === false) {\n\t\t\t\tdisabledCount++;\n\t\t\t}\n\t\t});\n\t\treturn disabledCount === itemCount;\n\t}\n\n\t// Builds a new menu based on the menu defintion passed in.\n\tbuildMenu(menuDefinition, menuSize, menuPos, canvasRect) {\n\t\tconst menuItems = [];\n\n\t\tlet runningYPos = 0;\n\t\t// Records if we have just displayed a divider. This is useful because we\n\t\t// only want to display one divider if there is a divider element\n\t\t// immediately after another divider element in the menuDefintion array.\n\t\tlet previousDivider = false;\n\n\t\tfor (let i = 0; i < menuDefinition.length; ++i) {\n\t\t\tconst divider = menuDefinition[i].divider;\n\t\t\tconst submenu = menuDefinition[i].submenu;\n\n\t\t\tif (divider) {\n\t\t\t\tif (!previousDivider) {\n\t\t\t\t\tmenuItems.push(<div key={i + 1} className={\"context-menu-divider\"} />);\n\t\t\t\t\trunningYPos += CONTEXT_MENU_DIVIDER_HEIGHT;\n\t\t\t\t\tpreviousDivider = true;\n\t\t\t\t}\n\t\t\t} else if (menuDefinition[i].action === \"colorBackground\") {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst disabled = false;\n\t\t\t\tconst subMenuSize = { width: CONTEXT_MENU_WIDTH, height: 50 };\n\t\t\t\tconst subMenuContent = this.buildColorPickerPanel();\n\n\t\t\t\tconst subMenu = this.buildSubMenu(\n\t\t\t\t\tmenuDefinition, i, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\t\t\t\tmenuItems.push(subMenu);\n\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\n\t\t\t} else if (submenu) {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst disabled = this.areAllSubmenuItemsDisabled(menuDefinition[i].menu);\n\t\t\t\tconst subMenuSize = this.calculateMenuSize(menuDefinition[i].menu);\n\t\t\t\tconst subMenuContent = this.buildMenu(menuDefinition[i].menu, menuSize, menuPos, canvasRect);\n\n\t\t\t\tconst subMenu = this.buildSubMenu(\n\t\t\t\t\tmenuDefinition, i, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\t\t\t\tmenuItems.push(subMenu);\n\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\n\t\t\t} else {\n\t\t\t\tpreviousDivider = false;\n\t\t\t\tconst className = \"context-menu-item\" +\n\t\t\t\t\t(menuDefinition[i].enable === false ? \" disabled\" : \"\");\n\n\t\t\t\tconst onClickFunction = menuDefinition[i].enable === false\n\t\t\t\t\t? null\n\t\t\t\t\t: this.itemSelected.bind(null, menuDefinition[i].action);\n\n\t\t\t\tmenuItems.push((\n\t\t\t\t\t<div key={i + 1} className={className} onClick={onClickFunction} role=\"menuitem\">\n\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t</div>\n\t\t\t\t));\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\t\t\t}\n\t\t}\n\t\treturn menuItems;\n\t}\n\n\tbuildColorPickerPanel() {\n\t\tconst subPanelData = {\n\t\t\tclickActionHandler: (c) => this.colorClicked(c)\n\t\t};\n\t\treturn (\n\t\t\t<ColorPicker subPanelData={subPanelData} closeSubPanel={() => null} />\n\t\t);\n\t}\n\n\tsubMenuMouseEnter(action) {\n\t\tthis.setState({ displaySubMenuAction: action });\n\t}\n\n\tsubMenuMouseLeave(action) {\n\t\tthis.setState({ displaySubMenuAction: \"\" });\n\t}\n\n\t// Builds a sub-menu for the menuitem identified by the index into the menudefintion.\n\tbuildSubMenu(menuDefinition, index, subMenuContent, runningYPos, menuPos,\n\t\tmenuSize, subMenuSize, canvasRect, disabled) {\n\t\tconst rtl = this.buildRtlState(menuPos, menuSize, subMenuSize, canvasRect);\n\t\tconst subMenuPosStyle = this.buildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl);\n\t\tconst menuItem = menuDefinition[index];\n\n\t\tconst icon = (<ChevronRight16 />);\n\t\tconst menuItemContent = <div>{menuItem.label}{icon} </div>;\n\t\tconst menuItemClass = \"context-menu-item \" + (disabled ? \" disabled\" : \"\");\n\t\tconst subMenuClass = \"context-menu-popover context-menu-submenu\" +\n\t\t\t(this.state.displaySubMenuAction === menuItem.action ? \" context-menu--visible\" : \"\");\n\t\tconst onMouseEnter = (disabled ? null : this.subMenuMouseEnter.bind(this, menuItem.action));\n\t\tconst onMouseLeave = (disabled ? null : this.subMenuMouseLeave.bind(this));\n\n\t\treturn (\n\t\t\t<div key={index + 1} className={menuItemClass} aria-haspopup role=\"menuitem\"\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t>\n\t\t\t\t{menuItemContent}\n\t\t\t\t<div style={subMenuPosStyle} className={subMenuClass}>\n\t\t\t\t\t{subMenuContent}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Returns a boolean to indicate whether the submenu should appear on the\n\t// right of the context menu (rtl === false) or on the left of the context\n\t// menu (rtl === true).\n\tbuildRtlState(menuPos, menuSize, subMenuSize, canvasRect) {\n\t\t// Ensure that the combined menu position, plus the menu width,\n\t\t// plus the submenu width, does not exceed the viewport bounds.\n\t\treturn (menuPos.x + menuSize.width + subMenuSize.width > canvasRect.right);\n\t}\n\n\t// Returns a style object that can be applied to the sub-menu to adjust its:\n\t// * vertical (y) position: If the submenu is tall enough that it would be\n\t// displayed off the bottom of the canvas area.\n\t// * horizontal (x) position: If the sub-menu needs to appear on the left\n\t// side of the main menu (rtl === true).\n\tbuildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl) {\n\t\t// Does the submenu go below the bottom of the viewport?\n\t\tconst y = canvasRect.bottom - (menuPos.y + runningYPos + subMenuSize.height);\n\n\t\t// If submenu is not below the viewport bottom set offset to 0 so the\n\t\t// submenu will not be moved. Otherwise, y will be used to move the\n\t\t// submenu up fully into the view port.\n\t\tconst offset = (y > 0) ? 0 : y - EXTRA_OFFSET;\n\n\t\tconst subMenuPosStyle = {\n\t\t\ttop: offset + \"px\" // Use negative to push the menu up\n\t\t};\n\n\t\tif (rtl) {\n\t\t\tsubMenuPosStyle.left = -CONTEXT_MENU_WIDTH + \"px\";\n\t\t}\n\n\t\treturn subMenuPosStyle;\n\t}\n\n\t// Returns the menu definition array passed in making sure any\n\t// submenu items have an action. Note: some applications forget\n\t// to do provide an action because for the submenu it is only\n\t// used by the context menu code.\n\tensureAllSubMenuItemsHaveAction(menuDef) {\n\t\treturn menuDef.map((item, index) => {\n\t\t\tif (item.submenu && typeof item.action === \"undefined\") {\n\t\t\t\treturn { ...item, action: \"submenu_\" + index };\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t}\n\n\trender() {\n\t\t// Reposition contextMenu so that it does not show off the screen\n\t\tconst menuSize = this.calculateMenuSize(this.props.menuDefinition);\n\t\tconst menuPos = this.calculateMenuPos(this.props.mousePos, menuSize, this.props.canvasRect);\n\t\tconst posStyle = {\n\t\t\tleft: menuPos.x + \"px\",\n\t\t\ttop: menuPos.y + \"px\"\n\t\t};\n\n\t\tconst menuDefinition = this.ensureAllSubMenuItemsHaveAction(this.props.menuDefinition);\n\t\tconst menuItems = this.buildMenu(menuDefinition, menuSize, menuPos, this.props.canvasRect);\n\n\t\treturn (\n\t\t\t<div id=\"context-menu-popover\" className=\"context-menu-popover\" style={posStyle} onContextMenu={this.onContextMenu}>\n\t\t\t\t{menuItems}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nCommonContextMenu.propTypes = {\n\tcontextHandler: PropTypes.func.isRequired,\n\tmenuDefinition: PropTypes.array.isRequired,\n\tcanvasRect: PropTypes.object.isRequired,\n\tmousePos: PropTypes.object.isRequired\n};\n\nexport default CommonContextMenu;\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 CommonContextMenu from \"./common-context-menu.jsx\";\n\nexport default class ContextMenuWrapper extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {};\n\n\t\tthis.contextMenuClicked = this.contextMenuClicked.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\t// Returns an object that describes the dimensions of a rectangle for the\n\t// canvas div with coordinates based on the top left corner of the div. This\n\t// will match the coordinates for the mouse position where the user clicked,\n\t// which is specified in this.props.contextMenuPos object.\n\tgetCanvasRect() {\n\t\tconst containingDiv = document.getElementById(this.props.containingDivId);\n\t\tif (containingDiv) {\n\t\t\tconst clientRect = containingDiv.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: clientRect.bottom - clientRect.top,\n\t\t\t\tleft: 0,\n\t\t\t\tright: clientRect.right - clientRect.left,\n\t\t\t\theight: clientRect.height,\n\t\t\t\twidth: clientRect.width\n\t\t\t};\n\t\t}\n\t\t// Assist Jests tests to run when containingDiv is not available.\n\t\treturn { top: 0, bottom: 200, left: 0, right: 50, height: 200, width: 50 };\n\t}\n\n\thandleClickOutside(e) {\n\t\t// On Safari, when a user is displaying the context menu with a ctrl-click\n\t\t// (which is a supported context menu gesture on the Mac) a secondary click\n\t\t// event is emmitted which is received here with the ctrlKey field enabled.\n\t\t// So we ignore that event otherwse, if we continue, the context menu will\n\t\t// be closed.\n\t\tif (e.ctrlKey) {\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\t// If the click was anywhere outside the context menu and\n\t\t// the ellipsis button we just close the menu.\n\t\tif (!this.isOverContextMenu(e) && !this.isOverEllipsisButton(e)) {\n\t\t\t// This stop propagation is needed in common canvas so that selected nodes will\n\t\t\t// remain selected even after clicking outside the context menu to close the menu.\n\t\t\tif (this.props.stopPropagation) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t\tthis.props.closeContextMenu();\n\t\t}\n\t}\n\n\t// Retruns true if the event occurred over the context menu.\n\tisOverContextMenu(e) {\n\t\tconst domNode = document.getElementById(\"context-menu-popover\");\n\t\treturn !domNode || domNode.contains(e.target);\n\t}\n\n\t// Returns true if the event occurred over the ellipsis button. Typically\n\t// there will be only one ellipsis button on the canvas, since they are only\n\t// displayed on hover, but in some test cicumstances there might be more\n\t// than one.\n\tisOverEllipsisButton(e) {\n\t\tconst ellipsisNodes = document.getElementsByClassName(\"d3-node-ellipsis-group\");\n\t\tlet state = false;\n\t\tfor (let i = 0; i < ellipsisNodes.length; i++) {\n\t\t\tif (state === false && ellipsisNodes[i].contains(e.target)) {\n\t\t\t\tstate = true;\n\t\t\t}\n\t\t}\n\t\treturn state;\n\t}\n\n\tcontextMenuClicked(action, param) {\n\t\tthis.props.contextMenuActionHandler(action, param);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<CommonContextMenu\n\t\t\t\tcontextHandler={this.contextMenuClicked}\n\t\t\t\tmenuDefinition={this.props.contextMenuDef}\n\t\t\t\tcanvasRect={this.getCanvasRect()}\n\t\t\t\tmousePos={this.props.contextMenuPos}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nContextMenuWrapper.propTypes = {\n\tcontextMenuDef: PropTypes.array.isRequired,\n\tcontainingDivId: PropTypes.string.isRequired,\n\tcontextMenuPos: PropTypes.object.isRequired,\n\tcontextMenuActionHandler: PropTypes.func.isRequired,\n\tcloseContextMenu: PropTypes.func.isRequired,\n\tstopPropagation: PropTypes.bool\n};\n"],"names":["_React$Component","ColorPicker","props","_this","_classCallCheck","_callSuper","logger","Logger","colorIndex","refss","i","push","React","createRef","onClick","bind","onKeyDown","_inherits","_createClass","key","value","this","setFocus","evt","stopPropagation","selectColor","keyCode","TOTAL_COLORS","preventDefault","index","current","focus","color","target","dataset","subPanelData","clickActionHandler","closeSubPanel","log","createElement","className","tabIndex","ref","Component","CommonContextMenu","state","displaySubMenuAction","itemSelected","colorClicked","e","data","selectedEvent","contextHandler","menu","numDividers","length","divider","height","width","mousePos","menuSize","canvasRect","menuPos","x","y","submenuItems","itemCount","disabledCount","forEach","submenuItem","enable","menuDefinition","menuItems","runningYPos","previousDivider","submenu","action","subMenuSize","subMenuContent","buildColorPickerPanel","subMenu","buildSubMenu","disabled","areAllSubmenuItemsDisabled","calculateMenuSize","buildMenu","onClickFunction","role","label","_this2","c","setState","rtl","buildRtlState","subMenuPosStyle","buildSubMenuPosStyle","menuItem","icon","ChevronRight16","menuItemContent","menuItemClass","subMenuClass","onMouseEnter","subMenuMouseEnter","onMouseLeave","subMenuMouseLeave","style","right","bottom","top","left","menuDef","map","item","_objectSpread","calculateMenuPos","posStyle","ensureAllSubMenuItemsHaveAction","id","onContextMenu","ContextMenuWrapper","contextMenuClicked","handleClickOutside","document","addEventListener","removeEventListener","containingDiv","getElementById","containingDivId","clientRect","getBoundingClientRect","ctrlKey","isOverContextMenu","isOverEllipsisButton","closeContextMenu","domNode","contains","ellipsisNodes","getElementsByClassName","param","contextMenuActionHandler","contextMenuDef","getCanvasRect","contextMenuPos"],"mappings":"4gBAoBA,eAaiBA,GAChB,SAAAC,EAAYC,GAAO,IAAAC,EAAAC,OAAAH,IAClBE,EAAAE,OAAAJ,GAAMC,KACDI,OAAS,IAAIC,EAAO,mBAEzBJ,EAAKK,WAAa,EAElBL,EAAKM,MAAQ,GACb,IAAK,IAAIC,EAAI,EAAGA,EAVG,GAUeA,IACjCP,EAAKM,MAAME,KAAKC,EAAMC,aAGoB,OAD3CV,EAAKW,QAAUX,EAAKW,QAAQC,KAAIZ,GAChCA,EAAKa,UAAYb,EAAKa,UAAUD,KAAIZ,GAAOA,EAC3C,OAAAc,EAAAhB,EAAAD,GAAAkB,EAAAjB,IAAAkB,wBAAAC,MAED,WACCC,KAAKC,SAASD,KAAKb,eACnBW,cAAAC,MAED,SAAQG,GACPA,EAAIC,kBACJH,KAAKI,YAAYF,MACjBJ,gBAAAC,MAED,SAAUG,GACT,GAjCsB,KAiClBA,EAAIG,QACPH,EAAIC,kBACJH,KAAKb,aACDa,KAAKb,WAAamB,KACrBN,KAAKb,WAAa,QAGb,GA1Cc,KA0CVe,EAAIG,QACdH,EAAIC,kBACJH,KAAKb,aACDa,KAAKb,WAAa,IACrBa,KAAKb,WAAamB,SAGb,GAhDY,KAgDRJ,EAAIG,QACdH,EAAIC,kBACJH,KAAKb,YA5Cc,EA6Cfa,KAAKb,WAAa,IACrBa,KAAKb,YA9Ca,QAiDb,GArDc,KAqDVe,EAAIG,QACdH,EAAIC,kBACJH,KAAKb,YAnDc,EAoDfa,KAAKb,WAAa,KACrBa,KAAKb,YArDa,QAwDb,GAhES,KAgELe,EAAIG,S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sF,EAAUZ,SAASI,eAAe,wBACxC,OAAQQ,GAAWA,EAAQC,SAASvF,EAAEhB,WAMvCd,2BAAAC,MACA,SAAqB6B,GAGpB,IAFA,IAAMwF,EAAgBd,SAASe,uBAAuB,0BAClD7F,GAAQ,EACHnC,EAAI,EAAGA,EAAI+H,EAAclF,OAAQ7C,KAC3B,IAAVmC,GAAmB4F,EAAc/H,GAAG8H,SAASvF,EAAEhB,UAClDY,GAAQ,GAGV,OAAOA,KACP1B,yBAAAC,MAED,SAAmBwD,EAAQ+D,GAC1BtH,KAAKnB,MAAM0I,yBAAyBhE,EAAQ+D,MAC5CxH,aAAAC,MAED,WACC,OACCR,EAAA2B,cAACK,GACAQ,eAAgB/B,KAAKoG,mBACrBlD,eAAgBlD,KAAKnB,MAAM2I,eAC3BhF,WAAYxC,KAAKyH,gBACjBnF,SAAUtC,KAAKnB,MAAM6I,oBAGvB,EA/F8CnI,EAAM+B"}
@@ -1,2 +1,2 @@
1
- function t(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function e(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e||"default");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:String(e)}function o(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,e(n.key),n)}}function n(t,r,e){return r&&o(t.prototype,r),e&&o(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}export{t as _,n as a,r as b,e as t};
2
- //# sourceMappingURL=createClass-440000a3.js.map
1
+ function t(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function e(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e||"default");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function o(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,e(n.key),n)}}function n(t,r,e){return r&&o(t.prototype,r),e&&o(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}export{n as _,t as a,r as b,e as t};
2
+ //# sourceMappingURL=createClass-02596015.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createClass-02596015.js","sources":["../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/createClass.js"],"sourcesContent":["export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}"],"names":["_classCallCheck","instance","Constructor","TypeError","_typeof","o","Symbol","iterator","constructor","prototype","toPropertyKey","t","i","r","e","toPrimitive","call","String","Number","_defineProperties","target","props","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","protoProps","staticProps"],"mappings":"AAAe,SAASA,EAAgBC,EAAUC,GAChD,KAAMD,aAAoBC,GACxB,MAAM,IAAIC,UAAU,oCAExB,CCJe,SAASC,EAAQC,GAG9B,OAAOD,EAAU,mBAAqBE,QAAU,iBAAmBA,OAAOC,SAAW,SAAUF,GAC7F,cAAcA,GACZ,SAAUA,GACZ,OAAOA,GAAK,mBAAqBC,QAAUD,EAAEG,cAAgBF,QAAUD,IAAMC,OAAOG,UAAY,gBAAkBJ,GACjHD,EAAQC,EACb,CCNe,SAASK,EAAcC,GACpC,IAAIC,ECFS,SAAqBD,EAAGE,GACrC,GAAI,UAAYT,EAAQO,KAAOA,EAAG,OAAOA,EACzC,IAAIG,EAAIH,EAAEL,OAAOS,aACjB,QAAI,IAAWD,EAAG,CAChB,IAAIF,EAAIE,EAAEE,KAAKL,EAAGE,GAAK,WACvB,GAAI,UAAYT,EAAQQ,GAAI,OAAOA,EACnC,MAAM,IAAIT,UAAU,gDAEtB,OAAQ,WAAaU,EAAII,OAASC,QAAQP,EAC5C,CDPUI,CAAYJ,EAAG,UACvB,MAAO,UAAYP,EAAQQ,GAAKA,EAAIA,EAAI,EAC1C,CEJA,SAASO,EAAkBC,EAAQC,GACjC,IAAK,IAAIT,EAAI,EAAGA,EAAIS,EAAMC,OAAQV,IAAK,CACrC,IAAIW,EAAaF,EAAMT,GACvBW,EAAWC,WAAaD,EAAWC,aAAc,EACjDD,EAAWE,cAAe,EACtB,UAAWF,IAAYA,EAAWG,UAAW,GACjDC,OAAOC,eAAeR,EAAQV,EAAca,EAAWM,KAAMN,GAEjE,CACe,SAASO,EAAa5B,EAAa6B,EAAYC,GAM5D,OALID,GAAYZ,EAAkBjB,EAAYO,UAAWsB,GACrDC,GAAab,EAAkBjB,EAAa8B,GAChDL,OAAOC,eAAe1B,EAAa,YAAa,CAC9CwB,UAAU,IAELxB,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(r){var e=function(r,e){if("object"!=t(r)||!r)return r;var o=r[Symbol.toPrimitive];if(void 0!==o){var n=o.call(r,e||"default");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==t(e)?e:e+""}function e(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}exports._classCallCheck=function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")},exports._createClass=function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t},exports._typeof=t,exports.toPropertyKey=r;
2
+ //# sourceMappingURL=createClass-155bf7da.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createClass-155bf7da.js","sources":["../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js"],"sourcesContent":["export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","toPropertyKey","t","i","r","e","toPrimitive","call","TypeError","String","Number","_defineProperties","target","props","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","instance","Constructor","protoProps","staticProps"],"mappings":"aAAe,SAASA,EAAQC,GAG9B,OAAOD,EAAU,mBAAqBE,QAAU,iBAAmBA,OAAOC,SAAW,SAAUF,GAC7F,cAAcA,GACZ,SAAUA,GACZ,OAAOA,GAAK,mBAAqBC,QAAUD,EAAEG,cAAgBF,QAAUD,IAAMC,OAAOG,UAAY,gBAAkBJ,GACjHD,EAAQC,EACb,CCNe,SAASK,EAAcC,GACpC,IAAIC,ECFS,SAAqBD,EAAGE,GACrC,GAAI,UAAYT,EAAQO,KAAOA,EAAG,OAAOA,EACzC,IAAIG,EAAIH,EAAEL,OAAOS,aACjB,QAAI,IAAWD,EAAG,CAChB,IAAIF,EAAIE,EAAEE,KAAKL,EAAGE,GAAK,WACvB,GAAI,UAAYT,EAAQQ,GAAI,OAAOA,EACnC,MAAM,IAAIK,UAAU,gDAEtB,OAAQ,WAAaJ,EAAIK,OAASC,QAAQR,EAC5C,CDPUI,CAAYJ,EAAG,UACvB,MAAO,UAAYP,EAAQQ,GAAKA,EAAIA,EAAI,EAC1C,CEJA,SAASQ,EAAkBC,EAAQC,GACjC,IAAK,IAAIV,EAAI,EAAGA,EAAIU,EAAMC,OAAQX,IAAK,CACrC,IAAIY,EAAaF,EAAMV,GACvBY,EAAWC,WAAaD,EAAWC,aAAc,EACjDD,EAAWE,cAAe,EACtB,UAAWF,IAAYA,EAAWG,UAAW,GACjDC,OAAOC,eAAeR,EAAQX,EAAcc,EAAWM,KAAMN,GAEjE,yBCTe,SAAyBO,EAAUC,GAChD,KAAMD,aAAoBC,GACxB,MAAM,IAAIf,UAAU,oCAExB,uBDMe,SAAsBe,EAAaC,EAAYC,GAM5D,OALID,GAAYb,EAAkBY,EAAYvB,UAAWwB,GACrDC,GAAad,EAAkBY,EAAaE,GAChDN,OAAOC,eAAeG,EAAa,YAAa,CAC9CL,UAAU,IAELK,CACT"}
@@ -0,0 +1,2 @@
1
+ import{a as e,L as t,m as r,R as i,s as n,a2 as a,a3 as o,_ as s,w as d,H as c,I as p,y as u,a4 as l,a5 as f,x as m,B as y,C as h,A as v,q as b,j as g}from"./isArrayLikeObject-7a30aa4b.js";import{f as _,h as j,_ as A,i as w,j as q}from"./canvas-constants-3bbfc8b1.js";import{_ as I,a as S}from"./createClass-02596015.js";var O=_,x=e,k=t,M=r,F=i;var P=function(e,t,r,i){if(!M(e))return e;for(var n=-1,a=(t=x(t,e)).length,o=a-1,s=e;null!=s&&++n<a;){var d=F(t[n]),c=r;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(n!=o){var p=s[d];void 0===(c=i?i(p,d,s):void 0)&&(c=M(p)?p:k(t[n+1])?[]:{})}O(s,d,c),s=s[d]}return e},$=n;var D=function(e){return(null==e?0:e.length)?$(e,1):[]},L=a,C=o;var T=function(e){return C(L(e,void 0,D),e+"")};var U=s,W=function(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(r=r>n?n:r)<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(n);++i<n;)a[i]=e[i+t];return a};var H=e,N=d,R=function(e,t){return t.length<2?e:U(e,W(t,0,-1))},B=i;var E=function(e,t){return t=H(t,e),null==(e=R(e,t))||delete e[B(N(t))]},J=c,z=j,G=p,K=Function.prototype,Q=Object.prototype,V=K.toString,X=Q.hasOwnProperty,Y=V.call(Object);var Z=function(e){if(!G(e)||"[object Object]"!=J(e))return!1;var t=z(e);if(null===t)return!0;var r=X.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&V.call(r)==Y},ee=Z;var te=u,re=q,ie=E,ne=e,ae=A,oe=function(e){return ee(e)?void 0:e},se=w,de=T((function(e,t){var r={};if(null==e)return r;var i=!1;t=te(t,(function(t){return t=ne(t,e),i||(i=t.length>1),t})),ae(e,se(e),r),i&&(r=re(r,7,oe));for(var n=t.length;n--;)ie(r,t[n]);return r})),ce=function(){return I((function e(){S(this,e)}),[{key:"do",value:function(){}},{key:"undo",value:function(){}},{key:"redo",value:function(){}},{key:"getLabel",value:function(){}}])}(),pe=P;var ue=function(e,t,r){return null==e?e:pe(e,t,r)};var le=l,fe=function(){},me=le&&1/f(new le([,-0]))[1]==1/0?function(e){return new le(e)}:fe,ye=m,he=y,ve=h,be=v,ge=me,_e=f;var je=function(e,t,r){var i=-1,n=he,a=e.length,o=!0,s=[],d=s;if(r)o=!1,n=ve;else if(a>=200){var c=t?null:ge(e);if(c)return _e(c);o=!1,n=be,d=new ye}else d=t?[]:s;e:for(;++i<a;){var p=e[i],u=t?t(p):p;if(p=r||0!==p?p:0,o&&u==u){for(var l=d.length;l--;)if(d[l]===u)continue e;t&&d.push(u),s.push(p)}else n(d,u,r)||(d!==s&&d.push(u),s.push(p))}return s},Ae=n,we=je,qe=g,Ie=b((function(e){return we(Ae(e,1,qe,!0))}));function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function Oe(e){return function(e){if(Array.isArray(e))return Se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Se(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Se(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var xe={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json",title:"Watson Data Platform Datarecord Metadata Schema",description:"Metadata schema for datarecords in the Watson Data Platform",type:"object",definitions:{record_schema:{description:"Description of a datarecord including column types and metadata",type:"object",properties:{id:{description:"Unique identifier",type:"string"},name:{description:"Name of datarecord",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json"],type:"string"},type:{description:"Always 'struct' for datarecord schema",type:"string"},fields:{description:"Array of field definitions",type:"array",minItems:0,items:{$ref:"#/definitions/field"},uniqueItems:!0},struct_types:{description:"The list of custom struct types to be used as field types",type:"object",patternProperties:{".":{type:"object",properties:{fields:{description:"Array of field definitions",type:"array",minItems:0,items:{$ref:"#/definitions/field"},uniqueItems:!0}}}}}},required:["id","fields"]},field:{description:"Definition of a datarecord field",type:"object",properties:{name:{description:"Field name. Must be unique within the datarecord",type:"string"},type:{description:"Field type. Can be a primitive type (string, integer, double, date, time, timestamp, binary, boolean, array[type], map[type, type]. The type can also be a reference to a struct_type declaration.)",type:"string"},nullable:{description:"Whether or not one can place null values into the field",type:"boolean",default:!1},metadata:{$ref:"#/definitions/metadata"},app_data:{$ref:"#/definitions/app_data_def"}},required:["name","type"]},metadata:{description:"Additional field metadata",type:"object",properties:{description:{description:"Field description",type:"string"},measure:{description:"Field measurement level",enum:["range","discrete","flag","set","ordered-set","typeless","collection","geospatial","default"]},modeling_role:{description:"Field role for modeling",enum:["input","target","both","none","partition","split","frequency","record-id"]},max_length:{description:"Maximum length for fields. Length is unlimited when not present",type:"number"},min_length:{description:"Minimum length for fields",type:"number"},decimal_precision:{description:"Precision for decimal, time, and timestamp types",type:"number"},decimal_scale:{description:"Scale for decimal, time, and timestamp types",type:"number"},values:{description:"Array of unique categorical values for the column",type:"array",minItems:0,items:{description:"A value discovered in the data",type:["string","number","boolean"]},uniqueItems:!0},range:{description:"Minimum and maximum discovered values for scalar data",type:"object",properties:{min:{description:"Lowest value discovered in the data",type:["string","number"]},max:{description:"Highest value discovered in the data",type:["string","number"]}},required:["min","max"]},runtime_type:{description:"Type of runtime",type:"string"},is_key:{description:"A field is key",type:"boolean"},is_signed:{description:"Signed or Unsigned for number",type:"boolean"},item_index:{description:"Item record level",type:"number"},source_field_id:{description:"Source field for a target field",type:"string"}}},app_data_def:{description:"Object containing app-specific data",type:"object",properties:{},additionalProperties:!0}}};export{ce as A,P as _,T as a,je as b,Oe as c,xe as d,Z as i,de as o,ue as s,Ie as u};
2
+ //# sourceMappingURL=datarecord-metadata-v3-schema-2311ecab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"datarecord-metadata-v3-schema-03427296.js","sources":["../node_modules/lodash/_baseSet.js","../node_modules/lodash/flatten.js","../node_modules/lodash/_flatRest.js","../node_modules/lodash/_parent.js","../node_modules/lodash/_baseSlice.js","../node_modules/lodash/_baseUnset.js","../node_modules/lodash/isPlainObject.js","../node_modules/lodash/_customOmitClone.js","../node_modules/lodash/omit.js","../src/command-stack/action.js","../node_modules/lodash/set.js","../node_modules/lodash/_createSet.js","../node_modules/lodash/noop.js","../node_modules/lodash/_baseUniq.js","../node_modules/lodash/union.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js"],"sourcesContent":["var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var baseGet = require('./_baseGet'),\n baseSlice = require('./_baseSlice');\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nmodule.exports = parent;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var castPath = require('./_castPath'),\n last = require('./last'),\n parent = require('./_parent'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n}\n\nmodule.exports = baseUnset;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var isPlainObject = require('./isPlainObject');\n\n/**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\nfunction customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n}\n\nmodule.exports = customOmitClone;\n","var arrayMap = require('./_arrayMap'),\n baseClone = require('./_baseClone'),\n baseUnset = require('./_baseUnset'),\n castPath = require('./_castPath'),\n copyObject = require('./_copyObject'),\n customOmitClone = require('./_customOmitClone'),\n flatRest = require('./_flatRest'),\n getAllKeysIn = require('./_getAllKeysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\nvar omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n});\n\nmodule.exports = omit;\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\n/* eslint no-empty-function: [\"error\", { \"allow\": [\"methods\"] }] */\n\nclass Action {\n\n\t// Standard methods\n\tdo() {\n\t}\n\n\tundo() {\n\t}\n\n\tredo() {\n\t}\n\n\tgetLabel() {\n\t}\n}\n\nexport default Action;\n","var baseSet = require('./_baseSet');\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n baseUniq = require('./_baseUniq'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nmodule.exports = union;\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}"],"names":["assignValue","require$$0","castPath","require$$1","isIndex","require$$2","isObject","require$$3","toKey","require$$4","_baseSet","object","path","value","customizer","index","length","lastIndex","nested","key","newValue","objValue","undefined","baseFlatten","flatten","array","overRest","setToString","_flatRest","func","baseGet","baseSlice","start","end","result","Array","last","parent","_baseUnset","baseGetTag","getPrototype","isObjectLike","funcProto","Function","prototype","objectProto","Object","funcToString","toString","hasOwnProperty","objectCtorString","call","isPlainObject_1","proto","Ctor","constructor","isPlainObject","arrayMap","baseClone","baseUnset","copyObject","customOmitClone","getAllKeysIn","require$$7","omit_1","require$$6","paths","isDeep","CLONE_DEEP_FLAG","Action","_classCallCheck","_createClass","baseSet","set_1","Set","noop","createSet","values","SetCache","arrayIncludes","arrayIncludesWith","cacheHas","setToArray","require$$5","_baseUniq","iteratee","comparator","includes","isCommon","seen","set","outer","computed","seenIndex","push","baseUniq","isArrayLikeObject","union_1","arrays","_arrayLikeToArray","arr","len","i","arr2","_toConsumableArray","isArray","arrayLikeToArray","arrayWithoutHoles","iter","Symbol","iterator","from","iterableToArray","o","minLen","n","slice","name","test","unsupportedIterableToArray","TypeError","nonIterableSpread"],"mappings":"iUAAA,IAAIA,EAAcC,EACdC,EAAWC,EACXC,EAAUC,EACVC,EAAWC,EACXC,EAAQC,MA8CZC,EAlCA,SAAiBC,EAAQC,EAAMC,EAAOC,GACpC,IAAKR,EAASK,GACZ,OAAOA,EAST,IALA,IAAII,GAAS,EACTC,GAHJJ,EAAOV,EAASU,EAAMD,IAGJK,OACdC,EAAYD,EAAS,EACrBE,EAASP,EAEI,MAAVO,KAAoBH,EAAQC,GAAQ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OAAOH,GAASxE,GAAY2E,EAAQ,EAAGF,IAAmB,GAC5D,ICvBe,SAASG,GAAkBC,EAAKC,IAClC,MAAPA,GAAeA,EAAMD,EAAIpF,UAAQqF,EAAMD,EAAIpF,QAC/C,IAAK,IAAIsF,EAAI,EAAGC,EAAO,IAAIpE,MAAMkE,GAAMC,EAAID,EAAKC,IAAKC,EAAKD,GAAKF,EAAIE,GACnE,OAAOC,CACT,CCAe,SAASC,GAAmBJ,GACzC,OCJa,SAA4BA,GACzC,GAAIjE,MAAMsE,QAAQL,GAAM,OAAOM,GAAiBN,EAClD,CDESO,CAAkBP,IELZ,SAA0BQ,GACvC,GAAsB,oBAAXC,QAAmD,MAAzBD,EAAKC,OAAOC,WAA2C,MAAtBF,EAAK,cAAuB,OAAOzE,MAAM4E,KAAKH,EACtH,CFGmCI,CAAgBZ,IGJpC,SAAqCa,EAAGC,GACrD,GAAKD,EAAL,CACA,GAAiB,iBAANA,EAAgB,OAAOP,GAAiBO,EAAGC,GACtD,IAAIC,EAAIrE,OAAOF,UAAUI,SAASG,KAAK8D,GAAGG,MAAM,GAAI,GAEpD,MADU,WAAND,GAAkBF,EAAE1D,cAAa4D,EAAIF,EAAE1D,YAAY8D,MAC7C,QAANF,GAAqB,QAANA,EAAoBhF,MAAM4E,KAAKE,GACxC,cAANE,GAAqB,2CAA2CG,KAAKH,GAAWT,GAAiBO,EAAGC,QAAxG,EACF,CHH2DK,CAA2BnB,IILvE,WACb,MAAM,IAAIoB,UAAU,uIACtB,CJG8FC,EAC9F"}
1
+ {"version":3,"file":"datarecord-metadata-v3-schema-2311ecab.js","sources":["../node_modules/lodash/_baseSet.js","../node_modules/lodash/flatten.js","../node_modules/lodash/_flatRest.js","../node_modules/lodash/_parent.js","../node_modules/lodash/_baseSlice.js","../node_modules/lodash/_baseUnset.js","../node_modules/lodash/isPlainObject.js","../node_modules/lodash/_customOmitClone.js","../node_modules/lodash/omit.js","../src/command-stack/action.js","../node_modules/lodash/set.js","../node_modules/lodash/_createSet.js","../node_modules/lodash/noop.js","../node_modules/lodash/_baseUniq.js","../node_modules/lodash/union.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js"],"sourcesContent":["var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var baseGet = require('./_baseGet'),\n baseSlice = require('./_baseSlice');\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nmodule.exports = parent;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var castPath = require('./_castPath'),\n last = require('./last'),\n parent = require('./_parent'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n}\n\nmodule.exports = baseUnset;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var isPlainObject = require('./isPlainObject');\n\n/**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\nfunction customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n}\n\nmodule.exports = customOmitClone;\n","var arrayMap = require('./_arrayMap'),\n baseClone = require('./_baseClone'),\n baseUnset = require('./_baseUnset'),\n castPath = require('./_castPath'),\n copyObject = require('./_copyObject'),\n customOmitClone = require('./_customOmitClone'),\n flatRest = require('./_flatRest'),\n getAllKeysIn = require('./_getAllKeysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\nvar omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n});\n\nmodule.exports = omit;\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\n/* eslint no-empty-function: [\"error\", { \"allow\": [\"methods\"] }] */\n\nclass Action {\n\n\t// Standard methods\n\tdo() {\n\t}\n\n\tundo() {\n\t}\n\n\tredo() {\n\t}\n\n\tgetLabel() {\n\t}\n}\n\nexport default Action;\n","var baseSet = require('./_baseSet');\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n baseUniq = require('./_baseUniq'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nmodule.exports = union;\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}"],"names":["assignValue","require$$0","castPath","require$$1","isIndex","require$$2","isObject","require$$3","toKey","require$$4","_baseSet","object","path","value","customizer","index","length","lastIndex","nested","key","newValue","objValue","undefined","baseFlatten","flatten","array","overRest","setToString","_flatRest","func","baseGet","baseSlice","start","end","result","Array","last","parent","_baseUnset","baseGetTag","getPrototype","isObjectLike","funcProto","Function","prototype","objectProto","Object","funcToString","toString","hasOwnProperty","objectCtorString","call","isPlainObject_1","proto","Ctor","constructor","isPlainObject","arrayMap","baseClone","baseUnset","copyObject","customOmitClone","getAllKeysIn","require$$7","omit_1","require$$6","paths","isDeep","CLONE_DEEP_FLAG","_createClass","Action","_classCallCheck","baseSet","set_1","Set","noop","createSet","values","SetCache","arrayIncludes","arrayIncludesWith","cacheHas","setToArray","require$$5","_baseUniq","iteratee","comparator","includes","isCommon","seen","set","outer","computed","seenIndex","push","baseUniq","isArrayLikeObject","union_1","arrays","_arrayLikeToArray","arr","len","i","arr2","_toConsumableArray","isArray","arrayLikeToArray","arrayWithoutHoles","iter","Symbol","iterator","from","iterableToArray","o","minLen","n","slice","name","test","unsupportedIterableToArray","TypeError","nonIterableSpread"],"mappings":"iUAAA,IAAIA,EAAcC,EACdC,EAAWC,EACXC,EAAUC,EACVC,EAAWC,EACXC,EAAQC,MA8CZC,EAlCA,SAAiBC,EAAQC,EAAMC,EAAOC,GACpC,IAAKR,EAASK,GACZ,OAAOA,EAST,IALA,IAAII,GAAS,EACTC,GAHJJ,EAAOV,EAASU,EAAMD,IAGJK,OACdC,EAAYD,EAAS,EACrBE,EAASP,EAEI,MAAVO,KAAoBH,EAAQC,GAAQ,CACzC,IAAIG,EAAMX,EAAMI,EAAKG,IACjBK,EAAWP,EAEf,GAAY,cAARM,GAA+B,gBAARA,GAAiC,cAARA,EAClD,OAAOR,EAGT,GAAII,GAASE,EAAW,CACtB,IAAII,EAAWH,EAAOC,QAELG,KADjBF,EAAWN,EAAaA,EAAWO,EAAUF,EAAKD,QAAUI,KAE1DF,EAAWd,EAASe,GAChBA,EACCjB,EAAQQ,EAAKG,EAAQ,IAAM,GAAK,IAGzCf,EAAYkB,EAAQC,EAAKC,GACzBF,EAASA,EAAOC,GAElB,OAAOR,CACT,EChDIY,EAActB,MCAduB,EDgBJ,SAAiBC,GAEf,OADsB,MAATA,EAAgB,EAAIA,EAAMT,QACvBO,EAAYE,EAAO,GAAK,EAC1C,EClBIC,EAAWvB,EACXwB,EAActB,MAalBuB,EAJA,SAAkBC,GAChB,OAAOF,EAAYD,EAASG,OAAMP,EAAWE,GAAUK,EAAO,GAChE,MCbIC,EAAU7B,EACV8B,ECQJ,SAAmBN,EAAOO,EAAOC,GAC/B,IAAIlB,GAAS,EACTC,EAASS,EAAMT,OAEfgB,EAAQ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