@fullcalendar/core 5.11.2 → 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,72 +1,63 @@
1
1
  /*!
2
- FullCalendar v5.11.2
2
+ FullCalendar v6.0.0-beta.1
3
3
  Docs & License: https://fullcalendar.io/
4
4
  (c) 2022 Adam Shaw
5
5
  */
6
6
  import './vdom.js';
7
- import { __extends, __assign } from 'tslib';
8
- import { flushSync, render, createElement, CalendarRoot, CustomContentRenderContext, CalendarContent, unmountComponentAtNode, 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
- flushSync(function () {
37
- render(createElement(CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function (classNames, height, isHeightAuto, forPrint) {
38
- _this.setClassNames(classNames);
39
- _this.setHeight(height);
40
- return (createElement(CustomContentRenderContext.Provider, { value: _this.customContentRenderId },
41
- createElement(CalendarContent, __assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData_1))));
42
- }), _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);
43
40
  });
44
41
  }
45
- else if (_this.isRendered) {
46
- _this.isRendered = false;
47
- unmountComponentAtNode(_this.el);
48
- _this.setClassNames([]);
49
- _this.setHeight('');
42
+ else if (this.isRendered) {
43
+ this.isRendered = false;
44
+ unmountComponentAtNode(this.el);
45
+ this.setClassNames([]);
46
+ this.setHeight('');
50
47
  }
51
48
  };
52
- _this.el = el;
53
- _this.renderRunner = new DelayedRunner(_this.handleRenderRequest);
49
+ this.el = el;
50
+ this.renderRunner = new DelayedRunner(this.handleRenderRequest);
54
51
  new CalendarDataManager({
55
- optionOverrides: optionOverrides,
56
- calendarApi: _this,
57
- onAction: _this.handleAction,
58
- onData: _this.handleData,
52
+ optionOverrides,
53
+ calendarApi: this,
54
+ onAction: this.handleAction,
55
+ onData: this.handleData,
59
56
  });
60
- return _this;
61
57
  }
