katoikia-app/web-ui/web-react/node_modules/primereact/slidemenu/slidemenu.cjs.min.js

2 lines
10 KiB
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/csstransition"),i=require("primereact/overlayservice"),r=require("primereact/portal"),s=require("primereact/api");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(e),l=o(s);function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function d(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function v(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=E();return function(){var n,i=b(e);if(t){var r=b(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return v(this,n)}}function E(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var w=function(n){f(r,e.Component);var i=k(r);function r(e){var t;return c(this,r),(t=i.call(this,e)).state={activeItem:null},t}return d(r,[{key:"onItemClick",value:function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.setState({activeItem:t}),this.props.onForward()))}},{key:"renderSeparator",value:function(e){return a.default.createElement("li",{key:"separator_"+e,className:"p-menu-separator"})}},{key:"renderSubmenu",value:function(e){return e.items?a.default.createElement(r,{model:e.items,index:this.props.index+1,menuWidth:this.props.menuWidth,effectDuration:this.props.effectDuration,onForward:this.props.onForward,parentActive:e===this.state.activeItem}):null}},{key:"renderMenuitem",value:function(e,n){var i=this,r=this.state.activeItem===e,s=t.classNames("p-menuitem",{"p-menuitem-active":r,"p-disabled":e.disabled},e.className),o=t.classNames("p-menuitem-icon",e.icon),l="p-submenu-icon pi pi-fw pi-angle-right",u=e.icon&&a.default.createElement("span",{className:o}),c=e.label&&a.default.createElement("span",{className:"p-menuitem-text"},e.label),p=e.items&&a.default.createElement("span",{className:l}),d=this.renderSubmenu(e),m=a.default.createElement("a",{href:e.url||"#",className:"p-menuitem-link",target:e.target,onClick:function(t){return i.onItemClick(t,e,n)},"aria-disabled":e.disabled},u,c,p);e.template&&(m=t.ObjectUtils.getJSXElement(e.template,e,{onClick:function(t){return i.onItemClick(t,e,n)},className:"p-menuitem-link",labelClassName:"p-menuitem-text",iconClassName:o,submenuIconClassName:l,element:m,props:this.props,active:r}));return a.default.createElement("li",{key:e.label+"_"+n,className:s,style:e.style},m,d)}},{key:"renderItem",value:function(e,t){return e.separator?this.renderSe