@fullcalendar/timeline 6.0.0-beta.2 → 6.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var index_cjs = require('@fullcalendar/core/index.cjs');
6
6
  var premiumCommonPlugin = require('@fullcalendar/premium-common/index.cjs');
7
7
  var internalCommon = require('./internal.cjs');
8
- require('@fullcalendar/scrollgrid/index.cjs');
9
8
  var internal_cjs = require('@fullcalendar/core/internal.cjs');
10
9
  require('@fullcalendar/core/preact.cjs');
11
10
  require('@fullcalendar/scrollgrid/internal.cjs');
@@ -19,7 +18,7 @@ internal_cjs.injectStyles(css_248z);
19
18
 
20
19
  var index = index_cjs.createPlugin({
21
20
  name: '@fullcalendar/timeline',
22
- premiumReleaseDate: '2022-11-22',
21
+ premiumReleaseDate: '2022-12-07',
23
22
  deps: [premiumCommonPlugin__default["default"]],
24
23
  initialView: 'timelineDay',
25
24
  views: {
package/index.global.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar Timeline Plugin v6.0.0-beta.2
2
+ FullCalendar Timeline Plugin v6.0.0-beta.4
3
3
  Docs & License: https://fullcalendar.io/premium
4
4
  (c) 2022 Adam Shaw
5
5
  */
@@ -1241,7 +1241,7 @@ FullCalendar.Timeline = (function (exports, internal$1, core, premiumCommonPlugi
1241
1241
 
1242
1242
  var plugin = core.createPlugin({
1243
1243
  name: '@fullcalendar/timeline',
1244
- premiumReleaseDate: '2022-11-22',
1244
+ premiumReleaseDate: '2022-12-07',
1245
1245
  deps: [premiumCommonPlugin__default["default"]],
1246
1246
  initialView: 'timelineDay',
1247
1247
  views: {
@@ -1,6 +1,6 @@
1
1
  /*!
2
- FullCalendar Timeline Plugin v6.0.0-beta.2
2
+ FullCalendar Timeline Plugin v6.0.0-beta.4
3
3
  Docs & License: https://fullcalendar.io/premium
4
4
  (c) 2022 Adam Shaw
5
5
  */
6
- FullCalendar.Timeline=function(e,t,n,i,o,r){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}var a=l(i);t.config.MAX_TIMELINE_SLOTS=1e3;const s=[{years:1},{months:1},{days:1},{hours:1},{minutes:30},{minutes:15},{minutes:10},{minutes:5},{minutes:1},{seconds:30},{seconds:15},{seconds:10},{seconds:5},{seconds:1},{milliseconds:500},{milliseconds:100},{milliseconds:10},{milliseconds:1}];function c(e,n,i,o){let r={labelInterval:i.slotLabelInterval,slotDuration:i.slotDuration};!function(e,n,i){const{currentRange:o}=n;if(e.labelInterval){i.countDurationsBetween(o.start,o.end,e.labelInterval)>t.config.MAX_TIMELINE_SLOTS&&(console.warn("slotLabelInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){i.countDurationsBetween(o.start,o.end,e.slotDuration)>t.config.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){const n=t.wholeDivideDurations(e.labelInterval,e.slotDuration);(null===n||n<1)&&(console.warn("slotLabelInterval must be a multiple of slotDuration"),e.slotDuration=null)}}(r,e,n),h(r,e,n),function(e,n,i){const{currentRange:o}=n;let{slotDuration:r}=e;if(!r){const l=h(e,n,i);for(let e of s){const n=t.createDuration(e),i=t.wholeDivideDurations(l,n);if(null!==i&&i>1&&i<=6){r=n;break}}if(r){i.countDurationsBetween(o.start,o.end,r)>200&&(r=null)}r||(r=l),e.slotDuration=r}}(r,e,n);let l=i.slotLabelFormat,a=Array.isArray(l)?l:null!=l?[l]:function(e,n,i,o){let r,l;const{labelInterval:a}=e;let s=t.greatestDurationDenominator(a).unit;const c=o.weekNumbers;let d=r=l=null;"week"!==s||c||(s="day");switch(s){case"year":d={year:"numeric"};break;case"month":f("years",n,i)>1&&(d={year:"numeric"}),r={month:"short"};break;case"week":f("years",n,i)>1&&(d={year:"numeric"}),r={week:"narrow"};break;case"day":f("years",n,i)>1?d={year:"numeric",month:"long"}:f("months",n,i)>1&&(d={month:"long"}),c&&(r={week:"short"}),l={weekday:"narrow",day:"numeric"};break;case"hour":c&&(d={week:"short"}),f("days",n,i)>1&&(r={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),l={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":t.asRoughMinutes(a)/60>=6?(d={hour:"numeric",meridiem:"short"},r=e=>":"+t.padStart(e.date.minute,2)):d={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":t.asRoughSeconds(a)/60>=6?(d={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},r=e=>":"+t.padStart(e.date.second,2)):d={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"};break;case"millisecond":d={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"},r=e=>"."+t.padStart(e.millisecond,3)}return[].concat(d||[],r||[],l||[])}(r,e,n,i);r.headerFormats=a.map(e=>t.createFormatter(e)),r.isTimeScale=Boolean(r.slotDuration.milliseconds);let c=null;if(!r.isTimeScale){const e=t.greatestDurationDenominator(r.slotDuration).unit;/year|month|week/.test(e)&&(c=e)}r.largeUnit=c,r.emphasizeWeeks=1===t.asCleanDays(r.slotDuration)&&f("weeks",e,n)>=2&&!i.businessHours;let g,p,v=i.snapDuration;v&&(g=t.createDuration(v),p=t.wholeDivideDurations(r.slotDuration,g)),null==p&&(g=r.slotDuration,p=1),r.snapDuration=g,r.snapsPerSlot=p;let D=t.asRoughMs(e.slotMaxTime)-t.asRoughMs(e.slotMinTime),S=d(e.renderRange.start,r,n),b=d(e.renderRange.end,r,n);r.isTimeScale&&(S=n.add(S,e.slotMinTime),b=n.add(t.addDays(b,-1),e.slotMaxTime)),r.timeWindowMs=D,r.normalizedRange={start:S,end:b};let w=[],y=S;for(;y<b;)m(y,r,e,o)&&w.push(y),y=n.add(y,r.slotDuration);r.slotDates=w;let C=-1,R=0;const E=[],x=[];for(y=S;y<b;)m(y,r,e,o)?(C+=1,E.push(C),x.push(R)):E.push(C+.5),y=n.add(y,r.snapDuration),R+=1;return r.snapDiffToIndex=E,r.snapIndexToDiff=x,r.snapCnt=C+1,r.slotCnt=r.snapCnt/r.snapsPerSlot,r.isWeekStarts=function(e,t){let{slotDates:n,emphasizeWeeks:i}=e,o=null,r=[];for(let e of n){let n=t.computeWeekNumber(e),l=i&&null!==o&&o!==n;o=n,r.push(l)}return r}(r,n),r.cellRows=function(e,n){let i=e.slotDates,o=e.headerFormats,r=o.map(()=>[]),l=t.asCleanDays(e.slotDuration),a=7===l?"week":1===l?"day":null,s=o.map(e=>e.getLargestUnit?e.getLargestUnit():null);for(let l=0;l<i.length;l+=1){let c=i[l],d=e.isWeekStarts[l];for(let i=0;i<o.length;i+=1){let l=o[i],m=r[i],h=m[m.length-1],f=i===o.length-1,g=o.length>1&&!f,p=null,v=s[i]||(f?a:null);if(g){let e=n.format(c,l);h&&h.text===e?h.colspan+=1:p=u(c,e,v)}else if(!h||t.isInt(n.countDurationsBetween(e.normalizedRange.start,c,e.labelInterval))){let e=n.format(c,l);p=u(c,e,v)}else h.colspan+=1;p&&(p.weekStart=d,m.push(p))}}return r}(r,n),r.slotsPerLabel=t.wholeDivideDurations(r.labelInterval,r.slotDuration),r}function d(e,n,i){let o=e;return n.isTimeScale||(o=t.startOfDay(o),n.largeUnit&&(o=i.startOf(o,n.largeUnit))),o}function m(e,n,i,o){if(o.isHiddenDay(e))return!1;if(n.isTimeScale){let o=t.startOfDay(e),r=e.valueOf()-o.valueOf()-t.asRoughMs(i.slotMinTime);return r=(r%864e5+864e5)%864e5,r<n.timeWindowMs}return!0}function h(e,n,i){const{currentRange:o}=n;let{labelInterval:r}=e;if(!r){let n;if(e.slotDuration){for(n of s){const i=t.createDuration(n),o=t.wholeDivideDurations(i,e.slotDuration);if(null!==o&&o<=6){r=i;break}}r||(r=e.slotDuration)}else for(n of s){r=t.createDuration(n);if(i.countDurationsBetween(o.start,o.end,r)>=18)break}e.labelInterval=r}return r}function f(e,n,i){let o=n.currentRange,r=null;return"years"===e?r=i.diffWholeYears(o.start,o.end):"months"===e||"weeks"===e?r=i.diffWholeMonths(o.start,o.end):"days"===e&&(r=t.diffWholeDays(o.start,o.end)),r||0}function u(e,t,n){return{date:e,text:t,rowUnit:n,colspan:1,isWeekStart:!1}}class g extends t.BaseComponent{constructor(){super(...arguments),this.refineRenderProps=t.memoizeObjArg(D),this.buildCellNavLinkAttrs=t.memoize(p)}render(){let{props:e,context:n}=this,{dateEnv:i,options:r}=n,{cell:l,dateProfile:a,tDateProfile:s}=e,c=t.getDateMeta(l.date,e.todayRange,e.nowDate,a),d=this.refineRenderProps({level:e.rowLevel,dateMarker:l.date,text:l.text,dateEnv:n.dateEnv,viewApi:n.viewApi});return o.createElement(t.ContentContainer,{elTag:"th",elClasses:["fc-timeline-slot","fc-timeline-slot-label",l.isWeekStart&&"fc-timeline-slot-em",..."time"===l.rowUnit?t.getSlotClassNames(c,n.theme):t.getDayClassNames(c,n.theme)],elAttrs:{colSpan:l.colspan,"data-date":i.formatIso(l.date,{omitTime:!s.isTimeScale,omitTimeZoneOffset:!0})},renderProps:d,generatorName:"slotLabelContent",generator:r.slotLabelContent||v,classNameGenerator:r.slotLabelClassNames,didMount:r.slotLabelDidMount,willUnmount:r.slotLabelWillUnmount},t=>o.createElement("div",{className:"fc-timeline-slot-frame",style:{height:e.rowInnerHeight}},o.createElement(t,{elTag:"a",elClasses:["fc-timeline-slot-cushion","fc-scrollgrid-sync-inner",e.isSticky&&"fc-sticky"],elAttrs:this.buildCellNavLinkAttrs(n,l.date,l.rowUnit)})))}}function p(e,n,i){return i&&"time"!==i?t.buildNavLinkAttrs(e,n,i):{}}function v(e){return e.text}function D(e){return{level:e.level,date:e.dateEnv.toDate(e.dateMarker),view:e.viewApi,text:e.text}}class S extends t.BaseComponent{render(){let{dateProfile:e,tDateProfile:t,rowInnerHeights:n,todayRange:i,nowDate:r}=this.props,{cellRows:l}=t;return o.createElement(o.Fragment,null,l.map((a,s)=>{let c=s===l.length-1,d=["fc-timeline-header-row",t.isTimeScale&&c?"fc-timeline-header-row-chrono":""];return o.createElement("tr",{key:s,className:d.join(" ")},a.map(l=>o.createElement(g,{key:l.date.toISOString(),cell:l,rowLevel:s,dateProfile:e,tDateProfile:t,todayRange:i,nowDate:r,rowInnerHeight:n&&n[s],isSticky:!c})))}))}}class b{constructor(e,n,i,o,r,l){this.slatRootEl=e,this.dateProfile=i,this.tDateProfile=o,this.dateEnv=r,this.isRtl=l,this.outerCoordCache=new t.PositionCache(e,n,!0,!1),this.innerCoordCache=new t.PositionCache(e,t.findDirectChildren(n,"div"),!0,!1)}isDateInRange(e){return t.rangeContainsMarker(this.dateProfile.currentRange,e)}dateToCoord(e){let{tDateProfile:t}=this,n=this.computeDateSnapCoverage(e)/t.snapsPerSlot,i=Math.floor(n);i=Math.min(i,t.slotCnt-1);let o=n-i,{innerCoordCache:r,outerCoordCache:l}=this;return this.isRtl?l.originClientRect.width-(l.rights[i]-r.getWidth(i)*o):l.lefts[i]+r.getWidth(i)*o}rangeToCoords(e){return{start:this.dateToCoord(e.start),end:this.dateToCoord(e.end)}}durationToCoord(e){let{dateProfile:n,tDateProfile:i,dateEnv:o,isRtl:r}=this,l=0;if(n){let a=o.add(n.activeRange.start,e);i.isTimeScale||(a=t.startOfDay(a)),l=this.dateToCoord(a),!r&&l&&(l+=1)}return l}coordFromLeft(e){return this.isRtl?this.outerCoordCache.originClientRect.width-e:e}computeDateSnapCoverage(e){return w(e,this.tDateProfile,this.dateEnv)}}function w(e,n,i){let o=i.countDurationsBetween(n.normalizedRange.start,e,n.snapDuration);if(o<0)return 0;if(o>=n.snapDiffToIndex.length)return n.snapCnt;let r=Math.floor(o),l=n.snapDiffToIndex[r];return t.isInt(l)?l+=o-r:l=Math.ceil(l),l}function y(e,t){return null===e?{left:"",right:""}:t?{right:e,left:""}:{left:e,right:""}}function C(e,t){return e?t?{right:e.start,left:-e.end}:{left:e.start,right:-e.end}:{left:"",right:""}}class R extends t.BaseComponent{constructor(){super(...arguments),this.rootElRef=o.createRef()}render(){let{props:e,context:n}=this,i=t.greatestDurationDenominator(e.tDateProfile.slotDuration).unit,r=e.slatCoords&&e.slatCoords.dateProfile===e.dateProfile?e.slatCoords:null;return o.createElement(t.NowTimer,{unit:i},(i,l)=>o.createElement("div",{className:"fc-timeline-header",ref:this.rootElRef},o.createElement("table",{"aria-hidden":!0,className:"fc-scrollgrid-sync-table",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,o.createElement("tbody",null,o.createElement(S,{dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:i,todayRange:l,rowInnerHeights:e.rowInnerHeights}))),n.options.nowIndicator&&o.createElement("div",{className:"fc-timeline-now-indicator-container"},r&&r.isDateInRange(i)&&o.createElement(t.NowIndicatorContainer,{elClasses:["fc-timeline-now-indicator-arrow"],elStyle:y(r.dateToCoord(i),n.isRtl),isAxis:!0,date:i}))))}componentDidMount(){this.updateSize()}componentDidUpdate(){this.updateSize()}updateSize(){this.props.onMaxCushionWidth&&this.props.onMaxCushionWidth(this.computeMaxCushionWidth())}computeMaxCushionWidth(){return Math.max(...t.findElements(this.rootElRef.current,".fc-timeline-header-row:last-child .fc-timeline-slot-cushion").map(e=>e.getBoundingClientRect().width))}}class E extends t.BaseComponent{render(){let{props:e,context:n}=this,{dateEnv:i,options:r,theme:l}=n,{date:a,tDateProfile:s,isEm:c}=e,d=t.getDateMeta(e.date,e.todayRange,e.nowDate,e.dateProfile),m=Object.assign(Object.assign({date:i.toDate(e.date)},d),{view:n.viewApi});return o.createElement(t.ContentContainer,{elTag:"td",elRef:e.elRef,elClasses:["fc-timeline-slot","fc-timeline-slot-lane",c&&"fc-timeline-slot-em",s.isTimeScale?t.isInt(i.countDurationsBetween(s.normalizedRange.start,e.date,s.labelInterval))?"fc-timeline-slot-major":"fc-timeline-slot-minor":"",...e.isDay?t.getDayClassNames(d,l):t.getSlotClassNames(d,l)],elAttrs:{"data-date":i.formatIso(a,{omitTimeZoneOffset:!0,omitTime:!s.isTimeScale})},renderProps:m,generatorName:"slotLaneContent",generator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount},e=>o.createElement(e,{elTag:"div"}))}}class x extends t.BaseComponent{render(){let{props:e}=this,{tDateProfile:t,cellElRefs:n}=e,{slotDates:i,isWeekStarts:r}=t,l=!t.isTimeScale&&!t.largeUnit;return o.createElement("tbody",null,o.createElement("tr",null,i.map((i,a)=>{let s=i.toISOString();return o.createElement(E,{key:s,elRef:n.createRef(s),date:i,dateProfile:e.dateProfile,tDateProfile:t,nowDate:e.nowDate,todayRange:e.todayRange,isEm:r[a],isDay:l})})))}}class k extends t.BaseComponent{constructor(){super(...arguments),this.rootElRef=o.createRef(),this.cellElRefs=new t.RefMap,this.handleScrollRequest=e=>{let{onScrollLeftRequest:t}=this.props,{coords:n}=this;if(t&&n){if(e.time){t(n.coordFromLeft(n.durationToCoord(e.time)))}return!0}return null}}render(){let{props:e,context:t}=this;return o.createElement("div",{className:"fc-timeline-slots",ref:this.rootElRef},o.createElement("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,o.createElement(x,{cellElRefs:this.cellElRefs,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange})))}componentDidMount(){this.updateSizing(),this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.updateSizing(),this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach(),this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{props:e,context:t}=this;if(null!==e.clientWidth&&this.scrollResponder){this.rootElRef.current.offsetWidth&&(this.coords=new b(this.rootElRef.current,(n=this.cellElRefs.currentMap,e.tDateProfile.slotDates.map(e=>{let t=e.toISOString();return n[t]})),e.dateProfile,e.tDateProfile,t.dateEnv,t.isRtl),e.onCoords&&e.onCoords(this.coords),this.scrollResponder.update(!1))}var n}positionToHit(e){let{outerCoordCache:n}=this.coords,{dateEnv:i,isRtl:o}=this.context,{tDateProfile:r}=this.props,l=n.leftToIndex(e);if(null!=l){let a=n.getWidth(l),s=o?(n.rights[l]-e)/a:(e-n.lefts[l])/a,c=Math.floor(s*r.snapsPerSlot),d=i.add(r.slotDates[l],t.multiplyDuration(r.snapDuration,c));return{dateSpan:{range:{start:d,end:i.add(d,r.snapDuration)},allDay:!this.props.tDateProfile.isTimeScale},dayEl:this.cellElRefs.currentMap[l],left:n.lefts[l],right:n.rights[l]}}return null}}function T(e,t,n){let i=[];if(n)for(let o of e){let e=n.rangeToCoords(o),r=Math.round(e.start),l=Math.round(e.end);l-r<t&&(l=r+t),i.push({start:r,end:l})}return i}class P extends t.BaseComponent{render(){let{props:e}=this,t=[].concat(e.eventResizeSegs,e.dateSelectionSegs);return e.timelineCoords&&o.createElement("div",{className:"fc-timeline-bg"},this.renderSegs(e.businessHourSegs||[],e.timelineCoords,"non-business"),this.renderSegs(e.bgEventSegs||[],e.timelineCoords,"bg-event"),this.renderSegs(t,e.timelineCoords,"highlight"))}renderSegs(e,n,i){let{todayRange:r,nowDate:l}=this.props,{isRtl:a}=this.context,s=T(e,0,n),c=e.map((e,n)=>{let c=C(s[n],a);return o.createElement("div",{key:t.buildEventRangeKey(e.eventRange),className:"fc-timeline-bg-harness",style:c},"bg-event"===i?o.createElement(t.BgEvent,Object.assign({seg:e},t.getSegMeta(e,r,l))):t.renderFill(i))});return o.createElement(o.Fragment,null,c)}}class M extends t.Slicer{sliceRange(e,n,i,o,r){let l=function(e,n,i){if(!n.isTimeScale&&(e=t.computeVisibleDayRange(e),n.largeUnit)){let t=e;((e={start:i.startOf(e.start,n.largeUnit),end:i.startOf(e.end,n.largeUnit)}).end.valueOf()!==t.end.valueOf()||e.end<=e.start)&&(e={start:e.start,end:i.add(e.end,n.slotDuration)})}return e}(e,o,r),a=[];if(w(l.start,o,r)<w(l.end,o,r)){let e=t.intersectRanges(l,o.normalizedRange);e&&a.push({start:e.start,end:e.end,isStart:e.start.valueOf()===l.start.valueOf()&&m(e.start,o,n,i),isEnd:e.end.valueOf()===l.end.valueOf()&&m(t.addMs(e.end,-1),o,n,i)})}return a}}const I=t.createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});class W extends t.BaseComponent{render(){let{props:e}=this;return o.createElement(t.StandardEvent,Object.assign({},e,{elClasses:["fc-timeline-event","fc-h-event"],defaultTimeFormat:I,defaultDisplayEventTime:!e.isTimeScale}))}}class O extends t.BaseComponent{render(){let{props:e,context:n}=this,{hiddenSegs:i,placement:r,resourceId:l}=e,{top:a,hcoords:s}=r,c=s&&null!==a,d=C(s,n.isRtl),m=l?{resourceId:l}:{};return o.createElement(t.MoreLinkContainer,{elRef:e.elRef,elClasses:["fc-timeline-more-link"],elStyle:Object.assign({visibility:c?"":"hidden",top:a||0},d),allDayDate:null,moreCnt:i.length,allSegs:i,hiddenSegs:i,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:m,popoverContent:()=>o.createElement(o.Fragment,null,i.map(n=>{let i=n.eventRange.instance.instanceId;return o.createElement("div",{key:i,style:{visibility:e.isForcedInvisible[i]?"hidden":""}},o.createElement(W,Object.assign({isTimeScale:e.isTimeScale,seg:n,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:i===e.eventSelection},t.getSegMeta(n,e.todayRange,e.nowDate))))}))},e=>o.createElement(e,{elTag:"div",elClasses:["fc-timeline-more-link-inner","fc-sticky"]}))}}class z extends t.BaseComponent{constructor(){super(...arguments),this.slicer=new M,this.sortEventSegs=t.memoize(t.sortEventSegs),this.harnessElRefs=new t.RefMap,this.moreElRefs=new t.RefMap,this.innerElRef=o.createRef(),this.state={eventInstanceHeights:{},moreLinkHeights:{}}}render(){let{props:e,state:n,context:i}=this,{options:r}=i,{dateProfile:l,tDateProfile:a}=e,s=this.slicer.sliceProps(e,l,a.isTimeScale?null:e.nextDayThreshold,i,l,i.dateProfileGenerator,a,i.dateEnv),c=(s.eventDrag?s.eventDrag.segs:null)||(s.eventResize?s.eventResize.segs:null)||[],d=this.sortEventSegs(s.fgEventSegs,r.eventOrder),m=T(d,r.eventMinWidth,e.timelineCoords),[h,f]=function(e,n,i,o,r,l){let a=[],s=[];for(let t=0;t<e.length;t+=1){let o=e[t],r=i[o.eventRange.instance.instanceId],l=n[t];r&&l?a.push({index:t,span:l,thickness:r}):s.push({seg:o,hcoords:l,top:null})}let c=new t.SegHierarchy;null!=r&&(c.strictOrder=r),null!=l&&(c.maxStackCnt=l);let d=c.addSegs(a),m=d.map(t=>({seg:e[t.index],hcoords:t.span,top:null})),h=t.groupIntersectingEntries(d),f=[],u=[];const g=t=>e[t.index];for(let n=0;n<h.length;n+=1){let i=h[n],r=i.entries.map(g),l=o[t.buildIsoString(t.computeEarliestSegStart(r))];null!=l?f.push({index:e.length+n,thickness:l,span:i.span}):u.push({seg:r,hcoords:i.span,top:null})}c.maxStackCnt=-1,c.addSegs(f);let p=c.toRects(),v=[],D=0;for(let t of p){let n=t.index;v.push({seg:n<e.length?e[n]:h[n-e.length].entries.map(g),hcoords:t.span,top:t.levelCoord}),D=Math.max(D,t.levelCoord+t.thickness)}return[v.concat(s,m,u),D]}(d,m,n.eventInstanceHeights,n.moreLinkHeights,r.eventOrderStrict,r.eventMaxStack),u=(s.eventDrag?s.eventDrag.affectedInstances:null)||(s.eventResize?s.eventResize.affectedInstances:null)||{};return o.createElement(o.Fragment,null,o.createElement(P,{businessHourSegs:s.businessHourSegs,bgEventSegs:s.bgEventSegs,timelineCoords:e.timelineCoords,eventResizeSegs:s.eventResize?s.eventResize.segs:[],dateSelectionSegs:s.dateSelectionSegs,nowDate:e.nowDate,todayRange:e.todayRange}),o.createElement("div",{className:"fc-timeline-events fc-scrollgrid-sync-inner",ref:this.innerElRef,style:{height:f}},this.renderFgSegs(h,u,!1,!1,!1),this.renderFgSegs(function(e,t,n){if(!e.length||!t)return[];let i=function(e){let t={};for(let n of e){let{seg:e}=n;Array.isArray(e)||(t[e.eventRange.instance.instanceId]=n.top)}return t}(n);return e.map(e=>({seg:e,hcoords:t.rangeToCoords(e),top:i[e.eventRange.instance.instanceId]}))}(c,e.timelineCoords,h),{},Boolean(s.eventDrag),Boolean(s.eventResize),!1)))}componentDidMount(){this.updateSize()}componentDidUpdate(e,t){e.eventStore===this.props.eventStore&&e.timelineCoords===this.props.timelineCoords&&t.moreLinkHeights===this.state.moreLinkHeights||this.updateSize()}updateSize(){let{props:e}=this,{timelineCoords:n}=e;const i=this.innerElRef.current;e.onHeightChange&&e.onHeightChange(i,!1),n&&this.setState({eventInstanceHeights:t.mapHash(this.harnessElRefs.currentMap,e=>Math.round(e.getBoundingClientRect().height)),moreLinkHeights:t.mapHash(this.moreElRefs.currentMap,e=>Math.round(e.getBoundingClientRect().height))},()=>{e.onHeightChange&&e.onHeightChange(i,!0)}),e.syncParentMinHeight&&(i.parentElement.style.minHeight=i.style.height)}renderFgSegs(e,n,i,r,l){let{harnessElRefs:a,moreElRefs:s,props:c,context:d}=this,m=i||r||l;return o.createElement(o.Fragment,null,e.map(e=>{let{seg:h,hcoords:f,top:u}=e;if(Array.isArray(h)){let i=t.buildIsoString(t.computeEarliestSegStart(h));return o.createElement(O,{key:"m:"+i,elRef:s.createRef(i),hiddenSegs:h,placement:e,dateProfile:c.dateProfile,nowDate:c.nowDate,todayRange:c.todayRange,isTimeScale:c.tDateProfile.isTimeScale,eventSelection:c.eventSelection,resourceId:c.resourceId,isForcedInvisible:n})}let g=h.eventRange.instance.instanceId,p=m||Boolean(!n[g]&&f&&null!==u),v=C(f,d.isRtl);return o.createElement("div",{key:"e:"+g,ref:m?null:a.createRef(g),className:"fc-timeline-event-harness",style:Object.assign({visibility:p?"":"hidden",top:u||0},v)},o.createElement(W,Object.assign({isTimeScale:c.tDateProfile.isTimeScale,seg:h,isDragging:i,isResizing:r,isDateSelecting:l,isSelected:g===c.eventSelection},t.getSegMeta(h,c.todayRange,c.nowDate))))}))}}z.addStateEquality({eventInstanceHeights:t.isPropsEqual,moreLinkHeights:t.isPropsEqual});class L extends t.DateComponent{constructor(){super(...arguments),this.slatsRef=o.createRef(),this.state={coords:null},this.handeEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)},this.handleCoords=e=>{this.setState({coords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:n,context:i}=this,{options:r}=i,{dateProfile:l,tDateProfile:a}=e,s=t.greatestDurationDenominator(a.slotDuration).unit;return o.createElement("div",{className:"fc-timeline-body",ref:this.handeEl,style:{minWidth:e.tableMinWidth,height:e.clientHeight,width:e.clientWidth}},o.createElement(t.NowTimer,{unit:s},(s,c)=>o.createElement(o.Fragment,null,o.createElement(k,{ref:this.slatsRef,dateProfile:l,tDateProfile:a,nowDate:s,todayRange:c,clientWidth:e.clientWidth,tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,onCoords:this.handleCoords,onScrollLeftRequest:e.onScrollLeftRequest}),o.createElement(z,{dateProfile:l,tDateProfile:e.tDateProfile,nowDate:s,todayRange:c,nextDayThreshold:r.nextDayThreshold,businessHours:e.businessHours,eventStore:e.eventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,timelineCoords:n.coords,syncParentMinHeight:!0}),r.nowIndicator&&n.coords&&n.coords.isDateInRange(s)&&o.createElement("div",{className:"fc-timeline-now-indicator-container"},o.createElement(t.NowIndicatorContainer,{elClasses:["fc-timeline-now-indicator-line"],elStyle:y(n.coords.dateToCoord(s),i.isRtl),isAxis:!1,date:s})))))}queryHit(e,t,n,i){let o=this.slatsRef.current.positionToHit(e);return o?{dateProfile:this.props.dateProfile,dateSpan:o.dateSpan,rect:{left:o.left,right:o.right,top:0,bottom:i},dayEl:o.dayEl,layer:0}:null}}class N extends t.DateComponent{constructor(){super(...arguments),this.buildTimelineDateProfile=t.memoize(c),this.scrollGridRef=o.createRef(),this.state={slatCoords:null,slotCushionMaxWidth:null},this.handleSlatCoords=e=>{this.setState({slatCoords:e})},this.handleScrollLeftRequest=e=>{this.scrollGridRef.current.forceScrollLeft(0,e)},this.handleMaxCushionWidth=e=>{this.setState({slotCushionMaxWidth:Math.ceil(e)})}}render(){let{props:e,state:n,context:i}=this,{options:l}=i,a=!e.forPrint&&t.getStickyHeaderDates(l),s=!e.forPrint&&t.getStickyFooterScrollbar(l),c=this.buildTimelineDateProfile(e.dateProfile,i.dateEnv,l,i.dateProfileGenerator),{slotMinWidth:d}=l,m=H(c,d||this.computeFallbackSlotMinWidth(c)),h=[{type:"header",key:"header",isSticky:a,chunks:[{key:"timeline",content:t=>o.createElement(R,{dateProfile:e.dateProfile,clientWidth:t.clientWidth,clientHeight:t.clientHeight,tableMinWidth:t.tableMinWidth,tableColGroupNode:t.tableColGroupNode,tDateProfile:c,slatCoords:n.slatCoords,onMaxCushionWidth:d?null:this.handleMaxCushionWidth})}]},{type:"body",key:"body",liquid:!0,chunks:[{key:"timeline",content:t=>o.createElement(L,Object.assign({},e,{clientWidth:t.clientWidth,clientHeight:t.clientHeight,tableMinWidth:t.tableMinWidth,tableColGroupNode:t.tableColGroupNode,tDateProfile:c,onSlatCoords:this.handleSlatCoords,onScrollLeftRequest:this.handleScrollLeftRequest}))}]}];return s&&h.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"timeline",content:t.renderScrollShim}]}),o.createElement(t.ViewContainer,{elClasses:["fc-timeline",!1===l.eventOverlap?"fc-timeline-overlap-disabled":""],viewSpec:i.viewSpec},o.createElement(r.ScrollGrid,{ref:this.scrollGridRef,liquid:!e.isHeightAuto&&!e.forPrint,collapsibleWidth:!1,colGroups:[{cols:m}],sections:h}))}computeFallbackSlotMinWidth(e){return Math.max(30,(this.state.slotCushionMaxWidth||0)/e.slotsPerLabel)}}function H(e,t){return[{span:e.slotCnt,minWidth:t||1}]}t.injectStyles("\n\n .fc .fc-timeline-body {\n min-height: 100%;\n position: relative;\n z-index: 1; /* scope slots, bg, etc */\n }\n/*\nvertical slots in both the header AND the body\n*/\n.fc .fc-timeline-slots {\n position: absolute;\n z-index: 1;\n top: 0;\n bottom: 0\n }\n.fc .fc-timeline-slots > table {\n height: 100%;\n }\n.fc {\n\n /* border for both header AND body cells */\n\n}\n.fc .fc-timeline-slot-minor {\n border-style: dotted;\n }\n.fc {\n\n /* header cells (aka \"label\") */\n\n}\n.fc .fc-timeline-slot-frame {\n display: flex;\n align-items: center; /* vertical align */\n justify-content: center; /* horizontal align */\n }\n.fc .fc-timeline-header-row-chrono { /* a row of times */\n }\n.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame {\n justify-content: flex-start; /* horizontal align left or right */\n }\n.fc .fc-timeline-header-row:last-child { /* guaranteed NOT to have sticky elements */\n }\n.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame {\n /* so text doesn't bleed out and cause extra scroll */\n /* (won't work with sticky elements) */\n overflow: hidden;\n }\n.fc .fc-timeline-slot-cushion {\n padding: 4px 5px; /* TODO: unify with fc-col-header? */\n white-space: nowrap;\n }\n.fc {\n\n /* NOTE: how does the top row of cells get horizontally centered? */\n /* for the non-chrono-row, the fc-sticky system looks for text-align center, */\n /* and it's a fluke that the default browser stylesheet already does this for <th> */\n /* TODO: have StickyScrolling look at natural left coord to detect centeredness. */\n\n}\n/* only owns one side, so can do dotted */\n.fc-direction-ltr .fc-timeline-slot { border-right: 0 !important }\n.fc-direction-rtl .fc-timeline-slot { border-left: 0 !important }\n.fc .fc-timeline-now-indicator-container {\n position: absolute;\n z-index: 4;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 0;\n }\n.fc .fc-timeline-now-indicator-arrow,\n .fc .fc-timeline-now-indicator-line {\n position: absolute;\n top: 0;\n border-style: solid;\n border-color: var(--fc-now-indicator-color);\n }\n.fc .fc-timeline-now-indicator-arrow {\n margin: 0 -6px; /* 5, then one more to counteract scroller's negative margins */\n\n /* triangle pointing down. TODO: mixin */\n border-width: 6px 5px 0 5px;\n border-left-color: transparent;\n border-right-color: transparent;\n }\n.fc .fc-timeline-now-indicator-line {\n margin: 0 -1px; /* counteract scroller's negative margins */\n bottom: 0;\n border-width: 0 0 0 1px;\n }\n.fc {\n\n /* container */\n\n}\n.fc .fc-timeline-events {\n position: relative;\n z-index: 3;\n width: 0; /* for event positioning. will end up on correct side based on dir */\n }\n.fc {\n\n /* harness */\n\n}\n.fc .fc-timeline-event-harness,\n .fc .fc-timeline-more-link {\n position: absolute;\n top: 0; /* for when when top can't be computed yet */\n /* JS will set tht left/right */\n }\n/* z-index, scoped within fc-timeline-events */\n.fc-timeline-event { z-index: 1 }\n.fc-timeline-event.fc-event-mirror { z-index: 2 }\n.fc-timeline-event {\n position: relative; /* contains things. TODO: make part of fc-h-event and fc-v-event */\n display: flex; /* for v-aligning start/end arrows and making fc-event-main stretch all the way */\n align-items: center;\n border-radius: 0;\n padding: 2px 1px;\n margin-bottom: 1px;\n font-size: var(--fc-small-font-size)\n\n /* time and title spacing */\n /* ---------------------------------------------------------------------------------------------------- */\n}\n.fc-timeline-event .fc-event-main {\n flex-grow: 1;\n flex-shrink: 1;\n min-width: 0; /* important for allowing to shrink all the way */\n }\n.fc-timeline-event .fc-event-time {\n font-weight: bold;\n }\n.fc-timeline-event .fc-event-time,\n .fc-timeline-event .fc-event-title {\n white-space: nowrap;\n padding: 0 2px;\n }\n/* move 1px away from slot line */\n.fc-direction-ltr .fc-timeline-event.fc-event-end,\n .fc-direction-ltr .fc-timeline-more-link {\n margin-right: 1px;\n }\n.fc-direction-rtl .fc-timeline-event.fc-event-end,\n .fc-direction-rtl .fc-timeline-more-link {\n margin-left: 1px;\n }\n/* make event beefier when overlap not allowed */\n.fc-timeline-overlap-disabled .fc-timeline-event {\n padding-top: 5px;\n padding-bottom: 5px;\n margin-bottom: 0;\n}\n/* arrows indicating the event continues into past/future */\n/* ---------------------------------------------------------------------------------------------------- */\n/* part of the flexbox flow */\n.fc-timeline-event:not(.fc-event-start):before,\n.fc-timeline-event:not(.fc-event-end):after {\n content: \"\";\n flex-grow: 0;\n flex-shrink: 0;\n opacity: .5;\n\n /* triangle. TODO: mixin */\n width: 0;\n height: 0;\n margin: 0 1px;\n border: 5px solid #000; /* TODO: var */\n border-top-color: transparent;\n border-bottom-color: transparent;\n}\n/* pointing left */\n.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,\n.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after {\n border-left: 0;\n}\n/* pointing right */\n.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,\n.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before {\n border-right: 0;\n}\n/* +more events indicator */\n/* ---------------------------------------------------------------------------------------------------- */\n.fc-timeline-more-link {\n font-size: var(--fc-small-font-size);\n color: var(--fc-more-link-text-color);\n background: var(--fc-more-link-bg-color);\n padding: 1px;\n cursor: pointer;\n}\n.fc-timeline-more-link-inner { /* has fc-sticky */\n display: inline-block;\n left: 0;\n right: 0;\n padding: 2px;\n}\n.fc .fc-timeline-bg { /* a container for bg content */\n position: absolute;\n z-index: 2;\n top: 0;\n bottom: 0;\n width: 0;\n left: 0; /* will take precedence when LTR */\n right: 0; /* will take precedence when RTL */ /* TODO: kill */\n }\n.fc .fc-timeline-bg .fc-non-business { z-index: 1 }\n.fc .fc-timeline-bg .fc-bg-event { z-index: 2 }\n.fc .fc-timeline-bg .fc-highlight { z-index: 3 }\n.fc .fc-timeline-bg-harness {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n\n");var F=n.createPlugin({name:"@fullcalendar/timeline",premiumReleaseDate:"2022-11-22",deps:[a.default],initialView:"timelineDay",views:{timeline:{component:N,usesMinMaxTime:!0,eventResizableFromStart:!0},timelineDay:{type:"timeline",duration:{days:1}},timelineWeek:{type:"timeline",duration:{weeks:1}},timelineMonth:{type:"timeline",duration:{months:1}},timelineYear:{type:"timeline",duration:{years:1}}}}),B={__proto__:null,TimelineView:N,buildSlatCols:H,TimelineLane:z,TimelineLaneBg:P,TimelineHeader:R,TimelineSlats:k,buildTimelineDateProfile:c,TimelineCoords:b,coordToCss:y,coordsToCss:C,TimelineLaneSlicer:M,TimelineHeaderRows:S};return t.globalPlugins.push(F),e.Internal=B,e.default=F,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar.Internal,FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Preact,FullCalendar.ScrollGrid.Internal);
6
+ FullCalendar.Timeline=function(e,t,n,i,o,r){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}var a=l(i);t.config.MAX_TIMELINE_SLOTS=1e3;const s=[{years:1},{months:1},{days:1},{hours:1},{minutes:30},{minutes:15},{minutes:10},{minutes:5},{minutes:1},{seconds:30},{seconds:15},{seconds:10},{seconds:5},{seconds:1},{milliseconds:500},{milliseconds:100},{milliseconds:10},{milliseconds:1}];function c(e,n,i,o){let r={labelInterval:i.slotLabelInterval,slotDuration:i.slotDuration};!function(e,n,i){const{currentRange:o}=n;if(e.labelInterval){i.countDurationsBetween(o.start,o.end,e.labelInterval)>t.config.MAX_TIMELINE_SLOTS&&(console.warn("slotLabelInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){i.countDurationsBetween(o.start,o.end,e.slotDuration)>t.config.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){const n=t.wholeDivideDurations(e.labelInterval,e.slotDuration);(null===n||n<1)&&(console.warn("slotLabelInterval must be a multiple of slotDuration"),e.slotDuration=null)}}(r,e,n),h(r,e,n),function(e,n,i){const{currentRange:o}=n;let{slotDuration:r}=e;if(!r){const l=h(e,n,i);for(let e of s){const n=t.createDuration(e),i=t.wholeDivideDurations(l,n);if(null!==i&&i>1&&i<=6){r=n;break}}if(r){i.countDurationsBetween(o.start,o.end,r)>200&&(r=null)}r||(r=l),e.slotDuration=r}}(r,e,n);let l=i.slotLabelFormat,a=Array.isArray(l)?l:null!=l?[l]:function(e,n,i,o){let r,l;const{labelInterval:a}=e;let s=t.greatestDurationDenominator(a).unit;const c=o.weekNumbers;let d=r=l=null;"week"!==s||c||(s="day");switch(s){case"year":d={year:"numeric"};break;case"month":f("years",n,i)>1&&(d={year:"numeric"}),r={month:"short"};break;case"week":f("years",n,i)>1&&(d={year:"numeric"}),r={week:"narrow"};break;case"day":f("years",n,i)>1?d={year:"numeric",month:"long"}:f("months",n,i)>1&&(d={month:"long"}),c&&(r={week:"short"}),l={weekday:"narrow",day:"numeric"};break;case"hour":c&&(d={week:"short"}),f("days",n,i)>1&&(r={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),l={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":t.asRoughMinutes(a)/60>=6?(d={hour:"numeric",meridiem:"short"},r=e=>":"+t.padStart(e.date.minute,2)):d={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":t.asRoughSeconds(a)/60>=6?(d={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},r=e=>":"+t.padStart(e.date.second,2)):d={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"};break;case"millisecond":d={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"},r=e=>"."+t.padStart(e.millisecond,3)}return[].concat(d||[],r||[],l||[])}(r,e,n,i);r.headerFormats=a.map(e=>t.createFormatter(e)),r.isTimeScale=Boolean(r.slotDuration.milliseconds);let c=null;if(!r.isTimeScale){const e=t.greatestDurationDenominator(r.slotDuration).unit;/year|month|week/.test(e)&&(c=e)}r.largeUnit=c,r.emphasizeWeeks=1===t.asCleanDays(r.slotDuration)&&f("weeks",e,n)>=2&&!i.businessHours;let g,p,v=i.snapDuration;v&&(g=t.createDuration(v),p=t.wholeDivideDurations(r.slotDuration,g)),null==p&&(g=r.slotDuration,p=1),r.snapDuration=g,r.snapsPerSlot=p;let D=t.asRoughMs(e.slotMaxTime)-t.asRoughMs(e.slotMinTime),S=d(e.renderRange.start,r,n),b=d(e.renderRange.end,r,n);r.isTimeScale&&(S=n.add(S,e.slotMinTime),b=n.add(t.addDays(b,-1),e.slotMaxTime)),r.timeWindowMs=D,r.normalizedRange={start:S,end:b};let w=[],y=S;for(;y<b;)m(y,r,e,o)&&w.push(y),y=n.add(y,r.slotDuration);r.slotDates=w;let C=-1,R=0;const E=[],x=[];for(y=S;y<b;)m(y,r,e,o)?(C+=1,E.push(C),x.push(R)):E.push(C+.5),y=n.add(y,r.snapDuration),R+=1;return r.snapDiffToIndex=E,r.snapIndexToDiff=x,r.snapCnt=C+1,r.slotCnt=r.snapCnt/r.snapsPerSlot,r.isWeekStarts=function(e,t){let{slotDates:n,emphasizeWeeks:i}=e,o=null,r=[];for(let e of n){let n=t.computeWeekNumber(e),l=i&&null!==o&&o!==n;o=n,r.push(l)}return r}(r,n),r.cellRows=function(e,n){let i=e.slotDates,o=e.headerFormats,r=o.map(()=>[]),l=t.asCleanDays(e.slotDuration),a=7===l?"week":1===l?"day":null,s=o.map(e=>e.getLargestUnit?e.getLargestUnit():null);for(let l=0;l<i.length;l+=1){let c=i[l],d=e.isWeekStarts[l];for(let i=0;i<o.length;i+=1){let l=o[i],m=r[i],h=m[m.length-1],f=i===o.length-1,g=o.length>1&&!f,p=null,v=s[i]||(f?a:null);if(g){let e=n.format(c,l);h&&h.text===e?h.colspan+=1:p=u(c,e,v)}else if(!h||t.isInt(n.countDurationsBetween(e.normalizedRange.start,c,e.labelInterval))){let e=n.format(c,l);p=u(c,e,v)}else h.colspan+=1;p&&(p.weekStart=d,m.push(p))}}return r}(r,n),r.slotsPerLabel=t.wholeDivideDurations(r.labelInterval,r.slotDuration),r}function d(e,n,i){let o=e;return n.isTimeScale||(o=t.startOfDay(o),n.largeUnit&&(o=i.startOf(o,n.largeUnit))),o}function m(e,n,i,o){if(o.isHiddenDay(e))return!1;if(n.isTimeScale){let o=t.startOfDay(e),r=e.valueOf()-o.valueOf()-t.asRoughMs(i.slotMinTime);return r=(r%864e5+864e5)%864e5,r<n.timeWindowMs}return!0}function h(e,n,i){const{currentRange:o}=n;let{labelInterval:r}=e;if(!r){let n;if(e.slotDuration){for(n of s){const i=t.createDuration(n),o=t.wholeDivideDurations(i,e.slotDuration);if(null!==o&&o<=6){r=i;break}}r||(r=e.slotDuration)}else for(n of s){r=t.createDuration(n);if(i.countDurationsBetween(o.start,o.end,r)>=18)break}e.labelInterval=r}return r}function f(e,n,i){let o=n.currentRange,r=null;return"years"===e?r=i.diffWholeYears(o.start,o.end):"months"===e||"weeks"===e?r=i.diffWholeMonths(o.start,o.end):"days"===e&&(r=t.diffWholeDays(o.start,o.end)),r||0}function u(e,t,n){return{date:e,text:t,rowUnit:n,colspan:1,isWeekStart:!1}}class g extends t.BaseComponent{constructor(){super(...arguments),this.refineRenderProps=t.memoizeObjArg(D),this.buildCellNavLinkAttrs=t.memoize(p)}render(){let{props:e,context:n}=this,{dateEnv:i,options:r}=n,{cell:l,dateProfile:a,tDateProfile:s}=e,c=t.getDateMeta(l.date,e.todayRange,e.nowDate,a),d=this.refineRenderProps({level:e.rowLevel,dateMarker:l.date,text:l.text,dateEnv:n.dateEnv,viewApi:n.viewApi});return o.createElement(t.ContentContainer,{elTag:"th",elClasses:["fc-timeline-slot","fc-timeline-slot-label",l.isWeekStart&&"fc-timeline-slot-em",..."time"===l.rowUnit?t.getSlotClassNames(c,n.theme):t.getDayClassNames(c,n.theme)],elAttrs:{colSpan:l.colspan,"data-date":i.formatIso(l.date,{omitTime:!s.isTimeScale,omitTimeZoneOffset:!0})},renderProps:d,generatorName:"slotLabelContent",generator:r.slotLabelContent||v,classNameGenerator:r.slotLabelClassNames,didMount:r.slotLabelDidMount,willUnmount:r.slotLabelWillUnmount},t=>o.createElement("div",{className:"fc-timeline-slot-frame",style:{height:e.rowInnerHeight}},o.createElement(t,{elTag:"a",elClasses:["fc-timeline-slot-cushion","fc-scrollgrid-sync-inner",e.isSticky&&"fc-sticky"],elAttrs:this.buildCellNavLinkAttrs(n,l.date,l.rowUnit)})))}}function p(e,n,i){return i&&"time"!==i?t.buildNavLinkAttrs(e,n,i):{}}function v(e){return e.text}function D(e){return{level:e.level,date:e.dateEnv.toDate(e.dateMarker),view:e.viewApi,text:e.text}}class S extends t.BaseComponent{render(){let{dateProfile:e,tDateProfile:t,rowInnerHeights:n,todayRange:i,nowDate:r}=this.props,{cellRows:l}=t;return o.createElement(o.Fragment,null,l.map((a,s)=>{let c=s===l.length-1,d=["fc-timeline-header-row",t.isTimeScale&&c?"fc-timeline-header-row-chrono":""];return o.createElement("tr",{key:s,className:d.join(" ")},a.map(l=>o.createElement(g,{key:l.date.toISOString(),cell:l,rowLevel:s,dateProfile:e,tDateProfile:t,todayRange:i,nowDate:r,rowInnerHeight:n&&n[s],isSticky:!c})))}))}}class b{constructor(e,n,i,o,r,l){this.slatRootEl=e,this.dateProfile=i,this.tDateProfile=o,this.dateEnv=r,this.isRtl=l,this.outerCoordCache=new t.PositionCache(e,n,!0,!1),this.innerCoordCache=new t.PositionCache(e,t.findDirectChildren(n,"div"),!0,!1)}isDateInRange(e){return t.rangeContainsMarker(this.dateProfile.currentRange,e)}dateToCoord(e){let{tDateProfile:t}=this,n=this.computeDateSnapCoverage(e)/t.snapsPerSlot,i=Math.floor(n);i=Math.min(i,t.slotCnt-1);let o=n-i,{innerCoordCache:r,outerCoordCache:l}=this;return this.isRtl?l.originClientRect.width-(l.rights[i]-r.getWidth(i)*o):l.lefts[i]+r.getWidth(i)*o}rangeToCoords(e){return{start:this.dateToCoord(e.start),end:this.dateToCoord(e.end)}}durationToCoord(e){let{dateProfile:n,tDateProfile:i,dateEnv:o,isRtl:r}=this,l=0;if(n){let a=o.add(n.activeRange.start,e);i.isTimeScale||(a=t.startOfDay(a)),l=this.dateToCoord(a),!r&&l&&(l+=1)}return l}coordFromLeft(e){return this.isRtl?this.outerCoordCache.originClientRect.width-e:e}computeDateSnapCoverage(e){return w(e,this.tDateProfile,this.dateEnv)}}function w(e,n,i){let o=i.countDurationsBetween(n.normalizedRange.start,e,n.snapDuration);if(o<0)return 0;if(o>=n.snapDiffToIndex.length)return n.snapCnt;let r=Math.floor(o),l=n.snapDiffToIndex[r];return t.isInt(l)?l+=o-r:l=Math.ceil(l),l}function y(e,t){return null===e?{left:"",right:""}:t?{right:e,left:""}:{left:e,right:""}}function C(e,t){return e?t?{right:e.start,left:-e.end}:{left:e.start,right:-e.end}:{left:"",right:""}}class R extends t.BaseComponent{constructor(){super(...arguments),this.rootElRef=o.createRef()}render(){let{props:e,context:n}=this,i=t.greatestDurationDenominator(e.tDateProfile.slotDuration).unit,r=e.slatCoords&&e.slatCoords.dateProfile===e.dateProfile?e.slatCoords:null;return o.createElement(t.NowTimer,{unit:i},(i,l)=>o.createElement("div",{className:"fc-timeline-header",ref:this.rootElRef},o.createElement("table",{"aria-hidden":!0,className:"fc-scrollgrid-sync-table",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,o.createElement("tbody",null,o.createElement(S,{dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:i,todayRange:l,rowInnerHeights:e.rowInnerHeights}))),n.options.nowIndicator&&o.createElement("div",{className:"fc-timeline-now-indicator-container"},r&&r.isDateInRange(i)&&o.createElement(t.NowIndicatorContainer,{elClasses:["fc-timeline-now-indicator-arrow"],elStyle:y(r.dateToCoord(i),n.isRtl),isAxis:!0,date:i}))))}componentDidMount(){this.updateSize()}componentDidUpdate(){this.updateSize()}updateSize(){this.props.onMaxCushionWidth&&this.props.onMaxCushionWidth(this.computeMaxCushionWidth())}computeMaxCushionWidth(){return Math.max(...t.findElements(this.rootElRef.current,".fc-timeline-header-row:last-child .fc-timeline-slot-cushion").map(e=>e.getBoundingClientRect().width))}}class E extends t.BaseComponent{render(){let{props:e,context:n}=this,{dateEnv:i,options:r,theme:l}=n,{date:a,tDateProfile:s,isEm:c}=e,d=t.getDateMeta(e.date,e.todayRange,e.nowDate,e.dateProfile),m=Object.assign(Object.assign({date:i.toDate(e.date)},d),{view:n.viewApi});return o.createElement(t.ContentContainer,{elTag:"td",elRef:e.elRef,elClasses:["fc-timeline-slot","fc-timeline-slot-lane",c&&"fc-timeline-slot-em",s.isTimeScale?t.isInt(i.countDurationsBetween(s.normalizedRange.start,e.date,s.labelInterval))?"fc-timeline-slot-major":"fc-timeline-slot-minor":"",...e.isDay?t.getDayClassNames(d,l):t.getSlotClassNames(d,l)],elAttrs:{"data-date":i.formatIso(a,{omitTimeZoneOffset:!0,omitTime:!s.isTimeScale})},renderProps:m,generatorName:"slotLaneContent",generator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount},e=>o.createElement(e,{elTag:"div"}))}}class x extends t.BaseComponent{render(){let{props:e}=this,{tDateProfile:t,cellElRefs:n}=e,{slotDates:i,isWeekStarts:r}=t,l=!t.isTimeScale&&!t.largeUnit;return o.createElement("tbody",null,o.createElement("tr",null,i.map((i,a)=>{let s=i.toISOString();return o.createElement(E,{key:s,elRef:n.createRef(s),date:i,dateProfile:e.dateProfile,tDateProfile:t,nowDate:e.nowDate,todayRange:e.todayRange,isEm:r[a],isDay:l})})))}}class k extends t.BaseComponent{constructor(){super(...arguments),this.rootElRef=o.createRef(),this.cellElRefs=new t.RefMap,this.handleScrollRequest=e=>{let{onScrollLeftRequest:t}=this.props,{coords:n}=this;if(t&&n){if(e.time){t(n.coordFromLeft(n.durationToCoord(e.time)))}return!0}return null}}render(){let{props:e,context:t}=this;return o.createElement("div",{className:"fc-timeline-slots",ref:this.rootElRef},o.createElement("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,o.createElement(x,{cellElRefs:this.cellElRefs,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange})))}componentDidMount(){this.updateSizing(),this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.updateSizing(),this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach(),this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{props:e,context:t}=this;if(null!==e.clientWidth&&this.scrollResponder){this.rootElRef.current.offsetWidth&&(this.coords=new b(this.rootElRef.current,(n=this.cellElRefs.currentMap,e.tDateProfile.slotDates.map(e=>{let t=e.toISOString();return n[t]})),e.dateProfile,e.tDateProfile,t.dateEnv,t.isRtl),e.onCoords&&e.onCoords(this.coords),this.scrollResponder.update(!1))}var n}positionToHit(e){let{outerCoordCache:n}=this.coords,{dateEnv:i,isRtl:o}=this.context,{tDateProfile:r}=this.props,l=n.leftToIndex(e);if(null!=l){let a=n.getWidth(l),s=o?(n.rights[l]-e)/a:(e-n.lefts[l])/a,c=Math.floor(s*r.snapsPerSlot),d=i.add(r.slotDates[l],t.multiplyDuration(r.snapDuration,c));return{dateSpan:{range:{start:d,end:i.add(d,r.snapDuration)},allDay:!this.props.tDateProfile.isTimeScale},dayEl:this.cellElRefs.currentMap[l],left:n.lefts[l],right:n.rights[l]}}return null}}function T(e,t,n){let i=[];if(n)for(let o of e){let e=n.rangeToCoords(o),r=Math.round(e.start),l=Math.round(e.end);l-r<t&&(l=r+t),i.push({start:r,end:l})}return i}class P extends t.BaseComponent{render(){let{props:e}=this,t=[].concat(e.eventResizeSegs,e.dateSelectionSegs);return e.timelineCoords&&o.createElement("div",{className:"fc-timeline-bg"},this.renderSegs(e.businessHourSegs||[],e.timelineCoords,"non-business"),this.renderSegs(e.bgEventSegs||[],e.timelineCoords,"bg-event"),this.renderSegs(t,e.timelineCoords,"highlight"))}renderSegs(e,n,i){let{todayRange:r,nowDate:l}=this.props,{isRtl:a}=this.context,s=T(e,0,n),c=e.map((e,n)=>{let c=C(s[n],a);return o.createElement("div",{key:t.buildEventRangeKey(e.eventRange),className:"fc-timeline-bg-harness",style:c},"bg-event"===i?o.createElement(t.BgEvent,Object.assign({seg:e},t.getSegMeta(e,r,l))):t.renderFill(i))});return o.createElement(o.Fragment,null,c)}}class M extends t.Slicer{sliceRange(e,n,i,o,r){let l=function(e,n,i){if(!n.isTimeScale&&(e=t.computeVisibleDayRange(e),n.largeUnit)){let t=e;((e={start:i.startOf(e.start,n.largeUnit),end:i.startOf(e.end,n.largeUnit)}).end.valueOf()!==t.end.valueOf()||e.end<=e.start)&&(e={start:e.start,end:i.add(e.end,n.slotDuration)})}return e}(e,o,r),a=[];if(w(l.start,o,r)<w(l.end,o,r)){let e=t.intersectRanges(l,o.normalizedRange);e&&a.push({start:e.start,end:e.end,isStart:e.start.valueOf()===l.start.valueOf()&&m(e.start,o,n,i),isEnd:e.end.valueOf()===l.end.valueOf()&&m(t.addMs(e.end,-1),o,n,i)})}return a}}const I=t.createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});class W extends t.BaseComponent{render(){let{props:e}=this;return o.createElement(t.StandardEvent,Object.assign({},e,{elClasses:["fc-timeline-event","fc-h-event"],defaultTimeFormat:I,defaultDisplayEventTime:!e.isTimeScale}))}}class O extends t.BaseComponent{render(){let{props:e,context:n}=this,{hiddenSegs:i,placement:r,resourceId:l}=e,{top:a,hcoords:s}=r,c=s&&null!==a,d=C(s,n.isRtl),m=l?{resourceId:l}:{};return o.createElement(t.MoreLinkContainer,{elRef:e.elRef,elClasses:["fc-timeline-more-link"],elStyle:Object.assign({visibility:c?"":"hidden",top:a||0},d),allDayDate:null,moreCnt:i.length,allSegs:i,hiddenSegs:i,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:m,popoverContent:()=>o.createElement(o.Fragment,null,i.map(n=>{let i=n.eventRange.instance.instanceId;return o.createElement("div",{key:i,style:{visibility:e.isForcedInvisible[i]?"hidden":""}},o.createElement(W,Object.assign({isTimeScale:e.isTimeScale,seg:n,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:i===e.eventSelection},t.getSegMeta(n,e.todayRange,e.nowDate))))}))},e=>o.createElement(e,{elTag:"div",elClasses:["fc-timeline-more-link-inner","fc-sticky"]}))}}class z extends t.BaseComponent{constructor(){super(...arguments),this.slicer=new M,this.sortEventSegs=t.memoize(t.sortEventSegs),this.harnessElRefs=new t.RefMap,this.moreElRefs=new t.RefMap,this.innerElRef=o.createRef(),this.state={eventInstanceHeights:{},moreLinkHeights:{}}}render(){let{props:e,state:n,context:i}=this,{options:r}=i,{dateProfile:l,tDateProfile:a}=e,s=this.slicer.sliceProps(e,l,a.isTimeScale?null:e.nextDayThreshold,i,l,i.dateProfileGenerator,a,i.dateEnv),c=(s.eventDrag?s.eventDrag.segs:null)||(s.eventResize?s.eventResize.segs:null)||[],d=this.sortEventSegs(s.fgEventSegs,r.eventOrder),m=T(d,r.eventMinWidth,e.timelineCoords),[h,f]=function(e,n,i,o,r,l){let a=[],s=[];for(let t=0;t<e.length;t+=1){let o=e[t],r=i[o.eventRange.instance.instanceId],l=n[t];r&&l?a.push({index:t,span:l,thickness:r}):s.push({seg:o,hcoords:l,top:null})}let c=new t.SegHierarchy;null!=r&&(c.strictOrder=r),null!=l&&(c.maxStackCnt=l);let d=c.addSegs(a),m=d.map(t=>({seg:e[t.index],hcoords:t.span,top:null})),h=t.groupIntersectingEntries(d),f=[],u=[];const g=t=>e[t.index];for(let n=0;n<h.length;n+=1){let i=h[n],r=i.entries.map(g),l=o[t.buildIsoString(t.computeEarliestSegStart(r))];null!=l?f.push({index:e.length+n,thickness:l,span:i.span}):u.push({seg:r,hcoords:i.span,top:null})}c.maxStackCnt=-1,c.addSegs(f);let p=c.toRects(),v=[],D=0;for(let t of p){let n=t.index;v.push({seg:n<e.length?e[n]:h[n-e.length].entries.map(g),hcoords:t.span,top:t.levelCoord}),D=Math.max(D,t.levelCoord+t.thickness)}return[v.concat(s,m,u),D]}(d,m,n.eventInstanceHeights,n.moreLinkHeights,r.eventOrderStrict,r.eventMaxStack),u=(s.eventDrag?s.eventDrag.affectedInstances:null)||(s.eventResize?s.eventResize.affectedInstances:null)||{};return o.createElement(o.Fragment,null,o.createElement(P,{businessHourSegs:s.businessHourSegs,bgEventSegs:s.bgEventSegs,timelineCoords:e.timelineCoords,eventResizeSegs:s.eventResize?s.eventResize.segs:[],dateSelectionSegs:s.dateSelectionSegs,nowDate:e.nowDate,todayRange:e.todayRange}),o.createElement("div",{className:"fc-timeline-events fc-scrollgrid-sync-inner",ref:this.innerElRef,style:{height:f}},this.renderFgSegs(h,u,!1,!1,!1),this.renderFgSegs(function(e,t,n){if(!e.length||!t)return[];let i=function(e){let t={};for(let n of e){let{seg:e}=n;Array.isArray(e)||(t[e.eventRange.instance.instanceId]=n.top)}return t}(n);return e.map(e=>({seg:e,hcoords:t.rangeToCoords(e),top:i[e.eventRange.instance.instanceId]}))}(c,e.timelineCoords,h),{},Boolean(s.eventDrag),Boolean(s.eventResize),!1)))}componentDidMount(){this.updateSize()}componentDidUpdate(e,t){e.eventStore===this.props.eventStore&&e.timelineCoords===this.props.timelineCoords&&t.moreLinkHeights===this.state.moreLinkHeights||this.updateSize()}updateSize(){let{props:e}=this,{timelineCoords:n}=e;const i=this.innerElRef.current;e.onHeightChange&&e.onHeightChange(i,!1),n&&this.setState({eventInstanceHeights:t.mapHash(this.harnessElRefs.currentMap,e=>Math.round(e.getBoundingClientRect().height)),moreLinkHeights:t.mapHash(this.moreElRefs.currentMap,e=>Math.round(e.getBoundingClientRect().height))},()=>{e.onHeightChange&&e.onHeightChange(i,!0)}),e.syncParentMinHeight&&(i.parentElement.style.minHeight=i.style.height)}renderFgSegs(e,n,i,r,l){let{harnessElRefs:a,moreElRefs:s,props:c,context:d}=this,m=i||r||l;return o.createElement(o.Fragment,null,e.map(e=>{let{seg:h,hcoords:f,top:u}=e;if(Array.isArray(h)){let i=t.buildIsoString(t.computeEarliestSegStart(h));return o.createElement(O,{key:"m:"+i,elRef:s.createRef(i),hiddenSegs:h,placement:e,dateProfile:c.dateProfile,nowDate:c.nowDate,todayRange:c.todayRange,isTimeScale:c.tDateProfile.isTimeScale,eventSelection:c.eventSelection,resourceId:c.resourceId,isForcedInvisible:n})}let g=h.eventRange.instance.instanceId,p=m||Boolean(!n[g]&&f&&null!==u),v=C(f,d.isRtl);return o.createElement("div",{key:"e:"+g,ref:m?null:a.createRef(g),className:"fc-timeline-event-harness",style:Object.assign({visibility:p?"":"hidden",top:u||0},v)},o.createElement(W,Object.assign({isTimeScale:c.tDateProfile.isTimeScale,seg:h,isDragging:i,isResizing:r,isDateSelecting:l,isSelected:g===c.eventSelection},t.getSegMeta(h,c.todayRange,c.nowDate))))}))}}z.addStateEquality({eventInstanceHeights:t.isPropsEqual,moreLinkHeights:t.isPropsEqual});class L extends t.DateComponent{constructor(){super(...arguments),this.slatsRef=o.createRef(),this.state={coords:null},this.handeEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)},this.handleCoords=e=>{this.setState({coords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:n,context:i}=this,{options:r}=i,{dateProfile:l,tDateProfile:a}=e,s=t.greatestDurationDenominator(a.slotDuration).unit;return o.createElement("div",{className:"fc-timeline-body",ref:this.handeEl,style:{minWidth:e.tableMinWidth,height:e.clientHeight,width:e.clientWidth}},o.createElement(t.NowTimer,{unit:s},(s,c)=>o.createElement(o.Fragment,null,o.createElement(k,{ref:this.slatsRef,dateProfile:l,tDateProfile:a,nowDate:s,todayRange:c,clientWidth:e.clientWidth,tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,onCoords:this.handleCoords,onScrollLeftRequest:e.onScrollLeftRequest}),o.createElement(z,{dateProfile:l,tDateProfile:e.tDateProfile,nowDate:s,todayRange:c,nextDayThreshold:r.nextDayThreshold,businessHours:e.businessHours,eventStore:e.eventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,timelineCoords:n.coords,syncParentMinHeight:!0}),r.nowIndicator&&n.coords&&n.coords.isDateInRange(s)&&o.createElement("div",{className:"fc-timeline-now-indicator-container"},o.createElement(t.NowIndicatorContainer,{elClasses:["fc-timeline-now-indicator-line"],elStyle:y(n.coords.dateToCoord(s),i.isRtl),isAxis:!1,date:s})))))}queryHit(e,t,n,i){let o=this.slatsRef.current.positionToHit(e);return o?{dateProfile:this.props.dateProfile,dateSpan:o.dateSpan,rect:{left:o.left,right:o.right,top:0,bottom:i},dayEl:o.dayEl,layer:0}:null}}class N extends t.DateComponent{constructor(){super(...arguments),this.buildTimelineDateProfile=t.memoize(c),this.scrollGridRef=o.createRef(),this.state={slatCoords:null,slotCushionMaxWidth:null},this.handleSlatCoords=e=>{this.setState({slatCoords:e})},this.handleScrollLeftRequest=e=>{this.scrollGridRef.current.forceScrollLeft(0,e)},this.handleMaxCushionWidth=e=>{this.setState({slotCushionMaxWidth:Math.ceil(e)})}}render(){let{props:e,state:n,context:i}=this,{options:l}=i,a=!e.forPrint&&t.getStickyHeaderDates(l),s=!e.forPrint&&t.getStickyFooterScrollbar(l),c=this.buildTimelineDateProfile(e.dateProfile,i.dateEnv,l,i.dateProfileGenerator),{slotMinWidth:d}=l,m=H(c,d||this.computeFallbackSlotMinWidth(c)),h=[{type:"header",key:"header",isSticky:a,chunks:[{key:"timeline",content:t=>o.createElement(R,{dateProfile:e.dateProfile,clientWidth:t.clientWidth,clientHeight:t.clientHeight,tableMinWidth:t.tableMinWidth,tableColGroupNode:t.tableColGroupNode,tDateProfile:c,slatCoords:n.slatCoords,onMaxCushionWidth:d?null:this.handleMaxCushionWidth})}]},{type:"body",key:"body",liquid:!0,chunks:[{key:"timeline",content:t=>o.createElement(L,Object.assign({},e,{clientWidth:t.clientWidth,clientHeight:t.clientHeight,tableMinWidth:t.tableMinWidth,tableColGroupNode:t.tableColGroupNode,tDateProfile:c,onSlatCoords:this.handleSlatCoords,onScrollLeftRequest:this.handleScrollLeftRequest}))}]}];return s&&h.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"timeline",content:t.renderScrollShim}]}),o.createElement(t.ViewContainer,{elClasses:["fc-timeline",!1===l.eventOverlap?"fc-timeline-overlap-disabled":""],viewSpec:i.viewSpec},o.createElement(r.ScrollGrid,{ref:this.scrollGridRef,liquid:!e.isHeightAuto&&!e.forPrint,collapsibleWidth:!1,colGroups:[{cols:m}],sections:h}))}computeFallbackSlotMinWidth(e){return Math.max(30,(this.state.slotCushionMaxWidth||0)/e.slotsPerLabel)}}function H(e,t){return[{span:e.slotCnt,minWidth:t||1}]}t.injectStyles("\n\n .fc .fc-timeline-body {\n min-height: 100%;\n position: relative;\n z-index: 1; /* scope slots, bg, etc */\n }\n/*\nvertical slots in both the header AND the body\n*/\n.fc .fc-timeline-slots {\n position: absolute;\n z-index: 1;\n top: 0;\n bottom: 0\n }\n.fc .fc-timeline-slots > table {\n height: 100%;\n }\n.fc {\n\n /* border for both header AND body cells */\n\n}\n.fc .fc-timeline-slot-minor {\n border-style: dotted;\n }\n.fc {\n\n /* header cells (aka \"label\") */\n\n}\n.fc .fc-timeline-slot-frame {\n display: flex;\n align-items: center; /* vertical align */\n justify-content: center; /* horizontal align */\n }\n.fc .fc-timeline-header-row-chrono { /* a row of times */\n }\n.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame {\n justify-content: flex-start; /* horizontal align left or right */\n }\n.fc .fc-timeline-header-row:last-child { /* guaranteed NOT to have sticky elements */\n }\n.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame {\n /* so text doesn't bleed out and cause extra scroll */\n /* (won't work with sticky elements) */\n overflow: hidden;\n }\n.fc .fc-timeline-slot-cushion {\n padding: 4px 5px; /* TODO: unify with fc-col-header? */\n white-space: nowrap;\n }\n.fc {\n\n /* NOTE: how does the top row of cells get horizontally centered? */\n /* for the non-chrono-row, the fc-sticky system looks for text-align center, */\n /* and it's a fluke that the default browser stylesheet already does this for <th> */\n /* TODO: have StickyScrolling look at natural left coord to detect centeredness. */\n\n}\n/* only owns one side, so can do dotted */\n.fc-direction-ltr .fc-timeline-slot { border-right: 0 !important }\n.fc-direction-rtl .fc-timeline-slot { border-left: 0 !important }\n.fc .fc-timeline-now-indicator-container {\n position: absolute;\n z-index: 4;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 0;\n }\n.fc .fc-timeline-now-indicator-arrow,\n .fc .fc-timeline-now-indicator-line {\n position: absolute;\n top: 0;\n border-style: solid;\n border-color: var(--fc-now-indicator-color);\n }\n.fc .fc-timeline-now-indicator-arrow {\n margin: 0 -6px; /* 5, then one more to counteract scroller's negative margins */\n\n /* triangle pointing down. TODO: mixin */\n border-width: 6px 5px 0 5px;\n border-left-color: transparent;\n border-right-color: transparent;\n }\n.fc .fc-timeline-now-indicator-line {\n margin: 0 -1px; /* counteract scroller's negative margins */\n bottom: 0;\n border-width: 0 0 0 1px;\n }\n.fc {\n\n /* container */\n\n}\n.fc .fc-timeline-events {\n position: relative;\n z-index: 3;\n width: 0; /* for event positioning. will end up on correct side based on dir */\n }\n.fc {\n\n /* harness */\n\n}\n.fc .fc-timeline-event-harness,\n .fc .fc-timeline-more-link {\n position: absolute;\n top: 0; /* for when when top can't be computed yet */\n /* JS will set tht left/right */\n }\n/* z-index, scoped within fc-timeline-events */\n.fc-timeline-event { z-index: 1 }\n.fc-timeline-event.fc-event-mirror { z-index: 2 }\n.fc-timeline-event {\n position: relative; /* contains things. TODO: make part of fc-h-event and fc-v-event */\n display: flex; /* for v-aligning start/end arrows and making fc-event-main stretch all the way */\n align-items: center;\n border-radius: 0;\n padding: 2px 1px;\n margin-bottom: 1px;\n font-size: var(--fc-small-font-size)\n\n /* time and title spacing */\n /* ---------------------------------------------------------------------------------------------------- */\n}\n.fc-timeline-event .fc-event-main {\n flex-grow: 1;\n flex-shrink: 1;\n min-width: 0; /* important for allowing to shrink all the way */\n }\n.fc-timeline-event .fc-event-time {\n font-weight: bold;\n }\n.fc-timeline-event .fc-event-time,\n .fc-timeline-event .fc-event-title {\n white-space: nowrap;\n padding: 0 2px;\n }\n/* move 1px away from slot line */\n.fc-direction-ltr .fc-timeline-event.fc-event-end,\n .fc-direction-ltr .fc-timeline-more-link {\n margin-right: 1px;\n }\n.fc-direction-rtl .fc-timeline-event.fc-event-end,\n .fc-direction-rtl .fc-timeline-more-link {\n margin-left: 1px;\n }\n/* make event beefier when overlap not allowed */\n.fc-timeline-overlap-disabled .fc-timeline-event {\n padding-top: 5px;\n padding-bottom: 5px;\n margin-bottom: 0;\n}\n/* arrows indicating the event continues into past/future */\n/* ---------------------------------------------------------------------------------------------------- */\n/* part of the flexbox flow */\n.fc-timeline-event:not(.fc-event-start):before,\n.fc-timeline-event:not(.fc-event-end):after {\n content: \"\";\n flex-grow: 0;\n flex-shrink: 0;\n opacity: .5;\n\n /* triangle. TODO: mixin */\n width: 0;\n height: 0;\n margin: 0 1px;\n border: 5px solid #000; /* TODO: var */\n border-top-color: transparent;\n border-bottom-color: transparent;\n}\n/* pointing left */\n.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,\n.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after {\n border-left: 0;\n}\n/* pointing right */\n.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,\n.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before {\n border-right: 0;\n}\n/* +more events indicator */\n/* ---------------------------------------------------------------------------------------------------- */\n.fc-timeline-more-link {\n font-size: var(--fc-small-font-size);\n color: var(--fc-more-link-text-color);\n background: var(--fc-more-link-bg-color);\n padding: 1px;\n cursor: pointer;\n}\n.fc-timeline-more-link-inner { /* has fc-sticky */\n display: inline-block;\n left: 0;\n right: 0;\n padding: 2px;\n}\n.fc .fc-timeline-bg { /* a container for bg content */\n position: absolute;\n z-index: 2;\n top: 0;\n bottom: 0;\n width: 0;\n left: 0; /* will take precedence when LTR */\n right: 0; /* will take precedence when RTL */ /* TODO: kill */\n }\n.fc .fc-timeline-bg .fc-non-business { z-index: 1 }\n.fc .fc-timeline-bg .fc-bg-event { z-index: 2 }\n.fc .fc-timeline-bg .fc-highlight { z-index: 3 }\n.fc .fc-timeline-bg-harness {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n\n");var F=n.createPlugin({name:"@fullcalendar/timeline",premiumReleaseDate:"2022-12-07",deps:[a.default],initialView:"timelineDay",views:{timeline:{component:N,usesMinMaxTime:!0,eventResizableFromStart:!0},timelineDay:{type:"timeline",duration:{days:1}},timelineWeek:{type:"timeline",duration:{weeks:1}},timelineMonth:{type:"timeline",duration:{months:1}},timelineYear:{type:"timeline",duration:{years:1}}}}),B={__proto__:null,TimelineView:N,buildSlatCols:H,TimelineLane:z,TimelineLaneBg:P,TimelineHeader:R,TimelineSlats:k,buildTimelineDateProfile:c,TimelineCoords:b,coordToCss:y,coordsToCss:C,TimelineLaneSlicer:M,TimelineHeaderRows:S};return t.globalPlugins.push(F),e.Internal=B,e.default=F,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar.Internal,FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Preact,FullCalendar.ScrollGrid.Internal);
package/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { createPlugin } from '@fullcalendar/core/index.js';
2
2
  import premiumCommonPlugin from '@fullcalendar/premium-common/index.js';
