@zealicsolutions/web-ui 1.0.44-beta-2 → 1.0.44-beta-3
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/dist/cjs/index.js +666 -666
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js.map +1 -1
- package/dist/esm/molecules/Visit/VisitMolecule.js +1 -1
- package/dist/esm/molecules/Visit/VisitMolecule.js.map +1 -1
- package/dist/esm/node_modules/@fullcalendar/resource/internal-common.js +1 -1
- package/dist/esm/node_modules/@fullcalendar/resource/internal-common.js.map +1 -1
- package/dist/esm/node_modules/@fullcalendar/resource-timeline/index.js +2 -0
- package/dist/esm/node_modules/@fullcalendar/resource-timeline/index.js.map +1 -0
- package/dist/esm/node_modules/@fullcalendar/resource-timeline/internal.js +2 -0
- package/dist/esm/node_modules/@fullcalendar/resource-timeline/internal.js.map +1 -0
- package/dist/esm/node_modules/@fullcalendar/timeline/internal.js +1 -1
- package/package.json +1 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"internal.js","sources":["../../../../../node_modules/@fullcalendar/resource-timeline/internal.js"],"sourcesContent":["import { BaseComponent, memoizeObjArg, ContentContainer, isArraysEqual, RefMap, findElements, elementClosest, PositionCache, DateComponent, memoize, greatestDurationDenominator, NowTimer, NowIndicatorContainer, config, getStickyHeaderDates, getStickyFooterScrollbar, renderScrollShim, ViewContainer, injectStyles } from '@fullcalendar/core/internal.js';\nimport { createElement, Fragment, createRef } from '@fullcalendar/core/preact.js';\nimport { TimelineLane, TimelineLaneSlicer, TimelineSlats, TimelineLaneBg, coordToCss, buildTimelineDateProfile, buildSlatCols, TimelineHeader } from '@fullcalendar/timeline/internal.js';\nimport { buildResourceFields, getPublicId, isGroupsEqual, refineRenderProps as refineRenderProps$1, ResourceSplitter, buildRowNodes, DEFAULT_RESOURCE_ORDER } from '@fullcalendar/resource/internal.js';\nimport { ResourceApi } from '@fullcalendar/resource/index.js';\nimport { ScrollGrid } from '@fullcalendar/scrollgrid/internal.js';\n\n/*\nRenders the DOM responsible for the subrow expander area,\nas well as the space before it (used to align expanders of similar depths)\n*/\nfunction ExpanderIcon({ depth, hasChildren, isExpanded, onExpanderClick }) {\n let nodes = [];\n for (let i = 0; i < depth; i += 1) {\n nodes.push(createElement(\"span\", { className: \"fc-icon\" }));\n }\n let iconClassNames = ['fc-icon'];\n if (hasChildren) {\n if (isExpanded) {\n iconClassNames.push('fc-icon-minus-square');\n }\n else {\n iconClassNames.push('fc-icon-plus-square');\n }\n }\n nodes.push(createElement(\"span\", { className: 'fc-datagrid-expander' + (hasChildren ? '' : ' fc-datagrid-expander-placeholder'), onClick: onExpanderClick },\n createElement(\"span\", { className: iconClassNames.join(' ') })));\n return createElement(Fragment, {}, ...nodes);\n}\n\n// worth making a PureComponent? (because of innerHeight)\nclass SpreadsheetIndividualCell extends BaseComponent {\n constructor() {\n super(...arguments);\n this.refineRenderProps = memoizeObjArg(refineRenderProps);\n this.onExpanderClick = (ev) => {\n let { props } = this;\n if (props.hasChildren) {\n this.context.dispatch({\n type: 'SET_RESOURCE_ENTITY_EXPANDED',\n id: props.resource.id,\n isExpanded: !props.isExpanded,\n });\n }\n };\n }\n render() {\n let { props, context } = this;\n let { colSpec } = props;\n let renderProps = this.refineRenderProps({\n resource: props.resource,\n fieldValue: props.fieldValue,\n context,\n });\n return (createElement(ContentContainer, { elTag: \"td\", elClasses: [\n 'fc-datagrid-cell',\n 'fc-resource',\n ], elAttrs: {\n role: 'gridcell',\n 'data-resource-id': props.resource.id,\n }, renderProps: renderProps, generatorName: colSpec.isMain ? 'resourceLabelContent' : undefined, customGenerator: colSpec.cellContent, defaultGenerator: renderResourceInner, classNameGenerator: colSpec.cellClassNames, didMount: colSpec.cellDidMount, willUnmount: colSpec.cellWillUnmount }, (InnerContent) => (createElement(\"div\", { className: \"fc-datagrid-cell-frame\", style: { height: props.innerHeight } },\n createElement(\"div\", { className: \"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner\" },\n colSpec.isMain && (createElement(ExpanderIcon, { depth: props.depth, hasChildren: props.hasChildren, isExpanded: props.isExpanded, onExpanderClick: this.onExpanderClick })),\n createElement(InnerContent, { elTag: \"span\", elClasses: ['fc-datagrid-cell-main'] }))))));\n }\n}\nfunction renderResourceInner(renderProps) {\n return renderProps.fieldValue || createElement(Fragment, null, \"\\u00A0\");\n}\nfunction refineRenderProps(input) {\n return {\n resource: new ResourceApi(input.context, input.resource),\n fieldValue: input.fieldValue,\n view: input.context.viewApi,\n };\n}\n\n// for VERTICAL cell grouping, in spreadsheet area\nclass SpreadsheetGroupCell extends BaseComponent {\n render() {\n let { props, context } = this;\n let { colSpec } = props;\n let renderProps = {\n groupValue: props.fieldValue,\n view: context.viewApi,\n };\n // a grouped cell. no data that is specific to this specific resource\n // `colSpec` is for the group. a GroupSpec :(\n return (createElement(ContentContainer, { elTag: \"td\", elClasses: [\n 'fc-datagrid-cell',\n 'fc-resource-group',\n ], elAttrs: {\n role: 'gridcell',\n rowSpan: props.rowSpan,\n }, renderProps: renderProps, generatorName: \"resourceGroupLabelContent\", customGenerator: colSpec.cellContent, defaultGenerator: renderGroupInner, classNameGenerator: colSpec.cellClassNames, didMount: colSpec.cellDidMount, willUnmount: colSpec.cellWillUnmount }, (InnerContent) => (createElement(\"div\", { className: \"fc-datagrid-cell-frame fc-datagrid-cell-frame-liquid\" },\n createElement(InnerContent, { elTag: \"div\", elClasses: ['fc-datagrid-cell-cushion', 'fc-sticky'] })))));\n }\n}\nfunction renderGroupInner(renderProps) {\n return renderProps.groupValue || createElement(Fragment, null, \"\\u00A0\");\n}\n\nclass SpreadsheetRow extends BaseComponent {\n render() {\n let { props } = this;\n let { resource, rowSpans, depth } = props;\n let resourceFields = buildResourceFields(resource); // slightly inefficient. already done up the call stack\n return (createElement(\"tr\", { role: \"row\" }, props.colSpecs.map((colSpec, i) => {\n let rowSpan = rowSpans[i];\n if (rowSpan === 0) { // not responsible for group-based rows. VRowGroup is\n return null;\n }\n if (rowSpan == null) {\n rowSpan = 1;\n }\n let fieldValue = colSpec.field ? resourceFields[colSpec.field] :\n (resource.title || getPublicId(resource.id));\n if (rowSpan > 1) {\n return (createElement(SpreadsheetGroupCell, { key: i, colSpec: colSpec, fieldValue: fieldValue, rowSpan: rowSpan }));\n }\n return (createElement(SpreadsheetIndividualCell, { key: i, colSpec: colSpec, resource: resource, fieldValue: fieldValue, depth: depth, hasChildren: props.hasChildren, isExpanded: props.isExpanded, innerHeight: props.innerHeight }));\n })));\n }\n}\nSpreadsheetRow.addPropsEquality({\n rowSpans: isArraysEqual,\n});\n\n// for HORIZONTAL cell grouping, in spreadsheet area\nclass SpreadsheetGroupRow extends BaseComponent {\n constructor() {\n super(...arguments);\n this.innerInnerRef = createRef();\n this.onExpanderClick = () => {\n let { props } = this;\n this.context.dispatch({\n type: 'SET_RESOURCE_ENTITY_EXPANDED',\n id: props.id,\n isExpanded: !props.isExpanded,\n });\n };\n }\n render() {\n let { props, context } = this;\n let renderProps = { groupValue: props.group.value, view: context.viewApi };\n let spec = props.group.spec;\n return (createElement(\"tr\", { role: \"row\" },\n createElement(ContentContainer, { elTag: \"th\", elClasses: [\n 'fc-datagrid-cell',\n 'fc-resource-group',\n context.theme.getClass('tableCellShaded'),\n ], elAttrs: {\n // ARIA TODO: not really a columnheader\n // extremely tedious to make this aria-compliant,\n // to assign multiple headers to each cell\n // https://www.w3.org/WAI/tutorials/tables/multi-level/\n role: 'columnheader',\n scope: 'colgroup',\n colSpan: props.spreadsheetColCnt,\n }, renderProps: renderProps, generatorName: \"resourceGroupLabelContent\", customGenerator: spec.labelContent, defaultGenerator: renderCellInner, classNameGenerator: spec.labelClassNames, didMount: spec.labelDidMount, willUnmount: spec.labelWillUnmount }, (InnerContent) => (createElement(\"div\", { className: \"fc-datagrid-cell-frame\", style: { height: props.innerHeight } },\n createElement(\"div\", { className: \"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner\", ref: this.innerInnerRef },\n createElement(ExpanderIcon, { depth: 0, hasChildren: true, isExpanded: props.isExpanded, onExpanderClick: this.onExpanderClick }),\n createElement(InnerContent, { elTag: \"span\", elClasses: ['fc-datagrid-cell-main'] })))))));\n }\n}\nSpreadsheetGroupRow.addPropsEquality({\n group: isGroupsEqual,\n});\nfunction renderCellInner(renderProps) {\n return renderProps.groupValue || createElement(Fragment, null, \"\\u00A0\");\n}\n\nconst SPREADSHEET_COL_MIN_WIDTH = 20;\nclass SpreadsheetHeader extends BaseComponent {\n constructor() {\n super(...arguments);\n this.resizerElRefs = new RefMap(this._handleColResizerEl.bind(this));\n this.colDraggings = {};\n }\n render() {\n let { colSpecs, superHeaderRendering, rowInnerHeights } = this.props;\n let renderProps = { view: this.context.viewApi };\n let rowNodes = [];\n rowInnerHeights = rowInnerHeights.slice(); // copy, because we're gonna pop\n if (superHeaderRendering) {\n let rowInnerHeight = rowInnerHeights.shift();\n rowNodes.push(createElement(\"tr\", { key: \"row-super\", role: \"row\" },\n createElement(ContentContainer, { elTag: \"th\", elClasses: [\n 'fc-datagrid-cell',\n 'fc-datagrid-cell-super',\n ], elAttrs: {\n role: 'columnheader',\n scope: 'colgroup',\n colSpan: colSpecs.length,\n }, renderProps: renderProps, generatorName: \"resourceAreaHeaderContent\", customGenerator: superHeaderRendering.headerContent, defaultGenerator: superHeaderRendering.headerDefault, classNameGenerator: superHeaderRendering.headerClassNames, didMount: superHeaderRendering.headerDidMount, willUnmount: superHeaderRendering.headerWillUnmount }, (InnerContent) => (createElement(\"div\", { className: \"fc-datagrid-cell-frame\", style: { height: rowInnerHeight } },\n createElement(InnerContent, { elTag: \"div\", elClasses: ['fc-datagrid-cell-cushion', 'fc-scrollgrid-sync-inner'] }))))));\n }\n let rowInnerHeight = rowInnerHeights.shift();\n rowNodes.push(createElement(\"tr\", { key: \"row\", role: \"row\" }, colSpecs.map((colSpec, i) => {\n let isLastCol = i === (colSpecs.length - 1);\n // need empty inner div for abs positioning for resizer\n return (createElement(ContentContainer, { key: i, elTag: \"th\", elClasses: ['fc-datagrid-cell'], elAttrs: { role: 'columnheader' }, renderProps: renderProps, generatorName: \"resourceAreaHeaderContent\", customGenerator: colSpec.headerContent, defaultGenerator: colSpec.headerDefault, classNameGenerator: colSpec.headerClassNames, didMount: colSpec.headerDidMount, willUnmount: colSpec.headerWillUnmount }, (InnerContent) => (createElement(\"div\", { className: \"fc-datagrid-cell-frame\", style: { height: rowInnerHeight } },\n createElement(\"div\", { className: \"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner\" },\n colSpec.isMain && (createElement(\"span\", { className: \"fc-datagrid-expander fc-datagrid-expander-placeholder\" },\n createElement(\"span\", { className: \"fc-icon\" }))),\n createElement(InnerContent, { elTag: \"span\", elClasses: ['fc-datagrid-cell-main'] })),\n !isLastCol && (createElement(\"div\", { className: \"fc-datagrid-cell-resizer\", ref: this.resizerElRefs.createRef(i) }))))));\n })));\n return (createElement(Fragment, null, rowNodes));\n }\n _handleColResizerEl(resizerEl, index) {\n let { colDraggings } = this;\n if (!resizerEl) {\n let dragging = colDraggings[index];\n if (dragging) {\n dragging.destroy();\n delete colDraggings[index];\n }\n }\n else {\n let dragging = this.initColResizing(resizerEl, parseInt(index, 10));\n if (dragging) {\n colDraggings[index] = dragging;\n }\n }\n }\n initColResizing(resizerEl, index) {\n let { pluginHooks, isRtl } = this.context;\n let { onColWidthChange } = this.props;\n let ElementDraggingImpl = pluginHooks.elementDraggingImpl;\n if (ElementDraggingImpl) {\n let dragging = new ElementDraggingImpl(resizerEl);\n let startWidth; // of just the single column\n let currentWidths; // of all columns\n dragging.emitter.on('dragstart', () => {\n let allCells = findElements(elementClosest(resizerEl, 'tr'), 'th');\n currentWidths = allCells.map((cellEl) => (cellEl.getBoundingClientRect().width));\n startWidth = currentWidths[index];\n });\n dragging.emitter.on('dragmove', (pev) => {\n currentWidths[index] = Math.max(startWidth + pev.deltaX * (isRtl ? -1 : 1), SPREADSHEET_COL_MIN_WIDTH);\n if (onColWidthChange) {\n onColWidthChange(currentWidths.slice()); // send a copy since currentWidths continues to be mutated\n }\n });\n dragging.setAutoScrollEnabled(false); // because gets weird with auto-scrolling time area\n return dragging;\n }\n return null;\n }\n}\n\nclass ResourceTimelineLane extends BaseComponent {\n constructor() {\n super(...arguments);\n this.refineRenderProps = memoizeObjArg(refineRenderProps$1);\n this.handleHeightChange = (innerEl, isStable) => {\n if (this.props.onHeightChange) {\n this.props.onHeightChange(\n // would want to use own <tr> ref, but not guaranteed to be ready when this fires\n elementClosest(innerEl, 'tr'), isStable);\n }\n };\n }\n render() {\n let { props, context } = this;\n let { options } = context;\n let renderProps = this.refineRenderProps({ resource: props.resource, context });\n return (createElement(\"tr\", { ref: props.elRef },\n createElement(ContentContainer, { elTag: \"td\", elClasses: [\n 'fc-timeline-lane',\n 'fc-resource',\n ], elAttrs: {\n 'data-resource-id': props.resource.id,\n }, renderProps: renderProps, generatorName: \"resourceLaneContent\", customGenerator: options.resourceLaneContent, classNameGenerator: options.resourceLaneClassNames, didMount: options.resourceLaneDidMount, willUnmount: options.resourceLaneWillUnmount }, (InnerContent) => (createElement(\"div\", { className: \"fc-timeline-lane-frame\", style: { height: props.innerHeight } },\n createElement(InnerContent, { elTag: \"div\", elClasses: ['fc-timeline-lane-misc'] }),\n createElement(TimelineLane, { dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, nextDayThreshold: props.nextDayThreshold, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, timelineCoords: props.timelineCoords, onHeightChange: this.handleHeightChange, resourceId: props.resource.id })))))); // important NOT to do liquid-height. dont want to shrink height smaller than content\n }\n}\n\n/*\nparallels the SpreadsheetGroupRow\n*/\nclass DividerRow extends BaseComponent {\n render() {\n let { props, context } = this;\n let { renderHooks } = props;\n let renderProps = {\n groupValue: props.groupValue,\n view: context.viewApi,\n };\n return (createElement(\"tr\", { ref: props.elRef },\n createElement(ContentContainer, { elTag: \"td\", elRef: props.elRef, elClasses: [\n 'fc-timeline-lane',\n 'fc-resource-group',\n context.theme.getClass('tableCellShaded'),\n ], renderProps: renderProps, generatorName: \"resourceGroupLaneContent\", customGenerator: renderHooks.laneContent, classNameGenerator: renderHooks.laneClassNames, didMount: renderHooks.laneDidMount, willUnmount: renderHooks.laneWillUnmount }, (InnerContainer) => (createElement(InnerContainer, { elTag: \"div\", elStyle: { height: props.innerHeight } })))));\n }\n}\n\nclass ResourceTimelineLanesBody extends BaseComponent {\n render() {\n let { props, context } = this;\n let { rowElRefs, innerHeights } = props;\n return (createElement(\"tbody\", null, props.rowNodes.map((node, index) => {\n if (node.group) {\n return (createElement(DividerRow, { key: node.id, elRef: rowElRefs.createRef(node.id), groupValue: node.group.value, renderHooks: node.group.spec, innerHeight: innerHeights[index] || '' }));\n }\n if (node.resource) {\n let resource = node.resource;\n return (createElement(ResourceTimelineLane, Object.assign({ key: node.id, elRef: rowElRefs.createRef(node.id) }, props.splitProps[resource.id], { resource: resource, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, nextDayThreshold: context.options.nextDayThreshold, businessHours: resource.businessHours || props.fallbackBusinessHours, innerHeight: innerHeights[index] || '', timelineCoords: props.slatCoords, onHeightChange: props.onRowHeightChange })));\n }\n return null;\n })));\n }\n}\n\nclass ResourceTimelineLanes extends BaseComponent {\n constructor() {\n super(...arguments);\n this.rootElRef = createRef();\n this.rowElRefs = new RefMap();\n }\n render() {\n let { props, context } = this;\n return (createElement(\"table\", { ref: this.rootElRef, \"aria-hidden\": true, className: 'fc-scrollgrid-sync-table ' + context.theme.getClass('table'), style: {\n minWidth: props.tableMinWidth,\n width: props.clientWidth,\n height: props.minHeight,\n } },\n createElement(ResourceTimelineLanesBody, { rowElRefs: this.rowElRefs, rowNodes: props.rowNodes, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, splitProps: props.splitProps, fallbackBusinessHours: props.fallbackBusinessHours, slatCoords: props.slatCoords, innerHeights: props.innerHeights, onRowHeightChange: props.onRowHeightChange })));\n }\n componentDidMount() {\n this.updateCoords();\n }\n componentDidUpdate() {\n this.updateCoords();\n }\n componentWillUnmount() {\n if (this.props.onRowCoords) {\n this.props.onRowCoords(null);\n }\n }\n updateCoords() {\n let { props } = this;\n if (props.onRowCoords && props.clientWidth !== null) { // a populated clientWidth means sizing has stabilized\n this.props.onRowCoords(new PositionCache(this.rootElRef.current, collectRowEls(this.rowElRefs.currentMap, props.rowNodes), false, true));\n }\n }\n}\nfunction collectRowEls(elMap, rowNodes) {\n return rowNodes.map((rowNode) => elMap[rowNode.id]);\n}\n\nclass ResourceTimelineGrid extends DateComponent {\n constructor() {\n super(...arguments);\n this.computeHasResourceBusinessHours = memoize(computeHasResourceBusinessHours);\n this.resourceSplitter = new ResourceSplitter(); // doesn't let it do businessHours tho\n this.bgSlicer = new TimelineLaneSlicer();\n this.slatsRef = createRef(); // needed for Hit creation :(\n this.state = {\n slatCoords: null,\n };\n this.handleEl = (el) => {\n if (el) {\n this.context.registerInteractiveComponent(this, { el });\n }\n else {\n this.context.unregisterInteractiveComponent(this);\n }\n };\n this.handleSlatCoords = (slatCoords) => {\n this.setState({ slatCoords });\n if (this.props.onSlatCoords) {\n this.props.onSlatCoords(slatCoords);\n }\n };\n this.handleRowCoords = (rowCoords) => {\n this.rowCoords = rowCoords;\n if (this.props.onRowCoords) {\n this.props.onRowCoords(rowCoords);\n }\n };\n }\n render() {\n let { props, state, context } = this;\n let { dateProfile, tDateProfile } = props;\n let timerUnit = greatestDurationDenominator(tDateProfile.slotDuration).unit;\n let hasResourceBusinessHours = this.computeHasResourceBusinessHours(props.rowNodes);\n let splitProps = this.resourceSplitter.splitProps(props);\n let bgLaneProps = splitProps[''];\n let bgSlicedProps = this.bgSlicer.sliceProps(bgLaneProps, dateProfile, tDateProfile.isTimeScale ? null : props.nextDayThreshold, context, // wish we didn't need to pass in the rest of these args...\n dateProfile, context.dateProfileGenerator, tDateProfile, context.dateEnv);\n // WORKAROUND: make ignore slatCoords when out of sync with dateProfile\n let slatCoords = state.slatCoords && state.slatCoords.dateProfile === props.dateProfile ? state.slatCoords : null;\n return (createElement(\"div\", { ref: this.handleEl, className: [\n 'fc-timeline-body',\n props.expandRows ? 'fc-timeline-body-expandrows' : '',\n ].join(' '), style: { minWidth: props.tableMinWidth } },\n createElement(NowTimer, { unit: timerUnit }, (nowDate, todayRange) => (createElement(Fragment, null,\n createElement(TimelineSlats, { ref: this.slatsRef, dateProfile: dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, todayRange: todayRange, clientWidth: props.clientWidth, tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, onCoords: this.handleSlatCoords, onScrollLeftRequest: props.onScrollLeftRequest }),\n createElement(TimelineLaneBg, { businessHourSegs: hasResourceBusinessHours ? null : bgSlicedProps.businessHourSegs, bgEventSegs: bgSlicedProps.bgEventSegs, timelineCoords: slatCoords, \n // empty array will result in unnecessary rerenders?\n eventResizeSegs: (bgSlicedProps.eventResize ? bgSlicedProps.eventResize.segs : []), dateSelectionSegs: bgSlicedProps.dateSelectionSegs, nowDate: nowDate, todayRange: todayRange }),\n createElement(ResourceTimelineLanes, { rowNodes: props.rowNodes, dateProfile: dateProfile, tDateProfile: props.tDateProfile, nowDate: nowDate, todayRange: todayRange, splitProps: splitProps, fallbackBusinessHours: hasResourceBusinessHours ? props.businessHours : null, clientWidth: props.clientWidth, minHeight: props.expandRows ? props.clientHeight : '', tableMinWidth: props.tableMinWidth, innerHeights: props.rowInnerHeights, slatCoords: slatCoords, onRowCoords: this.handleRowCoords, onRowHeightChange: props.onRowHeightChange }),\n (context.options.nowIndicator && slatCoords && slatCoords.isDateInRange(nowDate)) && (createElement(\"div\", { className: \"fc-timeline-now-indicator-container\" },\n createElement(NowIndicatorContainer, { elClasses: ['fc-timeline-now-indicator-line'], elStyle: coordToCss(slatCoords.dateToCoord(nowDate), context.isRtl), isAxis: false, date: nowDate }))))))));\n }\n // Hit System\n // ------------------------------------------------------------------------------------------\n queryHit(positionLeft, positionTop) {\n let rowCoords = this.rowCoords;\n let rowIndex = rowCoords.topToIndex(positionTop);\n if (rowIndex != null) {\n let resource = this.props.rowNodes[rowIndex].resource;\n if (resource) { // not a group\n let slatHit = this.slatsRef.current.positionToHit(positionLeft);\n if (slatHit) {\n return {\n dateProfile: this.props.dateProfile,\n dateSpan: {\n range: slatHit.dateSpan.range,\n allDay: slatHit.dateSpan.allDay,\n resourceId: resource.id,\n },\n rect: {\n left: slatHit.left,\n right: slatHit.right,\n top: rowCoords.tops[rowIndex],\n bottom: rowCoords.bottoms[rowIndex],\n },\n dayEl: slatHit.dayEl,\n layer: 0,\n };\n }\n }\n }\n return null;\n }\n}\nfunction computeHasResourceBusinessHours(rowNodes) {\n for (let node of rowNodes) {\n let resource = node.resource;\n if (resource && resource.businessHours) {\n return true;\n }\n }\n return false;\n}\n\nconst MIN_RESOURCE_AREA_WIDTH = 30; // definitely bigger than scrollbars\n// RENAME?\nclass ResourceTimelineViewLayout extends BaseComponent {\n constructor() {\n super(...arguments);\n this.scrollGridRef = createRef();\n this.timeBodyScrollerElRef = createRef();\n this.spreadsheetHeaderChunkElRef = createRef();\n this.rootElRef = createRef();\n this.ensureScrollGridResizeId = 0;\n this.state = {\n resourceAreaWidthOverride: null,\n };\n /*\n ghetto debounce. don't race with ScrollGrid's resizing delay. solves #6140\n */\n this.ensureScrollGridResize = () => {\n if (this.ensureScrollGridResizeId) {\n clearTimeout(this.ensureScrollGridResizeId);\n }\n this.ensureScrollGridResizeId = setTimeout(() => {\n this.scrollGridRef.current.handleSizing(false);\n }, config.SCROLLGRID_RESIZE_INTERVAL + 1);\n };\n }\n render() {\n let { props, state, context } = this;\n let { options } = context;\n let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(options);\n let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(options);\n let sections = [\n {\n type: 'header',\n key: 'header',\n syncRowHeights: true,\n isSticky: stickyHeaderDates,\n chunks: [\n {\n key: 'datagrid',\n elRef: this.spreadsheetHeaderChunkElRef,\n // TODO: allow the content to specify this. have general-purpose 'content' with obj with keys\n tableClassName: 'fc-datagrid-header',\n rowContent: props.spreadsheetHeaderRows,\n },\n {\n key: 'divider',\n outerContent: (createElement(\"td\", { role: \"presentation\", className: 'fc-resource-timeline-divider ' + context.theme.getClass('tableCellShaded') })),\n },\n {\n key: 'timeline',\n content: props.timeHeaderContent,\n },\n ],\n },\n {\n type: 'body',\n key: 'body',\n syncRowHeights: true,\n liquid: true,\n expandRows: Boolean(options.expandRows),\n chunks: [\n {\n key: 'datagrid',\n tableClassName: 'fc-datagrid-body',\n rowContent: props.spreadsheetBodyRows,\n },\n {\n key: 'divider',\n outerContent: (createElement(\"td\", { role: \"presentation\", className: 'fc-resource-timeline-divider ' + context.theme.getClass('tableCellShaded') })),\n },\n {\n key: 'timeline',\n scrollerElRef: this.timeBodyScrollerElRef,\n content: props.timeBodyContent,\n },\n ],\n },\n ];\n if (stickyFooterScrollbar) {\n sections.push({\n type: 'footer',\n key: 'footer',\n isSticky: true,\n chunks: [\n {\n key: 'datagrid',\n content: renderScrollShim,\n },\n {\n key: 'divider',\n outerContent: (createElement(\"td\", { role: \"presentation\", className: 'fc-resource-timeline-divider ' + context.theme.getClass('tableCellShaded') })),\n },\n {\n key: 'timeline',\n content: renderScrollShim,\n },\n ],\n });\n }\n let resourceAreaWidth = state.resourceAreaWidthOverride != null\n ? state.resourceAreaWidthOverride\n : options.resourceAreaWidth;\n return (createElement(ScrollGrid, { ref: this.scrollGridRef, elRef: this.rootElRef, liquid: !props.isHeightAuto && !props.forPrint, forPrint: props.forPrint, collapsibleWidth: false, colGroups: [\n { cols: props.spreadsheetCols, width: resourceAreaWidth },\n { cols: [] },\n { cols: props.timeCols },\n ], sections: sections }));\n }\n forceTimeScroll(left) {\n let scrollGrid = this.scrollGridRef.current;\n scrollGrid.forceScrollLeft(2, left); // 2 = the time area\n }\n forceResourceScroll(top) {\n let scrollGrid = this.scrollGridRef.current;\n scrollGrid.forceScrollTop(1, top); // 1 = the body\n }\n getResourceScroll() {\n let timeBodyScrollerEl = this.timeBodyScrollerElRef.current;\n return timeBodyScrollerEl.scrollTop;\n }\n // Resource Area Resizing\n // ------------------------------------------------------------------------------------------\n // NOTE: a callback Ref for the resizer was firing multiple times with same elements (Preact)\n // that's why we use spreadsheetResizerElRef instead\n componentDidMount() {\n this.initSpreadsheetResizing();\n }\n componentWillUnmount() {\n this.destroySpreadsheetResizing();\n }\n initSpreadsheetResizing() {\n let { isRtl, pluginHooks } = this.context;\n let ElementDraggingImpl = pluginHooks.elementDraggingImpl;\n let spreadsheetHeadEl = this.spreadsheetHeaderChunkElRef.current;\n if (ElementDraggingImpl) {\n let rootEl = this.rootElRef.current;\n let dragging = this.spreadsheetResizerDragging = new ElementDraggingImpl(rootEl, '.fc-resource-timeline-divider');\n let dragStartWidth;\n let viewWidth;\n dragging.emitter.on('dragstart', () => {\n dragStartWidth = spreadsheetHeadEl.getBoundingClientRect().width;\n viewWidth = rootEl.getBoundingClientRect().width;\n });\n dragging.emitter.on('dragmove', (pev) => {\n let newWidth = dragStartWidth + pev.deltaX * (isRtl ? -1 : 1);\n newWidth = Math.max(newWidth, MIN_RESOURCE_AREA_WIDTH);\n newWidth = Math.min(newWidth, viewWidth - MIN_RESOURCE_AREA_WIDTH);\n // scrollgrid will ignore resize requests if there are too many :|\n this.setState({\n resourceAreaWidthOverride: newWidth,\n }, this.ensureScrollGridResize);\n });\n dragging.setAutoScrollEnabled(false); // because gets weird with auto-scrolling time area\n }\n }\n destroySpreadsheetResizing() {\n if (this.spreadsheetResizerDragging) {\n this.spreadsheetResizerDragging.destroy();\n }\n }\n}\n\nclass ResourceTimelineView extends BaseComponent {\n constructor(props, context) {\n super(props, context);\n this.processColOptions = memoize(processColOptions);\n this.buildTimelineDateProfile = memoize(buildTimelineDateProfile);\n this.hasNesting = memoize(hasNesting);\n this.buildRowNodes = memoize(buildRowNodes);\n this.layoutRef = createRef();\n this.rowNodes = [];\n this.renderedRowNodes = [];\n this.buildRowIndex = memoize(buildRowIndex);\n this.handleSlatCoords = (slatCoords) => {\n this.setState({ slatCoords });\n };\n this.handleRowCoords = (rowCoords) => {\n this.rowCoords = rowCoords;\n this.scrollResponder.update(false); // TODO: could eliminate this if rowCoords lived in state\n };\n this.handleMaxCushionWidth = (slotCushionMaxWidth) => {\n this.setState({\n slotCushionMaxWidth: Math.ceil(slotCushionMaxWidth), // for less rerendering TODO: DRY\n });\n };\n // Scrolling\n // ------------------------------------------------------------------------------------------------------------------\n // this is useful for scrolling prev/next dates while resource is scrolled down\n this.handleScrollLeftRequest = (scrollLeft) => {\n let layout = this.layoutRef.current;\n layout.forceTimeScroll(scrollLeft);\n };\n this.handleScrollRequest = (request) => {\n let { rowCoords } = this;\n let layout = this.layoutRef.current;\n let rowId = request.rowId || request.resourceId;\n if (rowCoords) {\n if (rowId) {\n let rowIdToIndex = this.buildRowIndex(this.renderedRowNodes);\n let index = rowIdToIndex[rowId];\n if (index != null) {\n let scrollTop = (request.fromBottom != null ?\n rowCoords.bottoms[index] - request.fromBottom : // pixels from bottom edge\n rowCoords.tops[index] // just use top edge\n );\n layout.forceResourceScroll(scrollTop);\n }\n }\n return true;\n }\n return null;\n };\n // Resource INDIVIDUAL-Column Area Resizing\n // ------------------------------------------------------------------------------------------\n this.handleColWidthChange = (colWidths) => {\n this.setState({\n spreadsheetColWidths: colWidths,\n });\n };\n this.state = {\n resourceAreaWidth: context.options.resourceAreaWidth,\n spreadsheetColWidths: [],\n };\n }\n render() {\n let { props, state, context } = this;\n let { options, viewSpec } = context;\n let { superHeaderRendering, groupSpecs, orderSpecs, isVGrouping, colSpecs } = this.processColOptions(context.options);\n let tDateProfile = this.buildTimelineDateProfile(props.dateProfile, context.dateEnv, options, context.dateProfileGenerator);\n let rowNodes = this.rowNodes = this.buildRowNodes(props.resourceStore, groupSpecs, orderSpecs, isVGrouping, props.resourceEntityExpansions, options.resourcesInitiallyExpanded);\n let { slotMinWidth } = options;\n let slatCols = buildSlatCols(tDateProfile, slotMinWidth || this.computeFallbackSlotMinWidth(tDateProfile));\n return (createElement(ViewContainer, { elClasses: [\n 'fc-resource-timeline',\n !this.hasNesting(rowNodes) && 'fc-resource-timeline-flat',\n 'fc-timeline',\n options.eventOverlap === false ?\n 'fc-timeline-overlap-disabled' :\n 'fc-timeline-overlap-enabled',\n ], viewSpec: viewSpec },\n createElement(ResourceTimelineViewLayout, { ref: this.layoutRef, forPrint: props.forPrint, isHeightAuto: props.isHeightAuto, spreadsheetCols: buildSpreadsheetCols(colSpecs, state.spreadsheetColWidths, ''), spreadsheetHeaderRows: (contentArg) => (createElement(SpreadsheetHeader // TODO: rename to SpreadsheetHeaderRows\n , { superHeaderRendering: superHeaderRendering, colSpecs: colSpecs, onColWidthChange: this.handleColWidthChange, rowInnerHeights: contentArg.rowSyncHeights })), spreadsheetBodyRows: (contentArg) => (createElement(Fragment, null, this.renderSpreadsheetRows(rowNodes, colSpecs, contentArg.rowSyncHeights))), timeCols: slatCols, timeHeaderContent: (contentArg) => (createElement(TimelineHeader, { clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, dateProfile: props.dateProfile, tDateProfile: tDateProfile, slatCoords: state.slatCoords, rowInnerHeights: contentArg.rowSyncHeights, onMaxCushionWidth: slotMinWidth ? null : this.handleMaxCushionWidth })), timeBodyContent: (contentArg) => (createElement(ResourceTimelineGrid, { dateProfile: props.dateProfile, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, expandRows: contentArg.expandRows, tDateProfile: tDateProfile, rowNodes: rowNodes, businessHours: props.businessHours, dateSelection: props.dateSelection, eventStore: props.eventStore, eventUiBases: props.eventUiBases, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, resourceStore: props.resourceStore, nextDayThreshold: context.options.nextDayThreshold, rowInnerHeights: contentArg.rowSyncHeights, onSlatCoords: this.handleSlatCoords, onRowCoords: this.handleRowCoords, onScrollLeftRequest: this.handleScrollLeftRequest, onRowHeightChange: contentArg.reportRowHeightChange })) })));\n }\n renderSpreadsheetRows(nodes, colSpecs, rowSyncHeights) {\n return nodes.map((node, index) => {\n if (node.group) {\n return (createElement(SpreadsheetGroupRow, { key: node.id, id: node.id, spreadsheetColCnt: colSpecs.length, isExpanded: node.isExpanded, group: node.group, innerHeight: rowSyncHeights[index] || '' }));\n }\n if (node.resource) {\n return (createElement(SpreadsheetRow, { key: node.id, colSpecs: colSpecs, rowSpans: node.rowSpans, depth: node.depth, isExpanded: node.isExpanded, hasChildren: node.hasChildren, resource: node.resource, innerHeight: rowSyncHeights[index] || '' }));\n }\n return null;\n });\n }\n componentDidMount() {\n this.renderedRowNodes = this.rowNodes;\n this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest);\n }\n getSnapshotBeforeUpdate() {\n if (!this.props.forPrint) { // because print-view is always zero?\n return { resourceScroll: this.queryResourceScroll() };\n }\n return {};\n }\n componentDidUpdate(prevProps, prevState, snapshot) {\n this.renderedRowNodes = this.rowNodes;\n this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile);\n if (snapshot.resourceScroll) {\n this.handleScrollRequest(snapshot.resourceScroll); // TODO: this gets triggered too often\n }\n }\n componentWillUnmount() {\n this.scrollResponder.detach();\n }\n computeFallbackSlotMinWidth(tDateProfile) {\n return Math.max(30, ((this.state.slotCushionMaxWidth || 0) / tDateProfile.slotsPerLabel));\n }\n queryResourceScroll() {\n let { rowCoords, renderedRowNodes } = this;\n if (rowCoords) {\n let layout = this.layoutRef.current;\n let trBottoms = rowCoords.bottoms;\n let scrollTop = layout.getResourceScroll();\n let scroll = {};\n for (let i = 0; i < trBottoms.length; i += 1) {\n let rowNode = renderedRowNodes[i];\n let elBottom = trBottoms[i] - scrollTop; // from the top of the scroller\n if (elBottom > 0) {\n scroll.rowId = rowNode.id;\n scroll.fromBottom = elBottom;\n break;\n }\n }\n return scroll;\n }\n return null;\n }\n}\nResourceTimelineView.addStateEquality({\n spreadsheetColWidths: isArraysEqual,\n});\nfunction buildRowIndex(rowNodes) {\n let rowIdToIndex = {};\n for (let i = 0; i < rowNodes.length; i += 1) {\n rowIdToIndex[rowNodes[i].id] = i;\n }\n return rowIdToIndex;\n}\nfunction buildSpreadsheetCols(colSpecs, forcedWidths, fallbackWidth = '') {\n return colSpecs.map((colSpec, i) => ({\n className: colSpec.isMain ? 'fc-main-col' : '',\n width: forcedWidths[i] || colSpec.width || fallbackWidth,\n }));\n}\nfunction hasNesting(nodes) {\n for (let node of nodes) {\n if (node.group) {\n return true;\n }\n if (node.resource) {\n if (node.hasChildren) {\n return true;\n }\n }\n }\n return false;\n}\nfunction processColOptions(options) {\n let allColSpecs = options.resourceAreaColumns || [];\n let superHeaderRendering = null;\n if (!allColSpecs.length) {\n allColSpecs.push({\n headerClassNames: options.resourceAreaHeaderClassNames,\n headerContent: options.resourceAreaHeaderContent,\n headerDefault: () => 'Resources',\n headerDidMount: options.resourceAreaHeaderDidMount,\n headerWillUnmount: options.resourceAreaHeaderWillUnmount,\n });\n }\n else if (options.resourceAreaHeaderContent) { // weird way to determine if content\n superHeaderRendering = {\n headerClassNames: options.resourceAreaHeaderClassNames,\n headerContent: options.resourceAreaHeaderContent,\n headerDidMount: options.resourceAreaHeaderDidMount,\n headerWillUnmount: options.resourceAreaHeaderWillUnmount,\n };\n }\n let plainColSpecs = [];\n let groupColSpecs = []; // part of the colSpecs, but filtered out in order to put first\n let groupSpecs = [];\n let isVGrouping = false;\n for (let colSpec of allColSpecs) {\n if (colSpec.group) {\n groupColSpecs.push(Object.assign(Object.assign({}, colSpec), { cellClassNames: colSpec.cellClassNames || options.resourceGroupLabelClassNames, cellContent: colSpec.cellContent || options.resourceGroupLabelContent, cellDidMount: colSpec.cellDidMount || options.resourceGroupLabelDidMount, cellWillUnmount: colSpec.cellWillUnmount || options.resourceGroupLaneWillUnmount }));\n }\n else {\n plainColSpecs.push(colSpec);\n }\n }\n // BAD: mutates a user-supplied option\n let mainColSpec = plainColSpecs[0];\n mainColSpec.isMain = true;\n mainColSpec.cellClassNames = mainColSpec.cellClassNames || options.resourceLabelClassNames;\n mainColSpec.cellContent = mainColSpec.cellContent || options.resourceLabelContent;\n mainColSpec.cellDidMount = mainColSpec.cellDidMount || options.resourceLabelDidMount;\n mainColSpec.cellWillUnmount = mainColSpec.cellWillUnmount || options.resourceLabelWillUnmount;\n if (groupColSpecs.length) {\n groupSpecs = groupColSpecs;\n isVGrouping = true;\n }\n else {\n let hGroupField = options.resourceGroupField;\n if (hGroupField) {\n groupSpecs.push({\n field: hGroupField,\n labelClassNames: options.resourceGroupLabelClassNames,\n labelContent: options.resourceGroupLabelContent,\n labelDidMount: options.resourceGroupLabelDidMount,\n labelWillUnmount: options.resourceGroupLabelWillUnmount,\n laneClassNames: options.resourceGroupLaneClassNames,\n laneContent: options.resourceGroupLaneContent,\n laneDidMount: options.resourceGroupLaneDidMount,\n laneWillUnmount: options.resourceGroupLaneWillUnmount,\n });\n }\n }\n let allOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER;\n let plainOrderSpecs = [];\n for (let orderSpec of allOrderSpecs) {\n let isGroup = false;\n for (let groupSpec of groupSpecs) {\n if (groupSpec.field === orderSpec.field) {\n groupSpec.order = orderSpec.order; // -1, 0, 1\n isGroup = true;\n break;\n }\n }\n if (!isGroup) {\n plainOrderSpecs.push(orderSpec);\n }\n }\n return {\n superHeaderRendering,\n isVGrouping,\n groupSpecs,\n colSpecs: groupColSpecs.concat(plainColSpecs),\n orderSpecs: plainOrderSpecs,\n };\n}\n\nvar css_248z = \".fc .fc-resource-timeline-divider{cursor:col-resize;width:3px}.fc .fc-resource-group{font-weight:inherit;text-align:inherit}.fc .fc-resource-timeline .fc-resource-group:not([rowspan]){background:var(--fc-neutral-bg-color)}.fc .fc-timeline-lane-frame{position:relative}.fc .fc-timeline-overlap-enabled .fc-timeline-lane-frame .fc-timeline-events{box-sizing:content-box;padding-bottom:10px}.fc-timeline-body-expandrows td.fc-timeline-lane{position:relative}.fc-timeline-body-expandrows .fc-timeline-lane-frame{position:static}.fc-datagrid-cell-frame-liquid{height:100%}.fc-liquid-hack .fc-datagrid-cell-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-datagrid-header .fc-datagrid-cell-frame{align-items:center;display:flex;justify-content:flex-start;position:relative}.fc .fc-datagrid-cell-resizer{bottom:0;cursor:col-resize;position:absolute;top:0;width:5px;z-index:1}.fc .fc-datagrid-cell-cushion{overflow:hidden;padding:8px;white-space:nowrap}.fc .fc-datagrid-expander{cursor:pointer;opacity:.65}.fc .fc-datagrid-expander .fc-icon{display:inline-block;width:1em}.fc .fc-datagrid-expander-placeholder{cursor:auto}.fc .fc-resource-timeline-flat .fc-datagrid-expander-placeholder{display:none}.fc-direction-ltr .fc-datagrid-cell-resizer{right:-3px}.fc-direction-rtl .fc-datagrid-cell-resizer{left:-3px}.fc-direction-ltr .fc-datagrid-expander{margin-right:3px}.fc-direction-rtl .fc-datagrid-expander{margin-left:3px}\";\ninjectStyles(css_248z);\n\nexport { ResourceTimelineLane, ResourceTimelineView, SpreadsheetRow };\n"],"names":["ExpanderIcon","depth","hasChildren","isExpanded","onExpanderClick","nodes","i","push","createElement","className","iconClassNames","onClick","join","Fragment","SpreadsheetIndividualCell","BaseComponent","constructor","super","arguments","this","refineRenderProps","memoizeObjArg","ev","props","context","dispatch","type","id","resource","render","colSpec","renderProps","fieldValue","ContentContainer","elTag","elClasses","elAttrs","role","generatorName","isMain","undefined","customGenerator","cellContent","defaultGenerator","renderResourceInner","classNameGenerator","cellClassNames","didMount","cellDidMount","willUnmount","cellWillUnmount","InnerContent","style","height","innerHeight","input","ResourceApi","view","viewApi","SpreadsheetGroupCell","groupValue","rowSpan","renderGroupInner","SpreadsheetRow","rowSpans","resourceFields","buildResourceFields","colSpecs","map","field","title","getPublicId","key","addPropsEquality","isArraysEqual","SpreadsheetGroupRow","innerInnerRef","createRef","group","value","spec","theme","getClass","scope","colSpan","spreadsheetColCnt","labelContent","renderCellInner","labelClassNames","labelDidMount","labelWillUnmount","ref","isGroupsEqual","SpreadsheetHeader","resizerElRefs","RefMap","_handleColResizerEl","bind","colDraggings","superHeaderRendering","rowInnerHeights","rowNodes","slice","rowInnerHeight","shift","length","headerContent","headerDefault","headerClassNames","headerDidMount","headerWillUnmount","isLastCol","resizerEl","index","dragging","initColResizing","parseInt","destroy","pluginHooks","isRtl","onColWidthChange","ElementDraggingImpl","elementDraggingImpl","startWidth","currentWidths","emitter","on","allCells","findElements","elementClosest","cellEl","getBoundingClientRect","pev","Math","max","deltaX","setAutoScrollEnabled","ResourceTimelineLane","refineRenderProps$1","handleHeightChange","innerEl","isStable","onHeightChange","options","elRef","resourceLaneContent","resourceLaneClassNames","resourceLaneDidMount","resourceLaneWillUnmount","TimelineLane","dateProfile","tDateProfile","nowDate","todayRange","nextDayThreshold","businessHours","eventStore","eventUiBases","dateSelection","eventSelection","eventDrag","eventResize","timelineCoords","resourceId","DividerRow","renderHooks","laneContent","laneClassNames","laneDidMount","laneWillUnmount","InnerContainer","elStyle","ResourceTimelineLanesBody","rowElRefs","innerHeights","node","Object","assign","splitProps","fallbackBusinessHours","slatCoords","onRowHeightChange","ResourceTimelineLanes","rootElRef","minWidth","tableMinWidth","width","clientWidth","minHeight","componentDidMount","updateCoords","componentDidUpdate","componentWillUnmount","onRowCoords","elMap","PositionCache","current","currentMap","rowNode","ResourceTimelineGrid","DateComponent","computeHasResourceBusinessHours","memoize","resourceSplitter","ResourceSplitter","bgSlicer","TimelineLaneSlicer","slatsRef","state","handleEl","el","registerInteractiveComponent","unregisterInteractiveComponent","handleSlatCoords","setState","onSlatCoords","handleRowCoords","rowCoords","timerUnit","greatestDurationDenominator","slotDuration","unit","hasResourceBusinessHours","bgLaneProps","bgSlicedProps","sliceProps","isTimeScale","dateProfileGenerator","dateEnv","expandRows","NowTimer","TimelineSlats","tableColGroupNode","onCoords","onScrollLeftRequest","TimelineLaneBg","businessHourSegs","bgEventSegs","eventResizeSegs","segs","dateSelectionSegs","clientHeight","nowIndicator","isDateInRange","NowIndicatorContainer","coordToCss","dateToCoord","isAxis","date","queryHit","positionLeft","positionTop","rowIndex","topToIndex","slatHit","positionToHit","dateSpan","range","allDay","rect","left","right","top","tops","bottom","bottoms","dayEl","layer","ResourceTimelineViewLayout","scrollGridRef","timeBodyScrollerElRef","spreadsheetHeaderChunkElRef","ensureScrollGridResizeId","resourceAreaWidthOverride","ensureScrollGridResize","clearTimeout","setTimeout","handleSizing","config","SCROLLGRID_RESIZE_INTERVAL","stickyHeaderDates","forPrint","getStickyHeaderDates","stickyFooterScrollbar","getStickyFooterScrollbar","sections","syncRowHeights","isSticky","chunks","tableClassName","rowContent","spreadsheetHeaderRows","outerContent","content","timeHeaderContent","liquid","Boolean","spreadsheetBodyRows","scrollerElRef","timeBodyContent","renderScrollShim","resourceAreaWidth","ScrollGrid","isHeightAuto","collapsibleWidth","colGroups","cols","spreadsheetCols","timeCols","forceTimeScroll","forceScrollLeft","forceResourceScroll","forceScrollTop","getResourceScroll","scrollTop","initSpreadsheetResizing","destroySpreadsheetResizing","spreadsheetHeadEl","dragStartWidth","viewWidth","rootEl","spreadsheetResizerDragging","newWidth","min","ResourceTimelineView","processColOptions","buildTimelineDateProfile","hasNesting","buildRowNodes","layoutRef","renderedRowNodes","buildRowIndex","scrollResponder","update","handleMaxCushionWidth","slotCushionMaxWidth","ceil","handleScrollLeftRequest","scrollLeft","handleScrollRequest","request","layout","rowId","fromBottom","handleColWidthChange","colWidths","spreadsheetColWidths","viewSpec","groupSpecs","orderSpecs","isVGrouping","resourceStore","resourceEntityExpansions","resourcesInitiallyExpanded","slotMinWidth","slatCols","buildSlatCols","computeFallbackSlotMinWidth","ViewContainer","eventOverlap","buildSpreadsheetCols","contentArg","rowSyncHeights","renderSpreadsheetRows","TimelineHeader","onMaxCushionWidth","reportRowHeightChange","createScrollResponder","getSnapshotBeforeUpdate","resourceScroll","queryResourceScroll","prevProps","prevState","snapshot","detach","slotsPerLabel","trBottoms","scroll","elBottom","rowIdToIndex","forcedWidths","fallbackWidth","allColSpecs","resourceAreaColumns","resourceAreaHeaderContent","resourceAreaHeaderClassNames","resourceAreaHeaderDidMount","resourceAreaHeaderWillUnmount","plainColSpecs","groupColSpecs","resourceGroupLabelClassNames","resourceGroupLabelContent","resourceGroupLabelDidMount","resourceGroupLaneWillUnmount","mainColSpec","resourceLabelClassNames","resourceLabelContent","resourceLabelDidMount","resourceLabelWillUnmount","hGroupField","resourceGroupField","resourceGroupLabelWillUnmount","resourceGroupLaneClassNames","resourceGroupLaneContent","resourceGroupLaneDidMount","allOrderSpecs","resourceOrder","DEFAULT_RESOURCE_ORDER","plainOrderSpecs","orderSpec","isGroup","groupSpec","order","concat","addStateEquality","injectStyles"],"mappings":"opBAWA,SAASA,GAAaC,MAAEA,EAAKC,YAAEA,EAAWC,WAAEA,EAAUC,gBAAEA,IACpD,IAAIC,EAAQ,GACZ,IAAK,IAAIC,EAAI,EAAGA,EAAIL,EAAOK,GAAK,EAC5BD,EAAME,KAAKC,EAAc,OAAQ,CAAEC,UAAW,aAElD,IAAIC,EAAiB,CAAC,WAWtB,OAVIR,IACIC,EACAO,EAAeH,KAAK,wBAGpBG,EAAeH,KAAK,wBAG5BF,EAAME,KAAKC,EAAc,OAAQ,CAAEC,UAAW,wBAA0BP,EAAc,GAAK,qCAAsCS,QAASP,GACtII,EAAc,OAAQ,CAAEC,UAAWC,EAAeE,KAAK,SACpDJ,EAAcK,EAAU,MAAOR,EAC1C,CAGA,MAAMS,UAAkCC,EACpC,WAAAC,GACIC,SAASC,WACTC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ACrBmW,EAAY5V,eAAiB4V,EAAY5V,gBAAkBiG,EAAQ4P,wBACnED,EAAYhW,YAAcgW,EAAYhW,aAAeqG,EAAQ6P,qBAC7DF,EAAY1V,aAAe0V,EAAY1V,cAAgB+F,EAAQ8P,sBAC/DH,EAAYxV,gBAAkBwV,EAAYxV,iBAAmB6F,EAAQ+P,yBACjET,EAAc5R,OACdmP,EAAayC,EACbvC,GAAc,MAEb,CACD,IAAIiD,EAAchQ,EAAQiQ,mBACtBD,GACAnD,EAAWrV,KAAK,CACZ8D,MAAO0U,EACPvT,gBAAiBuD,EAAQuP,6BACzBhT,aAAcyD,EAAQwP,0BACtB9S,cAAesD,EAAQyP,2BACvB9S,iBAAkBqD,EAAQkQ,8BAC1B1O,eAAgBxB,EAAQmQ,4BACxB5O,YAAavB,EAAQoQ,yBACrB3O,aAAczB,EAAQqQ,0BACtB3O,gBAAiB1B,EAAQ0P,8BAGpC,CACD,IAAIY,EAAgBtQ,EAAQuQ,eAAiBC,EACzCC,EAAkB,GACtB,IAAK,IAAIC,KAAaJ,EAAe,CACjC,IAAIK,GAAU,EACd,IAAK,IAAIC,KAAa/D,EAClB,GAAI+D,EAAUtV,QAAUoV,EAAUpV,MAAO,CACrCsV,EAAUC,MAAQH,EAAUG,MAC5BF,GAAU,EACV,KACH,CAEAA,GACDF,EAAgBjZ,KAAKkZ,EAE5B,CACD,MAAO,CACHtT,uBACA2P,cACAF,aACAzR,SAAUkU,EAAcwB,OAAOzB,GAC/BvC,WAAY2D,EAEpB,CA9GApF,GAAqB0F,iBAAiB,CAClCpE,qBAAsBhR,IAgH1BqV,EADe"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{ScrollGrid as e}from"../scrollgrid/internal.js";import{ct as t,bG as n,x as i,E as s,bc as o,z as r,ca as l,c9 as a,cq as d,c,bl as h,d as f,br as u,bq as m,t as p,q as g,bp as v,bo as b,y as S,al as R,B as D,bP as y,cd as w,a as C,bu as x,cp as k,bQ as P,c8 as M,ak as T,ch as E,a6 as I,aK as W,bC as z,cm as L,cl as H,bR as N,bU as O,o as U,be as A,cg as G,co as j,aw as B,bm as q,by as F,A as _,aY as Z,aZ as X,aX as Y,C as K,a_ as Q,b8 as J,aL as V,G as $}from"../core/internal-common.js";import{createRef as ee,createElement as te,Fragment as ne}from"../../preact/dist/preact.mjs.js";t('.fc .fc-timeline-body{min-height:100%;position:relative;z-index:1}.fc .fc-timeline-slots{bottom:0;position:absolute;top:0;z-index:1}.fc .fc-timeline-slots>table{height:100%}.fc .fc-timeline-slot-minor{border-style:dotted}.fc .fc-timeline-slot-frame{align-items:center;display:flex;justify-content:center}.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame{justify-content:flex-start}.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame{overflow:hidden}.fc .fc-timeline-slot-cushion{padding:4px 5px;white-space:nowrap}.fc-direction-ltr .fc-timeline-slot{border-right:0!important}.fc-direction-rtl .fc-timeline-slot{border-left:0!important}.fc .fc-timeline-now-indicator-container{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:4}.fc .fc-timeline-now-indicator-arrow,.fc .fc-timeline-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;pointer-events:none;position:absolute;top:0}.fc .fc-timeline-now-indicator-arrow{border-left-color:transparent;border-right-color:transparent;border-width:6px 5px 0;margin:0 -6px}.fc .fc-timeline-now-indicator-line{border-width:0 0 0 1px;bottom:0;margin:0 -1px}.fc .fc-timeline-events{position:relative;width:0;z-index:3}.fc .fc-timeline-event-harness,.fc .fc-timeline-more-link{position:absolute;top:0}.fc-timeline-event{z-index:1}.fc-timeline-event.fc-event-mirror{z-index:2}.fc-timeline-event{align-items:center;border-radius:0;display:flex;font-size:var(--fc-small-font-size);margin-bottom:1px;padding:2px 1px;position:relative}.fc-timeline-event .fc-event-main{flex-grow:1;flex-shrink:1;min-width:0}.fc-timeline-event .fc-event-time{font-weight:700}.fc-timeline-event .fc-event-time,.fc-timeline-event .fc-event-title{padding:0 2px;white-space:nowrap}.fc-direction-ltr .fc-timeline-event.fc-event-end,.fc-direction-ltr .fc-timeline-more-link{margin-right:1px}.fc-direction-rtl .fc-timeline-event.fc-event-end,.fc-direction-rtl .fc-timeline-more-link{margin-left:1px}.fc-timeline-overlap-disabled .fc-timeline-event{margin-bottom:0;padding-bottom:5px;padding-top:5px}.fc-timeline-event:not(.fc-event-end):after,.fc-timeline-event:not(.fc-event-start):before{border-color:transparent #000;border-style:solid;border-width:5px;content:"";flex-grow:0;flex-shrink:0;height:0;margin:0 1px;opacity:.5;width:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after{border-left:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before{border-right:0}.fc-timeline-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;font-size:var(--fc-small-font-size);padding:1px}.fc-timeline-more-link-inner{display:inline-block;left:0;padding:2px;right:0}.fc .fc-timeline-bg{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:2}.fc .fc-timeline-bg .fc-non-business{z-index:1}.fc .fc-timeline-bg .fc-bg-event{z-index:2}.fc .fc-timeline-bg .fc-highlight{z-index:3}.fc .fc-timeline-bg-harness{bottom:0;position:absolute;top:0}');n.MAX_TIMELINE_SLOTS=1e3;const ie=[{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 se(e,t,s,o){let r={labelInterval:s.slotLabelInterval,slotDuration:s.slotDuration};!function(e,t,i){const{currentRange:s}=t;if(e.labelInterval){i.countDurationsBetween(s.start,s.end,e.labelInterval)>n.MAX_TIMELINE_SLOTS&&(console.warn("slotLabelInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){i.countDurationsBetween(s.start,s.end,e.slotDuration)>n.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){const t=u(e.labelInterval,e.slotDuration);(null===t||t<1)&&(console.warn("slotLabelInterval must be a multiple of slotDuration"),e.slotDuration=null)}}(r,e,t),le(r,e,t),function(e,t,n){const{currentRange:i}=t;let{slotDuration:s}=e;if(!s){const o=le(e,t,n);for(let e of ie){const t=f(e),n=u(o,t);if(null!==n&&n>1&&n<=6){s=t;break}}if(s){n.countDurationsBetween(i.start,i.end,s)>200&&(s=null)}s||(s=o),e.slotDuration=s}}(r,e,t);let l=s.slotLabelFormat,a=Array.isArray(l)?l:null!=l?[l]:function(e,t,n,i){let s,o;const{labelInterval:r}=e;let l=c(r).unit;const a=i.weekNumbers;let d=s=o=null;"week"!==l||a||(l="day");switch(l){case"year":d={year:"numeric"};break;case"month":ae("years",t,n)>1&&(d={year:"numeric"}),s={month:"short"};break;case"week":ae("years",t,n)>1&&(d={year:"numeric"}),s={week:"narrow"};break;case"day":ae("years",t,n)>1?d={year:"numeric",month:"long"}:ae("months",t,n)>1&&(d={month:"long"}),a&&(s={week:"short"}),o={weekday:"narrow",day:"numeric"};break;case"hour":a&&(d={week:"short"}),ae("days",t,n)>1&&(s={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),o={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":b(r)/60>=6?(d={hour:"numeric",meridiem:"short"},s=e=>":"+T(e.date.minute,2)):d={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":v(r)/60>=6?(d={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},s=e=>":"+T(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"},s=e=>"."+T(e.millisecond,3)}return[].concat(d||[],s||[],o||[])}(r,e,t,s);r.headerFormats=a.map((e=>i(e))),r.isTimeScale=Boolean(r.slotDuration.milliseconds);let d=null;if(!r.isTimeScale){const e=c(r.slotDuration).unit;/year|month|week/.test(e)&&(d=e)}r.largeUnit=d,r.emphasizeWeeks=1===h(r.slotDuration)&&ae("weeks",e,t)>=2&&!s.businessHours;let g,S,D=s.snapDuration;D&&(g=f(D),S=u(r.slotDuration,g)),null==S&&(g=r.slotDuration,S=1),r.snapDuration=g,r.snapsPerSlot=S;let y=m(e.slotMaxTime)-m(e.slotMinTime),w=oe(e.renderRange.start,r,t),C=oe(e.renderRange.end,r,t);r.isTimeScale&&(w=t.add(w,e.slotMinTime),C=t.add(p(C,-1),e.slotMaxTime)),r.timeWindowMs=y,r.normalizedRange={start:w,end:C};let x=[],k=w;for(;k<C;)re(k,r,e,o)&&x.push(k),k=t.add(k,r.slotDuration);r.slotDates=x;let P=-1,M=0;const E=[],I=[];for(k=w;k<C;)re(k,r,e,o)?(P+=1,E.push(P),I.push(M)):E.push(P+.5),k=t.add(k,r.snapDuration),M+=1;return r.snapDiffToIndex=E,r.snapIndexToDiff=I,r.snapCnt=P+1,r.slotCnt=r.snapCnt/r.snapsPerSlot,r.isWeekStarts=function(e,t){let{slotDates:n,emphasizeWeeks:i}=e,s=null,o=[];for(let e of n){let n=t.computeWeekNumber(e),r=i&&null!==s&&s!==n;s=n,o.push(r)}return o}(r,t),r.cellRows=function(e,t){let n=e.slotDates,i=e.headerFormats,s=i.map((()=>[])),o=h(e.slotDuration),r=7===o?"week":1===o?"day":null,l=i.map((e=>e.getSmallestUnit?e.getSmallestUnit():null));for(let o=0;o<n.length;o+=1){let a=n[o],d=e.isWeekStarts[o];for(let n=0;n<i.length;n+=1){let o=i[n],c=s[n],h=c[c.length-1],f=n===i.length-1,u=i.length>1&&!f,m=null,p=l[n]||(f?r:null);if(u){let e=t.format(a,o);h&&h.text===e?h.colspan+=1:m=de(a,e,p)}else if(!h||R(t.countDurationsBetween(e.normalizedRange.start,a,e.labelInterval))){m=de(a,t.format(a,o),p)}else h.colspan+=1;m&&(m.weekStart=d,c.push(m))}}return s}(r,t),r.slotsPerLabel=u(r.labelInterval,r.slotDuration),r}function oe(e,t,n){let i=e;return t.isTimeScale||(i=g(i),t.largeUnit&&(i=n.startOf(i,t.largeUnit))),i}function re(e,t,n,i){if(i.isHiddenDay(e))return!1;if(t.isTimeScale){let i=g(e),s=e.valueOf()-i.valueOf()-m(n.slotMinTime);return s=(s%864e5+864e5)%864e5,s<t.timeWindowMs}return!0}function le(e,t,n){const{currentRange:i}=t;let{labelInterval:s}=e;if(!s){let t;if(e.slotDuration){for(t of ie){const n=f(t),i=u(n,e.slotDuration);if(null!==i&&i<=6){s=n;break}}s||(s=e.slotDuration)}else for(t of ie){s=f(t);if(n.countDurationsBetween(i.start,i.end,s)>=18)break}e.labelInterval=s}return s}function ae(e,t,n){let i=t.currentRange,s=null;return"years"===e?s=n.diffWholeYears(i.start,i.end):"months"===e||"weeks"===e?s=n.diffWholeMonths(i.start,i.end):"days"===e&&(s=S(i.start,i.end)),s||0}function de(e,t,n){return{date:e,text:t,rowUnit:n,colspan:1,isWeekStart:!1}}class ce extends D{constructor(){super(...arguments),this.refineRenderProps=_(ue),this.buildCellNavLinkAttrs=r(he)}render(){let{props:e,context:t}=this,{dateEnv:n,options:i}=t,{cell:s,dateProfile:o,tDateProfile:r}=e,l=Z(s.date,e.todayRange,e.nowDate,o),a=this.refineRenderProps({level:e.rowLevel,dateMarker:s.date,text:s.text,dateEnv:t.dateEnv,viewApi:t.viewApi});return te(K,{elTag:"th",elClasses:["fc-timeline-slot","fc-timeline-slot-label",s.isWeekStart&&"fc-timeline-slot-em",..."time"===s.rowUnit?X(l,t.theme):Y(l,t.theme)],elAttrs:{colSpan:s.colspan,"data-date":n.formatIso(s.date,{omitTime:!r.isTimeScale,omitTimeZoneOffset:!0})},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:fe,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(n=>te("div",{className:"fc-timeline-slot-frame",style:{height:e.rowInnerHeight}},te(n,{elTag:"a",elClasses:["fc-timeline-slot-cushion","fc-scrollgrid-sync-inner",e.isSticky&&"fc-sticky"],elAttrs:this.buildCellNavLinkAttrs(t,s.date,s.rowUnit)}))))}}function he(e,t,n){return n&&"time"!==n?Q(e,t,n):{}}function fe(e){return e.text}function ue(e){return{level:e.level,date:e.dateEnv.toDate(e.dateMarker),view:e.viewApi,text:e.text}}class me extends D{render(){let{dateProfile:e,tDateProfile:t,rowInnerHeights:n,todayRange:i,nowDate:s}=this.props,{cellRows:o}=t;return te(ne,null,o.map(((r,l)=>{let a=l===o.length-1,d=t.isTimeScale&&a;return te("tr",{key:l,className:["fc-timeline-header-row",d?"fc-timeline-header-row-chrono":""].join(" ")},r.map((o=>te(ce,{key:o.date.toISOString(),cell:o,rowLevel:l,dateProfile:e,tDateProfile:t,todayRange:i,nowDate:s,rowInnerHeight:n&&n[l],isSticky:!a}))))})))}}class pe{constructor(e,t,n,i,s,o){this.slatRootEl=e,this.dateProfile=n,this.tDateProfile=i,this.dateEnv=s,this.isRtl=o,this.outerCoordCache=new J(e,t,!0,!1),this.innerCoordCache=new J(e,V(t,"div"),!0,!1)}isDateInRange(e){return $(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 s=n-i,{innerCoordCache:o,outerCoordCache:r}=this;return this.isRtl?r.originClientRect.width-(r.rights[i]-o.getWidth(i)*s):r.lefts[i]+o.getWidth(i)*s}rangeToCoords(e){return{start:this.dateToCoord(e.start),end:this.dateToCoord(e.end)}}durationToCoord(e){let{dateProfile:t,tDateProfile:n,dateEnv:i,isRtl:s}=this,o=0;if(t){let r=i.add(t.activeRange.start,e);n.isTimeScale||(r=g(r)),o=this.dateToCoord(r),!s&&o&&(o+=1)}return o}coordFromLeft(e){return this.isRtl?this.outerCoordCache.originClientRect.width-e:e}computeDateSnapCoverage(e){return ge(e,this.tDateProfile,this.dateEnv)}}function ge(e,t,n){let i=n.countDurationsBetween(t.normalizedRange.start,e,t.snapDuration);if(i<0)return 0;if(i>=t.snapDiffToIndex.length)return t.snapCnt;let s=Math.floor(i),o=t.snapDiffToIndex[s];return R(o)?o+=i-s:o=Math.ceil(o),o}function ve(e,t){return null===e?{left:"",right:""}:t?{right:e,left:""}:{left:e,right:""}}function be(e,t){return e?t?{right:e.start,left:-e.end}:{left:e.start,right:-e.end}:{left:"",right:""}}class Se extends D{constructor(){super(...arguments),this.rootElRef=ee()}render(){let{props:e,context:t}=this,n=c(e.tDateProfile.slotDuration).unit,i=e.slatCoords&&e.slatCoords.dateProfile===e.dateProfile?e.slatCoords:null;return te(I,{unit:n},((n,s)=>te("div",{className:"fc-timeline-header",ref:this.rootElRef},te("table",{"aria-hidden":!0,className:"fc-scrollgrid-sync-table",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,te("tbody",null,te(me,{dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:n,todayRange:s,rowInnerHeights:e.rowInnerHeights}))),t.options.nowIndicator&&te("div",{className:"fc-timeline-now-indicator-container"},i&&i.isDateInRange(n)&&te(E,{elClasses:["fc-timeline-now-indicator-arrow"],elStyle:ve(i.dateToCoord(n),t.isRtl),isAxis:!0,date:n})))))}componentDidMount(){this.updateSize()}componentDidUpdate(){this.updateSize()}updateSize(){this.props.onMaxCushionWidth&&this.props.onMaxCushionWidth(this.computeMaxCushionWidth())}computeMaxCushionWidth(){return Math.max(...W(this.rootElRef.current,".fc-timeline-header-row:last-child .fc-timeline-slot-cushion").map((e=>e.getBoundingClientRect().width)))}}class Re extends D{render(){let{props:e,context:t}=this,{dateEnv:n,options:i,theme:s}=t,{date:o,tDateProfile:r,isEm:l}=e,a=Z(e.date,e.todayRange,e.nowDate,e.dateProfile),d=Object.assign(Object.assign({date:n.toDate(e.date)},a),{view:t.viewApi});return te(K,{elTag:"td",elRef:e.elRef,elClasses:["fc-timeline-slot","fc-timeline-slot-lane",l&&"fc-timeline-slot-em",r.isTimeScale?R(n.countDurationsBetween(r.normalizedRange.start,e.date,r.labelInterval))?"fc-timeline-slot-major":"fc-timeline-slot-minor":"",...e.isDay?Y(a,s):X(a,s)],elAttrs:{"data-date":n.formatIso(o,{omitTimeZoneOffset:!0,omitTime:!r.isTimeScale})},renderProps:d,generatorName:"slotLaneContent",customGenerator:i.slotLaneContent,classNameGenerator:i.slotLaneClassNames,didMount:i.slotLaneDidMount,willUnmount:i.slotLaneWillUnmount},(e=>te(e,{elTag:"div"})))}}class De extends D{render(){let{props:e}=this,{tDateProfile:t,cellElRefs:n}=e,{slotDates:i,isWeekStarts:s}=t,o=!t.isTimeScale&&!t.largeUnit;return te("tbody",null,te("tr",null,i.map(((i,r)=>{let l=i.toISOString();return te(Re,{key:l,elRef:n.createRef(l),date:i,dateProfile:e.dateProfile,tDateProfile:t,nowDate:e.nowDate,todayRange:e.todayRange,isEm:s[r],isDay:o})}))))}}class ye extends D{constructor(){super(...arguments),this.rootElRef=ee(),this.cellElRefs=new w,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 te("div",{className:"fc-timeline-slots",ref:this.rootElRef},te("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,te(De,{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 pe(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:t}=this.coords,{dateEnv:n,isRtl:i}=this.context,{tDateProfile:s}=this.props,o=t.leftToIndex(e);if(null!=o){let r=t.getWidth(o),l=i?(t.rights[o]-e)/r:(e-t.lefts[o])/r,a=Math.floor(l*s.snapsPerSlot),d=n.add(s.slotDates[o],q(s.snapDuration,a));return{dateSpan:{range:{start:d,end:n.add(d,s.snapDuration)},allDay:!this.props.tDateProfile.isTimeScale},dayEl:this.cellElRefs.currentMap[o],left:t.lefts[o],right:t.rights[o]}}return null}}function we(e,t,n){let i=[];if(n)for(let s of e){let e=n.rangeToCoords(s),o=Math.round(e.start),r=Math.round(e.end);r-o<t&&(r=o+t),i.push({start:o,end:r})}return i}class Ce extends D{render(){let{props:e}=this,t=[].concat(e.eventResizeSegs,e.dateSelectionSegs);return e.timelineCoords&&te("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,t,n){let{todayRange:i,nowDate:s}=this.props,{isRtl:o}=this.context,r=we(e,0,t),l=e.map(((e,t)=>{let l=be(r[t],o);return te("div",{key:N(e.eventRange),className:"fc-timeline-bg-harness",style:l},"bg-event"===n?te(L,Object.assign({seg:e},P(e,i,s))):H(n))}));return te(ne,null,l)}}class xe extends O{sliceRange(e,t,n,i,s){let o=function(e,t,n){if(!t.isTimeScale&&(e=B(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,i,s),r=[];if(ge(o.start,i,s)<ge(o.end,i,s)){let e=U(o,i.normalizedRange);e&&r.push({start:e.start,end:e.end,isStart:e.start.valueOf()===o.start.valueOf()&&re(e.start,i,t,n),isEnd:e.end.valueOf()===o.end.valueOf()&&re(A(e.end,-1),i,t,n)})}return r}}const ke=i({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});class Pe extends D{render(){let{props:e}=this;return te(G,Object.assign({},e,{elClasses:["fc-timeline-event","fc-h-event"],defaultTimeFormat:ke,defaultDisplayEventTime:!e.isTimeScale}))}}class Me extends D{render(){let{props:e,context:t}=this,{hiddenSegs:n,placement:i,resourceId:s}=e,{top:o,hcoords:r}=i,l=r&&null!==o,a=be(r,t.isRtl),d=s?{resourceId:s}:{};return te(j,{elRef:e.elRef,elClasses:["fc-timeline-more-link"],elStyle:Object.assign({visibility:l?"":"hidden",top:o||0},a),allDayDate:null,moreCnt:n.length,allSegs:n,hiddenSegs:n,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:d,popoverContent:()=>te(ne,null,n.map((t=>{let n=t.eventRange.instance.instanceId;return te("div",{key:n,style:{visibility:e.isForcedInvisible[n]?"hidden":""}},te(Pe,Object.assign({isTimeScale:e.isTimeScale,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:n===e.eventSelection},P(t,e.todayRange,e.nowDate))))})))},(e=>te(e,{elTag:"div",elClasses:["fc-timeline-more-link-inner","fc-sticky"]})))}}class Te extends D{constructor(){super(...arguments),this.slicer=new xe,this.sortEventSegs=r(y),this.harnessElRefs=new w,this.moreElRefs=new w,this.innerElRef=ee(),this.state={eventInstanceHeights:{},moreLinkHeights:{}},this.handleResize=e=>{e&&this.updateSize()}}render(){let{props:e,state:t,context:n}=this,{options:i}=n,{dateProfile:s,tDateProfile:o}=e,r=this.slicer.sliceProps(e,s,o.isTimeScale?null:e.nextDayThreshold,n,s,n.dateProfileGenerator,o,n.dateEnv),l=(r.eventDrag?r.eventDrag.segs:null)||(r.eventResize?r.eventResize.segs:null)||[],a=this.sortEventSegs(r.fgEventSegs,i.eventOrder),d=we(a,i.eventMinWidth,e.timelineCoords),[c,h]=function(e,t,n,i,s,o){let r=[],l=[];for(let i=0;i<e.length;i+=1){let s=e[i],o=n[s.eventRange.instance.instanceId],a=t[i];o&&a?r.push({index:i,span:a,thickness:o}):l.push({seg:s,hcoords:a,top:null})}let a=new F;null!=s&&(a.strictOrder=s),null!=o&&(a.maxStackCnt=o);let d=a.addSegs(r),c=d.map((t=>({seg:e[t.index],hcoords:t.span,top:null}))),h=z(d),f=[],u=[];const m=t=>e[t.index];for(let t=0;t<h.length;t+=1){let n=h[t],s=n.entries.map(m),o=i[x(k(s))];null!=o?f.push({index:e.length+t,thickness:o,span:n.span}):u.push({seg:s,hcoords:n.span,top:null})}a.maxStackCnt=-1,a.addSegs(f);let p=a.toRects(),g=[],v=0;for(let t of p){let n=t.index;g.push({seg:n<e.length?e[n]:h[n-e.length].entries.map(m),hcoords:t.span,top:t.levelCoord}),v=Math.max(v,t.levelCoord+t.thickness)}return[g.concat(l,c,u),v]}(a,d,t.eventInstanceHeights,t.moreLinkHeights,i.eventOrderStrict,i.eventMaxStack),f=(r.eventDrag?r.eventDrag.affectedInstances:null)||(r.eventResize?r.eventResize.affectedInstances:null)||{};return te(ne,null,te(Ce,{businessHourSegs:r.businessHourSegs,bgEventSegs:r.bgEventSegs,timelineCoords:e.timelineCoords,eventResizeSegs:r.eventResize?r.eventResize.segs:[],dateSelectionSegs:r.dateSelectionSegs,nowDate:e.nowDate,todayRange:e.todayRange}),te("div",{className:"fc-timeline-events fc-scrollgrid-sync-inner",ref:this.innerElRef,style:{height:h}},this.renderFgSegs(c,f,!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]})))}(l,e.timelineCoords,c),{},Boolean(r.eventDrag),Boolean(r.eventResize),!1)))}componentDidMount(){this.updateSize(),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){e.eventStore===this.props.eventStore&&e.timelineCoords===this.props.timelineCoords&&t.moreLinkHeights===this.state.moreLinkHeights||this.updateSize()}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateSize(){let{props:e}=this,{timelineCoords:t}=e;const n=this.innerElRef.current;e.onHeightChange&&e.onHeightChange(n,!1),t&&this.setState({eventInstanceHeights:C(this.harnessElRefs.currentMap,(e=>Math.round(e.getBoundingClientRect().height))),moreLinkHeights:C(this.moreElRefs.currentMap,(e=>Math.round(e.getBoundingClientRect().height)))},(()=>{e.onHeightChange&&e.onHeightChange(n,!0)})),e.syncParentMinHeight&&(n.parentElement.style.minHeight=n.style.height)}renderFgSegs(e,t,n,i,s){let{harnessElRefs:o,moreElRefs:r,props:l,context:a}=this,d=n||i||s;return te(ne,null,e.map((e=>{let{seg:c,hcoords:h,top:f}=e;if(Array.isArray(c)){let n=x(k(c));return te(Me,{key:"m:"+n,elRef:r.createRef(n),hiddenSegs:c,placement:e,dateProfile:l.dateProfile,nowDate:l.nowDate,todayRange:l.todayRange,isTimeScale:l.tDateProfile.isTimeScale,eventSelection:l.eventSelection,resourceId:l.resourceId,isForcedInvisible:t})}let u=c.eventRange.instance.instanceId,m=d||Boolean(!t[u]&&h&&null!==f),p=be(h,a.isRtl);return te("div",{key:"e:"+u,ref:d?null:o.createRef(u),className:"fc-timeline-event-harness",style:Object.assign({visibility:m?"":"hidden",top:f||0},p)},te(Pe,Object.assign({isTimeScale:l.tDateProfile.isTimeScale,seg:c,isDragging:n,isResizing:i,isDateSelecting:s,isSelected:u===l.eventSelection},P(c,l.todayRange,l.nowDate))))})))}}Te.addStateEquality({eventInstanceHeights:s,moreLinkHeights:s});class Ee extends o{constructor(){super(...arguments),this.slatsRef=ee(),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:t,context:n}=this,{options:i}=n,{dateProfile:s,tDateProfile:o}=e,r=c(o.slotDuration).unit;return te("div",{className:"fc-timeline-body",ref:this.handeEl,style:{minWidth:e.tableMinWidth,height:e.clientHeight,width:e.clientWidth}},te(I,{unit:r},((r,l)=>te(ne,null,te(ye,{ref:this.slatsRef,dateProfile:s,tDateProfile:o,nowDate:r,todayRange:l,clientWidth:e.clientWidth,tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,onCoords:this.handleCoords,onScrollLeftRequest:e.onScrollLeftRequest}),te(Te,{dateProfile:s,tDateProfile:e.tDateProfile,nowDate:r,todayRange:l,nextDayThreshold:i.nextDayThreshold,businessHours:e.businessHours,eventStore:e.eventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,timelineCoords:t.coords,syncParentMinHeight:!0}),i.nowIndicator&&t.coords&&t.coords.isDateInRange(r)&&te("div",{className:"fc-timeline-now-indicator-container"},te(E,{elClasses:["fc-timeline-now-indicator-line"],elStyle:ve(t.coords.dateToCoord(r),n.isRtl),isAxis:!1,date:r}))))))}queryHit(e,t,n,i){let s=this.slatsRef.current.positionToHit(e);return s?{dateProfile:this.props.dateProfile,dateSpan:s.dateSpan,rect:{left:s.left,right:s.right,top:0,bottom:i},dayEl:s.dayEl,layer:0}:null}}class Ie extends o{constructor(){super(...arguments),this.buildTimelineDateProfile=r(se),this.scrollGridRef=ee(),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:t,state:n,context:i}=this,{options:s}=i,o=!t.forPrint&&l(s),r=!t.forPrint&&a(s),c=this.buildTimelineDateProfile(t.dateProfile,i.dateEnv,s,i.dateProfileGenerator),{slotMinWidth:h}=s,f=We(c,h||this.computeFallbackSlotMinWidth(c)),u=[{type:"header",key:"header",isSticky:o,chunks:[{key:"timeline",content:e=>te(Se,{dateProfile:t.dateProfile,clientWidth:e.clientWidth,clientHeight:e.clientHeight,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,tDateProfile:c,slatCoords:n.slatCoords,onMaxCushionWidth:h?null:this.handleMaxCushionWidth})}]},{type:"body",key:"body",liquid:!0,chunks:[{key:"timeline",content:e=>te(Ee,Object.assign({},t,{clientWidth:e.clientWidth,clientHeight:e.clientHeight,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,tDateProfile:c,onSlatCoords:this.handleSlatCoords,onScrollLeftRequest:this.handleScrollLeftRequest}))}]}];return r&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"timeline",content:M}]}),te(d,{elClasses:["fc-timeline",!1===s.eventOverlap?"fc-timeline-overlap-disabled":""],viewSpec:i.viewSpec},te(e,{ref:this.scrollGridRef,liquid:!t.isHeightAuto&&!t.forPrint,forPrint:t.forPrint,collapsibleWidth:!1,colGroups:[{cols:f}],sections:u}))}computeFallbackSlotMinWidth(e){return Math.max(30,(this.state.slotCushionMaxWidth||0)/e.slotsPerLabel)}}function We(e,t){return[{span:e.slotCnt,minWidth:t||1}]}export{pe as TimelineCoords,Se as TimelineHeader,me as TimelineHeaderRows,Te as TimelineLane,Ce as TimelineLaneBg,xe as TimelineLaneSlicer,ye as TimelineSlats,Ie as TimelineView,We as buildSlatCols,se as buildTimelineDateProfile,ve as coordToCss,be as coordsToCss};
|
1
|
+
import{ScrollGrid as e}from"../scrollgrid/internal.js";import{ct as t,bG as n,x as i,E as s,bc as o,z as r,ca as l,c9 as a,cq as d,c,bl as h,d as f,br as u,bq as m,t as p,q as g,bp as v,bo as b,y as S,al as R,B as D,ch as y,a6 as w,aK as C,bP as x,cd as k,a as P,bu as M,cp as T,bQ as E,c8 as I,ak as W,bm as z,bC as L,cm as H,cl as N,bR as O,bU as U,o as A,be as G,cg as j,co as B,aw as q,A as F,aY as _,aZ as Z,aX as X,C as Y,a_ as K,b8 as Q,aL as J,G as V,by as $}from"../core/internal-common.js";import{createRef as ee,createElement as te,Fragment as ne}from"../../preact/dist/preact.mjs.js";t('.fc .fc-timeline-body{min-height:100%;position:relative;z-index:1}.fc .fc-timeline-slots{bottom:0;position:absolute;top:0;z-index:1}.fc .fc-timeline-slots>table{height:100%}.fc .fc-timeline-slot-minor{border-style:dotted}.fc .fc-timeline-slot-frame{align-items:center;display:flex;justify-content:center}.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame{justify-content:flex-start}.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame{overflow:hidden}.fc .fc-timeline-slot-cushion{padding:4px 5px;white-space:nowrap}.fc-direction-ltr .fc-timeline-slot{border-right:0!important}.fc-direction-rtl .fc-timeline-slot{border-left:0!important}.fc .fc-timeline-now-indicator-container{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:4}.fc .fc-timeline-now-indicator-arrow,.fc .fc-timeline-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;pointer-events:none;position:absolute;top:0}.fc .fc-timeline-now-indicator-arrow{border-left-color:transparent;border-right-color:transparent;border-width:6px 5px 0;margin:0 -6px}.fc .fc-timeline-now-indicator-line{border-width:0 0 0 1px;bottom:0;margin:0 -1px}.fc .fc-timeline-events{position:relative;width:0;z-index:3}.fc .fc-timeline-event-harness,.fc .fc-timeline-more-link{position:absolute;top:0}.fc-timeline-event{z-index:1}.fc-timeline-event.fc-event-mirror{z-index:2}.fc-timeline-event{align-items:center;border-radius:0;display:flex;font-size:var(--fc-small-font-size);margin-bottom:1px;padding:2px 1px;position:relative}.fc-timeline-event .fc-event-main{flex-grow:1;flex-shrink:1;min-width:0}.fc-timeline-event .fc-event-time{font-weight:700}.fc-timeline-event .fc-event-time,.fc-timeline-event .fc-event-title{padding:0 2px;white-space:nowrap}.fc-direction-ltr .fc-timeline-event.fc-event-end,.fc-direction-ltr .fc-timeline-more-link{margin-right:1px}.fc-direction-rtl .fc-timeline-event.fc-event-end,.fc-direction-rtl .fc-timeline-more-link{margin-left:1px}.fc-timeline-overlap-disabled .fc-timeline-event{margin-bottom:0;padding-bottom:5px;padding-top:5px}.fc-timeline-event:not(.fc-event-end):after,.fc-timeline-event:not(.fc-event-start):before{border-color:transparent #000;border-style:solid;border-width:5px;content:"";flex-grow:0;flex-shrink:0;height:0;margin:0 1px;opacity:.5;width:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after{border-left:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before{border-right:0}.fc-timeline-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;font-size:var(--fc-small-font-size);padding:1px}.fc-timeline-more-link-inner{display:inline-block;left:0;padding:2px;right:0}.fc .fc-timeline-bg{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:2}.fc .fc-timeline-bg .fc-non-business{z-index:1}.fc .fc-timeline-bg .fc-bg-event{z-index:2}.fc .fc-timeline-bg .fc-highlight{z-index:3}.fc .fc-timeline-bg-harness{bottom:0;position:absolute;top:0}');n.MAX_TIMELINE_SLOTS=1e3;const ie=[{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 se(e,t,s,o){let r={labelInterval:s.slotLabelInterval,slotDuration:s.slotDuration};!function(e,t,i){const{currentRange:s}=t;if(e.labelInterval){i.countDurationsBetween(s.start,s.end,e.labelInterval)>n.MAX_TIMELINE_SLOTS&&(console.warn("slotLabelInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){i.countDurationsBetween(s.start,s.end,e.slotDuration)>n.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){const t=u(e.labelInterval,e.slotDuration);(null===t||t<1)&&(console.warn("slotLabelInterval must be a multiple of slotDuration"),e.slotDuration=null)}}(r,e,t),le(r,e,t),function(e,t,n){const{currentRange:i}=t;let{slotDuration:s}=e;if(!s){const o=le(e,t,n);for(let e of ie){const t=f(e),n=u(o,t);if(null!==n&&n>1&&n<=6){s=t;break}}if(s){n.countDurationsBetween(i.start,i.end,s)>200&&(s=null)}s||(s=o),e.slotDuration=s}}(r,e,t);let l=s.slotLabelFormat,a=Array.isArray(l)?l:null!=l?[l]:function(e,t,n,i){let s,o;const{labelInterval:r}=e;let l=c(r).unit;const a=i.weekNumbers;let d=s=o=null;"week"!==l||a||(l="day");switch(l){case"year":d={year:"numeric"};break;case"month":ae("years",t,n)>1&&(d={year:"numeric"}),s={month:"short"};break;case"week":ae("years",t,n)>1&&(d={year:"numeric"}),s={week:"narrow"};break;case"day":ae("years",t,n)>1?d={year:"numeric",month:"long"}:ae("months",t,n)>1&&(d={month:"long"}),a&&(s={week:"short"}),o={weekday:"narrow",day:"numeric"};break;case"hour":a&&(d={week:"short"}),ae("days",t,n)>1&&(s={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),o={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":b(r)/60>=6?(d={hour:"numeric",meridiem:"short"},s=e=>":"+W(e.date.minute,2)):d={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":v(r)/60>=6?(d={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},s=e=>":"+W(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"},s=e=>"."+W(e.millisecond,3)}return[].concat(d||[],s||[],o||[])}(r,e,t,s);r.headerFormats=a.map((e=>i(e))),r.isTimeScale=Boolean(r.slotDuration.milliseconds);let d=null;if(!r.isTimeScale){const e=c(r.slotDuration).unit;/year|month|week/.test(e)&&(d=e)}r.largeUnit=d,r.emphasizeWeeks=1===h(r.slotDuration)&&ae("weeks",e,t)>=2&&!s.businessHours;let g,S,D=s.snapDuration;D&&(g=f(D),S=u(r.slotDuration,g)),null==S&&(g=r.slotDuration,S=1),r.snapDuration=g,r.snapsPerSlot=S;let y=m(e.slotMaxTime)-m(e.slotMinTime),w=oe(e.renderRange.start,r,t),C=oe(e.renderRange.end,r,t);r.isTimeScale&&(w=t.add(w,e.slotMinTime),C=t.add(p(C,-1),e.slotMaxTime)),r.timeWindowMs=y,r.normalizedRange={start:w,end:C};let x=[],k=w;for(;k<C;)re(k,r,e,o)&&x.push(k),k=t.add(k,r.slotDuration);r.slotDates=x;let P=-1,M=0;const T=[],E=[];for(k=w;k<C;)re(k,r,e,o)?(P+=1,T.push(P),E.push(M)):T.push(P+.5),k=t.add(k,r.snapDuration),M+=1;return r.snapDiffToIndex=T,r.snapIndexToDiff=E,r.snapCnt=P+1,r.slotCnt=r.snapCnt/r.snapsPerSlot,r.isWeekStarts=function(e,t){let{slotDates:n,emphasizeWeeks:i}=e,s=null,o=[];for(let e of n){let n=t.computeWeekNumber(e),r=i&&null!==s&&s!==n;s=n,o.push(r)}return o}(r,t),r.cellRows=function(e,t){let n=e.slotDates,i=e.headerFormats,s=i.map((()=>[])),o=h(e.slotDuration),r=7===o?"week":1===o?"day":null,l=i.map((e=>e.getSmallestUnit?e.getSmallestUnit():null));for(let o=0;o<n.length;o+=1){let a=n[o],d=e.isWeekStarts[o];for(let n=0;n<i.length;n+=1){let o=i[n],c=s[n],h=c[c.length-1],f=n===i.length-1,u=i.length>1&&!f,m=null,p=l[n]||(f?r:null);if(u){let e=t.format(a,o);h&&h.text===e?h.colspan+=1:m=de(a,e,p)}else if(!h||R(t.countDurationsBetween(e.normalizedRange.start,a,e.labelInterval))){m=de(a,t.format(a,o),p)}else h.colspan+=1;m&&(m.weekStart=d,c.push(m))}}return s}(r,t),r.slotsPerLabel=u(r.labelInterval,r.slotDuration),r}function oe(e,t,n){let i=e;return t.isTimeScale||(i=g(i),t.largeUnit&&(i=n.startOf(i,t.largeUnit))),i}function re(e,t,n,i){if(i.isHiddenDay(e))return!1;if(t.isTimeScale){let i=g(e),s=e.valueOf()-i.valueOf()-m(n.slotMinTime);return s=(s%864e5+864e5)%864e5,s<t.timeWindowMs}return!0}function le(e,t,n){const{currentRange:i}=t;let{labelInterval:s}=e;if(!s){let t;if(e.slotDuration){for(t of ie){const n=f(t),i=u(n,e.slotDuration);if(null!==i&&i<=6){s=n;break}}s||(s=e.slotDuration)}else for(t of ie){s=f(t);if(n.countDurationsBetween(i.start,i.end,s)>=18)break}e.labelInterval=s}return s}function ae(e,t,n){let i=t.currentRange,s=null;return"years"===e?s=n.diffWholeYears(i.start,i.end):"months"===e||"weeks"===e?s=n.diffWholeMonths(i.start,i.end):"days"===e&&(s=S(i.start,i.end)),s||0}function de(e,t,n){return{date:e,text:t,rowUnit:n,colspan:1,isWeekStart:!1}}class ce extends D{constructor(){super(...arguments),this.refineRenderProps=F(ue),this.buildCellNavLinkAttrs=r(he)}render(){let{props:e,context:t}=this,{dateEnv:n,options:i}=t,{cell:s,dateProfile:o,tDateProfile:r}=e,l=_(s.date,e.todayRange,e.nowDate,o),a=this.refineRenderProps({level:e.rowLevel,dateMarker:s.date,text:s.text,dateEnv:t.dateEnv,viewApi:t.viewApi});return te(Y,{elTag:"th",elClasses:["fc-timeline-slot","fc-timeline-slot-label",s.isWeekStart&&"fc-timeline-slot-em",..."time"===s.rowUnit?Z(l,t.theme):X(l,t.theme)],elAttrs:{colSpan:s.colspan,"data-date":n.formatIso(s.date,{omitTime:!r.isTimeScale,omitTimeZoneOffset:!0})},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:fe,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(n=>te("div",{className:"fc-timeline-slot-frame",style:{height:e.rowInnerHeight}},te(n,{elTag:"a",elClasses:["fc-timeline-slot-cushion","fc-scrollgrid-sync-inner",e.isSticky&&"fc-sticky"],elAttrs:this.buildCellNavLinkAttrs(t,s.date,s.rowUnit)}))))}}function he(e,t,n){return n&&"time"!==n?K(e,t,n):{}}function fe(e){return e.text}function ue(e){return{level:e.level,date:e.dateEnv.toDate(e.dateMarker),view:e.viewApi,text:e.text}}class me extends D{render(){let{dateProfile:e,tDateProfile:t,rowInnerHeights:n,todayRange:i,nowDate:s}=this.props,{cellRows:o}=t;return te(ne,null,o.map(((r,l)=>{let a=l===o.length-1,d=t.isTimeScale&&a;return te("tr",{key:l,className:["fc-timeline-header-row",d?"fc-timeline-header-row-chrono":""].join(" ")},r.map((o=>te(ce,{key:o.date.toISOString(),cell:o,rowLevel:l,dateProfile:e,tDateProfile:t,todayRange:i,nowDate:s,rowInnerHeight:n&&n[l],isSticky:!a}))))})))}}class pe{constructor(e,t,n,i,s,o){this.slatRootEl=e,this.dateProfile=n,this.tDateProfile=i,this.dateEnv=s,this.isRtl=o,this.outerCoordCache=new Q(e,t,!0,!1),this.innerCoordCache=new Q(e,J(t,"div"),!0,!1)}isDateInRange(e){return V(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 s=n-i,{innerCoordCache:o,outerCoordCache:r}=this;return this.isRtl?r.originClientRect.width-(r.rights[i]-o.getWidth(i)*s):r.lefts[i]+o.getWidth(i)*s}rangeToCoords(e){return{start:this.dateToCoord(e.start),end:this.dateToCoord(e.end)}}durationToCoord(e){let{dateProfile:t,tDateProfile:n,dateEnv:i,isRtl:s}=this,o=0;if(t){let r=i.add(t.activeRange.start,e);n.isTimeScale||(r=g(r)),o=this.dateToCoord(r),!s&&o&&(o+=1)}return o}coordFromLeft(e){return this.isRtl?this.outerCoordCache.originClientRect.width-e:e}computeDateSnapCoverage(e){return ge(e,this.tDateProfile,this.dateEnv)}}function ge(e,t,n){let i=n.countDurationsBetween(t.normalizedRange.start,e,t.snapDuration);if(i<0)return 0;if(i>=t.snapDiffToIndex.length)return t.snapCnt;let s=Math.floor(i),o=t.snapDiffToIndex[s];return R(o)?o+=i-s:o=Math.ceil(o),o}function ve(e,t){return null===e?{left:"",right:""}:t?{right:e,left:""}:{left:e,right:""}}function be(e,t){return e?t?{right:e.start,left:-e.end}:{left:e.start,right:-e.end}:{left:"",right:""}}class Se extends D{constructor(){super(...arguments),this.rootElRef=ee()}render(){let{props:e,context:t}=this,n=c(e.tDateProfile.slotDuration).unit,i=e.slatCoords&&e.slatCoords.dateProfile===e.dateProfile?e.slatCoords:null;return te(w,{unit:n},((n,s)=>te("div",{className:"fc-timeline-header",ref:this.rootElRef},te("table",{"aria-hidden":!0,className:"fc-scrollgrid-sync-table",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,te("tbody",null,te(me,{dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:n,todayRange:s,rowInnerHeights:e.rowInnerHeights}))),t.options.nowIndicator&&te("div",{className:"fc-timeline-now-indicator-container"},i&&i.isDateInRange(n)&&te(y,{elClasses:["fc-timeline-now-indicator-arrow"],elStyle:ve(i.dateToCoord(n),t.isRtl),isAxis:!0,date:n})))))}componentDidMount(){this.updateSize()}componentDidUpdate(){this.updateSize()}updateSize(){this.props.onMaxCushionWidth&&this.props.onMaxCushionWidth(this.computeMaxCushionWidth())}computeMaxCushionWidth(){return Math.max(...C(this.rootElRef.current,".fc-timeline-header-row:last-child .fc-timeline-slot-cushion").map((e=>e.getBoundingClientRect().width)))}}class Re extends D{render(){let{props:e,context:t}=this,{dateEnv:n,options:i,theme:s}=t,{date:o,tDateProfile:r,isEm:l}=e,a=_(e.date,e.todayRange,e.nowDate,e.dateProfile),d=Object.assign(Object.assign({date:n.toDate(e.date)},a),{view:t.viewApi});return te(Y,{elTag:"td",elRef:e.elRef,elClasses:["fc-timeline-slot","fc-timeline-slot-lane",l&&"fc-timeline-slot-em",r.isTimeScale?R(n.countDurationsBetween(r.normalizedRange.start,e.date,r.labelInterval))?"fc-timeline-slot-major":"fc-timeline-slot-minor":"",...e.isDay?X(a,s):Z(a,s)],elAttrs:{"data-date":n.formatIso(o,{omitTimeZoneOffset:!0,omitTime:!r.isTimeScale})},renderProps:d,generatorName:"slotLaneContent",customGenerator:i.slotLaneContent,classNameGenerator:i.slotLaneClassNames,didMount:i.slotLaneDidMount,willUnmount:i.slotLaneWillUnmount},(e=>te(e,{elTag:"div"})))}}class De extends D{render(){let{props:e}=this,{tDateProfile:t,cellElRefs:n}=e,{slotDates:i,isWeekStarts:s}=t,o=!t.isTimeScale&&!t.largeUnit;return te("tbody",null,te("tr",null,i.map(((i,r)=>{let l=i.toISOString();return te(Re,{key:l,elRef:n.createRef(l),date:i,dateProfile:e.dateProfile,tDateProfile:t,nowDate:e.nowDate,todayRange:e.todayRange,isEm:s[r],isDay:o})}))))}}class ye extends D{constructor(){super(...arguments),this.rootElRef=ee(),this.cellElRefs=new k,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 te("div",{className:"fc-timeline-slots",ref:this.rootElRef},te("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,te(De,{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 pe(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:t}=this.coords,{dateEnv:n,isRtl:i}=this.context,{tDateProfile:s}=this.props,o=t.leftToIndex(e);if(null!=o){let r=t.getWidth(o),l=i?(t.rights[o]-e)/r:(e-t.lefts[o])/r,a=Math.floor(l*s.snapsPerSlot),d=n.add(s.slotDates[o],z(s.snapDuration,a));return{dateSpan:{range:{start:d,end:n.add(d,s.snapDuration)},allDay:!this.props.tDateProfile.isTimeScale},dayEl:this.cellElRefs.currentMap[o],left:t.lefts[o],right:t.rights[o]}}return null}}function we(e,t,n){let i=[];if(n)for(let s of e){let e=n.rangeToCoords(s),o=Math.round(e.start),r=Math.round(e.end);r-o<t&&(r=o+t),i.push({start:o,end:r})}return i}class Ce extends D{render(){let{props:e}=this,t=[].concat(e.eventResizeSegs,e.dateSelectionSegs);return e.timelineCoords&&te("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,t,n){let{todayRange:i,nowDate:s}=this.props,{isRtl:o}=this.context,r=we(e,0,t),l=e.map(((e,t)=>{let l=be(r[t],o);return te("div",{key:O(e.eventRange),className:"fc-timeline-bg-harness",style:l},"bg-event"===n?te(H,Object.assign({seg:e},E(e,i,s))):N(n))}));return te(ne,null,l)}}class xe extends U{sliceRange(e,t,n,i,s){let o=function(e,t,n){if(!t.isTimeScale&&(e=q(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,i,s),r=[];if(ge(o.start,i,s)<ge(o.end,i,s)){let e=A(o,i.normalizedRange);e&&r.push({start:e.start,end:e.end,isStart:e.start.valueOf()===o.start.valueOf()&&re(e.start,i,t,n),isEnd:e.end.valueOf()===o.end.valueOf()&&re(G(e.end,-1),i,t,n)})}return r}}const ke=i({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});class Pe extends D{render(){let{props:e}=this;return te(j,Object.assign({},e,{elClasses:["fc-timeline-event","fc-h-event"],defaultTimeFormat:ke,defaultDisplayEventTime:!e.isTimeScale}))}}class Me extends D{render(){let{props:e,context:t}=this,{hiddenSegs:n,placement:i,resourceId:s}=e,{top:o,hcoords:r}=i,l=r&&null!==o,a=be(r,t.isRtl),d=s?{resourceId:s}:{};return te(B,{elRef:e.elRef,elClasses:["fc-timeline-more-link"],elStyle:Object.assign({visibility:l?"":"hidden",top:o||0},a),allDayDate:null,moreCnt:n.length,allSegs:n,hiddenSegs:n,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:d,popoverContent:()=>te(ne,null,n.map((t=>{let n=t.eventRange.instance.instanceId;return te("div",{key:n,style:{visibility:e.isForcedInvisible[n]?"hidden":""}},te(Pe,Object.assign({isTimeScale:e.isTimeScale,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:n===e.eventSelection},E(t,e.todayRange,e.nowDate))))})))},(e=>te(e,{elTag:"div",elClasses:["fc-timeline-more-link-inner","fc-sticky"]})))}}class Te extends D{constructor(){super(...arguments),this.slicer=new xe,this.sortEventSegs=r(x),this.harnessElRefs=new k,this.moreElRefs=new k,this.innerElRef=ee(),this.state={eventInstanceHeights:{},moreLinkHeights:{}},this.handleResize=e=>{e&&this.updateSize()}}render(){let{props:e,state:t,context:n}=this,{options:i}=n,{dateProfile:s,tDateProfile:o}=e,r=this.slicer.sliceProps(e,s,o.isTimeScale?null:e.nextDayThreshold,n,s,n.dateProfileGenerator,o,n.dateEnv),l=(r.eventDrag?r.eventDrag.segs:null)||(r.eventResize?r.eventResize.segs:null)||[],a=this.sortEventSegs(r.fgEventSegs,i.eventOrder),d=we(a,i.eventMinWidth,e.timelineCoords),[c,h]=function(e,t,n,i,s,o){let r=[],l=[];for(let i=0;i<e.length;i+=1){let s=e[i],o=n[s.eventRange.instance.instanceId],a=t[i];o&&a?r.push({index:i,span:a,thickness:o}):l.push({seg:s,hcoords:a,top:null})}let a=new $;null!=s&&(a.strictOrder=s),null!=o&&(a.maxStackCnt=o);let d=a.addSegs(r),c=d.map((t=>({seg:e[t.index],hcoords:t.span,top:null}))),h=L(d),f=[],u=[];const m=t=>e[t.index];for(let t=0;t<h.length;t+=1){let n=h[t],s=n.entries.map(m),o=i[M(T(s))];null!=o?f.push({index:e.length+t,thickness:o,span:n.span}):u.push({seg:s,hcoords:n.span,top:null})}a.maxStackCnt=-1,a.addSegs(f);let p=a.toRects(),g=[],v=0;for(let t of p){let n=t.index;g.push({seg:n<e.length?e[n]:h[n-e.length].entries.map(m),hcoords:t.span,top:t.levelCoord}),v=Math.max(v,t.levelCoord+t.thickness)}return[g.concat(l,c,u),v]}(a,d,t.eventInstanceHeights,t.moreLinkHeights,i.eventOrderStrict,i.eventMaxStack),f=(r.eventDrag?r.eventDrag.affectedInstances:null)||(r.eventResize?r.eventResize.affectedInstances:null)||{};return te(ne,null,te(Ce,{businessHourSegs:r.businessHourSegs,bgEventSegs:r.bgEventSegs,timelineCoords:e.timelineCoords,eventResizeSegs:r.eventResize?r.eventResize.segs:[],dateSelectionSegs:r.dateSelectionSegs,nowDate:e.nowDate,todayRange:e.todayRange}),te("div",{className:"fc-timeline-events fc-scrollgrid-sync-inner",ref:this.innerElRef,style:{height:h}},this.renderFgSegs(c,f,!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]})))}(l,e.timelineCoords,c),{},Boolean(r.eventDrag),Boolean(r.eventResize),!1)))}componentDidMount(){this.updateSize(),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){e.eventStore===this.props.eventStore&&e.timelineCoords===this.props.timelineCoords&&t.moreLinkHeights===this.state.moreLinkHeights||this.updateSize()}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateSize(){let{props:e}=this,{timelineCoords:t}=e;const n=this.innerElRef.current;e.onHeightChange&&e.onHeightChange(n,!1),t&&this.setState({eventInstanceHeights:P(this.harnessElRefs.currentMap,(e=>Math.round(e.getBoundingClientRect().height))),moreLinkHeights:P(this.moreElRefs.currentMap,(e=>Math.round(e.getBoundingClientRect().height)))},(()=>{e.onHeightChange&&e.onHeightChange(n,!0)})),e.syncParentMinHeight&&(n.parentElement.style.minHeight=n.style.height)}renderFgSegs(e,t,n,i,s){let{harnessElRefs:o,moreElRefs:r,props:l,context:a}=this,d=n||i||s;return te(ne,null,e.map((e=>{let{seg:c,hcoords:h,top:f}=e;if(Array.isArray(c)){let n=M(T(c));return te(Me,{key:"m:"+n,elRef:r.createRef(n),hiddenSegs:c,placement:e,dateProfile:l.dateProfile,nowDate:l.nowDate,todayRange:l.todayRange,isTimeScale:l.tDateProfile.isTimeScale,eventSelection:l.eventSelection,resourceId:l.resourceId,isForcedInvisible:t})}let u=c.eventRange.instance.instanceId,m=d||Boolean(!t[u]&&h&&null!==f),p=be(h,a.isRtl);return te("div",{key:"e:"+u,ref:d?null:o.createRef(u),className:"fc-timeline-event-harness",style:Object.assign({visibility:m?"":"hidden",top:f||0},p)},te(Pe,Object.assign({isTimeScale:l.tDateProfile.isTimeScale,seg:c,isDragging:n,isResizing:i,isDateSelecting:s,isSelected:u===l.eventSelection},E(c,l.todayRange,l.nowDate))))})))}}Te.addStateEquality({eventInstanceHeights:s,moreLinkHeights:s});class Ee extends o{constructor(){super(...arguments),this.slatsRef=ee(),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:t,context:n}=this,{options:i}=n,{dateProfile:s,tDateProfile:o}=e,r=c(o.slotDuration).unit;return te("div",{className:"fc-timeline-body",ref:this.handeEl,style:{minWidth:e.tableMinWidth,height:e.clientHeight,width:e.clientWidth}},te(w,{unit:r},((r,l)=>te(ne,null,te(ye,{ref:this.slatsRef,dateProfile:s,tDateProfile:o,nowDate:r,todayRange:l,clientWidth:e.clientWidth,tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,onCoords:this.handleCoords,onScrollLeftRequest:e.onScrollLeftRequest}),te(Te,{dateProfile:s,tDateProfile:e.tDateProfile,nowDate:r,todayRange:l,nextDayThreshold:i.nextDayThreshold,businessHours:e.businessHours,eventStore:e.eventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,timelineCoords:t.coords,syncParentMinHeight:!0}),i.nowIndicator&&t.coords&&t.coords.isDateInRange(r)&&te("div",{className:"fc-timeline-now-indicator-container"},te(y,{elClasses:["fc-timeline-now-indicator-line"],elStyle:ve(t.coords.dateToCoord(r),n.isRtl),isAxis:!1,date:r}))))))}queryHit(e,t,n,i){let s=this.slatsRef.current.positionToHit(e);return s?{dateProfile:this.props.dateProfile,dateSpan:s.dateSpan,rect:{left:s.left,right:s.right,top:0,bottom:i},dayEl:s.dayEl,layer:0}:null}}class Ie extends o{constructor(){super(...arguments),this.buildTimelineDateProfile=r(se),this.scrollGridRef=ee(),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:t,state:n,context:i}=this,{options:s}=i,o=!t.forPrint&&l(s),r=!t.forPrint&&a(s),c=this.buildTimelineDateProfile(t.dateProfile,i.dateEnv,s,i.dateProfileGenerator),{slotMinWidth:h}=s,f=We(c,h||this.computeFallbackSlotMinWidth(c)),u=[{type:"header",key:"header",isSticky:o,chunks:[{key:"timeline",content:e=>te(Se,{dateProfile:t.dateProfile,clientWidth:e.clientWidth,clientHeight:e.clientHeight,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,tDateProfile:c,slatCoords:n.slatCoords,onMaxCushionWidth:h?null:this.handleMaxCushionWidth})}]},{type:"body",key:"body",liquid:!0,chunks:[{key:"timeline",content:e=>te(Ee,Object.assign({},t,{clientWidth:e.clientWidth,clientHeight:e.clientHeight,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,tDateProfile:c,onSlatCoords:this.handleSlatCoords,onScrollLeftRequest:this.handleScrollLeftRequest}))}]}];return r&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"timeline",content:I}]}),te(d,{elClasses:["fc-timeline",!1===s.eventOverlap?"fc-timeline-overlap-disabled":""],viewSpec:i.viewSpec},te(e,{ref:this.scrollGridRef,liquid:!t.isHeightAuto&&!t.forPrint,forPrint:t.forPrint,collapsibleWidth:!1,colGroups:[{cols:f}],sections:u}))}computeFallbackSlotMinWidth(e){return Math.max(30,(this.state.slotCushionMaxWidth||0)/e.slotsPerLabel)}}function We(e,t){return[{span:e.slotCnt,minWidth:t||1}]}export{pe as TimelineCoords,Se as TimelineHeader,me as TimelineHeaderRows,Te as TimelineLane,Ce as TimelineLaneBg,xe as TimelineLaneSlicer,ye as TimelineSlats,Ie as TimelineView,We as buildSlatCols,se as buildTimelineDateProfile,ve as coordToCss,be as coordsToCss};
|
2
2
|
//# sourceMappingURL=internal.js.map
|