1 line
50 KiB
JSON
1 line
50 KiB
JSON
{"ast":null,"code":"import React, { Component } from 'react';\nimport { DomHandler, ZIndexUtils, ConnectedOverlayScrollHandler, classNames, ObjectUtils } from 'primereact/utils';\nimport { CSSTransition } from 'primereact/csstransition';\nimport { OverlayService } from 'primereact/overlayservice';\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 Menu = /*#__PURE__*/function (_Component) {\n _inherits(Menu, _Component);\n\n var _super = _createSuper(Menu);\n\n function Menu(props) {\n var _this;\n\n _classCallCheck(this, Menu);\n\n _this = _super.call(this, props);\n _this.state = {\n visible: !props.popup\n };\n _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));\n _this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));\n _this.onExit = _this.onExit.bind(_assertThisInitialized(_this));\n _this.onExited = _this.onExited.bind(_assertThisInitialized(_this));\n _this.onPanelClick = _this.onPanelClick.bind(_assertThisInitialized(_this));\n _this.menuRef = /*#__PURE__*/React.createRef();\n return _this;\n }\n\n _createClass(Menu, [{\n key: \"onPanelClick\",\n value: function onPanelClick(event) {\n if (this.props.popup) {\n OverlayService.emit('overlay-click', {\n originalEvent: event,\n target: this.target\n });\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 (this.props.popup) {\n this.hide(event);\n }\n }\n }, {\n key: \"onItemKeyDown\",\n value: function onItemKeyDown(event, item) {\n var listItem = event.currentTarget.parentElement;\n\n switch (event.which) {\n //down\n case 40:\n var nextItem = this.findNextItem(listItem);\n\n if (nextItem) {\n nextItem.children[0].focus();\n }\n\n event.preventDefault();\n break;\n //up\n\n case 38:\n var prevItem = this.findPrevItem(listItem);\n\n if (prevItem) {\n prevItem.children[0].focus();\n }\n\n event.preventDefault();\n break;\n }\n }\n }, {\n key: \"findNextItem\",\n value: function findNextItem(item) {\n var nextItem = item.nextElementSibling;\n if (nextItem) return DomHandler.hasClass(nextItem, 'p-disabled') || !DomHandler.hasClass(nextItem, 'p-menuitem') ? this.findNextItem(nextItem) : nextItem;else return null;\n }\n }, {\n key: \"findPrevItem\",\n value: function findPrevItem(item) {\n var prevItem = item.previousElementSibling;\n if (prevItem) return DomHandler.hasClass(prevItem, 'p-disabled') || !DomHandler.hasClass(prevItem, 'p-menuitem') ? this.findPrevItem(prevItem) : prevItem;else return null;\n }\n }, {\n key: \"toggle\",\n value: function toggle(event) {\n if (this.props.popup) {\n if (this.state.visible) this.hide(event);else this.show(event);\n }\n }\n }, {\n key: \"show\",\n value: function show(event) {\n var _this2 = this;\n\n this.target = event.currentTarget;\n var currentEvent = event;\n this.setState({\n visible: true\n }, function () {\n if (_this2.props.onShow) {\n _this2.props.onShow(currentEvent);\n }\n });\n }\n }, {\n key: \"hide\",\n value: function hide(event) {\n var _this3 = this;\n\n var currentEvent = event;\n this.setState({\n visible: false\n }, function () {\n if (_this3.props.onHide) {\n _this3.props.onHide(currentEvent);\n }\n });\n }\n }, {\n key: \"onEnter\",\n value: function onEnter() {\n ZIndexUtils.set('menu', this.menuRef.current, PrimeReact.autoZIndex, this.props.baseZIndex || PrimeReact.zIndex['menu']);\n DomHandler.absolutePosition(this.menuRef.current, this.target);\n }\n }, {\n key: \"onEntered\",\n value: function onEntered() {\n this.bindDocumentListeners();\n this.bindScrollListener();\n }\n }, {\n key: \"onExit\",\n value: function onExit() {\n this.target = null;\n this.unbindDocumentListeners();\n this.unbindScrollListener();\n }\n }, {\n key: \"onExited\",\n value: function onExited() {\n ZIndexUtils.clear(this.menuRef.current);\n }\n }, {\n key: \"bindDocumentListeners\",\n value: function bindDocumentListeners() {\n var _this4 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this4.state.visible && _this4.isOutsideClicked(event)) {\n _this4.hide(event);\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n\n if (!this.documentResizeListener) {\n this.documentResizeListener = function (event) {\n if (_this4.state.visible && !DomHandler.isTouchDevice()) {\n _this4.hide(event);\n }\n };\n\n window.addEventListener('resize', this.documentResizeListener);\n }\n }\n }, {\n key: \"unbindDocumentListeners\",\n value: function unbindDocumentListeners() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n }, {\n key: \"bindScrollListener\",\n value: function bindScrollListener() {\n var _this5 = this;\n\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function (event) {\n if (_this5.state.visible) {\n _this5.hide(event);\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n }\n }, {\n key: \"unbindScrollListener\",\n value: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\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: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.unbindDocumentListeners();\n\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n ZIndexUtils.clear(this.menuRef.current);\n }\n }, {\n key: \"renderSubmenu\",\n value: function renderSubmenu(submenu, index) {\n var _this6 = this;\n\n var className = classNames('p-submenu-header', {\n 'p-disabled': submenu.disabled\n }, submenu.className);\n var items = submenu.items.map(function (item, index) {\n return _this6.renderMenuitem(item, index);\n });\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: submenu.label + '_' + index\n }, /*#__PURE__*/React.createElement(\"li\", {\n className: className,\n style: submenu.style,\n role: \"presentation\",\n \"aria-disabled\": submenu.disabled\n }, submenu.label), items);\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: \"renderMenuitem\",\n value: function renderMenuitem(item, index) {\n var _this7 = this;\n\n var className = classNames('p-menuitem', 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 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 tabIndex = item.disabled ? null : 0;\n var content = /*#__PURE__*/React.createElement(\"a\", {\n href: item.url || '#',\n className: linkClassName,\n role: \"menuitem\",\n target: item.target,\n onClick: function onClick(event) {\n return _this7.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this7.onItemKeyDown(event, item);\n },\n tabIndex: tabIndex,\n \"aria-disabled\": item.disabled\n }, icon, label);\n\n if (item.template) {\n var defaultContentOptions = {\n onClick: function onClick(event) {\n return _this7.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this7.onItemKeyDown(event, item);\n },\n className: linkClassName,\n tabIndex: tabIndex,\n labelClassName: 'p-menuitem-text',\n iconClassName: iconClassName,\n element: content,\n props: this.props\n };\n content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"li\", {\n key: item.label + '_' + index,\n className: className,\n style: item.style,\n role: \"none\"\n }, content);\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(item, index) {\n if (item.separator) {\n return this.renderSeparator(index);\n } else {\n if (item.items) return this.renderSubmenu(item, index);else return this.renderMenuitem(item, index);\n }\n }\n }, {\n key: \"renderMenu\",\n value: function renderMenu() {\n var _this8 = this;\n\n return this.props.model.map(function (item, index) {\n return _this8.renderItem(item, index);\n });\n }\n }, {\n key: \"renderElement\",\n value: function renderElement() {\n if (this.props.model) {\n var className = classNames('p-menu p-component', this.props.className, {\n 'p-menu-overlay': this.props.popup\n });\n var menuitems = this.renderMenu();\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.menuRef,\n classNames: \"p-connected-overlay\",\n \"in\": this.state.visible,\n timeout: {\n enter: 120,\n exit: 100\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.onPanelClick\n }, /*#__PURE__*/React.createElement(\"ul\", {\n className: \"p-menu-list p-reset\",\n role: \"menu\"\n }, menuitems)));\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var element = this.renderElement();\n return this.props.popup ? /*#__PURE__*/React.createElement(Portal, {\n element: element,\n appendTo: this.props.appendTo\n }) : element;\n }\n }]);\n\n return Menu;\n}(Component);\n\n_defineProperty(Menu, \"defaultProps\", {\n id: null,\n model: null,\n popup: false,\n style: null,\n className: null,\n autoZIndex: true,\n baseZIndex: 0,\n appendTo: null,\n transitionOptions: null,\n onShow: null,\n onHide: null\n});\n\nexport { Menu };","map":{"version":3,"names":["React","Component","DomHandler","ZIndexUtils","ConnectedOverlayScrollHandler","classNames","ObjectUtils","CSSTransition","OverlayService","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","Menu","_Component","_super","_this","state","visible","popup","onEnter","bind","onEntered","onExit","onExited","onPanelClick","menuRef","createRef","event","emit","originalEvent","onItemClick","item","disabled","preventDefault","url","command","hide","onItemKeyDown","listItem","currentTarget","parentElement","which","nextItem","findNextItem","children","focus","prevItem","findPrevItem","nextElementSibling","hasClass","previousElementSibling","toggle","show","_this2","currentEvent","setState","onShow","_this3","onHide","set","current","autoZIndex","baseZIndex","zIndex","absolutePosition","bindDocumentListeners","bindScrollListener","unbindDocumentListeners","unbindScrollListener","clear","_this4","documentClickListener","isOutsideClicked","document","addEventListener","documentResizeListener","isTouchDevice","window","removeEventListener","_this5","scrollHandler","isSameNode","contains","componentWillUnmount","destroy","renderSubmenu","submenu","index","_this6","className","items","map","renderMenuitem","createElement","Fragment","label","style","role","renderSeparator","_this7","linkClassName","iconClassName","icon","tabIndex","content","href","onClick","onKeyDown","template","defaultContentOptions","labelClassName","element","getJSXElement","renderItem","separator","renderMenu","_this8","model","renderElement","menuitems","nodeRef","timeout","enter","exit","options","transitionOptions","unmountOnExit","ref","id","render","appendTo"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/menu/menu.esm.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { DomHandler, ZIndexUtils, ConnectedOverlayScrollHandler, classNames, ObjectUtils } from 'primereact/utils';\nimport { CSSTransition } from 'primereact/csstransition';\nimport { OverlayService } from 'primereact/overlayservice';\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; } }\nvar Menu = /*#__PURE__*/function (_Component) {\n _inherits(Menu, _Component);\n\n var _super = _createSuper(Menu);\n\n function Menu(props) {\n var _this;\n\n _classCallCheck(this, Menu);\n\n _this = _super.call(this, props);\n _this.state = {\n visible: !props.popup\n };\n _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));\n _this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));\n _this.onExit = _this.onExit.bind(_assertThisInitialized(_this));\n _this.onExited = _this.onExited.bind(_assertThisInitialized(_this));\n _this.onPanelClick = _this.onPanelClick.bind(_assertThisInitialized(_this));\n _this.menuRef = /*#__PURE__*/React.createRef();\n return _this;\n }\n\n _createClass(Menu, [{\n key: \"onPanelClick\",\n value: function onPanelClick(event) {\n if (this.props.popup) {\n OverlayService.emit('overlay-click', {\n originalEvent: event,\n target: this.target\n });\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 (this.props.popup) {\n this.hide(event);\n }\n }\n }, {\n key: \"onItemKeyDown\",\n value: function onItemKeyDown(event, item) {\n var listItem = event.currentTarget.parentElement;\n\n switch (event.which) {\n //down\n case 40:\n var nextItem = this.findNextItem(listItem);\n\n if (nextItem) {\n nextItem.children[0].focus();\n }\n\n event.preventDefault();\n break;\n //up\n\n case 38:\n var prevItem = this.findPrevItem(listItem);\n\n if (prevItem) {\n prevItem.children[0].focus();\n }\n\n event.preventDefault();\n break;\n }\n }\n }, {\n key: \"findNextItem\",\n value: function findNextItem(item) {\n var nextItem = item.nextElementSibling;\n if (nextItem) return DomHandler.hasClass(nextItem, 'p-disabled') || !DomHandler.hasClass(nextItem, 'p-menuitem') ? this.findNextItem(nextItem) : nextItem;else return null;\n }\n }, {\n key: \"findPrevItem\",\n value: function findPrevItem(item) {\n var prevItem = item.previousElementSibling;\n if (prevItem) return DomHandler.hasClass(prevItem, 'p-disabled') || !DomHandler.hasClass(prevItem, 'p-menuitem') ? this.findPrevItem(prevItem) : prevItem;else return null;\n }\n }, {\n key: \"toggle\",\n value: function toggle(event) {\n if (this.props.popup) {\n if (this.state.visible) this.hide(event);else this.show(event);\n }\n }\n }, {\n key: \"show\",\n value: function show(event) {\n var _this2 = this;\n\n this.target = event.currentTarget;\n var currentEvent = event;\n this.setState({\n visible: true\n }, function () {\n if (_this2.props.onShow) {\n _this2.props.onShow(currentEvent);\n }\n });\n }\n }, {\n key: \"hide\",\n value: function hide(event) {\n var _this3 = this;\n\n var currentEvent = event;\n this.setState({\n visible: false\n }, function () {\n if (_this3.props.onHide) {\n _this3.props.onHide(currentEvent);\n }\n });\n }\n }, {\n key: \"onEnter\",\n value: function onEnter() {\n ZIndexUtils.set('menu', this.menuRef.current, PrimeReact.autoZIndex, this.props.baseZIndex || PrimeReact.zIndex['menu']);\n DomHandler.absolutePosition(this.menuRef.current, this.target);\n }\n }, {\n key: \"onEntered\",\n value: function onEntered() {\n this.bindDocumentListeners();\n this.bindScrollListener();\n }\n }, {\n key: \"onExit\",\n value: function onExit() {\n this.target = null;\n this.unbindDocumentListeners();\n this.unbindScrollListener();\n }\n }, {\n key: \"onExited\",\n value: function onExited() {\n ZIndexUtils.clear(this.menuRef.current);\n }\n }, {\n key: \"bindDocumentListeners\",\n value: function bindDocumentListeners() {\n var _this4 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this4.state.visible && _this4.isOutsideClicked(event)) {\n _this4.hide(event);\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n\n if (!this.documentResizeListener) {\n this.documentResizeListener = function (event) {\n if (_this4.state.visible && !DomHandler.isTouchDevice()) {\n _this4.hide(event);\n }\n };\n\n window.addEventListener('resize', this.documentResizeListener);\n }\n }\n }, {\n key: \"unbindDocumentListeners\",\n value: function unbindDocumentListeners() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n }, {\n key: \"bindScrollListener\",\n value: function bindScrollListener() {\n var _this5 = this;\n\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function (event) {\n if (_this5.state.visible) {\n _this5.hide(event);\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n }\n }, {\n key: \"unbindScrollListener\",\n value: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\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: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.unbindDocumentListeners();\n\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n ZIndexUtils.clear(this.menuRef.current);\n }\n }, {\n key: \"renderSubmenu\",\n value: function renderSubmenu(submenu, index) {\n var _this6 = this;\n\n var className = classNames('p-submenu-header', {\n 'p-disabled': submenu.disabled\n }, submenu.className);\n var items = submenu.items.map(function (item, index) {\n return _this6.renderMenuitem(item, index);\n });\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: submenu.label + '_' + index\n }, /*#__PURE__*/React.createElement(\"li\", {\n className: className,\n style: submenu.style,\n role: \"presentation\",\n \"aria-disabled\": submenu.disabled\n }, submenu.label), items);\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: \"renderMenuitem\",\n value: function renderMenuitem(item, index) {\n var _this7 = this;\n\n var className = classNames('p-menuitem', 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 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 tabIndex = item.disabled ? null : 0;\n var content = /*#__PURE__*/React.createElement(\"a\", {\n href: item.url || '#',\n className: linkClassName,\n role: \"menuitem\",\n target: item.target,\n onClick: function onClick(event) {\n return _this7.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this7.onItemKeyDown(event, item);\n },\n tabIndex: tabIndex,\n \"aria-disabled\": item.disabled\n }, icon, label);\n\n if (item.template) {\n var defaultContentOptions = {\n onClick: function onClick(event) {\n return _this7.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this7.onItemKeyDown(event, item);\n },\n className: linkClassName,\n tabIndex: tabIndex,\n labelClassName: 'p-menuitem-text',\n iconClassName: iconClassName,\n element: content,\n props: this.props\n };\n content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"li\", {\n key: item.label + '_' + index,\n className: className,\n style: item.style,\n role: \"none\"\n }, content);\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(item, index) {\n if (item.separator) {\n return this.renderSeparator(index);\n } else {\n if (item.items) return this.renderSubmenu(item, index);else return this.renderMenuitem(item, index);\n }\n }\n }, {\n key: \"renderMenu\",\n value: function renderMenu() {\n var _this8 = this;\n\n return this.props.model.map(function (item, index) {\n return _this8.renderItem(item, index);\n });\n }\n }, {\n key: \"renderElement\",\n value: function renderElement() {\n if (this.props.model) {\n var className = classNames('p-menu p-component', this.props.className, {\n 'p-menu-overlay': this.props.popup\n });\n var menuitems = this.renderMenu();\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.menuRef,\n classNames: \"p-connected-overlay\",\n \"in\": this.state.visible,\n timeout: {\n enter: 120,\n exit: 100\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.onPanelClick\n }, /*#__PURE__*/React.createElement(\"ul\", {\n className: \"p-menu-list p-reset\",\n role: \"menu\"\n }, menuitems)));\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var element = this.renderElement();\n return this.props.popup ? /*#__PURE__*/React.createElement(Portal, {\n element: element,\n appendTo: this.props.appendTo\n }) : element;\n }\n }]);\n\n return Menu;\n}(Component);\n\n_defineProperty(Menu, \"defaultProps\", {\n id: null,\n model: null,\n popup: false,\n style: null,\n className: null,\n autoZIndex: true,\n baseZIndex: 0,\n appendTo: null,\n transitionOptions: null,\n onShow: null,\n onHide: null\n});\n\nexport { Menu };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,UAAT,EAAqBC,WAArB,EAAkCC,6BAAlC,EAAiEC,UAAjE,EAA6EC,WAA7E,QAAgG,kBAAhG;AACA,SAASC,aAAT,QAA8B,0BAA9B;AACA,SAASC,cAAT,QAA+B,2BAA/B;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,CAACC,CAAD,CAAtB;IACAE,UAAU,CAACC,UAAX,GAAwBD,UAAU,CAACC,UAAX,IAAyB,KAAjD;IACAD,UAAU,CAACE,YAAX,GAA0B,IAA1B;IACA,IAAI,WAAWF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