@fullcalendar/resource-daygrid
Advanced tools
Comparing version 5.11.2 to 6.0.0-beta.1
/*! | ||
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 dayGridPlugin = require('@fullcalendar/daygrid'); | ||
var tslib = require('tslib'); | ||
@@ -23,67 +22,54 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var ResourceDayTableJoiner = /** @class */ (function (_super) { | ||
tslib.__extends(ResourceDayTableJoiner, _super); | ||
function ResourceDayTableJoiner() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class ResourceDayTableJoiner extends resourceCommonPlugin.VResourceJoiner { | ||
transformSeg(seg, resourceDayTableModel, resourceI) { | ||
let colRanges = resourceDayTableModel.computeColRanges(seg.firstCol, seg.lastCol, resourceI); | ||
return colRanges.map((colRange) => (Object.assign(Object.assign(Object.assign({}, seg), colRange), { isStart: seg.isStart && colRange.isStart, isEnd: seg.isEnd && colRange.isEnd }))); | ||
} | ||
ResourceDayTableJoiner.prototype.transformSeg = function (seg, resourceDayTableModel, resourceI) { | ||
var colRanges = resourceDayTableModel.computeColRanges(seg.firstCol, seg.lastCol, resourceI); | ||
return colRanges.map(function (colRange) { return (tslib.__assign(tslib.__assign(tslib.__assign({}, seg), colRange), { isStart: seg.isStart && colRange.isStart, isEnd: seg.isEnd && colRange.isEnd })); }); | ||
}; | ||
return ResourceDayTableJoiner; | ||
}(resourceCommonPlugin.VResourceJoiner)); | ||
} | ||
var ResourceDayTable = /** @class */ (function (_super) { | ||
tslib.__extends(ResourceDayTable, _super); | ||
function ResourceDayTable() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.splitter = new resourceCommonPlugin.VResourceSplitter(); | ||
_this.slicers = {}; | ||
_this.joiner = new ResourceDayTableJoiner(); | ||
_this.tableRef = common.createRef(); | ||
_this.isHitComboAllowed = function (hit0, hit1) { | ||
var allowAcrossResources = _this.props.resourceDayTableModel.dayTableModel.colCnt === 1; | ||
class ResourceDayTable extends common.DateComponent { | ||
constructor() { | ||
super(...arguments); | ||
this.splitter = new resourceCommonPlugin.VResourceSplitter(); | ||
this.slicers = {}; | ||
this.joiner = new ResourceDayTableJoiner(); | ||
this.tableRef = common.createRef(); | ||
this.isHitComboAllowed = (hit0, hit1) => { | ||
let allowAcrossResources = this.props.resourceDayTableModel.dayTableModel.colCnt === 1; | ||
return allowAcrossResources || hit0.dateSpan.resourceId === hit1.dateSpan.resourceId; | ||
}; | ||
return _this; | ||
} | ||
ResourceDayTable.prototype.render = function () { | ||
var _this = this; | ||
var _a = this, props = _a.props, context = _a.context; | ||
var resourceDayTableModel = props.resourceDayTableModel, nextDayThreshold = props.nextDayThreshold, dateProfile = props.dateProfile; | ||
var splitProps = this.splitter.splitProps(props); | ||
this.slicers = common.mapHash(splitProps, function (split, resourceId) { return _this.slicers[resourceId] || new dayGridPlugin.DayTableSlicer(); }); | ||
var slicedProps = common.mapHash(this.slicers, function (slicer, resourceId) { return slicer.sliceProps(splitProps[resourceId], dateProfile, nextDayThreshold, context, resourceDayTableModel.dayTableModel); }); | ||
return (common.createElement(dayGridPlugin.Table, tslib.__assign({ forPrint: props.forPrint, ref: this.tableRef }, this.joiner.joinProps(slicedProps, resourceDayTableModel), { cells: resourceDayTableModel.cells, dateProfile: dateProfile, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, isHitComboAllowed: this.isHitComboAllowed }))); | ||
}; | ||
return ResourceDayTable; | ||
}(common.DateComponent)); | ||
render() { | ||
let { props, context } = this; | ||
let { resourceDayTableModel, nextDayThreshold, dateProfile } = props; | ||
let splitProps = this.splitter.splitProps(props); | ||
this.slicers = common.mapHash(splitProps, (split, resourceId) => this.slicers[resourceId] || new dayGridPlugin.DayTableSlicer()); | ||
let slicedProps = common.mapHash(this.slicers, (slicer, resourceId) => slicer.sliceProps(splitProps[resourceId], dateProfile, nextDayThreshold, context, resourceDayTableModel.dayTableModel)); | ||
return (common.createElement(dayGridPlugin.Table, Object.assign({ forPrint: props.forPrint, ref: this.tableRef }, this.joiner.joinProps(slicedProps, resourceDayTableModel), { cells: resourceDayTableModel.cells, dateProfile: dateProfile, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, isHitComboAllowed: this.isHitComboAllowed }))); | ||
} | ||
} | ||
var ResourceDayTableView = /** @class */ (function (_super) { | ||
tslib.__extends(ResourceDayTableView, _super); | ||
function ResourceDayTableView() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.flattenResources = common.memoize(resourceCommonPlugin.flattenResources); | ||
_this.buildResourceDayTableModel = common.memoize(buildResourceDayTableModel); | ||
_this.headerRef = common.createRef(); | ||
_this.tableRef = common.createRef(); | ||
return _this; | ||
class ResourceDayTableView extends dayGridPlugin.TableView { | ||
constructor() { | ||
super(...arguments); | ||
this.flattenResources = common.memoize(resourceCommonPlugin.flattenResources); | ||
this.buildResourceDayTableModel = common.memoize(buildResourceDayTableModel); | ||
this.headerRef = common.createRef(); | ||
this.tableRef = common.createRef(); | ||
} | ||
ResourceDayTableView.prototype.render = function () { | ||
var _this = this; | ||
var _a = this, props = _a.props, context = _a.context; | ||
var options = context.options; | ||
var resourceOrderSpecs = options.resourceOrder || resourceCommonPlugin.DEFAULT_RESOURCE_ORDER; | ||
var resources = this.flattenResources(props.resourceStore, resourceOrderSpecs); | ||
var resourceDayTableModel = this.buildResourceDayTableModel(props.dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context); | ||
var headerContent = options.dayHeaders && (common.createElement(resourceCommonPlugin.ResourceDayHeader, { ref: this.headerRef, resources: resources, dateProfile: props.dateProfile, dates: resourceDayTableModel.dayTableModel.headerDates, datesRepDistinctDays: true })); | ||
var bodyContent = function (contentArg) { return (common.createElement(ResourceDayTable, { ref: _this.tableRef, dateProfile: props.dateProfile, resourceDayTableModel: resourceDayTableModel, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); }; | ||
render() { | ||
let { props, context } = this; | ||
let { options } = context; | ||
let resourceOrderSpecs = options.resourceOrder || resourceCommonPlugin.DEFAULT_RESOURCE_ORDER; | ||
let resources = this.flattenResources(props.resourceStore, resourceOrderSpecs); | ||
let resourceDayTableModel = this.buildResourceDayTableModel(props.dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context); | ||
let headerContent = options.dayHeaders && (common.createElement(resourceCommonPlugin.ResourceDayHeader, { ref: this.headerRef, resources: resources, dateProfile: props.dateProfile, dates: resourceDayTableModel.dayTableModel.headerDates, datesRepDistinctDays: true })); | ||
let bodyContent = (contentArg) => (common.createElement(ResourceDayTable, { ref: this.tableRef, dateProfile: props.dateProfile, resourceDayTableModel: resourceDayTableModel, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); | ||
return options.dayMinWidth | ||
? this.renderHScrollLayout(headerContent, bodyContent, resourceDayTableModel.colCnt, options.dayMinWidth) | ||
: this.renderSimpleLayout(headerContent, bodyContent); | ||
}; | ||
return ResourceDayTableView; | ||
}(dayGridPlugin.TableView)); | ||
} | ||
} | ||
function buildResourceDayTableModel(dateProfile, dateProfileGenerator, resources, datesAboveResources, context) { | ||
var dayTable = dayGridPlugin.buildDayTableModel(dateProfile, dateProfileGenerator); | ||
let dayTable = dayGridPlugin.buildDayTableModel(dateProfile, dateProfileGenerator); | ||
return datesAboveResources ? | ||
@@ -90,0 +76,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,109 +15,54 @@ (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 __()); | ||
class ResourceDayTableJoiner extends resourceCommonPlugin.VResourceJoiner { | ||
transformSeg(seg, resourceDayTableModel, resourceI) { | ||
let colRanges = resourceDayTableModel.computeColRanges(seg.firstCol, seg.lastCol, resourceI); | ||
return colRanges.map((colRange) => (Object.assign(Object.assign(Object.assign({}, seg), colRange), { isStart: seg.isStart && colRange.isStart, isEnd: seg.isEnd && colRange.isEnd }))); | ||
} | ||
} | ||
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 ResourceDayTableJoiner = /** @class */ (function (_super) { | ||
__extends(ResourceDayTableJoiner, _super); | ||
function ResourceDayTableJoiner() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
ResourceDayTableJoiner.prototype.transformSeg = function (seg, resourceDayTableModel, resourceI) { | ||
var colRanges = resourceDayTableModel.computeColRanges(seg.firstCol, seg.lastCol, resourceI); | ||
return colRanges.map(function (colRange) { return (__assign(__assign(__assign({}, seg), colRange), { isStart: seg.isStart && colRange.isStart, isEnd: seg.isEnd && colRange.isEnd })); }); | ||
}; | ||
return ResourceDayTableJoiner; | ||
}(resourceCommonPlugin.VResourceJoiner)); | ||
var ResourceDayTable = /** @class */ (function (_super) { | ||
__extends(ResourceDayTable, _super); | ||
function ResourceDayTable() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.splitter = new resourceCommonPlugin.VResourceSplitter(); | ||
_this.slicers = {}; | ||
_this.joiner = new ResourceDayTableJoiner(); | ||
_this.tableRef = common.createRef(); | ||
_this.isHitComboAllowed = function (hit0, hit1) { | ||
var allowAcrossResources = _this.props.resourceDayTableModel.dayTableModel.colCnt === 1; | ||
class ResourceDayTable extends common.DateComponent { | ||
constructor() { | ||
super(...arguments); | ||
this.splitter = new resourceCommonPlugin.VResourceSplitter(); | ||
this.slicers = {}; | ||
this.joiner = new ResourceDayTableJoiner(); | ||
this.tableRef = common.createRef(); | ||
this.isHitComboAllowed = (hit0, hit1) => { | ||
let allowAcrossResources = this.props.resourceDayTableModel.dayTableModel.colCnt === 1; | ||
return allowAcrossResources || hit0.dateSpan.resourceId === hit1.dateSpan.resourceId; | ||
}; | ||
return _this; | ||
} | ||
ResourceDayTable.prototype.render = function () { | ||
var _this = this; | ||
var _a = this, props = _a.props, context = _a.context; | ||
var resourceDayTableModel = props.resourceDayTableModel, nextDayThreshold = props.nextDayThreshold, dateProfile = props.dateProfile; | ||
var splitProps = this.splitter.splitProps(props); | ||
this.slicers = common.mapHash(splitProps, function (split, resourceId) { return _this.slicers[resourceId] || new dayGridPlugin.DayTableSlicer(); }); | ||
var slicedProps = common.mapHash(this.slicers, function (slicer, resourceId) { return slicer.sliceProps(splitProps[resourceId], dateProfile, nextDayThreshold, context, resourceDayTableModel.dayTableModel); }); | ||
return (common.createElement(dayGridPlugin.Table, __assign({ forPrint: props.forPrint, ref: this.tableRef }, this.joiner.joinProps(slicedProps, resourceDayTableModel), { cells: resourceDayTableModel.cells, dateProfile: dateProfile, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, isHitComboAllowed: this.isHitComboAllowed }))); | ||
}; | ||
return ResourceDayTable; | ||
}(common.DateComponent)); | ||
render() { | ||
let { props, context } = this; | ||
let { resourceDayTableModel, nextDayThreshold, dateProfile } = props; | ||
let splitProps = this.splitter.splitProps(props); | ||
this.slicers = common.mapHash(splitProps, (split, resourceId) => this.slicers[resourceId] || new dayGridPlugin.DayTableSlicer()); | ||
let slicedProps = common.mapHash(this.slicers, (slicer, resourceId) => slicer.sliceProps(splitProps[resourceId], dateProfile, nextDayThreshold, context, resourceDayTableModel.dayTableModel)); | ||
return (common.createElement(dayGridPlugin.Table, Object.assign({ forPrint: props.forPrint, ref: this.tableRef }, this.joiner.joinProps(slicedProps, resourceDayTableModel), { cells: resourceDayTableModel.cells, dateProfile: dateProfile, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, isHitComboAllowed: this.isHitComboAllowed }))); | ||
} | ||
} | ||
var ResourceDayTableView = /** @class */ (function (_super) { | ||
__extends(ResourceDayTableView, _super); | ||
function ResourceDayTableView() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.flattenResources = common.memoize(resourceCommonPlugin.flattenResources); | ||
_this.buildResourceDayTableModel = common.memoize(buildResourceDayTableModel); | ||
_this.headerRef = common.createRef(); | ||
_this.tableRef = common.createRef(); | ||
return _this; | ||
class ResourceDayTableView extends dayGridPlugin.TableView { | ||
constructor() { | ||
super(...arguments); | ||
this.flattenResources = common.memoize(resourceCommonPlugin.flattenResources); | ||
this.buildResourceDayTableModel = common.memoize(buildResourceDayTableModel); | ||
this.headerRef = common.createRef(); | ||
this.tableRef = common.createRef(); | ||
} | ||
ResourceDayTableView.prototype.render = function () { | ||
var _this = this; | ||
var _a = this, props = _a.props, context = _a.context; | ||
var options = context.options; | ||
var resourceOrderSpecs = options.resourceOrder || resourceCommonPlugin.DEFAULT_RESOURCE_ORDER; | ||
var resources = this.flattenResources(props.resourceStore, resourceOrderSpecs); | ||
var resourceDayTableModel = this.buildResourceDayTableModel(props.dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context); | ||
var headerContent = options.dayHeaders && (common.createElement(resourceCommonPlugin.ResourceDayHeader, { ref: this.headerRef, resources: resources, dateProfile: props.dateProfile, dates: resourceDayTableModel.dayTableModel.headerDates, datesRepDistinctDays: true })); | ||
var bodyContent = function (contentArg) { return (common.createElement(ResourceDayTable, { ref: _this.tableRef, dateProfile: props.dateProfile, resourceDayTableModel: resourceDayTableModel, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); }; | ||
render() { | ||
let { props, context } = this; | ||
let { options } = context; | ||
let resourceOrderSpecs = options.resourceOrder || resourceCommonPlugin.DEFAULT_RESOURCE_ORDER; | ||
let resources = this.flattenResources(props.resourceStore, resourceOrderSpecs); | ||
let resourceDayTableModel = this.buildResourceDayTableModel(props.dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context); | ||
let headerContent = options.dayHeaders && (common.createElement(resourceCommonPlugin.ResourceDayHeader, { ref: this.headerRef, resources: resources, dateProfile: props.dateProfile, dates: resourceDayTableModel.dayTableModel.headerDates, datesRepDistinctDays: true })); | ||
let bodyContent = (contentArg) => (common.createElement(ResourceDayTable, { ref: this.tableRef, dateProfile: props.dateProfile, resourceDayTableModel: resourceDayTableModel, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); | ||
return options.dayMinWidth | ||
? this.renderHScrollLayout(headerContent, bodyContent, resourceDayTableModel.colCnt, options.dayMinWidth) | ||
: this.renderSimpleLayout(headerContent, bodyContent); | ||
}; | ||
return ResourceDayTableView; | ||
}(dayGridPlugin.TableView)); | ||
} | ||
} | ||
function buildResourceDayTableModel(dateProfile, dateProfileGenerator, resources, datesAboveResources, context) { | ||
var dayTable = dayGridPlugin.buildDayTableModel(dateProfile, dateProfileGenerator); | ||
let dayTable = dayGridPlugin.buildDayTableModel(dateProfile, dateProfileGenerator); | ||
return datesAboveResources ? | ||
@@ -124,0 +69,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 FullCalendarResourceDayGrid=function(e,t,r,o,n){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(r),s=a(o),l=a(n),u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.transformSeg=function(e,t,r){return t.computeColRanges(e.firstCol,e.lastCol,r).map((function(t){return c(c(c({},e),t),{isStart:e.isStart&&t.isStart,isEnd:e.isEnd&&t.isEnd})}))},t}(o.VResourceJoiner),p=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.splitter=new o.VResourceSplitter,r.slicers={},r.joiner=new f,r.tableRef=t.createRef(),r.isHitComboAllowed=function(e,t){return 1===r.props.resourceDayTableModel.dayTableModel.colCnt||e.dateSpan.resourceId===t.dateSpan.resourceId},r}return d(r,e),r.prototype.render=function(){var e=this,r=this.props,o=this.context,a=r.resourceDayTableModel,i=r.nextDayThreshold,s=r.dateProfile,l=this.splitter.splitProps(r);this.slicers=t.mapHash(l,(function(t,r){return e.slicers[r]||new n.DayTableSlicer}));var u=t.mapHash(this.slicers,(function(e,t){return e.sliceProps(l[t],s,i,o,a.dayTableModel)}));return t.createElement(n.Table,c({forPrint:r.forPrint,ref:this.tableRef},this.joiner.joinProps(u,a),{cells:a.cells,dateProfile:s,colGroupNode:r.colGroupNode,tableMinWidth:r.tableMinWidth,renderRowIntro:r.renderRowIntro,dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,showWeekNumbers:r.showWeekNumbers,expandRows:r.expandRows,headerAlignElRef:r.headerAlignElRef,clientWidth:r.clientWidth,clientHeight:r.clientHeight,isHitComboAllowed:this.isHitComboAllowed}))},r}(t.DateComponent),y=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.flattenResources=t.memoize(o.flattenResources),r.buildResourceDayTableModel=t.memoize(h),r.headerRef=t.createRef(),r.tableRef=t.createRef(),r}return d(r,e),r.prototype.render=function(){var e=this,r=this.props,n=this.context,a=n.options,i=a.resourceOrder||o.DEFAULT_RESOURCE_ORDER,s=this.flattenResources(r.resourceStore,i),l=this.buildResourceDayTableModel(r.dateProfile,n.dateProfileGenerator,s,a.datesAboveResources,n),u=a.dayHeaders&&t.createElement(o.ResourceDayHeader,{ref:this.headerRef,resources:s,dateProfile:r.dateProfile,dates:l.dayTableModel.headerDates,datesRepDistinctDays:!0}),d=function(o){return t.createElement(p,{ref:e.tableRef,dateProfile:r.dateProfile,resourceDayTableModel:l,businessHours:r.businessHours,eventStore:r.eventStore,eventUiBases:r.eventUiBases,dateSelection:r.dateSelection,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:a.nextDayThreshold,tableMinWidth:o.tableMinWidth,colGroupNode:o.tableColGroupNode,dayMaxEvents:a.dayMaxEvents,dayMaxEventRows:a.dayMaxEventRows,showWeekNumbers:a.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:o.clientWidth,clientHeight:o.clientHeight,forPrint:r.forPrint})};return a.dayMinWidth?this.renderHScrollLayout(u,d,l.colCnt,a.dayMinWidth):this.renderSimpleLayout(u,d)},r}(n.TableView);function h(e,t,r,a,i){var s=n.buildDayTableModel(e,t);return a?new o.DayResourceTableModel(s,r,i):new o.ResourceDayTableModel(s,r,i)}var b=t.createPlugin({deps:[i.default,s.default,l.default],initialView:"resourceDayGridDay",views:{resourceDayGrid:{type:"dayGrid",component:y,needsResourceData:!0},resourceDayGridDay:{type:"resourceDayGrid",duration:{days:1}},resourceDayGridWeek:{type:"resourceDayGrid",duration:{weeks:1}},resourceDayGridMonth:{type:"resourceDayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}});return t.globalPlugins.push(b),e.ResourceDayTable=p,e.ResourceDayTableView=y,e.default=b,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendarPremiumCommon,FullCalendarResourceCommon,FullCalendarDayGrid); | ||
var FullCalendarResourceDayGrid=function(e,t,r,s,a){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(r),l=o(s),n=o(a);class d extends s.VResourceJoiner{transformSeg(e,t,r){return t.computeColRanges(e.firstCol,e.lastCol,r).map((t=>Object.assign(Object.assign(Object.assign({},e),t),{isStart:e.isStart&&t.isStart,isEnd:e.isEnd&&t.isEnd})))}}class c extends t.DateComponent{constructor(){super(...arguments),this.splitter=new s.VResourceSplitter,this.slicers={},this.joiner=new d,this.tableRef=t.createRef(),this.isHitComboAllowed=(e,t)=>1===this.props.resourceDayTableModel.dayTableModel.colCnt||e.dateSpan.resourceId===t.dateSpan.resourceId}render(){let{props:e,context:r}=this,{resourceDayTableModel:s,nextDayThreshold:o,dateProfile:i}=e,l=this.splitter.splitProps(e);this.slicers=t.mapHash(l,((e,t)=>this.slicers[t]||new a.DayTableSlicer));let n=t.mapHash(this.slicers,((e,t)=>e.sliceProps(l[t],i,o,r,s.dayTableModel)));return t.createElement(a.Table,Object.assign({forPrint:e.forPrint,ref:this.tableRef},this.joiner.joinProps(n,s),{cells:s.cells,dateProfile:i,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,isHitComboAllowed:this.isHitComboAllowed}))}}class u extends a.TableView{constructor(){super(...arguments),this.flattenResources=t.memoize(s.flattenResources),this.buildResourceDayTableModel=t.memoize(h),this.headerRef=t.createRef(),this.tableRef=t.createRef()}render(){let{props:e,context:r}=this,{options:a}=r,o=a.resourceOrder||s.DEFAULT_RESOURCE_ORDER,i=this.flattenResources(e.resourceStore,o),l=this.buildResourceDayTableModel(e.dateProfile,r.dateProfileGenerator,i,a.datesAboveResources,r),n=a.dayHeaders&&t.createElement(s.ResourceDayHeader,{ref:this.headerRef,resources:i,dateProfile:e.dateProfile,dates:l.dayTableModel.headerDates,datesRepDistinctDays:!0}),d=r=>t.createElement(c,{ref:this.tableRef,dateProfile:e.dateProfile,resourceDayTableModel:l,businessHours:e.businessHours,eventStore:e.eventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,nextDayThreshold:a.nextDayThreshold,tableMinWidth:r.tableMinWidth,colGroupNode:r.tableColGroupNode,dayMaxEvents:a.dayMaxEvents,dayMaxEventRows:a.dayMaxEventRows,showWeekNumbers:a.weekNumbers,expandRows:!e.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:r.clientWidth,clientHeight:r.clientHeight,forPrint:e.forPrint});return a.dayMinWidth?this.renderHScrollLayout(n,d,l.colCnt,a.dayMinWidth):this.renderSimpleLayout(n,d)}}function h(e,t,r,o,i){let l=a.buildDayTableModel(e,t);return o?new s.DayResourceTableModel(l,r,i):new s.ResourceDayTableModel(l,r,i)}var y=t.createPlugin({deps:[i.default,l.default,n.default],initialView:"resourceDayGridDay",views:{resourceDayGrid:{type:"dayGrid",component:u,needsResourceData:!0},resourceDayGridDay:{type:"resourceDayGrid",duration:{days:1}},resourceDayGridWeek:{type:"resourceDayGrid",duration:{weeks:1}},resourceDayGridMonth:{type:"resourceDayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}});return t.globalPlugins.push(y),e.ResourceDayTable=c,e.ResourceDayTableView=u,e.default=y,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendarPremiumCommon,FullCalendarResourceCommon,FullCalendarDayGrid); |
100
main.js
/*! | ||
FullCalendar Scheduler v5.11.2 | ||
FullCalendar Scheduler v6.0.0-beta.1 | ||
Docs & License: https://fullcalendar.io/scheduler | ||
(c) 2022 Adam Shaw | ||
*/ | ||
import { createRef, mapHash, createElement, DateComponent, memoize, createPlugin } from '@fullcalendar/common'; | ||
import { DateComponent, createRef, mapHash, createElement, memoize, 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 dayGridPlugin, { DayTableSlicer, Table, TableView, buildDayTableModel } from '@fullcalendar/daygrid'; | ||
import { __extends, __assign } from 'tslib'; | ||
var ResourceDayTableJoiner = /** @class */ (function (_super) { | ||
__extends(ResourceDayTableJoiner, _super); | ||
function ResourceDayTableJoiner() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class ResourceDayTableJoiner extends VResourceJoiner { | ||
transformSeg(seg, resourceDayTableModel, resourceI) { | ||
let colRanges = resourceDayTableModel.computeColRanges(seg.firstCol, seg.lastCol, resourceI); | ||
return colRanges.map((colRange) => (Object.assign(Object.assign(Object.assign({}, seg), colRange), { isStart: seg.isStart && colRange.isStart, isEnd: seg.isEnd && colRange.isEnd }))); | ||
} | ||
ResourceDayTableJoiner.prototype.transformSeg = function (seg, resourceDayTableModel, resourceI) { | ||
var colRanges = resourceDayTableModel.computeColRanges(seg.firstCol, seg.lastCol, resourceI); | ||
return colRanges.map(function (colRange) { return (__assign(__assign(__assign({}, seg), colRange), { isStart: seg.isStart && colRange.isStart, isEnd: seg.isEnd && colRange.isEnd })); }); | ||
}; | ||
return ResourceDayTableJoiner; | ||
}(VResourceJoiner)); | ||
} | ||
var ResourceDayTable = /** @class */ (function (_super) { | ||
__extends(ResourceDayTable, _super); | ||
function ResourceDayTable() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.splitter = new VResourceSplitter(); | ||
_this.slicers = {}; | ||
_this.joiner = new ResourceDayTableJoiner(); | ||
_this.tableRef = createRef(); | ||
_this.isHitComboAllowed = function (hit0, hit1) { | ||
var allowAcrossResources = _this.props.resourceDayTableModel.dayTableModel.colCnt === 1; | ||
class ResourceDayTable extends DateComponent { | ||
constructor() { | ||
super(...arguments); | ||
this.splitter = new VResourceSplitter(); | ||
this.slicers = {}; | ||
this.joiner = new ResourceDayTableJoiner(); | ||
this.tableRef = createRef(); | ||
this.isHitComboAllowed = (hit0, hit1) => { | ||
let allowAcrossResources = this.props.resourceDayTableModel.dayTableModel.colCnt === 1; | ||
return allowAcrossResources || hit0.dateSpan.resourceId === hit1.dateSpan.resourceId; | ||
}; | ||
return _this; | ||
} | ||
ResourceDayTable.prototype.render = function () { | ||
var _this = this; | ||
var _a = this, props = _a.props, context = _a.context; | ||
var resourceDayTableModel = props.resourceDayTableModel, nextDayThreshold = props.nextDayThreshold, dateProfile = props.dateProfile; | ||
var splitProps = this.splitter.splitProps(props); | ||
this.slicers = mapHash(splitProps, function (split, resourceId) { return _this.slicers[resourceId] || new DayTableSlicer(); }); | ||
var slicedProps = mapHash(this.slicers, function (slicer, resourceId) { return slicer.sliceProps(splitProps[resourceId], dateProfile, nextDayThreshold, context, resourceDayTableModel.dayTableModel); }); | ||
return (createElement(Table, __assign({ forPrint: props.forPrint, ref: this.tableRef }, this.joiner.joinProps(slicedProps, resourceDayTableModel), { cells: resourceDayTableModel.cells, dateProfile: dateProfile, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, isHitComboAllowed: this.isHitComboAllowed }))); | ||
}; | ||
return ResourceDayTable; | ||
}(DateComponent)); | ||
render() { | ||
let { props, context } = this; | ||
let { resourceDayTableModel, nextDayThreshold, dateProfile } = props; | ||
let splitProps = this.splitter.splitProps(props); | ||
this.slicers = mapHash(splitProps, (split, resourceId) => this.slicers[resourceId] || new DayTableSlicer()); | ||
let slicedProps = mapHash(this.slicers, (slicer, resourceId) => slicer.sliceProps(splitProps[resourceId], dateProfile, nextDayThreshold, context, resourceDayTableModel.dayTableModel)); | ||
return (createElement(Table, Object.assign({ forPrint: props.forPrint, ref: this.tableRef }, this.joiner.joinProps(slicedProps, resourceDayTableModel), { cells: resourceDayTableModel.cells, dateProfile: dateProfile, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, isHitComboAllowed: this.isHitComboAllowed }))); | ||
} | ||
} | ||
var ResourceDayTableView = /** @class */ (function (_super) { | ||
__extends(ResourceDayTableView, _super); | ||
function ResourceDayTableView() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.flattenResources = memoize(flattenResources); | ||
_this.buildResourceDayTableModel = memoize(buildResourceDayTableModel); | ||
_this.headerRef = createRef(); | ||
_this.tableRef = createRef(); | ||
return _this; | ||
class ResourceDayTableView extends TableView { | ||
constructor() { | ||
super(...arguments); | ||
this.flattenResources = memoize(flattenResources); | ||
this.buildResourceDayTableModel = memoize(buildResourceDayTableModel); | ||
this.headerRef = createRef(); | ||
this.tableRef = createRef(); | ||
} | ||
ResourceDayTableView.prototype.render = function () { | ||
var _this = this; | ||
var _a = this, props = _a.props, context = _a.context; | ||
var options = context.options; | ||
var resourceOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER; | ||
var resources = this.flattenResources(props.resourceStore, resourceOrderSpecs); | ||
var resourceDayTableModel = this.buildResourceDayTableModel(props.dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context); | ||
var headerContent = options.dayHeaders && (createElement(ResourceDayHeader, { ref: this.headerRef, resources: resources, dateProfile: props.dateProfile, dates: resourceDayTableModel.dayTableModel.headerDates, datesRepDistinctDays: true })); | ||
var bodyContent = function (contentArg) { return (createElement(ResourceDayTable, { ref: _this.tableRef, dateProfile: props.dateProfile, resourceDayTableModel: resourceDayTableModel, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); }; | ||
render() { | ||
let { props, context } = this; | ||
let { options } = context; | ||
let resourceOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER; | ||
let resources = this.flattenResources(props.resourceStore, resourceOrderSpecs); | ||
let resourceDayTableModel = this.buildResourceDayTableModel(props.dateProfile, context.dateProfileGenerator, resources, options.datesAboveResources, context); | ||
let headerContent = options.dayHeaders && (createElement(ResourceDayHeader, { ref: this.headerRef, resources: resources, dateProfile: props.dateProfile, dates: resourceDayTableModel.dayTableModel.headerDates, datesRepDistinctDays: true })); | ||
let bodyContent = (contentArg) => (createElement(ResourceDayTable, { ref: this.tableRef, dateProfile: props.dateProfile, resourceDayTableModel: resourceDayTableModel, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); | ||
return options.dayMinWidth | ||
? this.renderHScrollLayout(headerContent, bodyContent, resourceDayTableModel.colCnt, options.dayMinWidth) | ||
: this.renderSimpleLayout(headerContent, bodyContent); | ||
}; | ||
return ResourceDayTableView; | ||
}(TableView)); | ||
} | ||
} | ||
function buildResourceDayTableModel(dateProfile, dateProfileGenerator, resources, datesAboveResources, context) { | ||
var dayTable = buildDayTableModel(dateProfile, dateProfileGenerator); | ||
let dayTable = buildDayTableModel(dateProfile, dateProfileGenerator); | ||
return datesAboveResources ? | ||
@@ -78,0 +64,0 @@ new DayResourceTableModel(dayTable, resources, context) : |
{ | ||
"name": "@fullcalendar/resource-daygrid", | ||
"version": "5.11.2", | ||
"version": "6.0.0-beta.1", | ||
"title": "FullCalendar Resource Day Grid Plugin", | ||
@@ -8,6 +8,6 @@ "description": "Displays events in individual columns for days and resources", | ||
"dependencies": { | ||
"@fullcalendar/common": "~5.11.2", | ||
"@fullcalendar/daygrid": "~5.11.2", | ||
"@fullcalendar/premium-common": "~5.11.2", | ||
"@fullcalendar/resource-common": "~5.11.2", | ||
"@fullcalendar/common": "6.0.0-beta.1", | ||
"@fullcalendar/daygrid": "6.0.0-beta.1", | ||
"@fullcalendar/premium-common": "6.0.0-beta.1", | ||
"@fullcalendar/resource-common": "6.0.0-beta.1", | ||
"tslib": "^2.1.0" | ||
@@ -34,4 +34,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69411
39927
367
1
1
+ Added@fullcalendar/common@6.0.0-beta.1(transitive)
+ Added@fullcalendar/daygrid@6.0.0-beta.1(transitive)
+ Added@fullcalendar/premium-common@6.0.0-beta.1(transitive)
+ Added@fullcalendar/resource-common@6.0.0-beta.1(transitive)
- Removed@fullcalendar/common@5.11.5(transitive)
- Removed@fullcalendar/daygrid@5.11.5(transitive)
- Removed@fullcalendar/premium-common@5.11.5(transitive)
- Removed@fullcalendar/resource-common@5.11.5(transitive)