2 lines
2.8 KiB
JavaScript
2 lines
2.8 KiB
JavaScript
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function c(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&&u(e,t)}function s(e){return s="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},s(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(){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 y,h,b,d=function(r){c(d,e.Component);var u,s,l,y,h,b=(u=d,s=f(),function(){var e,t=p(u);if(s){var r=p(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function d(){return n(this,d),b.apply(this,arguments)}return l=d,(y=[{key:"skeletonStyle",value:function(){return this.props.size?{width:this.props.size,height:this.props.size,borderRadius:this.props.borderRadius}:{width:this.props.width,height:this.props.height,borderRadius:this.props.borderRadius}}},{key:"render",value:function(){var e=t.classNames("p-skeleton p-component",{"p-skeleton-circle":"circle"===this.props.shape,"p-skeleton-none":"none"===this.props.animation},this.props.className),r=this.skeletonStyle();return o.default.createElement("div",{style:r,className:e})}}])&&i(l.prototype,y),h&&i(l,h),Object.defineProperty(l,"prototype",{writable:!1}),d}();b={shape:"rectangle",size:null,width:"100%",height:"1rem",borderRadius:null,animation:"wave",style:null,className:null},(h="defaultProps")in(y=d)?Object.defineProperty(y,h,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[h]=b,exports.Skeleton=d;
|