2 lines
3.5 KiB
JavaScript
2 lines
3.5 KiB
JavaScript
this.primereact=this.primereact||{},this.primereact.fullcalendar=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(t);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function l(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&&a(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 p(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 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,v,b=function(e){l(h,e);var t,r,a,s,u,y=(t=h,r=d(),function(){var e,n=f(t);if(r){var o=f(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return p(this,e)});function h(){return i(this,h),y.apply(this,arguments)}return a=h,(s=[{key:"componentDidMount",value:function(){if(console.warn("FullCalendar component is deprecated. Use FullCalendar component of '@fullcalendar/react' package."),this.config={theme:!0},this.props.options)for(var e in this.props.options)this.config[e]=this.props.options[e];this.initialize()}},{key:"componentDidUpdate",value:function(e){if(this.calendar){if(n.ObjectUtils.equals(e.events,this.props.events)||(this.calendar.removeAllEventSources(),this.calendar.addEventSource(this.props.events)),!n.ObjectUtils.equals(e.options,this.props.options))for(var t in this.props.options){var r=this.props.options[t];this.config[t]=r,this.calendar.setOption(t,r)}}else this.initialize()}},{key:"initialize",value:function(){var e=this;import("@fullcalendar/core").then((function(t){t&&t.Calendar&&(e.calendar=new t.Calendar(e.element,e.config),e.calendar.render(),e.props.events&&(e.calendar.removeAllEventSources(),e.calendar.addEventSource(e.props.events)))}))}},{key:"componentWillUnmount",value:function(){this.calendar&&this.calendar.destroy()}},{key:"render",value:function(){var e=this;return o.default.createElement("div",{id:this.props.id,ref:function(t){return e.element=t},style:this.props.style,className:this.props.className})}}])&&c(a.prototype,s),u&&c(a,u),Object.defineProperty(a,"prototype",{writable:!1}),h}(t.Component);return v={id:null,events:[],style:null,className:null,options:null},(h="defaultProps")in(y=b)?Object.defineProperty(y,h,{value:v,enumerable:!0,configurable:!0,writable:!0}):y[h]=v,e.FullCalendar=b,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);
|