katoikia-app/web-ui/web-react/node_modules/primereact/cascadeselect/cascadeselect.esm.min.js

2 lines
19 KiB
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
import e,{Component as t,createRef as n}from"react";import{DomHandler as i,ObjectUtils as o,classNames as r,ZIndexUtils as l,ConnectedOverlayScrollHandler as s}from"primereact/utils";import{CSSTransition as a}from"primereact/csstransition";import{Ripple as p}from"primereact/ripple";import{OverlayService as u}from"primereact/overlayservice";import{Portal as c}from"primereact/portal";import h from"primereact/api";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 v(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(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 m(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 k(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 y(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function S(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(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=E(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw r}}}}function E(e,t){if(e){if("string"==typeof e)return L(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)?L(e,t):void 0}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}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 G=function(n){m(u,t);var l,s,a=(l=u,s=C(),function(){var e,t=g(l);if(s){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function u(e){var t;return d(this,u),(t=a.call(this,e)).state={activeOption:null},t.onOptionSelect=t.onOptionSelect.bind(y(t)),t.onOptionGroupSelect=t.onOptionGroupSelect.bind(y(t)),t}return v(u,[{key:"componentDidMount",value:function(){if(this.props.selectionPath&&this.props.options&&!this.props.dirty){var e,t=w(this.props.options);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(this.props.selectionPath.includes(n)){this.setState({activeOption:n});break}}}catch(e){t.e(e)}finally{t.f()}}this.props.root||this.position()}},{key:"componentDidUpdate",value:function(e){e.parentActive!==this.props.parentActive&&this.setState({activeOption:null})}},{key:"position",value:function()