@fullcalendar/core 5.10.1 → 5.11.0

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/main.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar v5.10.1
2
+ FullCalendar v5.10.2
3
3
  Docs & License: https://fullcalendar.io/
4
4
  (c) 2021 Adam Shaw
5
5
  */
@@ -36,12 +36,14 @@ var Calendar = /** @class */ (function (_super) {
36
36
  if (_this.isRendering) {
37
37
  _this.isRendered = true;
38
38
  var currentData_1 = _this.currentData;
39
- common.render(common.createElement(common.CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function (classNames, height, isHeightAuto, forPrint) {
40
- _this.setClassNames(classNames);
41
- _this.setHeight(height);
42
- return (common.createElement(common.CustomContentRenderContext.Provider, { value: _this.customContentRenderId },
43
- common.createElement(common.CalendarContent, tslib.__assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData_1))));
44
- }), _this.el);
39
+ common.flushSync(function () {
40
+ common.render(common.createElement(common.CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function (classNames, height, isHeightAuto, forPrint) {
41
+ _this.setClassNames(classNames);
42
+ _this.setHeight(height);
43
+ return (common.createElement(common.CustomContentRenderContext.Provider, { value: _this.customContentRenderId },
44
+ common.createElement(common.CalendarContent, tslib.__assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData_1))));
45
+ }), _this.el);
46
+ });
45
47
  }
