1 line
68 KiB
JSON
1 line
68 KiB
JSON
{"ast":null,"code":"import React, { Component } from 'react';\nimport { DomHandler, classNames, ObjectUtils, ZIndexUtils, ConnectedOverlayScrollHandler } from 'primereact/utils';\nimport { Ripple } from 'primereact/ripple';\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$1(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct$1();\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$1() {\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 TieredMenuSub = /*#__PURE__*/function (_Component) {\n _inherits(TieredMenuSub, _Component);\n\n var _super = _createSuper$1(TieredMenuSub);\n\n function TieredMenuSub(props) {\n var _this;\n\n _classCallCheck(this, TieredMenuSub);\n\n _this = _super.call(this, props);\n _this.state = {\n activeItem: null\n };\n _this.onLeafClick = _this.onLeafClick.bind(_assertThisInitialized(_this));\n _this.onChildItemKeyDown = _this.onChildItemKeyDown.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(TieredMenuSub, [{\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.parentActive && !this.props.parentActive) {\n this.setState({\n activeItem: null\n });\n }\n\n if (this.props.parentActive && !this.props.root) {\n this.position();\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this2.element && !_this2.element.contains(event.target)) {\n _this2.setState({\n activeItem: null\n });\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"position\",\n value: function position() {\n if (this.element) {\n var parentItem = this.element.parentElement;\n var containerOffset = DomHandler.getOffset(parentItem);\n var viewport = DomHandler.getViewport();\n var sublistWidth = this.element.offsetParent ? this.element.offsetWidth : DomHandler.getHiddenElementOuterWidth(this.element);\n var itemOuterWidth = DomHandler.getOuterWidth(parentItem.children[0]);\n\n if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - DomHandler.calculateScrollbarWidth()) {\n DomHandler.addClass(this.element, 'p-submenu-list-flipped');\n }\n }\n }\n }, {\n key: \"onItemMouseEnter\",\n value: function onItemMouseEnter(event, item) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n if (this.props.root) {\n if (this.state.activeItem || this.props.popup) {\n this.setState({\n activeItem: item\n });\n }\n } else {\n this.setState({\n activeItem: item\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.root) {\n if (item.items) {\n if (this.state.activeItem && item === this.state.activeItem) {\n this.setState({\n activeItem: null\n });\n } else {\n this.setState({\n activeItem: item\n });\n }\n }\n }\n\n if (!item.items) {\n this.onLeafClick();\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 //right\n\n case 39:\n if (item.items) {\n this.setState({\n activeItem: item\n });\n setTimeout(function () {\n listItem.children[1].children[0].children[0].focus();\n }, 50);\n }\n\n event.preventDefault();\n break;\n }\n\n if (this.props.onKeyDown) {\n this.props.onKeyDown(event, listItem);\n }\n }\n }, {\n key: \"onChildItemKeyDown\",\n value: function onChildItemKeyDown(event, childListItem) {\n //left\n if (event.which === 37) {\n this.setState({\n activeItem: null\n });\n childListItem.parentElement.previousElementSibling.focus();\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: \"onLeafClick\",\n value: function onLeafClick() {\n this.setState({\n activeItem: null\n });\n\n if (this.props.onLeafClick) {\n this.props.onLeafClick();\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(TieredMenuSub, {\n model: item.items,\n onLeafClick: this.onLeafClick,\n popup: this.props.popup,\n onKeyDown: this.onChildItemKeyDown,\n parentActive: item === this.state.activeItem\n });\n }\n\n return null;\n }\n }, {\n key: \"renderMenuitem\",\n value: function renderMenuitem(item, index) {\n var _this3 = 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 role: \"menuitem\",\n \"aria-haspopup\": item.items != null,\n onClick: function onClick(event) {\n return _this3.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this3.onItemKeyDown(event, item);\n },\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 _this3.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this3.onItemKeyDown(event, item);\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 className: className,\n style: item.style,\n onMouseEnter: function onMouseEnter(event) {\n return _this3.onItemMouseEnter(event, item);\n },\n role: \"none\"\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 _this4 = this;\n\n if (this.props.model) {\n return this.props.model.map(function (item, index) {\n return _this4.renderItem(item, index);\n });\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n var className = classNames({\n 'p-submenu-list': !this.props.root\n });\n var submenu = this.renderMenu();\n return /*#__PURE__*/React.createElement(\"ul\", {\n ref: function ref(el) {\n return _this5.element = el;\n },\n className: className,\n role: this.props.root ? 'menubar' : 'menu',\n \"aria-orientation\": \"horizontal\"\n }, submenu);\n }\n }]);\n\n return TieredMenuSub;\n}(Component);\n\n_defineProperty(TieredMenuSub, \"defaultProps\", {\n model: null,\n root: false,\n className: null,\n popup: false,\n onLeafClick: null,\n onKeyDown: null,\n parentActive: false\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 TieredMenu = /*#__PURE__*/function (_Component) {\n _inherits(TieredMenu, _Component);\n\n var _super = _createSuper(TieredMenu);\n\n function TieredMenu(props) {\n var _this;\n\n _classCallCheck(this, TieredMenu);\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(TieredMenu, [{\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: \"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 if (this.props.autoZIndex) {\n ZIndexUtils.set('menu', this.menuRef.current, PrimeReact.autoZIndex, this.props.baseZIndex || PrimeReact.zIndex['menu']);\n }\n\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 this.bindDocumentClickListener();\n this.bindDocumentResizeListener();\n }\n }, {\n key: \"unbindDocumentListeners\",\n value: function unbindDocumentListeners() {\n this.unbindDocumentClickListener();\n this.unbindDocumentResizeListener();\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this4 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this4.props.popup && _this4.state.visible && _this4.menuRef.current && !_this4.menuRef.current.contains(event.target)) {\n _this4.hide(event);\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\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: \"bindDocumentResizeListener\",\n value: function bindDocumentResizeListener() {\n var _this5 = this;\n\n if (!this.documentResizeListener) {\n this.documentResizeListener = function (event) {\n if (_this5.state.visible && !DomHandler.isTouchDevice()) {\n _this5.hide(event);\n }\n };\n\n window.addEventListener('resize', this.documentResizeListener);\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: \"bindScrollListener\",\n value: function bindScrollListener() {\n var _this6 = this;\n\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function (event) {\n if (_this6.state.visible) {\n _this6.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: \"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: \"renderElement\",\n value: function renderElement() {\n var className = classNames('p-tieredmenu p-component', {\n 'p-tieredmenu-overlay': this.props.popup\n }, this.props.className);\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(TieredMenuSub, {\n model: this.props.model,\n root: true,\n popup: this.props.popup\n })));\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 TieredMenu;\n}(Component);\n\n_defineProperty(TieredMenu, \"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 { TieredMenu };","map":{"version":3,"names":["React","Component","DomHandler","classNames","ObjectUtils","ZIndexUtils","ConnectedOverlayScrollHandler","Ripple","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$1","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct$1","_createSuperInternal","Super","result","NewTarget","Reflect","construct","arguments","apply","sham","Proxy","Boolean","valueOf","e","TieredMenuSub","_Component","_super","_this","state","activeItem","onLeafClick","bind","onChildItemKeyDown","componentDidUpdate","prevProps","parentActive","setState","root","position","componentDidMount","_this2","documentClickListener","event","element","contains","document","addEventListener","componentWillUnmount","removeEventListener","parentItem","parentElement","containerOffset","getOffset","viewport","getViewport","sublistWidth","offsetParent","offsetWidth","getHiddenElementOuterWidth","itemOuterWidth","getOuterWidth","children","parseInt","left","width","calculateScrollbarWidth","addClass","onItemMouseEnter","item","disabled","preventDefault","popup","onItemClick","url","command","originalEvent","items","onItemKeyDown","listItem","currentTarget","which","nextItem","findNextItem","focus","prevItem","findPrevItem","setTimeout","onKeyDown","childListItem","previousElementSibling","nextElementSibling","hasClass","renderSeparator","index","createElement","className","role","renderSubmenu","model","renderMenuitem","_this3","active","linkClassName","iconClassName","icon","submenuIconClassName","label","submenuIcon","submenu","content","href","onClick","template","defaultContentOptions","labelClassName","getJSXElement","style","onMouseEnter","renderItem","separator","renderMenu","_this4","map","render","_this5","ref","el","_createSuper","_isNativeReflectConstruct","TieredMenu","visible","onEnter","onEntered","onExit","onExited","onPanelClick","menuRef","createRef","emit","toggle","hide","show","currentEvent","onShow","onHide","autoZIndex","set","current","baseZIndex","zIndex","absolutePosition","bindDocumentListeners","bindScrollListener","unbindDocumentListeners","unbindScrollListener","clear","bindDocumentClickListener","bindDocumentResizeListener","unbindDocumentClickListener","unbindDocumentResizeListener","documentResizeListener","isTouchDevice","window","_this6","scrollHandler","destroy","renderElement","nodeRef","timeout","enter","exit","options","transitionOptions","unmountOnExit","id","appendTo"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/tieredmenu/tieredmenu.esm.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { DomHandler, classNames, ObjectUtils, ZIndexUtils, ConnectedOverlayScrollHandler } from 'primereact/utils';\nimport { Ripple } from 'primereact/ripple';\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$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); 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$1() { 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 TieredMenuSub = /*#__PURE__*/function (_Component) {\n _inherits(TieredMenuSub, _Component);\n\n var _super = _createSuper$1(TieredMenuSub);\n\n function TieredMenuSub(props) {\n var _this;\n\n _classCallCheck(this, TieredMenuSub);\n\n _this = _super.call(this, props);\n _this.state = {\n activeItem: null\n };\n _this.onLeafClick = _this.onLeafClick.bind(_assertThisInitialized(_this));\n _this.onChildItemKeyDown = _this.onChildItemKeyDown.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(TieredMenuSub, [{\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.parentActive && !this.props.parentActive) {\n this.setState({\n activeItem: null\n });\n }\n\n if (this.props.parentActive && !this.props.root) {\n this.position();\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this2.element && !_this2.element.contains(event.target)) {\n _this2.setState({\n activeItem: null\n });\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"position\",\n value: function position() {\n if (this.element) {\n var parentItem = this.element.parentElement;\n var containerOffset = DomHandler.getOffset(parentItem);\n var viewport = DomHandler.getViewport();\n var sublistWidth = this.element.offsetParent ? this.element.offsetWidth : DomHandler.getHiddenElementOuterWidth(this.element);\n var itemOuterWidth = DomHandler.getOuterWidth(parentItem.children[0]);\n\n if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - DomHandler.calculateScrollbarWidth()) {\n DomHandler.addClass(this.element, 'p-submenu-list-flipped');\n }\n }\n }\n }, {\n key: \"onItemMouseEnter\",\n value: function onItemMouseEnter(event, item) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n if (this.props.root) {\n if (this.state.activeItem || this.props.popup) {\n this.setState({\n activeItem: item\n });\n }\n } else {\n this.setState({\n activeItem: item\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.root) {\n if (item.items) {\n if (this.state.activeItem && item === this.state.activeItem) {\n this.setState({\n activeItem: null\n });\n } else {\n this.setState({\n activeItem: item\n });\n }\n }\n }\n\n if (!item.items) {\n this.onLeafClick();\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 //right\n\n case 39:\n if (item.items) {\n this.setState({\n activeItem: item\n });\n setTimeout(function () {\n listItem.children[1].children[0].children[0].focus();\n }, 50);\n }\n\n event.preventDefault();\n break;\n }\n\n if (this.props.onKeyDown) {\n this.props.onKeyDown(event, listItem);\n }\n }\n }, {\n key: \"onChildItemKeyDown\",\n value: function onChildItemKeyDown(event, childListItem) {\n //left\n if (event.which === 37) {\n this.setState({\n activeItem: null\n });\n childListItem.parentElement.previousElementSibling.focus();\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: \"onLeafClick\",\n value: function onLeafClick() {\n this.setState({\n activeItem: null\n });\n\n if (this.props.onLeafClick) {\n this.props.onLeafClick();\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(TieredMenuSub, {\n model: item.items,\n onLeafClick: this.onLeafClick,\n popup: this.props.popup,\n onKeyDown: this.onChildItemKeyDown,\n parentActive: item === this.state.activeItem\n });\n }\n\n return null;\n }\n }, {\n key: \"renderMenuitem\",\n value: function renderMenuitem(item, index) {\n var _this3 = 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 role: \"menuitem\",\n \"aria-haspopup\": item.items != null,\n onClick: function onClick(event) {\n return _this3.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this3.onItemKeyDown(event, item);\n },\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 _this3.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this3.onItemKeyDown(event, item);\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 className: className,\n style: item.style,\n onMouseEnter: function onMouseEnter(event) {\n return _this3.onItemMouseEnter(event, item);\n },\n role: \"none\"\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 _this4 = this;\n\n if (this.props.model) {\n return this.props.model.map(function (item, index) {\n return _this4.renderItem(item, index);\n });\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n var className = classNames({\n 'p-submenu-list': !this.props.root\n });\n var submenu = this.renderMenu();\n return /*#__PURE__*/React.createElement(\"ul\", {\n ref: function ref(el) {\n return _this5.element = el;\n },\n className: className,\n role: this.props.root ? 'menubar' : 'menu',\n \"aria-orientation\": \"horizontal\"\n }, submenu);\n }\n }]);\n\n return TieredMenuSub;\n}(Component);\n\n_defineProperty(TieredMenuSub, \"defaultProps\", {\n model: null,\n root: false,\n className: null,\n popup: false,\n onLeafClick: null,\n onKeyDown: null,\n parentActive: false\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 TieredMenu = /*#__PURE__*/function (_Component) {\n _inherits(TieredMenu, _Component);\n\n var _super = _createSuper(TieredMenu);\n\n function TieredMenu(props) {\n var _this;\n\n _classCallCheck(this, TieredMenu);\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(TieredMenu, [{\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: \"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 if (this.props.autoZIndex) {\n ZIndexUtils.set('menu', this.menuRef.current, PrimeReact.autoZIndex, this.props.baseZIndex || PrimeReact.zIndex['menu']);\n }\n\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 this.bindDocumentClickListener();\n this.bindDocumentResizeListener();\n }\n }, {\n key: \"unbindDocumentListeners\",\n value: function unbindDocumentListeners() {\n this.unbindDocumentClickListener();\n this.unbindDocumentResizeListener();\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this4 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this4.props.popup && _this4.state.visible && _this4.menuRef.current && !_this4.menuRef.current.contains(event.target)) {\n _this4.hide(event);\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\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: \"bindDocumentResizeListener\",\n value: function bindDocumentResizeListener() {\n var _this5 = this;\n\n if (!this.documentResizeListener) {\n this.documentResizeListener = function (event) {\n if (_this5.state.visible && !DomHandler.isTouchDevice()) {\n _this5.hide(event);\n }\n };\n\n window.addEventListener('resize', this.documentResizeListener);\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: \"bindScrollListener\",\n value: function bindScrollListener() {\n var _this6 = this;\n\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function (event) {\n if (_this6.state.visible) {\n _this6.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: \"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: \"renderElement\",\n value: function renderElement() {\n var className = classNames('p-tieredmenu p-component', {\n 'p-tieredmenu-overlay': this.props.popup\n }, this.props.className);\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(TieredMenuSub, {\n model: this.props.model,\n root: true,\n popup: this.props.popup\n })));\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 TieredMenu;\n}(Component);\n\n_defineProperty(TieredMenu, \"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 { TieredMenu };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,UAAT,EAAqBC,UAArB,EAAiCC,WAAjC,EAA8CC,WAA9C,EAA2DC,6BAA3D,QAAgG,kBAAhG;AACA,SAASC,MAAT,QAAuB,mBAAvB;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,C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