2 lines
3.3 KiB
JavaScript
2 lines
3.3 KiB
JavaScript
|
this.primereact=this.primereact||{},this.primereact.card=function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function s(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&&c(e,t)}function a(e){return a="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},a(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(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 y,h,b,m=function(e){s(h,e);var t,n,c,a,u,y=(t=h,n=d(),function(){var e,r=f(t);if(n){var o=f(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return p(this,e)});function h(){return i(this,h),y.apply(this,arguments)}return c=h,(a=[{key:"renderHeader",value:function(){return this.props.header?o.default.createElement("div",{className:"p-card-header"},r.ObjectUtils.getJSXElement(this.props.header,this.props)):null}},{key:"renderBody",value:function(){var e=this.props.title&&o.default.createElement("div",{className:"p-card-title"},r.ObjectUtils.getJSXElement(this.props.title,this.props)),t=this.props.subTitle&&o.default.createElement("div",{className:"p-card-subtitle"},r.ObjectUtils.getJSXElement(this.props.subTitle,this.props)),n=this.props.children&&o.default.createElement("div",{className:"p-card-content"},this.props.children),i=this.props.footer&&o.default.createElement("div",{className:"p-card-footer"},r.ObjectUtils.getJSXElement(this.props.footer,this.props));return o.default.createElement("div",{className:"p-card-body"},e,t,n,i)}},{key:"render",value:function(){var e=this.renderHeader(),t=this.renderBody(),n=r.classNames("p-card p-component",this.props.className);return o.default.createElement("div",{className:n,style:this.props.style,id:this.props.id},e,t)}}])&&l(c.prototype,a),u&&l(c,u),Object.defineProperty(c,"prototype",{writable:!1}),h}(t.Component);return b={id:null,header:null,footer:null,title:null,subTitle:null,style:null,className:null},(h="defaultProps")in(y=m)?Object.defineProperty(y,h,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[h]=b,e.Card=m,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);
|