2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
import e,{Component as t}from"react";import{Button as n}from"primereact/button";import{classNames as r,ObjectUtils as i,ZIndexUtils as o,DomHandler as l,ConnectedOverlayScrollHandler as s,UniqueComponentId as a}from"primereact/utils";import{CSSTransition as u}from"primereact/csstransition";import{Portal as c}from"primereact/portal";import{tip as p}from"primereact/tooltip";import{OverlayService as f}from"primereact/overlayservice";import h from"primereact/api";function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function k(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&&b(e,t)}function O(e){return O="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},O(e)}function E(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(){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 L=function(n){k(a,t);var o,l,s=(o=a,l=R(),function(){var e,t=C(o);if(l){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return E(this,e)});function a(e){var t;return d(this,a),(t=s.call(this,e)).onClick=t.onClick.bind(v(t)),t}return y(a,[{key:"onClick",value:function(e){this.props.menuitem.command&&this.props.menuitem.command({originalEvent:e,item:this.props.menuitem}),this.props.onItemClick&&this.props.onItemClick(e),e.preventDefault()}},{key:"renderSeparator",value:function(){return e.createElement("li",{className:"p-menu-separator",role:"separator"})}},{key:"renderMenuitem",value:function(){var t=this,n=this.props.menuitem,o=n.icon,l=n.label,s=n.template,a=n.url,u=n.target,c=r("p-menuitem-link",{"p-disabled":n.disabled}),p=r("p-menuitem-icon",o),f=e.createElement("a",{href:a||"#",role:"menuitem",className:c,target:u,onClick:this.onClick},o=o&&e.createElement("span",{className:p}),l=l&&e.createElement("span",{className:"p-menuitem-text"},l));s&&(f=i.getJSXElement(s,this.props.menuitem,{onClick:function(e){return t.onClick(e)},className:c,labelClassName:"p-menuitem-text",iconClassName:p,element:f,props:this.props}));return e.createElement("li",{className:"p-menuitem",role:"none"},f)}},{key:"renderItem",value:function(){return this.props.menuitem.separator?this.renderSeparator():this.renderMenuitem()}},{key:"render",value:function(){return this.renderItem()}}]),a}();function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}function S(){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(Boolea
|