2 lines
3.3 KiB
JavaScript
2 lines
3.3 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 n=r(e);function o(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 n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(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&&l(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 u(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 u(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 d,y,b,h=function(r){c(h,e.Component);var l,s,u,d,y,b=(l=h,s=f(),function(){var e,t=p(l);if(s){var r=p(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function h(){return o(this,h),b.apply(this,arguments)}return u=h,(d=[{key:"renderHeader",value:function(){return this.props.header?n.default.createElement("div",{className:"p-card-header"},t.ObjectUtils.getJSXElement(this.props.header,this.props)):null}},{key:"renderBody",value:function(){var e=this.props.title&&n.default.createElement("div",{className:"p-card-title"},t.ObjectUtils.getJSXElement(this.props.title,this.props)),r=this.props.subTitle&&n.default.createElement("div",{className:"p-card-subtitle"},t.ObjectUtils.getJSXElement(this.props.subTitle,this.props)),o=this.props.children&&n.default.createElement("div",{className:"p-card-content"},this.props.children),i=this.props.footer&&n.default.createElement("div",{className:"p-card-footer"},t.ObjectUtils.getJSXElement(this.props.footer,this.props));return n.default.createElement("div",{className:"p-card-body"},e,r,o,i)}},{key:"render",value:function(){var e=this.renderHeader(),r=this.renderBody(),o=t.classNames("p-card p-component",this.props.className);return n.default.createElement("div",{className:o,style:this.props.style,id:this.props.id},e,r)}}])&&i(u.prototype,d),y&&i(u,y),Object.defineProperty(u,"prototype",{writable:!1}),h}();b={id:null,header:null,footer:null,title:null,subTitle:null,style:null,className:null},(y="defaultProps")in(d=h)?Object.defineProperty(d,y,{value:b,enumerable:!0,configurable:!0,writable:!0}):d[y]=b,exports.Card=h;
|