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

2 lines
4.7 KiB
JavaScript

import t,{Component as n}from"react";import{CSSTransition as o}from"react-transition-group";import e from"primereact/api";import{ObjectUtils as r}from"primereact/utils";function i(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function s(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function p(t,n){for(var o=0;o<n.length;o++){var e=n[o];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,n){return u=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},u(t,n)}function f(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&u(t,n)}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function h(t,n){if(n&&("object"===a(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function E(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),o.push.apply(o,e)}return o}function y(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?E(Object(o),!0).forEach((function(n){i(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):E(Object(o)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))}))}return t}function d(){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(t){return!1}}var b=function(i){f(x,n);var u,a,E,b,g,m=(u=x,a=d(),function(){var t,n=l(u);if(a){var o=l(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return h(this,t)});function x(t){var n;return s(this,x),(n=m.call(this,t)).onEnter=n.onEnter.bind(c(n)),n.onEntering=n.onEntering.bind(c(n)),n.onEntered=n.onEntered.bind(c(n)),n.onExit=n.onExit.bind(c(n)),n.onExiting=n.onExiting.bind(c(n)),n.onExited=n.onExited.bind(c(n)),n}return E=x,(b=[{key:"disabled",get:function(){return this.props.disabled||this.props.options&&this.props.options.disabled||!e.cssTransition}},{key:"onEnter",value:function(t,n){this.props.onEnter&&this.props.onEnter(t,n),this.props.options&&this.props.options.onEnter&&this.props.options.onEnter(t,n)}},{key:"onEntering",value:function(t,n){this.props.onEntering&&this.props.onEntering(t,n),this.props.options&&this.props.options.onEntering&&this.props.options.onEntering(t,n)}},{key:"onEntered",value:function(t,n){this.props.onEntered&&this.props.onEntered(t,n),this.props.options&&this.props.options.onEntered&&this.props.options.onEntered(t,n)}},{key:"onExit",value:function(t){this.props.onExit&&this.props.onExit(t),this.props.options&&this.props.options.onExit&&this.props.options.onExit(t)}},{key:"onExiting",value:function(t){this.props.onExiting&&this.props.onExiting(t),this.props.options&&this.props.options.onExiting&&this.props.options.onExiting(t)}},{key:"onExited",value:function(t){this.props.onExited&&this.props.onExited(t),this.props.options&&this.props.options.onExited&&this.props.options.onExited(t)}},{key:"componentDidUpdate",value:function(t){if(this.props.in!==t.in&&this.disabled){var n=r.getRefElement(this.props.nodeRef);this.props.in?(this.onEnter(n,!0),this.onEntering(n,!0),this.onEntered(n,!0)):(this.onExit(n),this.onExiting(n),this.onExited(n))}}},{key:"render",value:function(){if(this.disabled)return this.props.in?this.props.children:null;var n={nodeRef:this.props.nodeRef,in:this.props.in,onEnter:this.onEnter,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited},e=y(y(y({},{classNames:this.props.classNames,timeout:this.props.timeout,unmountOnExit:this.props.unmountOnExit}),this.props.options||{}),n);return t.createElement(o,e,this.props.children)}}])&&p(E.prototype,b),g&&p(E,g),Object.defineProperty(E,"prototype",{writable:!1}),x}();export{b as CSSTransition};