2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/utils"),r=require("primereact/ripple"),o=require("primereact/inputtext"),i=require("primereact/tooltip"),l=require("primereact/virtualscroller");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(e);function p(){return p=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},p.apply(this,arguments)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){if(Array.isArray(e))return u(e)}function f(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function h(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function d(){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 v(e){return c(e)||f(e)||h(e)||d()}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(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 m(e,t,n){return t&&b(e.prototype,t),n&&b(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(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&&g(e,t)}function E(e){return E="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},E(e)}function S(e,t){if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},j(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 w(){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 x=function(t){k(a,e.Component);var o,i,l=(o=a,i=w(),function(){var e,t=j(o);if(i){var n=j(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return S(this,e)});function a(e){var t;return y(this,a),(t=l.call(this,e)).onClick=t.onClick.bind(O(t)),t.onTouchEnd=t.onTouchEnd.bind(O(t)),t.onKeyDown=t.onKeyDown.bind(O(t)),t}return m(a,[{key:"onClick",value:function(e){this.props.onClick&&this.props.onClick({originalEvent:e,option:this.props.option}),e.preventDefault()}},{key:"onTouchEnd",value:function(e){this.props.onTouchEnd&&this.props.onTouchEnd({originalEvent:e,option:this.props.option})}},{key:"onKeyDown",value:function(e){var t=e.currentTarget;switch(e.which){case 40:var n=this.findNextItem(t);n&&n.focus(),e.preventDefault();break;case 38:var r=this.findPrevItem(t);r&&r.focus(),e.preventDefault();break;case 13:this.onClick(e),e.preventDefault()}}},{key:"findNextItem",value:function(e){var t=e.nextElementSibling;return t?n.DomHan
|