6 lines
23 KiB
JavaScript
6 lines
23 KiB
JavaScript
|
/*!
|
|||
|
FullCalendar v5.10.2
|
|||
|
Docs & License: https://fullcalendar.io/
|
|||
|
(c) 2021 Adam Shaw
|
|||
|
*/
|
|||
|
var FullCalendarDayGrid=function(e,t){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};var i=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.headerElRef=t.createRef(),n}return r(n,e),n.prototype.renderSimpleLayout=function(e,n){var r=this.props,a=this.context,i=[],s=t.getStickyHeaderDates(a.options);return e&&i.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:n}}),t.createElement(t.ViewRoot,{viewSpec:a.viewSpec},(function(e,n){return t.createElement("div",{ref:e,className:["fc-daygrid"].concat(n).join(" ")},t.createElement(t.SimpleScrollGrid,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:i}))}))},n.prototype.renderHScrollLayout=function(e,n,r,a){var i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");var s=this.props,o=this.context,l=!s.forPrint&&t.getStickyHeaderDates(o.options),c=!s.forPrint&&t.getStickyFooterScrollbar(o.options),d=[];return e&&d.push({type:"header",key:"header",isSticky:l,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),d.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:n}]}),c&&d.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:t.renderScrollShim}]}),t.createElement(t.ViewRoot,{viewSpec:o.viewSpec},(function(e,n){return t.createElement("div",{ref:e,className:["fc-daygrid"].concat(n).join(" ")},t.createElement(i,{liquid:!s.isHeightAuto&&!s.forPrint,collapsibleWidth:s.forPrint,colGroups:[{cols:[{span:r,minWidth:a}]}],sections:d}))}))},n}(t.DateComponent);function s(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,i=e;a<i.length;a++){var s=i[a];n[s.row].push(s)}return n}function o(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,i=e;a<i.length;a++){var s=i[a];n[s.firstCol].push(s)}return n}function l(e,t){var n=[];if(e){for(s=0;s<t;s+=1)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,a=e.segs;r<a.length;r++){var i=a[r];n[i.row].segs.push(i)}}else for(var s=0;s<t;s+=1)n[s]=null;return n}var c=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r(n,e),n.prototype.render=function(){var e=this.props,n=t.buildNavLinkAttrs(this.context,e.date);return t.createElement(t.DayCellContent,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:d},(function(r,i){return(i||e.forceDayTop)&&t.createElement("div",{className:"fc-daygrid-day-top",ref:r},t.createElement("a",a({id:e.dayNumberId,className:"fc-daygrid-day-number"},n),i||t.createElement(t.Fragment,null," ")))}))},n}(t.BaseComponent);function d(e){return e.dayNumberText}var u=t.createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function f(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var g=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r(n,e),n.prototype.render=function(){var e=this.props;return t.createElement(t.StandardEvent,a({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:u,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},n}
|