@fullcalendar/resource-daygrid
Advanced tools
Comparing version 6.0.2 to 6.0.3
/*! | ||
FullCalendar Resource Day Grid Plugin v6.0.2 | ||
FullCalendar Resource Day Grid Plugin v6.0.3 | ||
Docs & License: https://fullcalendar.io/docs/resource-daygrid-view | ||
@@ -74,3 +74,3 @@ (c) 2022 Adam Shaw | ||
name: '@fullcalendar/resource-daygrid', | ||
premiumReleaseDate: '2022-12-27', | ||
premiumReleaseDate: '2023-01-11', | ||
deps: [ | ||
@@ -77,0 +77,0 @@ premiumCommonPlugin__default["default"], |
/*! | ||
FullCalendar Resource Day Grid Plugin v6.0.2 | ||
FullCalendar Resource Day Grid Plugin v6.0.3 | ||
Docs & License: https://fullcalendar.io/docs/resource-daygrid-view | ||
(c) 2022 Adam Shaw | ||
*/ | ||
FullCalendar.ResourceDayGrid=function(e,t,r,a,s,l,o,i,n){"use strict";function d(e){return e&&e.__esModule?e:{default:e}}var u=d(r),c=d(a),h=d(s);class y extends n.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 R extends l.DateComponent{constructor(){super(...arguments),this.splitter=new n.VResourceSplitter,this.slicers={},this.joiner=new y,this.tableRef=o.createRef(),this.isHitComboAllowed=(e,t)=>1===this.props.resourceDayTableModel.dayTableModel.colCnt||e.dateSpan.resourceId===t.dateSpan.resourceId}render(){let{props:e,context:t}=this,{resourceDayTableModel:r,nextDayThreshold:a,dateProfile:s}=e,n=this.splitter.splitProps(e);this.slicers=l.mapHash(n,(e,t)=>this.slicers[t]||new i.DayTableSlicer);let d=l.mapHash(this.slicers,(e,l)=>e.sliceProps(n[l],s,a,t,r.dayTableModel));return o.createElement(i.Table,Object.assign({forPrint:e.forPrint,ref:this.tableRef},this.joiner.joinProps(d,r),{cells:r.cells,dateProfile:s,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 b extends i.TableView{constructor(){super(...arguments),this.flattenResources=l.memoize(n.flattenResources),this.buildResourceDayTableModel=l.memoize(f),this.headerRef=o.createRef(),this.tableRef=o.createRef()}render(){let{props:e,context:t}=this,{options:r}=t,a=r.resourceOrder||n.DEFAULT_RESOURCE_ORDER,s=this.flattenResources(e.resourceStore,a),l=this.buildResourceDayTableModel(e.dateProfile,t.dateProfileGenerator,s,r.datesAboveResources,t),i=r.dayHeaders&&o.createElement(n.ResourceDayHeader,{ref:this.headerRef,resources:s,dateProfile:e.dateProfile,dates:l.dayTableModel.headerDates,datesRepDistinctDays:!0}),d=t=>o.createElement(R,{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:r.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,showWeekNumbers:r.weekNumbers,expandRows:!e.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:e.forPrint});return r.dayMinWidth?this.renderHScrollLayout(i,d,l.colCnt,r.dayMinWidth):this.renderSimpleLayout(i,d)}}function f(e,t,r,a,s){let l=i.buildDayTableModel(e,t);return a?new n.DayResourceTableModel(l,r,s):new n.ResourceDayTableModel(l,r,s)}var p=t.createPlugin({name:"@fullcalendar/resource-daygrid",premiumReleaseDate:"2022-12-27",deps:[u.default,c.default,h.default],initialView:"resourceDayGridDay",views:{resourceDayGrid:{type:"dayGrid",component:b,needsResourceData:!0},resourceDayGridDay:{type:"resourceDayGrid",duration:{days:1}},resourceDayGridWeek:{type:"resourceDayGrid",duration:{weeks:1}},resourceDayGridMonth:{type:"resourceDayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),D={__proto__:null,ResourceDayTableView:b,ResourceDayTable:R};return t.globalPlugins.push(p),e.Internal=D,e.default=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Resource,FullCalendar.DayGrid,FullCalendar.Internal,FullCalendar.Preact,FullCalendar.DayGrid.Internal,FullCalendar.Resource.Internal); | ||
FullCalendar.ResourceDayGrid=function(e,t,r,a,s,l,o,i,n){"use strict";function d(e){return e&&e.__esModule?e:{default:e}}var u=d(r),c=d(a),h=d(s);class y extends n.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 R extends l.DateComponent{constructor(){super(...arguments),this.splitter=new n.VResourceSplitter,this.slicers={},this.joiner=new y,this.tableRef=o.createRef(),this.isHitComboAllowed=(e,t)=>1===this.props.resourceDayTableModel.dayTableModel.colCnt||e.dateSpan.resourceId===t.dateSpan.resourceId}render(){let{props:e,context:t}=this,{resourceDayTableModel:r,nextDayThreshold:a,dateProfile:s}=e,n=this.splitter.splitProps(e);this.slicers=l.mapHash(n,(e,t)=>this.slicers[t]||new i.DayTableSlicer);let d=l.mapHash(this.slicers,(e,l)=>e.sliceProps(n[l],s,a,t,r.dayTableModel));return o.createElement(i.Table,Object.assign({forPrint:e.forPrint,ref:this.tableRef},this.joiner.joinProps(d,r),{cells:r.cells,dateProfile:s,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 b extends i.TableView{constructor(){super(...arguments),this.flattenResources=l.memoize(n.flattenResources),this.buildResourceDayTableModel=l.memoize(f),this.headerRef=o.createRef(),this.tableRef=o.createRef()}render(){let{props:e,context:t}=this,{options:r}=t,a=r.resourceOrder||n.DEFAULT_RESOURCE_ORDER,s=this.flattenResources(e.resourceStore,a),l=this.buildResourceDayTableModel(e.dateProfile,t.dateProfileGenerator,s,r.datesAboveResources,t),i=r.dayHeaders&&o.createElement(n.ResourceDayHeader,{ref:this.headerRef,resources:s,dateProfile:e.dateProfile,dates:l.dayTableModel.headerDates,datesRepDistinctDays:!0}),d=t=>o.createElement(R,{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:r.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,showWeekNumbers:r.weekNumbers,expandRows:!e.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:e.forPrint});return r.dayMinWidth?this.renderHScrollLayout(i,d,l.colCnt,r.dayMinWidth):this.renderSimpleLayout(i,d)}}function f(e,t,r,a,s){let l=i.buildDayTableModel(e,t);return a?new n.DayResourceTableModel(l,r,s):new n.ResourceDayTableModel(l,r,s)}var p=t.createPlugin({name:"@fullcalendar/resource-daygrid",premiumReleaseDate:"2023-01-11",deps:[u.default,c.default,h.default],initialView:"resourceDayGridDay",views:{resourceDayGrid:{type:"dayGrid",component:b,needsResourceData:!0},resourceDayGridDay:{type:"resourceDayGrid",duration:{days:1}},resourceDayGridWeek:{type:"resourceDayGrid",duration:{weeks:1}},resourceDayGridMonth:{type:"resourceDayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),D={__proto__:null,ResourceDayTableView:b,ResourceDayTable:R};return t.globalPlugins.push(p),e.Internal=D,e.default=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Resource,FullCalendar.DayGrid,FullCalendar.Internal,FullCalendar.Preact,FullCalendar.DayGrid.Internal,FullCalendar.Resource.Internal); |
43
index.js
@@ -1,18 +0,28 @@ | ||
import { createPlugin } from '@fullcalendar/core/index.js'; | ||
import premiumCommonPlugin from '@fullcalendar/premium-common/index.js'; | ||
import resourcePlugin from '@fullcalendar/resource/index.js'; | ||
import dayGridPlugin from '@fullcalendar/daygrid/index.js'; | ||
import { ResourceDayTableView } from './internal.js'; | ||
import '@fullcalendar/core/internal.js'; | ||
import '@fullcalendar/core/preact.js'; | ||
import '@fullcalendar/daygrid/internal.js'; | ||
import '@fullcalendar/resource/internal.js'; | ||
'use strict'; | ||
var index = createPlugin({ | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var core = require('@fullcalendar/core'); | ||
var premiumCommonPlugin = require('@fullcalendar/premium-common'); | ||
var resourcePlugin = require('@fullcalendar/resource'); | ||
var dayGridPlugin = require('@fullcalendar/daygrid'); | ||
var internalCommon = require('./internal.js'); | ||
require('@fullcalendar/core/internal'); | ||
require('@fullcalendar/core/preact'); | ||
require('@fullcalendar/daygrid/internal'); | ||
require('@fullcalendar/resource/internal'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var premiumCommonPlugin__default = /*#__PURE__*/_interopDefaultLegacy(premiumCommonPlugin); | ||
var resourcePlugin__default = /*#__PURE__*/_interopDefaultLegacy(resourcePlugin); | ||
var dayGridPlugin__default = /*#__PURE__*/_interopDefaultLegacy(dayGridPlugin); | ||
var index = core.createPlugin({ | ||
name: '@fullcalendar/resource-daygrid', | ||
premiumReleaseDate: '2022-12-27', | ||
premiumReleaseDate: '2023-01-11', | ||
deps: [ | ||
premiumCommonPlugin, | ||
resourcePlugin, | ||
dayGridPlugin, | ||
premiumCommonPlugin__default["default"], | ||
resourcePlugin__default["default"], | ||
dayGridPlugin__default["default"], | ||
], | ||
@@ -23,3 +33,3 @@ initialView: 'resourceDayGridDay', | ||
type: 'dayGrid', | ||
component: ResourceDayTableView, | ||
component: internalCommon.ResourceDayTableView, | ||
needsResourceData: true, | ||
@@ -45,3 +55,2 @@ }, | ||
export { index as default }; | ||
//# sourceMappingURL=index.js.map | ||
exports["default"] = index; |
@@ -1,7 +0,11 @@ | ||
import { DateComponent, mapHash, memoize } from '@fullcalendar/core/internal.js'; | ||
import { createRef, createElement } from '@fullcalendar/core/preact.js'; | ||
import { DayTableSlicer, Table, TableView, buildDayTableModel } from '@fullcalendar/daygrid/internal.js'; | ||
import { VResourceJoiner, VResourceSplitter, flattenResources, DEFAULT_RESOURCE_ORDER, ResourceDayHeader, DayResourceTableModel, ResourceDayTableModel } from '@fullcalendar/resource/internal.js'; | ||
'use strict'; | ||
class ResourceDayTableJoiner extends VResourceJoiner { | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var internal$1 = require('@fullcalendar/core/internal'); | ||
var preact = require('@fullcalendar/core/preact'); | ||
var internal$2 = require('@fullcalendar/daygrid/internal'); | ||
var internal = require('@fullcalendar/resource/internal'); | ||
class ResourceDayTableJoiner extends internal.VResourceJoiner { | ||
transformSeg(seg, resourceDayTableModel, resourceI) { | ||
@@ -13,9 +17,9 @@ let colRanges = resourceDayTableModel.computeColRanges(seg.firstCol, seg.lastCol, resourceI); | ||
class ResourceDayTable extends DateComponent { | ||
class ResourceDayTable extends internal$1.DateComponent { | ||
constructor() { | ||
super(...arguments); | ||
this.splitter = new VResourceSplitter(); | ||
this.splitter = new internal.VResourceSplitter(); | ||
this.slicers = {}; | ||
this.joiner = new ResourceDayTableJoiner(); | ||
this.tableRef = createRef(); | ||
this.tableRef = preact.createRef(); | ||
this.isHitComboAllowed = (hit0, hit1) => { | ||
@@ -30,15 +34,15 @@ let allowAcrossResources = this.props.resourceDayTableModel.dayTableModel.colCnt === 1; | ||
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 }))); | ||
this.slicers = internal$1.mapHash(splitProps, (split, resourceId) => this.slicers[resourceId] || new internal$2.DayTableSlicer()); | ||
let slicedProps = internal$1.mapHash(this.slicers, (slicer, resourceId) => slicer.sliceProps(splitProps[resourceId], dateProfile, nextDayThreshold, context, resourceDayTableModel.dayTableModel)); | ||
return (preact.createElement(internal$2.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 }))); | ||
} | ||
} | ||
class ResourceDayTableView extends TableView { | ||
class ResourceDayTableView extends internal$2.TableView { | ||
constructor() { | ||
super(...arguments); | ||
this.flattenResources = memoize(flattenResources); | ||
this.buildResourceDayTableModel = memoize(buildResourceDayTableModel); | ||
this.headerRef = createRef(); | ||
this.tableRef = createRef(); | ||
this.flattenResources = internal$1.memoize(internal.flattenResources); | ||
this.buildResourceDayTableModel = internal$1.memoize(buildResourceDayTableModel); | ||
this.headerRef = preact.createRef(); | ||
this.tableRef = preact.createRef(); | ||
} | ||
@@ -48,7 +52,7 @@ render() { | ||
let { options } = context; | ||
let resourceOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER; | ||
let resourceOrderSpecs = options.resourceOrder || internal.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 })); | ||
let headerContent = options.dayHeaders && (preact.createElement(internal.ResourceDayHeader, { ref: this.headerRef, resources: resources, dateProfile: props.dateProfile, dates: resourceDayTableModel.dayTableModel.headerDates, datesRepDistinctDays: true })); | ||
let bodyContent = (contentArg) => (preact.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 | ||
@@ -60,9 +64,9 @@ ? this.renderHScrollLayout(headerContent, bodyContent, resourceDayTableModel.colCnt, options.dayMinWidth) | ||
function buildResourceDayTableModel(dateProfile, dateProfileGenerator, resources, datesAboveResources, context) { | ||
let dayTable = buildDayTableModel(dateProfile, dateProfileGenerator); | ||
let dayTable = internal$2.buildDayTableModel(dateProfile, dateProfileGenerator); | ||
return datesAboveResources ? | ||
new DayResourceTableModel(dayTable, resources, context) : | ||
new ResourceDayTableModel(dayTable, resources, context); | ||
new internal.DayResourceTableModel(dayTable, resources, context) : | ||
new internal.ResourceDayTableModel(dayTable, resources, context); | ||
} | ||
export { ResourceDayTable, ResourceDayTableView }; | ||
//# sourceMappingURL=internal.js.map | ||
exports.ResourceDayTable = ResourceDayTable; | ||
exports.ResourceDayTableView = ResourceDayTableView; |
{ | ||
"name": "@fullcalendar/resource-daygrid", | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"title": "FullCalendar Resource Day Grid Plugin", | ||
@@ -18,8 +18,8 @@ "description": "Display events on day/resource columns", | ||
"dependencies": { | ||
"@fullcalendar/daygrid": "~6.0.2", | ||
"@fullcalendar/premium-common": "~6.0.2" | ||
"@fullcalendar/daygrid": "~6.0.3", | ||
"@fullcalendar/premium-common": "~6.0.3" | ||
}, | ||
"peerDependencies": { | ||
"@fullcalendar/core": "~6.0.2", | ||
"@fullcalendar/resource": "~6.0.2" | ||
"@fullcalendar/core": "~6.0.3", | ||
"@fullcalendar/resource": "~6.0.3" | ||
}, | ||
@@ -40,5 +40,5 @@ "type": "module", | ||
"copyright": "2022 Adam Shaw", | ||
"main": "./index.cjs", | ||
"module": "./index.js", | ||
"types": "./index.d.ts", | ||
"main": "./index.js", | ||
"module": "./index.esm.js", | ||
"unpkg": "./index.global.min.js", | ||
@@ -48,15 +48,11 @@ "jsdelivr": "./index.global.min.js", | ||
"./package.json": "./package.json", | ||
"./index.cjs": "./index.cjs", | ||
"./index.js": "./index.js", | ||
".": { | ||
"types": "./index.d.ts", | ||
"require": "./index.cjs", | ||
"import": "./index.js" | ||
"require": "./index.js", | ||
"import": "./index.esm.js" | ||
}, | ||
"./internal.cjs": "./internal.cjs", | ||
"./internal.js": "./internal.js", | ||
"./internal": { | ||
"types": "./internal.d.ts", | ||
"require": "./internal.cjs", | ||
"import": "./internal.js" | ||
"require": "./internal.js", | ||
"import": "./internal.esm.js" | ||
} | ||
@@ -63,0 +59,0 @@ }, |
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
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
29269
11
391