46
48
  else if (_this.isRendered) {
47
49
  _this.isRendered = false;
@@ -49,7 +51,6 @@ var Calendar = /** @class */ (function (_super) {
49
51
  _this.setClassNames([]);
50
52
  _this.setHeight('');
51
53
  }
52
- common.flushToDom();
53
54
  };
54
55
  _this.el = el;
55
56
  _this.renderRunner = new common.DelayedRunner(_this.handleRenderRequest);
@@ -87,8 +88,10 @@ var Calendar = /** @class */ (function (_super) {
87
88
  }
88
89
  };
89
90
  Calendar.prototype.updateSize = function () {
90
- _super.prototype.updateSize.call(this);
91
- common.flushToDom();
91
+ var _this = this;
92
+ common.flushSync(function () {
93
+ _super.prototype.updateSize.call(_this);
94
+ });
92
95
  };
93
96
  Calendar.prototype.batchRendering = function (func) {
94
97
  this.renderRunner.pause('batchRendering');
package/main.global.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar v5.10.1
2
+ FullCalendar v5.10.2
3
3
  Docs & License: https://fullcalendar.io/
4
4
  (c) 2021 Adam Shaw
5
5
  */
@@ -77,14 +77,15 @@ var FullCalendar = (function (exports) {
77
77
  Fragment: y,
78
78
  createContext: createContext$1,
79
79
  createPortal: I,
80
- flushToDom: flushToDom$1,
80
+ flushSync: flushSync$1,
81
81
  unmountComponentAtNode: unmountComponentAtNode$1,
82
82
  };
83
83
  }
84
84
  // HACKS...
85
85
  // TODO: lock version
86
86
  // TODO: link gh issues
87
- function flushToDom$1() {
87
+ function flushSync$1(runBeforeFlush) {
88
+ runBeforeFlush();
88
89
  var oldDebounceRendering = n.debounceRendering; // orig
89
90
  var callbackQ = [];
90
91
  function execCallbackSync(callback) {
@@ -5120,7 +5121,7 @@ var FullCalendar = (function (exports) {
5120
5121
  var Fragment = FullCalendarVDom.Fragment;
5121
5122
  var createContext = FullCalendarVDom.createContext;
5122
5123
  var createPortal = FullCalendarVDom.createPortal;
5123
- var flushToDom = FullCalendarVDom.flushToDom;
5124
+ var flushSync = FullCalendarVDom.flushSync;
5124
5125
  var unmountComponentAtNode = FullCalendarVDom.unmountComponentAtNode;
5125
5126
  /* eslint-enable */
5126
5127
 
@@ -8135,11 +8136,14 @@ var FullCalendar = (function (exports) {
8135
8136
  interactionSettingsStore[component.uid] = settings;
8136
8137
  };
8137
8138
  _this.unregisterInteractiveComponent = function (component) {
8138
- for (var _i = 0, _a = _this.interactionsStore[component.uid]; _i < _a.length; _i++) {
8139
- var listener = _a[_i];
8140
- listener.destroy();
8139
+ var listeners = _this.interactionsStore[component.uid];
8140
+ if (listeners) {
8141
+ for (var _i = 0, listeners_1 = listeners; _i < listeners_1.length; _i++) {
8142
+ var listener = listeners_1[_i];
8143
+ listener.destroy();
8144
+ }
8145
+ delete _this.interactionsStore[component.uid];
8141
8146
  }
8142
- delete _this.interactionsStore[component.uid];
8143
8147
  delete interactionSettingsStore[component.uid];
8144
8148
  };
8145
8149
  // Resizing
@@ -9798,7 +9802,7 @@ var FullCalendar = (function (exports) {
9798
9802
 
9799
9803
  // exports
9800
9804
  // --------------------------------------------------------------------------------------------------
9801
- var version = '5.10.1'; // important to type it, so .d.ts has generic string
9805
+ var version = '5.10.2'; // important to type it, so .d.ts has generic string
9802
9806
 
9803
9807
  var Calendar = /** @class */ (function (_super) {
9804
9808
  __extends(Calendar, _super);
@@ -9825,12 +9829,14 @@ var FullCalendar = (function (exports) {
9825
9829
  if (_this.isRendering) {
9826
9830
  _this.isRendered = true;
9827
9831
  var currentData_1 = _this.currentData;
9828
- render(createElement(CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function (classNames, height, isHeightAuto, forPrint) {
9829
- _this.setClassNames(classNames);
9830
- _this.setHeight(height);
9831
- return (createElement(CustomContentRenderContext.Provider, { value: _this.customContentRenderId },
9832
- createElement(CalendarContent, __assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData_1))));
9833
- }), _this.el);
9832
+ flushSync(function () {
9833
+ render(createElement(CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function (classNames, height, isHeightAuto, forPrint) {
9834
+ _this.setClassNames(classNames);
9835
+ _this.setHeight(height);
9836
+ return (createElement(CustomContentRenderContext.Provider, { value: _this.customContentRenderId },
9837
+ createElement(CalendarContent, __assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData_1))));
9838
+ }), _this.el);
9839
+ });
9834
9840
  }
9835
9841
  else if (_this.isRendered) {
9836
9842
  _this.isRendered = false;
@@ -9838,7 +9844,6 @@ var FullCalendar = (function (exports) {
9838
9844
  _this.setClassNames([]);
9839
9845
  _this.setHeight('');
9840
9846
  }
9841
- flushToDom();
9842
9847
  };
9843
9848
  _this.el = el;
9844
9849
  _this.renderRunner = new DelayedRunner(_this.handleRenderRequest);
@@ -9876,8 +9881,10 @@ var FullCalendar = (function (exports) {
9876
9881
  }
9877
9882
  };
9878
9883
  Calendar.prototype.updateSize = function () {
9879
- _super.prototype.updateSize.call(this);
9880
- flushToDom();
9884
+ var _this = this;
9885
+ flushSync(function () {
9886
+ _super.prototype.updateSize.call(_this);
9887
+ });
9881
9888
  };
9882
9889
  Calendar.prototype.batchRendering = function (func) {
9883
9890
  this.renderRunner.pause('batchRendering');
@@ -10038,7 +10045,7 @@ var FullCalendar = (function (exports) {
10038
10045
  exports.findDirectChildren = findDirectChildren;
10039
10046
  exports.findElements = findElements;
10040
10047
  exports.flexibleCompare = flexibleCompare;
10041
- exports.flushToDom = flushToDom;
10048
+ exports.flushSync = flushSync;
10042
10049
  exports.formatDate = formatDate;
10043
10050
  exports.formatDayString = formatDayString;
10044
10051
  exports.formatIsoTimeString = formatIsoTimeString;