2 lines
17 KiB
JavaScript
2 lines
17 KiB
JavaScript
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),o=require("primereact/ripple"),n=require("primereact/button");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,o){return t&&l(e.prototype,t),o&&l(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function u(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&&p(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 f(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 c(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function v(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},m.apply(this,arguments)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function g(e){if(Array.isArray(e))return y(e)}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function S(e,t){if(e){if("string"==typeof e)return y(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}function k(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(e){return g(e)||b(e)||S(e)||k()}function T(){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 C=function(n){u(h,e.Component);var r,l,p=(r=h,l=T(),function(){var e,t=d(r);if(l){var o=d(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return f(this,e)});function h(e){var t;return s(this,h),(t=p.call(this,e)).onClick=t.onClick.bind(c(t)),t.onKeyDown=t.onKeyDown.bind(c(t)),t}return a(h,[{key:"onClick",value:function(e){this.props.onClick&&this.props.onClick({originalEvent:e,value:this.props.value})}},{key:"onKeyDown",value:function(e){this.props.onKeyDown&&this.props.onKeyDown({originalEvent:e,value:this.props.value})}},{key:"render",value:function(){var e=this.props.template?this.props.template(this.props.value):this.props.value,n=t.classNames("p-picklist-item",{"p-highlight":this.props.selected},this.props.className);return i.default.createElement("li",{className:n,onClick:this.onClick,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,role:"option","aria-selected":this.props.selected},e,i.default.createElement(o.Ripple,null))}}]),h}();function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.
|