@fullcalendar/daygrid 6.0.0-beta.2 → 6.0.0-beta.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 Day Grid Plugin v6.0.0-beta.2
2
+ FullCalendar Day Grid Plugin v6.0.0-beta.4
3
3
  Docs & License: https://fullcalendar.io/
4
4
  (c) 2022 Adam Shaw
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar Day Grid Plugin v6.0.0-beta.2
2
+ FullCalendar Day Grid Plugin v6.0.0-beta.4
3
3
  Docs & License: https://fullcalendar.io/
4
4
  (c) 2022 Adam Shaw
5
5
  */
package/internal.cjs CHANGED
@@ -5,87 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var internal_cjs = require('@fullcalendar/core/internal.cjs');
6
6
  var preact_cjs = require('@fullcalendar/core/preact.cjs');
7
7
 
8
- /* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.
9
- ----------------------------------------------------------------------------------------------------------------------*/
10
- // It is a manager for a Table subcomponent, which does most of the heavy lifting.
11
- // It is responsible for managing width/height.
12
- class TableView extends internal_cjs.DateComponent {
13
- constructor() {
14
- super(...arguments);
15
- this.headerElRef = preact_cjs.createRef();
16
- }
17
- renderSimpleLayout(headerRowContent, bodyContent) {
18
- let { props, context } = this;
19
- let sections = [];
20
- let stickyHeaderDates = internal_cjs.getStickyHeaderDates(context.options);
21
- if (headerRowContent) {
22
- sections.push({
23
- type: 'header',
24
- key: 'header',
25
- isSticky: stickyHeaderDates,
26
- chunk: {
27
- elRef: this.headerElRef,
28
- tableClassName: 'fc-col-header',
29
- rowContent: headerRowContent,
30
- },
31
- });
32
- }
33
- sections.push({
34
- type: 'body',
35
- key: 'body',
36
- liquid: true,
37
- chunk: { content: bodyContent },
38
- });
39
- return (preact_cjs.createElement(internal_cjs.ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
40
- preact_cjs.createElement(internal_cjs.SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections })));
41
- }
42
- renderHScrollLayout(headerRowContent, bodyContent, colCnt, dayMinWidth) {
43
- let ScrollGrid = this.context.pluginHooks.scrollGridImpl;
44
- if (!ScrollGrid) {
45
- throw new Error('No ScrollGrid implementation');
46
- }
47
- let { props, context } = this;
48
- let stickyHeaderDates = !props.forPrint && internal_cjs.getStickyHeaderDates(context.options);
49
- let stickyFooterScrollbar = !props.forPrint && internal_cjs.getStickyFooterScrollbar(context.options);
50
- let sections = [];
51
- if (headerRowContent) {
52
- sections.push({
53
- type: 'header',
54
- key: 'header',
55
- isSticky: stickyHeaderDates,
56
- chunks: [{
57
- key: 'main',
58
- elRef: this.headerElRef,
59
- tableClassName: 'fc-col-header',
60
- rowContent: headerRowContent,
61
- }],
62
- });
63
- }
64
- sections.push({
65
- type: 'body',
66
- key: 'body',
67
- liquid: true,
68
- chunks: [{
69
- key: 'main',
70
- content: bodyContent,
71
- }],
72
- });
73
- if (stickyFooterScrollbar) {
74
- sections.push({
75
- type: 'footer',
76
- key: 'footer',
77
- isSticky: true,
78
- chunks: [{
79
- key: 'main',
80
- content: internal_cjs.renderScrollShim,
81
- }],
82
- });
83
- }
84
- return (preact_cjs.createElement(internal_cjs.ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
85
- preact_cjs.createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections })));
86
- }
87
- }
88
-
89
8
  function splitSegsByRow(segs, rowCnt) {
90
9
  let byRow = [];
91
10
  for (let i = 0; i < rowCnt; i += 1) {
@@ -794,6 +713,87 @@ class DayTable extends internal_cjs.DateComponent {
794
713
  }
795
714
  }
796
715
 
716
+ /* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.
717
+ ----------------------------------------------------------------------------------------------------------------------*/
718
+ // It is a manager for a Table subcomponent, which does most of the heavy lifting.
719
+ // It is responsible for managing width/height.
720
+ class TableView extends internal_cjs.DateComponent {
721
+ constructor() {
722
+ super(...arguments);
723
+ this.headerElRef = preact_cjs.createRef();
724
+ }
725
+ renderSimpleLayout(headerRowContent, bodyContent) {
726
+ let { props, context } = this;
727
+ let sections = [];
728
+ let stickyHeaderDates = internal_cjs.getStickyHeaderDates(context.options);
729
+ if (headerRowContent) {
730
+ sections.push({
731
+ type: 'header',
732
+ key: 'header',
733
+ isSticky: stickyHeaderDates,
734
+ chunk: {
735
+ elRef: this.headerElRef,
736
+ tableClassName: 'fc-col-header',
737
+ rowContent: headerRowContent,
738
+ },
739
+ });
740
+ }
741
+ sections.push({
742
+ type: 'body',
743
+ key: 'body',
744
+ liquid: true,
745
+ chunk: { content: bodyContent },
746
+ });
747
+ return (preact_cjs.createElement(internal_cjs.ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
748
+ preact_cjs.createElement(internal_cjs.SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections })));
749
+ }
750
+ renderHScrollLayout(headerRowContent, bodyContent, colCnt, dayMinWidth) {
751
+ let ScrollGrid = this.context.pluginHooks.scrollGridImpl;
752
+ if (!ScrollGrid) {
753
+ throw new Error('No ScrollGrid implementation');
754
+ }
755
+ let { props, context } = this;
756
+ let stickyHeaderDates = !props.forPrint && internal_cjs.getStickyHeaderDates(context.options);
757
+ let stickyFooterScrollbar = !props.forPrint && internal_cjs.getStickyFooterScrollbar(context.options);
758
+ let sections = [];
759
+ if (headerRowContent) {
760
+ sections.push({
761
+ type: 'header',
762
+ key: 'header',
763
+ isSticky: stickyHeaderDates,
764
+ chunks: [{
765
+ key: 'main',
766
+ elRef: this.headerElRef,
767
+ tableClassName: 'fc-col-header',
768
+ rowContent: headerRowContent,
769
+ }],
770
+ });
771
+ }
772
+ sections.push({
773
+ type: 'body',
774
+ key: 'body',
775
+ liquid: true,
776
+ chunks: [{
777
+ key: 'main',
778
+ content: bodyContent,
779
+ }],
780
+ });
781
+ if (stickyFooterScrollbar) {
782
+ sections.push({
783
+ type: 'footer',
784
+ key: 'footer',
785
+ isSticky: true,
786
+ chunks: [{
787
+ key: 'main',
788
+ content: internal_cjs.renderScrollShim,
789
+ }],
790
+ });
791
+ }
792
+ return (preact_cjs.createElement(internal_cjs.ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
793
+ preact_cjs.createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections })));
794
+ }
795
+ }
796
+
797
797
  class DayTableView extends TableView {
798
798
  constructor() {
799
799
  super(...arguments);
package/internal.js CHANGED
@@ -1,86 +1,5 @@
1
- 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';
2
- import { createRef, createElement, Fragment } from '@fullcalendar/core/preact.js';
3
-
4
- /* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.
5
- ----------------------------------------------------------------------------------------------------------------------*/
6
- // It is a manager for a Table subcomponent, which does most of the heavy lifting.
7
- // It is responsible for managing width/height.
8
- class TableView extends DateComponent {
9
- constructor() {
10
- super(...arguments);
11
- this.headerElRef = createRef();
12
- }
13
- renderSimpleLayout(headerRowContent, bodyContent) {
14
- let { props, context } = this;
15
- let sections = [];
16
- let stickyHeaderDates = getStickyHeaderDates(context.options);
17
- if (headerRowContent) {
18
- sections.push({
19
- type: 'header',
20
- key: 'header',
21
- isSticky: stickyHeaderDates,
22
- chunk: {
23
- elRef: this.headerElRef,
24
- tableClassName: 'fc-col-header',
25
- rowContent: headerRowContent,
26
- },
27
- });
28
- }
29
- sections.push({
30
- type: 'body',
31
- key: 'body',
32
- liquid: true,
33
- chunk: { content: bodyContent },
34
- });
35
- return (createElement(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
36
- createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections })));
37
- }
38
- renderHScrollLayout(headerRowContent, bodyContent, colCnt, dayMinWidth) {
39
- let ScrollGrid = this.context.pluginHooks.scrollGridImpl;
40
- if (!ScrollGrid) {
41
- throw new Error('No ScrollGrid implementation');
42
- }
43
- let { props, context } = this;
44
- let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options);
45
- let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options);
46
- let sections = [];
47
- if (headerRowContent) {
48
- sections.push({
49
- type: 'header',
50
- key: 'header',
51
- isSticky: stickyHeaderDates,
52
- chunks: [{
53
- key: 'main',
54
- elRef: this.headerElRef,
55
- tableClassName: 'fc-col-header',
56
- rowContent: headerRowContent,
57
- }],
58
- });
59
- }
60
- sections.push({
61
- type: 'body',
62
- key: 'body',
63
- liquid: true,
64
- chunks: [{
65
- key: 'main',
66
- content: bodyContent,
67
- }],
68
- });
69
- if (stickyFooterScrollbar) {
70
- sections.push({
71
- type: 'footer',
72
- key: 'footer',
73
- isSticky: true,
74
- chunks: [{
75
- key: 'main',
76
- content: renderScrollShim,
77
- }],
78
- });
79
- }
80
- return (createElement(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
81
- createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections })));
82
- }
83
- }
1
+ 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';
2
+ import { createElement, Fragment, createRef } from '@fullcalendar/core/preact.js';
84
3
 
