1 line
64 KiB
JSON
1 line
64 KiB
JSON
{"ast":null,"code":"import React, { Component } from 'react';\nimport { DomHandler, classNames, ObjectUtils, ZIndexUtils } from 'primereact/utils';\nimport { CSSTransition } from 'primereact/csstransition';\nimport { Ripple } from 'primereact/ripple';\nimport { Portal } from 'primereact/portal';\nimport PrimeReact from 'primereact/api';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\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, descriptor.key, descriptor);\n }\n}\n\nfunction _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}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar ContextMenuSub = /*#__PURE__*/function (_Component) {\n _inherits(ContextMenuSub, _Component);\n\n var _super = _createSuper(ContextMenuSub);\n\n function ContextMenuSub(props) {\n var _this;\n\n _classCallCheck(this, ContextMenuSub);\n\n _this = _super.call(this, props);\n _this.state = {\n activeItem: null\n };\n _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));\n _this.submenuRef = /*#__PURE__*/React.createRef();\n return _this;\n }\n\n _createClass(ContextMenuSub, [{\n key: \"onItemMouseEnter\",\n value: function onItemMouseEnter(event, item) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n this.setState({\n activeItem: item\n });\n }\n }, {\n key: \"onItemClick\",\n value: function onItemClick(event, item) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n if (!item.url) {\n event.preventDefault();\n }\n\n if (item.command) {\n item.command({\n originalEvent: event,\n item: item\n });\n }\n\n if (!item.items) {\n this.props.onLeafClick(event);\n }\n }\n }, {\n key: \"position\",\n value: function position() {\n var parentItem = this.submenuRef.current.parentElement;\n var containerOffset = DomHandler.getOffset(this.submenuRef.current.parentElement);\n var viewport = DomHandler.getViewport();\n var sublistWidth = this.submenuRef.current.offsetParent ? this.submenuRef.current.offsetWidth : DomHandler.getHiddenElementOuterWidth(this.submenuRef.current);\n var itemOuterWidth = DomHandler.getOuterWidth(parentItem.children[0]);\n this.submenuRef.current.style.top = '0px';\n\n if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - DomHandler.calculateScrollbarWidth()) {\n this.submenuRef.current.style.left = -1 * sublistWidth + 'px';\n } else {\n this.submenuRef.current.style.left = itemOuterWidth + 'px';\n }\n }\n }, {\n key: \"onEnter\",\n value: function onEnter() {\n this.position();\n }\n }, {\n key: \"isActive\",\n value: function isActive() {\n return this.props.root || !this.props.resetMenu;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.isActive()) {\n this.position();\n }\n }\n }, {\n key: \"renderSeparator\",\n value: function renderSeparator(index) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: 'separator_' + index,\n className: \"p-menu-separator\",\n role: \"separator\"\n });\n }\n }, {\n key: \"renderSubmenu\",\n value: function renderSubmenu(item) {\n if (item.items) {\n return /*#__PURE__*/React.createElement(ContextMenuSub, {\n model: item.items,\n resetMenu: item !== this.state.activeItem,\n onLeafClick: this.props.onLeafClick\n });\n }\n\n return null;\n }\n }, {\n key: \"renderMenuitem\",\n value: function renderMenuitem(item, index) {\n var _this2 = this;\n\n var active = this.state.activeItem === item;\n var className = classNames('p-menuitem', {\n 'p-menuitem-active': active\n }, item.className);\n var linkClassName = classNames('p-menuitem-link', {\n 'p-disabled': item.disabled\n });\n var iconClassName = classNames('p-menuitem-icon', item.icon);\n var submenuIconClassName = 'p-submenu-icon pi pi-angle-right';\n var icon = item.icon && /*#__PURE__*/React.createElement(\"span\", {\n className: iconClassName\n });\n var label = item.label && /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-menuitem-text\"\n }, item.label);\n var submenuIcon = item.items && /*#__PURE__*/React.createElement(\"span\", {\n className: submenuIconClassName\n });\n var submenu = this.renderSubmenu(item);\n var content = /*#__PURE__*/React.createElement(\"a\", {\n href: item.url || '#',\n className: linkClassName,\n target: item.target,\n onClick: function onClick(event) {\n return _this2.onItemClick(event, item, index);\n },\n role: \"menuitem\",\n \"aria-haspopup\": item.items != null,\n \"aria-disabled\": item.disabled\n }, icon, label, submenuIcon, /*#__PURE__*/React.createElement(Ripple, null));\n\n if (item.template) {\n var defaultContentOptions = {\n onClick: function onClick(event) {\n return _this2.onItemClick(event, item, index);\n },\n className: linkClassName,\n labelClassName: 'p-menuitem-text',\n iconClassName: iconClassName,\n submenuIconClassName: submenuIconClassName,\n element: content,\n props: this.props,\n active: active\n };\n content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"li\", {\n key: item.label + '_' + index,\n role: \"none\",\n className: className,\n style: item.style,\n onMouseEnter: function onMouseEnter(event) {\n return _this2.onItemMouseEnter(event, item);\n }\n }, content, submenu);\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(item, index) {\n if (item.separator) return this.renderSeparator(index);else return this.renderMenuitem(item, index);\n }\n }, {\n key: \"renderMenu\",\n value: function renderMenu() {\n var _this3 = this;\n\n if (this.props.model) {\n return this.props.model.map(function (item, index) {\n return _this3.renderItem(item, index);\n });\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = classNames({\n 'p-submenu-list': !this.props.root\n });\n var submenu = this.renderMenu();\n var isActive = this.isActive();\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.submenuRef,\n classNames: \"p-contextmenusub\",\n \"in\": isActive,\n timeout: {\n enter: 0,\n exit: 0\n },\n unmountOnExit: true,\n onEnter: this.onEnter\n }, /*#__PURE__*/React.createElement(\"ul\", {\n ref: this.submenuRef,\n className: className\n }, submenu));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.resetMenu === true) {\n return {\n activeItem: null\n };\n }\n\n return null;\n }\n }]);\n\n return ContextMenuSub;\n}(Component);\n\n_defineProperty(ContextMenuSub, \"defaultProps\", {\n model: null,\n root: false,\n className: null,\n resetMenu: false,\n onLeafClick: null\n});\n\nvar ContextMenu = /*#__PURE__*/function (_Component2) {\n _inherits(ContextMenu, _Component2);\n\n var _super2 = _createSuper(ContextMenu);\n\n function ContextMenu(props) {\n var _this4;\n\n _classCallCheck(this, ContextMenu);\n\n _this4 = _super2.call(this, props);\n _this4.state = {\n visible: false,\n reshow: false,\n resetMenu: false\n };\n _this4.onMenuClick = _this4.onMenuClick.bind(_assertThisInitialized(_this4));\n _this4.onLeafClick = _this4.onLeafClick.bind(_assertThisInitialized(_this4));\n _this4.onMenuMouseEnter = _this4.onMenuMouseEnter.bind(_assertThisInitialized(_this4));\n _this4.onEnter = _this4.onEnter.bind(_assertThisInitialized(_this4));\n _this4.onEntered = _this4.onEntered.bind(_assertThisInitialized(_this4));\n _this4.onExit = _this4.onExit.bind(_assertThisInitialized(_this4));\n _this4.onExited = _this4.onExited.bind(_assertThisInitialized(_this4));\n _this4.menuRef = /*#__PURE__*/React.createRef();\n return _this4;\n }\n\n _createClass(ContextMenu, [{\n key: \"onMenuClick\",\n value: function onMenuClick() {\n this.setState({\n resetMenu: false\n });\n }\n }, {\n key: \"onMenuMouseEnter\",\n value: function onMenuMouseEnter() {\n this.setState({\n resetMenu: false\n });\n }\n }, {\n key: \"show\",\n value: function show(event) {\n var _this5 = this;\n\n if (!(event instanceof Event)) {\n event.persist();\n }\n\n event.stopPropagation();\n event.preventDefault();\n this.currentEvent = event;\n\n if (this.state.visible) {\n this.setState({\n reshow: true\n });\n } else {\n this.setState({\n visible: true\n }, function () {\n if (_this5.props.onShow) {\n _this5.props.onShow(_this5.currentEvent);\n }\n });\n }\n }\n }, {\n key: \"hide\",\n value: function hide(event) {\n var _this6 = this;\n\n if (!(event instanceof Event)) {\n event.persist();\n }\n\n this.currentEvent = event;\n this.setState({\n visible: false,\n reshow: false\n }, function () {\n if (_this6.props.onHide) {\n _this6.props.onHide(_this6.currentEvent);\n }\n });\n }\n }, {\n key: \"onEnter\",\n value: function onEnter() {\n if (this.props.autoZIndex) {\n ZIndexUtils.set('menu', this.menuRef.current, PrimeReact.autoZIndex, this.props.baseZIndex || PrimeReact.zIndex['menu']);\n }\n\n this.position(this.currentEvent);\n }\n }, {\n key: \"onEntered\",\n value: function onEntered() {\n this.bindDocumentListeners();\n }\n }, {\n key: \"onExit\",\n value: function onExit() {\n this.currentEvent = null;\n this.unbindDocumentListeners();\n }\n }, {\n key: \"onExited\",\n value: function onExited() {\n ZIndexUtils.clear(this.menuRef.current);\n }\n }, {\n key: \"position\",\n value: function position(event) {\n if (event) {\n var left = event.pageX + 1;\n var top = event.pageY + 1;\n var width = this.menuRef.current.offsetParent ? this.menuRef.current.offsetWidth : DomHandler.getHiddenElementOuterWidth(this.menuRef.current);\n var height = this.menuRef.current.offsetParent ? this.menuRef.current.offsetHeight : DomHandler.getHiddenElementOuterHeight(this.menuRef.current);\n var viewport = DomHandler.getViewport(); //flip\n\n if (left + width - document.body.scrollLeft > viewport.width) {\n left -= width;\n } //flip\n\n\n if (top + height - document.body.scrollTop > viewport.height) {\n top -= height;\n } //fit\n\n\n if (left < document.body.scrollLeft) {\n left = document.body.scrollLeft;\n } //fit\n\n\n if (top < document.body.scrollTop) {\n top = document.body.scrollTop;\n }\n\n this.menuRef.current.style.left = left + 'px';\n this.menuRef.current.style.top = top + 'px';\n }\n }\n }, {\n key: \"onLeafClick\",\n value: function onLeafClick(event) {\n this.setState({\n resetMenu: true\n });\n this.hide(event);\n event.stopPropagation();\n }\n }, {\n key: \"isOutsideClicked\",\n value: function isOutsideClicked(event) {\n return this.menuRef && this.menuRef.current && !(this.menuRef.current.isSameNode(event.target) || this.menuRef.current.contains(event.target));\n }\n }, {\n key: \"bindDocumentListeners\",\n value: function bindDocumentListeners() {\n this.bindDocumentResizeListener();\n this.bindDocumentClickListener();\n }\n }, {\n key: \"unbindDocumentListeners\",\n value: function unbindDocumentListeners() {\n this.unbindDocumentResizeListener();\n this.unbindDocumentClickListener();\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this7 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this7.isOutsideClicked(event) && event.button !== 2) {\n _this7.hide(event);\n\n _this7.setState({\n resetMenu: true\n });\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"bindDocumentContextMenuListener\",\n value: function bindDocumentContextMenuListener() {\n var _this8 = this;\n\n if (!this.documentContextMenuListener) {\n this.documentContextMenuListener = function (event) {\n _this8.show(event);\n };\n\n document.addEventListener('contextmenu', this.documentContextMenuListener);\n }\n }\n }, {\n key: \"bindDocumentResizeListener\",\n value: function bindDocumentResizeListener() {\n var _this9 = this;\n\n if (!this.documentResizeListener) {\n this.documentResizeListener = function (event) {\n if (_this9.state.visible && !DomHandler.isTouchDevice()) {\n _this9.hide(event);\n }\n };\n\n window.addEventListener('resize', this.documentResizeListener);\n }\n }\n }, {\n key: \"unbindDocumentClickListener\",\n value: function unbindDocumentClickListener() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"unbindDocumentContextMenuListener\",\n value: function unbindDocumentContextMenuListener() {\n if (this.documentContextMenuListener) {\n document.removeEventListener('contextmenu', this.documentContextMenuListener);\n this.documentContextMenuListener = null;\n }\n }\n }, {\n key: \"unbindDocumentResizeListener\",\n value: function unbindDocumentResizeListener() {\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.global) {\n this.bindDocumentContextMenuListener();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n var _this10 = this;\n\n if (this.state.visible && (prevState.reshow !== this.state.reshow || prevProps.model !== this.props.model)) {\n var event = this.currentEvent;\n this.setState({\n visible: false,\n reshow: false,\n rePosition: false,\n resetMenu: true\n }, function () {\n return _this10.show(event);\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.unbindDocumentListeners();\n this.unbindDocumentContextMenuListener();\n ZIndexUtils.clear(this.menuRef.current);\n }\n }, {\n key: \"renderContextMenu\",\n value: function renderContextMenu() {\n var className = classNames('p-contextmenu p-component', this.props.className);\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.menuRef,\n classNames: \"p-contextmenu\",\n \"in\": this.state.visible,\n timeout: {\n enter: 250,\n exit: 0\n },\n options: this.props.transitionOptions,\n unmountOnExit: true,\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onExit: this.onExit,\n onExited: this.onExited\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: this.menuRef,\n id: this.props.id,\n className: className,\n style: this.props.style,\n onClick: this.onMenuClick,\n onMouseEnter: this.onMenuMouseEnter\n }, /*#__PURE__*/React.createElement(ContextMenuSub, {\n model: this.props.model,\n root: true,\n resetMenu: this.state.resetMenu,\n onLeafClick: this.onLeafClick\n })));\n }\n }, {\n key: \"render\",\n value: function render() {\n var element = this.renderContextMenu();\n return /*#__PURE__*/React.createElement(Portal, {\n element: element,\n appendTo: this.props.appendTo\n });\n }\n }]);\n\n return ContextMenu;\n}(Component);\n\n_defineProperty(ContextMenu, \"defaultProps\", {\n id: null,\n model: null,\n style: null,\n className: null,\n global: false,\n autoZIndex: true,\n baseZIndex: 0,\n appendTo: null,\n transitionOptions: null,\n onShow: null,\n onHide: null\n});\n\nexport { ContextMenu };","map":{"version":3,"names":["React","Component","DomHandler","classNames","ObjectUtils","ZIndexUtils","CSSTransition","Ripple","Portal","PrimeReact","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","protoProps","staticProps","prototype","_assertThisInitialized","self","ReferenceError","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_inherits","subClass","superClass","create","constructor","value","_typeof","obj","Symbol","iterator","_possibleConstructorReturn","call","_getPrototypeOf","getPrototypeOf","_defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","result","NewTarget","Reflect","construct","arguments","apply","sham","Proxy","Boolean","valueOf","e","ContextMenuSub","_Component","_super","_this","state","activeItem","onEnter","bind","submenuRef","createRef","onItemMouseEnter","event","item","disabled","preventDefault","setState","onItemClick","url","command","originalEvent","items","onLeafClick","position","parentItem","current","parentElement","containerOffset","getOffset","viewport","getViewport","sublistWidth","offsetParent","offsetWidth","getHiddenElementOuterWidth","itemOuterWidth","getOuterWidth","children","style","top","parseInt","left","width","calculateScrollbarWidth","isActive","root","resetMenu","componentDidUpdate","renderSeparator","index","createElement","className","role","renderSubmenu","model","renderMenuitem","_this2","active","linkClassName","iconClassName","icon","submenuIconClassName","label","submenuIcon","submenu","content","href","onClick","template","defaultContentOptions","labelClassName","element","getJSXElement","onMouseEnter","renderItem","separator","renderMenu","_this3","map","render","nodeRef","timeout","enter","exit","unmountOnExit","ref","getDerivedStateFromProps","nextProps","prevState","ContextMenu","_Component2","_super2","_this4","visible","reshow","onMenuClick","onMenuMouseEnter","onEntered","onExit","onExited","menuRef","show","_this5","Event","persist","stopPropagation","currentEvent","onShow","hide","_this6","onHide","autoZIndex","set","baseZIndex","zIndex","bindDocumentListeners","unbindDocumentListeners","clear","pageX","pageY","height","offsetHeight","getHiddenElementOuterHeight","document","body","scrollLeft","scrollTop","isOutsideClicked","isSameNode","contains","bindDocumentResizeListener","bindDocumentClickListener","unbindDocumentResizeListener","unbindDocumentClickListener","_this7","documentClickListener","button","addEventListener","bindDocumentContextMenuListener","_this8","documentContextMenuListener","_this9","documentResizeListener","isTouchDevice","window","removeEventListener","unbindDocumentContextMenuListener","componentDidMount","global","prevProps","_this10","rePosition","componentWillUnmount","renderContextMenu","options","transitionOptions","id","appendTo"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/contextmenu/contextmenu.esm.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { DomHandler, classNames, ObjectUtils, ZIndexUtils } from 'primereact/utils';\nimport { CSSTransition } from 'primereact/csstransition';\nimport { Ripple } from 'primereact/ripple';\nimport { Portal } from 'primereact/portal';\nimport PrimeReact from 'primereact/api';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\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, descriptor.key, descriptor);\n }\n}\n\nfunction _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}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar ContextMenuSub = /*#__PURE__*/function (_Component) {\n _inherits(ContextMenuSub, _Component);\n\n var _super = _createSuper(ContextMenuSub);\n\n function ContextMenuSub(props) {\n var _this;\n\n _classCallCheck(this, ContextMenuSub);\n\n _this = _super.call(this, props);\n _this.state = {\n activeItem: null\n };\n _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));\n _this.submenuRef = /*#__PURE__*/React.createRef();\n return _this;\n }\n\n _createClass(ContextMenuSub, [{\n key: \"onItemMouseEnter\",\n value: function onItemMouseEnter(event, item) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n this.setState({\n activeItem: item\n });\n }\n }, {\n key: \"onItemClick\",\n value: function onItemClick(event, item) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n if (!item.url) {\n event.preventDefault();\n }\n\n if (item.command) {\n item.command({\n originalEvent: event,\n item: item\n });\n }\n\n if (!item.items) {\n this.props.onLeafClick(event);\n }\n }\n }, {\n key: \"position\",\n value: function position() {\n var parentItem = this.submenuRef.current.parentElement;\n var containerOffset = DomHandler.getOffset(this.submenuRef.current.parentElement);\n var viewport = DomHandler.getViewport();\n var sublistWidth = this.submenuRef.current.offsetParent ? this.submenuRef.current.offsetWidth : DomHandler.getHiddenElementOuterWidth(this.submenuRef.current);\n var itemOuterWidth = DomHandler.getOuterWidth(parentItem.children[0]);\n this.submenuRef.current.style.top = '0px';\n\n if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - DomHandler.calculateScrollbarWidth()) {\n this.submenuRef.current.style.left = -1 * sublistWidth + 'px';\n } else {\n this.submenuRef.current.style.left = itemOuterWidth + 'px';\n }\n }\n }, {\n key: \"onEnter\",\n value: function onEnter() {\n this.position();\n }\n }, {\n key: \"isActive\",\n value: function isActive() {\n return this.props.root || !this.props.resetMenu;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.isActive()) {\n this.position();\n }\n }\n }, {\n key: \"renderSeparator\",\n value: function renderSeparator(index) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: 'separator_' + index,\n className: \"p-menu-separator\",\n role: \"separator\"\n });\n }\n }, {\n key: \"renderSubmenu\",\n value: function renderSubmenu(item) {\n if (item.items) {\n return /*#__PURE__*/React.createElement(ContextMenuSub, {\n model: item.items,\n resetMenu: item !== this.state.activeItem,\n onLeafClick: this.props.onLeafClick\n });\n }\n\n return null;\n }\n }, {\n key: \"renderMenuitem\",\n value: function renderMenuitem(item, index) {\n var _this2 = this;\n\n var active = this.state.activeItem === item;\n var className = classNames('p-menuitem', {\n 'p-menuitem-active': active\n }, item.className);\n var linkClassName = classNames('p-menuitem-link', {\n 'p-disabled': item.disabled\n });\n var iconClassName = classNames('p-menuitem-icon', item.icon);\n var submenuIconClassName = 'p-submenu-icon pi pi-angle-right';\n var icon = item.icon && /*#__PURE__*/React.createElement(\"span\", {\n className: iconClassName\n });\n var label = item.label && /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-menuitem-text\"\n }, item.label);\n var submenuIcon = item.items && /*#__PURE__*/React.createElement(\"span\", {\n className: submenuIconClassName\n });\n var submenu = this.renderSubmenu(item);\n var content = /*#__PURE__*/React.createElement(\"a\", {\n href: item.url || '#',\n className: linkClassName,\n target: item.target,\n onClick: function onClick(event) {\n return _this2.onItemClick(event, item, index);\n },\n role: \"menuitem\",\n \"aria-haspopup\": item.items != null,\n \"aria-disabled\": item.disabled\n }, icon, label, submenuIcon, /*#__PURE__*/React.createElement(Ripple, null));\n\n if (item.template) {\n var defaultContentOptions = {\n onClick: function onClick(event) {\n return _this2.onItemClick(event, item, index);\n },\n className: linkClassName,\n labelClassName: 'p-menuitem-text',\n iconClassName: iconClassName,\n submenuIconClassName: submenuIconClassName,\n element: content,\n props: this.props,\n active: active\n };\n content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"li\", {\n key: item.label + '_' + index,\n role: \"none\",\n className: className,\n style: item.style,\n onMouseEnter: function onMouseEnter(event) {\n return _this2.onItemMouseEnter(event, item);\n }\n }, content, submenu);\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(item, index) {\n if (item.separator) return this.renderSeparator(index);else return this.renderMenuitem(item, index);\n }\n }, {\n key: \"renderMenu\",\n value: function renderMenu() {\n var _this3 = this;\n\n if (this.props.model) {\n return this.props.model.map(function (item, index) {\n return _this3.renderItem(item, index);\n });\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = classNames({\n 'p-submenu-list': !this.props.root\n });\n var submenu = this.renderMenu();\n var isActive = this.isActive();\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.submenuRef,\n classNames: \"p-contextmenusub\",\n \"in\": isActive,\n timeout: {\n enter: 0,\n exit: 0\n },\n unmountOnExit: true,\n onEnter: this.onEnter\n }, /*#__PURE__*/React.createElement(\"ul\", {\n ref: this.submenuRef,\n className: className\n }, submenu));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.resetMenu === true) {\n return {\n activeItem: null\n };\n }\n\n return null;\n }\n }]);\n\n return ContextMenuSub;\n}(Component);\n\n_defineProperty(ContextMenuSub, \"defaultProps\", {\n model: null,\n root: false,\n className: null,\n resetMenu: false,\n onLeafClick: null\n});\n\nvar ContextMenu = /*#__PURE__*/function (_Component2) {\n _inherits(ContextMenu, _Component2);\n\n var _super2 = _createSuper(ContextMenu);\n\n function ContextMenu(props) {\n var _this4;\n\n _classCallCheck(this, ContextMenu);\n\n _this4 = _super2.call(this, props);\n _this4.state = {\n visible: false,\n reshow: false,\n resetMenu: false\n };\n _this4.onMenuClick = _this4.onMenuClick.bind(_assertThisInitialized(_this4));\n _this4.onLeafClick = _this4.onLeafClick.bind(_assertThisInitialized(_this4));\n _this4.onMenuMouseEnter = _this4.onMenuMouseEnter.bind(_assertThisInitialized(_this4));\n _this4.onEnter = _this4.onEnter.bind(_assertThisInitialized(_this4));\n _this4.onEntered = _this4.onEntered.bind(_assertThisInitialized(_this4));\n _this4.onExit = _this4.onExit.bind(_assertThisInitialized(_this4));\n _this4.onExited = _this4.onExited.bind(_assertThisInitialized(_this4));\n _this4.menuRef = /*#__PURE__*/React.createRef();\n return _this4;\n }\n\n _createClass(ContextMenu, [{\n key: \"onMenuClick\",\n value: function onMenuClick() {\n this.setState({\n resetMenu: false\n });\n }\n }, {\n key: \"onMenuMouseEnter\",\n value: function onMenuMouseEnter() {\n this.setState({\n resetMenu: false\n });\n }\n }, {\n key: \"show\",\n value: function show(event) {\n var _this5 = this;\n\n if (!(event instanceof Event)) {\n event.persist();\n }\n\n event.stopPropagation();\n event.preventDefault();\n this.currentEvent = event;\n\n if (this.state.visible) {\n this.setState({\n reshow: true\n });\n } else {\n this.setState({\n visible: true\n }, function () {\n if (_this5.props.onShow) {\n _this5.props.onShow(_this5.currentEvent);\n }\n });\n }\n }\n }, {\n key: \"hide\",\n value: function hide(event) {\n var _this6 = this;\n\n if (!(event instanceof Event)) {\n event.persist();\n }\n\n this.currentEvent = event;\n this.setState({\n visible: false,\n reshow: false\n }, function () {\n if (_this6.props.onHide) {\n _this6.props.onHide(_this6.currentEvent);\n }\n });\n }\n }, {\n key: \"onEnter\",\n value: function onEnter() {\n if (this.props.autoZIndex) {\n ZIndexUtils.set('menu', this.menuRef.current, PrimeReact.autoZIndex, this.props.baseZIndex || PrimeReact.zIndex['menu']);\n }\n\n this.position(this.currentEvent);\n }\n }, {\n key: \"onEntered\",\n value: function onEntered() {\n this.bindDocumentListeners();\n }\n }, {\n key: \"onExit\",\n value: function onExit() {\n this.currentEvent = null;\n this.unbindDocumentListeners();\n }\n }, {\n key: \"onExited\",\n value: function onExited() {\n ZIndexUtils.clear(this.menuRef.current);\n }\n }, {\n key: \"position\",\n value: function position(event) {\n if (event) {\n var left = event.pageX + 1;\n var top = event.pageY + 1;\n var width = this.menuRef.current.offsetParent ? this.menuRef.current.offsetWidth : DomHandler.getHiddenElementOuterWidth(this.menuRef.current);\n var height = this.menuRef.current.offsetParent ? this.menuRef.current.offsetHeight : DomHandler.getHiddenElementOuterHeight(this.menuRef.current);\n var viewport = DomHandler.getViewport(); //flip\n\n if (left + width - document.body.scrollLeft > viewport.width) {\n left -= width;\n } //flip\n\n\n if (top + height - document.body.scrollTop > viewport.height) {\n top -= height;\n } //fit\n\n\n if (left < document.body.scrollLeft) {\n left = document.body.scrollLeft;\n } //fit\n\n\n if (top < document.body.scrollTop) {\n top = document.body.scrollTop;\n }\n\n this.menuRef.current.style.left = left + 'px';\n this.menuRef.current.style.top = top + 'px';\n }\n }\n }, {\n key: \"onLeafClick\",\n value: function onLeafClick(event) {\n this.setState({\n resetMenu: true\n });\n this.hide(event);\n event.stopPropagation();\n }\n }, {\n key: \"isOutsideClicked\",\n value: function isOutsideClicked(event) {\n return this.menuRef && this.menuRef.current && !(this.menuRef.current.isSameNode(event.target) || this.menuRef.current.contains(event.target));\n }\n }, {\n key: \"bindDocumentListeners\",\n value: function bindDocumentListeners() {\n this.bindDocumentResizeListener();\n this.bindDocumentClickListener();\n }\n }, {\n key: \"unbindDocumentListeners\",\n value: function unbindDocumentListeners() {\n this.unbindDocumentResizeListener();\n this.unbindDocumentClickListener();\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this7 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this7.isOutsideClicked(event) && event.button !== 2) {\n _this7.hide(event);\n\n _this7.setState({\n resetMenu: true\n });\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"bindDocumentContextMenuListener\",\n value: function bindDocumentContextMenuListener() {\n var _this8 = this;\n\n if (!this.documentContextMenuListener) {\n this.documentContextMenuListener = function (event) {\n _this8.show(event);\n };\n\n document.addEventListener('contextmenu', this.documentContextMenuListener);\n }\n }\n }, {\n key: \"bindDocumentResizeListener\",\n value: function bindDocumentResizeListener() {\n var _this9 = this;\n\n if (!this.documentResizeListener) {\n this.documentResizeListener = function (event) {\n if (_this9.state.visible && !DomHandler.isTouchDevice()) {\n _this9.hide(event);\n }\n };\n\n window.addEventListener('resize', this.documentResizeListener);\n }\n }\n }, {\n key: \"unbindDocumentClickListener\",\n value: function unbindDocumentClickListener() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"unbindDocumentContextMenuListener\",\n value: function unbindDocumentContextMenuListener() {\n if (this.documentContextMenuListener) {\n document.removeEventListener('contextmenu', this.documentContextMenuListener);\n this.documentContextMenuListener = null;\n }\n }\n }, {\n key: \"unbindDocumentResizeListener\",\n value: function unbindDocumentResizeListener() {\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.global) {\n this.bindDocumentContextMenuListener();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n var _this10 = this;\n\n if (this.state.visible && (prevState.reshow !== this.state.reshow || prevProps.model !== this.props.model)) {\n var event = this.currentEvent;\n this.setState({\n visible: false,\n reshow: false,\n rePosition: false,\n resetMenu: true\n }, function () {\n return _this10.show(event);\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.unbindDocumentListeners();\n this.unbindDocumentContextMenuListener();\n ZIndexUtils.clear(this.menuRef.current);\n }\n }, {\n key: \"renderContextMenu\",\n value: function renderContextMenu() {\n var className = classNames('p-contextmenu p-component', this.props.className);\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.menuRef,\n classNames: \"p-contextmenu\",\n \"in\": this.state.visible,\n timeout: {\n enter: 250,\n exit: 0\n },\n options: this.props.transitionOptions,\n unmountOnExit: true,\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onExit: this.onExit,\n onExited: this.onExited\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: this.menuRef,\n id: this.props.id,\n className: className,\n style: this.props.style,\n onClick: this.onMenuClick,\n onMouseEnter: this.onMenuMouseEnter\n }, /*#__PURE__*/React.createElement(ContextMenuSub, {\n model: this.props.model,\n root: true,\n resetMenu: this.state.resetMenu,\n onLeafClick: this.onLeafClick\n })));\n }\n }, {\n key: \"render\",\n value: function render() {\n var element = this.renderContextMenu();\n return /*#__PURE__*/React.createElement(Portal, {\n element: element,\n appendTo: this.props.appendTo\n });\n }\n }]);\n\n return ContextMenu;\n}(Component);\n\n_defineProperty(ContextMenu, \"defaultProps\", {\n id: null,\n model: null,\n style: null,\n className: null,\n global: false,\n autoZIndex: true,\n baseZIndex: 0,\n appendTo: null,\n transitionOptions: null,\n onShow: null,\n onHide: null\n});\n\nexport { ContextMenu };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,UAAT,EAAqBC,UAArB,EAAiCC,WAAjC,EAA8CC,WAA9C,QAAiE,kBAAjE;AACA,SAASC,aAAT,QAA8B,0BAA9B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;;AAEA,SAASC,eAAT,CAAyBC,QAAzB,EAAmCC,WAAnC,EAAgD;EAC9C,IAAI,EAAED,QAAQ,YAAYC,WAAtB,CAAJ,EAAwC;IACtC,MAAM,IAAIC,SAAJ,CAAc,mCAAd,CAAN;EACD;AACF;;AAED,SAASC,iBAAT,CAA2BC,MAA3B,EAAmCC,KAAnC,EAA0C;EACxC,KAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGD,KAAK,CAACE,MAA1B,EAAkCD,CAAC,EAAnC,EAAuC;IACrC,IAAIE,UAAU,GAAGH,KAAK,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