@fullcalendar/core 5.10.1 → 6.0.0-beta.1

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.js CHANGED
@@ -1,71 +1,63 @@
1
1
  /*!
2
- FullCalendar v5.10.1
2
+ FullCalendar v6.0.0-beta.1
3
3
  Docs & License: https://fullcalendar.io/
4
- (c) 2021 Adam Shaw
4
+ (c) 2022 Adam Shaw
5
5
  */
6
6
  import './vdom.js';
7
- import { __extends, __assign } from 'tslib';
8
- import { render, createElement, CalendarRoot, CustomContentRenderContext, CalendarContent, unmountComponentAtNode, flushToDom, DelayedRunner, CalendarDataManager, isArraysEqual, applyStyleProp, CalendarApi } from '@fullcalendar/common';
7
+ import { CalendarApi, flushSync, render, createElement, CalendarRoot, CustomContentRenderContext, CalendarContent, unmountComponentAtNode, DelayedRunner, CalendarDataManager, isArraysEqual, applyStyleProp } from '@fullcalendar/common';
9
8
  export * from '@fullcalendar/common';
10
9
 
11
- var Calendar = /** @class */ (function (_super) {
12
- __extends(Calendar, _super);
13
- function Calendar(el, optionOverrides) {
14
- if (optionOverrides === void 0) { optionOverrides = {}; }
15
- var _this = _super.call(this) || this;
16
- _this.isRendering = false;
17
- _this.isRendered = false;
18
- _this.currentClassNames = [];
19
- _this.customContentRenderId = 0; // will affect custom generated classNames?
20
- _this.handleAction = function (action) {
10
+ class Calendar extends CalendarApi {
11
+ constructor(el, optionOverrides = {}) {
12
+ super();
13
+ this.isRendering = false;
14
+ this.isRendered = false;
15
+ this.currentClassNames = [];
16
+ this.customContentRenderId = 0; // will affect custom generated classNames?
17
+ this.handleAction = (action) => {
21
18
  // actions we know we want to render immediately
22
19
  switch (action.type) {
23
20
  case 'SET_EVENT_DRAG':
24
21
  case 'SET_EVENT_RESIZE':
25
- _this.renderRunner.tryDrain();
22
+ this.renderRunner.tryDrain();
26
23
  }
27
24
  };
28
- _this.handleData = function (data) {
29
- _this.currentData = data;
30
- _this.renderRunner.request(data.calendarOptions.rerenderDelay);
25
+ this.handleData = (data) => {
26
+ this.currentData = data;
27
+ this.renderRunner.request(data.calendarOptions.rerenderDelay);
31
28
  };
32
- _this.handleRenderRequest = function () {
33
- if (_this.isRendering) {
34
- _this.isRendered = true;
35
- var currentData_1 = _this.currentData;
36
- render(createElement(CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function (classNames, height, isHeightAuto, forPrint) {
37
- _this.setClassNames(classNames);
38
- _this.setHeight(height);
39
- return (createElement(CustomContentRenderContext.Provider, { value: _this.customContentRenderId },
40
- createElement(CalendarContent, __assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData_1))));
41
- }), _this.el);
29
+ this.handleRenderRequest = () => {
30
+ if (this.isRendering) {
31
+ this.isRendered = true;
32
+ let { currentData } = this;
33
+ flushSync(() => {
34
+ render(createElement(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, isHeightAuto, forPrint) => {
35
+ this.setClassNames(classNames);
36
+ this.setHeight(height);
37
+ return (createElement(CustomContentRenderContext.Provider, { value: this.customContentRenderId },
38
+ createElement(CalendarContent, Object.assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData))));
39
+ }), this.el);
40
+ });
42
41
  }
43
- else if (_this.isRendered) {
44
- _this.isRendered = false;
45
- unmountComponentAtNode(_this.el);
46
- _this.setClassNames([]);
47
- _this.setHeight('');
42
+ else if (this.isRendered) {
43
+ this.isRendered = false;
44
+ unmountComponentAtNode(this.el);
45
+ this.setClassNames([]);
46
+ this.setHeight('');
48
47
  }
49
- flushToDom();
50
48
  };
51
- _this.el = el;
52
- _this.renderRunner = new DelayedRunner(_this.handleRenderRequest);
49
+ this.el = el;
50
+ this.renderRunner = new DelayedRunner(this.handleRenderRequest);
53
51
  new CalendarDataManager({
54
- optionOverrides: optionOverrides,
55
- calendarApi: _this,
56
- onAction: _this.handleAction,
57
- onData: _this.handleData,
52
+ optionOverrides,
53
+ calendarApi: this,
54
+ onAction: this.handleAction,
55
+ onData: this.handleData,
58
56
  });
59
- return _this;
60
57
  }
61
- Object.defineProperty(Calendar.prototype, "view", {
62
- get: function () { return this.currentData.viewApi; } // for public API
63
- ,
64
- enumerable: false,
65
- configurable: true
66
- });
67
- Calendar.prototype.render = function () {
68
- var wasRendering = this.isRendering;
58
+ get view() { return this.currentData.viewApi; } // for public API
59
+ render() {
60
+ let wasRendering = this.isRendering;
69
61
  if (!wasRendering) {
70
62
  this.isRendering = true;
71
63
  }
@@ -76,50 +68,48 @@ var Calendar = /** @class */ (function (_super) {
76
68
  if (wasRendering) {
77
69
  this.updateSize();
78
70
  }
79
- };
80
- Calendar.prototype.destroy = function () {
71
+ }
72
+ destroy() {
81
73
  if (this.isRendering) {
82
74
  this.isRendering = false;
83
75
  this.renderRunner.request();
84
76
  }
85
- };
86
- Calendar.prototype.updateSize = function () {
87
- _super.prototype.updateSize.call(this);
88
- flushToDom();
89
- };
90
- Calendar.prototype.batchRendering = function (func) {
77
+ }
78
+ updateSize() {
79
+ flushSync(() => {
80
+ super.updateSize();
81
+ });
82
+ }
83
+ batchRendering(func) {
91
84
  this.renderRunner.pause('batchRendering');
92
85
  func();
93
86
  this.renderRunner.resume('batchRendering');
94
- };
95
- Calendar.prototype.pauseRendering = function () {
87
+ }
88
+ pauseRendering() {
96
89
  this.renderRunner.pause('pauseRendering');
97
- };
98
- Calendar.prototype.resumeRendering = function () {
90
+ }
91
+ resumeRendering() {
99
92
  this.renderRunner.resume('pauseRendering', true);
100
- };
101
- Calendar.prototype.resetOptions = function (optionOverrides, append) {
93
+ }
94
+ resetOptions(optionOverrides, append) {
102
95
  this.currentDataManager.resetOptions(optionOverrides, append);
103
- };
104
- Calendar.prototype.setClassNames = function (classNames) {
96
+ }
97
+ setClassNames(classNames) {
105
98
  if (!isArraysEqual(classNames, this.currentClassNames)) {
106
- var classList = this.el.classList;
107
- for (var _i = 0, _a = this.currentClassNames; _i < _a.length; _i++) {
108
- var className = _a[_i];
99
+ let { classList } = this.el;
100
+ for (let className of this.currentClassNames) {
109
101
  classList.remove(className);
110
102
  }
111
- for (var _b = 0, classNames_1 = classNames; _b < classNames_1.length; _b++) {
112
- var className = classNames_1[_b];
103
+ for (let className of classNames) {
113
104
  classList.add(className);
114
105
  }
115
106
  this.currentClassNames = classNames;
116
107
  }
117
- };
118
- Calendar.prototype.setHeight = function (height) {
108
+ }
109
+ setHeight(height) {
119
110
  applyStyleProp(this.el, 'height', height);
120
- };
121
- return Calendar;
122
- }(CalendarApi));
111
+ }
112
+ }
123
113
 
124
114
  export { Calendar };
125
115
  //# sourceMappingURL=main.js.map
package/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["src/Calendar.tsx"],"sourcesContent":["import {\n CalendarOptions, Action, CalendarContent, render, createElement, DelayedRunner, CssDimValue, applyStyleProp,\n CalendarApi, CalendarRoot, isArraysEqual, CalendarDataManager, CalendarData,\n CustomContentRenderContext, flushToDom, unmountComponentAtNode,\n} from '@fullcalendar/common'\n\nexport class Calendar extends CalendarApi {\n currentData: CalendarData\n renderRunner: DelayedRunner\n el: HTMLElement\n isRendering = false\n isRendered = false\n currentClassNames: string[] = []\n customContentRenderId = 0 // will affect custom generated classNames?\n\n get view() { return this.currentData.viewApi } // for public API\n\n constructor(el: HTMLElement, optionOverrides: CalendarOptions = {}) {\n super()\n\n this.el = el\n this.renderRunner = new DelayedRunner(this.handleRenderRequest)\n\n new CalendarDataManager({ // eslint-disable-line no-new\n optionOverrides,\n calendarApi: this,\n onAction: this.handleAction,\n onData: this.handleData,\n })\n }\n\n handleAction = (action: Action) => {\n // actions we know we want to render immediately\n switch (action.type) {\n case 'SET_EVENT_DRAG':\n case 'SET_EVENT_RESIZE':\n this.renderRunner.tryDrain()\n }\n }\n\n handleData = (data: CalendarData) => {\n this.currentData = data\n this.renderRunner.request(data.calendarOptions.rerenderDelay)\n }\n\n handleRenderRequest = () => {\n if (this.isRendering) {\n this.isRendered = true\n let { currentData } = this\n\n render(\n <CalendarRoot options={currentData.calendarOptions} theme={currentData.theme} emitter={currentData.emitter}>\n {(classNames, height, isHeightAuto, forPrint) => {\n this.setClassNames(classNames)\n this.setHeight(height)\n\n return (\n <CustomContentRenderContext.Provider value={this.customContentRenderId}>\n <CalendarContent\n isHeightAuto={isHeightAuto}\n forPrint={forPrint}\n {...currentData}\n />\n </CustomContentRenderContext.Provider>\n )\n }}\n </CalendarRoot>,\n this.el,\n )\n } else if (this.isRendered) {\n this.isRendered = false\n unmountComponentAtNode(this.el)\n this.setClassNames([])\n this.setHeight('')\n }\n\n flushToDom()\n }\n\n render() {\n let wasRendering = this.isRendering\n\n if (!wasRendering) {\n this.isRendering = true\n } else {\n this.customContentRenderId += 1\n }\n\n this.renderRunner.request()\n\n if (wasRendering) {\n this.updateSize()\n }\n }\n\n destroy() {\n if (this.isRendering) {\n this.isRendering = false\n this.renderRunner.request()\n }\n }\n\n updateSize() {\n super.updateSize()\n flushToDom()\n }\n\n batchRendering(func) {\n this.renderRunner.pause('batchRendering')\n func()\n this.renderRunner.resume('batchRendering')\n }\n\n pauseRendering() { // available to plugins\n this.renderRunner.pause('pauseRendering')\n }\n\n resumeRendering() { // available to plugins\n this.renderRunner.resume('pauseRendering', true)\n }\n\n resetOptions(optionOverrides, append?) {\n this.currentDataManager.resetOptions(optionOverrides, append)\n }\n\n setClassNames(classNames: string[]) {\n if (!isArraysEqual(classNames, this.currentClassNames)) {\n let { classList } = this.el\n\n for (let className of this.currentClassNames) {\n classList.remove(className)\n }\n\n for (let className of classNames) {\n classList.add(className)\n }\n\n this.currentClassNames = classNames\n }\n }\n\n setHeight(height: CssDimValue) {\n applyStyleProp(this.el, 'height', height)\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;IAM8B,4BAAW;IAWvC,kBAAY,EAAe,EAAE,eAAqC;QAArC,gCAAA,EAAA,oBAAqC;QAAlE,YACE,iBAAO,SAWR;QAnBD,iBAAW,GAAG,KAA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,CAAC,YAAY,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAA;KAC3C;IAED,iCAAc,GAAd;QACE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;KAC1C;IAED,kCAAe,GAAf;QACE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAA;KACjD;IAED,+BAAY,GAAZ,UAAa,eAAe,EAAE,MAAO;QACnC,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;KAC9D;IAED,gCAAa,GAAb,UAAc,UAAoB;QAChC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,iBAAiB,CAAC,EAAE;YAChD,IAAA,SAAS,GAAK,IAAI,CAAC,EAAE,UAAZ,CAAY;YAE3B,KAAsB,UAAsB,EAAtB,KAAA,IAAI,CAAC,iBAAiB,EAAtB,cAAsB,EAAtB,IAAsB,EAAE;gBAAzC,IAAI,SAAS,SAAA;gBAChB,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;aAC5B;YAED,KAAsB,UAAU,EAAV,yBAAU,EAAV,wBAAU,EAAV,IAAU,EAAE;gBAA7B,IAAI,SAAS,mBAAA;gBAChB,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;aACzB;YAED,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAA;SACpC;KACF;IAED,4BAAS,GAAT,UAAU,MAAmB;QAC3B,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;KAC1C;IACH,eAAC;AAAD,CA1IA,CAA8B,WAAW;;;;"}
1
+ {"version":3,"file":"main.js","sources":["src/Calendar.tsx"],"sourcesContent":["import {\n CalendarOptions, Action, CalendarContent, render, createElement, DelayedRunner, CssDimValue, applyStyleProp,\n CalendarApi, CalendarRoot, isArraysEqual, CalendarDataManager, CalendarData,\n CustomContentRenderContext, flushSync, unmountComponentAtNode,\n} from '@fullcalendar/common'\n\nexport class Calendar extends CalendarApi {\n currentData: CalendarData\n renderRunner: DelayedRunner\n el: HTMLElement\n isRendering = false\n isRendered = false\n currentClassNames: string[] = []\n customContentRenderId = 0 // will affect custom generated classNames?\n\n get view() { return this.currentData.viewApi } // for public API\n\n constructor(el: HTMLElement, optionOverrides: CalendarOptions = {}) {\n super()\n\n this.el = el\n this.renderRunner = new DelayedRunner(this.handleRenderRequest)\n\n new CalendarDataManager({ // eslint-disable-line no-new\n optionOverrides,\n calendarApi: this,\n onAction: this.handleAction,\n onData: this.handleData,\n })\n }\n\n handleAction = (action: Action) => {\n // actions we know we want to render immediately\n switch (action.type) {\n case 'SET_EVENT_DRAG':\n case 'SET_EVENT_RESIZE':\n this.renderRunner.tryDrain()\n }\n }\n\n handleData = (data: CalendarData) => {\n this.currentData = data\n this.renderRunner.request(data.calendarOptions.rerenderDelay)\n }\n\n handleRenderRequest = () => {\n if (this.isRendering) {\n this.isRendered = true\n let { currentData } = this\n\n flushSync(() => {\n render(\n <CalendarRoot options={currentData.calendarOptions} theme={currentData.theme} emitter={currentData.emitter}>\n {(classNames, height, isHeightAuto, forPrint) => {\n this.setClassNames(classNames)\n this.setHeight(height)\n\n return (\n <CustomContentRenderContext.Provider value={this.customContentRenderId}>\n <CalendarContent\n isHeightAuto={isHeightAuto}\n forPrint={forPrint}\n {...currentData}\n />\n </CustomContentRenderContext.Provider>\n )\n }}\n </CalendarRoot>,\n this.el,\n )\n })\n } else if (this.isRendered) {\n this.isRendered = false\n unmountComponentAtNode(this.el)\n this.setClassNames([])\n this.setHeight('')\n }\n }\n\n render() {\n let wasRendering = this.isRendering\n\n if (!wasRendering) {\n this.isRendering = true\n } else {\n this.customContentRenderId += 1\n }\n\n this.renderRunner.request()\n\n if (wasRendering) {\n this.updateSize()\n }\n }\n\n destroy() {\n if (this.isRendering) {\n this.isRendering = false\n this.renderRunner.request()\n }\n }\n\n updateSize() {\n flushSync(() => {\n super.updateSize()\n })\n }\n\n batchRendering(func) {\n this.renderRunner.pause('batchRendering')\n func()\n this.renderRunner.resume('batchRendering')\n }\n\n pauseRendering() { // available to plugins\n this.renderRunner.pause('pauseRendering')\n }\n\n resumeRendering() { // available to plugins\n this.renderRunner.resume('pauseRendering', true)\n }\n\n resetOptions(optionOverrides, append?) {\n this.currentDataManager.resetOptions(optionOverrides, append)\n }\n\n setClassNames(classNames: string[]) {\n if (!isArraysEqual(classNames, this.currentClassNames)) {\n let { classList } = this.el\n\n for (let className of this.currentClassNames) {\n classList.remove(className)\n }\n\n for (let className of classNames) {\n classList.add(className)\n }\n\n this.currentClassNames = classNames\n }\n }\n\n setHeight(height: CssDimValue) {\n applyStyleProp(this.el, 'height', height)\n }\n}\n"],"names":[],"mappings":";;;;;;;;;MAMa,QAAS,SAAQ,WAAW;IAWvC,YAAY,EAAe,EAAE,kBAAmC,EAAE;QAChE,KAAK,EAAE,CAAA;QART,gBAAW,GAAG,KAAK,CAAA;QACnB,eAAU,GAAG,KAAK,CAAA;QAClB,sBAAiB,GAAa,EAAE,CAAA;QAChC,0BAAqB,GAAG,CAAC,CAAA;QAkBzB,iBAAY,GAAG,CAAC,MAAc;;YAE5B,QAAQ,MAAM,CAAC,IAAI;gBACjB,KAAK,gBAAgB,CAAC;gBACtB,KAAK,kBAAkB;oBACrB,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAA;aAC/B;SACF,CAAA;QAED,eAAU,GAAG,CAAC,IAAkB;YAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA;YACvB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAAA;SAC9D,CAAA;QAED,wBAAmB,GAAG;YACpB,IAAI,IAAI,CAAC,WAAW,EAAE;gBACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;gBACtB,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,CAAA;gBAE1B,SAAS,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,IAAI,UAAU,EAAE;gBAChC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;aACzB;YAED,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAA;SACpC;KACF;IAED,SAAS,CAAC,MAAmB;QAC3B,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;KAC1C;;;;;"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@fullcalendar/core",
3
- "version": "5.10.1",
3
+ "version": "6.0.0-beta.1",
4
4
  "title": "FullCalendar Core Package",
5
5
  "description": "Provides core functionality, including the Calendar class",
6
6
  "docs": "https://fullcalendar.io/docs/initialize-es6",
7
7
  "dependencies": {
8
- "@fullcalendar/common": "~5.10.1",
8
+ "@fullcalendar/common": "6.0.0-beta.1",
9
9
  "preact": "^10.0.5",
10
10
  "tslib": "^2.1.0"
11
11
  },
@@ -29,6 +29,6 @@
29
29
  "url": "http://arshaw.com/"
30
30
  },
31
31
  "devDependencies": {
32
- "@fullcalendar/core-preact": "5.10.1"
32
+ "@fullcalendar/core-preact": "6.0.0-beta.1"
33
33
  }
34
34
  }
package/vdom.cjs.js CHANGED
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var tslib = require('tslib');
4
3
  var preact = require('preact');
5
4
  var preactCompat = require('preact/compat');
6
5
 
@@ -27,7 +26,7 @@ function _interopNamespace(e) {
27
26
  var preact__namespace = /*#__PURE__*/_interopNamespace(preact);
28
27
  var preactCompat__namespace = /*#__PURE__*/_interopNamespace(preactCompat);
29
28
 
30
- var globalObj = typeof globalThis !== 'undefined' ? globalThis : window; // // TODO: streamline when killing IE11 support
29
+ let globalObj = typeof globalThis !== 'undefined' ? globalThis : window; // // TODO: streamline when killing IE11 support
31
30
  if (globalObj.FullCalendarVDom) {
32
31
  console.warn('FullCalendar VDOM already loaded');
33
32
  }
@@ -38,18 +37,19 @@ else {
38
37
  render: preact__namespace.render,
39
38
  createRef: preact__namespace.createRef,
40
39
  Fragment: preact__namespace.Fragment,
41
- createContext: createContext,
40
+ createContext,
42
41
  createPortal: preactCompat__namespace.createPortal,
43
- flushToDom: flushToDom,
44
- unmountComponentAtNode: unmountComponentAtNode,
42
+ flushSync,
43
+ unmountComponentAtNode,
45
44
  };
46
45
  }
47
46
  // HACKS...
48
47
  // TODO: lock version
49
48
  // TODO: link gh issues
50
- function flushToDom() {
51
- var oldDebounceRendering = preact__namespace.options.debounceRendering; // orig
52
- var callbackQ = [];
49
+ function flushSync(runBeforeFlush) {
50
+ runBeforeFlush();
51
+ let oldDebounceRendering = preact__namespace.options.debounceRendering; // orig
52
+ let callbackQ = [];
53
53
  function execCallbackSync(callback) {
54
54
  callbackQ.push(callback);
55
55
  }
@@ -60,37 +60,31 @@ function flushToDom() {
60
60
  }
61
61
  preact__namespace.options.debounceRendering = oldDebounceRendering;
62
62
  }
63
- var FakeComponent = /** @class */ (function (_super) {
64
- tslib.__extends(FakeComponent, _super);
65
- function FakeComponent() {
66
- return _super !== null && _super.apply(this, arguments) || this;
67
- }
68
- FakeComponent.prototype.render = function () { return preact__namespace.createElement('div', {}); };
69
- FakeComponent.prototype.componentDidMount = function () { this.setState({}); };
70
- return FakeComponent;
71
- }(preact__namespace.Component));
63
+ class FakeComponent extends preact__namespace.Component {
64
+ render() { return preact__namespace.createElement('div', {}); }
65
+ componentDidMount() { this.setState({}); }
66
+ }
72
67
  function createContext(defaultValue) {
73
- var ContextType = preact__namespace.createContext(defaultValue);
74
- var origProvider = ContextType.Provider;
68
+ let ContextType = preact__namespace.createContext(defaultValue);
69
+ let origProvider = ContextType.Provider;
75
70
  ContextType.Provider = function () {
76
- var _this = this;
77
- var isNew = !this.getChildContext;
78
- var children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params
71
+ let isNew = !this.getChildContext;
72
+ let children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params
79
73
  if (isNew) {
80
- var subs_1 = [];
81
- this.shouldComponentUpdate = function (_props) {
82
- if (_this.props.value !== _props.value) {
83
- subs_1.forEach(function (c) {
74
+ let subs = [];
75
+ this.shouldComponentUpdate = (_props) => {
76
+ if (this.props.value !== _props.value) {
77
+ subs.forEach((c) => {
84
78
  c.context = _props.value;
85
79
  c.forceUpdate();
86
80
  });
87
81
  }
88
82
  };
89
- this.sub = function (c) {
90
- subs_1.push(c);
91
- var old = c.componentWillUnmount;
92
- c.componentWillUnmount = function () {
93
- subs_1.splice(subs_1.indexOf(c), 1);
83
+ this.sub = (c) => {
84
+ subs.push(c);
85
+ let old = c.componentWillUnmount;
86
+ c.componentWillUnmount = () => {
87
+ subs.splice(subs.indexOf(c), 1);
94
88
  old && old.call(c);
95
89
  };
96
90
  };
package/vdom.d.ts CHANGED
@@ -17,7 +17,7 @@ declare global {
17
17
  export import createContext = preact.createContext;
18
18
  export import createPortal = preactCompat.createPortal;
19
19
  type VUIEvent = UIEvent;
20
- function flushToDom(): void;
20
+ function flushSync(callback: () => void): void;
21
21
  function unmountComponentAtNode(node: HTMLElement): void;
22
22
  }
23
23
  }
package/vdom.js CHANGED
@@ -1,8 +1,7 @@
1
- import { __extends } from 'tslib';
2
1
  import * as preact from 'preact';
3
2
  import * as preactCompat from 'preact/compat';
4
3
 
5
- var globalObj = typeof globalThis !== 'undefined' ? globalThis : window; // // TODO: streamline when killing IE11 support
4
+ let globalObj = typeof globalThis !== 'undefined' ? globalThis : window; // // TODO: streamline when killing IE11 support
6
5
  if (globalObj.FullCalendarVDom) {
7
6
  console.warn('FullCalendar VDOM already loaded');
8
7
  }
@@ -13,18 +12,19 @@ else {
13
12
  render: preact.render,
14
13
  createRef: preact.createRef,
15
14
  Fragment: preact.Fragment,
16
- createContext: createContext,
15
+ createContext,
17
16
  createPortal: preactCompat.createPortal,
18
- flushToDom: flushToDom,
19
- unmountComponentAtNode: unmountComponentAtNode,
17
+ flushSync,
18
+ unmountComponentAtNode,
20
19
  };
21
20
  }
22
21
  // HACKS...
23
22
  // TODO: lock version
24
23
  // TODO: link gh issues
25
- function flushToDom() {
26
- var oldDebounceRendering = preact.options.debounceRendering; // orig
27
- var callbackQ = [];
24
+ function flushSync(runBeforeFlush) {
25
+ runBeforeFlush();
26
+ let oldDebounceRendering = preact.options.debounceRendering; // orig
27
+ let callbackQ = [];
28
28
  function execCallbackSync(callback) {
29
29
  callbackQ.push(callback);
30
30
  }
@@ -35,37 +35,31 @@ function flushToDom() {
35
35
  }
36
36
  preact.options.debounceRendering = oldDebounceRendering;
37
37
  }
38
- var FakeComponent = /** @class */ (function (_super) {
39
- __extends(FakeComponent, _super);
40
- function FakeComponent() {
41
- return _super !== null && _super.apply(this, arguments) || this;
42
- }
43
- FakeComponent.prototype.render = function () { return preact.createElement('div', {}); };
44
- FakeComponent.prototype.componentDidMount = function () { this.setState({}); };
45
- return FakeComponent;
46
- }(preact.Component));
38
+ class FakeComponent extends preact.Component {
39
+ render() { return preact.createElement('div', {}); }
40
+ componentDidMount() { this.setState({}); }
41
+ }
47
42
  function createContext(defaultValue) {
48
- var ContextType = preact.createContext(defaultValue);
49
- var origProvider = ContextType.Provider;
43
+ let ContextType = preact.createContext(defaultValue);
44
+ let origProvider = ContextType.Provider;
50
45
  ContextType.Provider = function () {
51
- var _this = this;
52
- var isNew = !this.getChildContext;
53
- var children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params
46
+ let isNew = !this.getChildContext;
47
+ let children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params
54
48
  if (isNew) {
55
- var subs_1 = [];
56
- this.shouldComponentUpdate = function (_props) {
57
- if (_this.props.value !== _props.value) {
58
- subs_1.forEach(function (c) {
49
+ let subs = [];
50
+ this.shouldComponentUpdate = (_props) => {
51
+ if (this.props.value !== _props.value) {
52
+ subs.forEach((c) => {
59
53
  c.context = _props.value;
60
54
  c.forceUpdate();
61
55
  });
62
56
  }
63
57
  };
64
- this.sub = function (c) {
65
- subs_1.push(c);
66
- var old = c.componentWillUnmount;
67
- c.componentWillUnmount = function () {
68
- subs_1.splice(subs_1.indexOf(c), 1);
58
+ this.sub = (c) => {
59
+ subs.push(c);
60
+ let old = c.componentWillUnmount;
61
+ c.componentWillUnmount = () => {
62
+ subs.splice(subs.indexOf(c), 1);
69
63
  old && old.call(c);
70
64
  };
71
65
  };