85
4
  function splitSegsByRow(segs, rowCnt) {
86
5
  let byRow = [];
@@ -790,6 +709,87 @@ class DayTable extends DateComponent {
790
709
  }
791
710
  }
792
711
 
712
+ /* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.
713
+ ----------------------------------------------------------------------------------------------------------------------*/
714
+ // It is a manager for a Table subcomponent, which does most of the heavy lifting.
715
+ // It is responsible for managing width/height.
716
+ class TableView extends DateComponent {
717
+ constructor() {
718
+ super(...arguments);
719
+ this.headerElRef = createRef();
720
+ }
721
+ renderSimpleLayout(headerRowContent, bodyContent) {
722
+ let { props, context } = this;
723
+ let sections = [];
724
+ let stickyHeaderDates = getStickyHeaderDates(context.options);
725
+ if (headerRowContent) {
726
+ sections.push({
727
+ type: 'header',
728
+ key: 'header',
729
+ isSticky: stickyHeaderDates,
730
+ chunk: {
731
+ elRef: this.headerElRef,
732
+ tableClassName: 'fc-col-header',
733
+ rowContent: headerRowContent,
734
+ },
735
+ });
736
+ }
737
+ sections.push({
738
+ type: 'body',
739
+ key: 'body',
740
+ liquid: true,
741
+ chunk: { content: bodyContent },
742
+ });
743
+ return (createElement(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
744
+ createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections })));
745
+ }
746
+ renderHScrollLayout(headerRowContent, bodyContent, colCnt, dayMinWidth) {
747
+ let ScrollGrid = this.context.pluginHooks.scrollGridImpl;
748
+ if (!ScrollGrid) {
749
+ throw new Error('No ScrollGrid implementation');
750
+ }
751
+ let { props, context } = this;
752
+ let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options);
753
+ let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options);
754
+ let sections = [];
755
+ if (headerRowContent) {
756
+ sections.push({
757
+ type: 'header',
758
+ key: 'header',
759
+ isSticky: stickyHeaderDates,
760
+ chunks: [{
761
+ key: 'main',
762
+ elRef: this.headerElRef,
763
+ tableClassName: 'fc-col-header',
764
+ rowContent: headerRowContent,
765
+ }],
766
+ });
767
+ }
768
+ sections.push({
769
+ type: 'body',
770
+ key: 'body',
771
+ liquid: true,
772
+ chunks: [{
773
+ key: 'main',
774
+ content: bodyContent,
775
+ }],
776
+ });
777
+ if (stickyFooterScrollbar) {
778
+ sections.push({
779
+ type: 'footer',
780
+ key: 'footer',
781
+ isSticky: true,
782
+ chunks: [{
783
+ key: 'main',
784
+ content: renderScrollShim,
785
+ }],
786
+ });
787
+ }
788
+ return (createElement(ViewContainer, { elClasses: ['fc-daygrid'], viewSpec: context.viewSpec },
789
+ createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections })));
790
+ }
791
+ }
792
+
793
793
  class DayTableView extends TableView {
794
794
  constructor() {
795
795
  super(...arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullcalendar/daygrid",
3
- "version": "6.0.0-beta.2",
3
+ "version": "6.0.0-beta.4",
4
4
  "keywords": [
5
5
  "calendar",
6
6
  "event",
@@ -26,29 +26,29 @@
26
26
  "title": "FullCalendar Day Grid Plugin",
27
27
  "description": "Display events on Month view or DayGrid view",
28
28
  "peerDependencies": {
29
- "@fullcalendar/core": "6.0.0-beta.2"
29
+ "@fullcalendar/core": "6.0.0-beta.4"
30
30
  },
31
31
  "main": "./index.cjs",
32
32
  "module": "./index.js",
33
33
  "types": "./index.d.ts",
34
34
  "unpkg": "./index.global.min.js",
35
- "jsdelvr": "./index.global.min.js",
35
+ "jsdelivr": "./index.global.min.js",
36
36
  "exports": {
37
37
  "./package.json": "./package.json",
38
38
  "./index.cjs": "./index.cjs",
39
39
  "./index.js": "./index.js",
40
40
  ".": {
41
- "require": "./index.cjs",
42
- "import": "./index.js",
43
41
  "types": "./index.d.ts",
44
- "default": "./index.global.js"
42
+ "require": "./index.cjs",
43
+ "import": "./index.js"
45
44
  },
46
45
  "./internal.cjs": "./internal.cjs",
47
46
  "./internal.js": "./internal.js",
48
47
  "./internal": {
48
+ "types": "./internal.d.ts",
49
49
  "require": "./internal.cjs",
50
- "import": "./internal.js",
51
- "types": "./internal.d.ts"
50
+ "import": "./internal.js"
52
51
  }
53
- }
52
+ },
53
+ "sideEffects": false
54
54
  }