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

2 lines
4.0 KiB
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
this.primereact=this.primereact||{},this.primereact.progressbar=function(e,r,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(r);function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function i(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,r){return s=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},s(e,r)}function l(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&s(e,r)}function u(e){return u="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},u(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,r){if(r&&("object"===u(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}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(e){return!1}}var m,y,b,h=function(e){l(y,e);var r,n,s,u,p,m=(r=y,n=d(),function(){var e,t=f(r);if(n){var o=f(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return c(this,e)});function y(){return a(this,y),m.apply(this,arguments)}return s=y,(u=[{key:"renderLabel",value:function(){if(this.props.showValue&&null!=this.props.value){var e=this.props.displayValueTemplate?this.props.displayValueTemplate(this.props.value):this.props.value+this.props.unit;return o.default.createElement("div",{className:"p-progressbar-label"},e)}return null}},{key:"renderDeterminate",value:function(){var e=t.classNames("p-progressbar p-component p-progressbar-determinate",this.props.className),r=this.renderLabel();return o.default.createElement("div",{role:"progressbar",id:this.props.id,className:e,style:this.props.style,"aria-valuemin":"0","aria-valuenow":this.props.value,"aria-valuemax":"100","aria-label":this.props.value},o.default.createElement("div",{className:"p-progressbar-value p-progressbar-value-animate",style:{width:this.props.value+"%",display:"block",backgroundColor:this.props.color}}),r)}},{key:"renderIndeterminate",value:function(){var e=t.classNames("p-progressbar p-component p-progressbar-indeterminate",this.props.className);return o.default.createElement("div",{role:"progressbar",id:this.props.id,className:e,style:this.props.style},o.default.createElement("div",{className:"p-progressbar-indeterminate-container"},o.default.createElement("div",{className:"p-progressbar-value p-progressbar-value-animate",style:{backgroundColor:this.props.color}})))}},{key:"render",value:function(){if("determinate"===this.props.mode)return this.renderDeterminate();if("indeterminate"===this.props.mode)return this.renderIndeterminate();throw new Error(this.props.mode+" is not a valid mode for the ProgressBar. Valid values are 'determinate' and 'indeterminate'")}}])&&i(s.prototype,u),p&&i(s,p),Object.defineProperty(s,"prototype",{writable:!1}),y}(r.Component);return b={id:null,value:null,showValue:!0,unit:"%",style:null,className:null,mode:"determinate",displayValueTemplate:null,color:null},(y="defaultProps")in(m=h)?Object.defineProperty(m,y,{value:b,enumerable:!0,configurable:!0,writable:!0}):m[y]=b,e.ProgressBar=h,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);