3
3
  import { TimelineView } from './internal.js';
4
- import '@fullcalendar/scrollgrid/index.js';
5
4
  import { injectStyles } from '@fullcalendar/core/internal.js';
6
5
  import '@fullcalendar/core/preact.js';
7
6
  import '@fullcalendar/scrollgrid/internal.js';
@@ -11,7 +10,7 @@ injectStyles(css_248z);
11
10
 
12
11
  var index = createPlugin({
13
12
  name: '@fullcalendar/timeline',
14
- premiumReleaseDate: '2022-11-22',
13
+ premiumReleaseDate: '2022-12-07',
15
14
  deps: [premiumCommonPlugin],
16
15
  initialView: 'timelineDay',
17
16
  views: {
package/internal.js CHANGED
@@ -1,4 +1,4 @@
1
- import { config, createFormatter, greatestDurationDenominator, asCleanDays, createDuration, wholeDivideDurations, asRoughMs, addDays, startOfDay, asRoughSeconds, asRoughMinutes, diffWholeDays, isInt, computeVisibleDayRange, padStart, BaseComponent, memoizeObjArg, memoize, getDateMeta, ContentContainer, getSlotClassNames, getDayClassNames, buildNavLinkAttrs, PositionCache, findDirectChildren, rangeContainsMarker, NowTimer, NowIndicatorContainer, findElements, RefMap, multiplyDuration, SegHierarchy, groupIntersectingEntries, buildIsoString, computeEarliestSegStart, buildEventRangeKey, BgEvent, getSegMeta, renderFill, Slicer, intersectRanges, addMs, StandardEvent, MoreLinkContainer, isPropsEqual, sortEventSegs, mapHash, DateComponent, getStickyHeaderDates, getStickyFooterScrollbar, ViewContainer, renderScrollShim } from '@fullcalendar/core/internal.js';
1
+ import { config, createFormatter, greatestDurationDenominator, asCleanDays, createDuration, wholeDivideDurations, asRoughMs, addDays, startOfDay, asRoughSeconds, asRoughMinutes, diffWholeDays, isInt, computeVisibleDayRange, padStart, BaseComponent, memoizeObjArg, memoize, getDateMeta, ContentContainer, getSlotClassNames, getDayClassNames, buildNavLinkAttrs, PositionCache, findDirectChildren, rangeContainsMarker, NowTimer, NowIndicatorContainer, findElements, RefMap, multiplyDuration, SegHierarchy, groupIntersectingEntries, buildIsoString, computeEarliestSegStart, buildEventRangeKey, BgEvent, getSegMeta, renderFill, Slicer, intersectRanges, addMs, StandardEvent, MoreLinkContainer, sortEventSegs, mapHash, isPropsEqual, DateComponent, getStickyHeaderDates, getStickyFooterScrollbar, ViewContainer, renderScrollShim } from '@fullcalendar/core/internal.js';
2
2
  import { createElement, Fragment, createRef } from '@fullcalendar/core/preact.js';
3
3
  import { ScrollGrid } from '@fullcalendar/scrollgrid/internal.js';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullcalendar/timeline",
3
- "version": "6.0.0-beta.2",
3
+ "version": "6.0.0-beta.4",
4
4
  "keywords": [
5
5
  "calendar",
6
6
  "event",
@@ -25,34 +25,34 @@
25
25
  "title": "FullCalendar Timeline Plugin",
26
26
  "description": "Display events on a horizontal time axis (without resources)",
27
27
  "dependencies": {
28
- "@fullcalendar/premium-common": "6.0.0-beta.2",
29
- "@fullcalendar/scrollgrid": "6.0.0-beta.2"
28
+ "@fullcalendar/premium-common": "6.0.0-beta.4",
29
+ "@fullcalendar/scrollgrid": "6.0.0-beta.4"
30
30
  },
31
31
  "peerDependencies": {
32
- "@fullcalendar/core": "6.0.0-beta.2"
32
+ "@fullcalendar/core": "6.0.0-beta.4"
33
33
  },
34
34
  "type": "module",
35
35
  "main": "./index.cjs",
36
36
  "module": "./index.js",
37
37
  "types": "./index.d.ts",
38
38
  "unpkg": "./index.global.min.js",
39
- "jsdelvr": "./index.global.min.js",
39
+ "jsdelivr": "./index.global.min.js",
40
40
  "exports": {
41
41
  "./package.json": "./package.json",
42
42
  "./index.cjs": "./index.cjs",
43
43
  "./index.js": "./index.js",
44
44
  ".": {
45
- "require": "./index.cjs",
46
- "import": "./index.js",
47
45
  "types": "./index.d.ts",
48
- "default": "./index.global.js"
46
+ "require": "./index.cjs",
47
+ "import": "./index.js"
49
48
  },
50
49
  "./internal.cjs": "./internal.cjs",
51
50
  "./internal.js": "./internal.js",
52
51
  "./internal": {
52
+ "types": "./internal.d.ts",
53
53
  "require": "./internal.cjs",
54
- "import": "./internal.js",
55
- "types": "./internal.d.ts"
54
+ "import": "./internal.js"
56
55
  }
57
- }
56
+ },
57
+ "sideEffects": false
58
58
  }