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