@fullcalendar/timeline
Advanced tools
+1
-1
@@ -24,3 +24,3 @@ 'use strict'; | ||
| name: '@fullcalendar/timeline', | ||
| premiumReleaseDate: '2025-12-20', | ||
| premiumReleaseDate: '2025-12-31', | ||
| deps: [premiumCommonPlugin__default["default"]], | ||
@@ -27,0 +27,0 @@ initialView: 'timelineDay', |
+57
-24
@@ -447,8 +447,17 @@ 'use strict'; | ||
| render() { | ||
| var _a; | ||
| let { props } = this; | ||
| let { tDateProfile, slotWidth } = props; | ||
| let { tDateProfile, slotWidth, slatStartIndex, slatCount } = props; | ||
| let { slotDates, slotDatesMajor } = tDateProfile; | ||
| return (preact.createElement("div", { "aria-hidden": true, className: core.joinClassNames(classNames__default["default"].flexRow, classNames__default["default"].fill), style: { height: props.height } }, slotDates.map((slotDate, i) => { | ||
| slatStartIndex = props.slatStartIndex || 0; | ||
| if (slatStartIndex || slatCount !== undefined) { | ||
| slotDates = slotDates.slice(slatStartIndex, slatStartIndex + slatCount); | ||
| } | ||
| return (preact.createElement("div", { "aria-hidden": true, className: core.joinClassNames(classNames__default["default"].flexRow, classNames__default["default"].fillY), style: { | ||
| height: props.height, | ||
| width: ((_a = props.slotWidth) !== null && _a !== void 0 ? _a : 0) * slotDates.length, | ||
| insetInlineStart: 0, | ||
| } }, slotDates.map((slotDate, i) => { | ||
| let key = slotDate.toISOString(); | ||
| return (preact.createElement(TimelineSlatCell, { key: key, date: slotDate, dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isMajor: slotDatesMajor[i], borderStart: Boolean(i), | ||
| return (preact.createElement(TimelineSlatCell, { key: key, date: slotDate, dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isMajor: slotDatesMajor[slatStartIndex + i], borderStart: Boolean(slatStartIndex + i), | ||
| // dimensions | ||
@@ -575,9 +584,16 @@ width: slotWidth })); | ||
| const { options } = context; | ||
| return (preact.createElement("div", { className: internal.joinArrayishClassNames(options.slotHeaderRowClass, classNames__default["default"].flexRow, classNames__default["default"].grow, props.rowLevel // not the last row? | ||
| let { cells, cellStartIndex, cellCount } = props; | ||
| cellStartIndex = cellStartIndex || 0; | ||
| if (cellStartIndex || cellCount !== undefined) { | ||
| cells = cells.slice(cellStartIndex, cellStartIndex + cellCount); | ||
| } | ||
| return (preact.createElement("div", { className: internal.joinArrayishClassNames(props.className, options.slotHeaderRowClass, classNames__default["default"].flexRow, classNames__default["default"].grow, props.rowLevel // not the last row? | ||
| ? classNames__default["default"].borderOnlyB | ||
| : classNames__default["default"].borderNone), style: { | ||
| insetInlineStart: props.insetInlineStart, | ||
| width: props.width, | ||
| // we assign height because we allow cells to have distorted heights for visual effect | ||
| // but we still want to keep the overall extrenal mass | ||
| height: state.innerHeight, | ||
| } }, props.cells.map((cell, cellI) => { | ||
| } }, cells.map((cell, cellI) => { | ||
| // TODO: make this part of the cell obj? | ||
@@ -588,3 +604,3 @@ // TODO: rowUnit seems wrong sometimes. says 'month' when it should be day | ||
| const key = cell.rowUnit + ':' + cell.date.toISOString(); | ||
| return (preact.createElement(TimelineHeaderCell, { key: key, cell: cell, rowLevel: props.rowLevel, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, todayRange: props.todayRange, nowDate: props.nowDate, isFirst: cellI === 0, | ||
| return (preact.createElement(TimelineHeaderCell, { key: key, cell: cell, rowLevel: props.rowLevel, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, todayRange: props.todayRange, nowDate: props.nowDate, isFirst: cellStartIndex + cellI === 0, | ||
| // refs | ||
@@ -791,17 +807,26 @@ innerWidthRef: innerWidthRefMap.createRef(key), innerHeightRef: innerHeightRefMap.createRef(key), | ||
| function computeManySegHorizontals(segs, segMinWidth, dateEnv, tDateProfile, slotWidth) { | ||
| function computeManySegHorizontals(segs, segMinWidth, dateEnv, tDateProfile, slotWidth, clipStart = 0, // uses it as a new origin! | ||
| clipEnd = Infinity) { | ||
| const res = {}; | ||
| for (const seg of segs) { | ||
| res[internal.getEventKey(seg)] = computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth); | ||
| const horizontals = computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth, clipStart, clipEnd); | ||
| if (horizontals) { | ||
| res[internal.getEventKey(seg)] = horizontals; | ||
| } | ||
| } | ||
| return res; | ||
| } | ||
| function computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth) { | ||
| const startCoord = dateToCoord(seg.startDate, dateEnv, tDateProfile, slotWidth); | ||
| const endCoord = dateToCoord(seg.endDate, dateEnv, tDateProfile, slotWidth); | ||
| let size = endCoord - startCoord; | ||
| if (segMinWidth) { | ||
| size = Math.max(size, segMinWidth); | ||
| function computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth, clipStart = 0, // uses it as a new origin! | ||
| clipEnd = Infinity) { | ||
| let startCoord = dateToCoord(seg.startDate, dateEnv, tDateProfile, slotWidth); | ||
| let endCoord = dateToCoord(seg.endDate, dateEnv, tDateProfile, slotWidth); | ||
| startCoord = Math.max(startCoord, clipStart); | ||
| endCoord = Math.min(endCoord, clipEnd); | ||
| if (startCoord < endCoord) { | ||
| let size = endCoord - startCoord; | ||
| if (segMinWidth) { | ||
| size = Math.max(size, segMinWidth); | ||
| } | ||
| return { start: startCoord - clipStart, size }; | ||
| } | ||
| return { start: startCoord, size }; | ||
| } | ||
@@ -912,3 +937,3 @@ function computeFgSegPlacements(// mostly horizontals | ||
| let fgSegHorizontals = props.slotWidth != null | ||
| ? computeManySegHorizontals(fgSegs, options.eventMinWidth, context.dateEnv, tDateProfile, props.slotWidth) | ||
| ? computeManySegHorizontals(fgSegs, options.eventMinWidth, context.dateEnv, tDateProfile, props.slotWidth, props.clipStart, props.clipEnd) | ||
| : {}; | ||
@@ -930,3 +955,3 @@ let [fgSegTops, hiddenGroups, hiddenGroupTops, totalHeight] = computeFgSegPlacements(fgSegs, fgSegHorizontals, segHeightRefMap.current, moreLinkHeightRefMap.current, options.eventOrderStrict, options.eventMaxStack); | ||
| renderFgSegs(segs, segHorizontals, segTops, hiddenGroups, hiddenGroupTops, isMirror) { | ||
| let { props, segHeightRefMap, moreLinkHeightRefMap } = this; | ||
| const { props, segHeightRefMap, moreLinkHeightRefMap } = this; | ||
| return (preact.createElement(preact.Fragment, null, | ||
@@ -984,11 +1009,19 @@ segs.map((seg) => { | ||
| renderSegs(segs, fillType) { | ||
| let { tDateProfile, todayRange, nowDate, slotWidth } = this.props; | ||
| let { dateEnv, options } = this.context; | ||
| var _a, _b; | ||
| const { props, context } = this; | ||
| const { dateEnv, options } = context; | ||
| const { tDateProfile, todayRange, nowDate, slotWidth } = props; | ||
| const clipStart = (_a = props.clipStart) !== null && _a !== void 0 ? _a : 0; | ||
| const clipEnd = (_b = props.clipEnd) !== null && _b !== void 0 ? _b : Infinity; | ||
| return (preact.createElement(preact.Fragment, null, segs.map((seg) => { | ||
| let hStyle = {}; | ||
| if (slotWidth != null) { | ||
| let segHorizontal = computeSegHorizontals(seg, undefined, dateEnv, tDateProfile, slotWidth); | ||
| hStyle = { insetInlineStart: segHorizontal.start, width: segHorizontal.size }; | ||
| let { start, size } = computeSegHorizontals(seg, undefined, dateEnv, tDateProfile, slotWidth); | ||
| let end = start + size; | ||
| start = Math.max(start, clipStart); | ||
| end = Math.min(end, clipEnd); | ||
| if (start < end) { | ||
| return (preact.createElement("div", { key: internal.buildEventRangeKey(seg.eventRange), className: classNames__default["default"].fillY, style: { | ||
| insetInlineStart: start - clipStart, | ||
| width: end - start, | ||
| } }, fillType === 'bg-event' ? (preact.createElement(internal.BgEvent, Object.assign({ eventRange: seg.eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isVertical: false }, internal.getEventRangeMeta(seg.eventRange, todayRange, nowDate)))) : (internal.renderFill(fillType, options)))); | ||
| } | ||
| return (preact.createElement("div", { key: internal.buildEventRangeKey(seg.eventRange), className: classNames__default["default"].fillY, style: hStyle }, fillType === 'bg-event' ? (preact.createElement(internal.BgEvent, Object.assign({ eventRange: seg.eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isVertical: false }, internal.getEventRangeMeta(seg.eventRange, todayRange, nowDate)))) : (internal.renderFill(fillType, options)))); | ||
| }))); | ||
@@ -995,0 +1028,0 @@ } |
+1
-1
@@ -16,3 +16,3 @@ import { createPlugin } from '@fullcalendar/core'; | ||
| name: '@fullcalendar/timeline', | ||
| premiumReleaseDate: '2025-12-20', | ||
| premiumReleaseDate: '2025-12-31', | ||
| deps: [premiumCommonPlugin], | ||
@@ -19,0 +19,0 @@ initialView: 'timelineDay', |
+13
-2
@@ -94,2 +94,4 @@ import { DateComponent, ViewProps, Hit, DateRange, DateMarker, DateProfile, DateEnv, BaseOptionsRefined, DateProfileGenerator, Slicer, CoordRange, BaseComponent, EventRangeProps, CoordSpan, SegGroup, EventSegUiInteractionState } from '@fullcalendar/core/internal'; | ||
| slotWidth: number | undefined; | ||
| clipStart?: number; | ||
| clipEnd?: number; | ||
| heightRef?: Ref<number>; | ||
@@ -125,3 +127,5 @@ } | ||
| eventResizeSegs: (TimelineRange & EventRangeProps)[] | null; | ||
| slotWidth: number | undefined; | ||
| slotWidth: number; | ||
| clipStart?: number; | ||
| clipEnd?: number; | ||
| } | ||
@@ -138,2 +142,4 @@ declare class TimelineBg extends BaseComponent<TimelineBgProps> { | ||
| todayRange: DateRange; | ||
| slatStartIndex?: number; | ||
| slatCount?: number; | ||
| height?: number; | ||
@@ -155,2 +161,3 @@ slotWidth: number | undefined; | ||
| interface TimelineHeaderRowProps { | ||
| className?: string; | ||
| dateProfile: DateProfile; | ||
@@ -162,2 +169,6 @@ tDateProfile: TimelineDateProfile; | ||
| cells: TimelineHeaderCellData[]; | ||
| insetInlineStart?: number; | ||
| cellStartIndex?: number; | ||
| cellCount?: number; | ||
| width?: number; | ||
| innerHeighRef?: Ref<number>; | ||
@@ -199,2 +210,2 @@ innerWidthRef?: Ref<number>; | ||
| export { TimelineBg, TimelineDateProfile, TimelineFg, TimelineHeaderRow, TimelineLaneSlicer, TimelineNowIndicatorArrow, TimelineNowIndicatorLine, TimelineRange, TimelineSlats, TimelineView, buildTimelineDateProfile, computeSlotWidth, getTimelineSlotEl, timeToCoord }; | ||
| export { TimelineBg, TimelineDateProfile, TimelineFg, TimelineHeaderCellData, TimelineHeaderRow, TimelineLaneSlicer, TimelineNowIndicatorArrow, TimelineNowIndicatorLine, TimelineRange, TimelineSlats, TimelineView, buildTimelineDateProfile, computeSlotWidth, getTimelineSlotEl, timeToCoord }; |
+57
-24
@@ -439,8 +439,17 @@ import { joinClassNames } from '@fullcalendar/core'; | ||
| render() { | ||
| var _a; | ||
| let { props } = this; | ||
| let { tDateProfile, slotWidth } = props; | ||
| let { tDateProfile, slotWidth, slatStartIndex, slatCount } = props; | ||
| let { slotDates, slotDatesMajor } = tDateProfile; | ||
| return (createElement("div", { "aria-hidden": true, className: joinClassNames(classNames.flexRow, classNames.fill), style: { height: props.height } }, slotDates.map((slotDate, i) => { | ||
| slatStartIndex = props.slatStartIndex || 0; | ||
| if (slatStartIndex || slatCount !== undefined) { | ||
| slotDates = slotDates.slice(slatStartIndex, slatStartIndex + slatCount); | ||
| } | ||
| return (createElement("div", { "aria-hidden": true, className: joinClassNames(classNames.flexRow, classNames.fillY), style: { | ||
| height: props.height, | ||
| width: ((_a = props.slotWidth) !== null && _a !== void 0 ? _a : 0) * slotDates.length, | ||
| insetInlineStart: 0, | ||
| } }, slotDates.map((slotDate, i) => { | ||
| let key = slotDate.toISOString(); | ||
| return (createElement(TimelineSlatCell, { key: key, date: slotDate, dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isMajor: slotDatesMajor[i], borderStart: Boolean(i), | ||
| return (createElement(TimelineSlatCell, { key: key, date: slotDate, dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isMajor: slotDatesMajor[slatStartIndex + i], borderStart: Boolean(slatStartIndex + i), | ||
| // dimensions | ||
@@ -567,9 +576,16 @@ width: slotWidth })); | ||
| const { options } = context; | ||
| return (createElement("div", { className: joinArrayishClassNames(options.slotHeaderRowClass, classNames.flexRow, classNames.grow, props.rowLevel // not the last row? | ||
| let { cells, cellStartIndex, cellCount } = props; | ||
| cellStartIndex = cellStartIndex || 0; | ||
| if (cellStartIndex || cellCount !== undefined) { | ||
| cells = cells.slice(cellStartIndex, cellStartIndex + cellCount); | ||
| } | ||
| return (createElement("div", { className: joinArrayishClassNames(props.className, options.slotHeaderRowClass, classNames.flexRow, classNames.grow, props.rowLevel // not the last row? | ||
| ? classNames.borderOnlyB | ||
| : classNames.borderNone), style: { | ||
| insetInlineStart: props.insetInlineStart, | ||
| width: props.width, | ||
| // we assign height because we allow cells to have distorted heights for visual effect | ||
| // but we still want to keep the overall extrenal mass | ||
| height: state.innerHeight, | ||
| } }, props.cells.map((cell, cellI) => { | ||
| } }, cells.map((cell, cellI) => { | ||
| // TODO: make this part of the cell obj? | ||
@@ -580,3 +596,3 @@ // TODO: rowUnit seems wrong sometimes. says 'month' when it should be day | ||
| const key = cell.rowUnit + ':' + cell.date.toISOString(); | ||
| return (createElement(TimelineHeaderCell, { key: key, cell: cell, rowLevel: props.rowLevel, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, todayRange: props.todayRange, nowDate: props.nowDate, isFirst: cellI === 0, | ||
| return (createElement(TimelineHeaderCell, { key: key, cell: cell, rowLevel: props.rowLevel, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, todayRange: props.todayRange, nowDate: props.nowDate, isFirst: cellStartIndex + cellI === 0, | ||
| // refs | ||
@@ -783,17 +799,26 @@ innerWidthRef: innerWidthRefMap.createRef(key), innerHeightRef: innerHeightRefMap.createRef(key), | ||
| function computeManySegHorizontals(segs, segMinWidth, dateEnv, tDateProfile, slotWidth) { | ||
| function computeManySegHorizontals(segs, segMinWidth, dateEnv, tDateProfile, slotWidth, clipStart = 0, // uses it as a new origin! | ||
| clipEnd = Infinity) { | ||
| const res = {}; | ||
| for (const seg of segs) { | ||
| res[getEventKey(seg)] = computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth); | ||
| const horizontals = computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth, clipStart, clipEnd); | ||
| if (horizontals) { | ||
| res[getEventKey(seg)] = horizontals; | ||
| } | ||
| } | ||
| return res; | ||
| } | ||
| function computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth) { | ||
| const startCoord = dateToCoord(seg.startDate, dateEnv, tDateProfile, slotWidth); | ||
| const endCoord = dateToCoord(seg.endDate, dateEnv, tDateProfile, slotWidth); | ||
| let size = endCoord - startCoord; | ||
| if (segMinWidth) { | ||
| size = Math.max(size, segMinWidth); | ||
| function computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth, clipStart = 0, // uses it as a new origin! | ||
| clipEnd = Infinity) { | ||
| let startCoord = dateToCoord(seg.startDate, dateEnv, tDateProfile, slotWidth); | ||
| let endCoord = dateToCoord(seg.endDate, dateEnv, tDateProfile, slotWidth); | ||
| startCoord = Math.max(startCoord, clipStart); | ||
| endCoord = Math.min(endCoord, clipEnd); | ||
| if (startCoord < endCoord) { | ||
| let size = endCoord - startCoord; | ||
| if (segMinWidth) { | ||
| size = Math.max(size, segMinWidth); | ||
| } | ||
| return { start: startCoord - clipStart, size }; | ||
| } | ||
| return { start: startCoord, size }; | ||
| } | ||
@@ -904,3 +929,3 @@ function computeFgSegPlacements(// mostly horizontals | ||
| let fgSegHorizontals = props.slotWidth != null | ||
| ? computeManySegHorizontals(fgSegs, options.eventMinWidth, context.dateEnv, tDateProfile, props.slotWidth) | ||
| ? computeManySegHorizontals(fgSegs, options.eventMinWidth, context.dateEnv, tDateProfile, props.slotWidth, props.clipStart, props.clipEnd) | ||
| : {}; | ||
@@ -922,3 +947,3 @@ let [fgSegTops, hiddenGroups, hiddenGroupTops, totalHeight] = computeFgSegPlacements(fgSegs, fgSegHorizontals, segHeightRefMap.current, moreLinkHeightRefMap.current, options.eventOrderStrict, options.eventMaxStack); | ||
| renderFgSegs(segs, segHorizontals, segTops, hiddenGroups, hiddenGroupTops, isMirror) { | ||
| let { props, segHeightRefMap, moreLinkHeightRefMap } = this; | ||
| const { props, segHeightRefMap, moreLinkHeightRefMap } = this; | ||
| return (createElement(Fragment, null, | ||
@@ -976,11 +1001,19 @@ segs.map((seg) => { | ||
| renderSegs(segs, fillType) { | ||
| let { tDateProfile, todayRange, nowDate, slotWidth } = this.props; | ||
| let { dateEnv, options } = this.context; | ||
| var _a, _b; | ||
| const { props, context } = this; | ||
| const { dateEnv, options } = context; | ||
| const { tDateProfile, todayRange, nowDate, slotWidth } = props; | ||
| const clipStart = (_a = props.clipStart) !== null && _a !== void 0 ? _a : 0; | ||
| const clipEnd = (_b = props.clipEnd) !== null && _b !== void 0 ? _b : Infinity; | ||
| return (createElement(Fragment, null, segs.map((seg) => { | ||
| let hStyle = {}; | ||
| if (slotWidth != null) { | ||
| let segHorizontal = computeSegHorizontals(seg, undefined, dateEnv, tDateProfile, slotWidth); | ||
| hStyle = { insetInlineStart: segHorizontal.start, width: segHorizontal.size }; | ||
| let { start, size } = computeSegHorizontals(seg, undefined, dateEnv, tDateProfile, slotWidth); | ||
| let end = start + size; | ||
| start = Math.max(start, clipStart); | ||
| end = Math.min(end, clipEnd); | ||
| if (start < end) { | ||
| return (createElement("div", { key: buildEventRangeKey(seg.eventRange), className: classNames.fillY, style: { | ||
| insetInlineStart: start - clipStart, | ||
| width: end - start, | ||
| } }, fillType === 'bg-event' ? (createElement(BgEvent, Object.assign({ eventRange: seg.eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isVertical: false }, getEventRangeMeta(seg.eventRange, todayRange, nowDate)))) : (renderFill(fillType, options)))); | ||
| } | ||
| return (createElement("div", { key: buildEventRangeKey(seg.eventRange), className: classNames.fillY, style: hStyle }, fillType === 'bg-event' ? (createElement(BgEvent, Object.assign({ eventRange: seg.eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isVertical: false }, getEventRangeMeta(seg.eventRange, todayRange, nowDate)))) : (renderFill(fillType, options)))); | ||
| }))); | ||
@@ -987,0 +1020,0 @@ } |
+2
-2
| /*! | ||
| FullCalendar Timeline Plugin v7.0.0-beta.5 | ||
| FullCalendar Timeline Plugin v7.0.0-beta.6 | ||
| Docs & License: https://fullcalendar.io/docs/timeline-view-no-resources | ||
| (c) 2025 Adam Shaw | ||
| */ | ||
| FullCalendar.Timeline=function(e,t,n,i,a,s,r){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}var o=l(n),d=l(a);i.config.MAX_TIMELINE_SLOTS=1e3;const c=[{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 u(e,t,n,a){let s={labelInterval:n.slotHeaderInterval,slotDuration:n.slotDuration};!function(e,t,n){const{currentRange:a}=t;if(e.labelInterval){n.countDurationsBetween(a.start,a.end,e.labelInterval)>i.config.MAX_TIMELINE_SLOTS&&(console.warn("slotHeaderInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){n.countDurationsBetween(a.start,a.end,e.slotDuration)>i.config.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){const t=i.wholeDivideDurations(e.labelInterval,e.slotDuration);(null===t||t<1)&&(console.warn("slotHeaderInterval must be a multiple of slotDuration"),e.slotDuration=null)}}(s,e,t),f(s,e,t),function(e,t,n){const{currentRange:a}=t;let{slotDuration:s}=e;if(!s){const r=f(e,t,n);for(let e of c){const t=i.createDuration(e),n=i.wholeDivideDurations(r,t);if(null!==n&&n>1&&n<=6){s=t;break}}if(s){n.countDurationsBetween(a.start,a.end,s)>200&&(s=null)}s||(s=r),e.slotDuration=s}}(s,e,t);let r=n.slotHeaderFormat,l=Array.isArray(r)?r:null!=r?[r]:function(e,t,n,a){let s,r;const{labelInterval:l}=e,{currentRange:o}=t;let d=i.greatestDurationDenominator(l).unit;const c=a.weekNumbers;let u=s=r=null;"week"!==d||c||(d="day");switch(d){case"year":u={year:"numeric"};break;case"month":n.diffWholeYears(o.start,o.end)>1&&(u={year:"numeric"}),s={month:"short"};break;case"week":n.diffWholeYears(o.start,o.end)>1&&(u={year:"numeric"}),s={week:"narrow"};break;case"day":n.diffWholeYears(o.start,o.end)>1?u={year:"numeric",month:"long"}:n.diffWholeMonths(o.start,o.end)>1&&(u={month:"long"}),c&&(s={week:"short"}),r={weekday:"narrow",day:"numeric"};break;case"hour":c&&(u={week:"short"}),i.diffWholeDays(o.start,o.end)>1&&(s={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),r={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":i.asRoughMinutes(l)/60>=6?(u={hour:"numeric",meridiem:"short"},s=e=>":"+i.padStart(e.date.minute,2)):u={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":i.asRoughSeconds(l)/60>=6?(u={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},s=e=>":"+i.padStart(e.date.second,2)):u={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"};break;case"millisecond":u={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"},s=e=>"."+i.padStart(e.millisecond,3)}return[].concat(u||[],s||[],r||[])}(s,e,t,n);s.headerFormats=l.map(e=>i.createFormatter(e)),s.isTimeScale=Boolean(s.slotDuration.milliseconds);let o=null;if(!s.isTimeScale){const e=i.greatestDurationDenominator(s.slotDuration).unit;/year|month|week/.test(e)&&(o=e)}s.largeUnit=o;let d,u,p=n.snapDuration;p&&(d=i.createDuration(p),u=i.wholeDivideDurations(s.slotDuration,d)),null==u&&(d=s.slotDuration,u=1),s.snapDuration=d,s.snapsPerSlot=u;let S=i.asRoughMs(e.slotMaxTime)-i.asRoughMs(e.slotMinTime),v=h(e.renderRange.start,s,t),D=h(e.renderRange.end,s,t);s.isTimeScale&&(v=t.add(v,e.slotMinTime),D=t.add(i.addDays(D,-1),e.slotMaxTime)),s.timeWindowMs=S,s.normalizedRange={start:v,end:D};let R=[],y=[],w=v,E=i.computeMajorUnit(e,t);for(;w<D;)m(w,s,e,a)&&(R.push(w),y.push(i.isMajorUnit(w,E,t))),w=t.add(w,s.slotDuration);s.slotDates=R,s.slotDatesMajor=y;let M=-1,b=0;const T=[],C=[];for(w=v;w<D;)m(w,s,e,a)?(M+=1,T.push(M),C.push(b)):T.push(M+.5),w=t.add(w,s.snapDuration),b+=1;return s.snapDiffToIndex=T,s.snapIndexToDiff=C,s.snapCnt=M+1,s.slotCnt=s.snapCnt/s.snapsPerSlot,s.cellRows=function(e,t,n){let a=e.slotDates,s=e.headerFormats,r=s.map(()=>[]),l=i.asCleanDays(e.slotDuration),o=7===l?"week":1===l?"day":null,d=s.map(e=>e.getSmallestUnit?e.getSmallestUnit():null);for(let l=0;l<a.length;l+=1){let c=a[l];for(let a=0;a<s.length;a+=1){let l=s[a],u=r[a],h=u[u.length-1],m=a===s.length-1,f=s.length>1&&!m,p=i.isMajorUnit(c,n,t),S=null,v=d[a]||(m?o:null);if(f){let[e]=t.format(c,l);h&&h.text===e?h.colspan+=1:S=g(c,p,e,v)}else if(!h||i.isInt(t.countDurationsBetween(e.normalizedRange.start,c,e.labelInterval))){let[e]=t.format(c,l);S=g(c,p,e,v)}else h.colspan+=1;S&&u.push(S)}}return r}(s,t,E),s.slotsPerLabel=i.wholeDivideDurations(s.labelInterval,s.slotDuration),s}function h(e,t,n){let a=e;return t.isTimeScale||(a=i.startOfDay(a),t.largeUnit&&(a=n.startOf(a,t.largeUnit))),a}function m(e,t,n,a){if(a.isHiddenDay(e))return!1;if(t.isTimeScale){let a=i.startOfDay(e),s=e.valueOf()-a.valueOf()-i.asRoughMs(n.slotMinTime);return s=(s%864e5+864e5)%864e5,s<t.timeWindowMs}return!0}function f(e,t,n){const{currentRange:a}=t;let{labelInterval:s}=e;if(!s){let t;if(e.slotDuration){for(t of c){const n=i.createDuration(t),a=i.wholeDivideDurations(n,e.slotDuration);if(null!==a&&a<=6){s=n;break}}s||(s=e.slotDuration)}else for(t of c){s=i.createDuration(t);if(n.countDurationsBetween(a.start,a.end,s)>=18)break}e.labelInterval=s}return s}function g(e,t,n,i){return{date:e,isMajor:t,text:n,rowUnit:i,colspan:1}}class p extends i.BaseComponent{constructor(){super(...arguments),this.getDateMeta=i.memoize(i.getDateMeta)}render(){let{props:e,context:n}=this,{dateEnv:a,options:r}=n,{date:l,tDateProfile:o,isMajor:c}=e,u=this.getDateMeta(e.date,a,e.dateProfile,e.todayRange,e.nowDate),h=o.isTimeScale&&!i.isInt(a.countDurationsBetween(o.normalizedRange.start,e.date,o.labelInterval)),m=Object.assign(Object.assign({},u),{isMajor:c,isMinor:h,view:n.viewApi});return s.createElement(i.ContentContainer,{tag:"div",className:t.joinClassNames(d.default.tight,d.default.alignStart,e.borderStart?d.default.borderOnlyS:d.default.borderNone,d.default.internalTimelineSlot),attrs:Object.assign({"data-date":a.formatIso(l,{omitTimeZoneOffset:!0,omitTime:!o.isTimeScale})},u.isToday?{"aria-current":"date"}:{}),style:{width:e.width},renderProps:m,generatorName:void 0,classNameGenerator:r.slotLaneClass,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount})}}class S extends i.BaseComponent{render(){let{props:e}=this,{tDateProfile:n,slotWidth:i}=e,{slotDates:a,slotDatesMajor:r}=n;return s.createElement("div",{"aria-hidden":!0,className:t.joinClassNames(d.default.flexRow,d.default.fill),style:{height:e.height}},a.map((t,a)=>{let l=t.toISOString();return s.createElement(p,{key:l,date:t,dateProfile:e.dateProfile,tDateProfile:n,nowDate:e.nowDate,todayRange:e.todayRange,isMajor:r[a],borderStart:Boolean(a),width:i})}))}}class v extends i.BaseComponent{constructor(){super(...arguments),this.getDateMeta=i.memoize(i.getDateMeta),this.innerWrapperElRef=s.createRef()}render(){let{props:e,state:n,context:a}=this,{dateEnv:r,options:l}=a,{cell:o,dateProfile:c,tDateProfile:u}=e,h=this.getDateMeta(o.date,r,c,e.todayRange,e.nowDate),m=l.navLinks&&!h.isDisabled&&o.rowUnit&&"time"!==o.rowUnit,f=u.isTimeScale&&!e.rowLevel,g=Object.assign(Object.assign({},h),{level:e.rowLevel,isMajor:o.isMajor,isMinor:!1,isNarrow:!1,isTime:f,hasNavLink:m,text:o.text,isFirst:e.isFirst,view:a.viewApi});const{slotHeaderAlign:p}=l,S=this.align="function"==typeof p?p({level:e.rowLevel,isTime:f}):p,v=this.isSticky=e.rowLevel&&!1!==l.slotHeaderSticky;let R;return v&&("center"===S?null!=n.innerWidth&&(R=`calc(50% - ${n.innerWidth/2}px)`):R="number"==typeof l.slotHeaderSticky||"string"==typeof l.slotHeaderSticky?l.slotHeaderSticky:0),s.createElement(i.ContentContainer,{tag:"div",className:i.joinArrayishClassNames(d.default.tight,d.default.flexCol,e.isFirst?d.default.borderNone:d.default.borderOnlyS,"center"===S?d.default.alignCenter:"end"===S?d.default.alignEnd:d.default.alignStart,d.default.internalTimelineSlot),attrs:Object.assign({"data-date":r.formatIso(o.date,{omitTime:!u.isTimeScale,omitTimeZoneOffset:!0})},h.isToday?{"aria-current":"date"}:{}),style:{width:null!=e.slotWidth?e.slotWidth*o.colspan:void 0},renderProps:g,generatorName:"slotHeaderContent",customGenerator:l.slotHeaderContent,defaultGenerator:D,classNameGenerator:l.slotHeaderClass,didMount:l.slotHeaderDidMount,willUnmount:l.slotHeaderWillUnmount},e=>s.createElement("div",{ref:this.innerWrapperElRef,className:t.joinClassNames(d.default.flexCol,d.default.rigid,v&&d.default.sticky),style:{left:R,right:R}},s.createElement(e,{tag:"div",attrs:m?i.buildNavLinkAttrs(a,o.date,o.rowUnit,void 0,!1):{},className:i.generateClassName(l.slotHeaderInnerClass,g)})))}componentDidMount(){const{props:e}=this,t=this.innerWrapperElRef.current;this.disconnectSize=i.watchSize(t,(t,n)=>{i.setRef(e.innerWidthRef,t),i.setRef(e.innerHeightRef,n),"center"===this.align&&this.isSticky&&this.setState({innerWidth:t})})}componentWillUnmount(){const{props:e}=this;this.disconnectSize(),i.setRef(e.innerWidthRef,null),i.setRef(e.innerHeightRef,null)}}function D(e){return e.text}class R extends i.BaseComponent{constructor(){super(...arguments),this.innerWidthRefMap=new i.RefMap(()=>{i.afterSize(this.handleInnerWidths)}),this.innerHeightRefMap=new i.RefMap(()=>{i.afterSize(this.handleInnerHeights)}),this.handleInnerWidths=()=>{const e=this.innerWidthRefMap.current;let t=0;for(const n of e.values())t=Math.max(t,n);i.setRef(this.props.innerWidthRef,t)},this.handleInnerHeights=()=>{const e=this.innerHeightRefMap.current;let t=0;for(const n of e.values())t=Math.max(t,n);i.setRef(this.props.innerHeighRef,t),this.setState({innerHeight:t})}}render(){const{props:e,innerWidthRefMap:t,innerHeightRefMap:n,state:a,context:r}=this,{options:l}=r;return s.createElement("div",{className:i.joinArrayishClassNames(l.slotHeaderRowClass,d.default.flexRow,d.default.grow,e.rowLevel?d.default.borderOnlyB:d.default.borderNone),style:{height:a.innerHeight}},e.cells.map((i,a)=>{const r=i.rowUnit+":"+i.date.toISOString();return s.createElement(v,{key:r,cell:i,rowLevel:e.rowLevel,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,todayRange:e.todayRange,nowDate:e.nowDate,isFirst:0===a,innerWidthRef:t.createRef(r),innerHeightRef:n.createRef(r),slotWidth:e.slotWidth})}))}componentWillUnmount(){i.setRef(this.props.innerWidthRef,null),i.setRef(this.props.innerHeighRef,null)}}function y(e,t,n,i,a){if(null==i||null==a)return[void 0,void 0,!1];const s=a/e;let r,l;return s>=(n=Math.max(n||0,(i+1)/t,30))?(r=!0,l=s):(r=!1,l=Math.max(n,s)),[l*e,l,r]}function w(e,t,n,a,s){let r=t.add(n.activeRange.start,e);return a.isTimeScale||(r=i.startOfDay(r)),E(r,t,a,s)}function E(e,t,n,a){return function(e,t,n){let a=n.countDurationsBetween(t.normalizedRange.start,e,t.snapDuration);if(a<0)return 0;if(a>=t.snapDiffToIndex.length)return t.snapCnt;let s=Math.floor(a),r=t.snapDiffToIndex[s];i.isInt(r)?r+=a-s:r=Math.ceil(r);return r}(e,n,t)/n.snapsPerSlot*a}class M extends i.BaseComponent{render(){const{props:e,context:n}=this,a=null==e.slotWidth?{}:{insetInlineStart:E(e.nowDate,n.dateEnv,e.tDateProfile,e.slotWidth)};return s.createElement("div",{className:d.default.fill,style:{zIndex:2,pointerEvents:"none"}},s.createElement(i.NowIndicatorLineContainer,{className:t.joinClassNames(d.default.fillY,d.default.noMarginY,d.default.borderlessY),style:a,date:e.nowDate}),s.createElement("div",{className:t.joinClassNames(d.default.flexCol,d.default.fillY),style:a},s.createElement("div",{className:d.default.stickyT},s.createElement(i.NowIndicatorDot,null))))}}class b extends i.BaseComponent{render(){const{props:e,context:n}=this,a=null==e.slotWidth?{}:{insetInlineStart:E(e.nowDate,n.dateEnv,e.tDateProfile,e.slotWidth)};return s.createElement("div",{className:t.joinClassNames(d.default.fill,d.default.crop),style:{zIndex:2,pointerEvents:"none"}},s.createElement(i.NowIndicatorHeaderContainer,{className:d.default.abs,style:a,date:e.nowDate}))}}function T(e,t){return e.querySelectorAll("."+d.default.internalTimelineSlot)[t]}function C(e,t,n){let a=n.countDurationsBetween(t.normalizedRange.start,e,t.snapDuration);if(a<0)return 0;if(a>=t.snapDiffToIndex.length)return t.snapCnt;let s=Math.floor(a),r=t.snapDiffToIndex[s];return i.isInt(r)?r+=a-s:r=Math.ceil(r),r}class I extends i.Slicer{sliceRange(e,t,n,a,s){let r=function(e,t,n){if(!t.isTimeScale&&(e=i.computeVisibleDayRange(e),t.largeUnit)){let i=e;((e={start:n.startOf(e.start,t.largeUnit),end:n.startOf(e.end,t.largeUnit)}).end.valueOf()!==i.end.valueOf()||e.end<=e.start)&&(e={start:e.start,end:n.add(e.end,t.slotDuration)})}return e}(e,a,s),l=[];if(C(r.start,a,s)<C(r.end,a,s)){let e=i.intersectRanges(r,a.normalizedRange);e&&l.push({startDate:e.start,endDate:e.end,isStart:e.start.valueOf()===r.start.valueOf()&&m(e.start,a,t,n),isEnd:e.end.valueOf()===r.end.valueOf()&&m(i.addMs(e.end,-1),a,t,n)})}return l}}const W=i.createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});class P extends i.BaseComponent{render(){let{props:e}=this;return s.createElement(i.StandardEvent,Object.assign({},e,{display:"row",defaultTimeFormat:W,defaultDisplayEventTime:!e.isTimeScale}))}}class N extends i.BaseComponent{render(){let{props:e}=this,{hiddenSegs:t,resourceId:n}=e,a=n?{resourceId:n}:{};return s.createElement(i.MoreLinkContainer,{display:"row",allDayDate:null,segs:t,hiddenSegs:t,dateProfile:e.dateProfile,todayRange:e.todayRange,dateSpanProps:a,isNarrow:!1,isMicro:!1,popoverContent:()=>s.createElement(s.Fragment,null,t.map(t=>{let{eventRange:n}=t,{instanceId:a}=n.instance,r=Boolean(e.eventDrag&&e.eventDrag.affectedInstances[a]),l=Boolean(e.eventResize&&e.eventResize.affectedInstances[a]),o=r||l;return s.createElement("div",{key:a,style:{visibility:o?"hidden":void 0}},s.createElement(P,Object.assign({isTimeScale:e.isTimeScale,eventRange:n,isStart:t.isStart,isEnd:t.isEnd,isDragging:r,isResizing:l,isMirror:!1,isSelected:a===e.eventSelection},i.getEventRangeMeta(n,e.todayRange,e.nowDate))))}))})}}function x(e,t,n,a,s){const r={};for(const l of e)r[i.getEventKey(l)]=H(l,t,n,a,s);return r}function H(e,t,n,i,a){const s=E(e.startDate,n,i,a);let r=E(e.endDate,n,i,a)-s;return t&&(r=Math.max(r,t)),{start:s,size:r}}class k extends s.Component{constructor(){super(...arguments),this.rootElRef=s.createRef()}render(){const{props:e}=this;return s.createElement("div",{className:d.default.abs,style:e.style,ref:this.rootElRef},e.children)}componentDidMount(){const e=this.rootElRef.current;this.disconnectHeight=i.watchHeight(e,e=>{i.setRef(this.props.heightRef,e)})}componentWillUnmount(){this.disconnectHeight(),i.setRef(this.props.heightRef,null)}}class z extends i.BaseComponent{constructor(){super(...arguments),this.sortEventSegs=i.memoize(i.sortEventSegs),this.segHeightRefMap=new i.RefMap(()=>{i.afterSize(this.handleSegHeights)}),this.moreLinkHeightRefMap=new i.RefMap(()=>{i.afterSize(this.handleMoreLinkHeights)}),this.handleMoreLinkHeights=()=>{this.setState({moreLinkHeightRev:this.moreLinkHeightRefMap.rev})},this.handleSegHeights=()=>{this.setState({segHeightRev:this.segHeightRefMap.rev})}}render(){let{props:e,context:n,segHeightRefMap:a,moreLinkHeightRefMap:r}=this,{options:l}=n,{tDateProfile:o}=e,c=(e.eventDrag?e.eventDrag.segs:null)||(e.eventResize?e.eventResize.segs:null)||[],u=this.sortEventSegs(e.fgEventSegs,l.eventOrder),h=null!=e.slotWidth?x(u,l.eventMinWidth,n.dateEnv,o,e.slotWidth):{},[m,f,g,p]=function(e,t,n,a,s,r){const l=[];for(const n of e){const e=t[i.getEventKey(n)];e&&l.push(Object.assign(Object.assign({},n),{start:e.start,end:e.start+e.size}))}const o=new i.SegHierarchy(l,e=>n.get(i.getEventKey(e)),s,void 0,r),d=new Map;o.traverseSegs((e,t)=>{d.set(i.getEventKey(e),t)});const{hiddenSegs:c}=o;let u=0;for(const e of l){const t=i.getEventKey(e),a=n.get(t),s=d.get(t);null!=a&&null!=s&&(u=Math.max(u,s+a))}const h=i.groupIntersectingSegs(c),m=new Map;o.strictOrder=!0;for(const e of h){const{levelCoord:t}=o.findInsertion(e,0),n=a.get(e.key)||0;m.set(e.key,t),u=Math.max(u,t+n)}return[d,h,m,u]}(u,h,a.current,r.current,l.eventOrderStrict,l.eventMaxStack);return this.totalHeight=p,s.createElement("div",{className:t.joinClassNames(d.default.rel,d.default.noShrink),style:{height:p}},this.renderFgSegs(u,h,m,f,g,!1),this.renderFgSegs(c,e.slotWidth?x(c,l.eventMinWidth,n.dateEnv,o,e.slotWidth):{},m,[],new Map,!0))}renderFgSegs(e,t,n,a,r,l){let{props:o,segHeightRefMap:d,moreLinkHeightRefMap:c}=this;return s.createElement(s.Fragment,null,e.map(e=>{const{eventRange:a}=e,{instanceId:r}=a.instance,c=n.get(r),u=t[r],h=u||{},m=Boolean(o.eventDrag&&o.eventDrag.affectedInstances[r]),f=Boolean(o.eventResize&&o.eventResize.affectedInstances[r]),g=!l&&(m||f||!u||null==c);return s.createElement(k,{key:r,style:{visibility:g?"hidden":void 0,zIndex:1,top:c||0,insetInlineStart:h.start,width:h.size},heightRef:l?void 0:d.createRef(r)},s.createElement(P,Object.assign({isTimeScale:o.tDateProfile.isTimeScale,eventRange:a,isStart:e.isStart,isEnd:e.isEnd,isDragging:m,isResizing:f,isMirror:l,isSelected:r===o.eventSelection},i.getEventRangeMeta(a,o.todayRange,o.nowDate))))}),a.map(e=>s.createElement(k,{key:e.key,style:{top:r.get(e.key)||0,insetInlineStart:e.start,width:e.end-e.start},heightRef:c.createRef(e.key)},s.createElement(N,{hiddenSegs:e.segs,dateProfile:o.dateProfile,nowDate:o.nowDate,todayRange:o.todayRange,isTimeScale:o.tDateProfile.isTimeScale,eventDrag:o.eventDrag,eventResize:o.eventResize,eventSelection:o.eventSelection,resourceId:o.resourceId}))))}componentDidUpdate(){this.totalHeight!==this.firedTotalHeight&&(this.firedTotalHeight=this.totalHeight,i.setRef(this.props.heightRef,this.totalHeight))}componentWillUnmount(){i.setRef(this.props.heightRef,null)}}class j extends i.BaseComponent{render(){let{props:e}=this,t=[].concat(e.eventResizeSegs||[],e.dateSelectionSegs);return s.createElement(s.Fragment,null,this.renderSegs(e.businessHourSegs||[],"non-business"),this.renderSegs(e.bgEventSegs||[],"bg-event"),this.renderSegs(t,"highlight"))}renderSegs(e,t){let{tDateProfile:n,todayRange:a,nowDate:r,slotWidth:l}=this.props,{dateEnv:o,options:c}=this.context;return s.createElement(s.Fragment,null,e.map(e=>{let u={};if(null!=l){let t=H(e,void 0,o,n,l);u={insetInlineStart:t.start,width:t.size}}return s.createElement("div",{key:i.buildEventRangeKey(e.eventRange),className:d.default.fillY,style:u},"bg-event"===t?s.createElement(i.BgEvent,Object.assign({eventRange:e.eventRange,isStart:e.isStart,isEnd:e.isEnd,isVertical:!1},i.getEventRangeMeta(e.eventRange,a,r))):i.renderFill(t,c))}))}}class O extends i.DateComponent{constructor(){super(...arguments),this.buildTimelineDateProfile=i.memoize(u),this.computeSlotWidth=i.memoize(y),this.headerScrollerRef=s.createRef(),this.bodyScrollerRef=s.createRef(),this.footerScrollerRef=s.createRef(),this.headerRowInnerWidthMap=new i.RefMap(()=>{i.afterSize(this.handleSlotInnerWidths)}),this.scrollTime=null,this.slicer=new I,this.handleSlotInnerWidths=()=>{const e=this.headerRowInnerWidthMap.current.get(this.tDateProfile.cellRows.length-1);null!=e&&e!==this.state.slotInnerWidth&&this.setState({slotInnerWidth:e})},this.handleTotalWidth=e=>{this.setState({totalWidth:e})},this.handleClientWidth=e=>{this.setState({clientWidth:e})},this.handleTimeScrollRequest=e=>{this.scrollTime=e,this.applyTimeScroll()},this.handleTimeScrollEnd=e=>{e&&(this.scrollTime=null)},this.handeBodyEl=e=>{this.bodyEl=e,e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){const{props:e,state:n,context:a}=this,{options:r}=a,{totalWidth:l,clientWidth:o}=n,c=null!=l&&null!=o?l-o:void 0,u=this.tDateProfile=this.buildTimelineDateProfile(e.dateProfile,a.dateEnv,r,a.dateProfileGenerator),{cellRows:h}=u,m=i.greatestDurationDenominator(u.slotDuration).unit,f=!e.forPrint&&!i.getIsHeightAuto(r),g=!e.forPrint&&i.getStickyHeaderDates(r),p=!e.forPrint&&i.getStickyFooterScrollbar(r),[v,D]=this.computeSlotWidth(u.slotCnt,u.slotsPerLabel,r.slotMinWidth,n.slotInnerWidth,o);this.slotWidth=D;let y=this.slicer.sliceProps(e,e.dateProfile,u.isTimeScale?null:r.nextDayThreshold,a,e.dateProfile,a.dateProfileGenerator,u,a.dateEnv);return s.createElement(i.NowTimer,{unit:m},(n,l)=>{const o=r.nowIndicator&&null!=D&&i.rangeContainsMarker(e.dateProfile.currentRange,n);return s.createElement(i.ViewContainer,{viewSpec:a.viewSpec,className:i.joinArrayishClassNames(!e.forPrint&&d.default.flexCol,e.className,r.tableClass,d.default.isolate),borderlessX:e.borderlessX,borderlessTop:e.borderlessTop,borderlessBottom:e.borderlessBottom,noEdgeEffects:e.noEdgeEffects},s.createElement("div",{className:t.joinClassNames(i.generateClassName(r.tableHeaderClass,{isSticky:g}),e.borderlessX&&d.default.borderlessX,d.default.flexCol,g&&d.default.tableHeaderSticky),style:{zIndex:1}},s.createElement(i.Scroller,{horizontal:!0,hideScrollbars:!0,className:d.default.flexRow,ref:this.headerScrollerRef},s.createElement("div",{className:t.joinClassNames(d.default.rel,null==v&&d.default.liquid),style:{width:v}},h.map((t,i)=>{const a=h.length-i-1;return s.createElement(R,{key:i,dateProfile:e.dateProfile,tDateProfile:u,nowDate:n,todayRange:l,rowLevel:a,cells:t,slotWidth:D,innerWidthRef:this.headerRowInnerWidthMap.createRef(i)})}),o&&s.createElement(b,{tDateProfile:u,nowDate:n,slotWidth:D})),Boolean(c)&&s.createElement("div",{className:i.joinArrayishClassNames(i.generateClassName(r.fillerClass,{isHeader:!0}),d.default.borderOnlyS),style:{minWidth:c}})),s.createElement("div",{className:i.generateClassName(r.slotHeaderDividerClass,{isHeader:!0,options:{dayMinWidth:r.dayMinWidth}})})),s.createElement(i.Scroller,{vertical:f,horizontal:!0,hideScrollbars:p||e.forPrint,className:i.joinArrayishClassNames(r.tableBodyClass,e.borderlessX&&d.default.borderlessX,g&&d.default.borderlessTop,(g||e.noEdgeEffects)&&d.default.noEdgeEffects,d.default.flexCol,f&&d.default.liquid),style:{zIndex:0},ref:this.bodyScrollerRef,clientWidthRef:this.handleClientWidth},s.createElement("div",{"aria-label":r.eventsHint,className:t.joinClassNames(d.default.rel,d.default.grow),style:{width:v},ref:this.handeBodyEl},s.createElement(S,{dateProfile:e.dateProfile,tDateProfile:u,nowDate:n,todayRange:l,slotWidth:D}),s.createElement(j,{tDateProfile:u,nowDate:n,todayRange:l,bgEventSegs:y.bgEventSegs,businessHourSegs:y.businessHourSegs,dateSelectionSegs:y.dateSelectionSegs,eventResizeSegs:y.eventResize?y.eventResize.segs:null,slotWidth:D}),s.createElement("div",{className:i.joinArrayishClassNames(r.timelineTopClass)}),s.createElement(z,{dateProfile:e.dateProfile,tDateProfile:u,nowDate:n,todayRange:l,fgEventSegs:y.fgEventSegs,eventDrag:y.eventDrag,eventResize:y.eventResize,eventSelection:y.eventSelection,slotWidth:D}),s.createElement("div",{className:i.joinArrayishClassNames(r.timelineBottomClass)}),o&&s.createElement(M,{tDateProfile:u,nowDate:n,slotWidth:D}))),Boolean(p)&&s.createElement(i.FooterScrollbar,{isSticky:!0,canvasWidth:v,scrollerRef:this.footerScrollerRef}),s.createElement(i.Ruler,{widthRef:this.handleTotalWidth}))})}componentDidMount(){this.syncedScroller=new r.ScrollerSyncer(!0),this.updateSyncedScroller(),this.resetScroll(),this.context.emitter.on("_timeScrollRequest",this.handleTimeScrollRequest),this.syncedScroller.addScrollEndListener(this.handleTimeScrollEnd)}componentDidUpdate(e){this.updateSyncedScroller(),e.dateProfile!==this.props.dateProfile&&this.context.options.scrollTimeReset?this.resetScroll():this.applyTimeScroll()}componentWillUnmount(){this.syncedScroller.destroy(),this.context.emitter.off("_timeScrollRequest",this.handleTimeScrollRequest),this.syncedScroller.removeScrollEndListener(this.handleTimeScrollEnd)}updateSyncedScroller(){this.syncedScroller.handleChildren([this.headerScrollerRef.current,this.bodyScrollerRef.current,this.footerScrollerRef.current])}resetScroll(){this.handleTimeScrollRequest(this.context.options.scrollTime)}applyTimeScroll(){const{props:e,context:t,tDateProfile:n,scrollTime:i,slotWidth:a}=this;if(null!=i&&null!=a){let s=w(i,t.dateEnv,e.dateProfile,n,a);s&&(s+=1),this.syncedScroller.scrollTo({x:s})}}queryHit(e,t,n,a,s){const{props:r,context:l,tDateProfile:o,slotWidth:d}=this,{dateEnv:c}=l;if(d){const n=e?a-t:t,l=Math.floor(n/d),u=(n-l*d)/d,h=Math.floor(u*o.snapsPerSlot);let m,f,g=c.add(o.slotDates[l],i.multiplyDuration(o.snapDuration,h)),p=c.add(g,o.snapDuration),S=d/o.snapsPerSlot,v=l*d+S*h,D=v+S;return e?(m=a-D,f=a-v):(m=v,f=D),{dateProfile:r.dateProfile,dateSpan:{range:{start:g,end:p},allDay:!o.isTimeScale},rect:{left:m,right:f,top:0,bottom:s},getDayEl:()=>T(this.bodyEl,l),layer:0}}return null}}const B={timelineTopClass:i.identity,timelineBottomClass:i.identity};var L=t.createPlugin({name:"@fullcalendar/timeline",premiumReleaseDate:"2025-12-20",deps:[o.default],initialView:"timelineDay",optionRefiners:B,views:{timeline:{component:O,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}}}}),F={__proto__:null,TimelineView:O,TimelineFg:z,TimelineBg:j,TimelineSlats:S,buildTimelineDateProfile:u,computeSlotWidth:y,timeToCoord:w,TimelineLaneSlicer:I,TimelineHeaderRow:R,TimelineNowIndicatorArrow:b,TimelineNowIndicatorLine:M,getTimelineSlotEl:T};return t.globalPlugins.push(L),e.Internal=F,e.default=L,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Internal,FullCalendar.InternalClassNames,FullCalendar.Preact,FullCalendar.ScrollGrid.Internal); | ||
| FullCalendar.Timeline=function(e,t,n,i,a,s,r){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}var o=l(n),d=l(a);i.config.MAX_TIMELINE_SLOTS=1e3;const c=[{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 u(e,t,n,a){let s={labelInterval:n.slotHeaderInterval,slotDuration:n.slotDuration};!function(e,t,n){const{currentRange:a}=t;if(e.labelInterval){n.countDurationsBetween(a.start,a.end,e.labelInterval)>i.config.MAX_TIMELINE_SLOTS&&(console.warn("slotHeaderInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){n.countDurationsBetween(a.start,a.end,e.slotDuration)>i.config.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){const t=i.wholeDivideDurations(e.labelInterval,e.slotDuration);(null===t||t<1)&&(console.warn("slotHeaderInterval must be a multiple of slotDuration"),e.slotDuration=null)}}(s,e,t),f(s,e,t),function(e,t,n){const{currentRange:a}=t;let{slotDuration:s}=e;if(!s){const r=f(e,t,n);for(let e of c){const t=i.createDuration(e),n=i.wholeDivideDurations(r,t);if(null!==n&&n>1&&n<=6){s=t;break}}if(s){n.countDurationsBetween(a.start,a.end,s)>200&&(s=null)}s||(s=r),e.slotDuration=s}}(s,e,t);let r=n.slotHeaderFormat,l=Array.isArray(r)?r:null!=r?[r]:function(e,t,n,a){let s,r;const{labelInterval:l}=e,{currentRange:o}=t;let d=i.greatestDurationDenominator(l).unit;const c=a.weekNumbers;let u=s=r=null;"week"!==d||c||(d="day");switch(d){case"year":u={year:"numeric"};break;case"month":n.diffWholeYears(o.start,o.end)>1&&(u={year:"numeric"}),s={month:"short"};break;case"week":n.diffWholeYears(o.start,o.end)>1&&(u={year:"numeric"}),s={week:"narrow"};break;case"day":n.diffWholeYears(o.start,o.end)>1?u={year:"numeric",month:"long"}:n.diffWholeMonths(o.start,o.end)>1&&(u={month:"long"}),c&&(s={week:"short"}),r={weekday:"narrow",day:"numeric"};break;case"hour":c&&(u={week:"short"}),i.diffWholeDays(o.start,o.end)>1&&(s={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),r={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":i.asRoughMinutes(l)/60>=6?(u={hour:"numeric",meridiem:"short"},s=e=>":"+i.padStart(e.date.minute,2)):u={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":i.asRoughSeconds(l)/60>=6?(u={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},s=e=>":"+i.padStart(e.date.second,2)):u={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"};break;case"millisecond":u={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"},s=e=>"."+i.padStart(e.millisecond,3)}return[].concat(u||[],s||[],r||[])}(s,e,t,n);s.headerFormats=l.map(e=>i.createFormatter(e)),s.isTimeScale=Boolean(s.slotDuration.milliseconds);let o=null;if(!s.isTimeScale){const e=i.greatestDurationDenominator(s.slotDuration).unit;/year|month|week/.test(e)&&(o=e)}s.largeUnit=o;let d,u,p=n.snapDuration;p&&(d=i.createDuration(p),u=i.wholeDivideDurations(s.slotDuration,d)),null==u&&(d=s.slotDuration,u=1),s.snapDuration=d,s.snapsPerSlot=u;let S=i.asRoughMs(e.slotMaxTime)-i.asRoughMs(e.slotMinTime),v=h(e.renderRange.start,s,t),D=h(e.renderRange.end,s,t);s.isTimeScale&&(v=t.add(v,e.slotMinTime),D=t.add(i.addDays(D,-1),e.slotMaxTime)),s.timeWindowMs=S,s.normalizedRange={start:v,end:D};let R=[],y=[],w=v,E=i.computeMajorUnit(e,t);for(;w<D;)m(w,s,e,a)&&(R.push(w),y.push(i.isMajorUnit(w,E,t))),w=t.add(w,s.slotDuration);s.slotDates=R,s.slotDatesMajor=y;let M=-1,b=0;const T=[],C=[];for(w=v;w<D;)m(w,s,e,a)?(M+=1,T.push(M),C.push(b)):T.push(M+.5),w=t.add(w,s.snapDuration),b+=1;return s.snapDiffToIndex=T,s.snapIndexToDiff=C,s.snapCnt=M+1,s.slotCnt=s.snapCnt/s.snapsPerSlot,s.cellRows=function(e,t,n){let a=e.slotDates,s=e.headerFormats,r=s.map(()=>[]),l=i.asCleanDays(e.slotDuration),o=7===l?"week":1===l?"day":null,d=s.map(e=>e.getSmallestUnit?e.getSmallestUnit():null);for(let l=0;l<a.length;l+=1){let c=a[l];for(let a=0;a<s.length;a+=1){let l=s[a],u=r[a],h=u[u.length-1],m=a===s.length-1,f=s.length>1&&!m,p=i.isMajorUnit(c,n,t),S=null,v=d[a]||(m?o:null);if(f){let[e]=t.format(c,l);h&&h.text===e?h.colspan+=1:S=g(c,p,e,v)}else if(!h||i.isInt(t.countDurationsBetween(e.normalizedRange.start,c,e.labelInterval))){let[e]=t.format(c,l);S=g(c,p,e,v)}else h.colspan+=1;S&&u.push(S)}}return r}(s,t,E),s.slotsPerLabel=i.wholeDivideDurations(s.labelInterval,s.slotDuration),s}function h(e,t,n){let a=e;return t.isTimeScale||(a=i.startOfDay(a),t.largeUnit&&(a=n.startOf(a,t.largeUnit))),a}function m(e,t,n,a){if(a.isHiddenDay(e))return!1;if(t.isTimeScale){let a=i.startOfDay(e),s=e.valueOf()-a.valueOf()-i.asRoughMs(n.slotMinTime);return s=(s%864e5+864e5)%864e5,s<t.timeWindowMs}return!0}function f(e,t,n){const{currentRange:a}=t;let{labelInterval:s}=e;if(!s){let t;if(e.slotDuration){for(t of c){const n=i.createDuration(t),a=i.wholeDivideDurations(n,e.slotDuration);if(null!==a&&a<=6){s=n;break}}s||(s=e.slotDuration)}else for(t of c){s=i.createDuration(t);if(n.countDurationsBetween(a.start,a.end,s)>=18)break}e.labelInterval=s}return s}function g(e,t,n,i){return{date:e,isMajor:t,text:n,rowUnit:i,colspan:1}}class p extends i.BaseComponent{constructor(){super(...arguments),this.getDateMeta=i.memoize(i.getDateMeta)}render(){let{props:e,context:n}=this,{dateEnv:a,options:r}=n,{date:l,tDateProfile:o,isMajor:c}=e,u=this.getDateMeta(e.date,a,e.dateProfile,e.todayRange,e.nowDate),h=o.isTimeScale&&!i.isInt(a.countDurationsBetween(o.normalizedRange.start,e.date,o.labelInterval)),m=Object.assign(Object.assign({},u),{isMajor:c,isMinor:h,view:n.viewApi});return s.createElement(i.ContentContainer,{tag:"div",className:t.joinClassNames(d.default.tight,d.default.alignStart,e.borderStart?d.default.borderOnlyS:d.default.borderNone,d.default.internalTimelineSlot),attrs:Object.assign({"data-date":a.formatIso(l,{omitTimeZoneOffset:!0,omitTime:!o.isTimeScale})},u.isToday?{"aria-current":"date"}:{}),style:{width:e.width},renderProps:m,generatorName:void 0,classNameGenerator:r.slotLaneClass,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount})}}class S extends i.BaseComponent{render(){var e;let{props:n}=this,{tDateProfile:i,slotWidth:a,slatStartIndex:r,slatCount:l}=n,{slotDates:o,slotDatesMajor:c}=i;return r=n.slatStartIndex||0,(r||void 0!==l)&&(o=o.slice(r,r+l)),s.createElement("div",{"aria-hidden":!0,className:t.joinClassNames(d.default.flexRow,d.default.fillY),style:{height:n.height,width:(null!==(e=n.slotWidth)&&void 0!==e?e:0)*o.length,insetInlineStart:0}},o.map((e,t)=>{let l=e.toISOString();return s.createElement(p,{key:l,date:e,dateProfile:n.dateProfile,tDateProfile:i,nowDate:n.nowDate,todayRange:n.todayRange,isMajor:c[r+t],borderStart:Boolean(r+t),width:a})}))}}class v extends i.BaseComponent{constructor(){super(...arguments),this.getDateMeta=i.memoize(i.getDateMeta),this.innerWrapperElRef=s.createRef()}render(){let{props:e,state:n,context:a}=this,{dateEnv:r,options:l}=a,{cell:o,dateProfile:c,tDateProfile:u}=e,h=this.getDateMeta(o.date,r,c,e.todayRange,e.nowDate),m=l.navLinks&&!h.isDisabled&&o.rowUnit&&"time"!==o.rowUnit,f=u.isTimeScale&&!e.rowLevel,g=Object.assign(Object.assign({},h),{level:e.rowLevel,isMajor:o.isMajor,isMinor:!1,isNarrow:!1,isTime:f,hasNavLink:m,text:o.text,isFirst:e.isFirst,view:a.viewApi});const{slotHeaderAlign:p}=l,S=this.align="function"==typeof p?p({level:e.rowLevel,isTime:f}):p,v=this.isSticky=e.rowLevel&&!1!==l.slotHeaderSticky;let R;return v&&("center"===S?null!=n.innerWidth&&(R=`calc(50% - ${n.innerWidth/2}px)`):R="number"==typeof l.slotHeaderSticky||"string"==typeof l.slotHeaderSticky?l.slotHeaderSticky:0),s.createElement(i.ContentContainer,{tag:"div",className:i.joinArrayishClassNames(d.default.tight,d.default.flexCol,e.isFirst?d.default.borderNone:d.default.borderOnlyS,"center"===S?d.default.alignCenter:"end"===S?d.default.alignEnd:d.default.alignStart,d.default.internalTimelineSlot),attrs:Object.assign({"data-date":r.formatIso(o.date,{omitTime:!u.isTimeScale,omitTimeZoneOffset:!0})},h.isToday?{"aria-current":"date"}:{}),style:{width:null!=e.slotWidth?e.slotWidth*o.colspan:void 0},renderProps:g,generatorName:"slotHeaderContent",customGenerator:l.slotHeaderContent,defaultGenerator:D,classNameGenerator:l.slotHeaderClass,didMount:l.slotHeaderDidMount,willUnmount:l.slotHeaderWillUnmount},e=>s.createElement("div",{ref:this.innerWrapperElRef,className:t.joinClassNames(d.default.flexCol,d.default.rigid,v&&d.default.sticky),style:{left:R,right:R}},s.createElement(e,{tag:"div",attrs:m?i.buildNavLinkAttrs(a,o.date,o.rowUnit,void 0,!1):{},className:i.generateClassName(l.slotHeaderInnerClass,g)})))}componentDidMount(){const{props:e}=this,t=this.innerWrapperElRef.current;this.disconnectSize=i.watchSize(t,(t,n)=>{i.setRef(e.innerWidthRef,t),i.setRef(e.innerHeightRef,n),"center"===this.align&&this.isSticky&&this.setState({innerWidth:t})})}componentWillUnmount(){const{props:e}=this;this.disconnectSize(),i.setRef(e.innerWidthRef,null),i.setRef(e.innerHeightRef,null)}}function D(e){return e.text}class R extends i.BaseComponent{constructor(){super(...arguments),this.innerWidthRefMap=new i.RefMap(()=>{i.afterSize(this.handleInnerWidths)}),this.innerHeightRefMap=new i.RefMap(()=>{i.afterSize(this.handleInnerHeights)}),this.handleInnerWidths=()=>{const e=this.innerWidthRefMap.current;let t=0;for(const n of e.values())t=Math.max(t,n);i.setRef(this.props.innerWidthRef,t)},this.handleInnerHeights=()=>{const e=this.innerHeightRefMap.current;let t=0;for(const n of e.values())t=Math.max(t,n);i.setRef(this.props.innerHeighRef,t),this.setState({innerHeight:t})}}render(){const{props:e,innerWidthRefMap:t,innerHeightRefMap:n,state:a,context:r}=this,{options:l}=r;let{cells:o,cellStartIndex:c,cellCount:u}=e;return c=c||0,(c||void 0!==u)&&(o=o.slice(c,c+u)),s.createElement("div",{className:i.joinArrayishClassNames(e.className,l.slotHeaderRowClass,d.default.flexRow,d.default.grow,e.rowLevel?d.default.borderOnlyB:d.default.borderNone),style:{insetInlineStart:e.insetInlineStart,width:e.width,height:a.innerHeight}},o.map((i,a)=>{const r=i.rowUnit+":"+i.date.toISOString();return s.createElement(v,{key:r,cell:i,rowLevel:e.rowLevel,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,todayRange:e.todayRange,nowDate:e.nowDate,isFirst:c+a===0,innerWidthRef:t.createRef(r),innerHeightRef:n.createRef(r),slotWidth:e.slotWidth})}))}componentWillUnmount(){i.setRef(this.props.innerWidthRef,null),i.setRef(this.props.innerHeighRef,null)}}function y(e,t,n,i,a){if(null==i||null==a)return[void 0,void 0,!1];const s=a/e;let r,l;return s>=(n=Math.max(n||0,(i+1)/t,30))?(r=!0,l=s):(r=!1,l=Math.max(n,s)),[l*e,l,r]}function w(e,t,n,a,s){let r=t.add(n.activeRange.start,e);return a.isTimeScale||(r=i.startOfDay(r)),E(r,t,a,s)}function E(e,t,n,a){return function(e,t,n){let a=n.countDurationsBetween(t.normalizedRange.start,e,t.snapDuration);if(a<0)return 0;if(a>=t.snapDiffToIndex.length)return t.snapCnt;let s=Math.floor(a),r=t.snapDiffToIndex[s];i.isInt(r)?r+=a-s:r=Math.ceil(r);return r}(e,n,t)/n.snapsPerSlot*a}class M extends i.BaseComponent{render(){const{props:e,context:n}=this,a=null==e.slotWidth?{}:{insetInlineStart:E(e.nowDate,n.dateEnv,e.tDateProfile,e.slotWidth)};return s.createElement("div",{className:d.default.fill,style:{zIndex:2,pointerEvents:"none"}},s.createElement(i.NowIndicatorLineContainer,{className:t.joinClassNames(d.default.fillY,d.default.noMarginY,d.default.borderlessY),style:a,date:e.nowDate}),s.createElement("div",{className:t.joinClassNames(d.default.flexCol,d.default.fillY),style:a},s.createElement("div",{className:d.default.stickyT},s.createElement(i.NowIndicatorDot,null))))}}class b extends i.BaseComponent{render(){const{props:e,context:n}=this,a=null==e.slotWidth?{}:{insetInlineStart:E(e.nowDate,n.dateEnv,e.tDateProfile,e.slotWidth)};return s.createElement("div",{className:t.joinClassNames(d.default.fill,d.default.crop),style:{zIndex:2,pointerEvents:"none"}},s.createElement(i.NowIndicatorHeaderContainer,{className:d.default.abs,style:a,date:e.nowDate}))}}function T(e,t){return e.querySelectorAll("."+d.default.internalTimelineSlot)[t]}function C(e,t,n){let a=n.countDurationsBetween(t.normalizedRange.start,e,t.snapDuration);if(a<0)return 0;if(a>=t.snapDiffToIndex.length)return t.snapCnt;let s=Math.floor(a),r=t.snapDiffToIndex[s];return i.isInt(r)?r+=a-s:r=Math.ceil(r),r}class I extends i.Slicer{sliceRange(e,t,n,a,s){let r=function(e,t,n){if(!t.isTimeScale&&(e=i.computeVisibleDayRange(e),t.largeUnit)){let i=e;((e={start:n.startOf(e.start,t.largeUnit),end:n.startOf(e.end,t.largeUnit)}).end.valueOf()!==i.end.valueOf()||e.end<=e.start)&&(e={start:e.start,end:n.add(e.end,t.slotDuration)})}return e}(e,a,s),l=[];if(C(r.start,a,s)<C(r.end,a,s)){let e=i.intersectRanges(r,a.normalizedRange);e&&l.push({startDate:e.start,endDate:e.end,isStart:e.start.valueOf()===r.start.valueOf()&&m(e.start,a,t,n),isEnd:e.end.valueOf()===r.end.valueOf()&&m(i.addMs(e.end,-1),a,t,n)})}return l}}const W=i.createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});class x extends i.BaseComponent{render(){let{props:e}=this;return s.createElement(i.StandardEvent,Object.assign({},e,{display:"row",defaultTimeFormat:W,defaultDisplayEventTime:!e.isTimeScale}))}}class P extends i.BaseComponent{render(){let{props:e}=this,{hiddenSegs:t,resourceId:n}=e,a=n?{resourceId:n}:{};return s.createElement(i.MoreLinkContainer,{display:"row",allDayDate:null,segs:t,hiddenSegs:t,dateProfile:e.dateProfile,todayRange:e.todayRange,dateSpanProps:a,isNarrow:!1,isMicro:!1,popoverContent:()=>s.createElement(s.Fragment,null,t.map(t=>{let{eventRange:n}=t,{instanceId:a}=n.instance,r=Boolean(e.eventDrag&&e.eventDrag.affectedInstances[a]),l=Boolean(e.eventResize&&e.eventResize.affectedInstances[a]),o=r||l;return s.createElement("div",{key:a,style:{visibility:o?"hidden":void 0}},s.createElement(x,Object.assign({isTimeScale:e.isTimeScale,eventRange:n,isStart:t.isStart,isEnd:t.isEnd,isDragging:r,isResizing:l,isMirror:!1,isSelected:a===e.eventSelection},i.getEventRangeMeta(n,e.todayRange,e.nowDate))))}))})}}function N(e,t,n,a,s,r=0,l=1/0){const o={};for(const d of e){const e=H(d,t,n,a,s,r,l);e&&(o[i.getEventKey(d)]=e)}return o}function H(e,t,n,i,a,s=0,r=1/0){let l=E(e.startDate,n,i,a),o=E(e.endDate,n,i,a);if(l=Math.max(l,s),o=Math.min(o,r),l<o){let e=o-l;return t&&(e=Math.max(e,t)),{start:l-s,size:e}}}class k extends s.Component{constructor(){super(...arguments),this.rootElRef=s.createRef()}render(){const{props:e}=this;return s.createElement("div",{className:d.default.abs,style:e.style,ref:this.rootElRef},e.children)}componentDidMount(){const e=this.rootElRef.current;this.disconnectHeight=i.watchHeight(e,e=>{i.setRef(this.props.heightRef,e)})}componentWillUnmount(){this.disconnectHeight(),i.setRef(this.props.heightRef,null)}}class z extends i.BaseComponent{constructor(){super(...arguments),this.sortEventSegs=i.memoize(i.sortEventSegs),this.segHeightRefMap=new i.RefMap(()=>{i.afterSize(this.handleSegHeights)}),this.moreLinkHeightRefMap=new i.RefMap(()=>{i.afterSize(this.handleMoreLinkHeights)}),this.handleMoreLinkHeights=()=>{this.setState({moreLinkHeightRev:this.moreLinkHeightRefMap.rev})},this.handleSegHeights=()=>{this.setState({segHeightRev:this.segHeightRefMap.rev})}}render(){let{props:e,context:n,segHeightRefMap:a,moreLinkHeightRefMap:r}=this,{options:l}=n,{tDateProfile:o}=e,c=(e.eventDrag?e.eventDrag.segs:null)||(e.eventResize?e.eventResize.segs:null)||[],u=this.sortEventSegs(e.fgEventSegs,l.eventOrder),h=null!=e.slotWidth?N(u,l.eventMinWidth,n.dateEnv,o,e.slotWidth,e.clipStart,e.clipEnd):{},[m,f,g,p]=function(e,t,n,a,s,r){const l=[];for(const n of e){const e=t[i.getEventKey(n)];e&&l.push(Object.assign(Object.assign({},n),{start:e.start,end:e.start+e.size}))}const o=new i.SegHierarchy(l,e=>n.get(i.getEventKey(e)),s,void 0,r),d=new Map;o.traverseSegs((e,t)=>{d.set(i.getEventKey(e),t)});const{hiddenSegs:c}=o;let u=0;for(const e of l){const t=i.getEventKey(e),a=n.get(t),s=d.get(t);null!=a&&null!=s&&(u=Math.max(u,s+a))}const h=i.groupIntersectingSegs(c),m=new Map;o.strictOrder=!0;for(const e of h){const{levelCoord:t}=o.findInsertion(e,0),n=a.get(e.key)||0;m.set(e.key,t),u=Math.max(u,t+n)}return[d,h,m,u]}(u,h,a.current,r.current,l.eventOrderStrict,l.eventMaxStack);return this.totalHeight=p,s.createElement("div",{className:t.joinClassNames(d.default.rel,d.default.noShrink),style:{height:p}},this.renderFgSegs(u,h,m,f,g,!1),this.renderFgSegs(c,e.slotWidth?N(c,l.eventMinWidth,n.dateEnv,o,e.slotWidth):{},m,[],new Map,!0))}renderFgSegs(e,t,n,a,r,l){const{props:o,segHeightRefMap:d,moreLinkHeightRefMap:c}=this;return s.createElement(s.Fragment,null,e.map(e=>{const{eventRange:a}=e,{instanceId:r}=a.instance,c=n.get(r),u=t[r],h=u||{},m=Boolean(o.eventDrag&&o.eventDrag.affectedInstances[r]),f=Boolean(o.eventResize&&o.eventResize.affectedInstances[r]),g=!l&&(m||f||!u||null==c);return s.createElement(k,{key:r,style:{visibility:g?"hidden":void 0,zIndex:1,top:c||0,insetInlineStart:h.start,width:h.size},heightRef:l?void 0:d.createRef(r)},s.createElement(x,Object.assign({isTimeScale:o.tDateProfile.isTimeScale,eventRange:a,isStart:e.isStart,isEnd:e.isEnd,isDragging:m,isResizing:f,isMirror:l,isSelected:r===o.eventSelection},i.getEventRangeMeta(a,o.todayRange,o.nowDate))))}),a.map(e=>s.createElement(k,{key:e.key,style:{top:r.get(e.key)||0,insetInlineStart:e.start,width:e.end-e.start},heightRef:c.createRef(e.key)},s.createElement(P,{hiddenSegs:e.segs,dateProfile:o.dateProfile,nowDate:o.nowDate,todayRange:o.todayRange,isTimeScale:o.tDateProfile.isTimeScale,eventDrag:o.eventDrag,eventResize:o.eventResize,eventSelection:o.eventSelection,resourceId:o.resourceId}))))}componentDidUpdate(){this.totalHeight!==this.firedTotalHeight&&(this.firedTotalHeight=this.totalHeight,i.setRef(this.props.heightRef,this.totalHeight))}componentWillUnmount(){i.setRef(this.props.heightRef,null)}}class j extends i.BaseComponent{render(){let{props:e}=this,t=[].concat(e.eventResizeSegs||[],e.dateSelectionSegs);return s.createElement(s.Fragment,null,this.renderSegs(e.businessHourSegs||[],"non-business"),this.renderSegs(e.bgEventSegs||[],"bg-event"),this.renderSegs(t,"highlight"))}renderSegs(e,t){var n,a;const{props:r,context:l}=this,{dateEnv:o,options:c}=l,{tDateProfile:u,todayRange:h,nowDate:m,slotWidth:f}=r,g=null!==(n=r.clipStart)&&void 0!==n?n:0,p=null!==(a=r.clipEnd)&&void 0!==a?a:1/0;return s.createElement(s.Fragment,null,e.map(e=>{let{start:n,size:a}=H(e,void 0,o,u,f),r=n+a;if(n=Math.max(n,g),r=Math.min(r,p),n<r)return s.createElement("div",{key:i.buildEventRangeKey(e.eventRange),className:d.default.fillY,style:{insetInlineStart:n-g,width:r-n}},"bg-event"===t?s.createElement(i.BgEvent,Object.assign({eventRange:e.eventRange,isStart:e.isStart,isEnd:e.isEnd,isVertical:!1},i.getEventRangeMeta(e.eventRange,h,m))):i.renderFill(t,c))}))}}class O extends i.DateComponent{constructor(){super(...arguments),this.buildTimelineDateProfile=i.memoize(u),this.computeSlotWidth=i.memoize(y),this.headerScrollerRef=s.createRef(),this.bodyScrollerRef=s.createRef(),this.footerScrollerRef=s.createRef(),this.headerRowInnerWidthMap=new i.RefMap(()=>{i.afterSize(this.handleSlotInnerWidths)}),this.scrollTime=null,this.slicer=new I,this.handleSlotInnerWidths=()=>{const e=this.headerRowInnerWidthMap.current.get(this.tDateProfile.cellRows.length-1);null!=e&&e!==this.state.slotInnerWidth&&this.setState({slotInnerWidth:e})},this.handleTotalWidth=e=>{this.setState({totalWidth:e})},this.handleClientWidth=e=>{this.setState({clientWidth:e})},this.handleTimeScrollRequest=e=>{this.scrollTime=e,this.applyTimeScroll()},this.handleTimeScrollEnd=e=>{e&&(this.scrollTime=null)},this.handeBodyEl=e=>{this.bodyEl=e,e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){const{props:e,state:n,context:a}=this,{options:r}=a,{totalWidth:l,clientWidth:o}=n,c=null!=l&&null!=o?l-o:void 0,u=this.tDateProfile=this.buildTimelineDateProfile(e.dateProfile,a.dateEnv,r,a.dateProfileGenerator),{cellRows:h}=u,m=i.greatestDurationDenominator(u.slotDuration).unit,f=!e.forPrint&&!i.getIsHeightAuto(r),g=!e.forPrint&&i.getStickyHeaderDates(r),p=!e.forPrint&&i.getStickyFooterScrollbar(r),[v,D]=this.computeSlotWidth(u.slotCnt,u.slotsPerLabel,r.slotMinWidth,n.slotInnerWidth,o);this.slotWidth=D;let y=this.slicer.sliceProps(e,e.dateProfile,u.isTimeScale?null:r.nextDayThreshold,a,e.dateProfile,a.dateProfileGenerator,u,a.dateEnv);return s.createElement(i.NowTimer,{unit:m},(n,l)=>{const o=r.nowIndicator&&null!=D&&i.rangeContainsMarker(e.dateProfile.currentRange,n);return s.createElement(i.ViewContainer,{viewSpec:a.viewSpec,className:i.joinArrayishClassNames(!e.forPrint&&d.default.flexCol,e.className,r.tableClass,d.default.isolate),borderlessX:e.borderlessX,borderlessTop:e.borderlessTop,borderlessBottom:e.borderlessBottom,noEdgeEffects:e.noEdgeEffects},s.createElement("div",{className:t.joinClassNames(i.generateClassName(r.tableHeaderClass,{isSticky:g}),e.borderlessX&&d.default.borderlessX,d.default.flexCol,g&&d.default.tableHeaderSticky),style:{zIndex:1}},s.createElement(i.Scroller,{horizontal:!0,hideScrollbars:!0,className:d.default.flexRow,ref:this.headerScrollerRef},s.createElement("div",{className:t.joinClassNames(d.default.rel,null==v&&d.default.liquid),style:{width:v}},h.map((t,i)=>{const a=h.length-i-1;return s.createElement(R,{key:i,dateProfile:e.dateProfile,tDateProfile:u,nowDate:n,todayRange:l,rowLevel:a,cells:t,slotWidth:D,innerWidthRef:this.headerRowInnerWidthMap.createRef(i)})}),o&&s.createElement(b,{tDateProfile:u,nowDate:n,slotWidth:D})),Boolean(c)&&s.createElement("div",{className:i.joinArrayishClassNames(i.generateClassName(r.fillerClass,{isHeader:!0}),d.default.borderOnlyS),style:{minWidth:c}})),s.createElement("div",{className:i.generateClassName(r.slotHeaderDividerClass,{isHeader:!0,options:{dayMinWidth:r.dayMinWidth}})})),s.createElement(i.Scroller,{vertical:f,horizontal:!0,hideScrollbars:p||e.forPrint,className:i.joinArrayishClassNames(r.tableBodyClass,e.borderlessX&&d.default.borderlessX,g&&d.default.borderlessTop,(g||e.noEdgeEffects)&&d.default.noEdgeEffects,d.default.flexCol,f&&d.default.liquid),style:{zIndex:0},ref:this.bodyScrollerRef,clientWidthRef:this.handleClientWidth},s.createElement("div",{"aria-label":r.eventsHint,className:t.joinClassNames(d.default.rel,d.default.grow),style:{width:v},ref:this.handeBodyEl},s.createElement(S,{dateProfile:e.dateProfile,tDateProfile:u,nowDate:n,todayRange:l,slotWidth:D}),s.createElement(j,{tDateProfile:u,nowDate:n,todayRange:l,bgEventSegs:y.bgEventSegs,businessHourSegs:y.businessHourSegs,dateSelectionSegs:y.dateSelectionSegs,eventResizeSegs:y.eventResize?y.eventResize.segs:null,slotWidth:D}),s.createElement("div",{className:i.joinArrayishClassNames(r.timelineTopClass)}),s.createElement(z,{dateProfile:e.dateProfile,tDateProfile:u,nowDate:n,todayRange:l,fgEventSegs:y.fgEventSegs,eventDrag:y.eventDrag,eventResize:y.eventResize,eventSelection:y.eventSelection,slotWidth:D}),s.createElement("div",{className:i.joinArrayishClassNames(r.timelineBottomClass)}),o&&s.createElement(M,{tDateProfile:u,nowDate:n,slotWidth:D}))),Boolean(p)&&s.createElement(i.FooterScrollbar,{isSticky:!0,canvasWidth:v,scrollerRef:this.footerScrollerRef}),s.createElement(i.Ruler,{widthRef:this.handleTotalWidth}))})}componentDidMount(){this.syncedScroller=new r.ScrollerSyncer(!0),this.updateSyncedScroller(),this.resetScroll(),this.context.emitter.on("_timeScrollRequest",this.handleTimeScrollRequest),this.syncedScroller.addScrollEndListener(this.handleTimeScrollEnd)}componentDidUpdate(e){this.updateSyncedScroller(),e.dateProfile!==this.props.dateProfile&&this.context.options.scrollTimeReset?this.resetScroll():this.applyTimeScroll()}componentWillUnmount(){this.syncedScroller.destroy(),this.context.emitter.off("_timeScrollRequest",this.handleTimeScrollRequest),this.syncedScroller.removeScrollEndListener(this.handleTimeScrollEnd)}updateSyncedScroller(){this.syncedScroller.handleChildren([this.headerScrollerRef.current,this.bodyScrollerRef.current,this.footerScrollerRef.current])}resetScroll(){this.handleTimeScrollRequest(this.context.options.scrollTime)}applyTimeScroll(){const{props:e,context:t,tDateProfile:n,scrollTime:i,slotWidth:a}=this;if(null!=i&&null!=a){let s=w(i,t.dateEnv,e.dateProfile,n,a);s&&(s+=1),this.syncedScroller.scrollTo({x:s})}}queryHit(e,t,n,a,s){const{props:r,context:l,tDateProfile:o,slotWidth:d}=this,{dateEnv:c}=l;if(d){const n=e?a-t:t,l=Math.floor(n/d),u=(n-l*d)/d,h=Math.floor(u*o.snapsPerSlot);let m,f,g=c.add(o.slotDates[l],i.multiplyDuration(o.snapDuration,h)),p=c.add(g,o.snapDuration),S=d/o.snapsPerSlot,v=l*d+S*h,D=v+S;return e?(m=a-D,f=a-v):(m=v,f=D),{dateProfile:r.dateProfile,dateSpan:{range:{start:g,end:p},allDay:!o.isTimeScale},rect:{left:m,right:f,top:0,bottom:s},getDayEl:()=>T(this.bodyEl,l),layer:0}}return null}}const B={timelineTopClass:i.identity,timelineBottomClass:i.identity};var L=t.createPlugin({name:"@fullcalendar/timeline",premiumReleaseDate:"2025-12-31",deps:[o.default],initialView:"timelineDay",optionRefiners:B,views:{timeline:{component:O,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}}}}),F={__proto__:null,TimelineView:O,TimelineFg:z,TimelineBg:j,TimelineSlats:S,buildTimelineDateProfile:u,computeSlotWidth:y,timeToCoord:w,TimelineLaneSlicer:I,TimelineHeaderRow:R,TimelineNowIndicatorArrow:b,TimelineNowIndicatorLine:M,getTimelineSlotEl:T};return t.globalPlugins.push(L),e.Internal=F,e.default=L,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Internal,FullCalendar.InternalClassNames,FullCalendar.Preact,FullCalendar.ScrollGrid.Internal); |
+4
-4
| { | ||
| "name": "@fullcalendar/timeline", | ||
| "version": "7.0.0-beta.5", | ||
| "version": "7.0.0-beta.6", | ||
| "title": "FullCalendar Timeline Plugin", | ||
@@ -18,7 +18,7 @@ "description": "Display events on a horizontal time axis (without resources)", | ||
| "dependencies": { | ||
| "@fullcalendar/premium-common": "7.0.0-beta.5", | ||
| "@fullcalendar/scrollgrid": "7.0.0-beta.5" | ||
| "@fullcalendar/premium-common": "7.0.0-beta.6", | ||
| "@fullcalendar/scrollgrid": "7.0.0-beta.6" | ||
| }, | ||
| "peerDependencies": { | ||
| "@fullcalendar/core": "7.0.0-beta.5" | ||
| "@fullcalendar/core": "7.0.0-beta.6" | ||
| }, | ||
@@ -25,0 +25,0 @@ "type": "module", |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
234028
2.52%4069
2.78%0
-100%+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed