@fullcalendar/daygrid
Advanced tools
Comparing version 6.0.0-beta.2 to 6.0.0-beta.3
/*! | ||
FullCalendar Day Grid Plugin v6.0.0-beta.2 | ||
FullCalendar Day Grid Plugin v6.0.0-beta.3 | ||
Docs & License: https://fullcalendar.io/ | ||
@@ -4,0 +4,0 @@ (c) 2022 Adam Shaw |
/*! | ||
FullCalendar Day Grid Plugin v6.0.0-beta.2 | ||
FullCalendar Day Grid Plugin v6.0.0-beta.3 | ||
Docs & License: https://fullcalendar.io/ | ||
@@ -4,0 +4,0 @@ (c) 2022 Adam Shaw |
166
internal.js
@@ -1,85 +0,4 @@ | ||
import { DateComponent, getStickyHeaderDates, ViewContainer, SimpleScrollGrid, getStickyFooterScrollbar, renderScrollShim, createFormatter, BaseComponent, StandardEvent, buildSegTimeText, EventContainer, getSegAnchorAttrs, memoize, MoreLinkContainer, getSegMeta, getUniqueDomId, setRef, DayCellContainer, WeekNumberContainer, buildNavLinkAttrs, hasCustomDayCellContent, intersectRanges, addDays, SegHierarchy, buildEntryKey, intersectSpans, isPropsEqual, RefMap, sortEventSegs, buildEventRangeKey, BgEvent, renderFill, PositionCache, NowTimer, Slicer, DayHeader, DaySeriesModel, DayTableModel } from '@fullcalendar/core/internal.js'; | ||
import { createRef, createElement, Fragment } from '@fullcalendar/core/preact.js'; | ||
import { createFormatter, BaseComponent, StandardEvent, buildSegTimeText, EventContainer, getSegAnchorAttrs, memoize, MoreLinkContainer, getSegMeta, DateComponent, getUniqueDomId, setRef, DayCellContainer, WeekNumberContainer, buildNavLinkAttrs, hasCustomDayCellContent, intersectRanges, addDays, SegHierarchy, buildEntryKey, intersectSpans, RefMap, sortEventSegs, isPropsEqual, buildEventRangeKey, BgEvent, renderFill, PositionCache, NowTimer, Slicer, getStickyHeaderDates, ViewContainer, SimpleScrollGrid, getStickyFooterScrollbar, renderScrollShim, DayHeader, DaySeriesModel, DayTableModel } from '@fullcalendar/core/internal.js'; | ||
import { createElement, Fragment, createRef } from '@fullcalendar/core/preact.js'; | ||
/* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells. | ||
----------------------------------------------------------------------------------------------------------------------*/ | ||
// It is a manager for a Table subcomponent, which does most of the heavy lifting. | ||
// It is responsible for managing width/height. | ||
class TableView extends DateComponent { | ||
constructor() { | ||
super(...arguments); | ||
this.headerElRef = createRef(); | ||
} | ||
renderSimpleLayout(headerRowContent, bodyContent) { | ||
let { props, context } = this; | ||
let sections = []; | ||
let stickyHeaderDates = getStickyHeaderDates(context.options); | ||
if (headerRowContent) { | ||
sections.push({ | ||
type: 'header', | ||
key: 'header', | ||
isSticky: stickyHeaderDates, | ||
chunk: { | ||
elRef: this.headerElRef, | ||
tableClassName: 'fc-col-header', | ||
rowContent: headerRowContent, | ||
}, | ||
}); | ||
} | ||
sections.push({ | ||
type: 'body', | ||
key: 'body', | ||
liquid: true, | ||
chunk: { content: bodyContent }, | ||
}); | ||
return (createElement(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec }, | ||
createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections }))); | ||
} | ||
renderHScrollLayout(headerRowContent, bodyContent, colCnt, dayMinWidth) { | ||
let ScrollGrid = this.context.pluginHooks.scrollGridImpl; | ||
if (!ScrollGrid) { | ||
throw new Error('No ScrollGrid implementation'); | ||
} | ||
let { props, context } = this; | ||
let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options); | ||
let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options); | ||
let sections = []; | ||
if (headerRowContent) { | ||
sections.push({ | ||
type: 'header', | ||
key: 'header', | ||
isSticky: stickyHeaderDates, | ||
chunks: [{ | ||
key: 'main', | ||
elRef: this.headerElRef, | ||
tableClassName: 'fc-col-header', | ||
rowContent: headerRowContent, | ||
}], | ||
}); | ||
} | ||
sections.push({ | ||
type: 'body', | ||
key: 'body', | ||
liquid: true, | ||
chunks: [{ | ||
key: 'main', | ||
content: bodyContent, | ||
}], | ||
}); | ||
if (stickyFooterScrollbar) { | ||
sections.push({ | ||
type: 'footer', | ||
key: 'footer', | ||
isSticky: true, | ||
chunks: [{ | ||
key: 'main', | ||
content: renderScrollShim, | ||
}], | ||
}); | ||
} | ||
return (createElement(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec }, | ||
createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections }))); | ||
} | ||
} | ||
function splitSegsByRow(segs, rowCnt) { | ||
@@ -793,2 +712,83 @@ let byRow = []; | ||
/* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells. | ||
----------------------------------------------------------------------------------------------------------------------*/ | ||
// It is a manager for a Table subcomponent, which does most of the heavy lifting. | ||
// It is responsible for managing width/height. | ||
class TableView extends DateComponent { | ||
constructor() { | ||
super(...arguments); | ||
this.headerElRef = createRef(); | ||
} | ||
renderSimpleLayout(headerRowContent, bodyContent) { | ||
let { props, context } = this; | ||
let sections = []; | ||
let stickyHeaderDates = getStickyHeaderDates(context.options); | ||
if (headerRowContent) { | ||
sections.push({ | ||
type: 'header', | ||
key: 'header', | ||
isSticky: stickyHeaderDates, | ||
chunk: { | ||
elRef: this.headerElRef, | ||
tableClassName: 'fc-col-header', | ||
rowContent: headerRowContent, | ||
}, | ||
}); | ||
} | ||
sections.push({ | ||
type: 'body', | ||
key: 'body', | ||
liquid: true, | ||
chunk: { content: bodyContent }, | ||
}); | ||
return (createElement(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec }, | ||
createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections }))); | ||
} | ||
renderHScrollLayout(headerRowContent, bodyContent, colCnt, dayMinWidth) { | ||
let ScrollGrid = this.context.pluginHooks.scrollGridImpl; | ||
if (!ScrollGrid) { | ||
throw new Error('No ScrollGrid implementation'); | ||
} | ||
let { props, context } = this; | ||
let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options); | ||
let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options); | ||
let sections = []; | ||
if (headerRowContent) { | ||
sections.push({ | ||
type: 'header', | ||
key: 'header', | ||
isSticky: stickyHeaderDates, | ||
chunks: [{ | ||
key: 'main', | ||
elRef: this.headerElRef, | ||
tableClassName: 'fc-col-header', | ||
rowContent: headerRowContent, | ||
}], | ||
}); | ||
} | ||
sections.push({ | ||
type: 'body', | ||
key: 'body', | ||
liquid: true, | ||
chunks: [{ | ||
key: 'main', | ||
content: bodyContent, | ||
}], | ||
}); | ||
if (stickyFooterScrollbar) { | ||
sections.push({ | ||
type: 'footer', | ||
key: 'footer', | ||
isSticky: true, | ||
chunks: [{ | ||
key: 'main', | ||
content: renderScrollShim, | ||
}], | ||
}); | ||
} | ||
return (createElement(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec }, | ||
createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections }))); | ||
} | ||
} | ||
class DayTableView extends TableView { | ||
@@ -795,0 +795,0 @@ constructor() { |
{ | ||
"name": "@fullcalendar/daygrid", | ||
"version": "6.0.0-beta.2", | ||
"version": "6.0.0-beta.3", | ||
"keywords": [ | ||
@@ -29,3 +29,3 @@ "calendar", | ||
"peerDependencies": { | ||
"@fullcalendar/core": "6.0.0-beta.2" | ||
"@fullcalendar/core": "6.0.0-beta.3" | ||
}, | ||
@@ -42,6 +42,5 @@ "main": "./index.cjs", | ||
".": { | ||
"types": "./index.d.ts", | ||
"require": "./index.cjs", | ||
"import": "./index.js", | ||
"types": "./index.d.ts", | ||
"default": "./index.global.js" | ||
"import": "./index.js" | ||
}, | ||
@@ -51,7 +50,8 @@ "./internal.cjs": "./internal.cjs", | ||
"./internal": { | ||
"types": "./internal.d.ts", | ||
"require": "./internal.cjs", | ||
"import": "./internal.js", | ||
"types": "./internal.d.ts" | ||
"import": "./internal.js" | ||
} | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
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
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
0
186258