Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fullcalendar/timegrid

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fullcalendar/timegrid - npm Package Compare versions

Comparing version 5.5.1 to 5.6.0

6

main.cjs.js
/*!
FullCalendar v5.5.1
FullCalendar v5.6.0
Docs & License: https://fullcalendar.io/

@@ -201,3 +201,3 @@ (c) 2020 Adam Shaw

return (common.createElement(common.ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function (rootElRef, classNames) { return (common.createElement("div", { className: ['fc-timegrid'].concat(classNames).join(' '), ref: rootElRef },
common.createElement(common.SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, cols: [{ width: 'shrink' }], sections: sections }))); }));
common.createElement(common.SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [{ width: 'shrink' }], sections: sections }))); }));
};

@@ -310,3 +310,3 @@ TimeColsView.prototype.renderHScrollLayout = function (headerRowContent, allDayContent, timeContent, colCnt, dayMinWidth, slatMetas, slatCoords) {

return (common.createElement(common.ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function (rootElRef, classNames) { return (common.createElement("div", { className: ['fc-timegrid'].concat(classNames).join(' '), ref: rootElRef },
common.createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, colGroups: [
common.createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: false, colGroups: [
{ width: 'shrink', cols: [{ width: 'shrink' }] },

@@ -313,0 +313,0 @@ { cols: [{ span: colCnt, minWidth: dayMinWidth }] },

/*!
FullCalendar v5.5.1
FullCalendar v5.6.0
Docs & License: https://fullcalendar.io/
(c) 2020 Adam Shaw
*/
var FullCalendarTimeGrid=function(e,t,o){"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 o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)};function r(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var i=function(){return(i=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},o.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},o.prototype.getKeysForEventDef=function(e){return e.allDay?t.hasBgRendering(e)?["timed","allDay"]:["allDay"]:["timed"]},o}(t.Splitter),s=t.createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function l(e){var o=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return t.createElement(t.ViewContextType.Consumer,null,(function(n){if(!e.isLabeled)return t.createElement("td",{className:o.join(" "),"data-time":e.isoTimeStr});var r=n.dateEnv,i=n.options,a=n.viewApi,l=null==i.slotLabelFormat?s:Array.isArray(i.slotLabelFormat)?t.createFormatter(i.slotLabelFormat[0]):t.createFormatter(i.slotLabelFormat),d={level:0,time:e.time,date:r.toDate(e.date),view:a,text:r.format(e.date,l)};return t.createElement(t.RenderHook,{hookProps:d,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:c,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,a){return t.createElement("td",{ref:n,className:o.concat(r).join(" "),"data-time":e.isoTimeStr},t.createElement("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},t.createElement("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},a)))}))}))}function c(e){return e.text}var d=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){return this.props.slatMetas.map((function(e){return t.createElement("tr",{key:e.key},t.createElement(l,i({},e)))}))},o}(t.BaseComponent),u=t.createFormatter({week:"short"}),p=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.allDaySplitter=new a,o.headerElRef=t.createRef(),o.rootElRef=t.createRef(),o.scrollerElRef=t.createRef(),o.state={slatCoords:null},o.handleScrollTopRequest=function(e){var t=o.scrollerElRef.current;t&&(t.scrollTop=e)},o.renderHeadAxis=function(e,n){void 0===n&&(n="");var r=o.context.options,a=o.props.dateProfile.renderRange,s=t.diffDays(a.start,a.end),l=r.navLinks&&1===s?{"data-navlink":t.buildNavLinkData(a.start,"week"),tabIndex:0}:{};return r.weekNumbers&&"day"===e?t.createElement(t.WeekNumberRoot,{date:a.start,defaultFormat:u},(function(e,o,r,a){return t.createElement("th",{ref:e,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(o).join(" ")},t.createElement("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:n}},t.createElement("a",i({ref:r,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},l),a)))})):t.createElement("th",{className:"fc-timegrid-axis"},t.createElement("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},o.renderTableRowAxis=function(e){var n=o.context,r=n.options,i=n.viewApi,a={text:r.allDayText,view:i};return t.createElement(t.RenderHook,{hookProps:a,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:f,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(o,n,r,i){return t.createElement("td",{ref:o,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},t.createElement("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},t.createElement("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},o.handleSlatCoords=function(e){o.setState({slatCoords:e})},o}return r(o,e),o.prototype.renderSimpleLayout=function(e,o,n){var r=this.context,i=this.props,a=[],s=t.getStickyHeaderDates(r.options);return e&&a.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),o&&(a.push({type:"body",key:"all-day",chunk:{content:o}}),a.push({type:"body",key:"all-day-divider",outerContent:t.createElement("tr",{className:"fc-scrollgrid-section"},t.createElement("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),a.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),t.createElement(t.ViewRoot,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,o){return t.createElement("div",{className:["fc-timegrid"].concat(o).join(" "),ref:e},t.createElement(t.SimpleScrollGrid,{liquid:!i.isHeightAuto&&!i.forPrint,cols:[{width:"shrink"}],sections:a}))}))},o.prototype.renderHScrollLayout=function(e,o,n,r,i,a,s){var l=this,c=this.context.pluginHooks.scrollGridImpl;if(!c)throw new Error("No ScrollGrid implementation");var u=this.context,p=this.props,f=!p.forPrint&&t.getStickyHeaderDates(u.options),m=!p.forPrint&&t.getStickyFooterScrollbar(u.options),h=[];e&&h.push({type:"header",key:"header",isSticky:f,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return t.createElement("tr",null,l.renderHeadAxis("day",e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),o&&(h.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return t.createElement("tr",null,l.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:o}]}),h.push({key:"all-day-divider",type:"body",outerContent:t.createElement("tr",{className:"fc-scrollgrid-section"},t.createElement("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var g=u.options.nowIndicator;return h.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return t.createElement("div",{className:"fc-timegrid-axis-chunk"},t.createElement("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,t.createElement("tbody",null,t.createElement(d,{slatMetas:a}))),t.createElement("div",{className:"fc-timegrid-now-indicator-container"},t.createElement(t.NowTimer,{unit:g?"minute":"day"},(function(e){var o=g&&s&&s.safeComputeTop(e);return"number"==typeof o?t.createElement(t.NowIndicatorRoot,{isAxis:!0,date:e},(function(e,n,r,i){return t.createElement("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:o}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),m&&h.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:t.renderScrollShim},{key:"cols",content:t.renderScrollShim}]}),t.createElement(t.ViewRoot,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,o){return t.createElement("div",{className:["fc-timegrid"].concat(o).join(" "),ref:e},t.createElement(c,{liquid:!p.isHeightAuto&&!p.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:h}))}))},o.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,o=e.dayMaxEventRows;return!0!==t&&!0!==o||(t=void 0,o=5),{dayMaxEvents:t,dayMaxEventRows:o}},o}(t.DateComponent);function f(e){return e.text}var m=function(){function e(e,t,o){this.positions=e,this.dateProfile=t,this.slotDuration=o}return e.prototype.safeComputeTop=function(e){var o=this.dateProfile;if(t.rangeContainsMarker(o.currentRange,e)){var n=t.startOfDay(e),r=e.valueOf()-n.valueOf();if(r>=t.asRoughMs(o.slotMinTime)&&r<t.asRoughMs(o.slotMaxTime))return this.computeTimeTop(t.createDuration(r))}return null},e.prototype.computeDateTop=function(e,o){return o||(o=t.startOfDay(e)),this.computeTimeTop(t.createDuration(e.valueOf()-o.valueOf()))},e.prototype.computeTimeTop=function(e){var o,n,r=this.positions,i=this.dateProfile,a=r.els.length,s=(e.milliseconds-t.asRoughMs(i.slotMinTime))/t.asRoughMs(this.slotDuration);return s=Math.max(0,s),s=Math.min(a,s),o=Math.floor(s),n=s-(o=Math.min(o,a-1)),r.tops[o]+r.getHeight(o)*n},e}(),h=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){var e=this.props,o=this.context,n=o.options,r=e.slatElRefs;return t.createElement("tbody",null,e.slatMetas.map((function(a,s){var c={time:a.time,date:o.dateEnv.toDate(a.date),view:o.viewApi},d=["fc-timegrid-slot","fc-timegrid-slot-lane",a.isLabeled?"":"fc-timegrid-slot-minor"];return t.createElement("tr",{key:a.key,ref:r.createRef(a.key)},e.axis&&t.createElement(l,i({},a)),t.createElement(t.RenderHook,{hookProps:c,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,o,n,r){return t.createElement("td",{ref:e,className:d.concat(o).join(" "),"data-time":a.isoTimeStr},r)})))})))},o}(t.BaseComponent),g=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.rootElRef=t.createRef(),o.slatElRefs=new t.RefMap,o}return r(o,e),o.prototype.render=function(){var e=this.props,o=this.context;return t.createElement("div",{className:"fc-timegrid-slots",ref:this.rootElRef},t.createElement("table",{className:o.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,t.createElement(h,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},o.prototype.componentDidMount=function(){this.updateSizing()},o.prototype.componentDidUpdate=function(){this.updateSizing()},o.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},o.prototype.updateSizing=function(){var e,o=this.context,n=this.props;n.onCoords&&null!==n.clientWidth&&(this.rootElRef.current.offsetHeight&&n.onCoords(new m(new t.PositionCache(this.rootElRef.current,(e=this.slatElRefs.currentMap,n.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,o.options.slotDuration)))},o}(t.BaseComponent);function v(e,t){var o,n=[];for(o=0;o<t;o+=1)n.push([]);if(e)for(o=0;o<e.length;o+=1)n[e[o].col].push(e[o]);return n}function y(e,t){var o=[];if(e){for(a=0;a<t;a+=1)o[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var n=0,r=e.segs;n<r.length;n++){var i=r[n];o[i.col].segs.push(i)}}else for(var a=0;a<t;a+=1)o[a]=null;return o}function E(e,o,n,r,i){return S(e,o,n,r),function(e,o){for(var n=0,r=e;n<r.length;n++){(u=r[n]).level=null,u.forwardCoord=null,u.backwardCoord=null,u.forwardPressure=null}var i,a=function(e){var t,o,n,r=[];for(t=0;t<e.length;t+=1){for(o=e[t],n=0;n<r.length&&C(o,r[n]).length;n+=1);o.level=n,(r[n]||(r[n]=[])).push(o)}return r}(e=t.sortEventSegs(e,o));if(function(e){var t,o,n,r,i;for(t=0;t<e.length;t+=1)for(o=e[t],n=0;n<o.length;n+=1)for((r=o[n]).forwardSegs=[],i=t+1;i<e.length;i+=1)C(r,e[i],r.forwardSegs)}(a),i=a[0]){for(var s=0,l=i;s<l.length;s++){R(u=l[s])}for(var c=0,d=i;c<d.length;c++){var u;w(u=d[c],0,0,o)}}return e}(e,i)}function S(e,t,o,n){for(var r=0,i=e;r<i.length;r++){var a=i[r];a.top=o.computeDateTop(a.start,t),a.bottom=Math.max(a.top+(n||0),o.computeDateTop(a.end,t))}}function C(e,t,o){void 0===o&&(o=[]);for(var n=0;n<t.length;n+=1)r=e,i=t[n],r.bottom>i.top&&r.top<i.bottom&&o.push(t[n]);var r,i;return o}function R(e){var t,o,n=e.forwardSegs,r=0;if(null==e.forwardPressure){for(t=0;t<n.length;t+=1)R(o=n[t]),r=Math.max(r,1+o.forwardPressure);e.forwardPressure=r}}function w(e,o,n,r){var i,a=e.forwardSegs;if(null==e.forwardCoord)for(a.length?(!function(e,o){var n=e.map(b),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(o);n.sort((function(e,o){return t.compareByFieldSpecs(e,o,r)})),n.map((function(e){return e._seg}))}(a,r),w(a[0],o+1,n,r),e.forwardCoord=a[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(o+1),i=0;i<a.length;i+=1)w(a[i],0,e.forwardCoord,r)}function b(e){var o=t.buildSegCompareObj(e);return o.forwardPressure=e.forwardPressure,o.backwardCoord=e.backwardCoord,o}var D=t.createFormatter({hour:"numeric",minute:"2-digit",meridiem:!1}),x=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isCondensed&&e.push("fc-timegrid-event-condensed"),t.createElement(t.StandardEvent,i({},this.props,{defaultTimeFormat:D,extraClassNames:e}))},o}(t.BaseComponent),k=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){var e=this.props;return t.createElement(t.DayCellContent,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,o){return o&&t.createElement("div",{className:"fc-timegrid-col-misc",ref:e},o)}))},o}(t.BaseComponent);t.config.timeGridEventCondensedHeight=30;var M=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){var e=this,o=this.props,n=this.context.options.selectMirror,r=o.eventDrag&&o.eventDrag.segs||o.eventResize&&o.eventResize.segs||n&&o.dateSelectionSegs||[],a=o.eventDrag&&o.eventDrag.affectedInstances||o.eventResize&&o.eventResize.affectedInstances||{};return t.createElement(t.DayCellRoot,{elRef:o.elRef,date:o.date,dateProfile:o.dateProfile,todayRange:o.todayRange,extraHookProps:o.extraHookProps},(function(s,l,c){return t.createElement("td",i({ref:s,className:["fc-timegrid-col"].concat(l,o.extraClassNames||[]).join(" ")},c,o.extraDataAttrs),t.createElement("div",{className:"fc-timegrid-col-frame"},t.createElement("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(o.businessHourSegs,"non-business"),e.renderFillSegs(o.bgEventSegs,"bg-event"),e.renderFillSegs(o.dateSelectionSegs,"highlight")),t.createElement("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(o.fgEventSegs,a)),t.createElement("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(r,{},Boolean(o.eventDrag),Boolean(o.eventResize),Boolean(n))),t.createElement("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(o.nowIndicatorSegs)),t.createElement(k,{date:o.date,dateProfile:o.dateProfile,todayRange:o.todayRange,extraHookProps:o.extraHookProps})))}))},o.prototype.renderFgSegs=function(e,t,o,n,r){var i=this.props;return i.forPrint?this.renderPrintFgSegs(e):i.slatCoords?this.renderPositionedFgSegs(e,t,o,n,r):null},o.prototype.renderPrintFgSegs=function(e){var o=this.props,n=this.context;return(e=t.sortEventSegs(e,n.options.eventOrder)).map((function(e){return t.createElement("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},t.createElement(x,i({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},t.getSegMeta(e,o.todayRange,o.nowDate))))}))},o.prototype.renderPositionedFgSegs=function(e,o,n,r,a){var s=this,l=this.context,c=this.props;return(e=E(e,c.date,c.slatCoords,l.options.eventMinHeight,l.options.eventOrder)).map((function(e){var l=e.eventRange.instance.instanceId,d=n||r||a?i({left:0,right:0},s.computeSegTopBottomCss(e)):s.computeFgSegPositionCss(e);return t.createElement("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:l,style:i({visibility:o[l]?"hidden":""},d)},t.createElement(x,i({seg:e,isDragging:n,isResizing:r,isDateSelecting:a,isSelected:l===c.eventSelection,isCondensed:e.bottom-e.top<t.config.timeGridEventCondensedHeight},t.getSegMeta(e,c.todayRange,c.nowDate))))}))},o.prototype.renderFillSegs=function(e,o){var n=this,r=this.context,a=this.props;if(!a.slatCoords)return null;S(e,a.date,a.slatCoords,r.options.eventMinHeight);var s=e.map((function(e){return t.createElement("div",{key:t.buildEventRangeKey(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===o?t.createElement(t.BgEvent,i({seg:e},t.getSegMeta(e,a.todayRange,a.nowDate))):t.renderFill(o))}));return t.createElement(t.Fragment,null,s)},o.prototype.renderNowIndicator=function(e){var o=this.props,n=o.slatCoords,r=o.date;return n?e.map((function(e,o){return t.createElement(t.NowIndicatorRoot,{isAxis:!1,date:r,key:o},(function(o,i,a,s){return t.createElement("div",{ref:o,className:["fc-timegrid-now-indicator-line"].concat(i).join(" "),style:{top:n.computeDateTop(e.start,r)}},s)}))})):null},o.prototype.computeFgSegPositionCss=function(e){var t,o,n=this.context,r=n.isRtl,a=n.options.slotEventOverlap,s=e.backwardCoord,l=e.forwardCoord;a&&(l=Math.min(1,s+2*(l-s))),r?(t=1-l,o=s):(t=s,o=1-l);var c={zIndex:e.level+1,left:100*t+"%",right:100*o+"%"};return a&&e.forwardPressure&&(c[r?"marginLeft":"marginRight"]=20),i(i({},c),this.computeSegTopBottomCss(e))},o.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},o}(t.BaseComponent),N=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.splitFgEventSegs=t.memoize(v),o.splitBgEventSegs=t.memoize(v),o.splitBusinessHourSegs=t.memoize(v),o.splitNowIndicatorSegs=t.memoize(v),o.splitDateSelectionSegs=t.memoize(v),o.splitEventDrag=t.memoize(y),o.splitEventResize=t.memoize(y),o.rootElRef=t.createRef(),o.cellElRefs=new t.RefMap,o}return r(o,e),o.prototype.render=function(){var e=this,o=this.props,n=this.context.options.nowIndicator&&o.slatCoords&&o.slatCoords.safeComputeTop(o.nowDate),r=o.cells.length,i=this.splitFgEventSegs(o.fgEventSegs,r),a=this.splitBgEventSegs(o.bgEventSegs,r),s=this.splitBusinessHourSegs(o.businessHourSegs,r),l=this.splitNowIndicatorSegs(o.nowIndicatorSegs,r),c=this.splitDateSelectionSegs(o.dateSelectionSegs,r),d=this.splitEventDrag(o.eventDrag,r),u=this.splitEventResize(o.eventResize,r);return t.createElement("div",{className:"fc-timegrid-cols",ref:this.rootElRef},t.createElement("table",{style:{minWidth:o.tableMinWidth,width:o.clientWidth}},o.tableColGroupNode,t.createElement("tbody",null,t.createElement("tr",null,o.axis&&t.createElement("td",{className:"fc-timegrid-col fc-timegrid-axis"},t.createElement("div",{className:"fc-timegrid-col-frame"},t.createElement("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&t.createElement(t.NowIndicatorRoot,{isAxis:!0,date:o.nowDate},(function(e,o,r,i){return t.createElement("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(o).join(" "),style:{top:n}},i)}))))),o.cells.map((function(n,r){return t.createElement(M,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:o.dateProfile,date:n.date,nowDate:o.nowDate,todayRange:o.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,fgEventSegs:i[r],bgEventSegs:a[r],businessHourSegs:s[r],nowIndicatorSegs:l[r],dateSelectionSegs:c[r],eventDrag:d[r],eventResize:u[r],slatCoords:o.slatCoords,eventSelection:o.eventSelection,forPrint:o.forPrint})}))))))},o.prototype.componentDidMount=function(){this.updateCoords()},o.prototype.componentDidUpdate=function(){this.updateCoords()},o.prototype.updateCoords=function(){var e,o=this.props;o.onColCoords&&null!==o.clientWidth&&o.onColCoords(new t.PositionCache(this.rootElRef.current,(e=this.cellElRefs.currentMap,o.cells.map((function(t){return e[t.key]}))),!0,!1))},o}(t.BaseComponent);var P=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.processSlotOptions=t.memoize(T),o.state={slatCoords:null},o.handleScrollRequest=function(e){var t=o.props.onScrollTopRequest,n=o.state.slatCoords;if(t&&n){if(e.time){var r=n.computeTimeTop(e.time);(r=Math.ceil(r))&&(r+=1),t(r)}return!0}return!1},o.handleColCoords=function(e){o.colCoords=e},o.handleSlatCoords=function(e){o.setState({slatCoords:e}),o.props.onSlatCoords&&o.props.onSlatCoords(e)},o}return r(o,e),o.prototype.render=function(){var e=this.props,o=this.state;return t.createElement("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},t.createElement(g,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),t.createElement(N,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:o.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))},o.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},o.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},o.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},o.prototype.positionToHit=function(e,o){var n=this.context,r=n.dateEnv,i=n.options,a=this.colCoords,s=this.props.dateProfile,l=this.state.slatCoords,c=this.processSlotOptions(this.props.slotDuration,i.snapDuration),d=c.snapDuration,u=c.snapsPerSlot,p=a.leftToIndex(e),f=l.positions.topToIndex(o);if(null!=p&&null!=f){var m=l.positions.tops[f],h=l.positions.getHeight(f),g=(o-m)/h,v=f*u+Math.floor(g*u),y=this.props.cells[p].date,E=t.addDurations(s.slotMinTime,t.multiplyDuration(d,v)),S=r.add(y,E);return{col:p,dateSpan:{range:{start:S,end:r.add(S,d)},allDay:!1},dayEl:a.els[p],relativeRect:{left:a.lefts[p],right:a.rights[p],top:m,bottom:m+h}}}return null},o}(t.BaseComponent);function T(e,o){var n=o||e,r=t.wholeDivideDurations(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var H=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.sliceRange=function(e,o){for(var n=[],r=0;r<o.length;r+=1){var i=t.intersectRanges(e,o[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n},o}(t.Slicer),W=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.buildDayRanges=t.memoize(F),o.slicer=new H,o.timeColsRef=t.createRef(),o.handleRootEl=function(e){e?o.context.registerInteractiveComponent(o,{el:e}):o.context.unregisterInteractiveComponent(o)},o}return r(o,e),o.prototype.render=function(){var e=this,o=this.props,n=this.context,r=o.dateProfile,a=o.dayTableModel,s=n.options.nowIndicator,l=this.buildDayRanges(a,r,n.dateEnv);return t.createElement(t.NowTimer,{unit:s?"minute":"day"},(function(c,d){return t.createElement(P,i({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(o,r,null,n,l),{forPrint:o.forPrint,axis:o.axis,dateProfile:r,slatMetas:o.slatMetas,slotDuration:o.slotDuration,cells:a.cells[0],tableColGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,clientWidth:o.clientWidth,clientHeight:o.clientHeight,expandRows:o.expandRows,nowDate:c,nowIndicatorSegs:s&&e.slicer.sliceNowDate(c,n,l),todayRange:d,onScrollTopRequest:o.onScrollTopRequest,onSlatCoords:o.onSlatCoords}))}))},o.prototype.queryHit=function(e,t){var o=this.timeColsRef.current.positionToHit(e,t);return o?{component:this,dateSpan:o.dateSpan,dayEl:o.dayEl,rect:{left:o.relativeRect.left,right:o.relativeRect.right,top:o.relativeRect.top,bottom:o.relativeRect.bottom},layer:0}:null},o}(t.DateComponent);function F(e,t,o){for(var n=[],r=0,i=e.headerDates;r<i.length;r++){var a=i[r];n.push({start:o.add(a,t.slotMinTime),end:o.add(a,t.slotMaxTime)})}return n}var I=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function z(e,o,n,r,i){for(var a=new Date(0),s=e,l=t.createDuration(0),c=n||function(e){var o,n,r;for(o=I.length-1;o>=0;o-=1)if(n=t.createDuration(I[o]),null!==(r=t.wholeDivideDurations(n,e))&&r>1)return n;return e}(r),d=[];t.asRoughMs(s)<t.asRoughMs(o);){var u=i.add(a,s),p=null!==t.wholeDivideDurations(l,c);d.push({date:u,time:s,key:u.toISOString(),isoTimeStr:t.formatIsoTimeString(u),isLabeled:p}),s=t.addDurations(s,r),l=t.addDurations(l,r)}return d}var G=function(e){function n(){var o=null!==e&&e.apply(this,arguments)||this;return o.buildTimeColsModel=t.memoize(O),o.buildSlatMetas=t.memoize(z),o}return r(n,e),n.prototype.render=function(){var e=this,n=this.context,r=n.options,a=n.dateEnv,s=n.dateProfileGenerator,l=this.props,c=l.dateProfile,d=this.buildTimeColsModel(c,s),u=this.allDaySplitter.splitProps(l),p=this.buildSlatMetas(c.slotMinTime,c.slotMaxTime,r.slotLabelInterval,r.slotDuration,a),f=r.dayMinWidth,m=!f,h=f,g=r.dayHeaders&&t.createElement(t.DayHeader,{dates:d.headerDates,dateProfile:c,datesRepDistinctDays:!0,renderIntro:m?this.renderHeadAxis:null}),v=!1!==r.allDaySlot&&function(n){return t.createElement(o.DayTable,i({},u.allDay,{dateProfile:c,dayTableModel:d,nextDayThreshold:r.nextDayThreshold,tableMinWidth:n.tableMinWidth,colGroupNode:n.tableColGroupNode,renderRowIntro:m?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:n.clientWidth,clientHeight:n.clientHeight,forPrint:l.forPrint},e.getAllDayMaxEventProps()))},y=function(o){return t.createElement(W,i({},u.timed,{dayTableModel:d,dateProfile:c,axis:m,slotDuration:r.slotDuration,slatMetas:p,forPrint:l.forPrint,tableColGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,clientWidth:o.clientWidth,clientHeight:o.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:o.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return h?this.renderHScrollLayout(g,v,y,d.colCnt,f,p,this.state.slatCoords):this.renderSimpleLayout(g,v,y)},n}(p);function O(e,o){var n=new t.DaySeriesModel(e.renderRange,o);return new t.DayTableModel(n,!1)}var B={allDaySlot:Boolean},L=t.createPlugin({initialView:"timeGridWeek",optionRefiners:B,views:{timeGrid:{component:G,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});return t.globalPlugins.push(L),e.DayTimeCols=W,e.DayTimeColsSlicer=H,e.DayTimeColsView=G,e.TimeCols=P,e.TimeColsSlatsCoords=m,e.TimeColsView=p,e.buildDayRanges=F,e.buildSlatMetas=z,e.buildTimeColsModel=O,e.default=L,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendarDayGrid);
var FullCalendarTimeGrid=function(e,t,o){"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 o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)};function r(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var i=function(){return(i=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},o.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},o.prototype.getKeysForEventDef=function(e){return e.allDay?t.hasBgRendering(e)?["timed","allDay"]:["allDay"]:["timed"]},o}(t.Splitter),s=t.createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function l(e){var o=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return t.createElement(t.ViewContextType.Consumer,null,(function(n){if(!e.isLabeled)return t.createElement("td",{className:o.join(" "),"data-time":e.isoTimeStr});var r=n.dateEnv,i=n.options,a=n.viewApi,l=null==i.slotLabelFormat?s:Array.isArray(i.slotLabelFormat)?t.createFormatter(i.slotLabelFormat[0]):t.createFormatter(i.slotLabelFormat),d={level:0,time:e.time,date:r.toDate(e.date),view:a,text:r.format(e.date,l)};return t.createElement(t.RenderHook,{hookProps:d,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:c,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,a){return t.createElement("td",{ref:n,className:o.concat(r).join(" "),"data-time":e.isoTimeStr},t.createElement("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},t.createElement("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},a)))}))}))}function c(e){return e.text}var d=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){return this.props.slatMetas.map((function(e){return t.createElement("tr",{key:e.key},t.createElement(l,i({},e)))}))},o}(t.BaseComponent),u=t.createFormatter({week:"short"}),p=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.allDaySplitter=new a,o.headerElRef=t.createRef(),o.rootElRef=t.createRef(),o.scrollerElRef=t.createRef(),o.state={slatCoords:null},o.handleScrollTopRequest=function(e){var t=o.scrollerElRef.current;t&&(t.scrollTop=e)},o.renderHeadAxis=function(e,n){void 0===n&&(n="");var r=o.context.options,a=o.props.dateProfile.renderRange,s=t.diffDays(a.start,a.end),l=r.navLinks&&1===s?{"data-navlink":t.buildNavLinkData(a.start,"week"),tabIndex:0}:{};return r.weekNumbers&&"day"===e?t.createElement(t.WeekNumberRoot,{date:a.start,defaultFormat:u},(function(e,o,r,a){return t.createElement("th",{ref:e,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(o).join(" ")},t.createElement("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:n}},t.createElement("a",i({ref:r,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},l),a)))})):t.createElement("th",{className:"fc-timegrid-axis"},t.createElement("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},o.renderTableRowAxis=function(e){var n=o.context,r=n.options,i=n.viewApi,a={text:r.allDayText,view:i};return t.createElement(t.RenderHook,{hookProps:a,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:f,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(o,n,r,i){return t.createElement("td",{ref:o,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},t.createElement("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},t.createElement("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},o.handleSlatCoords=function(e){o.setState({slatCoords:e})},o}return r(o,e),o.prototype.renderSimpleLayout=function(e,o,n){var r=this.context,i=this.props,a=[],s=t.getStickyHeaderDates(r.options);return e&&a.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),o&&(a.push({type:"body",key:"all-day",chunk:{content:o}}),a.push({type:"body",key:"all-day-divider",outerContent:t.createElement("tr",{className:"fc-scrollgrid-section"},t.createElement("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),a.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),t.createElement(t.ViewRoot,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,o){return t.createElement("div",{className:["fc-timegrid"].concat(o).join(" "),ref:e},t.createElement(t.SimpleScrollGrid,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:a}))}))},o.prototype.renderHScrollLayout=function(e,o,n,r,i,a,s){var l=this,c=this.context.pluginHooks.scrollGridImpl;if(!c)throw new Error("No ScrollGrid implementation");var u=this.context,p=this.props,f=!p.forPrint&&t.getStickyHeaderDates(u.options),m=!p.forPrint&&t.getStickyFooterScrollbar(u.options),h=[];e&&h.push({type:"header",key:"header",isSticky:f,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return t.createElement("tr",null,l.renderHeadAxis("day",e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),o&&(h.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return t.createElement("tr",null,l.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:o}]}),h.push({key:"all-day-divider",type:"body",outerContent:t.createElement("tr",{className:"fc-scrollgrid-section"},t.createElement("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var g=u.options.nowIndicator;return h.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return t.createElement("div",{className:"fc-timegrid-axis-chunk"},t.createElement("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,t.createElement("tbody",null,t.createElement(d,{slatMetas:a}))),t.createElement("div",{className:"fc-timegrid-now-indicator-container"},t.createElement(t.NowTimer,{unit:g?"minute":"day"},(function(e){var o=g&&s&&s.safeComputeTop(e);return"number"==typeof o?t.createElement(t.NowIndicatorRoot,{isAxis:!0,date:e},(function(e,n,r,i){return t.createElement("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:o}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),m&&h.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:t.renderScrollShim},{key:"cols",content:t.renderScrollShim}]}),t.createElement(t.ViewRoot,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,o){return t.createElement("div",{className:["fc-timegrid"].concat(o).join(" "),ref:e},t.createElement(c,{liquid:!p.isHeightAuto&&!p.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:h}))}))},o.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,o=e.dayMaxEventRows;return!0!==t&&!0!==o||(t=void 0,o=5),{dayMaxEvents:t,dayMaxEventRows:o}},o}(t.DateComponent);function f(e){return e.text}var m=function(){function e(e,t,o){this.positions=e,this.dateProfile=t,this.slotDuration=o}return e.prototype.safeComputeTop=function(e){var o=this.dateProfile;if(t.rangeContainsMarker(o.currentRange,e)){var n=t.startOfDay(e),r=e.valueOf()-n.valueOf();if(r>=t.asRoughMs(o.slotMinTime)&&r<t.asRoughMs(o.slotMaxTime))return this.computeTimeTop(t.createDuration(r))}return null},e.prototype.computeDateTop=function(e,o){return o||(o=t.startOfDay(e)),this.computeTimeTop(t.createDuration(e.valueOf()-o.valueOf()))},e.prototype.computeTimeTop=function(e){var o,n,r=this.positions,i=this.dateProfile,a=r.els.length,s=(e.milliseconds-t.asRoughMs(i.slotMinTime))/t.asRoughMs(this.slotDuration);return s=Math.max(0,s),s=Math.min(a,s),o=Math.floor(s),n=s-(o=Math.min(o,a-1)),r.tops[o]+r.getHeight(o)*n},e}(),h=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){var e=this.props,o=this.context,n=o.options,r=e.slatElRefs;return t.createElement("tbody",null,e.slatMetas.map((function(a,s){var c={time:a.time,date:o.dateEnv.toDate(a.date),view:o.viewApi},d=["fc-timegrid-slot","fc-timegrid-slot-lane",a.isLabeled?"":"fc-timegrid-slot-minor"];return t.createElement("tr",{key:a.key,ref:r.createRef(a.key)},e.axis&&t.createElement(l,i({},a)),t.createElement(t.RenderHook,{hookProps:c,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,o,n,r){return t.createElement("td",{ref:e,className:d.concat(o).join(" "),"data-time":a.isoTimeStr},r)})))})))},o}(t.BaseComponent),g=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.rootElRef=t.createRef(),o.slatElRefs=new t.RefMap,o}return r(o,e),o.prototype.render=function(){var e=this.props,o=this.context;return t.createElement("div",{className:"fc-timegrid-slots",ref:this.rootElRef},t.createElement("table",{className:o.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,t.createElement(h,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},o.prototype.componentDidMount=function(){this.updateSizing()},o.prototype.componentDidUpdate=function(){this.updateSizing()},o.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},o.prototype.updateSizing=function(){var e,o=this.context,n=this.props;n.onCoords&&null!==n.clientWidth&&(this.rootElRef.current.offsetHeight&&n.onCoords(new m(new t.PositionCache(this.rootElRef.current,(e=this.slatElRefs.currentMap,n.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,o.options.slotDuration)))},o}(t.BaseComponent);function v(e,t){var o,n=[];for(o=0;o<t;o+=1)n.push([]);if(e)for(o=0;o<e.length;o+=1)n[e[o].col].push(e[o]);return n}function y(e,t){var o=[];if(e){for(a=0;a<t;a+=1)o[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var n=0,r=e.segs;n<r.length;n++){var i=r[n];o[i.col].segs.push(i)}}else for(var a=0;a<t;a+=1)o[a]=null;return o}function E(e,o,n,r,i){return S(e,o,n,r),function(e,o){for(var n=0,r=e;n<r.length;n++){(u=r[n]).level=null,u.forwardCoord=null,u.backwardCoord=null,u.forwardPressure=null}var i,a=function(e){var t,o,n,r=[];for(t=0;t<e.length;t+=1){for(o=e[t],n=0;n<r.length&&C(o,r[n]).length;n+=1);o.level=n,(r[n]||(r[n]=[])).push(o)}return r}(e=t.sortEventSegs(e,o));if(function(e){var t,o,n,r,i;for(t=0;t<e.length;t+=1)for(o=e[t],n=0;n<o.length;n+=1)for((r=o[n]).forwardSegs=[],i=t+1;i<e.length;i+=1)C(r,e[i],r.forwardSegs)}(a),i=a[0]){for(var s=0,l=i;s<l.length;s++){R(u=l[s])}for(var c=0,d=i;c<d.length;c++){var u;w(u=d[c],0,0,o)}}return e}(e,i)}function S(e,t,o,n){for(var r=0,i=e;r<i.length;r++){var a=i[r];a.top=o.computeDateTop(a.start,t),a.bottom=Math.max(a.top+(n||0),o.computeDateTop(a.end,t))}}function C(e,t,o){void 0===o&&(o=[]);for(var n=0;n<t.length;n+=1)r=e,i=t[n],r.bottom>i.top&&r.top<i.bottom&&o.push(t[n]);var r,i;return o}function R(e){var t,o,n=e.forwardSegs,r=0;if(null==e.forwardPressure){for(t=0;t<n.length;t+=1)R(o=n[t]),r=Math.max(r,1+o.forwardPressure);e.forwardPressure=r}}function w(e,o,n,r){var i,a=e.forwardSegs;if(null==e.forwardCoord)for(a.length?(!function(e,o){var n=e.map(b),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(o);n.sort((function(e,o){return t.compareByFieldSpecs(e,o,r)})),n.map((function(e){return e._seg}))}(a,r),w(a[0],o+1,n,r),e.forwardCoord=a[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(o+1),i=0;i<a.length;i+=1)w(a[i],0,e.forwardCoord,r)}function b(e){var o=t.buildSegCompareObj(e);return o.forwardPressure=e.forwardPressure,o.backwardCoord=e.backwardCoord,o}var D=t.createFormatter({hour:"numeric",minute:"2-digit",meridiem:!1}),x=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isCondensed&&e.push("fc-timegrid-event-condensed"),t.createElement(t.StandardEvent,i({},this.props,{defaultTimeFormat:D,extraClassNames:e}))},o}(t.BaseComponent),k=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){var e=this.props;return t.createElement(t.DayCellContent,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,o){return o&&t.createElement("div",{className:"fc-timegrid-col-misc",ref:e},o)}))},o}(t.BaseComponent);t.config.timeGridEventCondensedHeight=30;var M=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.render=function(){var e=this,o=this.props,n=this.context.options.selectMirror,r=o.eventDrag&&o.eventDrag.segs||o.eventResize&&o.eventResize.segs||n&&o.dateSelectionSegs||[],a=o.eventDrag&&o.eventDrag.affectedInstances||o.eventResize&&o.eventResize.affectedInstances||{};return t.createElement(t.DayCellRoot,{elRef:o.elRef,date:o.date,dateProfile:o.dateProfile,todayRange:o.todayRange,extraHookProps:o.extraHookProps},(function(s,l,c){return t.createElement("td",i({ref:s,className:["fc-timegrid-col"].concat(l,o.extraClassNames||[]).join(" ")},c,o.extraDataAttrs),t.createElement("div",{className:"fc-timegrid-col-frame"},t.createElement("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(o.businessHourSegs,"non-business"),e.renderFillSegs(o.bgEventSegs,"bg-event"),e.renderFillSegs(o.dateSelectionSegs,"highlight")),t.createElement("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(o.fgEventSegs,a)),t.createElement("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(r,{},Boolean(o.eventDrag),Boolean(o.eventResize),Boolean(n))),t.createElement("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(o.nowIndicatorSegs)),t.createElement(k,{date:o.date,dateProfile:o.dateProfile,todayRange:o.todayRange,extraHookProps:o.extraHookProps})))}))},o.prototype.renderFgSegs=function(e,t,o,n,r){var i=this.props;return i.forPrint?this.renderPrintFgSegs(e):i.slatCoords?this.renderPositionedFgSegs(e,t,o,n,r):null},o.prototype.renderPrintFgSegs=function(e){var o=this.props,n=this.context;return(e=t.sortEventSegs(e,n.options.eventOrder)).map((function(e){return t.createElement("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},t.createElement(x,i({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},t.getSegMeta(e,o.todayRange,o.nowDate))))}))},o.prototype.renderPositionedFgSegs=function(e,o,n,r,a){var s=this,l=this.context,c=this.props;return(e=E(e,c.date,c.slatCoords,l.options.eventMinHeight,l.options.eventOrder)).map((function(e){var l=e.eventRange.instance.instanceId,d=n||r||a?i({left:0,right:0},s.computeSegTopBottomCss(e)):s.computeFgSegPositionCss(e);return t.createElement("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:l,style:i({visibility:o[l]?"hidden":""},d)},t.createElement(x,i({seg:e,isDragging:n,isResizing:r,isDateSelecting:a,isSelected:l===c.eventSelection,isCondensed:e.bottom-e.top<t.config.timeGridEventCondensedHeight},t.getSegMeta(e,c.todayRange,c.nowDate))))}))},o.prototype.renderFillSegs=function(e,o){var n=this,r=this.context,a=this.props;if(!a.slatCoords)return null;S(e,a.date,a.slatCoords,r.options.eventMinHeight);var s=e.map((function(e){return t.createElement("div",{key:t.buildEventRangeKey(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===o?t.createElement(t.BgEvent,i({seg:e},t.getSegMeta(e,a.todayRange,a.nowDate))):t.renderFill(o))}));return t.createElement(t.Fragment,null,s)},o.prototype.renderNowIndicator=function(e){var o=this.props,n=o.slatCoords,r=o.date;return n?e.map((function(e,o){return t.createElement(t.NowIndicatorRoot,{isAxis:!1,date:r,key:o},(function(o,i,a,s){return t.createElement("div",{ref:o,className:["fc-timegrid-now-indicator-line"].concat(i).join(" "),style:{top:n.computeDateTop(e.start,r)}},s)}))})):null},o.prototype.computeFgSegPositionCss=function(e){var t,o,n=this.context,r=n.isRtl,a=n.options.slotEventOverlap,s=e.backwardCoord,l=e.forwardCoord;a&&(l=Math.min(1,s+2*(l-s))),r?(t=1-l,o=s):(t=s,o=1-l);var c={zIndex:e.level+1,left:100*t+"%",right:100*o+"%"};return a&&e.forwardPressure&&(c[r?"marginLeft":"marginRight"]=20),i(i({},c),this.computeSegTopBottomCss(e))},o.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},o}(t.BaseComponent),P=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.splitFgEventSegs=t.memoize(v),o.splitBgEventSegs=t.memoize(v),o.splitBusinessHourSegs=t.memoize(v),o.splitNowIndicatorSegs=t.memoize(v),o.splitDateSelectionSegs=t.memoize(v),o.splitEventDrag=t.memoize(y),o.splitEventResize=t.memoize(y),o.rootElRef=t.createRef(),o.cellElRefs=new t.RefMap,o}return r(o,e),o.prototype.render=function(){var e=this,o=this.props,n=this.context.options.nowIndicator&&o.slatCoords&&o.slatCoords.safeComputeTop(o.nowDate),r=o.cells.length,i=this.splitFgEventSegs(o.fgEventSegs,r),a=this.splitBgEventSegs(o.bgEventSegs,r),s=this.splitBusinessHourSegs(o.businessHourSegs,r),l=this.splitNowIndicatorSegs(o.nowIndicatorSegs,r),c=this.splitDateSelectionSegs(o.dateSelectionSegs,r),d=this.splitEventDrag(o.eventDrag,r),u=this.splitEventResize(o.eventResize,r);return t.createElement("div",{className:"fc-timegrid-cols",ref:this.rootElRef},t.createElement("table",{style:{minWidth:o.tableMinWidth,width:o.clientWidth}},o.tableColGroupNode,t.createElement("tbody",null,t.createElement("tr",null,o.axis&&t.createElement("td",{className:"fc-timegrid-col fc-timegrid-axis"},t.createElement("div",{className:"fc-timegrid-col-frame"},t.createElement("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&t.createElement(t.NowIndicatorRoot,{isAxis:!0,date:o.nowDate},(function(e,o,r,i){return t.createElement("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(o).join(" "),style:{top:n}},i)}))))),o.cells.map((function(n,r){return t.createElement(M,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:o.dateProfile,date:n.date,nowDate:o.nowDate,todayRange:o.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,fgEventSegs:i[r],bgEventSegs:a[r],businessHourSegs:s[r],nowIndicatorSegs:l[r],dateSelectionSegs:c[r],eventDrag:d[r],eventResize:u[r],slatCoords:o.slatCoords,eventSelection:o.eventSelection,forPrint:o.forPrint})}))))))},o.prototype.componentDidMount=function(){this.updateCoords()},o.prototype.componentDidUpdate=function(){this.updateCoords()},o.prototype.updateCoords=function(){var e,o=this.props;o.onColCoords&&null!==o.clientWidth&&o.onColCoords(new t.PositionCache(this.rootElRef.current,(e=this.cellElRefs.currentMap,o.cells.map((function(t){return e[t.key]}))),!0,!1))},o}(t.BaseComponent);var N=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.processSlotOptions=t.memoize(T),o.state={slatCoords:null},o.handleScrollRequest=function(e){var t=o.props.onScrollTopRequest,n=o.state.slatCoords;if(t&&n){if(e.time){var r=n.computeTimeTop(e.time);(r=Math.ceil(r))&&(r+=1),t(r)}return!0}return!1},o.handleColCoords=function(e){o.colCoords=e},o.handleSlatCoords=function(e){o.setState({slatCoords:e}),o.props.onSlatCoords&&o.props.onSlatCoords(e)},o}return r(o,e),o.prototype.render=function(){var e=this.props,o=this.state;return t.createElement("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},t.createElement(g,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),t.createElement(P,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:o.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))},o.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},o.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},o.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},o.prototype.positionToHit=function(e,o){var n=this.context,r=n.dateEnv,i=n.options,a=this.colCoords,s=this.props.dateProfile,l=this.state.slatCoords,c=this.processSlotOptions(this.props.slotDuration,i.snapDuration),d=c.snapDuration,u=c.snapsPerSlot,p=a.leftToIndex(e),f=l.positions.topToIndex(o);if(null!=p&&null!=f){var m=l.positions.tops[f],h=l.positions.getHeight(f),g=(o-m)/h,v=f*u+Math.floor(g*u),y=this.props.cells[p].date,E=t.addDurations(s.slotMinTime,t.multiplyDuration(d,v)),S=r.add(y,E);return{col:p,dateSpan:{range:{start:S,end:r.add(S,d)},allDay:!1},dayEl:a.els[p],relativeRect:{left:a.lefts[p],right:a.rights[p],top:m,bottom:m+h}}}return null},o}(t.BaseComponent);function T(e,o){var n=o||e,r=t.wholeDivideDurations(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var H=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return r(o,e),o.prototype.sliceRange=function(e,o){for(var n=[],r=0;r<o.length;r+=1){var i=t.intersectRanges(e,o[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n},o}(t.Slicer),W=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.buildDayRanges=t.memoize(F),o.slicer=new H,o.timeColsRef=t.createRef(),o.handleRootEl=function(e){e?o.context.registerInteractiveComponent(o,{el:e}):o.context.unregisterInteractiveComponent(o)},o}return r(o,e),o.prototype.render=function(){var e=this,o=this.props,n=this.context,r=o.dateProfile,a=o.dayTableModel,s=n.options.nowIndicator,l=this.buildDayRanges(a,r,n.dateEnv);return t.createElement(t.NowTimer,{unit:s?"minute":"day"},(function(c,d){return t.createElement(N,i({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(o,r,null,n,l),{forPrint:o.forPrint,axis:o.axis,dateProfile:r,slatMetas:o.slatMetas,slotDuration:o.slotDuration,cells:a.cells[0],tableColGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,clientWidth:o.clientWidth,clientHeight:o.clientHeight,expandRows:o.expandRows,nowDate:c,nowIndicatorSegs:s&&e.slicer.sliceNowDate(c,n,l),todayRange:d,onScrollTopRequest:o.onScrollTopRequest,onSlatCoords:o.onSlatCoords}))}))},o.prototype.queryHit=function(e,t){var o=this.timeColsRef.current.positionToHit(e,t);return o?{component:this,dateSpan:o.dateSpan,dayEl:o.dayEl,rect:{left:o.relativeRect.left,right:o.relativeRect.right,top:o.relativeRect.top,bottom:o.relativeRect.bottom},layer:0}:null},o}(t.DateComponent);function F(e,t,o){for(var n=[],r=0,i=e.headerDates;r<i.length;r++){var a=i[r];n.push({start:o.add(a,t.slotMinTime),end:o.add(a,t.slotMaxTime)})}return n}var I=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function z(e,o,n,r,i){for(var a=new Date(0),s=e,l=t.createDuration(0),c=n||function(e){var o,n,r;for(o=I.length-1;o>=0;o-=1)if(n=t.createDuration(I[o]),null!==(r=t.wholeDivideDurations(n,e))&&r>1)return n;return e}(r),d=[];t.asRoughMs(s)<t.asRoughMs(o);){var u=i.add(a,s),p=null!==t.wholeDivideDurations(l,c);d.push({date:u,time:s,key:u.toISOString(),isoTimeStr:t.formatIsoTimeString(u),isLabeled:p}),s=t.addDurations(s,r),l=t.addDurations(l,r)}return d}var G=function(e){function n(){var o=null!==e&&e.apply(this,arguments)||this;return o.buildTimeColsModel=t.memoize(O),o.buildSlatMetas=t.memoize(z),o}return r(n,e),n.prototype.render=function(){var e=this,n=this.context,r=n.options,a=n.dateEnv,s=n.dateProfileGenerator,l=this.props,c=l.dateProfile,d=this.buildTimeColsModel(c,s),u=this.allDaySplitter.splitProps(l),p=this.buildSlatMetas(c.slotMinTime,c.slotMaxTime,r.slotLabelInterval,r.slotDuration,a),f=r.dayMinWidth,m=!f,h=f,g=r.dayHeaders&&t.createElement(t.DayHeader,{dates:d.headerDates,dateProfile:c,datesRepDistinctDays:!0,renderIntro:m?this.renderHeadAxis:null}),v=!1!==r.allDaySlot&&function(n){return t.createElement(o.DayTable,i({},u.allDay,{dateProfile:c,dayTableModel:d,nextDayThreshold:r.nextDayThreshold,tableMinWidth:n.tableMinWidth,colGroupNode:n.tableColGroupNode,renderRowIntro:m?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:n.clientWidth,clientHeight:n.clientHeight,forPrint:l.forPrint},e.getAllDayMaxEventProps()))},y=function(o){return t.createElement(W,i({},u.timed,{dayTableModel:d,dateProfile:c,axis:m,slotDuration:r.slotDuration,slatMetas:p,forPrint:l.forPrint,tableColGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,clientWidth:o.clientWidth,clientHeight:o.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:o.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return h?this.renderHScrollLayout(g,v,y,d.colCnt,f,p,this.state.slatCoords):this.renderSimpleLayout(g,v,y)},n}(p);function O(e,o){var n=new t.DaySeriesModel(e.renderRange,o);return new t.DayTableModel(n,!1)}var B={allDaySlot:Boolean},L=t.createPlugin({initialView:"timeGridWeek",optionRefiners:B,views:{timeGrid:{component:G,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});return t.globalPlugins.push(L),e.DayTimeCols=W,e.DayTimeColsSlicer=H,e.DayTimeColsView=G,e.TimeCols=N,e.TimeColsSlatsCoords=m,e.TimeColsView=p,e.buildDayRanges=F,e.buildSlatMetas=z,e.buildTimeColsModel=O,e.default=L,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendarDayGrid);
/*!
FullCalendar v5.5.1
FullCalendar v5.6.0
Docs & License: https://fullcalendar.io/

@@ -198,3 +198,3 @@ (c) 2020 Adam Shaw

return (createElement(ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function (rootElRef, classNames) { return (createElement("div", { className: ['fc-timegrid'].concat(classNames).join(' '), ref: rootElRef },
createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, cols: [{ width: 'shrink' }], sections: sections }))); }));
createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [{ width: 'shrink' }], sections: sections }))); }));
};

@@ -307,3 +307,3 @@ TimeColsView.prototype.renderHScrollLayout = function (headerRowContent, allDayContent, timeContent, colCnt, dayMinWidth, slatMetas, slatCoords) {

return (createElement(ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function (rootElRef, classNames) { return (createElement("div", { className: ['fc-timegrid'].concat(classNames).join(' '), ref: rootElRef },
createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, colGroups: [
createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: false, colGroups: [
{ width: 'shrink', cols: [{ width: 'shrink' }] },

@@ -310,0 +310,0 @@ { cols: [{ span: colCnt, minWidth: dayMinWidth }] },

{
"name": "@fullcalendar/timegrid",
"version": "5.5.1",
"version": "5.6.0",
"title": "FullCalendar Time Grid Plugin",

@@ -8,4 +8,4 @@ "description": "Display your events on a grid of time slots",

"dependencies": {
"@fullcalendar/common": "~5.5.0",
"@fullcalendar/daygrid": "~5.5.0",
"@fullcalendar/common": "~5.6.0",
"@fullcalendar/daygrid": "~5.6.0",
"tslib": "^2.0.3"

@@ -32,4 +32,4 @@ },

"devDependencies": {
"@fullcalendar/core-preact": "5.5.0"
"@fullcalendar/core-preact": "5.6.0"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc