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

@fullcalendar/resource-timegrid

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fullcalendar/resource-timegrid - npm Package Compare versions

Comparing version 5.11.2 to 6.0.0-beta.1

122

main.cjs.js
/*!
FullCalendar Scheduler v5.11.2
FullCalendar Scheduler v6.0.0-beta.1
Docs & License: https://fullcalendar.io/scheduler

@@ -14,3 +14,2 @@ (c) 2022 Adam Shaw

var timeGridPlugin = require('@fullcalendar/timegrid');
var tslib = require('tslib');
var resourceDaygrid = require('@fullcalendar/resource-daygrid');

@@ -24,82 +23,69 @@

var ResourceDayTimeColsJoiner = /** @class */ (function (_super) {
tslib.__extends(ResourceDayTimeColsJoiner, _super);
function ResourceDayTimeColsJoiner() {
return _super !== null && _super.apply(this, arguments) || this;
}
ResourceDayTimeColsJoiner.prototype.transformSeg = function (seg, resourceDayTable, resourceI) {
class ResourceDayTimeColsJoiner extends resourceCommonPlugin.VResourceJoiner {
transformSeg(seg, resourceDayTable, resourceI) {
return [
tslib.__assign(tslib.__assign({}, seg), { col: resourceDayTable.computeCol(seg.col, resourceI) }),
Object.assign(Object.assign({}, seg), { col: resourceDayTable.computeCol(seg.col, resourceI) }),
];
};
return ResourceDayTimeColsJoiner;
}(resourceCommonPlugin.VResourceJoiner));
}
}
var ResourceDayTimeCols = /** @class */ (function (_super) {
tslib.__extends(ResourceDayTimeCols, _super);
function ResourceDayTimeCols() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.buildDayRanges = common.memoize(timeGridPlugin.buildDayRanges);
_this.splitter = new resourceCommonPlugin.VResourceSplitter();
_this.slicers = {};
_this.joiner = new ResourceDayTimeColsJoiner();
_this.timeColsRef = common.createRef();
_this.isHitComboAllowed = function (hit0, hit1) {
var allowAcrossResources = _this.dayRanges.length === 1;
class ResourceDayTimeCols extends common.DateComponent {
constructor() {
super(...arguments);
this.buildDayRanges = common.memoize(timeGridPlugin.buildDayRanges);
this.splitter = new resourceCommonPlugin.VResourceSplitter();
this.slicers = {};
this.joiner = new ResourceDayTimeColsJoiner();
this.timeColsRef = common.createRef();
this.isHitComboAllowed = (hit0, hit1) => {
let allowAcrossResources = this.dayRanges.length === 1;
return allowAcrossResources || hit0.dateSpan.resourceId === hit1.dateSpan.resourceId;
};
return _this;
}
ResourceDayTimeCols.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var dateEnv = context.dateEnv, options = context.options;
var dateProfile = props.dateProfile, resourceDayTableModel = props.resourceDayTableModel;
var dayRanges = this.dayRanges = this.buildDayRanges(resourceDayTableModel.dayTableModel, dateProfile, dateEnv);
var splitProps = this.splitter.splitProps(props);
this.slicers = common.mapHash(splitProps, function (split, resourceId) { return _this.slicers[resourceId] || new timeGridPlugin.DayTimeColsSlicer(); });
var slicedProps = common.mapHash(this.slicers, function (slicer, resourceId) { return slicer.sliceProps(splitProps[resourceId], dateProfile, null, context, dayRanges); });
render() {
let { props, context } = this;
let { dateEnv, options } = context;
let { dateProfile, resourceDayTableModel } = props;
let dayRanges = this.dayRanges = this.buildDayRanges(resourceDayTableModel.dayTableModel, dateProfile, dateEnv);
let splitProps = this.splitter.splitProps(props);
this.slicers = common.mapHash(splitProps, (split, resourceId) => this.slicers[resourceId] || new timeGridPlugin.DayTimeColsSlicer());
let slicedProps = common.mapHash(this.slicers, (slicer, resourceId) => slicer.sliceProps(splitProps[resourceId], dateProfile, null, context, dayRanges));
return ( // TODO: would move this further down hierarchy, but sliceNowDate needs it
common.createElement(common.NowTimer, { unit: options.nowIndicator ? 'minute' : 'day' }, function (nowDate, todayRange) { return (common.createElement(timeGridPlugin.TimeCols, tslib.__assign({ ref: _this.timeColsRef }, _this.joiner.joinProps(slicedProps, resourceDayTableModel), { dateProfile: dateProfile, axis: props.axis, slotDuration: props.slotDuration, slatMetas: props.slatMetas, cells: resourceDayTableModel.cells[0], tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, clientWidth: props.clientWidth, clientHeight: props.clientHeight, expandRows: props.expandRows, nowDate: nowDate, nowIndicatorSegs: options.nowIndicator && _this.buildNowIndicatorSegs(nowDate), todayRange: todayRange, onScrollTopRequest: props.onScrollTopRequest, forPrint: props.forPrint, onSlatCoords: props.onSlatCoords, isHitComboAllowed: _this.isHitComboAllowed }))); }));
};
ResourceDayTimeCols.prototype.buildNowIndicatorSegs = function (date) {
var nonResourceSegs = this.slicers[''].sliceNowDate(date, this.context, this.dayRanges);
common.createElement(common.NowTimer, { unit: options.nowIndicator ? 'minute' : 'day' }, (nowDate, todayRange) => (common.createElement(timeGridPlugin.TimeCols, Object.assign({ ref: this.timeColsRef }, this.joiner.joinProps(slicedProps, resourceDayTableModel), { dateProfile: dateProfile, axis: props.axis, slotDuration: props.slotDuration, slatMetas: props.slatMetas, cells: resourceDayTableModel.cells[0], tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, clientWidth: props.clientWidth, clientHeight: props.clientHeight, expandRows: props.expandRows, nowDate: nowDate, nowIndicatorSegs: options.nowIndicator && this.buildNowIndicatorSegs(nowDate), todayRange: todayRange, onScrollTopRequest: props.onScrollTopRequest, forPrint: props.forPrint, onSlatCoords: props.onSlatCoords, isHitComboAllowed: this.isHitComboAllowed })))));
}
buildNowIndicatorSegs(date) {
let nonResourceSegs = this.slicers[''].sliceNowDate(date, this.context, this.dayRanges);
return this.joiner.expandSegs(this.props.resourceDayTableModel, nonResourceSegs);
};
return ResourceDayTimeCols;
}(common.DateComponent));
}
}
var ResourceDayTimeColsView = /** @class */ (function (_super) {
tslib.__extends(ResourceDayTimeColsView, _super);
function ResourceDayTimeColsView() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.flattenResources = common.memoize(resourceCommonPlugin.flattenResources);
_this.buildResourceTimeColsModel = common.memoize(buildResourceTimeColsModel);
_this.buildSlatMetas = common.memoize(timeGridPlugin.buildSlatMetas);
return _this;
class ResourceDayTimeColsView extends timeGridPlugin.TimeColsView {
constructor() {
super(...arguments);
this.flattenResources = common.memoize(resourceCommonPlugin.flattenResources);
this.buildResourceTimeColsModel = common.memoize(buildResourceTimeColsModel);
this.buildSlatMetas = common.memoize(timeGridPlugin.buildSlatMetas);
}
ResourceDayTimeColsView.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var options = context.options, dateEnv = context.dateEnv;
var dateProfile = props.dateProfile;
var splitProps = this.allDaySplitter.splitProps(props);
var resourceOrderSpecs = options.resourceOrder || resourceCommonPlugin.DEFAULT_RESOURCE_ORDER;
var resources = this.flattenResources(props.resourceStore, resourceOrderSpecs);
var resourceDayTableModel = this.buildResourceTimeColsModel(dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context);
var slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotLabelInterval, options.slotDuration, dateEnv);
var dayMinWidth = options.dayMinWidth;
var hasAttachedAxis = !dayMinWidth;
var hasDetachedAxis = dayMinWidth;
var headerContent = options.dayHeaders && (common.createElement(resourceCommonPlugin.ResourceDayHeader, { resources: resources, dates: resourceDayTableModel.dayTableModel.headerDates, dateProfile: dateProfile, datesRepDistinctDays: true, renderIntro: hasAttachedAxis ? this.renderHeadAxis : null }));
var allDayContent = (options.allDaySlot !== false) && (function (contentArg) { return (common.createElement(resourceDaygrid.ResourceDayTable, tslib.__assign({}, splitProps.allDay, { dateProfile: dateProfile, resourceDayTableModel: resourceDayTableModel, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, renderRowIntro: hasAttachedAxis ? _this.renderTableRowAxis : null, showWeekNumbers: false, expandRows: false, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }, _this.getAllDayMaxEventProps()))); });
var timeGridContent = function (contentArg) { return (common.createElement(ResourceDayTimeCols, tslib.__assign({}, splitProps.timed, { dateProfile: dateProfile, axis: hasAttachedAxis, slotDuration: options.slotDuration, slatMetas: slatMetas, resourceDayTableModel: resourceDayTableModel, tableColGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, onSlatCoords: _this.handleSlatCoords, expandRows: contentArg.expandRows, forPrint: props.forPrint, onScrollTopRequest: _this.handleScrollTopRequest }))); };
render() {
let { props, context } = this;
let { options, dateEnv } = context;
let { dateProfile } = props;
let splitProps = this.allDaySplitter.splitProps(props);
let resourceOrderSpecs = options.resourceOrder || resourceCommonPlugin.DEFAULT_RESOURCE_ORDER;
let resources = this.flattenResources(props.resourceStore, resourceOrderSpecs);
let resourceDayTableModel = this.buildResourceTimeColsModel(dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context);
let slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotLabelInterval, options.slotDuration, dateEnv);
let { dayMinWidth } = options;
let hasAttachedAxis = !dayMinWidth;
let hasDetachedAxis = dayMinWidth;
let headerContent = options.dayHeaders && (common.createElement(resourceCommonPlugin.ResourceDayHeader, { resources: resources, dates: resourceDayTableModel.dayTableModel.headerDates, dateProfile: dateProfile, datesRepDistinctDays: true, renderIntro: hasAttachedAxis ? this.renderHeadAxis : null }));
let allDayContent = (options.allDaySlot !== false) && ((contentArg) => (common.createElement(resourceDaygrid.ResourceDayTable, Object.assign({}, splitProps.allDay, { dateProfile: dateProfile, resourceDayTableModel: resourceDayTableModel, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, renderRowIntro: hasAttachedAxis ? this.renderTableRowAxis : null, showWeekNumbers: false, expandRows: false, headerAlignElRef: this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }, this.getAllDayMaxEventProps()))));
let timeGridContent = (contentArg) => (common.createElement(ResourceDayTimeCols, Object.assign({}, splitProps.timed, { dateProfile: dateProfile, axis: hasAttachedAxis, slotDuration: options.slotDuration, slatMetas: slatMetas, resourceDayTableModel: resourceDayTableModel, tableColGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, onSlatCoords: this.handleSlatCoords, expandRows: contentArg.expandRows, forPrint: props.forPrint, onScrollTopRequest: this.handleScrollTopRequest })));
return hasDetachedAxis
? this.renderHScrollLayout(headerContent, allDayContent, timeGridContent, resourceDayTableModel.colCnt, dayMinWidth, slatMetas, this.state.slatCoords)
: this.renderSimpleLayout(headerContent, allDayContent, timeGridContent);
};
return ResourceDayTimeColsView;
}(timeGridPlugin.TimeColsView));
}
}
function buildResourceTimeColsModel(dateProfile, dateProfileGenerator, resources, datesAboveResources, context) {
var dayTable = timeGridPlugin.buildTimeColsModel(dateProfile, dateProfileGenerator);
let dayTable = timeGridPlugin.buildTimeColsModel(dateProfile, dateProfileGenerator);
return datesAboveResources ?

@@ -106,0 +92,0 @@ new resourceCommonPlugin.DayResourceTableModel(dayTable, resources, context) :

/*!
FullCalendar Scheduler v5.11.2
FullCalendar Scheduler v6.0.0-beta.1
Docs & License: https://fullcalendar.io/scheduler

@@ -15,124 +15,69 @@ (c) 2022 Adam Shaw

/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var ResourceDayTimeColsJoiner = /** @class */ (function (_super) {
__extends(ResourceDayTimeColsJoiner, _super);
function ResourceDayTimeColsJoiner() {
return _super !== null && _super.apply(this, arguments) || this;
}
ResourceDayTimeColsJoiner.prototype.transformSeg = function (seg, resourceDayTable, resourceI) {
class ResourceDayTimeColsJoiner extends resourceCommonPlugin.VResourceJoiner {
transformSeg(seg, resourceDayTable, resourceI) {
return [
__assign(__assign({}, seg), { col: resourceDayTable.computeCol(seg.col, resourceI) }),
Object.assign(Object.assign({}, seg), { col: resourceDayTable.computeCol(seg.col, resourceI) }),
];
};
return ResourceDayTimeColsJoiner;
}(resourceCommonPlugin.VResourceJoiner));
}
}
var ResourceDayTimeCols = /** @class */ (function (_super) {
__extends(ResourceDayTimeCols, _super);
function ResourceDayTimeCols() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.buildDayRanges = common.memoize(timeGridPlugin.buildDayRanges);
_this.splitter = new resourceCommonPlugin.VResourceSplitter();
_this.slicers = {};
_this.joiner = new ResourceDayTimeColsJoiner();
_this.timeColsRef = common.createRef();
_this.isHitComboAllowed = function (hit0, hit1) {
var allowAcrossResources = _this.dayRanges.length === 1;
class ResourceDayTimeCols extends common.DateComponent {
constructor() {
super(...arguments);
this.buildDayRanges = common.memoize(timeGridPlugin.buildDayRanges);
this.splitter = new resourceCommonPlugin.VResourceSplitter();
this.slicers = {};
this.joiner = new ResourceDayTimeColsJoiner();
this.timeColsRef = common.createRef();
this.isHitComboAllowed = (hit0, hit1) => {
let allowAcrossResources = this.dayRanges.length === 1;
return allowAcrossResources || hit0.dateSpan.resourceId === hit1.dateSpan.resourceId;
};
return _this;
}
ResourceDayTimeCols.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var dateEnv = context.dateEnv, options = context.options;
var dateProfile = props.dateProfile, resourceDayTableModel = props.resourceDayTableModel;
var dayRanges = this.dayRanges = this.buildDayRanges(resourceDayTableModel.dayTableModel, dateProfile, dateEnv);
var splitProps = this.splitter.splitProps(props);
this.slicers = common.mapHash(splitProps, function (split, resourceId) { return _this.slicers[resourceId] || new timeGridPlugin.DayTimeColsSlicer(); });
var slicedProps = common.mapHash(this.slicers, function (slicer, resourceId) { return slicer.sliceProps(splitProps[resourceId], dateProfile, null, context, dayRanges); });
render() {
let { props, context } = this;
let { dateEnv, options } = context;
let { dateProfile, resourceDayTableModel } = props;
let dayRanges = this.dayRanges = this.buildDayRanges(resourceDayTableModel.dayTableModel, dateProfile, dateEnv);
let splitProps = this.splitter.splitProps(props);
this.slicers = common.mapHash(splitProps, (split, resourceId) => this.slicers[resourceId] || new timeGridPlugin.DayTimeColsSlicer());
let slicedProps = common.mapHash(this.slicers, (slicer, resourceId) => slicer.sliceProps(splitProps[resourceId], dateProfile, null, context, dayRanges));
return ( // TODO: would move this further down hierarchy, but sliceNowDate needs it
common.createElement(common.NowTimer, { unit: options.nowIndicator ? 'minute' : 'day' }, function (nowDate, todayRange) { return (common.createElement(timeGridPlugin.TimeCols, __assign({ ref: _this.timeColsRef }, _this.joiner.joinProps(slicedProps, resourceDayTableModel), { dateProfile: dateProfile, axis: props.axis, slotDuration: props.slotDuration, slatMetas: props.slatMetas, cells: resourceDayTableModel.cells[0], tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, clientWidth: props.clientWidth, clientHeight: props.clientHeight, expandRows: props.expandRows, nowDate: nowDate, nowIndicatorSegs: options.nowIndicator && _this.buildNowIndicatorSegs(nowDate), todayRange: todayRange, onScrollTopRequest: props.onScrollTopRequest, forPrint: props.forPrint, onSlatCoords: props.onSlatCoords, isHitComboAllowed: _this.isHitComboAllowed }))); }));
};
ResourceDayTimeCols.prototype.buildNowIndicatorSegs = function (date) {
var nonResourceSegs = this.slicers[''].sliceNowDate(date, this.context, this.dayRanges);
common.createElement(common.NowTimer, { unit: options.nowIndicator ? 'minute' : 'day' }, (nowDate, todayRange) => (common.createElement(timeGridPlugin.TimeCols, Object.assign({ ref: this.timeColsRef }, this.joiner.joinProps(slicedProps, resourceDayTableModel), { dateProfile: dateProfile, axis: props.axis, slotDuration: props.slotDuration, slatMetas: props.slatMetas, cells: resourceDayTableModel.cells[0], tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, clientWidth: props.clientWidth, clientHeight: props.clientHeight, expandRows: props.expandRows, nowDate: nowDate, nowIndicatorSegs: options.nowIndicator && this.buildNowIndicatorSegs(nowDate), todayRange: todayRange, onScrollTopRequest: props.onScrollTopRequest, forPrint: props.forPrint, onSlatCoords: props.onSlatCoords, isHitComboAllowed: this.isHitComboAllowed })))));
}
buildNowIndicatorSegs(date) {
let nonResourceSegs = this.slicers[''].sliceNowDate(date, this.context, this.dayRanges);
return this.joiner.expandSegs(this.props.resourceDayTableModel, nonResourceSegs);
};
return ResourceDayTimeCols;
}(common.DateComponent));
}
}
var ResourceDayTimeColsView = /** @class */ (function (_super) {
__extends(ResourceDayTimeColsView, _super);
function ResourceDayTimeColsView() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.flattenResources = common.memoize(resourceCommonPlugin.flattenResources);
_this.buildResourceTimeColsModel = common.memoize(buildResourceTimeColsModel);
_this.buildSlatMetas = common.memoize(timeGridPlugin.buildSlatMetas);
return _this;
class ResourceDayTimeColsView extends timeGridPlugin.TimeColsView {
constructor() {
super(...arguments);
this.flattenResources = common.memoize(resourceCommonPlugin.flattenResources);
this.buildResourceTimeColsModel = common.memoize(buildResourceTimeColsModel);
this.buildSlatMetas = common.memoize(timeGridPlugin.buildSlatMetas);
}
ResourceDayTimeColsView.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var options = context.options, dateEnv = context.dateEnv;
var dateProfile = props.dateProfile;
var splitProps = this.allDaySplitter.splitProps(props);
var resourceOrderSpecs = options.resourceOrder || resourceCommonPlugin.DEFAULT_RESOURCE_ORDER;
var resources = this.flattenResources(props.resourceStore, resourceOrderSpecs);
var resourceDayTableModel = this.buildResourceTimeColsModel(dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context);
var slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotLabelInterval, options.slotDuration, dateEnv);
var dayMinWidth = options.dayMinWidth;
var hasAttachedAxis = !dayMinWidth;
var hasDetachedAxis = dayMinWidth;
var headerContent = options.dayHeaders && (common.createElement(resourceCommonPlugin.ResourceDayHeader, { resources: resources, dates: resourceDayTableModel.dayTableModel.headerDates, dateProfile: dateProfile, datesRepDistinctDays: true, renderIntro: hasAttachedAxis ? this.renderHeadAxis : null }));
var allDayContent = (options.allDaySlot !== false) && (function (contentArg) { return (common.createElement(resourceDaygrid.ResourceDayTable, __assign({}, splitProps.allDay, { dateProfile: dateProfile, resourceDayTableModel: resourceDayTableModel, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, renderRowIntro: hasAttachedAxis ? _this.renderTableRowAxis : null, showWeekNumbers: false, expandRows: false, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }, _this.getAllDayMaxEventProps()))); });
var timeGridContent = function (contentArg) { return (common.createElement(ResourceDayTimeCols, __assign({}, splitProps.timed, { dateProfile: dateProfile, axis: hasAttachedAxis, slotDuration: options.slotDuration, slatMetas: slatMetas, resourceDayTableModel: resourceDayTableModel, tableColGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, onSlatCoords: _this.handleSlatCoords, expandRows: contentArg.expandRows, forPrint: props.forPrint, onScrollTopRequest: _this.handleScrollTopRequest }))); };
render() {
let { props, context } = this;
let { options, dateEnv } = context;
let { dateProfile } = props;
let splitProps = this.allDaySplitter.splitProps(props);
let resourceOrderSpecs = options.resourceOrder || resourceCommonPlugin.DEFAULT_RESOURCE_ORDER;
let resources = this.flattenResources(props.resourceStore, resourceOrderSpecs);
let resourceDayTableModel = this.buildResourceTimeColsModel(dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context);
let slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotLabelInterval, options.slotDuration, dateEnv);
let { dayMinWidth } = options;
let hasAttachedAxis = !dayMinWidth;
let hasDetachedAxis = dayMinWidth;
let headerContent = options.dayHeaders && (common.createElement(resourceCommonPlugin.ResourceDayHeader, { resources: resources, dates: resourceDayTableModel.dayTableModel.headerDates, dateProfile: dateProfile, datesRepDistinctDays: true, renderIntro: hasAttachedAxis ? this.renderHeadAxis : null }));
let allDayContent = (options.allDaySlot !== false) && ((contentArg) => (common.createElement(resourceDaygrid.ResourceDayTable, Object.assign({}, splitProps.allDay, { dateProfile: dateProfile, resourceDayTableModel: resourceDayTableModel, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, renderRowIntro: hasAttachedAxis ? this.renderTableRowAxis : null, showWeekNumbers: false, expandRows: false, headerAlignElRef: this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }, this.getAllDayMaxEventProps()))));
let timeGridContent = (contentArg) => (common.createElement(ResourceDayTimeCols, Object.assign({}, splitProps.timed, { dateProfile: dateProfile, axis: hasAttachedAxis, slotDuration: options.slotDuration, slatMetas: slatMetas, resourceDayTableModel: resourceDayTableModel, tableColGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, onSlatCoords: this.handleSlatCoords, expandRows: contentArg.expandRows, forPrint: props.forPrint, onScrollTopRequest: this.handleScrollTopRequest })));
return hasDetachedAxis
? this.renderHScrollLayout(headerContent, allDayContent, timeGridContent, resourceDayTableModel.colCnt, dayMinWidth, slatMetas, this.state.slatCoords)
: this.renderSimpleLayout(headerContent, allDayContent, timeGridContent);
};
return ResourceDayTimeColsView;
}(timeGridPlugin.TimeColsView));
}
}
function buildResourceTimeColsModel(dateProfile, dateProfileGenerator, resources, datesAboveResources, context) {
var dayTable = timeGridPlugin.buildTimeColsModel(dateProfile, dateProfileGenerator);
let dayTable = timeGridPlugin.buildTimeColsModel(dateProfile, dateProfileGenerator);
return datesAboveResources ?

@@ -139,0 +84,0 @@ new resourceCommonPlugin.DayResourceTableModel(dayTable, resources, context) :

/*!
FullCalendar Scheduler v5.11.2
FullCalendar Scheduler v6.0.0-beta.1
Docs & License: https://fullcalendar.io/scheduler
(c) 2022 Adam Shaw
*/
var FullCalendarResourceTimeGrid=function(e,t,o,r,n,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=l(o),s=l(r),u=l(n),d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var p=function(){return(p=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.transformSeg=function(e,t,o){return[p(p({},e),{col:t.computeCol(e.col,o)})]},t}(r.VResourceJoiner),f=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.buildDayRanges=t.memoize(n.buildDayRanges),o.splitter=new r.VResourceSplitter,o.slicers={},o.joiner=new h,o.timeColsRef=t.createRef(),o.isHitComboAllowed=function(e,t){return 1===o.dayRanges.length||e.dateSpan.resourceId===t.dateSpan.resourceId},o}return c(o,e),o.prototype.render=function(){var e=this,o=this.props,r=this.context,i=r.dateEnv,l=r.options,a=o.dateProfile,s=o.resourceDayTableModel,u=this.dayRanges=this.buildDayRanges(s.dayTableModel,a,i),d=this.splitter.splitProps(o);this.slicers=t.mapHash(d,(function(t,o){return e.slicers[o]||new n.DayTimeColsSlicer}));var c=t.mapHash(this.slicers,(function(e,t){return e.sliceProps(d[t],a,null,r,u)}));return t.createElement(t.NowTimer,{unit:l.nowIndicator?"minute":"day"},(function(r,i){return t.createElement(n.TimeCols,p({ref:e.timeColsRef},e.joiner.joinProps(c,s),{dateProfile:a,axis:o.axis,slotDuration:o.slotDuration,slatMetas:o.slatMetas,cells:s.cells[0],tableColGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,clientWidth:o.clientWidth,clientHeight:o.clientHeight,expandRows:o.expandRows,nowDate:r,nowIndicatorSegs:l.nowIndicator&&e.buildNowIndicatorSegs(r),todayRange:i,onScrollTopRequest:o.onScrollTopRequest,forPrint:o.forPrint,onSlatCoords:o.onSlatCoords,isHitComboAllowed:e.isHitComboAllowed}))}))},o.prototype.buildNowIndicatorSegs=function(e){var t=this.slicers[""].sliceNowDate(e,this.context,this.dayRanges);return this.joiner.expandSegs(this.props.resourceDayTableModel,t)},o}(t.DateComponent),y=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.flattenResources=t.memoize(r.flattenResources),o.buildResourceTimeColsModel=t.memoize(m),o.buildSlatMetas=t.memoize(n.buildSlatMetas),o}return c(o,e),o.prototype.render=function(){var e=this,o=this.props,n=this.context,l=n.options,a=n.dateEnv,s=o.dateProfile,u=this.allDaySplitter.splitProps(o),d=l.resourceOrder||r.DEFAULT_RESOURCE_ORDER,c=this.flattenResources(o.resourceStore,d),h=this.buildResourceTimeColsModel(s,n.dateProfileGenerator,c,l.datesAboveResources,n),y=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,l.slotLabelInterval,l.slotDuration,a),m=l.dayMinWidth,b=!m,R=m,D=l.dayHeaders&&t.createElement(r.ResourceDayHeader,{resources:c,dates:h.dayTableModel.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:b?this.renderHeadAxis:null}),T=!1!==l.allDaySlot&&function(r){return t.createElement(i.ResourceDayTable,p({},u.allDay,{dateProfile:s,resourceDayTableModel:h,nextDayThreshold:l.nextDayThreshold,tableMinWidth:r.tableMinWidth,colGroupNode:r.tableColGroupNode,renderRowIntro:b?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:r.clientWidth,clientHeight:r.clientHeight,forPrint:o.forPrint},e.getAllDayMaxEventProps()))},C=function(r){return t.createElement(f,p({},u.timed,{dateProfile:s,axis:b,slotDuration:l.slotDuration,slatMetas:y,resourceDayTableModel:h,tableColGroupNode:r.tableColGroupNode,tableMinWidth:r.tableMinWidth,clientWidth:r.clientWidth,clientHeight:r.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:r.expandRows,forPrint:o.forPrint,onScrollTopRequest:e.handleScrollTopRequest}))};return R?this.renderHScrollLayout(D,T,C,h.colCnt,m,y,this.state.slatCoords):this.renderSimpleLayout(D,T,C)},o}(n.TimeColsView);function m(e,t,o,i,l){var a=n.buildTimeColsModel(e,t);return i?new r.DayResourceTableModel(a,o,l):new r.ResourceDayTableModel(a,o,l)}var b=t.createPlugin({deps:[a.default,s.default,u.default],initialView:"resourceTimeGridDay",views:{resourceTimeGrid:{type:"timeGrid",component:y,needsResourceData:!0},resourceTimeGridDay:{type:"resourceTimeGrid",duration:{days:1}},resourceTimeGridWeek:{type:"resourceTimeGrid",duration:{weeks:1}}}});return t.globalPlugins.push(b),e.ResourceDayTimeCols=f,e.ResourceDayTimeColsView=y,e.default=b,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendarPremiumCommon,FullCalendarResourceCommon,FullCalendarTimeGrid,FullCalendarResourceDayGrid);
var FullCalendarResourceTimeGrid=function(e,t,o,s,i,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(o),n=r(s),d=r(i);class u extends s.VResourceJoiner{transformSeg(e,t,o){return[Object.assign(Object.assign({},e),{col:t.computeCol(e.col,o)})]}}class c extends t.DateComponent{constructor(){super(...arguments),this.buildDayRanges=t.memoize(i.buildDayRanges),this.splitter=new s.VResourceSplitter,this.slicers={},this.joiner=new u,this.timeColsRef=t.createRef(),this.isHitComboAllowed=(e,t)=>1===this.dayRanges.length||e.dateSpan.resourceId===t.dateSpan.resourceId}render(){let{props:e,context:o}=this,{dateEnv:s,options:l}=o,{dateProfile:r,resourceDayTableModel:a}=e,n=this.dayRanges=this.buildDayRanges(a.dayTableModel,r,s),d=this.splitter.splitProps(e);this.slicers=t.mapHash(d,((e,t)=>this.slicers[t]||new i.DayTimeColsSlicer));let u=t.mapHash(this.slicers,((e,t)=>e.sliceProps(d[t],r,null,o,n)));return t.createElement(t.NowTimer,{unit:l.nowIndicator?"minute":"day"},((o,s)=>t.createElement(i.TimeCols,Object.assign({ref:this.timeColsRef},this.joiner.joinProps(u,a),{dateProfile:r,axis:e.axis,slotDuration:e.slotDuration,slatMetas:e.slatMetas,cells:a.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:o,nowIndicatorSegs:l.nowIndicator&&this.buildNowIndicatorSegs(o),todayRange:s,onScrollTopRequest:e.onScrollTopRequest,forPrint:e.forPrint,onSlatCoords:e.onSlatCoords,isHitComboAllowed:this.isHitComboAllowed}))))}buildNowIndicatorSegs(e){let t=this.slicers[""].sliceNowDate(e,this.context,this.dayRanges);return this.joiner.expandSegs(this.props.resourceDayTableModel,t)}}class h extends i.TimeColsView{constructor(){super(...arguments),this.flattenResources=t.memoize(s.flattenResources),this.buildResourceTimeColsModel=t.memoize(m),this.buildSlatMetas=t.memoize(i.buildSlatMetas)}render(){let{props:e,context:o}=this,{options:i,dateEnv:r}=o,{dateProfile:a}=e,n=this.allDaySplitter.splitProps(e),d=i.resourceOrder||s.DEFAULT_RESOURCE_ORDER,u=this.flattenResources(e.resourceStore,d),h=this.buildResourceTimeColsModel(a,o.dateProfileGenerator,u,i.datesAboveResources,o),m=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,i.slotLabelInterval,i.slotDuration,r),{dayMinWidth:p}=i,b=!p,R=p,y=i.dayHeaders&&t.createElement(s.ResourceDayHeader,{resources:u,dates:h.dayTableModel.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:b?this.renderHeadAxis:null}),D=!1!==i.allDaySlot&&(o=>t.createElement(l.ResourceDayTable,Object.assign({},n.allDay,{dateProfile:a,resourceDayTableModel:h,nextDayThreshold:i.nextDayThreshold,tableMinWidth:o.tableMinWidth,colGroupNode:o.tableColGroupNode,renderRowIntro:b?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:o.clientWidth,clientHeight:o.clientHeight,forPrint:e.forPrint},this.getAllDayMaxEventProps()))),T=o=>t.createElement(c,Object.assign({},n.timed,{dateProfile:a,axis:b,slotDuration:i.slotDuration,slatMetas:m,resourceDayTableModel:h,tableColGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,clientWidth:o.clientWidth,clientHeight:o.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:o.expandRows,forPrint:e.forPrint,onScrollTopRequest:this.handleScrollTopRequest}));return R?this.renderHScrollLayout(y,D,T,h.colCnt,p,m,this.state.slatCoords):this.renderSimpleLayout(y,D,T)}}function m(e,t,o,l,r){let a=i.buildTimeColsModel(e,t);return l?new s.DayResourceTableModel(a,o,r):new s.ResourceDayTableModel(a,o,r)}var p=t.createPlugin({deps:[a.default,n.default,d.default],initialView:"resourceTimeGridDay",views:{resourceTimeGrid:{type:"timeGrid",component:h,needsResourceData:!0},resourceTimeGridDay:{type:"resourceTimeGrid",duration:{days:1}},resourceTimeGridWeek:{type:"resourceTimeGrid",duration:{weeks:1}}}});return t.globalPlugins.push(p),e.ResourceDayTimeCols=c,e.ResourceDayTimeColsView=h,e.default=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendarPremiumCommon,FullCalendarResourceCommon,FullCalendarTimeGrid,FullCalendarResourceDayGrid);
/*!
FullCalendar Scheduler v5.11.2
FullCalendar Scheduler v6.0.0-beta.1
Docs & License: https://fullcalendar.io/scheduler
(c) 2022 Adam Shaw
*/
import { memoize, createRef, mapHash, createElement, NowTimer, DateComponent, createPlugin } from '@fullcalendar/common';
import { DateComponent, memoize, createRef, mapHash, createElement, NowTimer, createPlugin } from '@fullcalendar/common';
import premiumCommonPlugin from '@fullcalendar/premium-common';
import resourceCommonPlugin, { VResourceJoiner, VResourceSplitter, flattenResources, DEFAULT_RESOURCE_ORDER, ResourceDayHeader, DayResourceTableModel, ResourceDayTableModel } from '@fullcalendar/resource-common';
import timeGridPlugin, { buildDayRanges, DayTimeColsSlicer, TimeCols, buildSlatMetas, TimeColsView, buildTimeColsModel } from '@fullcalendar/timegrid';
import { __extends, __assign } from 'tslib';
import timeGridPlugin, { buildDayRanges, DayTimeColsSlicer, TimeCols, TimeColsView, buildSlatMetas, buildTimeColsModel } from '@fullcalendar/timegrid';
import { ResourceDayTable } from '@fullcalendar/resource-daygrid';
var ResourceDayTimeColsJoiner = /** @class */ (function (_super) {
__extends(ResourceDayTimeColsJoiner, _super);
function ResourceDayTimeColsJoiner() {
return _super !== null && _super.apply(this, arguments) || this;
}
ResourceDayTimeColsJoiner.prototype.transformSeg = function (seg, resourceDayTable, resourceI) {
class ResourceDayTimeColsJoiner extends VResourceJoiner {
transformSeg(seg, resourceDayTable, resourceI) {
return [
__assign(__assign({}, seg), { col: resourceDayTable.computeCol(seg.col, resourceI) }),
Object.assign(Object.assign({}, seg), { col: resourceDayTable.computeCol(seg.col, resourceI) }),
];
};
return ResourceDayTimeColsJoiner;
}(VResourceJoiner));
}
}
var ResourceDayTimeCols = /** @class */ (function (_super) {
__extends(ResourceDayTimeCols, _super);
function ResourceDayTimeCols() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.buildDayRanges = memoize(buildDayRanges);
_this.splitter = new VResourceSplitter();
_this.slicers = {};
_this.joiner = new ResourceDayTimeColsJoiner();
_this.timeColsRef = createRef();
_this.isHitComboAllowed = function (hit0, hit1) {
var allowAcrossResources = _this.dayRanges.length === 1;
class ResourceDayTimeCols extends DateComponent {
constructor() {
super(...arguments);
this.buildDayRanges = memoize(buildDayRanges);
this.splitter = new VResourceSplitter();
this.slicers = {};
this.joiner = new ResourceDayTimeColsJoiner();
this.timeColsRef = createRef();
this.isHitComboAllowed = (hit0, hit1) => {
let allowAcrossResources = this.dayRanges.length === 1;
return allowAcrossResources || hit0.dateSpan.resourceId === hit1.dateSpan.resourceId;
};
return _this;
}
ResourceDayTimeCols.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var dateEnv = context.dateEnv, options = context.options;
var dateProfile = props.dateProfile, resourceDayTableModel = props.resourceDayTableModel;
var dayRanges = this.dayRanges = this.buildDayRanges(resourceDayTableModel.dayTableModel, dateProfile, dateEnv);
var splitProps = this.splitter.splitProps(props);
this.slicers = mapHash(splitProps, function (split, resourceId) { return _this.slicers[resourceId] || new DayTimeColsSlicer(); });
var slicedProps = mapHash(this.slicers, function (slicer, resourceId) { return slicer.sliceProps(splitProps[resourceId], dateProfile, null, context, dayRanges); });
render() {
let { props, context } = this;
let { dateEnv, options } = context;
let { dateProfile, resourceDayTableModel } = props;
let dayRanges = this.dayRanges = this.buildDayRanges(resourceDayTableModel.dayTableModel, dateProfile, dateEnv);
let splitProps = this.splitter.splitProps(props);
this.slicers = mapHash(splitProps, (split, resourceId) => this.slicers[resourceId] || new DayTimeColsSlicer());
let slicedProps = mapHash(this.slicers, (slicer, resourceId) => slicer.sliceProps(splitProps[resourceId], dateProfile, null, context, dayRanges));
return ( // TODO: would move this further down hierarchy, but sliceNowDate needs it
createElement(NowTimer, { unit: options.nowIndicator ? 'minute' : 'day' }, function (nowDate, todayRange) { return (createElement(TimeCols, __assign({ ref: _this.timeColsRef }, _this.joiner.joinProps(slicedProps, resourceDayTableModel), { dateProfile: dateProfile, axis: props.axis, slotDuration: props.slotDuration, slatMetas: props.slatMetas, cells: resourceDayTableModel.cells[0], tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, clientWidth: props.clientWidth, clientHeight: props.clientHeight, expandRows: props.expandRows, nowDate: nowDate, nowIndicatorSegs: options.nowIndicator && _this.buildNowIndicatorSegs(nowDate), todayRange: todayRange, onScrollTopRequest: props.onScrollTopRequest, forPrint: props.forPrint, onSlatCoords: props.onSlatCoords, isHitComboAllowed: _this.isHitComboAllowed }))); }));
};
ResourceDayTimeCols.prototype.buildNowIndicatorSegs = function (date) {
var nonResourceSegs = this.slicers[''].sliceNowDate(date, this.context, this.dayRanges);
createElement(NowTimer, { unit: options.nowIndicator ? 'minute' : 'day' }, (nowDate, todayRange) => (createElement(TimeCols, Object.assign({ ref: this.timeColsRef }, this.joiner.joinProps(slicedProps, resourceDayTableModel), { dateProfile: dateProfile, axis: props.axis, slotDuration: props.slotDuration, slatMetas: props.slatMetas, cells: resourceDayTableModel.cells[0], tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, clientWidth: props.clientWidth, clientHeight: props.clientHeight, expandRows: props.expandRows, nowDate: nowDate, nowIndicatorSegs: options.nowIndicator && this.buildNowIndicatorSegs(nowDate), todayRange: todayRange, onScrollTopRequest: props.onScrollTopRequest, forPrint: props.forPrint, onSlatCoords: props.onSlatCoords, isHitComboAllowed: this.isHitComboAllowed })))));
}
buildNowIndicatorSegs(date) {
let nonResourceSegs = this.slicers[''].sliceNowDate(date, this.context, this.dayRanges);
return this.joiner.expandSegs(this.props.resourceDayTableModel, nonResourceSegs);
};
return ResourceDayTimeCols;
}(DateComponent));
}
}
var ResourceDayTimeColsView = /** @class */ (function (_super) {
__extends(ResourceDayTimeColsView, _super);
function ResourceDayTimeColsView() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.flattenResources = memoize(flattenResources);
_this.buildResourceTimeColsModel = memoize(buildResourceTimeColsModel);
_this.buildSlatMetas = memoize(buildSlatMetas);
return _this;
class ResourceDayTimeColsView extends TimeColsView {
constructor() {
super(...arguments);
this.flattenResources = memoize(flattenResources);
this.buildResourceTimeColsModel = memoize(buildResourceTimeColsModel);
this.buildSlatMetas = memoize(buildSlatMetas);
}
ResourceDayTimeColsView.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var options = context.options, dateEnv = context.dateEnv;
var dateProfile = props.dateProfile;
var splitProps = this.allDaySplitter.splitProps(props);
var resourceOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER;
var resources = this.flattenResources(props.resourceStore, resourceOrderSpecs);
var resourceDayTableModel = this.buildResourceTimeColsModel(dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context);
var slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotLabelInterval, options.slotDuration, dateEnv);
var dayMinWidth = options.dayMinWidth;
var hasAttachedAxis = !dayMinWidth;
var hasDetachedAxis = dayMinWidth;
var headerContent = options.dayHeaders && (createElement(ResourceDayHeader, { resources: resources, dates: resourceDayTableModel.dayTableModel.headerDates, dateProfile: dateProfile, datesRepDistinctDays: true, renderIntro: hasAttachedAxis ? this.renderHeadAxis : null }));
var allDayContent = (options.allDaySlot !== false) && (function (contentArg) { return (createElement(ResourceDayTable, __assign({}, splitProps.allDay, { dateProfile: dateProfile, resourceDayTableModel: resourceDayTableModel, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, renderRowIntro: hasAttachedAxis ? _this.renderTableRowAxis : null, showWeekNumbers: false, expandRows: false, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }, _this.getAllDayMaxEventProps()))); });
var timeGridContent = function (contentArg) { return (createElement(ResourceDayTimeCols, __assign({}, splitProps.timed, { dateProfile: dateProfile, axis: hasAttachedAxis, slotDuration: options.slotDuration, slatMetas: slatMetas, resourceDayTableModel: resourceDayTableModel, tableColGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, onSlatCoords: _this.handleSlatCoords, expandRows: contentArg.expandRows, forPrint: props.forPrint, onScrollTopRequest: _this.handleScrollTopRequest }))); };
render() {
let { props, context } = this;
let { options, dateEnv } = context;
let { dateProfile } = props;
let splitProps = this.allDaySplitter.splitProps(props);
let resourceOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER;
let resources = this.flattenResources(props.resourceStore, resourceOrderSpecs);
let resourceDayTableModel = this.buildResourceTimeColsModel(dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context);
let slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotLabelInterval, options.slotDuration, dateEnv);
let { dayMinWidth } = options;
let hasAttachedAxis = !dayMinWidth;
let hasDetachedAxis = dayMinWidth;
let headerContent = options.dayHeaders && (createElement(ResourceDayHeader, { resources: resources, dates: resourceDayTableModel.dayTableModel.headerDates, dateProfile: dateProfile, datesRepDistinctDays: true, renderIntro: hasAttachedAxis ? this.renderHeadAxis : null }));
let allDayContent = (options.allDaySlot !== false) && ((contentArg) => (createElement(ResourceDayTable, Object.assign({}, splitProps.allDay, { dateProfile: dateProfile, resourceDayTableModel: resourceDayTableModel, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, renderRowIntro: hasAttachedAxis ? this.renderTableRowAxis : null, showWeekNumbers: false, expandRows: false, headerAlignElRef: this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }, this.getAllDayMaxEventProps()))));
let timeGridContent = (contentArg) => (createElement(ResourceDayTimeCols, Object.assign({}, splitProps.timed, { dateProfile: dateProfile, axis: hasAttachedAxis, slotDuration: options.slotDuration, slatMetas: slatMetas, resourceDayTableModel: resourceDayTableModel, tableColGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, onSlatCoords: this.handleSlatCoords, expandRows: contentArg.expandRows, forPrint: props.forPrint, onScrollTopRequest: this.handleScrollTopRequest })));
return hasDetachedAxis
? this.renderHScrollLayout(headerContent, allDayContent, timeGridContent, resourceDayTableModel.colCnt, dayMinWidth, slatMetas, this.state.slatCoords)
: this.renderSimpleLayout(headerContent, allDayContent, timeGridContent);
};
return ResourceDayTimeColsView;
}(TimeColsView));
}
}
function buildResourceTimeColsModel(dateProfile, dateProfileGenerator, resources, datesAboveResources, context) {
var dayTable = buildTimeColsModel(dateProfile, dateProfileGenerator);
let dayTable = buildTimeColsModel(dateProfile, dateProfileGenerator);
return datesAboveResources ?

@@ -94,0 +80,0 @@ new DayResourceTableModel(dayTable, resources, context) :

{
"name": "@fullcalendar/resource-timegrid",
"version": "5.11.2",
"version": "6.0.0-beta.1",
"title": "FullCalendar Resource Time Grid Plugin",

@@ -8,7 +8,7 @@ "description": "Displays events on a vertical resource view with time slots",

"dependencies": {
"@fullcalendar/common": "~5.11.2",
"@fullcalendar/premium-common": "~5.11.2",
"@fullcalendar/resource-common": "~5.11.2",
"@fullcalendar/resource-daygrid": "~5.11.2",
"@fullcalendar/timegrid": "~5.11.2",
"@fullcalendar/common": "6.0.0-beta.1",
"@fullcalendar/premium-common": "6.0.0-beta.1",
"@fullcalendar/resource-common": "6.0.0-beta.1",
"@fullcalendar/resource-daygrid": "6.0.0-beta.1",
"@fullcalendar/timegrid": "6.0.0-beta.1",
"tslib": "^2.1.0"

@@ -35,4 +35,4 @@ },

"devDependencies": {
"@fullcalendar/core-preact": "5.11.2"
"@fullcalendar/core-preact": "6.0.0-beta.1"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc