fullcalendar 6.1.3 → 6.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.global.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar Standard Bundle v6.1.3
2
+ FullCalendar Standard Bundle v6.1.4
3
3
  Docs & License: https://fullcalendar.io/docs/initialize-globals
4
4
  (c) 2023 Adam Shaw
5
5
  */
@@ -1909,6 +1909,9 @@ var FullCalendar = (function (exports) {
1909
1909
  getMonth(marker) {
1910
1910
  return this.calendarSystem.getMarkerMonth(marker);
1911
1911
  }
1912
+ getDay(marker) {
1913
+ return this.calendarSystem.getMarkerDay(marker);
1914
+ }
1912
1915
  // Adding / Subtracting
1913
1916
  add(marker, dur) {
1914
1917
  let a = this.calendarSystem.markerToArray(marker);
@@ -9772,7 +9775,7 @@ var FullCalendar = (function (exports) {
9772
9775
  return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
9773
9776
  }
9774
9777
 
9775
- const version = '6.1.3';
9778
+ const version = '6.1.4';
9776
9779
 
9777
9780
  config.touchMouseIgnoreWait = 500;
9778
9781
  let ignoreMouseDepth = 0;
@@ -11869,87 +11872,6 @@ var FullCalendar = (function (exports) {
11869
11872
  listenerRefiners: LISTENER_REFINERS,
11870
11873
  });
11871
11874
 
11872
- /* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.
11873
- ----------------------------------------------------------------------------------------------------------------------*/
11874
- // It is a manager for a Table subcomponent, which does most of the heavy lifting.
11875
- // It is responsible for managing width/height.
11876
- class TableView extends DateComponent {
11877
- constructor() {
11878
- super(...arguments);
11879
- this.headerElRef = y();
11880
- }
11881
- renderSimpleLayout(headerRowContent, bodyContent) {
11882
- let { props, context } = this;
11883
- let sections = [];
11884
- let stickyHeaderDates = getStickyHeaderDates(context.options);
11885
- if (headerRowContent) {
11886
- sections.push({
11887
- type: 'header',
11888
- key: 'header',
11889
- isSticky: stickyHeaderDates,
11890
- chunk: {
11891
- elRef: this.headerElRef,
11892
- tableClassName: 'fc-col-header',
11893
- rowContent: headerRowContent,
11894
- },
11895
- });
11896
- }
11897
- sections.push({
11898
- type: 'body',
11899
- key: 'body',
11900
- liquid: true,
11901
- chunk: { content: bodyContent },
11902
- });
11903
- return (h(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
11904
- h(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections })));
11905
- }
11906
- renderHScrollLayout(headerRowContent, bodyContent, colCnt, dayMinWidth) {
11907
- let ScrollGrid = this.context.pluginHooks.scrollGridImpl;
11908
- if (!ScrollGrid) {
11909
- throw new Error('No ScrollGrid implementation');
11910
- }
11911
- let { props, context } = this;
11912
- let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options);
11913
- let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options);
11914
- let sections = [];
11915
- if (headerRowContent) {
11916
- sections.push({
11917
- type: 'header',
11918
- key: 'header',
11919
- isSticky: stickyHeaderDates,
11920
- chunks: [{
11921
- key: 'main',
11922
- elRef: this.headerElRef,
11923
- tableClassName: 'fc-col-header',
11924
- rowContent: headerRowContent,
11925
- }],
11926
- });
11927
- }
11928
- sections.push({
11929
- type: 'body',
11930
- key: 'body',
11931
- liquid: true,
11932
- chunks: [{
11933
- key: 'main',
11934
- content: bodyContent,
11935
- }],
11936
- });
11937
- if (stickyFooterScrollbar) {
11938
- sections.push({
11939
- type: 'footer',
11940
- key: 'footer',
11941
- isSticky: true,
11942
- chunks: [{
11943
- key: 'main',
11944
- content: renderScrollShim,
11945
- }],
11946
- });
11947
- }
11948
- return (h(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
11949
- h(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections })));
11950
- }
11951
- }
11952
-
11953
11875
  function splitSegsByRow(segs, rowCnt) {
11954
11876
  let byRow = [];
11955
11877
  for (let i = 0; i < rowCnt; i += 1) {
@@ -12080,17 +12002,11 @@ var FullCalendar = (function (exports) {
12080
12002
  }
12081
12003
  render() {
12082
12004
  let { context, props, state, rootElRef } = this;
12083
- let { options } = context;
12005
+ let { options, dateEnv } = context;
12084
12006
  let { date, dateProfile } = props;
12085
12007
  // TODO: memoize this?
12086
- const { currentRange } = dateProfile;
12087
12008
  const isMonthStart = props.showDayNumber &&
12088
- context.viewSpec.singleUnit !== 'month' && // NOT a single-month
12089
- Boolean(
12090
- // first date in current view?
12091
- date.valueOf() === currentRange.start.valueOf() ||
12092
- // a month-start that's within the current range?
12093
- (date.getUTCDate() === 1 && date.valueOf() < currentRange.end.valueOf()));
12009
+ shouldDisplayMonthStart(date, dateProfile.currentRange, dateEnv);
12094
12010
  return (h(DayCellContainer, { elTag: "td", elRef: this.handleRootEl, elClasses: [
12095
12011
  'fc-daygrid-day',
12096
12012
  ...(props.extraClassNames || []),
@@ -12115,6 +12031,21 @@ var FullCalendar = (function (exports) {
12115
12031
  function renderTopInner(props) {
12116
12032
  return props.dayNumberText || h(p, null, "\u00A0");
12117
12033
  }
12034
+ function shouldDisplayMonthStart(date, currentRange, dateEnv) {
12035
+ const { start: currentStart, end: currentEnd } = currentRange;
12036
+ const currentEndIncl = addMs(currentEnd, -1);
12037
+ const currentFirstYear = dateEnv.getYear(currentStart);
12038
+ const currentFirstMonth = dateEnv.getMonth(currentStart);
12039
+ const currentLastYear = dateEnv.getYear(currentEndIncl);
12040
+ const currentLastMonth = dateEnv.getMonth(currentEndIncl);
12041
+ // spans more than one month?
12042
+ return !(currentFirstYear === currentLastYear && currentFirstMonth === currentLastMonth) &&
12043
+ Boolean(
12044
+ // first date in current view?
12045
+ date.valueOf() === currentStart.valueOf() ||
12046
+ // a month-start that's within the current range?
12047
+ (dateEnv.getDay(date) === 1 && date.valueOf() < currentEnd.valueOf()));
12048
+ }
12118
12049
 
12119
12050
  function computeFgSegPlacement(segs, // assumed already sorted
12120
12051
  dayMaxEvents, dayMaxEventRows, strictOrder, eventInstanceHeights, maxContentHeight, cells) {
@@ -12751,30 +12682,6 @@ var FullCalendar = (function (exports) {
12751
12682
  }
12752
12683
  }
12753
12684
 
12754
- class DayTableView extends TableView {
12755
- constructor() {
12756
- super(...arguments);
12757
- this.buildDayTableModel = memoize(buildDayTableModel);
12758
- this.headerRef = y();
12759
- this.tableRef = y();
12760
- // can't override any lifecycle methods from parent
12761
- }
12762
- render() {
12763
- let { options, dateProfileGenerator } = this.context;
12764
- let { props } = this;
12765
- let dayTableModel = this.buildDayTableModel(props.dateProfile, dateProfileGenerator);
12766
- let headerContent = options.dayHeaders && (h(DayHeader, { ref: this.headerRef, dateProfile: props.dateProfile, dates: dayTableModel.headerDates, datesRepDistinctDays: dayTableModel.rowCnt === 1 }));
12767
- let bodyContent = (contentArg) => (h(DayTable, { ref: this.tableRef, dateProfile: props.dateProfile, dayTableModel: dayTableModel, businessHours: props.businessHours, dateSelection: props.dateSelection, eventStore: props.eventStore, eventUiBases: props.eventUiBases, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, colGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }));
12768
- return options.dayMinWidth
12769
- ? this.renderHScrollLayout(headerContent, bodyContent, dayTableModel.colCnt, options.dayMinWidth)
12770
- : this.renderSimpleLayout(headerContent, bodyContent);
12771
- }
12772
- }
12773
- function buildDayTableModel(dateProfile, dateProfileGenerator) {
12774
- let daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator);
12775
- return new DayTableModel(daySeries, /year|month|week/.test(dateProfile.currentRangeUnit));
12776
- }
12777
-
12778
12685
  class TableDateProfileGenerator extends DateProfileGenerator {
12779
12686
  // Computes the date range that will be rendered
12780
12687
  buildRenderRange(currentRange, currentRangeUnit, isRangeAllDay) {
@@ -12813,6 +12720,111 @@ var FullCalendar = (function (exports) {
12813
12720
  return { start, end };
12814
12721
  }
12815
12722
 
12723
+ /* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.
12724
+ ----------------------------------------------------------------------------------------------------------------------*/
12725
+ // It is a manager for a Table subcomponent, which does most of the heavy lifting.
12726
+ // It is responsible for managing width/height.
12727
+ class TableView extends DateComponent {
12728
+ constructor() {
12729
+ super(...arguments);
12730
+ this.headerElRef = y();
12731
+ }
12732
+ renderSimpleLayout(headerRowContent, bodyContent) {
12733
+ let { props, context } = this;
12734
+ let sections = [];
12735
+ let stickyHeaderDates = getStickyHeaderDates(context.options);
12736
+ if (headerRowContent) {
12737
+ sections.push({
12738
+ type: 'header',
12739
+ key: 'header',
12740
+ isSticky: stickyHeaderDates,
12741
+ chunk: {
12742
+ elRef: this.headerElRef,
12743
+ tableClassName: 'fc-col-header',
12744
+ rowContent: headerRowContent,
12745
+ },
12746
+ });
12747
+ }
12748
+ sections.push({
12749
+ type: 'body',
12750
+ key: 'body',
12751
+ liquid: true,
12752
+ chunk: { content: bodyContent },
12753
+ });
12754
+ return (h(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
12755
+ h(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections })));
12756
+ }
12757
+ renderHScrollLayout(headerRowContent, bodyContent, colCnt, dayMinWidth) {
12758
+ let ScrollGrid = this.context.pluginHooks.scrollGridImpl;
12759
+ if (!ScrollGrid) {
12760
+ throw new Error('No ScrollGrid implementation');
12761
+ }
12762
+ let { props, context } = this;
12763
+ let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options);
12764
+ let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options);
12765
+ let sections = [];
12766
+ if (headerRowContent) {
12767
+ sections.push({
12768
+ type: 'header',
12769
+ key: 'header',
12770
+ isSticky: stickyHeaderDates,
12771
+ chunks: [{
12772
+ key: 'main',
12773
+ elRef: this.headerElRef,
12774
+ tableClassName: 'fc-col-header',
12775
+ rowContent: headerRowContent,
12776
+ }],
12777
+ });
12778
+ }
12779
+ sections.push({
12780
+ type: 'body',
12781
+ key: 'body',
12782
+ liquid: true,
12783
+ chunks: [{
12784
+ key: 'main',
12785
+ content: bodyContent,
12786
+ }],
12787
+ });
12788
+ if (stickyFooterScrollbar) {
12789
+ sections.push({
12790
+ type: 'footer',
12791
+ key: 'footer',
12792
+ isSticky: true,
12793
+ chunks: [{
12794
+ key: 'main',
12795
+ content: renderScrollShim,
12796
+ }],
12797
+ });
12798
+ }
12799
+ return (h(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
12800
+ h(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections })));
12801
+ }
12802
+ }
12803
+
12804
+ class DayTableView extends TableView {
12805
+ constructor() {
12806
+ super(...arguments);
12807
+ this.buildDayTableModel = memoize(buildDayTableModel);
12808
+ this.headerRef = y();
12809
+ this.tableRef = y();
12810
+ // can't override any lifecycle methods from parent
12811
+ }
12812
+ render() {
12813
+ let { options, dateProfileGenerator } = this.context;
12814
+ let { props } = this;
12815
+ let dayTableModel = this.buildDayTableModel(props.dateProfile, dateProfileGenerator);
12816
+ let headerContent = options.dayHeaders && (h(DayHeader, { ref: this.headerRef, dateProfile: props.dateProfile, dates: dayTableModel.headerDates, datesRepDistinctDays: dayTableModel.rowCnt === 1 }));
12817
+ let bodyContent = (contentArg) => (h(DayTable, { ref: this.tableRef, dateProfile: props.dateProfile, dayTableModel: dayTableModel, businessHours: props.businessHours, dateSelection: props.dateSelection, eventStore: props.eventStore, eventUiBases: props.eventUiBases, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, colGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }));
12818
+ return options.dayMinWidth
12819
+ ? this.renderHScrollLayout(headerContent, bodyContent, dayTableModel.colCnt, options.dayMinWidth)
12820
+ : this.renderSimpleLayout(headerContent, bodyContent);
12821
+ }
12822
+ }
12823
+ function buildDayTableModel(dateProfile, dateProfileGenerator) {
12824
+ let daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator);
12825
+ return new DayTableModel(daySeries, /year|month|week/.test(dateProfile.currentRangeUnit));
12826
+ }
12827
+
12816
12828
  var css_248z$3 = ":root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:\"\";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:\"\";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}";
12817
12829
  injectStyles(css_248z$3);
12818
12830