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

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