62
- Object.defineProperty(Calendar.prototype, "view", {
63
- get: function () { return this.currentData.viewApi; } // for public API
64
- ,
65
- enumerable: false,
66
- configurable: true
67
- });
68
- Calendar.prototype.render = function () {
69
- var wasRendering = this.isRendering;
58
+ get view() { return this.currentData.viewApi; } // for public API
59
+ render() {
60
+ let wasRendering = this.isRendering;
70
61
  if (!wasRendering) {
71
62
  this.isRendering = true;
72
63
  }
@@ -77,52 +68,48 @@ var Calendar = /** @class */ (function (_super) {
77
68
  if (wasRendering) {
78
69
  this.updateSize();
79
70
  }
80
- };
81
- Calendar.prototype.destroy = function () {
71
+ }
72
+ destroy() {
82
73
  if (this.isRendering) {
83
74
  this.isRendering = false;
84
75
  this.renderRunner.request();
85
76
  }
86
- };
87
- Calendar.prototype.updateSize = function () {
88
- var _this = this;
89
- flushSync(function () {
90
- _super.prototype.updateSize.call(_this);
77
+ }
78
+ updateSize() {
79
+ flushSync(() => {
80
+ super.updateSize();
91
81
  });
92
- };
93
- Calendar.prototype.batchRendering = function (func) {
82
+ }
83
+ batchRendering(func) {
94
84
  this.renderRunner.pause('batchRendering');
95
85
  func();
96
86
  this.renderRunner.resume('batchRendering');
97
- };
98
- Calendar.prototype.pauseRendering = function () {
87
+ }
88
+ pauseRendering() {
99
89
  this.renderRunner.pause('pauseRendering');
100
- };
101
- Calendar.prototype.resumeRendering = function () {
90
+ }
91
+ resumeRendering() {
102
92
  this.renderRunner.resume('pauseRendering', true);
103
- };
104
- Calendar.prototype.resetOptions = function (optionOverrides, append) {
93
+ }
94
+ resetOptions(optionOverrides, append) {
105
95
  this.currentDataManager.resetOptions(optionOverrides, append);
106
- };
107
- Calendar.prototype.setClassNames = function (classNames) {
96
+ }
97
+ setClassNames(classNames) {
108
98
  if (!isArraysEqual(classNames, this.currentClassNames)) {
109
- var classList = this.el.classList;
110
- for (var _i = 0, _a = this.currentClassNames; _i < _a.length; _i++) {
111
- var className = _a[_i];
99
+ let { classList } = this.el;
100
+ for (let className of this.currentClassNames) {
112
101
  classList.remove(className);
113
102
  }
114
- for (var _b = 0, classNames_1 = classNames; _b < classNames_1.length; _b++) {
115
- var className = classNames_1[_b];
103
+ for (let className of classNames) {
116
104
  classList.add(className);
117
105
  }
118
106
  this.currentClassNames = classNames;
119
107
  }
120
- };
121
- Calendar.prototype.setHeight = function (height) {
108
+ }
109
+ setHeight(height) {
122
110
  applyStyleProp(this.el, 'height', height);
123
- };
124
- return Calendar;
125
- }(CalendarApi));
111
+ }
112
+ }
126
113
 
127
114
  export { Calendar };
128
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, 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":";;;;;;;;;;;IAM8B,4BAAW;IAWvC,kBAAY,EAAe,EAAE,eAAqC;QAArC,gCAAA,EAAA,oBAAqC;QAAlE,YACE,iBAAO,SAWR;QAnBD,iBAAW,GA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CAAC,CAAA;QACzC,IAAI,EAAE,CAAA;QACN,IAAI,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,CA3IA,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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AAS,CAAC,CAAA;aAC5B;YAED,KAAK,IAAI,SAAS,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.11.2",
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.11.2",
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.11.2"
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,10 +37,10 @@ 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
- flushSync: flushSync,
44
- unmountComponentAtNode: unmountComponentAtNode,
42
+ flushSync,
43
+ unmountComponentAtNode,
45
44
  };
46
45
  }
47
46
  // HACKS...
@@ -49,8 +48,8 @@ else {
49
48
  // TODO: link gh issues
50
49
  function flushSync(runBeforeFlush) {
51
50
  runBeforeFlush();
52
- var oldDebounceRendering = preact__namespace.options.debounceRendering; // orig
53
- var callbackQ = [];
51
+ let oldDebounceRendering = preact__namespace.options.debounceRendering; // orig
52
+ let callbackQ = [];
54
53
  function execCallbackSync(callback) {
55
54
  callbackQ.push(callback);
56
55
  }
@@ -61,37 +60,31 @@ function flushSync(runBeforeFlush) {
61
60
  }
62
61
  preact__namespace.options.debounceRendering = oldDebounceRendering;
63
62
  }
64
- var FakeComponent = /** @class */ (function (_super) {
65
- tslib.__extends(FakeComponent, _super);
66
- function FakeComponent() {
67
- return _super !== null && _super.apply(this, arguments) || this;
68
- }
69
- FakeComponent.prototype.render = function () { return preact__namespace.createElement('div', {}); };
70
- FakeComponent.prototype.componentDidMount = function () { this.setState({}); };
71
- return FakeComponent;
72
- }(preact__namespace.Component));
63
+ class FakeComponent extends preact__namespace.Component {
64
+ render() { return preact__namespace.createElement('div', {}); }
65
+ componentDidMount() { this.setState({}); }
66
+ }
73
67
  function createContext(defaultValue) {
74
- var ContextType = preact__namespace.createContext(defaultValue);
75
- var origProvider = ContextType.Provider;
68
+ let ContextType = preact__namespace.createContext(defaultValue);
69
+ let origProvider = ContextType.Provider;
76
70
  ContextType.Provider = function () {
77
- var _this = this;
78
- var isNew = !this.getChildContext;
79
- 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
80
73
  if (isNew) {
81
- var subs_1 = [];
82
- this.shouldComponentUpdate = function (_props) {
83
- if (_this.props.value !== _props.value) {
84
- subs_1.forEach(function (c) {
74
+ let subs = [];
75
+ this.shouldComponentUpdate = (_props) => {
76
+ if (this.props.value !== _props.value) {
77
+ subs.forEach((c) => {
85
78
  c.context = _props.value;
86
79
  c.forceUpdate();
87
80
  });
88
81
  }
89
82
  };
90
- this.sub = function (c) {
91
- subs_1.push(c);
92
- var old = c.componentWillUnmount;
93
- c.componentWillUnmount = function () {
94
- 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);
95
88
  old && old.call(c);
96
89
  };
97
90
  };
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,10 +12,10 @@ 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
- flushSync: flushSync,
19
- unmountComponentAtNode: unmountComponentAtNode,
17
+ flushSync,
18
+ unmountComponentAtNode,
20
19
  };
21
20
  }
22
21
  // HACKS...
@@ -24,8 +23,8 @@ else {
24
23
  // TODO: link gh issues
25
24
  function flushSync(runBeforeFlush) {
26
25
  runBeforeFlush();
27
- var oldDebounceRendering = preact.options.debounceRendering; // orig
28
- var callbackQ = [];
26
+ let oldDebounceRendering = preact.options.debounceRendering; // orig
27
+ let callbackQ = [];
29
28
  function execCallbackSync(callback) {
30
29
  callbackQ.push(callback);
31
30
  }
@@ -36,37 +35,31 @@ function flushSync(runBeforeFlush) {
36
35
  }
37
36
  preact.options.debounceRendering = oldDebounceRendering;
38
37
  }
39
- var FakeComponent = /** @class */ (function (_super) {
40
- __extends(FakeComponent, _super);
41
- function FakeComponent() {
42
- return _super !== null && _super.apply(this, arguments) || this;
43
- }
44
- FakeComponent.prototype.render = function () { return preact.createElement('div', {}); };
45
- FakeComponent.prototype.componentDidMount = function () { this.setState({}); };
46
- return FakeComponent;
47
- }(preact.Component));
38
+ class FakeComponent extends preact.Component {
39
+ render() { return preact.createElement('div', {}); }
40
+ componentDidMount() { this.setState({}); }
41
+ }
48
42
  function createContext(defaultValue) {
49
- var ContextType = preact.createContext(defaultValue);
50
- var origProvider = ContextType.Provider;
43
+ let ContextType = preact.createContext(defaultValue);
44
+ let origProvider = ContextType.Provider;
51
45
  ContextType.Provider = function () {
52
- var _this = this;
53
- var isNew = !this.getChildContext;
54
- 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
55
48
  if (isNew) {
56
- var subs_1 = [];
57
- this.shouldComponentUpdate = function (_props) {
58
- if (_this.props.value !== _props.value) {
59
- subs_1.forEach(function (c) {
49
+ let subs = [];
50
+ this.shouldComponentUpdate = (_props) => {
51
+ if (this.props.value !== _props.value) {
52
+ subs.forEach((c) => {
60
53
  c.context = _props.value;
61
54
  c.forceUpdate();
62
55
  });
63
56
  }
64
57
  };
65
- this.sub = function (c) {
66
- subs_1.push(c);
67
- var old = c.componentWillUnmount;
68
- c.componentWillUnmount = function () {
69
- 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);
70
63
  old && old.call(c);
71
64
  };
72
65
  };